Metamath Proof Explorer


Theorem acongeq

Description: Two numbers in the fundamental domain are alternating-congruent iff they are equal. TODO: could be used to shorten jm2.26 . (Contributed by Stefan O'Rear, 4-Oct-2014)

Ref Expression
Assertion acongeq A B 0 A C 0 A B = C 2 A B C 2 A B C

Proof

Step Hyp Ref Expression
1 2z 2
2 nnz A A
3 2 3ad2ant1 A B 0 A C 0 A A
4 zmulcl 2 A 2 A
5 1 3 4 sylancr A B 0 A C 0 A 2 A
6 elfzelz B 0 A B
7 6 3ad2ant2 A B 0 A C 0 A B
8 congid 2 A B 2 A B B
9 5 7 8 syl2anc A B 0 A C 0 A 2 A B B
10 9 adantr A B 0 A C 0 A B = C 2 A B B
11 oveq2 B = C B B = B C
12 11 adantl A B 0 A C 0 A B = C B B = B C
13 10 12 breqtrd A B 0 A C 0 A B = C 2 A B C
14 13 orcd A B 0 A C 0 A B = C 2 A B C 2 A B C
15 elfzelz C 0 A C
16 15 3ad2ant3 A B 0 A C 0 A C
17 7 16 zsubcld A B 0 A C 0 A B C
18 17 zcnd A B 0 A C 0 A B C
19 18 abscld A B 0 A C 0 A B C
20 nnre A A
21 20 3ad2ant1 A B 0 A C 0 A A
22 0re 0
23 resubcl A 0 A 0
24 21 22 23 sylancl A B 0 A C 0 A A 0
25 2re 2
26 remulcl 2 A 2 A
27 25 21 26 sylancr A B 0 A C 0 A 2 A
28 simp2 A B 0 A C 0 A B 0 A
29 simp3 A B 0 A C 0 A C 0 A
30 24 leidd A B 0 A C 0 A A 0 A 0
31 fzmaxdif A B 0 A A C 0 A A 0 A 0 B C A 0
32 3 28 3 29 30 31 syl221anc A B 0 A C 0 A B C A 0
33 nnrp A A +
34 33 3ad2ant1 A B 0 A C 0 A A +
35 21 34 ltaddrpd A B 0 A C 0 A A < A + A
36 21 recnd A B 0 A C 0 A A
37 36 subid1d A B 0 A C 0 A A 0 = A
38 36 2timesd A B 0 A C 0 A 2 A = A + A
39 35 37 38 3brtr4d A B 0 A C 0 A A 0 < 2 A
40 19 24 27 32 39 lelttrd A B 0 A C 0 A B C < 2 A
41 40 adantr A B 0 A C 0 A 2 A B C B C < 2 A
42 2nn 2
43 simpl1 A B 0 A C 0 A 2 A B C A
44 nnmulcl 2 A 2 A
45 42 43 44 sylancr A B 0 A C 0 A 2 A B C 2 A
46 simpl2 A B 0 A C 0 A 2 A B C B 0 A
47 46 elfzelzd A B 0 A C 0 A 2 A B C B
48 simpl3 A B 0 A C 0 A 2 A B C C 0 A
49 48 elfzelzd A B 0 A C 0 A 2 A B C C
50 simpr A B 0 A C 0 A 2 A B C 2 A B C
51 congabseq 2 A B C 2 A B C B C < 2 A B = C
52 45 47 49 50 51 syl31anc A B 0 A C 0 A 2 A B C B C < 2 A B = C
53 41 52 mpbid A B 0 A C 0 A 2 A B C B = C
54 simpll2 A B 0 A C 0 A 2 A B C C 0 A 1 B 0 A
55 elfzle1 B 0 A 0 B
56 54 55 syl A B 0 A C 0 A 2 A B C C 0 A 1 0 B
57 7 zred A B 0 A C 0 A B
58 16 zred A B 0 A C 0 A C
59 58 renegcld A B 0 A C 0 A C
60 57 59 resubcld A B 0 A C 0 A B C
61 60 recnd A B 0 A C 0 A B C
62 61 abscld A B 0 A C 0 A B C
63 62 ad2antrr A B 0 A C 0 A 2 A B C C 0 A 1 B C
64 1re 1
65 resubcl A 1 A 1
66 21 64 65 sylancl A B 0 A C 0 A A 1
67 66 renegcld A B 0 A C 0 A A 1
68 21 67 resubcld A B 0 A C 0 A A A 1
69 68 ad2antrr A B 0 A C 0 A 2 A B C C 0 A 1 A A 1
70 27 ad2antrr A B 0 A C 0 A 2 A B C C 0 A 1 2 A
71 7 ad2antrr A B 0 A C 0 A 2 A B C C 0 A 1 B
72 71 zcnd A B 0 A C 0 A 2 A B C C 0 A 1 B
73 16 znegcld A B 0 A C 0 A C
74 73 ad2antrr A B 0 A C 0 A 2 A B C C 0 A 1 C
75 74 zcnd A B 0 A C 0 A 2 A B C C 0 A 1 C
76 72 75 abssubd A B 0 A C 0 A 2 A B C C 0 A 1 B C = - C - B
77 0zd A B 0 A C 0 A 2 A B C C 0 A 1 0
78 simpr A B 0 A C 0 A 2 A B C C 0 A 1 C 0 A 1
79 0zd A B 0 A C 0 A 0
80 1z 1
81 zsubcl A 1 A 1
82 3 80 81 sylancl A B 0 A C 0 A A 1
83 fzneg C 0 A 1 C 0 A 1 C A 1 0
84 16 79 82 83 syl3anc A B 0 A C 0 A C 0 A 1 C A 1 0
85 84 ad2antrr A B 0 A C 0 A 2 A B C C 0 A 1 C 0 A 1 C A 1 0
86 78 85 mpbid A B 0 A C 0 A 2 A B C C 0 A 1 C A 1 0
87 neg0 0 = 0
88 87 a1i A B 0 A C 0 A 2 A B C C 0 A 1 0 = 0
89 88 oveq2d A B 0 A C 0 A 2 A B C C 0 A 1 A 1 0 = A 1 0
90 86 89 eleqtrd A B 0 A C 0 A 2 A B C C 0 A 1 C A 1 0
91 3 ad2antrr A B 0 A C 0 A 2 A B C C 0 A 1 A
92 simp1 A B 0 A C 0 A A
93 42 92 44 sylancr A B 0 A C 0 A 2 A
94 nnm1nn0 2 A 2 A 1 0
95 93 94 syl A B 0 A C 0 A 2 A 1 0
96 95 nn0ge0d A B 0 A C 0 A 0 2 A 1
97 0m0e0 0 0 = 0
98 97 a1i A B 0 A C 0 A 0 0 = 0
99 1cnd A B 0 A C 0 A 1
100 36 36 99 addsubassd A B 0 A C 0 A A + A - 1 = A + A - 1
101 38 oveq1d A B 0 A C 0 A 2 A 1 = A + A - 1
102 ax-1cn 1
103 subcl A 1 A 1
104 36 102 103 sylancl A B 0 A C 0 A A 1
105 36 104 subnegd A B 0 A C 0 A A A 1 = A + A - 1
106 100 101 105 3eqtr4rd A B 0 A C 0 A A A 1 = 2 A 1
107 96 98 106 3brtr4d A B 0 A C 0 A 0 0 A A 1
108 107 ad2antrr A B 0 A C 0 A 2 A B C C 0 A 1 0 0 A A 1
109 fzmaxdif 0 C A 1 0 A B 0 A 0 0 A A 1 - C - B A A 1
110 77 90 91 54 108 109 syl221anc A B 0 A C 0 A 2 A B C C 0 A 1 - C - B A A 1
111 76 110 eqbrtrd A B 0 A C 0 A 2 A B C C 0 A 1 B C A A 1
112 27 ltm1d A B 0 A C 0 A 2 A 1 < 2 A
113 106 112 eqbrtrd A B 0 A C 0 A A A 1 < 2 A
114 113 ad2antrr A B 0 A C 0 A 2 A B C C 0 A 1 A A 1 < 2 A
115 63 69 70 111 114 lelttrd A B 0 A C 0 A 2 A B C C 0 A 1 B C < 2 A
116 93 ad2antrr A B 0 A C 0 A 2 A B C C 0 A 1 2 A
117 simplr A B 0 A C 0 A 2 A B C C 0 A 1 2 A B C
118 congabseq 2 A B C 2 A B C B C < 2 A B = C
119 116 71 74 117 118 syl31anc A B 0 A C 0 A 2 A B C C 0 A 1 B C < 2 A B = C
120 115 119 mpbid A B 0 A C 0 A 2 A B C C 0 A 1 B = C
121 56 120 breqtrd A B 0 A C 0 A 2 A B C C 0 A 1 0 C
122 elfzelz C 0 A 1 C
123 122 zred C 0 A 1 C
124 123 adantl A B 0 A C 0 A 2 A B C C 0 A 1 C
125 124 le0neg1d A B 0 A C 0 A 2 A B C C 0 A 1 C 0 0 C
126 121 125 mpbird A B 0 A C 0 A 2 A B C C 0 A 1 C 0
127 elfzle1 C 0 A 1 0 C
128 127 adantl A B 0 A C 0 A 2 A B C C 0 A 1 0 C
129 letri3 C 0 C = 0 C 0 0 C
130 124 22 129 sylancl A B 0 A C 0 A 2 A B C C 0 A 1 C = 0 C 0 0 C
131 126 128 130 mpbir2and A B 0 A C 0 A 2 A B C C 0 A 1 C = 0
132 131 negeqd A B 0 A C 0 A 2 A B C C 0 A 1 C = 0
133 132 88 eqtrd A B 0 A C 0 A 2 A B C C 0 A 1 C = 0
134 133 120 131 3eqtr4d A B 0 A C 0 A 2 A B C C 0 A 1 B = C
135 oveq2 C = A B C = B A
136 135 adantl A B 0 A C 0 A 2 A B C C = A B C = B A
137 136 fveq2d A B 0 A C 0 A 2 A B C C = A B C = B A
138 40 ad2antrr A B 0 A C 0 A 2 A B C C = A B C < 2 A
139 137 138 eqbrtrrd A B 0 A C 0 A 2 A B C C = A B A < 2 A
140 93 ad2antrr A B 0 A C 0 A 2 A B C C = A 2 A
141 7 ad2antrr A B 0 A C 0 A 2 A B C C = A B
142 3 ad2antrr A B 0 A C 0 A 2 A B C C = A A
143 simplr A B 0 A C 0 A 2 A B C C = A 2 A B C
144 7 zcnd A B 0 A C 0 A B
145 36 36 144 ppncand A B 0 A C 0 A A + A + B A = A + B
146 36 144 addcomd A B 0 A C 0 A A + B = B + A
147 145 146 eqtrd A B 0 A C 0 A A + A + B A = B + A
148 147 ad2antrr A B 0 A C 0 A 2 A B C C = A A + A + B A = B + A
149 oveq2 C = A B + C = B + A
150 149 adantl A B 0 A C 0 A 2 A B C C = A B + C = B + A
151 148 150 eqtr4d A B 0 A C 0 A 2 A B C C = A A + A + B A = B + C
152 38 oveq1d A B 0 A C 0 A 2 A + B - A = A + A + B A
153 152 ad2antrr A B 0 A C 0 A 2 A B C C = A 2 A + B - A = A + A + B A
154 16 zcnd A B 0 A C 0 A C
155 144 154 subnegd A B 0 A C 0 A B C = B + C
156 155 ad2antrr A B 0 A C 0 A 2 A B C C = A B C = B + C
157 151 153 156 3eqtr4d A B 0 A C 0 A 2 A B C C = A 2 A + B - A = B C
158 143 157 breqtrrd A B 0 A C 0 A 2 A B C C = A 2 A 2 A + B - A
159 5 ad2antrr A B 0 A C 0 A 2 A B C C = A 2 A
160 7 3 zsubcld A B 0 A C 0 A B A
161 160 ad2antrr A B 0 A C 0 A 2 A B C C = A B A
162 dvdsadd 2 A B A 2 A B A 2 A 2 A + B - A
163 159 161 162 syl2anc A B 0 A C 0 A 2 A B C C = A 2 A B A 2 A 2 A + B - A
164 158 163 mpbird A B 0 A C 0 A 2 A B C C = A 2 A B A
165 congabseq 2 A B A 2 A B A B A < 2 A B = A
166 140 141 142 164 165 syl31anc A B 0 A C 0 A 2 A B C C = A B A < 2 A B = A
167 139 166 mpbid A B 0 A C 0 A 2 A B C C = A B = A
168 simpr A B 0 A C 0 A 2 A B C C = A C = A
169 167 168 eqtr4d A B 0 A C 0 A 2 A B C C = A B = C
170 nnnn0 A A 0
171 170 3ad2ant1 A B 0 A C 0 A A 0
172 nn0uz 0 = 0
173 171 172 eleqtrdi A B 0 A C 0 A A 0
174 fzm1 A 0 C 0 A C 0 A 1 C = A
175 174 biimpa A 0 C 0 A C 0 A 1 C = A
176 173 29 175 syl2anc A B 0 A C 0 A C 0 A 1 C = A
177 176 adantr A B 0 A C 0 A 2 A B C C 0 A 1 C = A
178 134 169 177 mpjaodan A B 0 A C 0 A 2 A B C B = C
179 53 178 jaodan A B 0 A C 0 A 2 A B C 2 A B C B = C
180 14 179 impbida A B 0 A C 0 A B = C 2 A B C 2 A B C