Proof of Theorem eucalglt
Step | Hyp | Ref
| Expression |
1 | | eucalgval.1 |
. . . . . . . . 9
⊢ 𝐸 = (𝑥 ∈ ℕ0, 𝑦 ∈ ℕ0
↦ if(𝑦 = 0,
〈𝑥, 𝑦〉, 〈𝑦, (𝑥 mod 𝑦)〉)) |
2 | 1 | eucalgval 16215 |
. . . . . . . 8
⊢ (𝑋 ∈ (ℕ0
× ℕ0) → (𝐸‘𝑋) = if((2nd ‘𝑋) = 0, 𝑋, 〈(2nd ‘𝑋), ( mod ‘𝑋)〉)) |
3 | 2 | adantr 480 |
. . . . . . 7
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (𝐸‘𝑋) = if((2nd ‘𝑋) = 0, 𝑋, 〈(2nd ‘𝑋), ( mod ‘𝑋)〉)) |
4 | | simpr 484 |
. . . . . . . . 9
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (2nd
‘(𝐸‘𝑋)) ≠ 0) |
5 | | iftrue 4462 |
. . . . . . . . . . . . . 14
⊢
((2nd ‘𝑋) = 0 → if((2nd ‘𝑋) = 0, 𝑋, 〈(2nd ‘𝑋), ( mod ‘𝑋)〉) = 𝑋) |
6 | 5 | eqeq2d 2749 |
. . . . . . . . . . . . 13
⊢
((2nd ‘𝑋) = 0 → ((𝐸‘𝑋) = if((2nd ‘𝑋) = 0, 𝑋, 〈(2nd ‘𝑋), ( mod ‘𝑋)〉) ↔ (𝐸‘𝑋) = 𝑋)) |
7 | | fveq2 6756 |
. . . . . . . . . . . . 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 2955 |
. . . . . . . . 9
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → ((2nd
‘(𝐸‘𝑋)) ≠ 0 → ¬
(2nd ‘𝑋) =
0)) |
13 | 4, 12 | mpd 15 |
. . . . . . . 8
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → ¬ (2nd
‘𝑋) =
0) |
14 | 13 | iffalsed 4467 |
. . . . . . 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 6760 |
. . . . 5
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (2nd
‘(𝐸‘𝑋)) = (2nd
‘〈(2nd ‘𝑋), ( mod ‘𝑋)〉)) |
17 | | fvex 6769 |
. . . . . 6
⊢
(2nd ‘𝑋) ∈ V |
18 | | fvex 6769 |
. . . . . 6
⊢ ( mod
‘𝑋) ∈
V |
19 | 17, 18 | op2nd 7813 |
. . . . 5
⊢
(2nd ‘〈(2nd ‘𝑋), ( mod ‘𝑋)〉) = ( mod ‘𝑋) |
20 | 16, 19 | eqtrdi 2795 |
. . . 4
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (2nd
‘(𝐸‘𝑋)) = ( mod ‘𝑋)) |
21 | | 1st2nd2 7843 |
. . . . . . 7
⊢ (𝑋 ∈ (ℕ0
× ℕ0) → 𝑋 = 〈(1st ‘𝑋), (2nd ‘𝑋)〉) |
22 | 21 | adantr 480 |
. . . . . 6
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → 𝑋 = 〈(1st ‘𝑋), (2nd ‘𝑋)〉) |
23 | 22 | fveq2d 6760 |
. . . . 5
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → ( mod ‘𝑋) = ( mod
‘〈(1st ‘𝑋), (2nd ‘𝑋)〉)) |
24 | | df-ov 7258 |
. . . . 5
⊢
((1st ‘𝑋) mod (2nd ‘𝑋)) = ( mod
‘〈(1st ‘𝑋), (2nd ‘𝑋)〉) |
25 | 23, 24 | eqtr4di 2797 |
. . . 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 7836 |
. . . . . 6
⊢ (𝑋 ∈ (ℕ0
× ℕ0) → (1st ‘𝑋) ∈
ℕ0) |
28 | 27 | adantr 480 |
. . . . 5
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (1st
‘𝑋) ∈
ℕ0) |
29 | 28 | nn0red 12224 |
. . . 4
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (1st
‘𝑋) ∈
ℝ) |
30 | | xp2nd 7837 |
. . . . . . . . 9
⊢ (𝑋 ∈ (ℕ0
× ℕ0) → (2nd ‘𝑋) ∈
ℕ0) |
31 | 30 | adantr 480 |
. . . . . . . 8
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (2nd
‘𝑋) ∈
ℕ0) |
32 | | elnn0 12165 |
. . . . . . . 8
⊢
((2nd ‘𝑋) ∈ ℕ0 ↔
((2nd ‘𝑋)
∈ ℕ ∨ (2nd ‘𝑋) = 0)) |
33 | 31, 32 | sylib 217 |
. . . . . . 7
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → ((2nd
‘𝑋) ∈ ℕ
∨ (2nd ‘𝑋) = 0)) |
34 | 33 | ord 860 |
. . . . . 6
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (¬ (2nd
‘𝑋) ∈ ℕ
→ (2nd ‘𝑋) = 0)) |
35 | 13, 34 | mt3d 148 |
. . . . 5
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (2nd
‘𝑋) ∈
ℕ) |
36 | 35 | nnrpd 12699 |
. . . 4
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (2nd
‘𝑋) ∈
ℝ+) |
37 | | modlt 13528 |
. . . 4
⊢
(((1st ‘𝑋) ∈ ℝ ∧ (2nd
‘𝑋) ∈
ℝ+) → ((1st ‘𝑋) mod (2nd ‘𝑋)) < (2nd
‘𝑋)) |
38 | 29, 36, 37 | syl2anc 583 |
. . 3
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → ((1st
‘𝑋) mod
(2nd ‘𝑋))
< (2nd ‘𝑋)) |
39 | 26, 38 | eqbrtrd 5092 |
. 2
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (2nd
‘(𝐸‘𝑋)) < (2nd
‘𝑋)) |
40 | 39 | ex 412 |
1
⊢ (𝑋 ∈ (ℕ0
× ℕ0) → ((2nd ‘(𝐸‘𝑋)) ≠ 0 → (2nd
‘(𝐸‘𝑋)) < (2nd
‘𝑋))) |