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

Theorem hashgadd 13726
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 ((𝐴 ∈ ω ∧ 𝐵 ∈ ω) → (𝐺‘(𝐴 +o 𝐵)) = ((𝐺𝐴) + (𝐺𝐵)))

Proof of Theorem hashgadd
Dummy variables 𝑛 𝑧 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 oveq2 7153 . . . . . 6 (𝑛 = ∅ → (𝐴 +o 𝑛) = (𝐴 +o ∅))
21fveq2d 6667 . . . . 5 (𝑛 = ∅ → (𝐺‘(𝐴 +o 𝑛)) = (𝐺‘(𝐴 +o ∅)))
3 fveq2 6663 . . . . . 6 (𝑛 = ∅ → (𝐺𝑛) = (𝐺‘∅))
43oveq2d 7161 . . . . 5 (𝑛 = ∅ → ((𝐺𝐴) + (𝐺𝑛)) = ((𝐺𝐴) + (𝐺‘∅)))
52, 4eqeq12d 2834 . . . 4 (𝑛 = ∅ → ((𝐺‘(𝐴 +o 𝑛)) = ((𝐺𝐴) + (𝐺𝑛)) ↔ (𝐺‘(𝐴 +o ∅)) = ((𝐺𝐴) + (𝐺‘∅))))
65imbi2d 342 . . 3 (𝑛 = ∅ → ((𝐴 ∈ ω → (𝐺‘(𝐴 +o 𝑛)) = ((𝐺𝐴) + (𝐺𝑛))) ↔ (𝐴 ∈ ω → (𝐺‘(𝐴 +o ∅)) = ((𝐺𝐴) + (𝐺‘∅)))))
7 oveq2 7153 . . . . . 6 (𝑛 = 𝑧 → (𝐴 +o 𝑛) = (𝐴 +o 𝑧))
87fveq2d 6667 . . . . 5 (𝑛 = 𝑧 → (𝐺‘(𝐴 +o 𝑛)) = (𝐺‘(𝐴 +o 𝑧)))
9 fveq2 6663 . . . . . 6 (𝑛 = 𝑧 → (𝐺𝑛) = (𝐺𝑧))
109oveq2d 7161 . . . . 5 (𝑛 = 𝑧 → ((𝐺𝐴) + (𝐺𝑛)) = ((𝐺𝐴) + (𝐺𝑧)))
118, 10eqeq12d 2834 . . . 4 (𝑛 = 𝑧 → ((𝐺‘(𝐴 +o 𝑛)) = ((𝐺𝐴) + (𝐺𝑛)) ↔ (𝐺‘(𝐴 +o 𝑧)) = ((𝐺𝐴) + (𝐺𝑧))))
1211imbi2d 342 . . 3 (𝑛 = 𝑧 → ((𝐴 ∈ ω → (𝐺‘(𝐴 +o 𝑛)) = ((𝐺𝐴) + (𝐺𝑛))) ↔ (𝐴 ∈ ω → (𝐺‘(𝐴 +o 𝑧)) = ((𝐺𝐴) + (𝐺𝑧)))))
13 oveq2 7153 . . . . . 6 (𝑛 = suc 𝑧 → (𝐴 +o 𝑛) = (𝐴 +o suc 𝑧))
1413fveq2d 6667 . . . . 5 (𝑛 = suc 𝑧 → (𝐺‘(𝐴 +o 𝑛)) = (𝐺‘(𝐴 +o suc 𝑧)))
15 fveq2 6663 . . . . . 6 (𝑛 = suc 𝑧 → (𝐺𝑛) = (𝐺‘suc 𝑧))
1615oveq2d 7161 . . . . 5 (𝑛 = suc 𝑧 → ((𝐺𝐴) + (𝐺𝑛)) = ((𝐺𝐴) + (𝐺‘suc 𝑧)))
1714, 16eqeq12d 2834 . . . 4 (𝑛 = suc 𝑧 → ((𝐺‘(𝐴 +o 𝑛)) = ((𝐺𝐴) + (𝐺𝑛)) ↔ (𝐺‘(𝐴 +o suc 𝑧)) = ((𝐺𝐴) + (𝐺‘suc 𝑧))))
1817imbi2d 342 . . 3 (𝑛 = suc 𝑧 → ((𝐴 ∈ ω → (𝐺‘(𝐴 +o 𝑛)) = ((𝐺𝐴) + (𝐺𝑛))) ↔ (𝐴 ∈ ω → (𝐺‘(𝐴 +o suc 𝑧)) = ((𝐺𝐴) + (𝐺‘suc 𝑧)))))
19 oveq2 7153 . . . . . 6 (𝑛 = 𝐵 → (𝐴 +o 𝑛) = (𝐴 +o 𝐵))
2019fveq2d 6667 . . . . 5 (𝑛 = 𝐵 → (𝐺‘(𝐴 +o 𝑛)) = (𝐺‘(𝐴 +o 𝐵)))
21 fveq2 6663 . . . . . 6 (𝑛 = 𝐵 → (𝐺𝑛) = (𝐺𝐵))
2221oveq2d 7161 . . . . 5 (𝑛 = 𝐵 → ((𝐺𝐴) + (𝐺𝑛)) = ((𝐺𝐴) + (𝐺𝐵)))
2320, 22eqeq12d 2834 . . . 4 (𝑛 = 𝐵 → ((𝐺‘(𝐴 +o 𝑛)) = ((𝐺𝐴) + (𝐺𝑛)) ↔ (𝐺‘(𝐴 +o 𝐵)) = ((𝐺𝐴) + (𝐺𝐵))))
2423imbi2d 342 . . 3 (𝑛 = 𝐵 → ((𝐴 ∈ ω → (𝐺‘(𝐴 +o 𝑛)) = ((𝐺𝐴) + (𝐺𝑛))) ↔ (𝐴 ∈ ω → (𝐺‘(𝐴 +o 𝐵)) = ((𝐺𝐴) + (𝐺𝐵)))))
25 hashgadd.1 . . . . . . . . 9 𝐺 = (rec((𝑥 ∈ V ↦ (𝑥 + 1)), 0) ↾ ω)
2625hashgf1o 13327 . . . . . . . 8 𝐺:ω–1-1-onto→ℕ0
27 f1of 6608 . . . . . . . 8 (𝐺:ω–1-1-onto→ℕ0𝐺:ω⟶ℕ0)
2826, 27ax-mp 5 . . . . . . 7 𝐺:ω⟶ℕ0
2928ffvelrni 6842 . . . . . 6 (𝐴 ∈ ω → (𝐺𝐴) ∈ ℕ0)
3029nn0cnd 11945 . . . . 5 (𝐴 ∈ ω → (𝐺𝐴) ∈ ℂ)
3130addid1d 10828 . . . 4 (𝐴 ∈ ω → ((𝐺𝐴) + 0) = (𝐺𝐴))
32 0z 11980 . . . . . . 7 0 ∈ ℤ
3332, 25om2uz0i 13303 . . . . . 6 (𝐺‘∅) = 0
3433oveq2i 7156 . . . . 5 ((𝐺𝐴) + (𝐺‘∅)) = ((𝐺𝐴) + 0)
3534a1i 11 . . . 4 (𝐴 ∈ ω → ((𝐺𝐴) + (𝐺‘∅)) = ((𝐺𝐴) + 0))
36 nna0 8219 . . . . 5 (𝐴 ∈ ω → (𝐴 +o ∅) = 𝐴)
3736fveq2d 6667 . . . 4 (𝐴 ∈ ω → (𝐺‘(𝐴 +o ∅)) = (𝐺𝐴))
3831, 35, 373eqtr4rd 2864 . . 3 (𝐴 ∈ ω → (𝐺‘(𝐴 +o ∅)) = ((𝐺𝐴) + (𝐺‘∅)))
39 nnasuc 8221 . . . . . . . . . 10 ((𝐴 ∈ ω ∧ 𝑧 ∈ ω) → (𝐴 +o suc 𝑧) = suc (𝐴 +o 𝑧))
4039fveq2d 6667 . . . . . . . . 9 ((𝐴 ∈ ω ∧ 𝑧 ∈ ω) → (𝐺‘(𝐴 +o suc 𝑧)) = (𝐺‘suc (𝐴 +o 𝑧)))
41 nnacl 8226 . . . . . . . . . 10 ((𝐴 ∈ ω ∧ 𝑧 ∈ ω) → (𝐴 +o 𝑧) ∈ ω)
4232, 25om2uzsuci 13304 . . . . . . . . . 10 ((𝐴 +o 𝑧) ∈ ω → (𝐺‘suc (𝐴 +o 𝑧)) = ((𝐺‘(𝐴 +o 𝑧)) + 1))
4341, 42syl 17 . . . . . . . . 9 ((𝐴 ∈ ω ∧ 𝑧 ∈ ω) → (𝐺‘suc (𝐴 +o 𝑧)) = ((𝐺‘(𝐴 +o 𝑧)) + 1))
4440, 43eqtrd 2853 . . . . . . . 8 ((𝐴 ∈ ω ∧ 𝑧 ∈ ω) → (𝐺‘(𝐴 +o suc 𝑧)) = ((𝐺‘(𝐴 +o 𝑧)) + 1))
45443adant3 1124 . . . . . . 7 ((𝐴 ∈ ω ∧ 𝑧 ∈ ω ∧ (𝐺‘(𝐴 +o 𝑧)) = ((𝐺𝐴) + (𝐺𝑧))) → (𝐺‘(𝐴 +o suc 𝑧)) = ((𝐺‘(𝐴 +o 𝑧)) + 1))
4628ffvelrni 6842 . . . . . . . . . . 11 (𝑧 ∈ ω → (𝐺𝑧) ∈ ℕ0)
4746nn0cnd 11945 . . . . . . . . . 10 (𝑧 ∈ ω → (𝐺𝑧) ∈ ℂ)
48 ax-1cn 10583 . . . . . . . . . . 11 1 ∈ ℂ
49 addass 10612 . . . . . . . . . . 11 (((𝐺𝐴) ∈ ℂ ∧ (𝐺𝑧) ∈ ℂ ∧ 1 ∈ ℂ) → (((𝐺𝐴) + (𝐺𝑧)) + 1) = ((𝐺𝐴) + ((𝐺𝑧) + 1)))
5048, 49mp3an3 1441 . . . . . . . . . 10 (((𝐺𝐴) ∈ ℂ ∧ (𝐺𝑧) ∈ ℂ) → (((𝐺𝐴) + (𝐺𝑧)) + 1) = ((𝐺𝐴) + ((𝐺𝑧) + 1)))
5130, 47, 50syl2an 595 . . . . . . . . 9 ((𝐴 ∈ ω ∧ 𝑧 ∈ ω) → (((𝐺𝐴) + (𝐺𝑧)) + 1) = ((𝐺𝐴) + ((𝐺𝑧) + 1)))
52513adant3 1124 . . . . . . . 8 ((𝐴 ∈ ω ∧ 𝑧 ∈ ω ∧ (𝐺‘(𝐴 +o 𝑧)) = ((𝐺𝐴) + (𝐺𝑧))) → (((𝐺𝐴) + (𝐺𝑧)) + 1) = ((𝐺𝐴) + ((𝐺𝑧) + 1)))
53 oveq1 7152 . . . . . . . . 9 ((𝐺‘(𝐴 +o 𝑧)) = ((𝐺𝐴) + (𝐺𝑧)) → ((𝐺‘(𝐴 +o 𝑧)) + 1) = (((𝐺𝐴) + (𝐺𝑧)) + 1))
54533ad2ant3 1127 . . . . . . . 8 ((𝐴 ∈ ω ∧ 𝑧 ∈ ω ∧ (𝐺‘(𝐴 +o 𝑧)) = ((𝐺𝐴) + (𝐺𝑧))) → ((𝐺‘(𝐴 +o 𝑧)) + 1) = (((𝐺𝐴) + (𝐺𝑧)) + 1))
5532, 25om2uzsuci 13304 . . . . . . . . . 10 (𝑧 ∈ ω → (𝐺‘suc 𝑧) = ((𝐺𝑧) + 1))
5655oveq2d 7161 . . . . . . . . 9 (𝑧 ∈ ω → ((𝐺𝐴) + (𝐺‘suc 𝑧)) = ((𝐺𝐴) + ((𝐺𝑧) + 1)))
57563ad2ant2 1126 . . . . . . . 8 ((𝐴 ∈ ω ∧ 𝑧 ∈ ω ∧ (𝐺‘(𝐴 +o 𝑧)) = ((𝐺𝐴) + (𝐺𝑧))) → ((𝐺𝐴) + (𝐺‘suc 𝑧)) = ((𝐺𝐴) + ((𝐺𝑧) + 1)))
5852, 54, 573eqtr4d 2863 . . . . . . 7 ((𝐴 ∈ ω ∧ 𝑧 ∈ ω ∧ (𝐺‘(𝐴 +o 𝑧)) = ((𝐺𝐴) + (𝐺𝑧))) → ((𝐺‘(𝐴 +o 𝑧)) + 1) = ((𝐺𝐴) + (𝐺‘suc 𝑧)))
5945, 58eqtrd 2853 . . . . . 6 ((𝐴 ∈ ω ∧ 𝑧 ∈ ω ∧ (𝐺‘(𝐴 +o 𝑧)) = ((𝐺𝐴) + (𝐺𝑧))) → (𝐺‘(𝐴 +o suc 𝑧)) = ((𝐺𝐴) + (𝐺‘suc 𝑧)))
60593expia 1113 . . . . 5 ((𝐴 ∈ ω ∧ 𝑧 ∈ ω) → ((𝐺‘(𝐴 +o 𝑧)) = ((𝐺𝐴) + (𝐺𝑧)) → (𝐺‘(𝐴 +o suc 𝑧)) = ((𝐺𝐴) + (𝐺‘suc 𝑧))))
6160expcom 414 . . . 4 (𝑧 ∈ ω → (𝐴 ∈ ω → ((𝐺‘(𝐴 +o 𝑧)) = ((𝐺𝐴) + (𝐺𝑧)) → (𝐺‘(𝐴 +o suc 𝑧)) = ((𝐺𝐴) + (𝐺‘suc 𝑧)))))
6261a2d 29 . . 3 (𝑧 ∈ ω → ((𝐴 ∈ ω → (𝐺‘(𝐴 +o 𝑧)) = ((𝐺𝐴) + (𝐺𝑧))) → (𝐴 ∈ ω → (𝐺‘(𝐴 +o suc 𝑧)) = ((𝐺𝐴) + (𝐺‘suc 𝑧)))))
636, 12, 18, 24, 38, 62finds 7597 . 2 (𝐵 ∈ ω → (𝐴 ∈ ω → (𝐺‘(𝐴 +o 𝐵)) = ((𝐺𝐴) + (𝐺𝐵))))
6463impcom 408 1 ((𝐴 ∈ ω ∧ 𝐵 ∈ ω) → (𝐺‘(𝐴 +o 𝐵)) = ((𝐺𝐴) + (𝐺𝐵)))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wa 396  w3a 1079   = wceq 1528  wcel 2105  Vcvv 3492  c0 4288  cmpt 5137  cres 5550  suc csuc 6186  wf 6344  1-1-ontowf1o 6347  cfv 6348  (class class class)co 7145  ωcom 7569  reccrdg 8034   +o coa 8088  cc 10523  0cc0 10525  1c1 10526   + caddc 10528  0cn0 11885
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1787  ax-4 1801  ax-5 1902  ax-6 1961  ax-7 2006  ax-8 2107  ax-9 2115  ax-10 2136  ax-11 2151  ax-12 2167  ax-ext 2790  ax-sep 5194  ax-nul 5201  ax-pow 5257  ax-pr 5320  ax-un 7450  ax-cnex 10581  ax-resscn 10582  ax-1cn 10583  ax-icn 10584  ax-addcl 10585  ax-addrcl 10586  ax-mulcl 10587  ax-mulrcl 10588  ax-mulcom 10589  ax-addass 10590  ax-mulass 10591  ax-distr 10592  ax-i2m1 10593  ax-1ne0 10594  ax-1rid 10595  ax-rnegex 10596  ax-rrecex 10597  ax-cnre 10598  ax-pre-lttri 10599  ax-pre-lttrn 10600  ax-pre-ltadd 10601  ax-pre-mulgt0 10602
This theorem depends on definitions:  df-bi 208  df-an 397  df-or 842  df-3or 1080  df-3an 1081  df-tru 1531  df-ex 1772  df-nf 1776  df-sb 2061  df-mo 2615  df-eu 2647  df-clab 2797  df-cleq 2811  df-clel 2890  df-nfc 2960  df-ne 3014  df-nel 3121  df-ral 3140  df-rex 3141  df-reu 3142  df-rab 3144  df-v 3494  df-sbc 3770  df-csb 3881  df-dif 3936  df-un 3938  df-in 3940  df-ss 3949  df-pss 3951  df-nul 4289  df-if 4464  df-pw 4537  df-sn 4558  df-pr 4560  df-tp 4562  df-op 4564  df-uni 4831  df-iun 4912  df-br 5058  df-opab 5120  df-mpt 5138  df-tr 5164  df-id 5453  df-eprel 5458  df-po 5467  df-so 5468  df-fr 5507  df-we 5509  df-xp 5554  df-rel 5555  df-cnv 5556  df-co 5557  df-dm 5558  df-rn 5559  df-res 5560  df-ima 5561  df-pred 6141  df-ord 6187  df-on 6188  df-lim 6189  df-suc 6190  df-iota 6307  df-fun 6350  df-fn 6351  df-f 6352  df-f1 6353  df-fo 6354  df-f1o 6355  df-fv 6356  df-riota 7103  df-ov 7148  df-oprab 7149  df-mpo 7150  df-om 7570  df-wrecs 7936  df-recs 7997  df-rdg 8035  df-oadd 8095  df-er 8278  df-en 8498  df-dom 8499  df-sdom 8500  df-pnf 10665  df-mnf 10666  df-xr 10667  df-ltxr 10668  df-le 10669  df-sub 10860  df-neg 10861  df-nn 11627  df-n0 11886  df-z 11970  df-uz 12232
This theorem is referenced by:  hashdom  13728  hashun  13731
  Copyright terms: Public domain W3C validator