![]() |
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 2726 | . . 3 ⊢ ((𝑥 = 𝑀 ∧ 𝑦 = 𝑁) → (𝑦 = 0 ↔ 𝑁 = 0)) |
3 | opeq12 4867 | . . 3 ⊢ ((𝑥 = 𝑀 ∧ 𝑦 = 𝑁) → ⟨𝑥, 𝑦⟩ = ⟨𝑀, 𝑁⟩) | |
4 | oveq12 7410 | . . . 4 ⊢ ((𝑥 = 𝑀 ∧ 𝑦 = 𝑁) → (𝑥 mod 𝑦) = (𝑀 mod 𝑁)) | |
5 | 1, 4 | opeq12d 4873 | . . 3 ⊢ ((𝑥 = 𝑀 ∧ 𝑦 = 𝑁) → ⟨𝑦, (𝑥 mod 𝑦)⟩ = ⟨𝑁, (𝑀 mod 𝑁)⟩) |
6 | 2, 3, 5 | ifbieq12d 4548 | . 2 ⊢ ((𝑥 = 𝑀 ∧ 𝑦 = 𝑁) → if(𝑦 = 0, ⟨𝑥, 𝑦⟩, ⟨𝑦, (𝑥 mod 𝑦)⟩) = if(𝑁 = 0, ⟨𝑀, 𝑁⟩, ⟨𝑁, (𝑀 mod 𝑁)⟩)) |
7 | eucalgval.1 | . 2 ⊢ 𝐸 = (𝑥 ∈ ℕ0, 𝑦 ∈ ℕ0 ↦ if(𝑦 = 0, ⟨𝑥, 𝑦⟩, ⟨𝑦, (𝑥 mod 𝑦)⟩)) | |
8 | opex 5454 | . . 3 ⊢ ⟨𝑀, 𝑁⟩ ∈ V | |
9 | opex 5454 | . . 3 ⊢ ⟨𝑁, (𝑀 mod 𝑁)⟩ ∈ V | |
10 | 8, 9 | ifex 4570 | . 2 ⊢ if(𝑁 = 0, ⟨𝑀, 𝑁⟩, ⟨𝑁, (𝑀 mod 𝑁)⟩) ∈ V |
11 | 6, 7, 10 | ovmpoa 7555 | 1 ⊢ ((𝑀 ∈ ℕ0 ∧ 𝑁 ∈ ℕ0) → (𝑀𝐸𝑁) = if(𝑁 = 0, ⟨𝑀, 𝑁⟩, ⟨𝑁, (𝑀 mod 𝑁)⟩)) |
Colors of variables: wff setvar class |
Syntax hints: → wi 4 ∧ wa 395 = wceq 1533 ∈ wcel 2098 ifcif 4520 ⟨cop 4626 (class class class)co 7401 ∈ cmpo 7403 0cc0 11106 ℕ0cn0 12469 mod cmo 13831 |
This theorem was proved from axioms: ax-mp 5 ax-1 6 ax-2 7 ax-3 8 ax-gen 1789 ax-4 1803 ax-5 1905 ax-6 1963 ax-7 2003 ax-8 2100 ax-9 2108 ax-10 2129 ax-11 2146 ax-12 2163 ax-ext 2695 ax-sep 5289 ax-nul 5296 ax-pr 5417 |
This theorem depends on definitions: df-bi 206 df-an 396 df-or 845 df-3an 1086 df-tru 1536 df-fal 1546 df-ex 1774 df-nf 1778 df-sb 2060 df-mo 2526 df-eu 2555 df-clab 2702 df-cleq 2716 df-clel 2802 df-nfc 2877 df-ral 3054 df-rex 3063 df-rab 3425 df-v 3468 df-sbc 3770 df-dif 3943 df-un 3945 df-in 3947 df-ss 3957 df-nul 4315 df-if 4521 df-sn 4621 df-pr 4623 df-op 4627 df-uni 4900 df-br 5139 df-opab 5201 df-id 5564 df-xp 5672 df-rel 5673 df-cnv 5674 df-co 5675 df-dm 5676 df-iota 6485 df-fun 6535 df-fv 6541 df-ov 7404 df-oprab 7405 df-mpo 7406 |
This theorem is referenced by: eucalgval 16516 |
Copyright terms: Public domain | W3C validator |