Metamath Proof Explorer


Theorem fmtnofac2lem

Description: Lemma for fmtnofac2 (Induction step). (Contributed by AV, 30-Jul-2021)

Ref Expression
Assertion fmtnofac2lem y 2 z 2 N 2 y FermatNo N k 0 y = k 2 N + 2 + 1 N 2 z FermatNo N k 0 z = k 2 N + 2 + 1 N 2 y z FermatNo N k 0 y z = k 2 N + 2 + 1

Proof

Step Hyp Ref Expression
1 eluzelz y 2 y
2 1 adantr y 2 z 2 y
3 eluzelz z 2 z
4 3 adantl y 2 z 2 z
5 eluzge2nn0 N 2 N 0
6 fmtnonn N 0 FermatNo N
7 6 nnzd N 0 FermatNo N
8 5 7 syl N 2 FermatNo N
9 muldvds2 y z FermatNo N y z FermatNo N z FermatNo N
10 2 4 8 9 syl2an3an y 2 z 2 N 2 y z FermatNo N z FermatNo N
11 muldvds1 y z FermatNo N y z FermatNo N y FermatNo N
12 2 4 8 11 syl2an3an y 2 z 2 N 2 y z FermatNo N y FermatNo N
13 pm2.27 N 2 y FermatNo N N 2 y FermatNo N k 0 y = k 2 N + 2 + 1 k 0 y = k 2 N + 2 + 1
14 13 ad2ant2lr y 2 z 2 N 2 y FermatNo N z FermatNo N N 2 y FermatNo N k 0 y = k 2 N + 2 + 1 k 0 y = k 2 N + 2 + 1
15 pm2.27 N 2 z FermatNo N N 2 z FermatNo N k 0 z = k 2 N + 2 + 1 k 0 z = k 2 N + 2 + 1
16 15 ad2ant2l y 2 z 2 N 2 y FermatNo N z FermatNo N N 2 z FermatNo N k 0 z = k 2 N + 2 + 1 k 0 z = k 2 N + 2 + 1
17 oveq1 k = m k 2 N + 2 = m 2 N + 2
18 17 oveq1d k = m k 2 N + 2 + 1 = m 2 N + 2 + 1
19 18 eqeq2d k = m y = k 2 N + 2 + 1 y = m 2 N + 2 + 1
20 19 cbvrexvw k 0 y = k 2 N + 2 + 1 m 0 y = m 2 N + 2 + 1
21 oveq1 k = n k 2 N + 2 = n 2 N + 2
22 21 oveq1d k = n k 2 N + 2 + 1 = n 2 N + 2 + 1
23 22 eqeq2d k = n z = k 2 N + 2 + 1 z = n 2 N + 2 + 1
24 23 cbvrexvw k 0 z = k 2 N + 2 + 1 n 0 z = n 2 N + 2 + 1
25 simpl m 0 n 0 m 0
26 25 adantl N 2 m 0 n 0 m 0
27 2nn0 2 0
28 27 a1i N 2 2 0
29 5 28 nn0addcld N 2 N + 2 0
30 28 29 nn0expcld N 2 2 N + 2 0
31 30 adantr N 2 m 0 n 0 2 N + 2 0
32 26 31 nn0mulcld N 2 m 0 n 0 m 2 N + 2 0
33 simpr m 0 n 0 n 0
34 33 adantl N 2 m 0 n 0 n 0
35 32 34 nn0mulcld N 2 m 0 n 0 m 2 N + 2 n 0
36 nn0addcl m 0 n 0 m + n 0
37 36 adantl N 2 m 0 n 0 m + n 0
38 35 37 nn0addcld N 2 m 0 n 0 m 2 N + 2 n + m + n 0
39 oveq1 k = m 2 N + 2 n + m + n k 2 N + 2 = m 2 N + 2 n + m + n 2 N + 2
40 39 oveq1d k = m 2 N + 2 n + m + n k 2 N + 2 + 1 = m 2 N + 2 n + m + n 2 N + 2 + 1
41 40 eqeq2d k = m 2 N + 2 n + m + n m 2 N + 2 n + m + n 2 N + 2 + 1 = k 2 N + 2 + 1 m 2 N + 2 n + m + n 2 N + 2 + 1 = m 2 N + 2 n + m + n 2 N + 2 + 1
42 41 adantl N 2 m 0 n 0 k = m 2 N + 2 n + m + n m 2 N + 2 n + m + n 2 N + 2 + 1 = k 2 N + 2 + 1 m 2 N + 2 n + m + n 2 N + 2 + 1 = m 2 N + 2 n + m + n 2 N + 2 + 1
43 eqidd N 2 m 0 n 0 m 2 N + 2 n + m + n 2 N + 2 + 1 = m 2 N + 2 n + m + n 2 N + 2 + 1
44 38 42 43 rspcedvd N 2 m 0 n 0 k 0 m 2 N + 2 n + m + n 2 N + 2 + 1 = k 2 N + 2 + 1
45 nn0cn m 0 m
46 45 adantr m 0 n 0 m
47 46 adantl N 2 m 0 n 0 m
48 30 nn0cnd N 2 2 N + 2
49 48 adantr N 2 m 0 n 0 2 N + 2
50 47 49 mulcld N 2 m 0 n 0 m 2 N + 2
51 33 nn0cnd m 0 n 0 n
52 51 adantl N 2 m 0 n 0 n
53 52 49 mulcld N 2 m 0 n 0 n 2 N + 2
54 50 53 jca N 2 m 0 n 0 m 2 N + 2 n 2 N + 2
55 54 adantr N 2 m 0 n 0 k 0 m 2 N + 2 n 2 N + 2
56 muladd11r m 2 N + 2 n 2 N + 2 m 2 N + 2 + 1 n 2 N + 2 + 1 = m 2 N + 2 n 2 N + 2 + m 2 N + 2 + n 2 N + 2 + 1
57 55 56 syl N 2 m 0 n 0 k 0 m 2 N + 2 + 1 n 2 N + 2 + 1 = m 2 N + 2 n 2 N + 2 + m 2 N + 2 + n 2 N + 2 + 1
58 25 nn0cnd m 0 n 0 m
59 58 adantl N 2 m 0 n 0 m
60 59 52 49 3jca N 2 m 0 n 0 m n 2 N + 2
61 60 adantr N 2 m 0 n 0 k 0 m n 2 N + 2
62 adddir m n 2 N + 2 m + n 2 N + 2 = m 2 N + 2 + n 2 N + 2
63 61 62 syl N 2 m 0 n 0 k 0 m + n 2 N + 2 = m 2 N + 2 + n 2 N + 2
64 63 eqcomd N 2 m 0 n 0 k 0 m 2 N + 2 + n 2 N + 2 = m + n 2 N + 2
65 64 oveq2d N 2 m 0 n 0 k 0 m 2 N + 2 n 2 N + 2 + m 2 N + 2 + n 2 N + 2 = m 2 N + 2 n 2 N + 2 + m + n 2 N + 2
66 50 adantr N 2 m 0 n 0 k 0 m 2 N + 2
67 52 adantr N 2 m 0 n 0 k 0 n
68 49 adantr N 2 m 0 n 0 k 0 2 N + 2
69 66 67 68 mulassd N 2 m 0 n 0 k 0 m 2 N + 2 n 2 N + 2 = m 2 N + 2 n 2 N + 2
70 69 eqcomd N 2 m 0 n 0 k 0 m 2 N + 2 n 2 N + 2 = m 2 N + 2 n 2 N + 2
71 70 oveq1d N 2 m 0 n 0 k 0 m 2 N + 2 n 2 N + 2 + m 2 N + 2 + n 2 N + 2 = m 2 N + 2 n 2 N + 2 + m 2 N + 2 + n 2 N + 2
72 50 52 mulcld N 2 m 0 n 0 m 2 N + 2 n
73 36 nn0cnd m 0 n 0 m + n
74 73 adantl N 2 m 0 n 0 m + n
75 72 74 49 3jca N 2 m 0 n 0 m 2 N + 2 n m + n 2 N + 2
76 75 adantr N 2 m 0 n 0 k 0 m 2 N + 2 n m + n 2 N + 2
77 adddir m 2 N + 2 n m + n 2 N + 2 m 2 N + 2 n + m + n 2 N + 2 = m 2 N + 2 n 2 N + 2 + m + n 2 N + 2
78 76 77 syl N 2 m 0 n 0 k 0 m 2 N + 2 n + m + n 2 N + 2 = m 2 N + 2 n 2 N + 2 + m + n 2 N + 2
79 65 71 78 3eqtr4d N 2 m 0 n 0 k 0 m 2 N + 2 n 2 N + 2 + m 2 N + 2 + n 2 N + 2 = m 2 N + 2 n + m + n 2 N + 2
80 79 oveq1d N 2 m 0 n 0 k 0 m 2 N + 2 n 2 N + 2 + m 2 N + 2 + n 2 N + 2 + 1 = m 2 N + 2 n + m + n 2 N + 2 + 1
81 57 80 eqtrd N 2 m 0 n 0 k 0 m 2 N + 2 + 1 n 2 N + 2 + 1 = m 2 N + 2 n + m + n 2 N + 2 + 1
82 81 eqeq1d N 2 m 0 n 0 k 0 m 2 N + 2 + 1 n 2 N + 2 + 1 = k 2 N + 2 + 1 m 2 N + 2 n + m + n 2 N + 2 + 1 = k 2 N + 2 + 1
83 82 rexbidva N 2 m 0 n 0 k 0 m 2 N + 2 + 1 n 2 N + 2 + 1 = k 2 N + 2 + 1 k 0 m 2 N + 2 n + m + n 2 N + 2 + 1 = k 2 N + 2 + 1
84 44 83 mpbird N 2 m 0 n 0 k 0 m 2 N + 2 + 1 n 2 N + 2 + 1 = k 2 N + 2 + 1
85 84 adantll y 2 z 2 N 2 m 0 n 0 k 0 m 2 N + 2 + 1 n 2 N + 2 + 1 = k 2 N + 2 + 1
86 oveq12 y = m 2 N + 2 + 1 z = n 2 N + 2 + 1 y z = m 2 N + 2 + 1 n 2 N + 2 + 1
87 86 ancoms z = n 2 N + 2 + 1 y = m 2 N + 2 + 1 y z = m 2 N + 2 + 1 n 2 N + 2 + 1
88 87 eqeq1d z = n 2 N + 2 + 1 y = m 2 N + 2 + 1 y z = k 2 N + 2 + 1 m 2 N + 2 + 1 n 2 N + 2 + 1 = k 2 N + 2 + 1
89 88 rexbidv z = n 2 N + 2 + 1 y = m 2 N + 2 + 1 k 0 y z = k 2 N + 2 + 1 k 0 m 2 N + 2 + 1 n 2 N + 2 + 1 = k 2 N + 2 + 1
90 85 89 syl5ibrcom y 2 z 2 N 2 m 0 n 0 z = n 2 N + 2 + 1 y = m 2 N + 2 + 1 k 0 y z = k 2 N + 2 + 1
91 90 expd y 2 z 2 N 2 m 0 n 0 z = n 2 N + 2 + 1 y = m 2 N + 2 + 1 k 0 y z = k 2 N + 2 + 1
92 91 anassrs y 2 z 2 N 2 m 0 n 0 z = n 2 N + 2 + 1 y = m 2 N + 2 + 1 k 0 y z = k 2 N + 2 + 1
93 92 rexlimdva y 2 z 2 N 2 m 0 n 0 z = n 2 N + 2 + 1 y = m 2 N + 2 + 1 k 0 y z = k 2 N + 2 + 1
94 24 93 syl5bi y 2 z 2 N 2 m 0 k 0 z = k 2 N + 2 + 1 y = m 2 N + 2 + 1 k 0 y z = k 2 N + 2 + 1
95 94 com23 y 2 z 2 N 2 m 0 y = m 2 N + 2 + 1 k 0 z = k 2 N + 2 + 1 k 0 y z = k 2 N + 2 + 1
96 95 rexlimdva y 2 z 2 N 2 m 0 y = m 2 N + 2 + 1 k 0 z = k 2 N + 2 + 1 k 0 y z = k 2 N + 2 + 1
97 20 96 syl5bi y 2 z 2 N 2 k 0 y = k 2 N + 2 + 1 k 0 z = k 2 N + 2 + 1 k 0 y z = k 2 N + 2 + 1
98 97 impd y 2 z 2 N 2 k 0 y = k 2 N + 2 + 1 k 0 z = k 2 N + 2 + 1 k 0 y z = k 2 N + 2 + 1
99 98 adantr y 2 z 2 N 2 y FermatNo N z FermatNo N k 0 y = k 2 N + 2 + 1 k 0 z = k 2 N + 2 + 1 k 0 y z = k 2 N + 2 + 1
100 14 16 99 syl2and y 2 z 2 N 2 y FermatNo N z FermatNo N N 2 y FermatNo N k 0 y = k 2 N + 2 + 1 N 2 z FermatNo N k 0 z = k 2 N + 2 + 1 k 0 y z = k 2 N + 2 + 1
101 100 exp32 y 2 z 2 N 2 y FermatNo N z FermatNo N N 2 y FermatNo N k 0 y = k 2 N + 2 + 1 N 2 z FermatNo N k 0 z = k 2 N + 2 + 1 k 0 y z = k 2 N + 2 + 1
102 12 101 syld y 2 z 2 N 2 y z FermatNo N z FermatNo N N 2 y FermatNo N k 0 y = k 2 N + 2 + 1 N 2 z FermatNo N k 0 z = k 2 N + 2 + 1 k 0 y z = k 2 N + 2 + 1
103 10 102 mpdd y 2 z 2 N 2 y z FermatNo N N 2 y FermatNo N k 0 y = k 2 N + 2 + 1 N 2 z FermatNo N k 0 z = k 2 N + 2 + 1 k 0 y z = k 2 N + 2 + 1
104 103 expimpd y 2 z 2 N 2 y z FermatNo N N 2 y FermatNo N k 0 y = k 2 N + 2 + 1 N 2 z FermatNo N k 0 z = k 2 N + 2 + 1 k 0 y z = k 2 N + 2 + 1
105 104 com23 y 2 z 2 N 2 y FermatNo N k 0 y = k 2 N + 2 + 1 N 2 z FermatNo N k 0 z = k 2 N + 2 + 1 N 2 y z FermatNo N k 0 y z = k 2 N + 2 + 1