Proof of Theorem eucalglt
Step | Hyp | Ref
| Expression |
1 | | eucalgval.1 |
. . . . . . . 8
⊢ 𝐸 = (𝑥 ∈ ℕ0, 𝑦 ∈ ℕ0
↦ if(𝑦 = 0,
〈𝑥, 𝑦〉, 〈𝑦, (𝑥 mod 𝑦)〉)) |
2 | 1 | eucalgval 11995 |
. . . . . . 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 3530 |
. . . . . . . . . . . . 13
⊢
((2nd ‘𝑋) = 0 → if((2nd ‘𝑋) = 0, 𝑋, 〈(2nd ‘𝑋), ( mod ‘𝑋)〉) = 𝑋) |
6 | 5 | eqeq2d 2182 |
. . . . . . . . . . . 12
⊢
((2nd ‘𝑋) = 0 → ((𝐸‘𝑋) = if((2nd ‘𝑋) = 0, 𝑋, 〈(2nd ‘𝑋), ( mod ‘𝑋)〉) ↔ (𝐸‘𝑋) = 𝑋)) |
7 | | fveq2 5494 |
. . . . . . . . . . . 12
⊢ ((𝐸‘𝑋) = 𝑋 → (2nd ‘(𝐸‘𝑋)) = (2nd ‘𝑋)) |
8 | 6, 7 | syl6bi 162 |
. . . . . . . . . . 11
⊢
((2nd ‘𝑋) = 0 → ((𝐸‘𝑋) = if((2nd ‘𝑋) = 0, 𝑋, 〈(2nd ‘𝑋), ( mod ‘𝑋)〉) → (2nd
‘(𝐸‘𝑋)) = (2nd
‘𝑋))) |
9 | | eqeq2 2180 |
. . . . . . . . . . 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 2382 |
. . . . . . . 8
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → ((2nd
‘(𝐸‘𝑋)) ≠ 0 → ¬
(2nd ‘𝑋) =
0)) |
13 | 4, 12 | mpd 13 |
. . . . . . 7
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → ¬ (2nd
‘𝑋) =
0) |
14 | 13 | iffalsed 3535 |
. . . . . 6
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → if((2nd
‘𝑋) = 0, 𝑋, 〈(2nd
‘𝑋), ( mod
‘𝑋)〉) =
〈(2nd ‘𝑋), ( mod ‘𝑋)〉) |
15 | 3, 14 | eqtrd 2203 |
. . . . 5
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (𝐸‘𝑋) = 〈(2nd ‘𝑋), ( mod ‘𝑋)〉) |
16 | 15 | fveq2d 5498 |
. . . 4
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (2nd
‘(𝐸‘𝑋)) = (2nd
‘〈(2nd ‘𝑋), ( mod ‘𝑋)〉)) |
17 | | xp2nd 6142 |
. . . . . 6
⊢ (𝑋 ∈ (ℕ0
× ℕ0) → (2nd ‘𝑋) ∈
ℕ0) |
18 | 17 | adantr 274 |
. . . . 5
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (2nd
‘𝑋) ∈
ℕ0) |
19 | | 1st2nd2 6151 |
. . . . . . . . 9
⊢ (𝑋 ∈ (ℕ0
× ℕ0) → 𝑋 = 〈(1st ‘𝑋), (2nd ‘𝑋)〉) |
20 | 19 | adantr 274 |
. . . . . . . 8
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → 𝑋 = 〈(1st ‘𝑋), (2nd ‘𝑋)〉) |
21 | 20 | fveq2d 5498 |
. . . . . . 7
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → ( mod ‘𝑋) = ( mod
‘〈(1st ‘𝑋), (2nd ‘𝑋)〉)) |
22 | | df-ov 5853 |
. . . . . . 7
⊢
((1st ‘𝑋) mod (2nd ‘𝑋)) = ( mod
‘〈(1st ‘𝑋), (2nd ‘𝑋)〉) |
23 | 21, 22 | eqtr4di 2221 |
. . . . . 6
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → ( mod ‘𝑋) = ((1st
‘𝑋) mod
(2nd ‘𝑋))) |
24 | | xp1st 6141 |
. . . . . . . . 9
⊢ (𝑋 ∈ (ℕ0
× ℕ0) → (1st ‘𝑋) ∈
ℕ0) |
25 | 24 | adantr 274 |
. . . . . . . 8
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (1st
‘𝑋) ∈
ℕ0) |
26 | 25 | nn0zd 9319 |
. . . . . . 7
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (1st
‘𝑋) ∈
ℤ) |
27 | 13 | neqned 2347 |
. . . . . . . 8
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (2nd
‘𝑋) ≠
0) |
28 | | elnnne0 9136 |
. . . . . . . 8
⊢
((2nd ‘𝑋) ∈ ℕ ↔ ((2nd
‘𝑋) ∈
ℕ0 ∧ (2nd ‘𝑋) ≠ 0)) |
29 | 18, 27, 28 | sylanbrc 415 |
. . . . . . 7
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (2nd
‘𝑋) ∈
ℕ) |
30 | 26, 29 | zmodcld 10288 |
. . . . . 6
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → ((1st
‘𝑋) mod
(2nd ‘𝑋))
∈ ℕ0) |
31 | 23, 30 | eqeltrd 2247 |
. . . . 5
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → ( mod ‘𝑋) ∈
ℕ0) |
32 | | op2ndg 6127 |
. . . . 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 2207 |
. . 3
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (2nd
‘(𝐸‘𝑋)) = ((1st
‘𝑋) mod
(2nd ‘𝑋))) |
35 | | zq 9572 |
. . . . 5
⊢
((1st ‘𝑋) ∈ ℤ → (1st
‘𝑋) ∈
ℚ) |
36 | 26, 35 | syl 14 |
. . . 4
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (1st
‘𝑋) ∈
ℚ) |
37 | 18 | nn0zd 9319 |
. . . . 5
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (2nd
‘𝑋) ∈
ℤ) |
38 | | zq 9572 |
. . . . 5
⊢
((2nd ‘𝑋) ∈ ℤ → (2nd
‘𝑋) ∈
ℚ) |
39 | 37, 38 | syl 14 |
. . . 4
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (2nd
‘𝑋) ∈
ℚ) |
40 | 29 | nngt0d 8909 |
. . . 4
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → 0 < (2nd
‘𝑋)) |
41 | | modqlt 10276 |
. . . 4
⊢
(((1st ‘𝑋) ∈ ℚ ∧ (2nd
‘𝑋) ∈ ℚ
∧ 0 < (2nd ‘𝑋)) → ((1st ‘𝑋) mod (2nd
‘𝑋)) <
(2nd ‘𝑋)) |
42 | 36, 39, 40, 41 | syl3anc 1233 |
. . 3
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → ((1st
‘𝑋) mod
(2nd ‘𝑋))
< (2nd ‘𝑋)) |
43 | 34, 42 | eqbrtrd 4009 |
. 2
⊢ ((𝑋 ∈ (ℕ0
× ℕ0) ∧ (2nd ‘(𝐸‘𝑋)) ≠ 0) → (2nd
‘(𝐸‘𝑋)) < (2nd
‘𝑋)) |
44 | 43 | ex 114 |
1
⊢ (𝑋 ∈ (ℕ0
× ℕ0) → ((2nd ‘(𝐸‘𝑋)) ≠ 0 → (2nd
‘(𝐸‘𝑋)) < (2nd
‘𝑋))) |