Metamath Proof Explorer


Theorem gexexlem

Description: Lemma for gexex . (Contributed by Mario Carneiro, 24-Apr-2016)

Ref Expression
Hypotheses gexex.1 X = Base G
gexex.2 E = gEx G
gexex.3 O = od G
gexexlem.1 φ G Abel
gexexlem.2 φ E
gexexlem.3 φ A X
gexexlem.4 φ y X O y O A
Assertion gexexlem φ O A = E

Proof

Step Hyp Ref Expression
1 gexex.1 X = Base G
2 gexex.2 E = gEx G
3 gexex.3 O = od G
4 gexexlem.1 φ G Abel
5 gexexlem.2 φ E
6 gexexlem.3 φ A X
7 gexexlem.4 φ y X O y O A
8 1 3 odcl A X O A 0
9 6 8 syl φ O A 0
10 5 nnnn0d φ E 0
11 ablgrp G Abel G Grp
12 4 11 syl φ G Grp
13 1 2 3 gexod G Grp A X O A E
14 12 6 13 syl2anc φ O A E
15 4 ad2antrr φ x X p G Abel
16 12 ad2antrr φ x X p G Grp
17 prmnn p p
18 17 adantl φ x X p p
19 simpr φ x X p p
20 5 ad2antrr φ x X p E
21 6 ad2antrr φ x X p A X
22 1 2 3 gexnnod G Grp E A X O A
23 16 20 21 22 syl3anc φ x X p O A
24 19 23 pccld φ x X p p pCnt O A 0
25 18 24 nnexpcld φ x X p p p pCnt O A
26 25 nnzd φ x X p p p pCnt O A
27 eqid G = G
28 1 27 mulgcl G Grp p p pCnt O A A X p p pCnt O A G A X
29 16 26 21 28 syl3anc φ x X p p p pCnt O A G A X
30 simplr φ x X p x X
31 1 2 3 gexnnod G Grp E x X O x
32 16 20 30 31 syl3anc φ x X p O x
33 pcdvds p O x p p pCnt O x O x
34 19 32 33 syl2anc φ x X p p p pCnt O x O x
35 19 32 pccld φ x X p p pCnt O x 0
36 18 35 nnexpcld φ x X p p p pCnt O x
37 nndivdvds O x p p pCnt O x p p pCnt O x O x O x p p pCnt O x
38 32 36 37 syl2anc φ x X p p p pCnt O x O x O x p p pCnt O x
39 34 38 mpbid φ x X p O x p p pCnt O x
40 39 nnzd φ x X p O x p p pCnt O x
41 1 27 mulgcl G Grp O x p p pCnt O x x X O x p p pCnt O x G x X
42 16 40 30 41 syl3anc φ x X p O x p p pCnt O x G x X
43 1 3 27 odmulg G Grp A X p p pCnt O A O A = p p pCnt O A gcd O A O p p pCnt O A G A
44 16 21 26 43 syl3anc φ x X p O A = p p pCnt O A gcd O A O p p pCnt O A G A
45 pcdvds p O A p p pCnt O A O A
46 19 23 45 syl2anc φ x X p p p pCnt O A O A
47 gcdeq p p pCnt O A O A p p pCnt O A gcd O A = p p pCnt O A p p pCnt O A O A
48 25 23 47 syl2anc φ x X p p p pCnt O A gcd O A = p p pCnt O A p p pCnt O A O A
49 46 48 mpbird φ x X p p p pCnt O A gcd O A = p p pCnt O A
50 49 oveq1d φ x X p p p pCnt O A gcd O A O p p pCnt O A G A = p p pCnt O A O p p pCnt O A G A
51 44 50 eqtrd φ x X p O A = p p pCnt O A O p p pCnt O A G A
52 51 oveq1d φ x X p O A p p pCnt O A = p p pCnt O A O p p pCnt O A G A p p pCnt O A
53 1 2 3 gexnnod G Grp E p p pCnt O A G A X O p p pCnt O A G A
54 16 20 29 53 syl3anc φ x X p O p p pCnt O A G A
55 54 nncnd φ x X p O p p pCnt O A G A
56 25 nncnd φ x X p p p pCnt O A
57 25 nnne0d φ x X p p p pCnt O A 0
58 55 56 57 divcan3d φ x X p p p pCnt O A O p p pCnt O A G A p p pCnt O A = O p p pCnt O A G A
59 52 58 eqtr2d φ x X p O p p pCnt O A G A = O A p p pCnt O A
60 1 2 3 gexnnod G Grp E O x p p pCnt O x G x X O O x p p pCnt O x G x
61 16 20 42 60 syl3anc φ x X p O O x p p pCnt O x G x
62 61 nncnd φ x X p O O x p p pCnt O x G x
63 36 nncnd φ x X p p p pCnt O x
64 39 nncnd φ x X p O x p p pCnt O x
65 39 nnne0d φ x X p O x p p pCnt O x 0
66 32 nncnd φ x X p O x
67 36 nnne0d φ x X p p p pCnt O x 0
68 66 63 67 divcan1d φ x X p O x p p pCnt O x p p pCnt O x = O x
69 1 3 27 odmulg G Grp x X O x p p pCnt O x O x = O x p p pCnt O x gcd O x O O x p p pCnt O x G x
70 16 30 40 69 syl3anc φ x X p O x = O x p p pCnt O x gcd O x O O x p p pCnt O x G x
71 36 nnzd φ x X p p p pCnt O x
72 dvdsmul1 O x p p pCnt O x p p pCnt O x O x p p pCnt O x O x p p pCnt O x p p pCnt O x
73 40 71 72 syl2anc φ x X p O x p p pCnt O x O x p p pCnt O x p p pCnt O x
74 73 68 breqtrd φ x X p O x p p pCnt O x O x
75 gcdeq O x p p pCnt O x O x O x p p pCnt O x gcd O x = O x p p pCnt O x O x p p pCnt O x O x
76 39 32 75 syl2anc φ x X p O x p p pCnt O x gcd O x = O x p p pCnt O x O x p p pCnt O x O x
77 74 76 mpbird φ x X p O x p p pCnt O x gcd O x = O x p p pCnt O x
78 77 oveq1d φ x X p O x p p pCnt O x gcd O x O O x p p pCnt O x G x = O x p p pCnt O x O O x p p pCnt O x G x
79 68 70 78 3eqtrrd φ x X p O x p p pCnt O x O O x p p pCnt O x G x = O x p p pCnt O x p p pCnt O x
80 62 63 64 65 79 mulcanad φ x X p O O x p p pCnt O x G x = p p pCnt O x
81 59 80 oveq12d φ x X p O p p pCnt O A G A gcd O O x p p pCnt O x G x = O A p p pCnt O A gcd p p pCnt O x
82 nndivdvds O A p p pCnt O A p p pCnt O A O A O A p p pCnt O A
83 23 25 82 syl2anc φ x X p p p pCnt O A O A O A p p pCnt O A
84 46 83 mpbid φ x X p O A p p pCnt O A
85 84 nnzd φ x X p O A p p pCnt O A
86 85 71 gcdcomd φ x X p O A p p pCnt O A gcd p p pCnt O x = p p pCnt O x gcd O A p p pCnt O A
87 pcndvds2 p O A ¬ p O A p p pCnt O A
88 19 23 87 syl2anc φ x X p ¬ p O A p p pCnt O A
89 coprm p O A p p pCnt O A ¬ p O A p p pCnt O A p gcd O A p p pCnt O A = 1
90 19 85 89 syl2anc φ x X p ¬ p O A p p pCnt O A p gcd O A p p pCnt O A = 1
91 88 90 mpbid φ x X p p gcd O A p p pCnt O A = 1
92 prmz p p
93 92 adantl φ x X p p
94 rpexp1i p O A p p pCnt O A p pCnt O x 0 p gcd O A p p pCnt O A = 1 p p pCnt O x gcd O A p p pCnt O A = 1
95 93 85 35 94 syl3anc φ x X p p gcd O A p p pCnt O A = 1 p p pCnt O x gcd O A p p pCnt O A = 1
96 91 95 mpd φ x X p p p pCnt O x gcd O A p p pCnt O A = 1
97 81 86 96 3eqtrd φ x X p O p p pCnt O A G A gcd O O x p p pCnt O x G x = 1
98 eqid + G = + G
99 3 1 98 odadd G Abel p p pCnt O A G A X O x p p pCnt O x G x X O p p pCnt O A G A gcd O O x p p pCnt O x G x = 1 O p p pCnt O A G A + G O x p p pCnt O x G x = O p p pCnt O A G A O O x p p pCnt O x G x
100 15 29 42 97 99 syl31anc φ x X p O p p pCnt O A G A + G O x p p pCnt O x G x = O p p pCnt O A G A O O x p p pCnt O x G x
101 59 80 oveq12d φ x X p O p p pCnt O A G A O O x p p pCnt O x G x = O A p p pCnt O A p p pCnt O x
102 100 101 eqtrd φ x X p O p p pCnt O A G A + G O x p p pCnt O x G x = O A p p pCnt O A p p pCnt O x
103 fveq2 y = p p pCnt O A G A + G O x p p pCnt O x G x O y = O p p pCnt O A G A + G O x p p pCnt O x G x
104 103 breq1d y = p p pCnt O A G A + G O x p p pCnt O x G x O y O A O p p pCnt O A G A + G O x p p pCnt O x G x O A
105 7 ralrimiva φ y X O y O A
106 105 ad2antrr φ x X p y X O y O A
107 1 98 grpcl G Grp p p pCnt O A G A X O x p p pCnt O x G x X p p pCnt O A G A + G O x p p pCnt O x G x X
108 16 29 42 107 syl3anc φ x X p p p pCnt O A G A + G O x p p pCnt O x G x X
109 104 106 108 rspcdva φ x X p O p p pCnt O A G A + G O x p p pCnt O x G x O A
110 102 109 eqbrtrrd φ x X p O A p p pCnt O A p p pCnt O x O A
111 84 nnred φ x X p O A p p pCnt O A
112 23 nnred φ x X p O A
113 36 nnrpd φ x X p p p pCnt O x +
114 111 112 113 lemuldivd φ x X p O A p p pCnt O A p p pCnt O x O A O A p p pCnt O A O A p p pCnt O x
115 110 114 mpbid φ x X p O A p p pCnt O A O A p p pCnt O x
116 nnrp p p pCnt O x p p pCnt O x +
117 nnrp p p pCnt O A p p pCnt O A +
118 nnrp O A O A +
119 rpregt0 p p pCnt O x + p p pCnt O x 0 < p p pCnt O x
120 rpregt0 p p pCnt O A + p p pCnt O A 0 < p p pCnt O A
121 rpregt0 O A + O A 0 < O A
122 lediv2 p p pCnt O x 0 < p p pCnt O x p p pCnt O A 0 < p p pCnt O A O A 0 < O A p p pCnt O x p p pCnt O A O A p p pCnt O A O A p p pCnt O x
123 119 120 121 122 syl3an p p pCnt O x + p p pCnt O A + O A + p p pCnt O x p p pCnt O A O A p p pCnt O A O A p p pCnt O x
124 116 117 118 123 syl3an p p pCnt O x p p pCnt O A O A p p pCnt O x p p pCnt O A O A p p pCnt O A O A p p pCnt O x
125 36 25 23 124 syl3anc φ x X p p p pCnt O x p p pCnt O A O A p p pCnt O A O A p p pCnt O x
126 115 125 mpbird φ x X p p p pCnt O x p p pCnt O A
127 18 nnred φ x X p p
128 35 nn0zd φ x X p p pCnt O x
129 24 nn0zd φ x X p p pCnt O A
130 prmuz2 p p 2
131 130 adantl φ x X p p 2
132 eluz2gt1 p 2 1 < p
133 131 132 syl φ x X p 1 < p
134 127 128 129 133 leexp2d φ x X p p pCnt O x p pCnt O A p p pCnt O x p p pCnt O A
135 126 134 mpbird φ x X p p pCnt O x p pCnt O A
136 135 ralrimiva φ x X p p pCnt O x p pCnt O A
137 1 3 odcl x X O x 0
138 137 adantl φ x X O x 0
139 138 nn0zd φ x X O x
140 9 nn0zd φ O A
141 140 adantr φ x X O A
142 pc2dvds O x O A O x O A p p pCnt O x p pCnt O A
143 139 141 142 syl2anc φ x X O x O A p p pCnt O x p pCnt O A
144 136 143 mpbird φ x X O x O A
145 144 ralrimiva φ x X O x O A
146 1 2 3 gexdvds2 G Grp O A E O A x X O x O A
147 12 140 146 syl2anc φ E O A x X O x O A
148 145 147 mpbird φ E O A
149 dvdseq O A 0 E 0 O A E E O A O A = E
150 9 10 14 148 149 syl22anc φ O A = E