MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  hashgadd Structured version   Visualization version   GIF version

Theorem hashgadd 13204
Description: 𝐺 maps ordinal addition to integer addition. (Contributed by Paul Chapman, 30-Nov-2012.) (Revised by Mario Carneiro, 15-Sep-2013.)
Hypothesis
Ref Expression
hashgadd.1 𝐺 = (rec((𝑥 ∈ V ↦ (𝑥 + 1)), 0) ↾ ω)
Assertion
Ref Expression
hashgadd ((𝐴 ∈ ω ∧ 𝐵 ∈ ω) → (𝐺‘(𝐴 +𝑜 𝐵)) = ((𝐺𝐴) + (𝐺𝐵)))

Proof of Theorem hashgadd
Dummy variables 𝑛 𝑧 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 oveq2 6698 . . . . . 6 (𝑛 = ∅ → (𝐴 +𝑜 𝑛) = (𝐴 +𝑜 ∅))
21fveq2d 6233 . . . . 5 (𝑛 = ∅ → (𝐺‘(𝐴 +𝑜 𝑛)) = (𝐺‘(𝐴 +𝑜 ∅)))
3 fveq2 6229 . . . . . 6 (𝑛 = ∅ → (𝐺𝑛) = (𝐺‘∅))
43oveq2d 6706 . . . . 5 (𝑛 = ∅ → ((𝐺𝐴) + (𝐺𝑛)) = ((𝐺𝐴) + (𝐺‘∅)))
52, 4eqeq12d 2666 . . . 4 (𝑛 = ∅ → ((𝐺‘(𝐴 +𝑜 𝑛)) = ((𝐺𝐴) + (𝐺𝑛)) ↔ (𝐺‘(𝐴 +𝑜 ∅)) = ((𝐺𝐴) + (𝐺‘∅))))
65imbi2d 329 . . 3 (𝑛 = ∅ → ((𝐴 ∈ ω → (𝐺‘(𝐴 +𝑜 𝑛)) = ((𝐺𝐴) + (𝐺𝑛))) ↔ (𝐴 ∈ ω → (𝐺‘(𝐴 +𝑜 ∅)) = ((𝐺𝐴) + (𝐺‘∅)))))
7 oveq2 6698 . . . . . 6 (𝑛 = 𝑧 → (𝐴 +𝑜 𝑛) = (𝐴 +𝑜 𝑧))
87fveq2d 6233 . . . . 5 (𝑛 = 𝑧 → (𝐺‘(𝐴 +𝑜 𝑛)) = (𝐺‘(𝐴 +𝑜 𝑧)))
9 fveq2 6229 . . . . . 6 (𝑛 = 𝑧 → (𝐺𝑛) = (𝐺𝑧))
109oveq2d 6706 . . . . 5 (𝑛 = 𝑧 → ((𝐺𝐴) + (𝐺𝑛)) = ((𝐺𝐴) + (𝐺𝑧)))
118, 10eqeq12d 2666 . . . 4 (𝑛 = 𝑧 → ((𝐺‘(𝐴 +𝑜 𝑛)) = ((𝐺𝐴) + (𝐺𝑛)) ↔ (𝐺‘(𝐴 +𝑜 𝑧)) = ((𝐺𝐴) + (𝐺𝑧))))
1211imbi2d 329 . . 3 (𝑛 = 𝑧 → ((𝐴 ∈ ω → (𝐺‘(𝐴 +𝑜 𝑛)) = ((𝐺𝐴) + (𝐺𝑛))) ↔ (𝐴 ∈ ω → (𝐺‘(𝐴 +𝑜 𝑧)) = ((𝐺𝐴) + (𝐺𝑧)))))
13 oveq2 6698 . . . . . 6 (𝑛 = suc 𝑧 → (𝐴 +𝑜 𝑛) = (𝐴 +𝑜 suc 𝑧))
1413fveq2d 6233 . . . . 5 (𝑛 = suc 𝑧 → (𝐺‘(𝐴 +𝑜 𝑛)) = (𝐺‘(𝐴 +𝑜 suc 𝑧)))
15 fveq2 6229 . . . . . 6 (𝑛 = suc 𝑧 → (𝐺𝑛) = (𝐺‘suc 𝑧))
1615oveq2d 6706 . . . . 5 (𝑛 = suc 𝑧 → ((𝐺𝐴) + (𝐺𝑛)) = ((𝐺𝐴) + (𝐺‘suc 𝑧)))
1714, 16eqeq12d 2666 . . . 4 (𝑛 = suc 𝑧 → ((𝐺‘(𝐴 +𝑜 𝑛)) = ((𝐺𝐴) + (𝐺𝑛)) ↔ (𝐺‘(𝐴 +𝑜 suc 𝑧)) = ((𝐺𝐴) + (𝐺‘suc 𝑧))))
1817imbi2d 329 . . 3 (𝑛 = suc 𝑧 → ((𝐴 ∈ ω → (𝐺‘(𝐴 +𝑜 𝑛)) = ((𝐺𝐴) + (𝐺𝑛))) ↔ (𝐴 ∈ ω → (𝐺‘(𝐴 +𝑜 suc 𝑧)) = ((𝐺𝐴) + (𝐺‘suc 𝑧)))))
19 oveq2 6698 . . . . . 6 (𝑛 = 𝐵 → (𝐴 +𝑜 𝑛) = (𝐴 +𝑜 𝐵))
2019fveq2d 6233 . . . . 5 (𝑛 = 𝐵 → (𝐺‘(𝐴 +𝑜 𝑛)) = (𝐺‘(𝐴 +𝑜 𝐵)))
21 fveq2 6229 . . . . . 6 (𝑛 = 𝐵 → (𝐺𝑛) = (𝐺𝐵))
2221oveq2d 6706 . . . . 5 (𝑛 = 𝐵 → ((𝐺𝐴) + (𝐺𝑛)) = ((𝐺𝐴) + (𝐺𝐵)))
2320, 22eqeq12d 2666 . . . 4 (𝑛 = 𝐵 → ((𝐺‘(𝐴 +𝑜 𝑛)) = ((𝐺𝐴) + (𝐺𝑛)) ↔ (𝐺‘(𝐴 +𝑜 𝐵)) = ((𝐺𝐴) + (𝐺𝐵))))
2423imbi2d 329 . . 3 (𝑛 = 𝐵 → ((𝐴 ∈ ω → (𝐺‘(𝐴 +𝑜 𝑛)) = ((𝐺𝐴) + (𝐺𝑛))) ↔ (𝐴 ∈ ω → (𝐺‘(𝐴 +𝑜 𝐵)) = ((𝐺𝐴) + (𝐺𝐵)))))
25 hashgadd.1 . . . . . . . . 9 𝐺 = (rec((𝑥 ∈ V ↦ (𝑥 + 1)), 0) ↾ ω)
2625hashgf1o 12810 . . . . . . . 8 𝐺:ω–1-1-onto→ℕ0
27 f1of 6175 . . . . . . . 8 (𝐺:ω–1-1-onto→ℕ0𝐺:ω⟶ℕ0)
2826, 27ax-mp 5 . . . . . . 7 𝐺:ω⟶ℕ0
2928ffvelrni 6398 . . . . . 6 (𝐴 ∈ ω → (𝐺𝐴) ∈ ℕ0)
3029nn0cnd 11391 . . . . 5 (𝐴 ∈ ω → (𝐺𝐴) ∈ ℂ)
3130addid1d 10274 . . . 4 (𝐴 ∈ ω → ((𝐺𝐴) + 0) = (𝐺𝐴))
32 0z 11426 . . . . . . 7 0 ∈ ℤ
3332, 25om2uz0i 12786 . . . . . 6 (𝐺‘∅) = 0
3433oveq2i 6701 . . . . 5 ((𝐺𝐴) + (𝐺‘∅)) = ((𝐺𝐴) + 0)
3534a1i 11 . . . 4 (𝐴 ∈ ω → ((𝐺𝐴) + (𝐺‘∅)) = ((𝐺𝐴) + 0))
36 nna0 7729 . . . . 5 (𝐴 ∈ ω → (𝐴 +𝑜 ∅) = 𝐴)
3736fveq2d 6233 . . . 4 (𝐴 ∈ ω → (𝐺‘(𝐴 +𝑜 ∅)) = (𝐺𝐴))
3831, 35, 373eqtr4rd 2696 . . 3 (𝐴 ∈ ω → (𝐺‘(𝐴 +𝑜 ∅)) = ((𝐺𝐴) + (𝐺‘∅)))
39 nnasuc 7731 . . . . . . . . . 10 ((𝐴 ∈ ω ∧ 𝑧 ∈ ω) → (𝐴 +𝑜 suc 𝑧) = suc (𝐴 +𝑜 𝑧))
4039fveq2d 6233 . . . . . . . . 9 ((𝐴 ∈ ω ∧ 𝑧 ∈ ω) → (𝐺‘(𝐴 +𝑜 suc 𝑧)) = (𝐺‘suc (𝐴 +𝑜 𝑧)))
41 nnacl 7736 . . . . . . . . . 10 ((𝐴 ∈ ω ∧ 𝑧 ∈ ω) → (𝐴 +𝑜 𝑧) ∈ ω)
4232, 25om2uzsuci 12787 . . . . . . . . . 10 ((𝐴 +𝑜 𝑧) ∈ ω → (𝐺‘suc (𝐴 +𝑜 𝑧)) = ((𝐺‘(𝐴 +𝑜 𝑧)) + 1))
4341, 42syl 17 . . . . . . . . 9 ((𝐴 ∈ ω ∧ 𝑧 ∈ ω) → (𝐺‘suc (𝐴 +𝑜 𝑧)) = ((𝐺‘(𝐴 +𝑜 𝑧)) + 1))
4440, 43eqtrd 2685 . . . . . . . 8 ((𝐴 ∈ ω ∧ 𝑧 ∈ ω) → (𝐺‘(𝐴 +𝑜 suc 𝑧)) = ((𝐺‘(𝐴 +𝑜 𝑧)) + 1))
45443adant3 1101 . . . . . . 7 ((𝐴 ∈ ω ∧ 𝑧 ∈ ω ∧ (𝐺‘(𝐴 +𝑜 𝑧)) = ((𝐺𝐴) + (𝐺𝑧))) → (𝐺‘(𝐴 +𝑜 suc 𝑧)) = ((𝐺‘(𝐴 +𝑜 𝑧)) + 1))
4628ffvelrni 6398 . . . . . . . . . . 11 (𝑧 ∈ ω → (𝐺𝑧) ∈ ℕ0)
4746nn0cnd 11391 . . . . . . . . . 10 (𝑧 ∈ ω → (𝐺𝑧) ∈ ℂ)
48 ax-1cn 10032 . . . . . . . . . . 11 1 ∈ ℂ
49 addass 10061 . . . . . . . . . . 11 (((𝐺𝐴) ∈ ℂ ∧ (𝐺𝑧) ∈ ℂ ∧ 1 ∈ ℂ) → (((𝐺𝐴) + (𝐺𝑧)) + 1) = ((𝐺𝐴) + ((𝐺𝑧) + 1)))
5048, 49mp3an3 1453 . . . . . . . . . 10 (((𝐺𝐴) ∈ ℂ ∧ (𝐺𝑧) ∈ ℂ) → (((𝐺𝐴) + (𝐺𝑧)) + 1) = ((𝐺𝐴) + ((𝐺𝑧) + 1)))
5130, 47, 50syl2an 493 . . . . . . . . 9 ((𝐴 ∈ ω ∧ 𝑧 ∈ ω) → (((𝐺𝐴) + (𝐺𝑧)) + 1) = ((𝐺𝐴) + ((𝐺𝑧) + 1)))
52513adant3 1101 . . . . . . . 8 ((𝐴 ∈ ω ∧ 𝑧 ∈ ω ∧ (𝐺‘(𝐴 +𝑜 𝑧)) = ((𝐺𝐴) + (𝐺𝑧))) → (((𝐺𝐴) + (𝐺𝑧)) + 1) = ((𝐺𝐴) + ((𝐺𝑧) + 1)))
53 oveq1 6697 . . . . . . . . 9 ((𝐺‘(𝐴 +𝑜 𝑧)) = ((𝐺𝐴) + (𝐺𝑧)) → ((𝐺‘(𝐴 +𝑜 𝑧)) + 1) = (((𝐺𝐴) + (𝐺𝑧)) + 1))
54533ad2ant3 1104 . . . . . . . 8 ((𝐴 ∈ ω ∧ 𝑧 ∈ ω ∧ (𝐺‘(𝐴 +𝑜 𝑧)) = ((𝐺𝐴) + (𝐺𝑧))) → ((𝐺‘(𝐴 +𝑜 𝑧)) + 1) = (((𝐺𝐴) + (𝐺𝑧)) + 1))
5532, 25om2uzsuci 12787 . . . . . . . . . 10 (𝑧 ∈ ω → (𝐺‘suc 𝑧) = ((𝐺𝑧) + 1))
5655oveq2d 6706 . . . . . . . . 9 (𝑧 ∈ ω → ((𝐺𝐴) + (𝐺‘suc 𝑧)) = ((𝐺𝐴) + ((𝐺𝑧) + 1)))
57563ad2ant2 1103 . . . . . . . 8 ((𝐴 ∈ ω ∧ 𝑧 ∈ ω ∧ (𝐺‘(𝐴 +𝑜 𝑧)) = ((𝐺𝐴) + (𝐺𝑧))) → ((𝐺𝐴) + (𝐺‘suc 𝑧)) = ((𝐺𝐴) + ((𝐺𝑧) + 1)))
5852, 54, 573eqtr4d 2695 . . . . . . 7 ((𝐴 ∈ ω ∧ 𝑧 ∈ ω ∧ (𝐺‘(𝐴 +𝑜 𝑧)) = ((𝐺𝐴) + (𝐺𝑧))) → ((𝐺‘(𝐴 +𝑜 𝑧)) + 1) = ((𝐺𝐴) + (𝐺‘suc 𝑧)))
5945, 58eqtrd 2685 . . . . . 6 ((𝐴 ∈ ω ∧ 𝑧 ∈ ω ∧ (𝐺‘(𝐴 +𝑜 𝑧)) = ((𝐺𝐴) + (𝐺𝑧))) → (𝐺‘(𝐴 +𝑜 suc 𝑧)) = ((𝐺𝐴) + (𝐺‘suc 𝑧)))
60593expia 1286 . . . . 5 ((𝐴 ∈ ω ∧ 𝑧 ∈ ω) → ((𝐺‘(𝐴 +𝑜 𝑧)) = ((𝐺𝐴) + (𝐺𝑧)) → (𝐺‘(𝐴 +𝑜 suc 𝑧)) = ((𝐺𝐴) + (𝐺‘suc 𝑧))))
6160expcom 450 . . . 4 (𝑧 ∈ ω → (𝐴 ∈ ω → ((𝐺‘(𝐴 +𝑜 𝑧)) = ((𝐺𝐴) + (𝐺𝑧)) → (𝐺‘(𝐴 +𝑜 suc 𝑧)) = ((𝐺𝐴) + (𝐺‘suc 𝑧)))))
6261a2d 29 . . 3 (𝑧 ∈ ω → ((𝐴 ∈ ω → (𝐺‘(𝐴 +𝑜 𝑧)) = ((𝐺𝐴) + (𝐺𝑧))) → (𝐴 ∈ ω → (𝐺‘(𝐴 +𝑜 suc 𝑧)) = ((𝐺𝐴) + (𝐺‘suc 𝑧)))))
636, 12, 18, 24, 38, 62finds 7134 . 2 (𝐵 ∈ ω → (𝐴 ∈ ω → (𝐺‘(𝐴 +𝑜 𝐵)) = ((𝐺𝐴) + (𝐺𝐵))))
6463impcom 445 1 ((𝐴 ∈ ω ∧ 𝐵 ∈ ω) → (𝐺‘(𝐴 +𝑜 𝐵)) = ((𝐺𝐴) + (𝐺𝐵)))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wa 383  w3a 1054   = wceq 1523  wcel 2030  Vcvv 3231  c0 3948  cmpt 4762  cres 5145  suc csuc 5763  wf 5922  1-1-ontowf1o 5925  cfv 5926  (class class class)co 6690  ωcom 7107  reccrdg 7550   +𝑜 coa 7602  cc 9972  0cc0 9974  1c1 9975   + caddc 9977  0cn0 11330
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1762  ax-4 1777  ax-5 1879  ax-6 1945  ax-7 1981  ax-8 2032  ax-9 2039  ax-10 2059  ax-11 2074  ax-12 2087  ax-13 2282  ax-ext 2631  ax-sep 4814  ax-nul 4822  ax-pow 4873  ax-pr 4936  ax-un 6991  ax-cnex 10030  ax-resscn 10031  ax-1cn 10032  ax-icn 10033  ax-addcl 10034  ax-addrcl 10035  ax-mulcl 10036  ax-mulrcl 10037  ax-mulcom 10038  ax-addass 10039  ax-mulass 10040  ax-distr 10041  ax-i2m1 10042  ax-1ne0 10043  ax-1rid 10044  ax-rnegex 10045  ax-rrecex 10046  ax-cnre 10047  ax-pre-lttri 10048  ax-pre-lttrn 10049  ax-pre-ltadd 10050  ax-pre-mulgt0 10051
This theorem depends on definitions:  df-bi 197  df-or 384  df-an 385  df-3or 1055  df-3an 1056  df-tru 1526  df-ex 1745  df-nf 1750  df-sb 1938  df-eu 2502  df-mo 2503  df-clab 2638  df-cleq 2644  df-clel 2647  df-nfc 2782  df-ne 2824  df-nel 2927  df-ral 2946  df-rex 2947  df-reu 2948  df-rab 2950  df-v 3233  df-sbc 3469  df-csb 3567  df-dif 3610  df-un 3612  df-in 3614  df-ss 3621  df-pss 3623  df-nul 3949  df-if 4120  df-pw 4193  df-sn 4211  df-pr 4213  df-tp 4215  df-op 4217  df-uni 4469  df-iun 4554  df-br 4686  df-opab 4746  df-mpt 4763  df-tr 4786  df-id 5053  df-eprel 5058  df-po 5064  df-so 5065  df-fr 5102  df-we 5104  df-xp 5149  df-rel 5150  df-cnv 5151  df-co 5152  df-dm 5153  df-rn 5154  df-res 5155  df-ima 5156  df-pred 5718  df-ord 5764  df-on 5765  df-lim 5766  df-suc 5767  df-iota 5889  df-fun 5928  df-fn 5929  df-f 5930  df-f1 5931  df-fo 5932  df-f1o 5933  df-fv 5934  df-riota 6651  df-ov 6693  df-oprab 6694  df-mpt2 6695  df-om 7108  df-wrecs 7452  df-recs 7513  df-rdg 7551  df-oadd 7609  df-er 7787  df-en 7998  df-dom 7999  df-sdom 8000  df-pnf 10114  df-mnf 10115  df-xr 10116  df-ltxr 10117  df-le 10118  df-sub 10306  df-neg 10307  df-nn 11059  df-n0 11331  df-z 11416  df-uz 11726
This theorem is referenced by:  hashdom  13206  hashun  13209
  Copyright terms: Public domain W3C validator