Provided is a compound having a cholinergic muscarinic M1 receptor positive allosteric modulator activity, and useful as a prophylactic or therapeutic drug for Alzheimer's disease, schizophrenia, pain, sleep disorder and the like. The present invention relates to a compound represented by the formulawherein ring A is a 4- to 7-membered ring optionally having substituent(s); L is —O—, —S—, —SO— or —SO2—; R1 is a C1-6 alkyl group optionally having substituent(s) (provided that when L is —O—, R1 is not a C1-6 alkyl group optionally substituted by halogen atom(s)), or a cyclic group optionally having substituent(s); X1 is —CRa═ or —N═; X2 is —CRb═ or —N═; X3 is —CRc= or —N═; Ra, Rb and Rc are each a C1-6 alkyl group, C2-6 alkenyl group, C1-6 alkoxy group, C3-6 cycloalkyl group, C3-6 cycloalkoxy group or C6-14 aryl group, each of which optionally having substituent(s), H or halogen, or a salt thereof.