Provided, for example, are a compound described below and the like, which have amyloid β production inhibitory activity, especially BACE1 inhibitory effect and serve as therapeutic agents for diseases induced by the production, secretion and deposition of amyloid β protein. A compound represented by formula (I), a pharmaceutically acceptable salt thereof, or a solvate of the compound or the salt.(In the formula, ring Z represents a substituted or unsubstituted pyridine or a substituted or unsubstituted carbon ring; ring A represents a substituted or unsubstituted carbon ring or a substituted or unsubstituted heterocyclic ring; R