![]() |
Metamath Proof Explorer |
< Previous
Next >
Nearby theorems |
|
Mirrors > Home > MPE Home > Th. List > eucalgval2 | Structured version Visualization version GIF version |
Description: The value of the step function 𝐸 for Euclid's Algorithm on an ordered pair. (Contributed by Paul Chapman, 31-Mar-2011.) (Revised by Mario Carneiro, 28-May-2014.) |
Ref | Expression |
---|---|
eucalgval.1 | ⊢ 𝐸 = (𝑥 ∈ ℕ0, 𝑦 ∈ ℕ0 ↦ if(𝑦 = 0, 〈𝑥, 𝑦〉, 〈𝑦, (𝑥 mod 𝑦)〉)) |
Ref | Expression |
---|---|
eucalgval2 | ⊢ ((𝑀 ∈ ℕ0 ∧ 𝑁 ∈ ℕ0) → (𝑀𝐸𝑁) = if(𝑁 = 0, 〈𝑀, 𝑁〉, 〈𝑁, (𝑀 mod 𝑁)〉)) |
Step | Hyp | Ref | Expression |
---|---|---|---|
1 | simpr 477 | . . . 4 ⊢ ((𝑥 = 𝑀 ∧ 𝑦 = 𝑁) → 𝑦 = 𝑁) | |
2 | 1 | eqeq1d 2775 | . . 3 ⊢ ((𝑥 = 𝑀 ∧ 𝑦 = 𝑁) → (𝑦 = 0 ↔ 𝑁 = 0)) |
3 | opeq12 4676 | . . 3 ⊢ ((𝑥 = 𝑀 ∧ 𝑦 = 𝑁) → 〈𝑥, 𝑦〉 = 〈𝑀, 𝑁〉) | |
4 | oveq12 6984 | . . . 4 ⊢ ((𝑥 = 𝑀 ∧ 𝑦 = 𝑁) → (𝑥 mod 𝑦) = (𝑀 mod 𝑁)) | |
5 | 1, 4 | opeq12d 4682 | . . 3 ⊢ ((𝑥 = 𝑀 ∧ 𝑦 = 𝑁) → 〈𝑦, (𝑥 mod 𝑦)〉 = 〈𝑁, (𝑀 mod 𝑁)〉) |
6 | 2, 3, 5 | ifbieq12d 4372 | . 2 ⊢ ((𝑥 = 𝑀 ∧ 𝑦 = 𝑁) → if(𝑦 = 0, 〈𝑥, 𝑦〉, 〈𝑦, (𝑥 mod 𝑦)〉) = if(𝑁 = 0, 〈𝑀, 𝑁〉, 〈𝑁, (𝑀 mod 𝑁)〉)) |
7 | eucalgval.1 | . 2 ⊢ 𝐸 = (𝑥 ∈ ℕ0, 𝑦 ∈ ℕ0 ↦ if(𝑦 = 0, 〈𝑥, 𝑦〉, 〈𝑦, (𝑥 mod 𝑦)〉)) | |
8 | opex 5210 | . . 3 ⊢ 〈𝑀, 𝑁〉 ∈ V | |
9 | opex 5210 | . . 3 ⊢ 〈𝑁, (𝑀 mod 𝑁)〉 ∈ V | |
10 | 8, 9 | ifex 4393 | . 2 ⊢ if(𝑁 = 0, 〈𝑀, 𝑁〉, 〈𝑁, (𝑀 mod 𝑁)〉) ∈ V |
11 | 6, 7, 10 | ovmpoa 7120 | 1 ⊢ ((𝑀 ∈ ℕ0 ∧ 𝑁 ∈ ℕ0) → (𝑀𝐸𝑁) = if(𝑁 = 0, 〈𝑀, 𝑁〉, 〈𝑁, (𝑀 mod 𝑁)〉)) |
Colors of variables: wff setvar class |
Syntax hints: → wi 4 ∧ wa 387 = wceq 1508 ∈ wcel 2051 ifcif 4345 〈cop 4442 (class class class)co 6975 ∈ cmpo 6977 0cc0 10334 ℕ0cn0 11706 mod cmo 13051 |
This theorem was proved from axioms: ax-mp 5 ax-1 6 ax-2 7 ax-3 8 ax-gen 1759 ax-4 1773 ax-5 1870 ax-6 1929 ax-7 1966 ax-8 2053 ax-9 2060 ax-10 2080 ax-11 2094 ax-12 2107 ax-13 2302 ax-ext 2745 ax-sep 5057 ax-nul 5064 ax-pr 5183 |
This theorem depends on definitions: df-bi 199 df-an 388 df-or 835 df-3an 1071 df-tru 1511 df-ex 1744 df-nf 1748 df-sb 2017 df-mo 2548 df-eu 2585 df-clab 2754 df-cleq 2766 df-clel 2841 df-nfc 2913 df-ral 3088 df-rex 3089 df-rab 3092 df-v 3412 df-sbc 3677 df-dif 3827 df-un 3829 df-in 3831 df-ss 3838 df-nul 4174 df-if 4346 df-sn 4437 df-pr 4439 df-op 4443 df-uni 4710 df-br 4927 df-opab 4989 df-id 5309 df-xp 5410 df-rel 5411 df-cnv 5412 df-co 5413 df-dm 5414 df-iota 6150 df-fun 6188 df-fv 6194 df-ov 6978 df-oprab 6979 df-mpo 6980 |
This theorem is referenced by: eucalgval 15781 |
Copyright terms: Public domain | W3C validator |