The present invention provides, for example, the following compound:wherein ring Z is pyridine or a carbocycle, each of which is substituted or unsubstituted,ring A is a carbocycle or a heterocycle, each of which is substituted or unsubstituted, R1 is substituted or unsubstituted alkyl or the like,R2a, R2b, R4a and R4b are each independently hydrogen or substituted or unsubstituted alkyl or the like,its pharmaceutically acceptable salt or a solvate thereof having an effect of inhibiting amyloid 6 production, especially a BACE1 inhibitory activity, and useful as a medicament for treating diseases induced by production, secretion or deposition of amyloid ß proteins.