| 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 484 | . . . 4 ⊢ ((𝑥 = 𝑀 ∧ 𝑦 = 𝑁) → 𝑦 = 𝑁) | |
| 2 | 1 | eqeq1d 2737 | . . 3 ⊢ ((𝑥 = 𝑀 ∧ 𝑦 = 𝑁) → (𝑦 = 0 ↔ 𝑁 = 0)) |
| 3 | opeq12 4851 | . . 3 ⊢ ((𝑥 = 𝑀 ∧ 𝑦 = 𝑁) → 〈𝑥, 𝑦〉 = 〈𝑀, 𝑁〉) | |
| 4 | oveq12 7414 | . . . 4 ⊢ ((𝑥 = 𝑀 ∧ 𝑦 = 𝑁) → (𝑥 mod 𝑦) = (𝑀 mod 𝑁)) | |
| 5 | 1, 4 | opeq12d 4857 | . . 3 ⊢ ((𝑥 = 𝑀 ∧ 𝑦 = 𝑁) → 〈𝑦, (𝑥 mod 𝑦)〉 = 〈𝑁, (𝑀 mod 𝑁)〉) |
| 6 | 2, 3, 5 | ifbieq12d 4529 | . 2 ⊢ ((𝑥 = 𝑀 ∧ 𝑦 = 𝑁) → if(𝑦 = 0, 〈𝑥, 𝑦〉, 〈𝑦, (𝑥 mod 𝑦)〉) = if(𝑁 = 0, 〈𝑀, 𝑁〉, 〈𝑁, (𝑀 mod 𝑁)〉)) |
| 7 | eucalgval.1 | . 2 ⊢ 𝐸 = (𝑥 ∈ ℕ0, 𝑦 ∈ ℕ0 ↦ if(𝑦 = 0, 〈𝑥, 𝑦〉, 〈𝑦, (𝑥 mod 𝑦)〉)) | |
| 8 | opex 5439 | . . 3 ⊢ 〈𝑀, 𝑁〉 ∈ V | |
| 9 | opex 5439 | . . 3 ⊢ 〈𝑁, (𝑀 mod 𝑁)〉 ∈ V | |
| 10 | 8, 9 | ifex 4551 | . 2 ⊢ if(𝑁 = 0, 〈𝑀, 𝑁〉, 〈𝑁, (𝑀 mod 𝑁)〉) ∈ V |
| 11 | 6, 7, 10 | ovmpoa 7562 | 1 ⊢ ((𝑀 ∈ ℕ0 ∧ 𝑁 ∈ ℕ0) → (𝑀𝐸𝑁) = if(𝑁 = 0, 〈𝑀, 𝑁〉, 〈𝑁, (𝑀 mod 𝑁)〉)) |
| Colors of variables: wff setvar class |
| Syntax hints: → wi 4 ∧ wa 395 = wceq 1540 ∈ wcel 2108 ifcif 4500 〈cop 4607 (class class class)co 7405 ∈ cmpo 7407 0cc0 11129 ℕ0cn0 12501 mod cmo 13886 |
| This theorem was proved from axioms: ax-mp 5 ax-1 6 ax-2 7 ax-3 8 ax-gen 1795 ax-4 1809 ax-5 1910 ax-6 1967 ax-7 2007 ax-8 2110 ax-9 2118 ax-10 2141 ax-11 2157 ax-12 2177 ax-ext 2707 ax-sep 5266 ax-nul 5276 ax-pr 5402 |
| This theorem depends on definitions: df-bi 207 df-an 396 df-or 848 df-3an 1088 df-tru 1543 df-fal 1553 df-ex 1780 df-nf 1784 df-sb 2065 df-mo 2539 df-eu 2568 df-clab 2714 df-cleq 2727 df-clel 2809 df-nfc 2885 df-ral 3052 df-rex 3061 df-rab 3416 df-v 3461 df-sbc 3766 df-dif 3929 df-un 3931 df-ss 3943 df-nul 4309 df-if 4501 df-sn 4602 df-pr 4604 df-op 4608 df-uni 4884 df-br 5120 df-opab 5182 df-id 5548 df-xp 5660 df-rel 5661 df-cnv 5662 df-co 5663 df-dm 5664 df-iota 6484 df-fun 6533 df-fv 6539 df-ov 7408 df-oprab 7409 df-mpo 7410 |
| This theorem is referenced by: eucalgval 16601 |
| Copyright terms: Public domain | W3C validator |