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

Theorem dfgcd2 16182
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 16141 . . . . . 6 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 gcd 𝑁) ∈ ℕ0)
21nn0ge0d 12226 . . . . 5 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → 0 ≤ (𝑀 gcd 𝑁))
3 gcddvds 16138 . . . . 5 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑀 gcd 𝑁) ∥ 𝑀 ∧ (𝑀 gcd 𝑁) ∥ 𝑁))
4 3anass 1093 . . . . . . . 8 ((𝑒 ∈ ℤ ∧ 𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ↔ (𝑒 ∈ ℤ ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)))
54biancomi 462 . . . . . . 7 ((𝑒 ∈ ℤ ∧ 𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ↔ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑒 ∈ ℤ))
6 dvdsgcd 16180 . . . . . . 7 ((𝑒 ∈ ℤ ∧ 𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑒𝑀𝑒𝑁) → 𝑒 ∥ (𝑀 gcd 𝑁)))
75, 6sylbir 234 . . . . . 6 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑒 ∈ ℤ) → ((𝑒𝑀𝑒𝑁) → 𝑒 ∥ (𝑀 gcd 𝑁)))
87ralrimiva 3107 . . . . 5 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒 ∥ (𝑀 gcd 𝑁)))
92, 3, 83jca 1126 . . . 4 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (0 ≤ (𝑀 gcd 𝑁) ∧ ((𝑀 gcd 𝑁) ∥ 𝑀 ∧ (𝑀 gcd 𝑁) ∥ 𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒 ∥ (𝑀 gcd 𝑁))))
109adantr 480 . . 3 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝐷 = (𝑀 gcd 𝑁)) → (0 ≤ (𝑀 gcd 𝑁) ∧ ((𝑀 gcd 𝑁) ∥ 𝑀 ∧ (𝑀 gcd 𝑁) ∥ 𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒 ∥ (𝑀 gcd 𝑁))))
11 breq2 5074 . . . . 5 (𝐷 = (𝑀 gcd 𝑁) → (0 ≤ 𝐷 ↔ 0 ≤ (𝑀 gcd 𝑁)))
12 breq1 5073 . . . . . 6 (𝐷 = (𝑀 gcd 𝑁) → (𝐷𝑀 ↔ (𝑀 gcd 𝑁) ∥ 𝑀))
13 breq1 5073 . . . . . 6 (𝐷 = (𝑀 gcd 𝑁) → (𝐷𝑁 ↔ (𝑀 gcd 𝑁) ∥ 𝑁))
1412, 13anbi12d 630 . . . . 5 (𝐷 = (𝑀 gcd 𝑁) → ((𝐷𝑀𝐷𝑁) ↔ ((𝑀 gcd 𝑁) ∥ 𝑀 ∧ (𝑀 gcd 𝑁) ∥ 𝑁)))
15 breq2 5074 . . . . . . 7 (𝐷 = (𝑀 gcd 𝑁) → (𝑒𝐷𝑒 ∥ (𝑀 gcd 𝑁)))
1615imbi2d 340 . . . . . 6 (𝐷 = (𝑀 gcd 𝑁) → (((𝑒𝑀𝑒𝑁) → 𝑒𝐷) ↔ ((𝑒𝑀𝑒𝑁) → 𝑒 ∥ (𝑀 gcd 𝑁))))
1716ralbidv 3120 . . . . 5 (𝐷 = (𝑀 gcd 𝑁) → (∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷) ↔ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒 ∥ (𝑀 gcd 𝑁))))
1811, 14, 173anbi123d 1434 . . . 4 (𝐷 = (𝑀 gcd 𝑁) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)) ↔ (0 ≤ (𝑀 gcd 𝑁) ∧ ((𝑀 gcd 𝑁) ∥ 𝑀 ∧ (𝑀 gcd 𝑁) ∥ 𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒 ∥ (𝑀 gcd 𝑁)))))
1918adantl 481 . . 3 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝐷 = (𝑀 gcd 𝑁)) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)) ↔ (0 ≤ (𝑀 gcd 𝑁) ∧ ((𝑀 gcd 𝑁) ∥ 𝑀 ∧ (𝑀 gcd 𝑁) ∥ 𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒 ∥ (𝑀 gcd 𝑁)))))
2010, 19mpbird 256 . 2 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝐷 = (𝑀 gcd 𝑁)) → (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))
21 gcdval 16131 . . . 4 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 gcd 𝑁) = if((𝑀 = 0 ∧ 𝑁 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}, ℝ, < )))
2221adantr 480 . . 3 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷))) → (𝑀 gcd 𝑁) = if((𝑀 = 0 ∧ 𝑁 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}, ℝ, < )))
23 iftrue 4462 . . . . . 6 ((𝑀 = 0 ∧ 𝑁 = 0) → if((𝑀 = 0 ∧ 𝑁 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}, ℝ, < )) = 0)
2423adantr 480 . . . . 5 (((𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) → if((𝑀 = 0 ∧ 𝑁 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}, ℝ, < )) = 0)
25 breq2 5074 . . . . . . . . . 10 (𝑀 = 0 → (𝐷𝑀𝐷 ∥ 0))
26 breq2 5074 . . . . . . . . . 10 (𝑁 = 0 → (𝐷𝑁𝐷 ∥ 0))
2725, 26bi2anan9 635 . . . . . . . . 9 ((𝑀 = 0 ∧ 𝑁 = 0) → ((𝐷𝑀𝐷𝑁) ↔ (𝐷 ∥ 0 ∧ 𝐷 ∥ 0)))
28 breq2 5074 . . . . . . . . . . . 12 (𝑀 = 0 → (𝑒𝑀𝑒 ∥ 0))
29 breq2 5074 . . . . . . . . . . . 12 (𝑁 = 0 → (𝑒𝑁𝑒 ∥ 0))
3028, 29bi2anan9 635 . . . . . . . . . . 11 ((𝑀 = 0 ∧ 𝑁 = 0) → ((𝑒𝑀𝑒𝑁) ↔ (𝑒 ∥ 0 ∧ 𝑒 ∥ 0)))
3130imbi1d 341 . . . . . . . . . 10 ((𝑀 = 0 ∧ 𝑁 = 0) → (((𝑒𝑀𝑒𝑁) → 𝑒𝐷) ↔ ((𝑒 ∥ 0 ∧ 𝑒 ∥ 0) → 𝑒𝐷)))
3231ralbidv 3120 . . . . . . . . 9 ((𝑀 = 0 ∧ 𝑁 = 0) → (∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷) ↔ ∀𝑒 ∈ ℤ ((𝑒 ∥ 0 ∧ 𝑒 ∥ 0) → 𝑒𝐷)))
3327, 323anbi23d 1437 . . . . . . . 8 ((𝑀 = 0 ∧ 𝑁 = 0) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)) ↔ (0 ≤ 𝐷 ∧ (𝐷 ∥ 0 ∧ 𝐷 ∥ 0) ∧ ∀𝑒 ∈ ℤ ((𝑒 ∥ 0 ∧ 𝑒 ∥ 0) → 𝑒𝐷))))
34 dvdszrcl 15896 . . . . . . . . . . 11 (𝐷 ∥ 0 → (𝐷 ∈ ℤ ∧ 0 ∈ ℤ))
35 dvds0 15909 . . . . . . . . . . . . . . . . . 18 (𝑒 ∈ ℤ → 𝑒 ∥ 0)
3635, 35jca 511 . . . . . . . . . . . . . . . . 17 (𝑒 ∈ ℤ → (𝑒 ∥ 0 ∧ 𝑒 ∥ 0))
3736adantl 481 . . . . . . . . . . . . . . . 16 (((𝐷 ∈ ℤ ∧ 0 ≤ 𝐷) ∧ 𝑒 ∈ ℤ) → (𝑒 ∥ 0 ∧ 𝑒 ∥ 0))
38 pm5.5 361 . . . . . . . . . . . . . . . 16 ((𝑒 ∥ 0 ∧ 𝑒 ∥ 0) → (((𝑒 ∥ 0 ∧ 𝑒 ∥ 0) → 𝑒𝐷) ↔ 𝑒𝐷))
3937, 38syl 17 . . . . . . . . . . . . . . 15 (((𝐷 ∈ ℤ ∧ 0 ≤ 𝐷) ∧ 𝑒 ∈ ℤ) → (((𝑒 ∥ 0 ∧ 𝑒 ∥ 0) → 𝑒𝐷) ↔ 𝑒𝐷))
4039ralbidva 3119 . . . . . . . . . . . . . 14 ((𝐷 ∈ ℤ ∧ 0 ≤ 𝐷) → (∀𝑒 ∈ ℤ ((𝑒 ∥ 0 ∧ 𝑒 ∥ 0) → 𝑒𝐷) ↔ ∀𝑒 ∈ ℤ 𝑒𝐷))
41 0z 12260 . . . . . . . . . . . . . . . . 17 0 ∈ ℤ
42 breq1 5073 . . . . . . . . . . . . . . . . . 18 (𝑒 = 0 → (𝑒𝐷 ↔ 0 ∥ 𝐷))
4342rspcv 3547 . . . . . . . . . . . . . . . . 17 (0 ∈ ℤ → (∀𝑒 ∈ ℤ 𝑒𝐷 → 0 ∥ 𝐷))
4441, 43ax-mp 5 . . . . . . . . . . . . . . . 16 (∀𝑒 ∈ ℤ 𝑒𝐷 → 0 ∥ 𝐷)
45 0dvds 15914 . . . . . . . . . . . . . . . . . 18 (𝐷 ∈ ℤ → (0 ∥ 𝐷𝐷 = 0))
4645biimpd 228 . . . . . . . . . . . . . . . . 17 (𝐷 ∈ ℤ → (0 ∥ 𝐷𝐷 = 0))
47 eqcom 2745 . . . . . . . . . . . . . . . . 17 (0 = 𝐷𝐷 = 0)
4846, 47syl6ibr 251 . . . . . . . . . . . . . . . 16 (𝐷 ∈ ℤ → (0 ∥ 𝐷 → 0 = 𝐷))
4944, 48syl5 34 . . . . . . . . . . . . . . 15 (𝐷 ∈ ℤ → (∀𝑒 ∈ ℤ 𝑒𝐷 → 0 = 𝐷))
5049adantr 480 . . . . . . . . . . . . . 14 ((𝐷 ∈ ℤ ∧ 0 ≤ 𝐷) → (∀𝑒 ∈ ℤ 𝑒𝐷 → 0 = 𝐷))
5140, 50sylbid 239 . . . . . . . . . . . . 13 ((𝐷 ∈ ℤ ∧ 0 ≤ 𝐷) → (∀𝑒 ∈ ℤ ((𝑒 ∥ 0 ∧ 𝑒 ∥ 0) → 𝑒𝐷) → 0 = 𝐷))
5251ex 412 . . . . . . . . . . . 12 (𝐷 ∈ ℤ → (0 ≤ 𝐷 → (∀𝑒 ∈ ℤ ((𝑒 ∥ 0 ∧ 𝑒 ∥ 0) → 𝑒𝐷) → 0 = 𝐷)))
5352adantr 480 . . . . . . . . . . 11 ((𝐷 ∈ ℤ ∧ 0 ∈ ℤ) → (0 ≤ 𝐷 → (∀𝑒 ∈ ℤ ((𝑒 ∥ 0 ∧ 𝑒 ∥ 0) → 𝑒𝐷) → 0 = 𝐷)))
5434, 53syl 17 . . . . . . . . . 10 (𝐷 ∥ 0 → (0 ≤ 𝐷 → (∀𝑒 ∈ ℤ ((𝑒 ∥ 0 ∧ 𝑒 ∥ 0) → 𝑒𝐷) → 0 = 𝐷)))
5554adantr 480 . . . . . . . . 9 ((𝐷 ∥ 0 ∧ 𝐷 ∥ 0) → (0 ≤ 𝐷 → (∀𝑒 ∈ ℤ ((𝑒 ∥ 0 ∧ 𝑒 ∥ 0) → 𝑒𝐷) → 0 = 𝐷)))
56553imp21 1112 . . . . . . . 8 ((0 ≤ 𝐷 ∧ (𝐷 ∥ 0 ∧ 𝐷 ∥ 0) ∧ ∀𝑒 ∈ ℤ ((𝑒 ∥ 0 ∧ 𝑒 ∥ 0) → 𝑒𝐷)) → 0 = 𝐷)
5733, 56syl6bi 252 . . . . . . 7 ((𝑀 = 0 ∧ 𝑁 = 0) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)) → 0 = 𝐷))
5857adantld 490 . . . . . 6 ((𝑀 = 0 ∧ 𝑁 = 0) → (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷))) → 0 = 𝐷))
5958imp 406 . . . . 5 (((𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) → 0 = 𝐷)
6024, 59eqtrd 2778 . . . 4 (((𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) → if((𝑀 = 0 ∧ 𝑁 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}, ℝ, < )) = 𝐷)
61 iffalse 4465 . . . . . 6 (¬ (𝑀 = 0 ∧ 𝑁 = 0) → if((𝑀 = 0 ∧ 𝑁 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}, ℝ, < )) = sup({𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}, ℝ, < ))
6261adantr 480 . . . . 5 ((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) → if((𝑀 = 0 ∧ 𝑁 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}, ℝ, < )) = sup({𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}, ℝ, < ))
63 ltso 10986 . . . . . . 7 < Or ℝ
6463a1i 11 . . . . . 6 ((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) → < Or ℝ)
65 dvdszrcl 15896 . . . . . . . . . . 11 (𝐷𝑀 → (𝐷 ∈ ℤ ∧ 𝑀 ∈ ℤ))
6665simpld 494 . . . . . . . . . 10 (𝐷𝑀𝐷 ∈ ℤ)
6766zred 12355 . . . . . . . . 9 (𝐷𝑀𝐷 ∈ ℝ)
6867adantr 480 . . . . . . . 8 ((𝐷𝑀𝐷𝑁) → 𝐷 ∈ ℝ)
69683ad2ant2 1132 . . . . . . 7 ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)) → 𝐷 ∈ ℝ)
7069ad2antll 725 . . . . . 6 ((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) → 𝐷 ∈ ℝ)
71 breq1 5073 . . . . . . . . . 10 (𝑛 = 𝑦 → (𝑛𝑀𝑦𝑀))
72 breq1 5073 . . . . . . . . . 10 (𝑛 = 𝑦 → (𝑛𝑁𝑦𝑁))
7371, 72anbi12d 630 . . . . . . . . 9 (𝑛 = 𝑦 → ((𝑛𝑀𝑛𝑁) ↔ (𝑦𝑀𝑦𝑁)))
7473elrab 3617 . . . . . . . 8 (𝑦 ∈ {𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)} ↔ (𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)))
75 breq1 5073 . . . . . . . . . . . . . . . . . . . 20 (𝑒 = 𝑦 → (𝑒𝑀𝑦𝑀))
76 breq1 5073 . . . . . . . . . . . . . . . . . . . 20 (𝑒 = 𝑦 → (𝑒𝑁𝑦𝑁))
7775, 76anbi12d 630 . . . . . . . . . . . . . . . . . . 19 (𝑒 = 𝑦 → ((𝑒𝑀𝑒𝑁) ↔ (𝑦𝑀𝑦𝑁)))
78 breq1 5073 . . . . . . . . . . . . . . . . . . 19 (𝑒 = 𝑦 → (𝑒𝐷𝑦𝐷))
7977, 78imbi12d 344 . . . . . . . . . . . . . . . . . 18 (𝑒 = 𝑦 → (((𝑒𝑀𝑒𝑁) → 𝑒𝐷) ↔ ((𝑦𝑀𝑦𝑁) → 𝑦𝐷)))
8079rspcv 3547 . . . . . . . . . . . . . . . . 17 (𝑦 ∈ ℤ → (∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷) → ((𝑦𝑀𝑦𝑁) → 𝑦𝐷)))
8180com23 86 . . . . . . . . . . . . . . . 16 (𝑦 ∈ ℤ → ((𝑦𝑀𝑦𝑁) → (∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷) → 𝑦𝐷)))
8281imp 406 . . . . . . . . . . . . . . 15 ((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) → (∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷) → 𝑦𝐷))
8382ad2antrr 722 . . . . . . . . . . . . . 14 ((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → (∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷) → 𝑦𝐷))
84 elnn0z 12262 . . . . . . . . . . . . . . . . . . . . . 22 (𝐷 ∈ ℕ0 ↔ (𝐷 ∈ ℤ ∧ 0 ≤ 𝐷))
8584simplbi2 500 . . . . . . . . . . . . . . . . . . . . 21 (𝐷 ∈ ℤ → (0 ≤ 𝐷𝐷 ∈ ℕ0))
8685adantr 480 . . . . . . . . . . . . . . . . . . . 20 ((𝐷 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (0 ≤ 𝐷𝐷 ∈ ℕ0))
8765, 86syl 17 . . . . . . . . . . . . . . . . . . 19 (𝐷𝑀 → (0 ≤ 𝐷𝐷 ∈ ℕ0))
8887adantr 480 . . . . . . . . . . . . . . . . . 18 ((𝐷𝑀𝐷𝑁) → (0 ≤ 𝐷𝐷 ∈ ℕ0))
8988impcom 407 . . . . . . . . . . . . . . . . 17 ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → 𝐷 ∈ ℕ0)
90 simp-4l 779 . . . . . . . . . . . . . . . . . . . . . . . . 25 (((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ 𝐷 ∈ ℕ0) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁))) → 𝑦 ∈ ℤ)
91 elnn0 12165 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 (𝐷 ∈ ℕ0 ↔ (𝐷 ∈ ℕ ∨ 𝐷 = 0))
92 2a1 28 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 (𝐷 ∈ ℕ → (((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → 𝐷 ∈ ℕ)))
93 breq1 5073 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 (𝐷 = 0 → (𝐷𝑀 ↔ 0 ∥ 𝑀))
94 breq1 5073 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 (𝐷 = 0 → (𝐷𝑁 ↔ 0 ∥ 𝑁))
9593, 94anbi12d 630 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 (𝐷 = 0 → ((𝐷𝑀𝐷𝑁) ↔ (0 ∥ 𝑀 ∧ 0 ∥ 𝑁)))
9695anbi2d 628 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 (𝐷 = 0 → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) ↔ (0 ≤ 𝐷 ∧ (0 ∥ 𝑀 ∧ 0 ∥ 𝑁))))
9796adantr 480 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 ((𝐷 = 0 ∧ ((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0))) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) ↔ (0 ≤ 𝐷 ∧ (0 ∥ 𝑀 ∧ 0 ∥ 𝑁))))
98 ianor 978 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 (¬ (𝑀 = 0 ∧ 𝑁 = 0) ↔ (¬ 𝑀 = 0 ∨ ¬ 𝑁 = 0))
99 dvdszrcl 15896 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 (0 ∥ 𝑀 → (0 ∈ ℤ ∧ 𝑀 ∈ ℤ))
100 0dvds 15914 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 (𝑀 ∈ ℤ → (0 ∥ 𝑀𝑀 = 0))
101 pm2.24 124 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 (𝑀 = 0 → (¬ 𝑀 = 0 → 𝐷 ∈ ℕ))
102100, 101syl6bi 252 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 (𝑀 ∈ ℤ → (0 ∥ 𝑀 → (¬ 𝑀 = 0 → 𝐷 ∈ ℕ)))
103102adantl 481 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 ((0 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (0 ∥ 𝑀 → (¬ 𝑀 = 0 → 𝐷 ∈ ℕ)))
10499, 103mpcom 38 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 (0 ∥ 𝑀 → (¬ 𝑀 = 0 → 𝐷 ∈ ℕ))
105104adantr 480 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 ((0 ∥ 𝑀 ∧ 0 ∥ 𝑁) → (¬ 𝑀 = 0 → 𝐷 ∈ ℕ))
106105com12 32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 𝑀 = 0 → ((0 ∥ 𝑀 ∧ 0 ∥ 𝑁) → 𝐷 ∈ ℕ))
107 dvdszrcl 15896 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 (0 ∥ 𝑁 → (0 ∈ ℤ ∧ 𝑁 ∈ ℤ))
108 0dvds 15914 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 (𝑁 ∈ ℤ → (0 ∥ 𝑁𝑁 = 0))
109 pm2.24 124 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 (𝑁 = 0 → (¬ 𝑁 = 0 → 𝐷 ∈ ℕ))
110108, 109syl6bi 252 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 (𝑁 ∈ ℤ → (0 ∥ 𝑁 → (¬ 𝑁 = 0 → 𝐷 ∈ ℕ)))
111110adantl 481 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 ((0 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (0 ∥ 𝑁 → (¬ 𝑁 = 0 → 𝐷 ∈ ℕ)))
112107, 111mpcom 38 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 (0 ∥ 𝑁 → (¬ 𝑁 = 0 → 𝐷 ∈ ℕ))
113112adantl 481 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 ((0 ∥ 𝑀 ∧ 0 ∥ 𝑁) → (¬ 𝑁 = 0 → 𝐷 ∈ ℕ))
114113com12 32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 𝑁 = 0 → ((0 ∥ 𝑀 ∧ 0 ∥ 𝑁) → 𝐷 ∈ ℕ))
115106, 114jaoi 853 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 ((¬ 𝑀 = 0 ∨ ¬ 𝑁 = 0) → ((0 ∥ 𝑀 ∧ 0 ∥ 𝑁) → 𝐷 ∈ ℕ))
11698, 115sylbi 216 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 (¬ (𝑀 = 0 ∧ 𝑁 = 0) → ((0 ∥ 𝑀 ∧ 0 ∥ 𝑁) → 𝐷 ∈ ℕ))
117116adantld 490 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 (¬ (𝑀 = 0 ∧ 𝑁 = 0) → ((0 ≤ 𝐷 ∧ (0 ∥ 𝑀 ∧ 0 ∥ 𝑁)) → 𝐷 ∈ ℕ))
118117ad2antll 725 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 ((𝐷 = 0 ∧ ((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0))) → ((0 ≤ 𝐷 ∧ (0 ∥ 𝑀 ∧ 0 ∥ 𝑁)) → 𝐷 ∈ ℕ))
11997, 118sylbid 239 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 ((𝐷 = 0 ∧ ((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0))) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → 𝐷 ∈ ℕ))
120119ex 412 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 (𝐷 = 0 → (((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → 𝐷 ∈ ℕ)))
12192, 120jaoi 853 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((𝐷 ∈ ℕ ∨ 𝐷 = 0) → (((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → 𝐷 ∈ ℕ)))
12291, 121sylbi 216 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 (𝐷 ∈ ℕ0 → (((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → 𝐷 ∈ ℕ)))
123122impcom 407 . . . . . . . . . . . . . . . . . . . . . . . . . 26 ((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ 𝐷 ∈ ℕ0) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → 𝐷 ∈ ℕ))
124123imp 406 . . . . . . . . . . . . . . . . . . . . . . . . 25 (((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ 𝐷 ∈ ℕ0) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁))) → 𝐷 ∈ ℕ)
125 dvdsle 15947 . . . . . . . . . . . . . . . . . . . . . . . . 25 ((𝑦 ∈ ℤ ∧ 𝐷 ∈ ℕ) → (𝑦𝐷𝑦𝐷))
12690, 124, 125syl2anc 583 . . . . . . . . . . . . . . . . . . . . . . . 24 (((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ 𝐷 ∈ ℕ0) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁))) → (𝑦𝐷𝑦𝐷))
127126exp31 419 . . . . . . . . . . . . . . . . . . . . . . 23 (((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) → (𝐷 ∈ ℕ0 → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → (𝑦𝐷𝑦𝐷))))
128127com14 96 . . . . . . . . . . . . . . . . . . . . . 22 (𝑦𝐷 → (𝐷 ∈ ℕ0 → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → (((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) → 𝑦𝐷))))
129128imp 406 . . . . . . . . . . . . . . . . . . . . 21 ((𝑦𝐷𝐷 ∈ ℕ0) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → (((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) → 𝑦𝐷)))
130129impcom 407 . . . . . . . . . . . . . . . . . . . 20 (((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) ∧ (𝑦𝐷𝐷 ∈ ℕ0)) → (((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) → 𝑦𝐷))
131130imp 406 . . . . . . . . . . . . . . . . . . 19 ((((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) ∧ (𝑦𝐷𝐷 ∈ ℕ0)) ∧ ((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0))) → 𝑦𝐷)
132 zre 12253 . . . . . . . . . . . . . . . . . . . . 21 (𝑦 ∈ ℤ → 𝑦 ∈ ℝ)
133132ad2antrr 722 . . . . . . . . . . . . . . . . . . . 20 (((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) → 𝑦 ∈ ℝ)
13468ad2antlr 723 . . . . . . . . . . . . . . . . . . . 20 (((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) ∧ (𝑦𝐷𝐷 ∈ ℕ0)) → 𝐷 ∈ ℝ)
135 lenlt 10984 . . . . . . . . . . . . . . . . . . . 20 ((𝑦 ∈ ℝ ∧ 𝐷 ∈ ℝ) → (𝑦𝐷 ↔ ¬ 𝐷 < 𝑦))
136133, 134, 135syl2anr 596 . . . . . . . . . . . . . . . . . . 19 ((((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) ∧ (𝑦𝐷𝐷 ∈ ℕ0)) ∧ ((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0))) → (𝑦𝐷 ↔ ¬ 𝐷 < 𝑦))
137131, 136mpbid 231 . . . . . . . . . . . . . . . . . 18 ((((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) ∧ (𝑦𝐷𝐷 ∈ ℕ0)) ∧ ((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0))) → ¬ 𝐷 < 𝑦)
138137exp31 419 . . . . . . . . . . . . . . . . 17 ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → ((𝑦𝐷𝐷 ∈ ℕ0) → (((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) → ¬ 𝐷 < 𝑦)))
13989, 138mpan2d 690 . . . . . . . . . . . . . . . 16 ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → (𝑦𝐷 → (((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) → ¬ 𝐷 < 𝑦)))
140139com13 88 . . . . . . . . . . . . . . 15 (((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) → (𝑦𝐷 → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → ¬ 𝐷 < 𝑦)))
141140adantr 480 . . . . . . . . . . . . . 14 ((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → (𝑦𝐷 → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → ¬ 𝐷 < 𝑦)))
14283, 141syld 47 . . . . . . . . . . . . 13 ((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → (∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → ¬ 𝐷 < 𝑦)))
143142com13 88 . . . . . . . . . . . 12 ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁)) → (∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷) → ((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → ¬ 𝐷 < 𝑦)))
1441433impia 1115 . . . . . . . . . . 11 ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)) → ((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → ¬ 𝐷 < 𝑦))
145144com12 32 . . . . . . . . . 10 ((((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)) → ¬ 𝐷 < 𝑦))
146145expimpd 453 . . . . . . . . 9 (((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) → (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷))) → ¬ 𝐷 < 𝑦))
147146expimpd 453 . . . . . . . 8 ((𝑦 ∈ ℤ ∧ (𝑦𝑀𝑦𝑁)) → ((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) → ¬ 𝐷 < 𝑦))
14874, 147sylbi 216 . . . . . . 7 (𝑦 ∈ {𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)} → ((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) → ¬ 𝐷 < 𝑦))
149148impcom 407 . . . . . 6 (((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) ∧ 𝑦 ∈ {𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}) → ¬ 𝐷 < 𝑦)
15066adantr 480 . . . . . . . . . . . 12 ((𝐷𝑀𝐷𝑁) → 𝐷 ∈ ℤ)
151150ancri 549 . . . . . . . . . . 11 ((𝐷𝑀𝐷𝑁) → (𝐷 ∈ ℤ ∧ (𝐷𝑀𝐷𝑁)))
1521513ad2ant2 1132 . . . . . . . . . 10 ((0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)) → (𝐷 ∈ ℤ ∧ (𝐷𝑀𝐷𝑁)))
153152ad2antll 725 . . . . . . . . 9 ((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) → (𝐷 ∈ ℤ ∧ (𝐷𝑀𝐷𝑁)))
154153adantr 480 . . . . . . . 8 (((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) ∧ (𝑦 ∈ ℝ ∧ 𝑦 < 𝐷)) → (𝐷 ∈ ℤ ∧ (𝐷𝑀𝐷𝑁)))
155 breq1 5073 . . . . . . . . . 10 (𝑛 = 𝐷 → (𝑛𝑀𝐷𝑀))
156 breq1 5073 . . . . . . . . . 10 (𝑛 = 𝐷 → (𝑛𝑁𝐷𝑁))
157155, 156anbi12d 630 . . . . . . . . 9 (𝑛 = 𝐷 → ((𝑛𝑀𝑛𝑁) ↔ (𝐷𝑀𝐷𝑁)))
158157elrab 3617 . . . . . . . 8 (𝐷 ∈ {𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)} ↔ (𝐷 ∈ ℤ ∧ (𝐷𝑀𝐷𝑁)))
159154, 158sylibr 233 . . . . . . 7 (((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) ∧ (𝑦 ∈ ℝ ∧ 𝑦 < 𝐷)) → 𝐷 ∈ {𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)})
160 breq2 5074 . . . . . . . 8 (𝑧 = 𝐷 → (𝑦 < 𝑧𝑦 < 𝐷))
161160adantl 481 . . . . . . 7 ((((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) ∧ (𝑦 ∈ ℝ ∧ 𝑦 < 𝐷)) ∧ 𝑧 = 𝐷) → (𝑦 < 𝑧𝑦 < 𝐷))
162 simprr 769 . . . . . . 7 (((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) ∧ (𝑦 ∈ ℝ ∧ 𝑦 < 𝐷)) → 𝑦 < 𝐷)
163159, 161, 162rspcedvd 3555 . . . . . 6 (((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) ∧ (𝑦 ∈ ℝ ∧ 𝑦 < 𝐷)) → ∃𝑧 ∈ {𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}𝑦 < 𝑧)
16464, 70, 149, 163eqsupd 9146 . . . . 5 ((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) → sup({𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}, ℝ, < ) = 𝐷)
16562, 164eqtrd 2778 . . . 4 ((¬ (𝑀 = 0 ∧ 𝑁 = 0) ∧ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷)))) → if((𝑀 = 0 ∧ 𝑁 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}, ℝ, < )) = 𝐷)
16660, 165pm2.61ian 808 . . 3 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷))) → if((𝑀 = 0 ∧ 𝑁 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛𝑀𝑛𝑁)}, ℝ, < )) = 𝐷)
16722, 166eqtr2d 2779 . 2 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷))) → 𝐷 = (𝑀 gcd 𝑁))
16820, 167impbida 797 1 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝐷 = (𝑀 gcd 𝑁) ↔ (0 ≤ 𝐷 ∧ (𝐷𝑀𝐷𝑁) ∧ ∀𝑒 ∈ ℤ ((𝑒𝑀𝑒𝑁) → 𝑒𝐷))))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 205  wa 395  wo 843  w3a 1085   = wceq 1539  wcel 2108  wral 3063  {crab 3067  ifcif 4456   class class class wbr 5070   Or wor 5493  (class class class)co 7255  supcsup 9129  cr 10801  0cc0 10802   < clt 10940  cle 10941  cn 11903  0cn0 12163  cz 12249  cdvds 15891   gcd cgcd 16129
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1799  ax-4 1813  ax-5 1914  ax-6 1972  ax-7 2012  ax-8 2110  ax-9 2118  ax-10 2139  ax-11 2156  ax-12 2173  ax-ext 2709  ax-sep 5218  ax-nul 5225  ax-pow 5283  ax-pr 5347  ax-un 7566  ax-cnex 10858  ax-resscn 10859  ax-1cn 10860  ax-icn 10861  ax-addcl 10862  ax-addrcl 10863  ax-mulcl 10864  ax-mulrcl 10865  ax-mulcom 10866  ax-addass 10867  ax-mulass 10868  ax-distr 10869  ax-i2m1 10870  ax-1ne0 10871  ax-1rid 10872  ax-rnegex 10873  ax-rrecex 10874  ax-cnre 10875  ax-pre-lttri 10876  ax-pre-lttrn 10877  ax-pre-ltadd 10878  ax-pre-mulgt0 10879  ax-pre-sup 10880
This theorem depends on definitions:  df-bi 206  df-an 396  df-or 844  df-3or 1086  df-3an 1087  df-tru 1542  df-fal 1552  df-ex 1784  df-nf 1788  df-sb 2069  df-mo 2540  df-eu 2569  df-clab 2716  df-cleq 2730  df-clel 2817  df-nfc 2888  df-ne 2943  df-nel 3049  df-ral 3068  df-rex 3069  df-reu 3070  df-rmo 3071  df-rab 3072  df-v 3424  df-sbc 3712  df-csb 3829  df-dif 3886  df-un 3888  df-in 3890  df-ss 3900  df-pss 3902  df-nul 4254  df-if 4457  df-pw 4532  df-sn 4559  df-pr 4561  df-tp 4563  df-op 4565  df-uni 4837  df-iun 4923  df-br 5071  df-opab 5133  df-mpt 5154  df-tr 5188  df-id 5480  df-eprel 5486  df-po 5494  df-so 5495  df-fr 5535  df-we 5537  df-xp 5586  df-rel 5587  df-cnv 5588  df-co 5589  df-dm 5590  df-rn 5591  df-res 5592  df-ima 5593  df-pred 6191  df-ord 6254  df-on 6255  df-lim 6256  df-suc 6257  df-iota 6376  df-fun 6420  df-fn 6421  df-f 6422  df-f1 6423  df-fo 6424  df-f1o 6425  df-fv 6426  df-riota 7212  df-ov 7258  df-oprab 7259  df-mpo 7260  df-om 7688  df-2nd 7805  df-frecs 8068  df-wrecs 8099  df-recs 8173  df-rdg 8212  df-er 8456  df-en 8692  df-dom 8693  df-sdom 8694  df-sup 9131  df-inf 9132  df-pnf 10942  df-mnf 10943  df-xr 10944  df-ltxr 10945  df-le 10946  df-sub 11137  df-neg 11138  df-div 11563  df-nn 11904  df-2 11966  df-3 11967  df-n0 12164  df-z 12250  df-uz 12512  df-rp 12660  df-fl 13440  df-mod 13518  df-seq 13650  df-exp 13711  df-cj 14738  df-re 14739  df-im 14740  df-sqrt 14874  df-abs 14875  df-dvds 15892  df-gcd 16130
This theorem is referenced by:  dfgcd3  35422
  Copyright terms: Public domain W3C validator