ILE Home Intuitionistic Logic Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  ILE Home  >  Th. List  >  dfgcd2 GIF version

Theorem dfgcd2 11969
Description: Alternate definition of the gcd operator, see definition in [ApostolNT] p. 15. (Contributed by AV, 8-Aug-2021.)
Assertion
Ref Expression
dfgcd2 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝐷 = (𝑀 gcd 𝑁) ↔ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷))))
Distinct variable groups:   𝐷,𝑒   𝑒,𝑀   𝑒,𝑁

Proof of Theorem dfgcd2
Dummy variables 𝑓 𝑔 𝑛 𝑦 𝑧 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 gcdcl 11921 . . . . . 6 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 gcd 𝑁) ∈ ℕ0)
21nn0ge0d 9191 . . . . 5 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → 0 ≤ (𝑀 gcd 𝑁))
3 gcddvds 11918 . . . . 5 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑀 gcd 𝑁) ∥ 𝑀 ∧ (𝑀 gcd 𝑁) ∥ 𝑁))
4 3anass 977 . . . . . . . 8 ((𝑒 ∈ ℤ ∧ 𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ↔ (𝑒 ∈ ℤ ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)))
5 ancom 264 . . . . . . . 8 ((𝑒 ∈ ℤ ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) ↔ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑒 ∈ ℤ))
64, 5bitri 183 . . . . . . 7 ((𝑒 ∈ ℤ ∧ 𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ↔ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑒 ∈ ℤ))
7 dvdsgcd 11967 . . . . . . 7 ((𝑒 ∈ ℤ ∧ 𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑒𝑀𝑒𝑁) → 𝑒 ∥ (𝑀 gcd 𝑁)))
86, 7sylbir 134 . . . . . 6 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑒 ∈ ℤ) → ((𝑒𝑀𝑒𝑁) → 𝑒 ∥ (𝑀 gcd 𝑁)))
98ralrimiva 2543 . . . . 5 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒 ∥ (𝑀 gcd 𝑁)))
102, 3, 93jca 1172 . . . 4 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (0 ≤ (𝑀 gcd 𝑁) ∧ ((𝑀 gcd 𝑁) ∥ 𝑀 ∧ (𝑀 gcd 𝑁) ∥ 𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒 ∥ (𝑀 gcd 𝑁))))
1110adantr 274 . . 3 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝐷 = (𝑀 gcd 𝑁)) → (0 ≤ (𝑀 gcd 𝑁) ∧ ((𝑀 gcd 𝑁) ∥ 𝑀 ∧ (𝑀 gcd 𝑁) ∥ 𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒 ∥ (𝑀 gcd 𝑁))))
12 breq2 3993 . . . . 5 (𝐷 = (𝑀 gcd 𝑁) → (0 ≤ 𝐷 ↔ 0 ≤ (𝑀 gcd 𝑁)))
13 breq1 3992 . . . . . 6 (𝐷 = (𝑀 gcd 𝑁) → (𝐷𝑀 ↔ (𝑀 gcd 𝑁) ∥ 𝑀))
14 breq1 3992 . . . . . 6 (𝐷 = (𝑀 gcd 𝑁) → (𝐷𝑁 ↔ (𝑀 gcd 𝑁) ∥ 𝑁))
1513, 14anbi12d 470 . . . . 5 (𝐷 = (𝑀 gcd 𝑁) → ((𝐷𝑀𝐷𝑁) ↔ ((𝑀 gcd 𝑁) ∥ 𝑀 ∧ (𝑀 gcd 𝑁) ∥ 𝑁)))
16 breq2 3993 . . . . . . 7 (𝐷 = (𝑀 gcd 𝑁) → (𝑒𝐷𝑒 ∥ (𝑀 gcd 𝑁)))
1716imbi2d 229 . . . . . 6 (𝐷 = (𝑀 gcd 𝑁) → (((𝑒𝑀𝑒𝑁) → 𝑒𝐷) ↔ ((𝑒𝑀𝑒𝑁) → 𝑒 ∥ (𝑀 gcd 𝑁))))
1817ralbidv 2470 . . . . 5 (𝐷 = (𝑀 gcd 𝑁) → (∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷) ↔ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒 ∥ (𝑀 gcd 𝑁))))
1912, 15, 183anbi123d 1307 . . . 4 (𝐷 = (𝑀 gcd 𝑁) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)) ↔ (0 ≤ (𝑀 gcd 𝑁) ∧ ((𝑀 gcd 𝑁) ∥ 𝑀 ∧ (𝑀 gcd 𝑁) ∥ 𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒 ∥ (𝑀 gcd 𝑁)))))
2019adantl 275 . . 3 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝐷 = (𝑀 gcd 𝑁)) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)) ↔ (0 ≤ (𝑀 gcd 𝑁) ∧ ((𝑀 gcd 𝑁) ∥ 𝑀 ∧ (𝑀 gcd 𝑁) ∥ 𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒 ∥ (𝑀 gcd 𝑁)))))
2111, 20mpbird 166 . 2 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝐷 = (𝑀 gcd 𝑁)) → (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))
22 gcdval 11914 . . . 4 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 gcd 𝑁) = if((𝑀 = 0 ∧ 𝑁 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}, ℝ, < )))
2322adantr 274 . . 3 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷))) → (𝑀 gcd 𝑁) = if((𝑀 = 0 ∧ 𝑁 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}, ℝ, < )))
24 iftrue 3531 . . . . . . 7 ((𝑀 = 0 ∧ 𝑁 = 0) → if((𝑀 = 0 ∧ 𝑁 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}, ℝ, < )) = 0)
2524adantr 274 . . . . . 6 (((𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) → if((𝑀 = 0 ∧ 𝑁 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}, ℝ, < )) = 0)
26 breq2 3993 . . . . . . . . . . 11 (𝑀 = 0 → (𝐷𝑀𝐷 ∥ 0))
27 breq2 3993 . . . . . . . . . . 11 (𝑁 = 0 → (𝐷𝑁𝐷 ∥ 0))
2826, 27bi2anan9 601 . . . . . . . . . 10 ((𝑀 = 0 ∧ 𝑁 = 0) → ((𝐷𝑀𝐷𝑁) ↔ (𝐷 ∥ 0 ∧ 𝐷 ∥ 0)))
29 breq2 3993 . . . . . . . . . . . . 13 (𝑀 = 0 → (𝑒𝑀𝑒 ∥ 0))
30 breq2 3993 . . . . . . . . . . . . 13 (𝑁 = 0 → (𝑒𝑁𝑒 ∥ 0))
3129, 30bi2anan9 601 . . . . . . . . . . . 12 ((𝑀 = 0 ∧ 𝑁 = 0) → ((𝑒𝑀𝑒𝑁) ↔ (𝑒 ∥ 0 ∧ 𝑒 ∥ 0)))
3231imbi1d 230 . . . . . . . . . . 11 ((𝑀 = 0 ∧ 𝑁 = 0) → (((𝑒𝑀𝑒𝑁) → 𝑒𝐷) ↔ ((𝑒 ∥ 0 ∧ 𝑒 ∥ 0) → 𝑒𝐷)))
3332ralbidv 2470 . . . . . . . . . 10 ((𝑀 = 0 ∧ 𝑁 = 0) → (∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷) ↔ ∀𝑒 ∈ ℤ ((𝑒 ∥ 0 ∧ 𝑒 ∥ 0) → 𝑒𝐷)))
3428, 333anbi23d 1310 . . . . . . . . 9 ((𝑀 = 0 ∧ 𝑁 = 0) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)) ↔ (0 ≤ 𝐷 ∧ (𝐷 ∥ 0 ∧ 𝐷 ∥ 0) ∧ ∀𝑒 ∈ ℤ ((𝑒 ∥ 0 ∧ 𝑒 ∥ 0) → 𝑒𝐷))))
35 dvdszrcl 11754 . . . . . . . . . . . . 13 (𝐷 ∥ 0 → (𝐷 ∈ ℤ ∧ 0 ∈ ℤ))
36 dvds0 11768 . . . . . . . . . . . . . . . . . . . 20 (𝑒 ∈ ℤ → 𝑒 ∥ 0)
3736, 36jca 304 . . . . . . . . . . . . . . . . . . 19 (𝑒 ∈ ℤ → (𝑒 ∥ 0 ∧ 𝑒 ∥ 0))
3837adantl 275 . . . . . . . . . . . . . . . . . 18 (((𝐷 ∈ ℤ ∧ 0 ≤ 𝐷) ∧ 𝑒 ∈ ℤ) → (𝑒 ∥ 0 ∧ 𝑒 ∥ 0))
39 pm5.5 241 . . . . . . . . . . . . . . . . . 18 ((𝑒 ∥ 0 ∧ 𝑒 ∥ 0) → (((𝑒 ∥ 0 ∧ 𝑒 ∥ 0) → 𝑒𝐷) ↔ 𝑒𝐷))
4038, 39syl 14 . . . . . . . . . . . . . . . . 17 (((𝐷 ∈ ℤ ∧ 0 ≤ 𝐷) ∧ 𝑒 ∈ ℤ) → (((𝑒 ∥ 0 ∧ 𝑒 ∥ 0) → 𝑒𝐷) ↔ 𝑒𝐷))
4140ralbidva 2466 . . . . . . . . . . . . . . . 16 ((𝐷 ∈ ℤ ∧ 0 ≤ 𝐷) → (∀𝑒 ∈ ℤ ((𝑒 ∥ 0 ∧ 𝑒 ∥ 0) → 𝑒𝐷) ↔ ∀𝑒 ∈ ℤ 𝑒𝐷))
42 0z 9223 . . . . . . . . . . . . . . . . . . 19 0 ∈ ℤ
43 breq1 3992 . . . . . . . . . . . . . . . . . . . 20 (𝑒 = 0 → (𝑒𝐷 ↔ 0 ∥ 𝐷))
4443rspcv 2830 . . . . . . . . . . . . . . . . . . 19 (0 ∈ ℤ → (∀𝑒 ∈ ℤ 𝑒𝐷 → 0 ∥ 𝐷))
4542, 44ax-mp 5 . . . . . . . . . . . . . . . . . 18 (∀𝑒 ∈ ℤ 𝑒𝐷 → 0 ∥ 𝐷)
46 0dvds 11773 . . . . . . . . . . . . . . . . . . . 20 (𝐷 ∈ ℤ → (0 ∥ 𝐷𝐷 = 0))
4746biimpd 143 . . . . . . . . . . . . . . . . . . 19 (𝐷 ∈ ℤ → (0 ∥ 𝐷𝐷 = 0))
48 eqcom 2172 . . . . . . . . . . . . . . . . . . 19 (0 = 𝐷𝐷 = 0)
4947, 48syl6ibr 161 . . . . . . . . . . . . . . . . . 18 (𝐷 ∈ ℤ → (0 ∥ 𝐷 → 0 = 𝐷))
5045, 49syl5 32 . . . . . . . . . . . . . . . . 17 (𝐷 ∈ ℤ → (∀𝑒 ∈ ℤ 𝑒𝐷 → 0 = 𝐷))
5150adantr 274 . . . . . . . . . . . . . . . 16 ((𝐷 ∈ ℤ ∧ 0 ≤ 𝐷) → (∀𝑒 ∈ ℤ 𝑒𝐷 → 0 = 𝐷))
5241, 51sylbid 149 . . . . . . . . . . . . . . 15 ((𝐷 ∈ ℤ ∧ 0 ≤ 𝐷) → (∀𝑒 ∈ ℤ ((𝑒 ∥ 0 ∧ 𝑒 ∥ 0) → 𝑒𝐷) → 0 = 𝐷))
5352ex 114 . . . . . . . . . . . . . 14 (𝐷 ∈ ℤ → (0 ≤ 𝐷 → (∀𝑒 ∈ ℤ ((𝑒 ∥ 0 ∧ 𝑒 ∥ 0) → 𝑒𝐷) → 0 = 𝐷)))
5453adantr 274 . . . . . . . . . . . . 13 ((𝐷 ∈ ℤ ∧ 0 ∈ ℤ) → (0 ≤ 𝐷 → (∀𝑒 ∈ ℤ ((𝑒 ∥ 0 ∧ 𝑒 ∥ 0) → 𝑒𝐷) → 0 = 𝐷)))
5535, 54syl 14 . . . . . . . . . . . 12 (𝐷 ∥ 0 → (0 ≤ 𝐷 → (∀𝑒 ∈ ℤ ((𝑒 ∥ 0 ∧ 𝑒 ∥ 0) → 𝑒𝐷) → 0 = 𝐷)))
5655adantr 274 . . . . . . . . . . 11 ((𝐷 ∥ 0 ∧ 𝐷 ∥ 0) → (0 ≤ 𝐷 → (∀𝑒 ∈ ℤ ((𝑒 ∥ 0 ∧ 𝑒 ∥ 0) → 𝑒𝐷) → 0 = 𝐷)))
5756com12 30 . . . . . . . . . 10 (0 ≤ 𝐷 → ((𝐷 ∥ 0 ∧ 𝐷 ∥ 0) → (∀𝑒 ∈ ℤ ((𝑒 ∥ 0 ∧ 𝑒 ∥ 0) → 𝑒𝐷) → 0 = 𝐷)))
58573imp 1188 . . . . . . . . 9 ((0 ≤ 𝐷 ∧ (𝐷 ∥ 0 ∧ 𝐷 ∥ 0) ∧ ∀𝑒 ∈ ℤ ((𝑒 ∥ 0 ∧ 𝑒 ∥ 0) → 𝑒𝐷)) → 0 = 𝐷)
5934, 58syl6bi 162 . . . . . . . 8 ((𝑀 = 0 ∧ 𝑁 = 0) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)) → 0 = 𝐷))
6059adantld 276 . . . . . . 7 ((𝑀 = 0 ∧ 𝑁 = 0) → (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷))) → 0 = 𝐷))
6160imp 123 . . . . . 6 (((𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) → 0 = 𝐷)
6225, 61eqtrd 2203 . . . . 5 (((𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) → if((𝑀 = 0 ∧ 𝑁 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}, ℝ, < )) = 𝐷)
6362ancoms 266 . . . 4 ((((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷))) ∧ (𝑀 = 0 ∧ 𝑁 = 0)) → if((𝑀 = 0 ∧ 𝑁 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}, ℝ, < )) = 𝐷)
64 iffalse 3534 . . . . . . 7 (¬ (𝑀 = 0 ∧ 𝑁 = 0) → if((𝑀 = 0 ∧ 𝑁 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}, ℝ, < )) = sup({𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}, ℝ, < ))
6564adantr 274 . . . . . 6 ((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) → if((𝑀 = 0 ∧ 𝑁 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}, ℝ, < )) = sup({𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}, ℝ, < ))
66 lttri3 7999 . . . . . . . 8 ((𝑓 ∈ ℝ ∧ 𝑔 ∈ ℝ) → (𝑓 = 𝑔 ↔ (¬ 𝑓 < 𝑔 ∧ ¬ 𝑔 < 𝑓)))
6766adantl 275 . . . . . . 7 (((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) ∧ (𝑓 ∈ ℝ ∧ 𝑔 ∈ ℝ)) → (𝑓 = 𝑔 ↔ (¬ 𝑓 < 𝑔 ∧ ¬ 𝑔 < 𝑓)))
68 dvdszrcl 11754 . . . . . . . . . . . 12 (𝐷𝑀 → (𝐷 ∈ ℤ ∧ 𝑀 ∈ ℤ))
6968simpld 111 . . . . . . . . . . 11 (𝐷𝑀𝐷 ∈ ℤ)
7069zred 9334 . . . . . . . . . 10 (𝐷𝑀𝐷 ∈ ℝ)
7170adantr 274 . . . . . . . . 9 ((𝐷𝑀𝐷𝑁) → 𝐷 ∈ ℝ)
72713ad2ant2 1014 . . . . . . . 8 ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)) → 𝐷 ∈ ℝ)
7372ad2antll 488 . . . . . . 7 ((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) → 𝐷 ∈ ℝ)
74 breq1 3992 . . . . . . . . . . 11 (𝑛 = 𝑦 → (𝑛𝑀𝑦𝑀))
75 breq1 3992 . . . . . . . . . . 11 (𝑛 = 𝑦 → (𝑛𝑁𝑦𝑁))
7674, 75anbi12d 470 . . . . . . . . . 10 (𝑛 = 𝑦 → ((𝑛𝑀𝑛𝑁) ↔ (𝑦𝑀𝑦𝑁)))
7776elrab 2886 . . . . . . . . 9 (𝑦 ∈ {𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)} ↔ (𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)))
78 breq1 3992 . . . . . . . . . . . . . . . . . . . . 21 (𝑒 = 𝑦 → (𝑒𝑀𝑦𝑀))
79 breq1 3992 . . . . . . . . . . . . . . . . . . . . 21 (𝑒 = 𝑦 → (𝑒𝑁𝑦𝑁))
8078, 79anbi12d 470 . . . . . . . . . . . . . . . . . . . 20 (𝑒 = 𝑦 → ((𝑒𝑀𝑒𝑁) ↔ (𝑦𝑀𝑦𝑁)))
81 breq1 3992 . . . . . . . . . . . . . . . . . . . 20 (𝑒 = 𝑦 → (𝑒𝐷𝑦𝐷))
8280, 81imbi12d 233 . . . . . . . . . . . . . . . . . . 19 (𝑒 = 𝑦 → (((𝑒𝑀𝑒𝑁) → 𝑒𝐷) ↔ ((𝑦𝑀𝑦𝑁) → 𝑦𝐷)))
8382rspcv 2830 . . . . . . . . . . . . . . . . . 18 (𝑦 ∈ ℤ → (∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷) → ((𝑦𝑀𝑦𝑁) → 𝑦𝐷)))
8483com23 78 . . . . . . . . . . . . . . . . 17 (𝑦 ∈ ℤ → ((𝑦𝑀𝑦𝑁) → (∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷) → 𝑦𝐷)))
8584imp 123 . . . . . . . . . . . . . . . 16 ((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) → (∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷) → 𝑦𝐷))
8685ad2antrr 485 . . . . . . . . . . . . . . 15 ((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → (∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷) → 𝑦𝐷))
87 elnn0z 9225 . . . . . . . . . . . . . . . . . . . . . 22 (𝐷 ∈ ℕ0 ↔ (𝐷 ∈ ℤ ∧ 0 ≤ 𝐷))
8887simplbi2 383 . . . . . . . . . . . . . . . . . . . . 21 (𝐷 ∈ ℤ → (0 ≤ 𝐷𝐷 ∈ ℕ0))
8988adantr 274 . . . . . . . . . . . . . . . . . . . 20 ((𝐷 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (0 ≤ 𝐷𝐷 ∈ ℕ0))
9068, 89syl 14 . . . . . . . . . . . . . . . . . . 19 (𝐷𝑀 → (0 ≤ 𝐷𝐷 ∈ ℕ0))
9190adantr 274 . . . . . . . . . . . . . . . . . 18 ((𝐷𝑀𝐷𝑁) → (0 ≤ 𝐷𝐷 ∈ ℕ0))
9291impcom 124 . . . . . . . . . . . . . . . . 17 ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → 𝐷 ∈ ℕ0)
93 zre 9216 . . . . . . . . . . . . . . . . . . . . 21 (𝑦 ∈ ℤ → 𝑦 ∈ ℝ)
9493ad2antrr 485 . . . . . . . . . . . . . . . . . . . 20 (((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) → 𝑦 ∈ ℝ)
9594ad2antrl 487 . . . . . . . . . . . . . . . . . . 19 ((((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) ∧ (𝑦𝐷𝐷 ∈ ℕ0)) ∧ (((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ))) → 𝑦 ∈ ℝ)
9671ad3antlr 490 . . . . . . . . . . . . . . . . . . 19 ((((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) ∧ (𝑦𝐷𝐷 ∈ ℕ0)) ∧ (((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ))) → 𝐷 ∈ ℝ)
97 simp-5l 538 . . . . . . . . . . . . . . . . . . . . . . . . 25 ((((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) ∧ 𝐷 ∈ ℕ0) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁))) → 𝑦 ∈ ℤ)
98 elnn0 9137 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 (𝐷 ∈ ℕ0 ↔ (𝐷 ∈ ℕ ∨ 𝐷 = 0))
99 2a1 25 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 (𝐷 ∈ ℕ → ((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → 𝐷 ∈ ℕ)))
100 breq1 3992 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 (𝐷 = 0 → (𝐷𝑀 ↔ 0 ∥ 𝑀))
101 breq1 3992 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 (𝐷 = 0 → (𝐷𝑁 ↔ 0 ∥ 𝑁))
102100, 101anbi12d 470 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 (𝐷 = 0 → ((𝐷𝑀𝐷𝑁) ↔ (0 ∥ 𝑀 ∧ 0 ∥ 𝑁)))
103102anbi2d 461 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 (𝐷 = 0 → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) ↔ (0 ≤ 𝐷 ∧ (0 ∥ 𝑀 ∧ 0 ∥ 𝑁))))
104103adantr 274 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 ((𝐷 = 0 ∧ (((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ))) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) ↔ (0 ≤ 𝐷 ∧ (0 ∥ 𝑀 ∧ 0 ∥ 𝑁))))
105 simplr 525 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 ((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → ¬ (𝑀 = 0 ∧ 𝑁 = 0))
106 zdceq 9287 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 ((𝑀 ∈ ℤ ∧ 0 ∈ ℤ) → DECID 𝑀 = 0)
10742, 106mpan2 423 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 (𝑀 ∈ ℤ → DECID 𝑀 = 0)
108 ianordc 894 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 (DECID 𝑀 = 0 → (¬ (𝑀 = 0 ∧ 𝑁 = 0) ↔ (¬ 𝑀 = 0 ∨ ¬ 𝑁 = 0)))
109107, 108syl 14 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 (𝑀 ∈ ℤ → (¬ (𝑀 = 0 ∧ 𝑁 = 0) ↔ (¬ 𝑀 = 0 ∨ ¬ 𝑁 = 0)))
110109ad2antrl 487 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 ((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → (¬ (𝑀 = 0 ∧ 𝑁 = 0) ↔ (¬ 𝑀 = 0 ∨ ¬ 𝑁 = 0)))
111105, 110mpbid 146 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 ((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → (¬ 𝑀 = 0 ∨ ¬ 𝑁 = 0))
112 dvdszrcl 11754 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 (0 ∥ 𝑀 → (0 ∈ ℤ ∧ 𝑀 ∈ ℤ))
113 0dvds 11773 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 (𝑀 ∈ ℤ → (0 ∥ 𝑀𝑀 = 0))
114 pm2.24 616 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 (𝑀 = 0 → (¬ 𝑀 = 0 → 𝐷 ∈ ℕ))
115113, 114syl6bi 162 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 (𝑀 ∈ ℤ → (0 ∥ 𝑀 → (¬ 𝑀 = 0 → 𝐷 ∈ ℕ)))
116115adantl 275 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 ((0 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (0 ∥ 𝑀 → (¬ 𝑀 = 0 → 𝐷 ∈ ℕ)))
117112, 116mpcom 36 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 (0 ∥ 𝑀 → (¬ 𝑀 = 0 → 𝐷 ∈ ℕ))
118117adantr 274 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 ((0 ∥ 𝑀 ∧ 0 ∥ 𝑁) → (¬ 𝑀 = 0 → 𝐷 ∈ ℕ))
119118com12 30 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 𝑀 = 0 → ((0 ∥ 𝑀 ∧ 0 ∥ 𝑁) → 𝐷 ∈ ℕ))
120 dvdszrcl 11754 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 (0 ∥ 𝑁 → (0 ∈ ℤ ∧ 𝑁 ∈ ℤ))
121 0dvds 11773 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 (𝑁 ∈ ℤ → (0 ∥ 𝑁𝑁 = 0))
122 pm2.24 616 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 (𝑁 = 0 → (¬ 𝑁 = 0 → 𝐷 ∈ ℕ))
123121, 122syl6bi 162 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 (𝑁 ∈ ℤ → (0 ∥ 𝑁 → (¬ 𝑁 = 0 → 𝐷 ∈ ℕ)))
124123adantl 275 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 ((0 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (0 ∥ 𝑁 → (¬ 𝑁 = 0 → 𝐷 ∈ ℕ)))
125120, 124mpcom 36 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 (0 ∥ 𝑁 → (¬ 𝑁 = 0 → 𝐷 ∈ ℕ))
126125adantl 275 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 ((0 ∥ 𝑀 ∧ 0 ∥ 𝑁) → (¬ 𝑁 = 0 → 𝐷 ∈ ℕ))
127126com12 30 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 𝑁 = 0 → ((0 ∥ 𝑀 ∧ 0 ∥ 𝑁) → 𝐷 ∈ ℕ))
128119, 127jaoi 711 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 ((¬ 𝑀 = 0 ∨ ¬ 𝑁 = 0) → ((0 ∥ 𝑀 ∧ 0 ∥ 𝑁) → 𝐷 ∈ ℕ))
129111, 128syl 14 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 ((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → ((0 ∥ 𝑀 ∧ 0 ∥ 𝑁) → 𝐷 ∈ ℕ))
130129adantld 276 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 ((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → ((0 ≤ 𝐷 ∧ (0 ∥ 𝑀 ∧ 0 ∥ 𝑁)) → 𝐷 ∈ ℕ))
131130adantl 275 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 ((𝐷 = 0 ∧ (((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ))) → ((0 ≤ 𝐷 ∧ (0 ∥ 𝑀 ∧ 0 ∥ 𝑁)) → 𝐷 ∈ ℕ))
132104, 131sylbid 149 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 ((𝐷 = 0 ∧ (((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ))) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → 𝐷 ∈ ℕ))
133132ex 114 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 (𝐷 = 0 → ((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → 𝐷 ∈ ℕ)))
13499, 133jaoi 711 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((𝐷 ∈ ℕ ∨ 𝐷 = 0) → ((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → 𝐷 ∈ ℕ)))
13598, 134sylbi 120 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 (𝐷 ∈ ℕ0 → ((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → 𝐷 ∈ ℕ)))
136135impcom 124 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) ∧ 𝐷 ∈ ℕ0) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → 𝐷 ∈ ℕ))
137136imp 123 . . . . . . . . . . . . . . . . . . . . . . . . 25 ((((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) ∧ 𝐷 ∈ ℕ0) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁))) → 𝐷 ∈ ℕ)
138 dvdsle 11804 . . . . . . . . . . . . . . . . . . . . . . . . 25 ((𝑦 ∈ ℤ ∧ 𝐷 ∈ ℕ) → (𝑦𝐷𝑦𝐷))
13997, 137, 138syl2anc 409 . . . . . . . . . . . . . . . . . . . . . . . 24 ((((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) ∧ 𝐷 ∈ ℕ0) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁))) → (𝑦𝐷𝑦𝐷))
140139exp31 362 . . . . . . . . . . . . . . . . . . . . . . 23 ((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → (𝐷 ∈ ℕ0 → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → (𝑦𝐷𝑦𝐷))))
141140com14 88 . . . . . . . . . . . . . . . . . . . . . 22 (𝑦𝐷 → (𝐷 ∈ ℕ0 → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → ((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → 𝑦𝐷))))
142141imp 123 . . . . . . . . . . . . . . . . . . . . 21 ((𝑦𝐷𝐷 ∈ ℕ0) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → ((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → 𝑦𝐷)))
143142impcom 124 . . . . . . . . . . . . . . . . . . . 20 (((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) ∧ (𝑦𝐷𝐷 ∈ ℕ0)) → ((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → 𝑦𝐷))
144143imp 123 . . . . . . . . . . . . . . . . . . 19 ((((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) ∧ (𝑦𝐷𝐷 ∈ ℕ0)) ∧ (((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ))) → 𝑦𝐷)
14595, 96, 144lensymd 8041 . . . . . . . . . . . . . . . . . 18 ((((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) ∧ (𝑦𝐷𝐷 ∈ ℕ0)) ∧ (((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ))) → ¬ 𝐷 < 𝑦)
146145exp31 362 . . . . . . . . . . . . . . . . 17 ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → ((𝑦𝐷𝐷 ∈ ℕ0) → ((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → ¬ 𝐷 < 𝑦)))
14792, 146mpan2d 426 . . . . . . . . . . . . . . . 16 ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → (𝑦𝐷 → ((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → ¬ 𝐷 < 𝑦)))
148147com13 80 . . . . . . . . . . . . . . 15 ((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → (𝑦𝐷 → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → ¬ 𝐷 < 𝑦)))
14986, 148syld 45 . . . . . . . . . . . . . 14 ((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → (∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → ¬ 𝐷 < 𝑦)))
150149com13 80 . . . . . . . . . . . . 13 ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → (∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷) → ((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → ¬ 𝐷 < 𝑦)))
1511503impia 1195 . . . . . . . . . . . 12 ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)) → ((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → ¬ 𝐷 < 𝑦))
152151com12 30 . . . . . . . . . . 11 ((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)) → ¬ 𝐷 < 𝑦))
153152expimpd 361 . . . . . . . . . 10 (((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) → (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷))) → ¬ 𝐷 < 𝑦))
154153expimpd 361 . . . . . . . . 9 ((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) → ((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) → ¬ 𝐷 < 𝑦))
15577, 154sylbi 120 . . . . . . . 8 (𝑦 ∈ {𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)} → ((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) → ¬ 𝐷 < 𝑦))
156155impcom 124 . . . . . . 7 (((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) ∧ 𝑦 ∈ {𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}) → ¬ 𝐷 < 𝑦)
15769adantr 274 . . . . . . . . . . . . 13 ((𝐷𝑀𝐷𝑁) → 𝐷 ∈ ℤ)
158157ancri 322 . . . . . . . . . . . 12 ((𝐷𝑀𝐷𝑁) → (𝐷 ∈ ℤ ∧ (𝐷𝑀𝐷𝑁)))
1591583ad2ant2 1014 . . . . . . . . . . 11 ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)) → (𝐷 ∈ ℤ ∧ (𝐷𝑀𝐷𝑁)))
160159ad2antll 488 . . . . . . . . . 10 ((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) → (𝐷 ∈ ℤ ∧ (𝐷𝑀𝐷𝑁)))
161160adantr 274 . . . . . . . . 9 (((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) ∧ (𝑦 ∈ ℝ ∧ 𝑦 < 𝐷)) → (𝐷 ∈ ℤ ∧ (𝐷𝑀𝐷𝑁)))
162 breq1 3992 . . . . . . . . . . 11 (𝑛 = 𝐷 → (𝑛𝑀𝐷𝑀))
163 breq1 3992 . . . . . . . . . . 11 (𝑛 = 𝐷 → (𝑛𝑁𝐷𝑁))
164162, 163anbi12d 470 . . . . . . . . . 10 (𝑛 = 𝐷 → ((𝑛𝑀𝑛𝑁) ↔ (𝐷𝑀𝐷𝑁)))
165164elrab 2886 . . . . . . . . 9 (𝐷 ∈ {𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)} ↔ (𝐷 ∈ ℤ ∧ (𝐷𝑀𝐷𝑁)))
166161, 165sylibr 133 . . . . . . . 8 (((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) ∧ (𝑦 ∈ ℝ ∧ 𝑦 < 𝐷)) → 𝐷 ∈ {𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)})
167 breq2 3993 . . . . . . . . 9 (𝑧 = 𝐷 → (𝑦 < 𝑧𝑦 < 𝐷))
168167adantl 275 . . . . . . . 8 ((((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) ∧ (𝑦 ∈ ℝ ∧ 𝑦 < 𝐷)) ∧ 𝑧 = 𝐷) → (𝑦 < 𝑧𝑦 < 𝐷))
169 simprr 527 . . . . . . . 8 (((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) ∧ (𝑦 ∈ ℝ ∧ 𝑦 < 𝐷)) → 𝑦 < 𝐷)
170166, 168, 169rspcedvd 2840 . . . . . . 7 (((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) ∧ (𝑦 ∈ ℝ ∧ 𝑦 < 𝐷)) → ∃𝑧 ∈ {𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}𝑦 < 𝑧)
17167, 73, 156, 170eqsuptid 6974 . . . . . 6 ((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) → sup({𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}, ℝ, < ) = 𝐷)
17265, 171eqtrd 2203 . . . . 5 ((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) → if((𝑀 = 0 ∧ 𝑁 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}, ℝ, < )) = 𝐷)
173172ancoms 266 . . . 4 ((((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷))) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) → if((𝑀 = 0 ∧ 𝑁 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}, ℝ, < )) = 𝐷)
174 gcdmndc 11899 . . . . . 6 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → DECID (𝑀 = 0 ∧ 𝑁 = 0))
175174adantr 274 . . . . 5 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷))) → DECID (𝑀 = 0 ∧ 𝑁 = 0))
176 exmiddc 831 . . . . 5 (DECID (𝑀 = 0 ∧ 𝑁 = 0) → ((𝑀 = 0 ∧ 𝑁 = 0) ∨ ¬ (𝑀 = 0 ∧ 𝑁 = 0)))
177175, 176syl 14 . . . 4 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷))) → ((𝑀 = 0 ∧ 𝑁 = 0) ∨ ¬ (𝑀 = 0 ∧ 𝑁 = 0)))
17863, 173, 177mpjaodan 793 . . 3 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷))) → if((𝑀 = 0 ∧ 𝑁 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}, ℝ, < )) = 𝐷)
17923, 178eqtr2d 2204 . 2 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷))) → 𝐷 = (𝑀 gcd 𝑁))
18021, 179impbida 591 1 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝐷 = (𝑀 gcd 𝑁) ↔ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷))))
Colors of variables: wff set class
Syntax hints:  ¬ wn 3  wi 4  wa 103  wb 104  wo 703  DECID wdc 829  w3a 973   = wceq 1348  wcel 2141  wral 2448  {crab 2452  ifcif 3526   class class class wbr 3989  (class class class)co 5853  supcsup 6959  cr 7773  0cc0 7774   < clt 7954  cle 7955  cn 8878  0cn0 9135  cz 9212  cdvds 11749   gcd cgcd 11897
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-ia1 105  ax-ia2 106  ax-ia3 107  ax-in1 609  ax-in2 610  ax-io 704  ax-5 1440  ax-7 1441  ax-gen 1442  ax-ie1 1486  ax-ie2 1487  ax-8 1497  ax-10 1498  ax-11 1499  ax-i12 1500  ax-bndl 1502  ax-4 1503  ax-17 1519  ax-i9 1523  ax-ial 1527  ax-i5r 1528  ax-13 2143  ax-14 2144  ax-ext 2152  ax-coll 4104  ax-sep 4107  ax-nul 4115  ax-pow 4160  ax-pr 4194  ax-un 4418  ax-setind 4521  ax-iinf 4572  ax-cnex 7865  ax-resscn 7866  ax-1cn 7867  ax-1re 7868  ax-icn 7869  ax-addcl 7870  ax-addrcl 7871  ax-mulcl 7872  ax-mulrcl 7873  ax-addcom 7874  ax-mulcom 7875  ax-addass 7876  ax-mulass 7877  ax-distr 7878  ax-i2m1 7879  ax-0lt1 7880  ax-1rid 7881  ax-0id 7882  ax-rnegex 7883  ax-precex 7884  ax-cnre 7885  ax-pre-ltirr 7886  ax-pre-ltwlin 7887  ax-pre-lttrn 7888  ax-pre-apti 7889  ax-pre-ltadd 7890  ax-pre-mulgt0 7891  ax-pre-mulext 7892  ax-arch 7893  ax-caucvg 7894
This theorem depends on definitions:  df-bi 116  df-dc 830  df-3or 974  df-3an 975  df-tru 1351  df-fal 1354  df-nf 1454  df-sb 1756  df-eu 2022  df-mo 2023  df-clab 2157  df-cleq 2163  df-clel 2166  df-nfc 2301  df-ne 2341  df-nel 2436  df-ral 2453  df-rex 2454  df-reu 2455  df-rmo 2456  df-rab 2457  df-v 2732  df-sbc 2956  df-csb 3050  df-dif 3123  df-un 3125  df-in 3127  df-ss 3134  df-nul 3415  df-if 3527  df-pw 3568  df-sn 3589  df-pr 3590  df-op 3592  df-uni 3797  df-int 3832  df-iun 3875  df-br 3990  df-opab 4051  df-mpt 4052  df-tr 4088  df-id 4278  df-po 4281  df-iso 4282  df-iord 4351  df-on 4353  df-ilim 4354  df-suc 4356  df-iom 4575  df-xp 4617  df-rel 4618  df-cnv 4619  df-co 4620  df-dm 4621  df-rn 4622  df-res 4623  df-ima 4624  df-iota 5160  df-fun 5200  df-fn 5201  df-f 5202  df-f1 5203  df-fo 5204  df-f1o 5205  df-fv 5206  df-riota 5809  df-ov 5856  df-oprab 5857  df-mpo 5858  df-1st 6119  df-2nd 6120  df-recs 6284  df-frec 6370  df-sup 6961  df-pnf 7956  df-mnf 7957  df-xr 7958  df-ltxr 7959  df-le 7960  df-sub 8092  df-neg 8093  df-reap 8494  df-ap 8501  df-div 8590  df-inn 8879  df-2 8937  df-3 8938  df-4 8939  df-n0 9136  df-z 9213  df-uz 9488  df-q 9579  df-rp 9611  df-fz 9966  df-fzo 10099  df-fl 10226  df-mod 10279  df-seqfrec 10402  df-exp 10476  df-cj 10806  df-re 10807  df-im 10808  df-rsqrt 10962  df-abs 10963  df-dvds 11750  df-gcd 11898
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator