Proof of Theorem eucalglt
Step | Hyp | Ref
| Expression |
1 | | eucalgval.1 |
. . . . . . . . 9
⊢ 𝐸 = (𝑥 ∈ ℕ0, 𝑦 ∈ ℕ0
↦ if(𝑦 = 0,
〈𝑥, 𝑦〉, 〈𝑦, (𝑥 mod 𝑦)〉)) |
2 | 1 | eucalgval 16287 |
. . . . . . . 8
⊢ (𝑋 ∈ (ℕ0
× ℕ0) → (𝐸‘𝑋) = if((2nd ‘𝑋) = 0, 𝑋, 〈(2nd ‘𝑋), ( mod ‘𝑋)〉)) |
3 | 2 | adantr 481 |
. . . . . . 7
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (𝐸‘𝑋) = if((2nd ‘𝑋) = 0, 𝑋, 〈(2nd ‘𝑋), ( mod ‘𝑋)〉)) |
4 | | simpr 485 |
. . . . . . . . 9
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (2nd
‘(𝐸‘𝑋)) ≠ 0) |
5 | | iftrue 4465 |
. . . . . . . . . . . . . 14
⊢
((2nd ‘𝑋) = 0 → if((2nd ‘𝑋) = 0, 𝑋, 〈(2nd ‘𝑋), ( mod ‘𝑋)〉) = 𝑋) |
6 | 5 | eqeq2d 2749 |
. . . . . . . . . . . . 13
⊢
((2nd ‘𝑋) = 0 → ((𝐸‘𝑋) = if((2nd ‘𝑋) = 0, 𝑋, 〈(2nd ‘𝑋), ( mod ‘𝑋)〉) ↔ (𝐸‘𝑋) = 𝑋)) |
7 | | fveq2 6774 |
. . . . . . . . . . . . 13
⊢ ((𝐸‘𝑋) = 𝑋 → (2nd ‘(𝐸‘𝑋)) = (2nd ‘𝑋)) |
8 | 6, 7 | syl6bi 252 |
. . . . . . . . . . . 12
⊢
((2nd ‘𝑋) = 0 → ((𝐸‘𝑋) = if((2nd ‘𝑋) = 0, 𝑋, 〈(2nd ‘𝑋), ( mod ‘𝑋)〉) → (2nd
‘(𝐸‘𝑋)) = (2nd
‘𝑋))) |
9 | | eqeq2 2750 |
. . . . . . . . . . . 12
⊢
((2nd ‘𝑋) = 0 → ((2nd ‘(𝐸‘𝑋)) = (2nd ‘𝑋) ↔ (2nd
‘(𝐸‘𝑋)) = 0)) |
10 | 8, 9 | sylibd 238 |
. . . . . . . . . . 11
⊢
((2nd ‘𝑋) = 0 → ((𝐸‘𝑋) = if((2nd ‘𝑋) = 0, 𝑋, 〈(2nd ‘𝑋), ( mod ‘𝑋)〉) → (2nd
‘(𝐸‘𝑋)) = 0)) |
11 | 3, 10 | syl5com 31 |
. . . . . . . . . 10
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → ((2nd
‘𝑋) = 0 →
(2nd ‘(𝐸‘𝑋)) = 0)) |
12 | 11 | necon3ad 2956 |
. . . . . . . . 9
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → ((2nd
‘(𝐸‘𝑋)) ≠ 0 → ¬
(2nd ‘𝑋) =
0)) |
13 | 4, 12 | mpd 15 |
. . . . . . . 8
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → ¬ (2nd
‘𝑋) =
0) |
14 | 13 | iffalsed 4470 |
. . . . . . 7
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → if((2nd
‘𝑋) = 0, 𝑋, 〈(2nd
‘𝑋), ( mod
‘𝑋)〉) =
〈(2nd ‘𝑋), ( mod ‘𝑋)〉) |
15 | 3, 14 | eqtrd 2778 |
. . . . . 6
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (𝐸‘𝑋) = 〈(2nd ‘𝑋), ( mod ‘𝑋)〉) |
16 | 15 | fveq2d 6778 |
. . . . 5
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (2nd
‘(𝐸‘𝑋)) = (2nd
‘〈(2nd ‘𝑋), ( mod ‘𝑋)〉)) |
17 | | fvex 6787 |
. . . . . 6
⊢
(2nd ‘𝑋) ∈ V |
18 | | fvex 6787 |
. . . . . 6
⊢ ( mod
‘𝑋) ∈
V |
19 | 17, 18 | op2nd 7840 |
. . . . 5
⊢
(2nd ‘〈(2nd ‘𝑋), ( mod ‘𝑋)〉) = ( mod ‘𝑋) |
20 | 16, 19 | eqtrdi 2794 |
. . . 4
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (2nd
‘(𝐸‘𝑋)) = ( mod ‘𝑋)) |
21 | | 1st2nd2 7870 |
. . . . . . 7
⊢ (𝑋 ∈ (ℕ0
× ℕ0) → 𝑋 = 〈(1st ‘𝑋), (2nd ‘𝑋)〉) |
22 | 21 | adantr 481 |
. . . . . 6
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → 𝑋 = 〈(1st ‘𝑋), (2nd ‘𝑋)〉) |
23 | 22 | fveq2d 6778 |
. . . . 5
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → ( mod ‘𝑋) = ( mod
‘〈(1st ‘𝑋), (2nd ‘𝑋)〉)) |
24 | | df-ov 7278 |
. . . . 5
⊢
((1st ‘𝑋) mod (2nd ‘𝑋)) = ( mod
‘〈(1st ‘𝑋), (2nd ‘𝑋)〉) |
25 | 23, 24 | eqtr4di 2796 |
. . . 4
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → ( mod ‘𝑋) = ((1st
‘𝑋) mod
(2nd ‘𝑋))) |
26 | 20, 25 | eqtrd 2778 |
. . 3
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (2nd
‘(𝐸‘𝑋)) = ((1st
‘𝑋) mod
(2nd ‘𝑋))) |
27 | | xp1st 7863 |
. . . . . 6
⊢ (𝑋 ∈ (ℕ0
× ℕ0) → (1st ‘𝑋) ∈
ℕ0) |
28 | 27 | adantr 481 |
. . . . 5
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (1st
‘𝑋) ∈
ℕ0) |
29 | 28 | nn0red 12294 |
. . . 4
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (1st
‘𝑋) ∈
ℝ) |
30 | | xp2nd 7864 |
. . . . . . . . 9
⊢ (𝑋 ∈ (ℕ0
× ℕ0) → (2nd ‘𝑋) ∈
ℕ0) |
31 | 30 | adantr 481 |
. . . . . . . 8
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (2nd
‘𝑋) ∈
ℕ0) |
32 | | elnn0 12235 |
. . . . . . . 8
⊢
((2nd ‘𝑋) ∈ ℕ0 ↔
((2nd ‘𝑋)
∈ ℕ ∨ (2nd ‘𝑋) = 0)) |
33 | 31, 32 | sylib 217 |
. . . . . . 7
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → ((2nd
‘𝑋) ∈ ℕ
∨ (2nd ‘𝑋) = 0)) |
34 | 33 | ord 861 |
. . . . . 6
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (¬ (2nd
‘𝑋) ∈ ℕ
→ (2nd ‘𝑋) = 0)) |
35 | 13, 34 | mt3d 148 |
. . . . 5
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (2nd
‘𝑋) ∈
ℕ) |
36 | 35 | nnrpd 12770 |
. . . 4
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (2nd
‘𝑋) ∈
ℝ+) |
37 | | modlt 13600 |
. . . 4
⊢
(((1st ‘𝑋) ∈ ℝ ∧ (2nd
‘𝑋) ∈
ℝ+) → ((1st ‘𝑋) mod (2nd ‘𝑋)) < (2nd
‘𝑋)) |
38 | 29, 36, 37 | syl2anc 584 |
. . 3
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → ((1st
‘𝑋) mod
(2nd ‘𝑋))
< (2nd ‘𝑋)) |
39 | 26, 38 | eqbrtrd 5096 |
. 2
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (2nd
‘(𝐸‘𝑋)) < (2nd
‘𝑋)) |
40 | 39 | ex 413 |
1
⊢ (𝑋 ∈ (ℕ0
× ℕ0) → ((2nd ‘(𝐸‘𝑋)) ≠ 0 → (2nd
‘(𝐸‘𝑋)) < (2nd
‘𝑋))) |