Proof of Theorem eucalglt
Step | Hyp | Ref
| Expression |
1 | | eucalgval.1 |
. . . . . . . 8
⊢ 𝐸 = (𝑥 ∈ ℕ0, 𝑦 ∈ ℕ0
↦ if(𝑦 = 0,
〈𝑥, 𝑦〉, 〈𝑦, (𝑥 mod 𝑦)〉)) |
2 | 1 | eucalgval 11986 |
. . . . . . 7
⊢ (𝑋 ∈ (ℕ0
× ℕ0) → (𝐸‘𝑋) = if((2nd ‘𝑋) = 0, 𝑋, 〈(2nd ‘𝑋), ( mod ‘𝑋)〉)) |
3 | 2 | adantr 274 |
. . . . . 6
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (𝐸‘𝑋) = if((2nd ‘𝑋) = 0, 𝑋, 〈(2nd ‘𝑋), ( mod ‘𝑋)〉)) |
4 | | simpr 109 |
. . . . . . . 8
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (2nd
‘(𝐸‘𝑋)) ≠ 0) |
5 | | iftrue 3525 |
. . . . . . . . . . . . 13
⊢
((2nd ‘𝑋) = 0 → if((2nd ‘𝑋) = 0, 𝑋, 〈(2nd ‘𝑋), ( mod ‘𝑋)〉) = 𝑋) |
6 | 5 | eqeq2d 2177 |
. . . . . . . . . . . 12
⊢
((2nd ‘𝑋) = 0 → ((𝐸‘𝑋) = if((2nd ‘𝑋) = 0, 𝑋, 〈(2nd ‘𝑋), ( mod ‘𝑋)〉) ↔ (𝐸‘𝑋) = 𝑋)) |
7 | | fveq2 5486 |
. . . . . . . . . . . 12
⊢ ((𝐸‘𝑋) = 𝑋 → (2nd ‘(𝐸‘𝑋)) = (2nd ‘𝑋)) |
8 | 6, 7 | syl6bi 162 |
. . . . . . . . . . 11
⊢
((2nd ‘𝑋) = 0 → ((𝐸‘𝑋) = if((2nd ‘𝑋) = 0, 𝑋, 〈(2nd ‘𝑋), ( mod ‘𝑋)〉) → (2nd
‘(𝐸‘𝑋)) = (2nd
‘𝑋))) |
9 | | eqeq2 2175 |
. . . . . . . . . . 11
⊢
((2nd ‘𝑋) = 0 → ((2nd ‘(𝐸‘𝑋)) = (2nd ‘𝑋) ↔ (2nd
‘(𝐸‘𝑋)) = 0)) |
10 | 8, 9 | sylibd 148 |
. . . . . . . . . 10
⊢
((2nd ‘𝑋) = 0 → ((𝐸‘𝑋) = if((2nd ‘𝑋) = 0, 𝑋, 〈(2nd ‘𝑋), ( mod ‘𝑋)〉) → (2nd
‘(𝐸‘𝑋)) = 0)) |
11 | 3, 10 | syl5com 29 |
. . . . . . . . 9
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → ((2nd
‘𝑋) = 0 →
(2nd ‘(𝐸‘𝑋)) = 0)) |
12 | 11 | necon3ad 2378 |
. . . . . . . 8
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → ((2nd
‘(𝐸‘𝑋)) ≠ 0 → ¬
(2nd ‘𝑋) =
0)) |
13 | 4, 12 | mpd 13 |
. . . . . . 7
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → ¬ (2nd
‘𝑋) =
0) |
14 | 13 | iffalsed 3530 |
. . . . . 6
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → if((2nd
‘𝑋) = 0, 𝑋, 〈(2nd
‘𝑋), ( mod
‘𝑋)〉) =
〈(2nd ‘𝑋), ( mod ‘𝑋)〉) |
15 | 3, 14 | eqtrd 2198 |
. . . . 5
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (𝐸‘𝑋) = 〈(2nd ‘𝑋), ( mod ‘𝑋)〉) |
16 | 15 | fveq2d 5490 |
. . . 4
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (2nd
‘(𝐸‘𝑋)) = (2nd
‘〈(2nd ‘𝑋), ( mod ‘𝑋)〉)) |
17 | | xp2nd 6134 |
. . . . . 6
⊢ (𝑋 ∈ (ℕ0
× ℕ0) → (2nd ‘𝑋) ∈
ℕ0) |
18 | 17 | adantr 274 |
. . . . 5
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (2nd
‘𝑋) ∈
ℕ0) |
19 | | 1st2nd2 6143 |
. . . . . . . . 9
⊢ (𝑋 ∈ (ℕ0
× ℕ0) → 𝑋 = 〈(1st ‘𝑋), (2nd ‘𝑋)〉) |
20 | 19 | adantr 274 |
. . . . . . . 8
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → 𝑋 = 〈(1st ‘𝑋), (2nd ‘𝑋)〉) |
21 | 20 | fveq2d 5490 |
. . . . . . 7
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → ( mod ‘𝑋) = ( mod
‘〈(1st ‘𝑋), (2nd ‘𝑋)〉)) |
22 | | df-ov 5845 |
. . . . . . 7
⊢
((1st ‘𝑋) mod (2nd ‘𝑋)) = ( mod
‘〈(1st ‘𝑋), (2nd ‘𝑋)〉) |
23 | 21, 22 | eqtr4di 2217 |
. . . . . 6
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → ( mod ‘𝑋) = ((1st
‘𝑋) mod
(2nd ‘𝑋))) |
24 | | xp1st 6133 |
. . . . . . . . 9
⊢ (𝑋 ∈ (ℕ0
× ℕ0) → (1st ‘𝑋) ∈
ℕ0) |
25 | 24 | adantr 274 |
. . . . . . . 8
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (1st
‘𝑋) ∈
ℕ0) |
26 | 25 | nn0zd 9311 |
. . . . . . 7
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (1st
‘𝑋) ∈
ℤ) |
27 | 13 | neqned 2343 |
. . . . . . . 8
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (2nd
‘𝑋) ≠
0) |
28 | | elnnne0 9128 |
. . . . . . . 8
⊢
((2nd ‘𝑋) ∈ ℕ ↔ ((2nd
‘𝑋) ∈
ℕ0 ∧ (2nd ‘𝑋) ≠ 0)) |
29 | 18, 27, 28 | sylanbrc 414 |
. . . . . . 7
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (2nd
‘𝑋) ∈
ℕ) |
30 | 26, 29 | zmodcld 10280 |
. . . . . 6
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → ((1st
‘𝑋) mod
(2nd ‘𝑋))
∈ ℕ0) |
31 | 23, 30 | eqeltrd 2243 |
. . . . 5
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → ( mod ‘𝑋) ∈
ℕ0) |
32 | | op2ndg 6119 |
. . . . 5
⊢
(((2nd ‘𝑋) ∈ ℕ0 ∧ ( mod
‘𝑋) ∈
ℕ0) → (2nd ‘〈(2nd
‘𝑋), ( mod
‘𝑋)〉) = ( mod
‘𝑋)) |
33 | 18, 31, 32 | syl2anc 409 |
. . . 4
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (2nd
‘〈(2nd ‘𝑋), ( mod ‘𝑋)〉) = ( mod ‘𝑋)) |
34 | 16, 33, 23 | 3eqtrd 2202 |
. . 3
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (2nd
‘(𝐸‘𝑋)) = ((1st
‘𝑋) mod
(2nd ‘𝑋))) |
35 | | zq 9564 |
. . . . 5
⊢
((1st ‘𝑋) ∈ ℤ → (1st
‘𝑋) ∈
ℚ) |
36 | 26, 35 | syl 14 |
. . . 4
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (1st
‘𝑋) ∈
ℚ) |
37 | 18 | nn0zd 9311 |
. . . . 5
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (2nd
‘𝑋) ∈
ℤ) |
38 | | zq 9564 |
. . . . 5
⊢
((2nd ‘𝑋) ∈ ℤ → (2nd
‘𝑋) ∈
ℚ) |
39 | 37, 38 | syl 14 |
. . . 4
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (2nd
‘𝑋) ∈
ℚ) |
40 | 29 | nngt0d 8901 |
. . . 4
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → 0 < (2nd
‘𝑋)) |
41 | | modqlt 10268 |
. . . 4
⊢
(((1st ‘𝑋) ∈ ℚ ∧ (2nd
‘𝑋) ∈ ℚ
∧ 0 < (2nd ‘𝑋)) → ((1st ‘𝑋) mod (2nd
‘𝑋)) <
(2nd ‘𝑋)) |
42 | 36, 39, 40, 41 | syl3anc 1228 |
. . 3
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → ((1st
‘𝑋) mod
(2nd ‘𝑋))
< (2nd ‘𝑋)) |
43 | 34, 42 | eqbrtrd 4004 |
. 2
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (2nd
‘(𝐸‘𝑋)) < (2nd
‘𝑋)) |
44 | 43 | ex 114 |
1
⊢ (𝑋 ∈ (ℕ0
× ℕ0) → ((2nd ‘(𝐸‘𝑋)) ≠ 0 → (2nd
‘(𝐸‘𝑋)) < (2nd
‘𝑋))) |