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

Theorem hashgadd 11359
Description:  G 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  |-  G  =  ( rec ( ( x  e.  _V  |->  ( x  +  1 ) ) ,  0 )  |`  om )
Assertion
Ref Expression
hashgadd  |-  ( ( A  e.  om  /\  B  e.  om )  ->  ( G `  ( A  +o  B ) )  =  ( ( G `
 A )  +  ( G `  B
) ) )

Proof of Theorem hashgadd
Dummy variables  n  z are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 oveq2 5866 . . . . . 6  |-  ( n  =  (/)  ->  ( A  +o  n )  =  ( A  +o  (/) ) )
21fveq2d 5529 . . . . 5  |-  ( n  =  (/)  ->  ( G `
 ( A  +o  n ) )  =  ( G `  ( A  +o  (/) ) ) )
3 fveq2 5525 . . . . . 6  |-  ( n  =  (/)  ->  ( G `
 n )  =  ( G `  (/) ) )
43oveq2d 5874 . . . . 5  |-  ( n  =  (/)  ->  ( ( G `  A )  +  ( G `  n ) )  =  ( ( G `  A )  +  ( G `  (/) ) ) )
52, 4eqeq12d 2297 . . . 4  |-  ( n  =  (/)  ->  ( ( G `  ( A  +o  n ) )  =  ( ( G `
 A )  +  ( G `  n
) )  <->  ( G `  ( A  +o  (/) ) )  =  ( ( G `
 A )  +  ( G `  (/) ) ) ) )
65imbi2d 307 . . 3  |-  ( n  =  (/)  ->  ( ( A  e.  om  ->  ( G `  ( A  +o  n ) )  =  ( ( G `
 A )  +  ( G `  n
) ) )  <->  ( A  e.  om  ->  ( G `  ( A  +o  (/) ) )  =  ( ( G `
 A )  +  ( G `  (/) ) ) ) ) )
7 oveq2 5866 . . . . . 6  |-  ( n  =  z  ->  ( A  +o  n )  =  ( A  +o  z
) )
87fveq2d 5529 . . . . 5  |-  ( n  =  z  ->  ( G `  ( A  +o  n ) )  =  ( G `  ( A  +o  z ) ) )
9 fveq2 5525 . . . . . 6  |-  ( n  =  z  ->  ( G `  n )  =  ( G `  z ) )
109oveq2d 5874 . . . . 5  |-  ( n  =  z  ->  (
( G `  A
)  +  ( G `
 n ) )  =  ( ( G `
 A )  +  ( G `  z
) ) )
118, 10eqeq12d 2297 . . . 4  |-  ( n  =  z  ->  (
( G `  ( A  +o  n ) )  =  ( ( G `
 A )  +  ( G `  n
) )  <->  ( G `  ( A  +o  z
) )  =  ( ( G `  A
)  +  ( G `
 z ) ) ) )
1211imbi2d 307 . . 3  |-  ( n  =  z  ->  (
( A  e.  om  ->  ( G `  ( A  +o  n ) )  =  ( ( G `
 A )  +  ( G `  n
) ) )  <->  ( A  e.  om  ->  ( G `  ( A  +o  z
) )  =  ( ( G `  A
)  +  ( G `
 z ) ) ) ) )
13 oveq2 5866 . . . . . 6  |-  ( n  =  suc  z  -> 
( A  +o  n
)  =  ( A  +o  suc  z ) )
1413fveq2d 5529 . . . . 5  |-  ( n  =  suc  z  -> 
( G `  ( A  +o  n ) )  =  ( G `  ( A  +o  suc  z
) ) )
15 fveq2 5525 . . . . . 6  |-  ( n  =  suc  z  -> 
( G `  n
)  =  ( G `
 suc  z )
)
1615oveq2d 5874 . . . . 5  |-  ( n  =  suc  z  -> 
( ( G `  A )  +  ( G `  n ) )  =  ( ( G `  A )  +  ( G `  suc  z ) ) )
1714, 16eqeq12d 2297 . . . 4  |-  ( n  =  suc  z  -> 
( ( G `  ( A  +o  n
) )  =  ( ( G `  A
)  +  ( G `
 n ) )  <-> 
( G `  ( A  +o  suc  z ) )  =  ( ( G `  A )  +  ( G `  suc  z ) ) ) )
1817imbi2d 307 . . 3  |-  ( n  =  suc  z  -> 
( ( A  e. 
om  ->  ( G `  ( A  +o  n
) )  =  ( ( G `  A
)  +  ( G `
 n ) ) )  <->  ( A  e. 
om  ->  ( G `  ( A  +o  suc  z
) )  =  ( ( G `  A
)  +  ( G `
 suc  z )
) ) ) )
19 oveq2 5866 . . . . . 6  |-  ( n  =  B  ->  ( A  +o  n )  =  ( A  +o  B
) )
2019fveq2d 5529 . . . . 5  |-  ( n  =  B  ->  ( G `  ( A  +o  n ) )  =  ( G `  ( A  +o  B ) ) )
21 fveq2 5525 . . . . . 6  |-  ( n  =  B  ->  ( G `  n )  =  ( G `  B ) )
2221oveq2d 5874 . . . . 5  |-  ( n  =  B  ->  (
( G `  A
)  +  ( G `
 n ) )  =  ( ( G `
 A )  +  ( G `  B
) ) )
2320, 22eqeq12d 2297 . . . 4  |-  ( n  =  B  ->  (
( G `  ( A  +o  n ) )  =  ( ( G `
 A )  +  ( G `  n
) )  <->  ( G `  ( A  +o  B
) )  =  ( ( G `  A
)  +  ( G `
 B ) ) ) )
2423imbi2d 307 . . 3  |-  ( n  =  B  ->  (
( A  e.  om  ->  ( G `  ( A  +o  n ) )  =  ( ( G `
 A )  +  ( G `  n
) ) )  <->  ( A  e.  om  ->  ( G `  ( A  +o  B
) )  =  ( ( G `  A
)  +  ( G `
 B ) ) ) ) )
25 hashgadd.1 . . . . . . . . 9  |-  G  =  ( rec ( ( x  e.  _V  |->  ( x  +  1 ) ) ,  0 )  |`  om )
2625hashgf1o 11033 . . . . . . . 8  |-  G : om
-1-1-onto-> NN0
27 f1of 5472 . . . . . . . 8  |-  ( G : om -1-1-onto-> NN0  ->  G : om
--> NN0 )
2826, 27ax-mp 8 . . . . . . 7  |-  G : om
--> NN0
2928ffvelrni 5664 . . . . . 6  |-  ( A  e.  om  ->  ( G `  A )  e.  NN0 )
3029nn0cnd 10020 . . . . 5  |-  ( A  e.  om  ->  ( G `  A )  e.  CC )
3130addid1d 9012 . . . 4  |-  ( A  e.  om  ->  (
( G `  A
)  +  0 )  =  ( G `  A ) )
32 0z 10035 . . . . . . 7  |-  0  e.  ZZ
3332, 25om2uz0i 11010 . . . . . 6  |-  ( G `
 (/) )  =  0
3433oveq2i 5869 . . . . 5  |-  ( ( G `  A )  +  ( G `  (/) ) )  =  ( ( G `  A
)  +  0 )
3534a1i 10 . . . 4  |-  ( A  e.  om  ->  (
( G `  A
)  +  ( G `
 (/) ) )  =  ( ( G `  A )  +  0 ) )
36 nna0 6602 . . . . 5  |-  ( A  e.  om  ->  ( A  +o  (/) )  =  A )
3736fveq2d 5529 . . . 4  |-  ( A  e.  om  ->  ( G `  ( A  +o  (/) ) )  =  ( G `  A
) )
3831, 35, 373eqtr4rd 2326 . . 3  |-  ( A  e.  om  ->  ( G `  ( A  +o  (/) ) )  =  ( ( G `  A )  +  ( G `  (/) ) ) )
39 nnasuc 6604 . . . . . . . . . 10  |-  ( ( A  e.  om  /\  z  e.  om )  ->  ( A  +o  suc  z )  =  suc  ( A  +o  z
) )
4039fveq2d 5529 . . . . . . . . 9  |-  ( ( A  e.  om  /\  z  e.  om )  ->  ( G `  ( A  +o  suc  z ) )  =  ( G `
 suc  ( A  +o  z ) ) )
41 nnacl 6609 . . . . . . . . . 10  |-  ( ( A  e.  om  /\  z  e.  om )  ->  ( A  +o  z
)  e.  om )
4232, 25om2uzsuci 11011 . . . . . . . . . 10  |-  ( ( A  +o  z )  e.  om  ->  ( G `  suc  ( A  +o  z ) )  =  ( ( G `
 ( A  +o  z ) )  +  1 ) )
4341, 42syl 15 . . . . . . . . 9  |-  ( ( A  e.  om  /\  z  e.  om )  ->  ( G `  suc  ( A  +o  z
) )  =  ( ( G `  ( A  +o  z ) )  +  1 ) )
4440, 43eqtrd 2315 . . . . . . . 8  |-  ( ( A  e.  om  /\  z  e.  om )  ->  ( G `  ( A  +o  suc  z ) )  =  ( ( G `  ( A  +o  z ) )  +  1 ) )
45443adant3 975 . . . . . . 7  |-  ( ( A  e.  om  /\  z  e.  om  /\  ( G `  ( A  +o  z ) )  =  ( ( G `  A )  +  ( G `  z ) ) )  ->  ( G `  ( A  +o  suc  z ) )  =  ( ( G `
 ( A  +o  z ) )  +  1 ) )
4628ffvelrni 5664 . . . . . . . . . . 11  |-  ( z  e.  om  ->  ( G `  z )  e.  NN0 )
4746nn0cnd 10020 . . . . . . . . . 10  |-  ( z  e.  om  ->  ( G `  z )  e.  CC )
48 ax-1cn 8795 . . . . . . . . . . 11  |-  1  e.  CC
49 addass 8824 . . . . . . . . . . 11  |-  ( ( ( G `  A
)  e.  CC  /\  ( G `  z )  e.  CC  /\  1  e.  CC )  ->  (
( ( G `  A )  +  ( G `  z ) )  +  1 )  =  ( ( G `
 A )  +  ( ( G `  z )  +  1 ) ) )
5048, 49mp3an3 1266 . . . . . . . . . 10  |-  ( ( ( G `  A
)  e.  CC  /\  ( G `  z )  e.  CC )  -> 
( ( ( G `
 A )  +  ( G `  z
) )  +  1 )  =  ( ( G `  A )  +  ( ( G `
 z )  +  1 ) ) )
5130, 47, 50syl2an 463 . . . . . . . . 9  |-  ( ( A  e.  om  /\  z  e.  om )  ->  ( ( ( G `
 A )  +  ( G `  z
) )  +  1 )  =  ( ( G `  A )  +  ( ( G `
 z )  +  1 ) ) )
52513adant3 975 . . . . . . . 8  |-  ( ( A  e.  om  /\  z  e.  om  /\  ( G `  ( A  +o  z ) )  =  ( ( G `  A )  +  ( G `  z ) ) )  ->  (
( ( G `  A )  +  ( G `  z ) )  +  1 )  =  ( ( G `
 A )  +  ( ( G `  z )  +  1 ) ) )
53 oveq1 5865 . . . . . . . . 9  |-  ( ( G `  ( A  +o  z ) )  =  ( ( G `
 A )  +  ( G `  z
) )  ->  (
( G `  ( A  +o  z ) )  +  1 )  =  ( ( ( G `
 A )  +  ( G `  z
) )  +  1 ) )
54533ad2ant3 978 . . . . . . . 8  |-  ( ( A  e.  om  /\  z  e.  om  /\  ( G `  ( A  +o  z ) )  =  ( ( G `  A )  +  ( G `  z ) ) )  ->  (
( G `  ( A  +o  z ) )  +  1 )  =  ( ( ( G `
 A )  +  ( G `  z
) )  +  1 ) )
5532, 25om2uzsuci 11011 . . . . . . . . . 10  |-  ( z  e.  om  ->  ( G `  suc  z )  =  ( ( G `
 z )  +  1 ) )
5655oveq2d 5874 . . . . . . . . 9  |-  ( z  e.  om  ->  (
( G `  A
)  +  ( G `
 suc  z )
)  =  ( ( G `  A )  +  ( ( G `
 z )  +  1 ) ) )
57563ad2ant2 977 . . . . . . . 8  |-  ( ( A  e.  om  /\  z  e.  om  /\  ( G `  ( A  +o  z ) )  =  ( ( G `  A )  +  ( G `  z ) ) )  ->  (
( G `  A
)  +  ( G `
 suc  z )
)  =  ( ( G `  A )  +  ( ( G `
 z )  +  1 ) ) )
5852, 54, 573eqtr4d 2325 . . . . . . 7  |-  ( ( A  e.  om  /\  z  e.  om  /\  ( G `  ( A  +o  z ) )  =  ( ( G `  A )  +  ( G `  z ) ) )  ->  (
( G `  ( A  +o  z ) )  +  1 )  =  ( ( G `  A )  +  ( G `  suc  z
) ) )
5945, 58eqtrd 2315 . . . . . 6  |-  ( ( A  e.  om  /\  z  e.  om  /\  ( G `  ( A  +o  z ) )  =  ( ( G `  A )  +  ( G `  z ) ) )  ->  ( G `  ( A  +o  suc  z ) )  =  ( ( G `
 A )  +  ( G `  suc  z ) ) )
60593expia 1153 . . . . 5  |-  ( ( A  e.  om  /\  z  e.  om )  ->  ( ( G `  ( A  +o  z
) )  =  ( ( G `  A
)  +  ( G `
 z ) )  ->  ( G `  ( A  +o  suc  z
) )  =  ( ( G `  A
)  +  ( G `
 suc  z )
) ) )
6160expcom 424 . . . 4  |-  ( z  e.  om  ->  ( A  e.  om  ->  ( ( G `  ( A  +o  z ) )  =  ( ( G `
 A )  +  ( G `  z
) )  ->  ( G `  ( A  +o  suc  z ) )  =  ( ( G `
 A )  +  ( G `  suc  z ) ) ) ) )
6261a2d 23 . . 3  |-  ( z  e.  om  ->  (
( A  e.  om  ->  ( G `  ( A  +o  z ) )  =  ( ( G `
 A )  +  ( G `  z
) ) )  -> 
( A  e.  om  ->  ( G `  ( A  +o  suc  z ) )  =  ( ( G `  A )  +  ( G `  suc  z ) ) ) ) )
636, 12, 18, 24, 38, 62finds 4682 . 2  |-  ( B  e.  om  ->  ( A  e.  om  ->  ( G `  ( A  +o  B ) )  =  ( ( G `
 A )  +  ( G `  B
) ) ) )
6463impcom 419 1  |-  ( ( A  e.  om  /\  B  e.  om )  ->  ( G `  ( A  +o  B ) )  =  ( ( G `
 A )  +  ( G `  B
) ) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    /\ wa 358    /\ w3a 934    = wceq 1623    e. wcel 1684   _Vcvv 2788   (/)c0 3455    e. cmpt 4077   suc csuc 4394   omcom 4656    |` cres 4691   -->wf 5251   -1-1-onto->wf1o 5254   ` cfv 5255  (class class class)co 5858   reccrdg 6422    +o coa 6476   CCcc 8735   0cc0 8737   1c1 8738    + caddc 8740   NN0cn0 9965
This theorem is referenced by:  hashdom  11361  hashun  11364
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1533  ax-5 1544  ax-17 1603  ax-9 1635  ax-8 1643  ax-13 1686  ax-14 1688  ax-6 1703  ax-7 1708  ax-11 1715  ax-12 1866  ax-ext 2264  ax-sep 4141  ax-nul 4149  ax-pow 4188  ax-pr 4214  ax-un 4512  ax-cnex 8793  ax-resscn 8794  ax-1cn 8795  ax-icn 8796  ax-addcl 8797  ax-addrcl 8798  ax-mulcl 8799  ax-mulrcl 8800  ax-mulcom 8801  ax-addass 8802  ax-mulass 8803  ax-distr 8804  ax-i2m1 8805  ax-1ne0 8806  ax-1rid 8807  ax-rnegex 8808  ax-rrecex 8809  ax-cnre 8810  ax-pre-lttri 8811  ax-pre-lttrn 8812  ax-pre-ltadd 8813  ax-pre-mulgt0 8814
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3or 935  df-3an 936  df-tru 1310  df-ex 1529  df-nf 1532  df-sb 1630  df-eu 2147  df-mo 2148  df-clab 2270  df-cleq 2276  df-clel 2279  df-nfc 2408  df-ne 2448  df-nel 2449  df-ral 2548  df-rex 2549  df-reu 2550  df-rab 2552  df-v 2790  df-sbc 2992  df-csb 3082  df-dif 3155  df-un 3157  df-in 3159  df-ss 3166  df-pss 3168  df-nul 3456  df-if 3566  df-pw 3627  df-sn 3646  df-pr 3647  df-tp 3648  df-op 3649  df-uni 3828  df-iun 3907  df-br 4024  df-opab 4078  df-mpt 4079  df-tr 4114  df-eprel 4305  df-id 4309  df-po 4314  df-so 4315  df-fr 4352  df-we 4354  df-ord 4395  df-on 4396  df-lim 4397  df-suc 4398  df-om 4657  df-xp 4695  df-rel 4696  df-cnv 4697  df-co 4698  df-dm 4699  df-rn 4700  df-res 4701  df-ima 4702  df-iota 5219  df-fun 5257  df-fn 5258  df-f 5259  df-f1 5260  df-fo 5261  df-f1o 5262  df-fv 5263  df-ov 5861  df-oprab 5862  df-mpt2 5863  df-riota 6304  df-recs 6388  df-rdg 6423  df-oadd 6483  df-er 6660  df-en 6864  df-dom 6865  df-sdom 6866  df-pnf 8869  df-mnf 8870  df-xr 8871  df-ltxr 8872  df-le 8873  df-sub 9039  df-neg 9040  df-nn 9747  df-n0 9966  df-z 10025  df-uz 10231
  Copyright terms: Public domain W3C validator