Metamath Proof Explorer


Theorem odzcllem

Description: - Lemma for odzcl , showing existence of a recurrent point for the exponential. (Contributed by Mario Carneiro, 28-Feb-2014) (Proof shortened by AV, 26-Sep-2020)

Ref Expression
Assertion odzcllem N A A gcd N = 1 od N A N A od N A 1

Proof

Step Hyp Ref Expression
1 odzval N A A gcd N = 1 od N A = sup n | N A n 1 <
2 ssrab2 n | N A n 1
3 nnuz = 1
4 2 3 sseqtri n | N A n 1 1
5 phicl N ϕ N
6 5 3ad2ant1 N A A gcd N = 1 ϕ N
7 eulerth N A A gcd N = 1 A ϕ N mod N = 1 mod N
8 simp1 N A A gcd N = 1 N
9 simp2 N A A gcd N = 1 A
10 6 nnnn0d N A A gcd N = 1 ϕ N 0
11 zexpcl A ϕ N 0 A ϕ N
12 9 10 11 syl2anc N A A gcd N = 1 A ϕ N
13 1z 1
14 moddvds N A ϕ N 1 A ϕ N mod N = 1 mod N N A ϕ N 1
15 13 14 mp3an3 N A ϕ N A ϕ N mod N = 1 mod N N A ϕ N 1
16 8 12 15 syl2anc N A A gcd N = 1 A ϕ N mod N = 1 mod N N A ϕ N 1
17 7 16 mpbid N A A gcd N = 1 N A ϕ N 1
18 oveq2 n = ϕ N A n = A ϕ N
19 18 oveq1d n = ϕ N A n 1 = A ϕ N 1
20 19 breq2d n = ϕ N N A n 1 N A ϕ N 1
21 20 rspcev ϕ N N A ϕ N 1 n N A n 1
22 6 17 21 syl2anc N A A gcd N = 1 n N A n 1
23 rabn0 n | N A n 1 n N A n 1
24 22 23 sylibr N A A gcd N = 1 n | N A n 1
25 infssuzcl n | N A n 1 1 n | N A n 1 sup n | N A n 1 < n | N A n 1
26 4 24 25 sylancr N A A gcd N = 1 sup n | N A n 1 < n | N A n 1
27 1 26 eqeltrd N A A gcd N = 1 od N A n | N A n 1
28 oveq2 n = od N A A n = A od N A
29 28 oveq1d n = od N A A n 1 = A od N A 1
30 29 breq2d n = od N A N A n 1 N A od N A 1
31 30 elrab od N A n | N A n 1 od N A N A od N A 1
32 27 31 sylib N A A gcd N = 1 od N A N A od N A 1