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

Theorem hashgadd 12976
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 6532 . . . . . 6 (𝑛 = ∅ → (𝐴 +𝑜 𝑛) = (𝐴 +𝑜 ∅))
21fveq2d 6089 . . . . 5 (𝑛 = ∅ → (𝐺‘(𝐴 +𝑜 𝑛)) = (𝐺‘(𝐴 +𝑜 ∅)))
3 fveq2 6085 . . . . . 6 (𝑛 = ∅ → (𝐺𝑛) = (𝐺‘∅))
43oveq2d 6540 . . . . 5 (𝑛 = ∅ → ((𝐺𝐴) + (𝐺𝑛)) = ((𝐺𝐴) + (𝐺‘∅)))
52, 4eqeq12d 2621 . . . 4 (𝑛 = ∅ → ((𝐺‘(𝐴 +𝑜 𝑛)) = ((𝐺𝐴) + (𝐺𝑛)) ↔ (𝐺‘(𝐴 +𝑜 ∅)) = ((𝐺𝐴) + (𝐺‘∅))))
65imbi2d 328 . . 3 (𝑛 = ∅ → ((𝐴 ∈ ω → (𝐺‘(𝐴 +𝑜 𝑛)) = ((𝐺𝐴) + (𝐺𝑛))) ↔ (𝐴 ∈ ω → (𝐺‘(𝐴 +𝑜 ∅)) = ((𝐺𝐴) + (𝐺‘∅)))))
7 oveq2 6532 . . . . . 6 (𝑛 = 𝑧 → (𝐴 +𝑜 𝑛) = (𝐴 +𝑜 𝑧))
87fveq2d 6089 . . . . 5 (𝑛 = 𝑧 → (𝐺‘(𝐴 +𝑜 𝑛)) = (𝐺‘(𝐴 +𝑜 𝑧)))
9 fveq2 6085 . . . . . 6 (𝑛 = 𝑧 → (𝐺𝑛) = (𝐺𝑧))
109oveq2d 6540 . . . . 5 (𝑛 = 𝑧 → ((𝐺𝐴) + (𝐺𝑛)) = ((𝐺𝐴) + (𝐺𝑧)))
118, 10eqeq12d 2621 . . . 4 (𝑛 = 𝑧 → ((𝐺‘(𝐴 +𝑜 𝑛)) = ((𝐺𝐴) + (𝐺𝑛)) ↔ (𝐺‘(𝐴 +𝑜 𝑧)) = ((𝐺𝐴) + (𝐺𝑧))))
1211imbi2d 328 . . 3 (𝑛 = 𝑧 → ((𝐴 ∈ ω → (𝐺‘(𝐴 +𝑜 𝑛)) = ((𝐺𝐴) + (𝐺𝑛))) ↔ (𝐴 ∈ ω → (𝐺‘(𝐴 +𝑜 𝑧)) = ((𝐺𝐴) + (𝐺𝑧)))))
13 oveq2 6532 . . . . . 6 (𝑛 = suc 𝑧 → (𝐴 +𝑜 𝑛) = (𝐴 +𝑜 suc 𝑧))
1413fveq2d 6089 . . . . 5 (𝑛 = suc 𝑧 → (𝐺‘(𝐴 +𝑜 𝑛)) = (𝐺‘(𝐴 +𝑜 suc 𝑧)))
15 fveq2 6085 . . . . . 6 (𝑛 = suc 𝑧 → (𝐺𝑛) = (𝐺‘suc 𝑧))
1615oveq2d 6540 . . . . 5 (𝑛 = suc 𝑧 → ((𝐺𝐴) + (𝐺𝑛)) = ((𝐺𝐴) + (𝐺‘suc 𝑧)))
1714, 16eqeq12d 2621 . . . 4 (𝑛 = suc 𝑧 → ((𝐺‘(𝐴 +𝑜 𝑛)) = ((𝐺𝐴) + (𝐺𝑛)) ↔ (𝐺‘(𝐴 +𝑜 suc 𝑧)) = ((𝐺𝐴) + (𝐺‘suc 𝑧))))
1817imbi2d 328 . . 3 (𝑛 = suc 𝑧 → ((𝐴 ∈ ω → (𝐺‘(𝐴 +𝑜 𝑛)) = ((𝐺𝐴) + (𝐺𝑛))) ↔ (𝐴 ∈ ω → (𝐺‘(𝐴 +𝑜 suc 𝑧)) = ((𝐺𝐴) + (𝐺‘suc 𝑧)))))
19 oveq2 6532 . . . . . 6 (𝑛 = 𝐵 → (𝐴 +𝑜 𝑛) = (𝐴 +𝑜 𝐵))
2019fveq2d 6089 . . . . 5 (𝑛 = 𝐵 → (𝐺‘(𝐴 +𝑜 𝑛)) = (𝐺‘(𝐴 +𝑜 𝐵)))
21 fveq2 6085 . . . . . 6 (𝑛 = 𝐵 → (𝐺𝑛) = (𝐺𝐵))
2221oveq2d 6540 . . . . 5 (𝑛 = 𝐵 → ((𝐺𝐴) + (𝐺𝑛)) = ((𝐺𝐴) + (𝐺𝐵)))
2320, 22eqeq12d 2621 . . . 4 (𝑛 = 𝐵 → ((𝐺‘(𝐴 +𝑜 𝑛)) = ((𝐺𝐴) + (𝐺𝑛)) ↔ (𝐺‘(𝐴 +𝑜 𝐵)) = ((𝐺𝐴) + (𝐺𝐵))))
2423imbi2d 328 . . 3 (𝑛 = 𝐵 → ((𝐴 ∈ ω → (𝐺‘(𝐴 +𝑜 𝑛)) = ((𝐺𝐴) + (𝐺𝑛))) ↔ (𝐴 ∈ ω → (𝐺‘(𝐴 +𝑜 𝐵)) = ((𝐺𝐴) + (𝐺𝐵)))))
25 hashgadd.1 . . . . . . . . 9 𝐺 = (rec((𝑥 ∈ V ↦ (𝑥 + 1)), 0) ↾ ω)
2625hashgf1o 12584 . . . . . . . 8 𝐺:ω–1-1-onto→ℕ0
27 f1of 6032 . . . . . . . 8 (𝐺:ω–1-1-onto→ℕ0𝐺:ω⟶ℕ0)
2826, 27ax-mp 5 . . . . . . 7 𝐺:ω⟶ℕ0
2928ffvelrni 6248 . . . . . 6 (𝐴 ∈ ω → (𝐺𝐴) ∈ ℕ0)
3029nn0cnd 11197 . . . . 5 (𝐴 ∈ ω → (𝐺𝐴) ∈ ℂ)
3130addid1d 10084 . . . 4 (𝐴 ∈ ω → ((𝐺𝐴) + 0) = (𝐺𝐴))
32 0z 11218 . . . . . . 7 0 ∈ ℤ
3332, 25om2uz0i 12560 . . . . . 6 (𝐺‘∅) = 0
3433oveq2i 6535 . . . . 5 ((𝐺𝐴) + (𝐺‘∅)) = ((𝐺𝐴) + 0)
3534a1i 11 . . . 4 (𝐴 ∈ ω → ((𝐺𝐴) + (𝐺‘∅)) = ((𝐺𝐴) + 0))
36 nna0 7545 . . . . 5 (𝐴 ∈ ω → (𝐴 +𝑜 ∅) = 𝐴)
3736fveq2d 6089 . . . 4 (𝐴 ∈ ω → (𝐺‘(𝐴 +𝑜 ∅)) = (𝐺𝐴))
3831, 35, 373eqtr4rd 2651 . . 3 (𝐴 ∈ ω → (𝐺‘(𝐴 +𝑜 ∅)) = ((𝐺𝐴) + (𝐺‘∅)))
39 nnasuc 7547 . . . . . . . . . 10 ((𝐴 ∈ ω ∧ 𝑧 ∈ ω) → (𝐴 +𝑜 suc 𝑧) = suc (𝐴 +𝑜 𝑧))
4039fveq2d 6089 . . . . . . . . 9 ((𝐴 ∈ ω ∧ 𝑧 ∈ ω) → (𝐺‘(𝐴 +𝑜 suc 𝑧)) = (𝐺‘suc (𝐴 +𝑜 𝑧)))
41 nnacl 7552 . . . . . . . . . 10 ((𝐴 ∈ ω ∧ 𝑧 ∈ ω) → (𝐴 +𝑜 𝑧) ∈ ω)
4232, 25om2uzsuci 12561 . . . . . . . . . 10 ((𝐴 +𝑜 𝑧) ∈ ω → (𝐺‘suc (𝐴 +𝑜 𝑧)) = ((𝐺‘(𝐴 +𝑜 𝑧)) + 1))
4341, 42syl 17 . . . . . . . . 9 ((𝐴 ∈ ω ∧ 𝑧 ∈ ω) → (𝐺‘suc (𝐴 +𝑜 𝑧)) = ((𝐺‘(𝐴 +𝑜 𝑧)) + 1))
4440, 43eqtrd 2640 . . . . . . . 8 ((𝐴 ∈ ω ∧ 𝑧 ∈ ω) → (𝐺‘(𝐴 +𝑜 suc 𝑧)) = ((𝐺‘(𝐴 +𝑜 𝑧)) + 1))
45443adant3 1073 . . . . . . 7 ((𝐴 ∈ ω ∧ 𝑧 ∈ ω ∧ (𝐺‘(𝐴 +𝑜 𝑧)) = ((𝐺𝐴) + (𝐺𝑧))) → (𝐺‘(𝐴 +𝑜 suc 𝑧)) = ((𝐺‘(𝐴 +𝑜 𝑧)) + 1))
4628ffvelrni 6248 . . . . . . . . . . 11 (𝑧 ∈ ω → (𝐺𝑧) ∈ ℕ0)
4746nn0cnd 11197 . . . . . . . . . 10 (𝑧 ∈ ω → (𝐺𝑧) ∈ ℂ)
48 ax-1cn 9847 . . . . . . . . . . 11 1 ∈ ℂ
49 addass 9876 . . . . . . . . . . 11 (((𝐺𝐴) ∈ ℂ ∧ (𝐺𝑧) ∈ ℂ ∧ 1 ∈ ℂ) → (((𝐺𝐴) + (𝐺𝑧)) + 1) = ((𝐺𝐴) + ((𝐺𝑧) + 1)))
5048, 49mp3an3 1404 . . . . . . . . . 10 (((𝐺𝐴) ∈ ℂ ∧ (𝐺𝑧) ∈ ℂ) → (((𝐺𝐴) + (𝐺𝑧)) + 1) = ((𝐺𝐴) + ((𝐺𝑧) + 1)))
5130, 47, 50syl2an 492 . . . . . . . . 9 ((𝐴 ∈ ω ∧ 𝑧 ∈ ω) → (((𝐺𝐴) + (𝐺𝑧)) + 1) = ((𝐺𝐴) + ((𝐺𝑧) + 1)))
52513adant3 1073 . . . . . . . 8 ((𝐴 ∈ ω ∧ 𝑧 ∈ ω ∧ (𝐺‘(𝐴 +𝑜 𝑧)) = ((𝐺𝐴) + (𝐺𝑧))) → (((𝐺𝐴) + (𝐺𝑧)) + 1) = ((𝐺𝐴) + ((𝐺𝑧) + 1)))
53 oveq1 6531 . . . . . . . . 9 ((𝐺‘(𝐴 +𝑜 𝑧)) = ((𝐺𝐴) + (𝐺𝑧)) → ((𝐺‘(𝐴 +𝑜 𝑧)) + 1) = (((𝐺𝐴) + (𝐺𝑧)) + 1))
54533ad2ant3 1076 . . . . . . . 8 ((𝐴 ∈ ω ∧ 𝑧 ∈ ω ∧ (𝐺‘(𝐴 +𝑜 𝑧)) = ((𝐺𝐴) + (𝐺𝑧))) → ((𝐺‘(𝐴 +𝑜 𝑧)) + 1) = (((𝐺𝐴) + (𝐺𝑧)) + 1))
5532, 25om2uzsuci 12561 . . . . . . . . . 10 (𝑧 ∈ ω → (𝐺‘suc 𝑧) = ((𝐺𝑧) + 1))
5655oveq2d 6540 . . . . . . . . 9 (𝑧 ∈ ω → ((𝐺𝐴) + (𝐺‘suc 𝑧)) = ((𝐺𝐴) + ((𝐺𝑧) + 1)))
57563ad2ant2 1075 . . . . . . . 8 ((𝐴 ∈ ω ∧ 𝑧 ∈ ω ∧ (𝐺‘(𝐴 +𝑜 𝑧)) = ((𝐺𝐴) + (𝐺𝑧))) → ((𝐺𝐴) + (𝐺‘suc 𝑧)) = ((𝐺𝐴) + ((𝐺𝑧) + 1)))
5852, 54, 573eqtr4d 2650 . . . . . . 7 ((𝐴 ∈ ω ∧ 𝑧 ∈ ω ∧ (𝐺‘(𝐴 +𝑜 𝑧)) = ((𝐺𝐴) + (𝐺𝑧))) → ((𝐺‘(𝐴 +𝑜 𝑧)) + 1) = ((𝐺𝐴) + (𝐺‘suc 𝑧)))
5945, 58eqtrd 2640 . . . . . 6 ((𝐴 ∈ ω ∧ 𝑧 ∈ ω ∧ (𝐺‘(𝐴 +𝑜 𝑧)) = ((𝐺𝐴) + (𝐺𝑧))) → (𝐺‘(𝐴 +𝑜 suc 𝑧)) = ((𝐺𝐴) + (𝐺‘suc 𝑧)))
60593expia 1258 . . . . 5 ((𝐴 ∈ ω ∧ 𝑧 ∈ ω) → ((𝐺‘(𝐴 +𝑜 𝑧)) = ((𝐺𝐴) + (𝐺𝑧)) → (𝐺‘(𝐴 +𝑜 suc 𝑧)) = ((𝐺𝐴) + (𝐺‘suc 𝑧))))
6160expcom 449 . . . 4 (𝑧 ∈ ω → (𝐴 ∈ ω → ((𝐺‘(𝐴 +𝑜 𝑧)) = ((𝐺𝐴) + (𝐺𝑧)) → (𝐺‘(𝐴 +𝑜 suc 𝑧)) = ((𝐺𝐴) + (𝐺‘suc 𝑧)))))
6261a2d 29 . . 3 (𝑧 ∈ ω → ((𝐴 ∈ ω → (𝐺‘(𝐴 +𝑜 𝑧)) = ((𝐺𝐴) + (𝐺𝑧))) → (𝐴 ∈ ω → (𝐺‘(𝐴 +𝑜 suc 𝑧)) = ((𝐺𝐴) + (𝐺‘suc 𝑧)))))
636, 12, 18, 24, 38, 62finds 6958 . 2 (𝐵 ∈ ω → (𝐴 ∈ ω → (𝐺‘(𝐴 +𝑜 𝐵)) = ((𝐺𝐴) + (𝐺𝐵))))
6463impcom 444 1 ((𝐴 ∈ ω ∧ 𝐵 ∈ ω) → (𝐺‘(𝐴 +𝑜 𝐵)) = ((𝐺𝐴) + (𝐺𝐵)))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wa 382  w3a 1030   = wceq 1474  wcel 1976  Vcvv 3169  c0 3870  cmpt 4634  cres 5027  suc csuc 5625  wf 5783  1-1-ontowf1o 5786  cfv 5787  (class class class)co 6524  ωcom 6931  reccrdg 7366   +𝑜 coa 7418  cc 9787  0cc0 9789  1c1 9790   + caddc 9792  0cn0 11136
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1712  ax-4 1727  ax-5 1826  ax-6 1874  ax-7 1921  ax-8 1978  ax-9 1985  ax-10 2005  ax-11 2020  ax-12 2032  ax-13 2229  ax-ext 2586  ax-sep 4700  ax-nul 4709  ax-pow 4761  ax-pr 4825  ax-un 6821  ax-cnex 9845  ax-resscn 9846  ax-1cn 9847  ax-icn 9848  ax-addcl 9849  ax-addrcl 9850  ax-mulcl 9851  ax-mulrcl 9852  ax-mulcom 9853  ax-addass 9854  ax-mulass 9855  ax-distr 9856  ax-i2m1 9857  ax-1ne0 9858  ax-1rid 9859  ax-rnegex 9860  ax-rrecex 9861  ax-cnre 9862  ax-pre-lttri 9863  ax-pre-lttrn 9864  ax-pre-ltadd 9865  ax-pre-mulgt0 9866
This theorem depends on definitions:  df-bi 195  df-or 383  df-an 384  df-3or 1031  df-3an 1032  df-tru 1477  df-ex 1695  df-nf 1700  df-sb 1867  df-eu 2458  df-mo 2459  df-clab 2593  df-cleq 2599  df-clel 2602  df-nfc 2736  df-ne 2778  df-nel 2779  df-ral 2897  df-rex 2898  df-reu 2899  df-rab 2901  df-v 3171  df-sbc 3399  df-csb 3496  df-dif 3539  df-un 3541  df-in 3543  df-ss 3550  df-pss 3552  df-nul 3871  df-if 4033  df-pw 4106  df-sn 4122  df-pr 4124  df-tp 4126  df-op 4128  df-uni 4364  df-iun 4448  df-br 4575  df-opab 4635  df-mpt 4636  df-tr 4672  df-eprel 4936  df-id 4940  df-po 4946  df-so 4947  df-fr 4984  df-we 4986  df-xp 5031  df-rel 5032  df-cnv 5033  df-co 5034  df-dm 5035  df-rn 5036  df-res 5037  df-ima 5038  df-pred 5580  df-ord 5626  df-on 5627  df-lim 5628  df-suc 5629  df-iota 5751  df-fun 5789  df-fn 5790  df-f 5791  df-f1 5792  df-fo 5793  df-f1o 5794  df-fv 5795  df-riota 6486  df-ov 6527  df-oprab 6528  df-mpt2 6529  df-om 6932  df-wrecs 7268  df-recs 7329  df-rdg 7367  df-oadd 7425  df-er 7603  df-en 7816  df-dom 7817  df-sdom 7818  df-pnf 9929  df-mnf 9930  df-xr 9931  df-ltxr 9932  df-le 9933  df-sub 10116  df-neg 10117  df-nn 10865  df-n0 11137  df-z 11208  df-uz 11517
This theorem is referenced by:  hashdom  12978  hashun  12981
  Copyright terms: Public domain W3C validator