![]() |
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 471 | . . . 4 ⊢ ((𝑥 = 𝑀 ∧ 𝑦 = 𝑁) → 𝑦 = 𝑁) | |
2 | 1 | eqeq1d 2773 | . . 3 ⊢ ((𝑥 = 𝑀 ∧ 𝑦 = 𝑁) → (𝑦 = 0 ↔ 𝑁 = 0)) |
3 | opeq12 4542 | . . 3 ⊢ ((𝑥 = 𝑀 ∧ 𝑦 = 𝑁) → 〈𝑥, 𝑦〉 = 〈𝑀, 𝑁〉) | |
4 | oveq12 6805 | . . . 4 ⊢ ((𝑥 = 𝑀 ∧ 𝑦 = 𝑁) → (𝑥 mod 𝑦) = (𝑀 mod 𝑁)) | |
5 | 1, 4 | opeq12d 4548 | . . 3 ⊢ ((𝑥 = 𝑀 ∧ 𝑦 = 𝑁) → 〈𝑦, (𝑥 mod 𝑦)〉 = 〈𝑁, (𝑀 mod 𝑁)〉) |
6 | 2, 3, 5 | ifbieq12d 4253 | . 2 ⊢ ((𝑥 = 𝑀 ∧ 𝑦 = 𝑁) → if(𝑦 = 0, 〈𝑥, 𝑦〉, 〈𝑦, (𝑥 mod 𝑦)〉) = if(𝑁 = 0, 〈𝑀, 𝑁〉, 〈𝑁, (𝑀 mod 𝑁)〉)) |
7 | eucalgval.1 | . 2 ⊢ 𝐸 = (𝑥 ∈ ℕ0, 𝑦 ∈ ℕ0 ↦ if(𝑦 = 0, 〈𝑥, 𝑦〉, 〈𝑦, (𝑥 mod 𝑦)〉)) | |
8 | opex 5061 | . . 3 ⊢ 〈𝑀, 𝑁〉 ∈ V | |
9 | opex 5061 | . . 3 ⊢ 〈𝑁, (𝑀 mod 𝑁)〉 ∈ V | |
10 | 8, 9 | ifex 4296 | . 2 ⊢ if(𝑁 = 0, 〈𝑀, 𝑁〉, 〈𝑁, (𝑀 mod 𝑁)〉) ∈ V |
11 | 6, 7, 10 | ovmpt2a 6942 | 1 ⊢ ((𝑀 ∈ ℕ0 ∧ 𝑁 ∈ ℕ0) → (𝑀𝐸𝑁) = if(𝑁 = 0, 〈𝑀, 𝑁〉, 〈𝑁, (𝑀 mod 𝑁)〉)) |
Colors of variables: wff setvar class |
Syntax hints: → wi 4 ∧ wa 382 = wceq 1631 ∈ wcel 2145 ifcif 4226 〈cop 4323 (class class class)co 6796 ↦ cmpt2 6798 0cc0 10142 ℕ0cn0 11499 mod cmo 12876 |
This theorem was proved from axioms: ax-mp 5 ax-1 6 ax-2 7 ax-3 8 ax-gen 1870 ax-4 1885 ax-5 1991 ax-6 2057 ax-7 2093 ax-9 2154 ax-10 2174 ax-11 2190 ax-12 2203 ax-13 2408 ax-ext 2751 ax-sep 4916 ax-nul 4924 ax-pr 5035 |
This theorem depends on definitions: df-bi 197 df-an 383 df-or 837 df-3an 1073 df-tru 1634 df-ex 1853 df-nf 1858 df-sb 2050 df-eu 2622 df-mo 2623 df-clab 2758 df-cleq 2764 df-clel 2767 df-nfc 2902 df-ral 3066 df-rex 3067 df-rab 3070 df-v 3353 df-sbc 3588 df-dif 3726 df-un 3728 df-in 3730 df-ss 3737 df-nul 4064 df-if 4227 df-sn 4318 df-pr 4320 df-op 4324 df-uni 4576 df-br 4788 df-opab 4848 df-id 5158 df-xp 5256 df-rel 5257 df-cnv 5258 df-co 5259 df-dm 5260 df-iota 5993 df-fun 6032 df-fv 6038 df-ov 6799 df-oprab 6800 df-mpt2 6801 |
This theorem is referenced by: eucalgval 15503 |
Copyright terms: Public domain | W3C validator |