Compounds with MAGL inhibitory effect are provided for use in the prevention or treatment of neurodegenerative diseases (e.g., Alzheimer's disease, Parkinson's disease, Huntington's disease, amyotrophic lateral sclerosis, traumatic brain injury, glaucoma, multiple sclerosis, etc.), anxiety disorders, pain (e.g., inflammatory pain, cancerous pain, neuropathic pain, etc.) Drugs for epilepsy, depression, etc. The invention relates to a compound represented by formula (I): wherein each symbol is defined in the specification, or a salt thereof.本發明提供了具有MAGL抑制作用的化合物,其用作預防或治療神經變性疾病(例如,阿爾海默氏病、帕金森氏症、亨廷頓舞蹈症、肌萎縮性側索硬化、外傷性腦損傷、青光眼、多發性硬化,等等)、焦慮症、疼痛(例如,炎性疼痛、癌性疼痛、神經性疼痛,等等)、癲癇、抑鬱症等等的藥劑。本發明涉及式(I)所代表的化合物:其中,每個符號如說明書所定義,或其鹽。