MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  dfgcd2 Structured version   Visualization version   GIF version

Theorem dfgcd2 16265
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 16224 . . . . . 6 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 gcd 𝑁) ∈ ℕ0)
21nn0ge0d 12307 . . . . 5 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → 0 ≤ (𝑀 gcd 𝑁))
3 gcddvds 16221 . . . . 5 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑀 gcd 𝑁) ∥ 𝑀 ∧ (𝑀 gcd 𝑁) ∥ 𝑁))
4 3anass 1094 . . . . . . . 8 ((𝑒 ∈ ℤ ∧ 𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ↔ (𝑒 ∈ ℤ ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)))
54biancomi 463 . . . . . . 7 ((𝑒 ∈ ℤ ∧ 𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ↔ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑒 ∈ ℤ))
6 dvdsgcd 16263 . . . . . . 7 ((𝑒 ∈ ℤ ∧ 𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑒𝑀𝑒𝑁) → 𝑒 ∥ (𝑀 gcd 𝑁)))
75, 6sylbir 234 . . . . . 6 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑒 ∈ ℤ) → ((𝑒𝑀𝑒𝑁) → 𝑒 ∥ (𝑀 gcd 𝑁)))
87ralrimiva 3110 . . . . 5 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒 ∥ (𝑀 gcd 𝑁)))
92, 3, 83jca 1127 . . . 4 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (0 ≤ (𝑀 gcd 𝑁) ∧ ((𝑀 gcd 𝑁) ∥ 𝑀 ∧ (𝑀 gcd 𝑁) ∥ 𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒 ∥ (𝑀 gcd 𝑁))))
109adantr 481 . . 3 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝐷 = (𝑀 gcd 𝑁)) → (0 ≤ (𝑀 gcd 𝑁) ∧ ((𝑀 gcd 𝑁) ∥ 𝑀 ∧ (𝑀 gcd 𝑁) ∥ 𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒 ∥ (𝑀 gcd 𝑁))))
11 breq2 5083 . . . . 5 (𝐷 = (𝑀 gcd 𝑁) → (0 ≤ 𝐷 ↔ 0 ≤ (𝑀 gcd 𝑁)))
12 breq1 5082 . . . . . 6 (𝐷 = (𝑀 gcd 𝑁) → (𝐷𝑀 ↔ (𝑀 gcd 𝑁) ∥ 𝑀))
13 breq1 5082 . . . . . 6 (𝐷 = (𝑀 gcd 𝑁) → (𝐷𝑁 ↔ (𝑀 gcd 𝑁) ∥ 𝑁))
1412, 13anbi12d 631 . . . . 5 (𝐷 = (𝑀 gcd 𝑁) → ((𝐷𝑀𝐷𝑁) ↔ ((𝑀 gcd 𝑁) ∥ 𝑀 ∧ (𝑀 gcd 𝑁) ∥ 𝑁)))
15 breq2 5083 . . . . . . 7 (𝐷 = (𝑀 gcd 𝑁) → (𝑒𝐷𝑒 ∥ (𝑀 gcd 𝑁)))
1615imbi2d 341 . . . . . 6 (𝐷 = (𝑀 gcd 𝑁) → (((𝑒𝑀𝑒𝑁) → 𝑒𝐷) ↔ ((𝑒𝑀𝑒𝑁) → 𝑒 ∥ (𝑀 gcd 𝑁))))
1716ralbidv 3123 . . . . 5 (𝐷 = (𝑀 gcd 𝑁) → (∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷) ↔ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒 ∥ (𝑀 gcd 𝑁))))
1811, 14, 173anbi123d 1435 . . . 4 (𝐷 = (𝑀 gcd 𝑁) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)) ↔ (0 ≤ (𝑀 gcd 𝑁) ∧ ((𝑀 gcd 𝑁) ∥ 𝑀 ∧ (𝑀 gcd 𝑁) ∥ 𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒 ∥ (𝑀 gcd 𝑁)))))
1918adantl 482 . . 3 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝐷 = (𝑀 gcd 𝑁)) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)) ↔ (0 ≤ (𝑀 gcd 𝑁) ∧ ((𝑀 gcd 𝑁) ∥ 𝑀 ∧ (𝑀 gcd 𝑁) ∥ 𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒 ∥ (𝑀 gcd 𝑁)))))
2010, 19mpbird 256 . 2 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝐷 = (𝑀 gcd 𝑁)) → (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))
21 gcdval 16214 . . . 4 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 gcd 𝑁) = if((𝑀 = 0 ∧ 𝑁 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}, ℝ, < )))
2221adantr 481 . . 3 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷))) → (𝑀 gcd 𝑁) = if((𝑀 = 0 ∧ 𝑁 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}, ℝ, < )))
23 iftrue 4471 . . . . . 6 ((𝑀 = 0 ∧ 𝑁 = 0) → if((𝑀 = 0 ∧ 𝑁 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}, ℝ, < )) = 0)
2423adantr 481 . . . . 5 (((𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) → if((𝑀 = 0 ∧ 𝑁 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}, ℝ, < )) = 0)
25 breq2 5083 . . . . . . . . . 10 (𝑀 = 0 → (𝐷𝑀𝐷 ∥ 0))
26 breq2 5083 . . . . . . . . . 10 (𝑁 = 0 → (𝐷𝑁𝐷 ∥ 0))
2725, 26bi2anan9 636 . . . . . . . . 9 ((𝑀 = 0 ∧ 𝑁 = 0) → ((𝐷𝑀𝐷𝑁) ↔ (𝐷 ∥ 0 ∧ 𝐷 ∥ 0)))
28 breq2 5083 . . . . . . . . . . . 12 (𝑀 = 0 → (𝑒𝑀𝑒 ∥ 0))
29 breq2 5083 . . . . . . . . . . . 12 (𝑁 = 0 → (𝑒𝑁𝑒 ∥ 0))
3028, 29bi2anan9 636 . . . . . . . . . . 11 ((𝑀 = 0 ∧ 𝑁 = 0) → ((𝑒𝑀𝑒𝑁) ↔ (𝑒 ∥ 0 ∧ 𝑒 ∥ 0)))
3130imbi1d 342 . . . . . . . . . 10 ((𝑀 = 0 ∧ 𝑁 = 0) → (((𝑒𝑀𝑒𝑁) → 𝑒𝐷) ↔ ((𝑒 ∥ 0 ∧ 𝑒 ∥ 0) → 𝑒𝐷)))
3231ralbidv 3123 . . . . . . . . 9 ((𝑀 = 0 ∧ 𝑁 = 0) → (∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷) ↔ ∀𝑒 ∈ ℤ ((𝑒 ∥ 0 ∧ 𝑒 ∥ 0) → 𝑒𝐷)))
3327, 323anbi23d 1438 . . . . . . . 8 ((𝑀 = 0 ∧ 𝑁 = 0) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)) ↔ (0 ≤ 𝐷 ∧ (𝐷 ∥ 0 ∧ 𝐷 ∥ 0) ∧ ∀𝑒 ∈ ℤ ((𝑒 ∥ 0 ∧ 𝑒 ∥ 0) → 𝑒𝐷))))
34 dvdszrcl 15979 . . . . . . . . . . 11 (𝐷 ∥ 0 → (𝐷 ∈ ℤ ∧ 0 ∈ ℤ))
35 dvds0 15992 . . . . . . . . . . . . . . . . . 18 (𝑒 ∈ ℤ → 𝑒 ∥ 0)
3635, 35jca 512 . . . . . . . . . . . . . . . . 17 (𝑒 ∈ ℤ → (𝑒 ∥ 0 ∧ 𝑒 ∥ 0))
3736adantl 482 . . . . . . . . . . . . . . . 16 (((𝐷 ∈ ℤ ∧ 0 ≤ 𝐷) ∧ 𝑒 ∈ ℤ) → (𝑒 ∥ 0 ∧ 𝑒 ∥ 0))
38 pm5.5 362 . . . . . . . . . . . . . . . 16 ((𝑒 ∥ 0 ∧ 𝑒 ∥ 0) → (((𝑒 ∥ 0 ∧ 𝑒 ∥ 0) → 𝑒𝐷) ↔ 𝑒𝐷))
3937, 38syl 17 . . . . . . . . . . . . . . 15 (((𝐷 ∈ ℤ ∧ 0 ≤ 𝐷) ∧ 𝑒 ∈ ℤ) → (((𝑒 ∥ 0 ∧ 𝑒 ∥ 0) → 𝑒𝐷) ↔ 𝑒𝐷))
4039ralbidva 3122 . . . . . . . . . . . . . 14 ((𝐷 ∈ ℤ ∧ 0 ≤ 𝐷) → (∀𝑒 ∈ ℤ ((𝑒 ∥ 0 ∧ 𝑒 ∥ 0) → 𝑒𝐷) ↔ ∀𝑒 ∈ ℤ 𝑒𝐷))
41 0z 12341 . . . . . . . . . . . . . . . . 17 0 ∈ ℤ
42 breq1 5082 . . . . . . . . . . . . . . . . . 18 (𝑒 = 0 → (𝑒𝐷 ↔ 0 ∥ 𝐷))
4342rspcv 3556 . . . . . . . . . . . . . . . . 17 (0 ∈ ℤ → (∀𝑒 ∈ ℤ 𝑒𝐷 → 0 ∥ 𝐷))
4441, 43ax-mp 5 . . . . . . . . . . . . . . . 16 (∀𝑒 ∈ ℤ 𝑒𝐷 → 0 ∥ 𝐷)
45 0dvds 15997 . . . . . . . . . . . . . . . . . 18 (𝐷 ∈ ℤ → (0 ∥ 𝐷𝐷 = 0))
4645biimpd 228 . . . . . . . . . . . . . . . . 17 (𝐷 ∈ ℤ → (0 ∥ 𝐷𝐷 = 0))
47 eqcom 2747 . . . . . . . . . . . . . . . . 17 (0 = 𝐷𝐷 = 0)
4846, 47syl6ibr 251 . . . . . . . . . . . . . . . 16 (𝐷 ∈ ℤ → (0 ∥ 𝐷 → 0 = 𝐷))
4944, 48syl5 34 . . . . . . . . . . . . . . 15 (𝐷 ∈ ℤ → (∀𝑒 ∈ ℤ 𝑒𝐷 → 0 = 𝐷))
5049adantr 481 . . . . . . . . . . . . . 14 ((𝐷 ∈ ℤ ∧ 0 ≤ 𝐷) → (∀𝑒 ∈ ℤ 𝑒𝐷 → 0 = 𝐷))
5140, 50sylbid 239 . . . . . . . . . . . . 13 ((𝐷 ∈ ℤ ∧ 0 ≤ 𝐷) → (∀𝑒 ∈ ℤ ((𝑒 ∥ 0 ∧ 𝑒 ∥ 0) → 𝑒𝐷) → 0 = 𝐷))
5251ex 413 . . . . . . . . . . . 12 (𝐷 ∈ ℤ → (0 ≤ 𝐷 → (∀𝑒 ∈ ℤ ((𝑒 ∥ 0 ∧ 𝑒 ∥ 0) → 𝑒𝐷) → 0 = 𝐷)))
5352adantr 481 . . . . . . . . . . 11 ((𝐷 ∈ ℤ ∧ 0 ∈ ℤ) → (0 ≤ 𝐷 → (∀𝑒 ∈ ℤ ((𝑒 ∥ 0 ∧ 𝑒 ∥ 0) → 𝑒𝐷) → 0 = 𝐷)))
5434, 53syl 17 . . . . . . . . . 10 (𝐷 ∥ 0 → (0 ≤ 𝐷 → (∀𝑒 ∈ ℤ ((𝑒 ∥ 0 ∧ 𝑒 ∥ 0) → 𝑒𝐷) → 0 = 𝐷)))
5554adantr 481 . . . . . . . . 9 ((𝐷 ∥ 0 ∧ 𝐷 ∥ 0) → (0 ≤ 𝐷 → (∀𝑒 ∈ ℤ ((𝑒 ∥ 0 ∧ 𝑒 ∥ 0) → 𝑒𝐷) → 0 = 𝐷)))
56553imp21 1113 . . . . . . . 8 ((0 ≤ 𝐷 ∧ (𝐷 ∥ 0 ∧ 𝐷 ∥ 0) ∧ ∀𝑒 ∈ ℤ ((𝑒 ∥ 0 ∧ 𝑒 ∥ 0) → 𝑒𝐷)) → 0 = 𝐷)
5733, 56syl6bi 252 . . . . . . 7 ((𝑀 = 0 ∧ 𝑁 = 0) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)) → 0 = 𝐷))
5857adantld 491 . . . . . 6 ((𝑀 = 0 ∧ 𝑁 = 0) → (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷))) → 0 = 𝐷))
5958imp 407 . . . . 5 (((𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) → 0 = 𝐷)
6024, 59eqtrd 2780 . . . 4 (((𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) → if((𝑀 = 0 ∧ 𝑁 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}, ℝ, < )) = 𝐷)
61 iffalse 4474 . . . . . 6 (¬ (𝑀 = 0 ∧ 𝑁 = 0) → if((𝑀 = 0 ∧ 𝑁 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}, ℝ, < )) = sup({𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}, ℝ, < ))
6261adantr 481 . . . . 5 ((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) → if((𝑀 = 0 ∧ 𝑁 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}, ℝ, < )) = sup({𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}, ℝ, < ))
63 ltso 11066 . . . . . . 7 < Or ℝ
6463a1i 11 . . . . . 6 ((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) → < Or ℝ)
65 dvdszrcl 15979 . . . . . . . . . . 11 (𝐷𝑀 → (𝐷 ∈ ℤ ∧ 𝑀 ∈ ℤ))
6665simpld 495 . . . . . . . . . 10 (𝐷𝑀𝐷 ∈ ℤ)
6766zred 12437 . . . . . . . . 9 (𝐷𝑀𝐷 ∈ ℝ)
6867adantr 481 . . . . . . . 8 ((𝐷𝑀𝐷𝑁) → 𝐷 ∈ ℝ)
69683ad2ant2 1133 . . . . . . 7 ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)) → 𝐷 ∈ ℝ)
7069ad2antll 726 . . . . . 6 ((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) → 𝐷 ∈ ℝ)
71 breq1 5082 . . . . . . . . . 10 (𝑛 = 𝑦 → (𝑛𝑀𝑦𝑀))
72 breq1 5082 . . . . . . . . . 10 (𝑛 = 𝑦 → (𝑛𝑁𝑦𝑁))
7371, 72anbi12d 631 . . . . . . . . 9 (𝑛 = 𝑦 → ((𝑛𝑀𝑛𝑁) ↔ (𝑦𝑀𝑦𝑁)))
7473elrab 3626 . . . . . . . 8 (𝑦 ∈ {𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)} ↔ (𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)))
75 breq1 5082 . . . . . . . . . . . . . . . . . . . 20 (𝑒 = 𝑦 → (𝑒𝑀𝑦𝑀))
76 breq1 5082 . . . . . . . . . . . . . . . . . . . 20 (𝑒 = 𝑦 → (𝑒𝑁𝑦𝑁))
7775, 76anbi12d 631 . . . . . . . . . . . . . . . . . . 19 (𝑒 = 𝑦 → ((𝑒𝑀𝑒𝑁) ↔ (𝑦𝑀𝑦𝑁)))
78 breq1 5082 . . . . . . . . . . . . . . . . . . 19 (𝑒 = 𝑦 → (𝑒𝐷𝑦𝐷))
7977, 78imbi12d 345 . . . . . . . . . . . . . . . . . 18 (𝑒 = 𝑦 → (((𝑒𝑀𝑒𝑁) → 𝑒𝐷) ↔ ((𝑦𝑀𝑦𝑁) → 𝑦𝐷)))
8079rspcv 3556 . . . . . . . . . . . . . . . . 17 (𝑦 ∈ ℤ → (∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷) → ((𝑦𝑀𝑦𝑁) → 𝑦𝐷)))
8180com23 86 . . . . . . . . . . . . . . . 16 (𝑦 ∈ ℤ → ((𝑦𝑀𝑦𝑁) → (∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷) → 𝑦𝐷)))
8281imp 407 . . . . . . . . . . . . . . 15 ((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) → (∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷) → 𝑦𝐷))
8382ad2antrr 723 . . . . . . . . . . . . . 14 ((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → (∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷) → 𝑦𝐷))
84 elnn0z 12343 . . . . . . . . . . . . . . . . . . . . . 22 (𝐷 ∈ ℕ0 ↔ (𝐷 ∈ ℤ ∧ 0 ≤ 𝐷))
8584simplbi2 501 . . . . . . . . . . . . . . . . . . . . 21 (𝐷 ∈ ℤ → (0 ≤ 𝐷𝐷 ∈ ℕ0))
8685adantr 481 . . . . . . . . . . . . . . . . . . . 20 ((𝐷 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (0 ≤ 𝐷𝐷 ∈ ℕ0))
8765, 86syl 17 . . . . . . . . . . . . . . . . . . 19 (𝐷𝑀 → (0 ≤ 𝐷𝐷 ∈ ℕ0))
8887adantr 481 . . . . . . . . . . . . . . . . . 18 ((𝐷𝑀𝐷𝑁) → (0 ≤ 𝐷𝐷 ∈ ℕ0))
8988impcom 408 . . . . . . . . . . . . . . . . 17 ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → 𝐷 ∈ ℕ0)
90 simp-4l 780 . . . . . . . . . . . . . . . . . . . . . . . . 25 (((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ 𝐷 ∈ ℕ0) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁))) → 𝑦 ∈ ℤ)
91 elnn0 12246 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 (𝐷 ∈ ℕ0 ↔ (𝐷 ∈ ℕ ∨ 𝐷 = 0))
92 2a1 28 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 (𝐷 ∈ ℕ → (((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → 𝐷 ∈ ℕ)))
93 breq1 5082 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 (𝐷 = 0 → (𝐷𝑀 ↔ 0 ∥ 𝑀))
94 breq1 5082 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 (𝐷 = 0 → (𝐷𝑁 ↔ 0 ∥ 𝑁))
9593, 94anbi12d 631 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 (𝐷 = 0 → ((𝐷𝑀𝐷𝑁) ↔ (0 ∥ 𝑀 ∧ 0 ∥ 𝑁)))
9695anbi2d 629 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 (𝐷 = 0 → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) ↔ (0 ≤ 𝐷 ∧ (0 ∥ 𝑀 ∧ 0 ∥ 𝑁))))
9796adantr 481 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 ((𝐷 = 0 ∧ ((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0))) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) ↔ (0 ≤ 𝐷 ∧ (0 ∥ 𝑀 ∧ 0 ∥ 𝑁))))
98 ianor 979 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 (¬ (𝑀 = 0 ∧ 𝑁 = 0) ↔ (¬ 𝑀 = 0 ∨ ¬ 𝑁 = 0))
99 dvdszrcl 15979 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 (0 ∥ 𝑀 → (0 ∈ ℤ ∧ 𝑀 ∈ ℤ))
100 0dvds 15997 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 (𝑀 ∈ ℤ → (0 ∥ 𝑀𝑀 = 0))
101 pm2.24 124 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 (𝑀 = 0 → (¬ 𝑀 = 0 → 𝐷 ∈ ℕ))
102100, 101syl6bi 252 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 (𝑀 ∈ ℤ → (0 ∥ 𝑀 → (¬ 𝑀 = 0 → 𝐷 ∈ ℕ)))
103102adantl 482 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 ((0 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (0 ∥ 𝑀 → (¬ 𝑀 = 0 → 𝐷 ∈ ℕ)))
10499, 103mpcom 38 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 (0 ∥ 𝑀 → (¬ 𝑀 = 0 → 𝐷 ∈ ℕ))
105104adantr 481 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 ((0 ∥ 𝑀 ∧ 0 ∥ 𝑁) → (¬ 𝑀 = 0 → 𝐷 ∈ ℕ))
106105com12 32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 𝑀 = 0 → ((0 ∥ 𝑀 ∧ 0 ∥ 𝑁) → 𝐷 ∈ ℕ))
107 dvdszrcl 15979 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 (0 ∥ 𝑁 → (0 ∈ ℤ ∧ 𝑁 ∈ ℤ))
108 0dvds 15997 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 (𝑁 ∈ ℤ → (0 ∥ 𝑁𝑁 = 0))
109 pm2.24 124 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 (𝑁 = 0 → (¬ 𝑁 = 0 → 𝐷 ∈ ℕ))
110108, 109syl6bi 252 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 (𝑁 ∈ ℤ → (0 ∥ 𝑁 → (¬ 𝑁 = 0 → 𝐷 ∈ ℕ)))
111110adantl 482 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 ((0 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (0 ∥ 𝑁 → (¬ 𝑁 = 0 → 𝐷 ∈ ℕ)))
112107, 111mpcom 38 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 (0 ∥ 𝑁 → (¬ 𝑁 = 0 → 𝐷 ∈ ℕ))
113112adantl 482 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 ((0 ∥ 𝑀 ∧ 0 ∥ 𝑁) → (¬ 𝑁 = 0 → 𝐷 ∈ ℕ))
114113com12 32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 𝑁 = 0 → ((0 ∥ 𝑀 ∧ 0 ∥ 𝑁) → 𝐷 ∈ ℕ))
115106, 114jaoi 854 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 ((¬ 𝑀 = 0 ∨ ¬ 𝑁 = 0) → ((0 ∥ 𝑀 ∧ 0 ∥ 𝑁) → 𝐷 ∈ ℕ))
11698, 115sylbi 216 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 (¬ (𝑀 = 0 ∧ 𝑁 = 0) → ((0 ∥ 𝑀 ∧ 0 ∥ 𝑁) → 𝐷 ∈ ℕ))
117116adantld 491 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 (¬ (𝑀 = 0 ∧ 𝑁 = 0) → ((0 ≤ 𝐷 ∧ (0 ∥ 𝑀 ∧ 0 ∥ 𝑁)) → 𝐷 ∈ ℕ))
118117ad2antll 726 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 ((𝐷 = 0 ∧ ((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0))) → ((0 ≤ 𝐷 ∧ (0 ∥ 𝑀 ∧ 0 ∥ 𝑁)) → 𝐷 ∈ ℕ))
11997, 118sylbid 239 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 ((𝐷 = 0 ∧ ((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0))) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → 𝐷 ∈ ℕ))
120119ex 413 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 (𝐷 = 0 → (((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → 𝐷 ∈ ℕ)))
12192, 120jaoi 854 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((𝐷 ∈ ℕ ∨ 𝐷 = 0) → (((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → 𝐷 ∈ ℕ)))
12291, 121sylbi 216 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 (𝐷 ∈ ℕ0 → (((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → 𝐷 ∈ ℕ)))
123122impcom 408 . . . . . . . . . . . . . . . . . . . . . . . . . 26 ((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ 𝐷 ∈ ℕ0) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → 𝐷 ∈ ℕ))
124123imp 407 . . . . . . . . . . . . . . . . . . . . . . . . 25 (((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ 𝐷 ∈ ℕ0) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁))) → 𝐷 ∈ ℕ)
125 dvdsle 16030 . . . . . . . . . . . . . . . . . . . . . . . . 25 ((𝑦 ∈ ℤ ∧ 𝐷 ∈ ℕ) → (𝑦𝐷𝑦𝐷))
12690, 124, 125syl2anc 584 . . . . . . . . . . . . . . . . . . . . . . . 24 (((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ 𝐷 ∈ ℕ0) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁))) → (𝑦𝐷𝑦𝐷))
127126exp31 420 . . . . . . . . . . . . . . . . . . . . . . 23 (((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) → (𝐷 ∈ ℕ0 → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → (𝑦𝐷𝑦𝐷))))
128127com14 96 . . . . . . . . . . . . . . . . . . . . . 22 (𝑦𝐷 → (𝐷 ∈ ℕ0 → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → (((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) → 𝑦𝐷))))
129128imp 407 . . . . . . . . . . . . . . . . . . . . 21 ((𝑦𝐷𝐷 ∈ ℕ0) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → (((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) → 𝑦𝐷)))
130129impcom 408 . . . . . . . . . . . . . . . . . . . 20 (((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) ∧ (𝑦𝐷𝐷 ∈ ℕ0)) → (((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) → 𝑦𝐷))
131130imp 407 . . . . . . . . . . . . . . . . . . 19 ((((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) ∧ (𝑦𝐷𝐷 ∈ ℕ0)) ∧ ((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0))) → 𝑦𝐷)
132 zre 12334 . . . . . . . . . . . . . . . . . . . . 21 (𝑦 ∈ ℤ → 𝑦 ∈ ℝ)
133132ad2antrr 723 . . . . . . . . . . . . . . . . . . . 20 (((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) → 𝑦 ∈ ℝ)
13468ad2antlr 724 . . . . . . . . . . . . . . . . . . . 20 (((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) ∧ (𝑦𝐷𝐷 ∈ ℕ0)) → 𝐷 ∈ ℝ)
135 lenlt 11064 . . . . . . . . . . . . . . . . . . . 20 ((𝑦 ∈ ℝ ∧ 𝐷 ∈ ℝ) → (𝑦𝐷 ↔ ¬ 𝐷 < 𝑦))
136133, 134, 135syl2anr 597 . . . . . . . . . . . . . . . . . . 19 ((((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) ∧ (𝑦𝐷𝐷 ∈ ℕ0)) ∧ ((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0))) → (𝑦𝐷 ↔ ¬ 𝐷 < 𝑦))
137131, 136mpbid 231 . . . . . . . . . . . . . . . . . 18 ((((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) ∧ (𝑦𝐷𝐷 ∈ ℕ0)) ∧ ((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0))) → ¬ 𝐷 < 𝑦)
138137exp31 420 . . . . . . . . . . . . . . . . 17 ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → ((𝑦𝐷𝐷 ∈ ℕ0) → (((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) → ¬ 𝐷 < 𝑦)))
13989, 138mpan2d 691 . . . . . . . . . . . . . . . 16 ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → (𝑦𝐷 → (((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) → ¬ 𝐷 < 𝑦)))
140139com13 88 . . . . . . . . . . . . . . 15 (((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) → (𝑦𝐷 → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → ¬ 𝐷 < 𝑦)))
141140adantr 481 . . . . . . . . . . . . . 14 ((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → (𝑦𝐷 → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → ¬ 𝐷 < 𝑦)))
14283, 141syld 47 . . . . . . . . . . . . 13 ((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → (∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → ¬ 𝐷 < 𝑦)))
143142com13 88 . . . . . . . . . . . 12 ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → (∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷) → ((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → ¬ 𝐷 < 𝑦)))
1441433impia 1116 . . . . . . . . . . 11 ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)) → ((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → ¬ 𝐷 < 𝑦))
145144com12 32 . . . . . . . . . 10 ((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)) → ¬ 𝐷 < 𝑦))
146145expimpd 454 . . . . . . . . 9 (((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) → (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷))) → ¬ 𝐷 < 𝑦))
147146expimpd 454 . . . . . . . 8 ((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) → ((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) → ¬ 𝐷 < 𝑦))
14874, 147sylbi 216 . . . . . . 7 (𝑦 ∈ {𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)} → ((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) → ¬ 𝐷 < 𝑦))
149148impcom 408 . . . . . 6 (((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) ∧ 𝑦 ∈ {𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}) → ¬ 𝐷 < 𝑦)
15066adantr 481 . . . . . . . . . . . 12 ((𝐷𝑀𝐷𝑁) → 𝐷 ∈ ℤ)
151150ancri 550 . . . . . . . . . . 11 ((𝐷𝑀𝐷𝑁) → (𝐷 ∈ ℤ ∧ (𝐷𝑀𝐷𝑁)))
1521513ad2ant2 1133 . . . . . . . . . 10 ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)) → (𝐷 ∈ ℤ ∧ (𝐷𝑀𝐷𝑁)))
153152ad2antll 726 . . . . . . . . 9 ((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) → (𝐷 ∈ ℤ ∧ (𝐷𝑀𝐷𝑁)))
154153adantr 481 . . . . . . . 8 (((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) ∧ (𝑦 ∈ ℝ ∧ 𝑦 < 𝐷)) → (𝐷 ∈ ℤ ∧ (𝐷𝑀𝐷𝑁)))
155 breq1 5082 . . . . . . . . . 10 (𝑛 = 𝐷 → (𝑛𝑀𝐷𝑀))
156 breq1 5082 . . . . . . . . . 10 (𝑛 = 𝐷 → (𝑛𝑁𝐷𝑁))
157155, 156anbi12d 631 . . . . . . . . 9 (𝑛 = 𝐷 → ((𝑛𝑀𝑛𝑁) ↔ (𝐷𝑀𝐷𝑁)))
158157elrab 3626 . . . . . . . 8 (𝐷 ∈ {𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)} ↔ (𝐷 ∈ ℤ ∧ (𝐷𝑀𝐷𝑁)))
159154, 158sylibr 233 . . . . . . 7 (((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) ∧ (𝑦 ∈ ℝ ∧ 𝑦 < 𝐷)) → 𝐷 ∈ {𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)})
160 breq2 5083 . . . . . . . 8 (𝑧 = 𝐷 → (𝑦 < 𝑧𝑦 < 𝐷))
161160adantl 482 . . . . . . 7 ((((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) ∧ (𝑦 ∈ ℝ ∧ 𝑦 < 𝐷)) ∧ 𝑧 = 𝐷) → (𝑦 < 𝑧𝑦 < 𝐷))
162 simprr 770 . . . . . . 7 (((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) ∧ (𝑦 ∈ ℝ ∧ 𝑦 < 𝐷)) → 𝑦 < 𝐷)
163159, 161, 162rspcedvd 3564 . . . . . 6 (((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) ∧ (𝑦 ∈ ℝ ∧ 𝑦 < 𝐷)) → ∃𝑧 ∈ {𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}𝑦 < 𝑧)
16464, 70, 149, 163eqsupd 9204 . . . . 5 ((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) → sup({𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}, ℝ, < ) = 𝐷)
16562, 164eqtrd 2780 . . . 4 ((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) → if((𝑀 = 0 ∧ 𝑁 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}, ℝ, < )) = 𝐷)
16660, 165pm2.61ian 809 . . 3 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷))) → if((𝑀 = 0 ∧ 𝑁 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}, ℝ, < )) = 𝐷)
16722, 166eqtr2d 2781 . 2 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷))) → 𝐷 = (𝑀 gcd 𝑁))
16820, 167impbida 798 1 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝐷 = (𝑀 gcd 𝑁) ↔ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷))))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 205  wa 396  wo 844  w3a 1086   = wceq 1542  wcel 2110  wral 3066  {crab 3070  ifcif 4465   class class class wbr 5079   Or wor 5503  (class class class)co 7272  supcsup 9187  cr 10881  0cc0 10882   < clt 11020  cle 11021  cn 11984  0cn0 12244  cz 12330  cdvds 15974   gcd cgcd 16212
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1802  ax-4 1816  ax-5 1917  ax-6 1975  ax-7 2015  ax-8 2112  ax-9 2120  ax-10 2141  ax-11 2158  ax-12 2175  ax-ext 2711  ax-sep 5227  ax-nul 5234  ax-pow 5292  ax-pr 5356  ax-un 7583  ax-cnex 10938  ax-resscn 10939  ax-1cn 10940  ax-icn 10941  ax-addcl 10942  ax-addrcl 10943  ax-mulcl 10944  ax-mulrcl 10945  ax-mulcom 10946  ax-addass 10947  ax-mulass 10948  ax-distr 10949  ax-i2m1 10950  ax-1ne0 10951  ax-1rid 10952  ax-rnegex 10953  ax-rrecex 10954  ax-cnre 10955  ax-pre-lttri 10956  ax-pre-lttrn 10957  ax-pre-ltadd 10958  ax-pre-mulgt0 10959  ax-pre-sup 10960
This theorem depends on definitions:  df-bi 206  df-an 397  df-or 845  df-3or 1087  df-3an 1088  df-tru 1545  df-fal 1555  df-ex 1787  df-nf 1791  df-sb 2072  df-mo 2542  df-eu 2571  df-clab 2718  df-cleq 2732  df-clel 2818  df-nfc 2891  df-ne 2946  df-nel 3052  df-ral 3071  df-rex 3072  df-reu 3073  df-rmo 3074  df-rab 3075  df-v 3433  df-sbc 3721  df-csb 3838  df-dif 3895  df-un 3897  df-in 3899  df-ss 3909  df-pss 3911  df-nul 4263  df-if 4466  df-pw 4541  df-sn 4568  df-pr 4570  df-op 4574  df-uni 4846  df-iun 4932  df-br 5080  df-opab 5142  df-mpt 5163  df-tr 5197  df-id 5490  df-eprel 5496  df-po 5504  df-so 5505  df-fr 5545  df-we 5547  df-xp 5596  df-rel 5597  df-cnv 5598  df-co 5599  df-dm 5600  df-rn 5601  df-res 5602  df-ima 5603  df-pred 6201  df-ord 6268  df-on 6269  df-lim 6270  df-suc 6271  df-iota 6390  df-fun 6434  df-fn 6435  df-f 6436  df-f1 6437  df-fo 6438  df-f1o 6439  df-fv 6440  df-riota 7229  df-ov 7275  df-oprab 7276  df-mpo 7277  df-om 7708  df-2nd 7826  df-frecs 8089  df-wrecs 8120  df-recs 8194  df-rdg 8233  df-er 8490  df-en 8726  df-dom 8727  df-sdom 8728  df-sup 9189  df-inf 9190  df-pnf 11022  df-mnf 11023  df-xr 11024  df-ltxr 11025  df-le 11026  df-sub 11218  df-neg 11219  df-div 11644  df-nn 11985  df-2 12047  df-3 12048  df-n0 12245  df-z 12331  df-uz 12594  df-rp 12742  df-fl 13523  df-mod 13601  df-seq 13733  df-exp 13794  df-cj 14821  df-re 14822  df-im 14823  df-sqrt 14957  df-abs 14958  df-dvds 15975  df-gcd 16213
This theorem is referenced by:  dfgcd3  35504
  Copyright terms: Public domain W3C validator