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

Theorem hashgadd 11653
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 6091 . . . . . 6  |-  ( n  =  (/)  ->  ( A  +o  n )  =  ( A  +o  (/) ) )
21fveq2d 5734 . . . . 5  |-  ( n  =  (/)  ->  ( G `
 ( A  +o  n ) )  =  ( G `  ( A  +o  (/) ) ) )
3 fveq2 5730 . . . . . 6  |-  ( n  =  (/)  ->  ( G `
 n )  =  ( G `  (/) ) )
43oveq2d 6099 . . . . 5  |-  ( n  =  (/)  ->  ( ( G `  A )  +  ( G `  n ) )  =  ( ( G `  A )  +  ( G `  (/) ) ) )
52, 4eqeq12d 2452 . . . 4  |-  ( n  =  (/)  ->  ( ( G `  ( A  +o  n ) )  =  ( ( G `
 A )  +  ( G `  n
) )  <->  ( G `  ( A  +o  (/) ) )  =  ( ( G `
 A )  +  ( G `  (/) ) ) ) )
65imbi2d 309 . . 3  |-  ( n  =  (/)  ->  ( ( A  e.  om  ->  ( G `  ( A  +o  n ) )  =  ( ( G `
 A )  +  ( G `  n
) ) )  <->  ( A  e.  om  ->  ( G `  ( A  +o  (/) ) )  =  ( ( G `
 A )  +  ( G `  (/) ) ) ) ) )
7 oveq2 6091 . . . . . 6  |-  ( n  =  z  ->  ( A  +o  n )  =  ( A  +o  z
) )
87fveq2d 5734 . . . . 5  |-  ( n  =  z  ->  ( G `  ( A  +o  n ) )  =  ( G `  ( A  +o  z ) ) )
9 fveq2 5730 . . . . . 6  |-  ( n  =  z  ->  ( G `  n )  =  ( G `  z ) )
109oveq2d 6099 . . . . 5  |-  ( n  =  z  ->  (
( G `  A
)  +  ( G `
 n ) )  =  ( ( G `
 A )  +  ( G `  z
) ) )
118, 10eqeq12d 2452 . . . 4  |-  ( n  =  z  ->  (
( G `  ( A  +o  n ) )  =  ( ( G `
 A )  +  ( G `  n
) )  <->  ( G `  ( A  +o  z
) )  =  ( ( G `  A
)  +  ( G `
 z ) ) ) )
1211imbi2d 309 . . 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 6091 . . . . . 6  |-  ( n  =  suc  z  -> 
( A  +o  n
)  =  ( A  +o  suc  z ) )
1413fveq2d 5734 . . . . 5  |-  ( n  =  suc  z  -> 
( G `  ( A  +o  n ) )  =  ( G `  ( A  +o  suc  z
) ) )
15 fveq2 5730 . . . . . 6  |-  ( n  =  suc  z  -> 
( G `  n
)  =  ( G `
 suc  z )
)
1615oveq2d 6099 . . . . 5  |-  ( n  =  suc  z  -> 
( ( G `  A )  +  ( G `  n ) )  =  ( ( G `  A )  +  ( G `  suc  z ) ) )
1714, 16eqeq12d 2452 . . . 4  |-  ( n  =  suc  z  -> 
( ( G `  ( A  +o  n
) )  =  ( ( G `  A
)  +  ( G `
 n ) )  <-> 
( G `  ( A  +o  suc  z ) )  =  ( ( G `  A )  +  ( G `  suc  z ) ) ) )
1817imbi2d 309 . . 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 6091 . . . . . 6  |-  ( n  =  B  ->  ( A  +o  n )  =  ( A  +o  B
) )
2019fveq2d 5734 . . . . 5  |-  ( n  =  B  ->  ( G `  ( A  +o  n ) )  =  ( G `  ( A  +o  B ) ) )
21 fveq2 5730 . . . . . 6  |-  ( n  =  B  ->  ( G `  n )  =  ( G `  B ) )
2221oveq2d 6099 . . . . 5  |-  ( n  =  B  ->  (
( G `  A
)  +  ( G `
 n ) )  =  ( ( G `
 A )  +  ( G `  B
) ) )
2320, 22eqeq12d 2452 . . . 4  |-  ( n  =  B  ->  (
( G `  ( A  +o  n ) )  =  ( ( G `
 A )  +  ( G `  n
) )  <->  ( G `  ( A  +o  B
) )  =  ( ( G `  A
)  +  ( G `
 B ) ) ) )
2423imbi2d 309 . . 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 11312 . . . . . . . 8  |-  G : om
-1-1-onto-> NN0
27 f1of 5676 . . . . . . . 8  |-  ( G : om -1-1-onto-> NN0  ->  G : om
--> NN0 )
2826, 27ax-mp 8 . . . . . . 7  |-  G : om
--> NN0
2928ffvelrni 5871 . . . . . 6  |-  ( A  e.  om  ->  ( G `  A )  e.  NN0 )
3029nn0cnd 10278 . . . . 5  |-  ( A  e.  om  ->  ( G `  A )  e.  CC )
3130addid1d 9268 . . . 4  |-  ( A  e.  om  ->  (
( G `  A
)  +  0 )  =  ( G `  A ) )
32 0z 10295 . . . . . . 7  |-  0  e.  ZZ
3332, 25om2uz0i 11289 . . . . . 6  |-  ( G `
 (/) )  =  0
3433oveq2i 6094 . . . . 5  |-  ( ( G `  A )  +  ( G `  (/) ) )  =  ( ( G `  A
)  +  0 )
3534a1i 11 . . . 4  |-  ( A  e.  om  ->  (
( G `  A
)  +  ( G `
 (/) ) )  =  ( ( G `  A )  +  0 ) )
36 nna0 6849 . . . . 5  |-  ( A  e.  om  ->  ( A  +o  (/) )  =  A )
3736fveq2d 5734 . . . 4  |-  ( A  e.  om  ->  ( G `  ( A  +o  (/) ) )  =  ( G `  A
) )
3831, 35, 373eqtr4rd 2481 . . 3  |-  ( A  e.  om  ->  ( G `  ( A  +o  (/) ) )  =  ( ( G `  A )  +  ( G `  (/) ) ) )
39 nnasuc 6851 . . . . . . . . . 10  |-  ( ( A  e.  om  /\  z  e.  om )  ->  ( A  +o  suc  z )  =  suc  ( A  +o  z
) )
4039fveq2d 5734 . . . . . . . . 9  |-  ( ( A  e.  om  /\  z  e.  om )  ->  ( G `  ( A  +o  suc  z ) )  =  ( G `
 suc  ( A  +o  z ) ) )
41 nnacl 6856 . . . . . . . . . 10  |-  ( ( A  e.  om  /\  z  e.  om )  ->  ( A  +o  z
)  e.  om )
4232, 25om2uzsuci 11290 . . . . . . . . . 10  |-  ( ( A  +o  z )  e.  om  ->  ( G `  suc  ( A  +o  z ) )  =  ( ( G `
 ( A  +o  z ) )  +  1 ) )
4341, 42syl 16 . . . . . . . . 9  |-  ( ( A  e.  om  /\  z  e.  om )  ->  ( G `  suc  ( A  +o  z
) )  =  ( ( G `  ( A  +o  z ) )  +  1 ) )
4440, 43eqtrd 2470 . . . . . . . 8  |-  ( ( A  e.  om  /\  z  e.  om )  ->  ( G `  ( A  +o  suc  z ) )  =  ( ( G `  ( A  +o  z ) )  +  1 ) )
45443adant3 978 . . . . . . 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 5871 . . . . . . . . . . 11  |-  ( z  e.  om  ->  ( G `  z )  e.  NN0 )
4746nn0cnd 10278 . . . . . . . . . 10  |-  ( z  e.  om  ->  ( G `  z )  e.  CC )
48 ax-1cn 9050 . . . . . . . . . . 11  |-  1  e.  CC
49 addass 9079 . . . . . . . . . . 11  |-  ( ( ( G `  A
)  e.  CC  /\  ( G `  z )  e.  CC  /\  1  e.  CC )  ->  (
( ( G `  A )  +  ( G `  z ) )  +  1 )  =  ( ( G `
 A )  +  ( ( G `  z )  +  1 ) ) )
5048, 49mp3an3 1269 . . . . . . . . . 10  |-  ( ( ( G `  A
)  e.  CC  /\  ( G `  z )  e.  CC )  -> 
( ( ( G `
 A )  +  ( G `  z
) )  +  1 )  =  ( ( G `  A )  +  ( ( G `
 z )  +  1 ) ) )
5130, 47, 50syl2an 465 . . . . . . . . 9  |-  ( ( A  e.  om  /\  z  e.  om )  ->  ( ( ( G `
 A )  +  ( G `  z
) )  +  1 )  =  ( ( G `  A )  +  ( ( G `
 z )  +  1 ) ) )
52513adant3 978 . . . . . . . 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 6090 . . . . . . . . 9  |-  ( ( G `  ( A  +o  z ) )  =  ( ( G `
 A )  +  ( G `  z
) )  ->  (
( G `  ( A  +o  z ) )  +  1 )  =  ( ( ( G `
 A )  +  ( G `  z
) )  +  1 ) )
54533ad2ant3 981 . . . . . . . 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 11290 . . . . . . . . . 10  |-  ( z  e.  om  ->  ( G `  suc  z )  =  ( ( G `
 z )  +  1 ) )
5655oveq2d 6099 . . . . . . . . 9  |-  ( z  e.  om  ->  (
( G `  A
)  +  ( G `
 suc  z )
)  =  ( ( G `  A )  +  ( ( G `
 z )  +  1 ) ) )
57563ad2ant2 980 . . . . . . . 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 2480 . . . . . . 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 2470 . . . . . 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 1156 . . . . 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 426 . . . 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 25 . . 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 4873 . 2  |-  ( B  e.  om  ->  ( A  e.  om  ->  ( G `  ( A  +o  B ) )  =  ( ( G `
 A )  +  ( G `  B
) ) ) )
6463impcom 421 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 360    /\ w3a 937    = wceq 1653    e. wcel 1726   _Vcvv 2958   (/)c0 3630    e. cmpt 4268   suc csuc 4585   omcom 4847    |` cres 4882   -->wf 5452   -1-1-onto->wf1o 5455   ` cfv 5456  (class class class)co 6083   reccrdg 6669    +o coa 6723   CCcc 8990   0cc0 8992   1c1 8993    + caddc 8995   NN0cn0 10223
This theorem is referenced by:  hashdom  11655  hashun  11658
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1556  ax-5 1567  ax-17 1627  ax-9 1667  ax-8 1688  ax-13 1728  ax-14 1730  ax-6 1745  ax-7 1750  ax-11 1762  ax-12 1951  ax-ext 2419  ax-sep 4332  ax-nul 4340  ax-pow 4379  ax-pr 4405  ax-un 4703  ax-cnex 9048  ax-resscn 9049  ax-1cn 9050  ax-icn 9051  ax-addcl 9052  ax-addrcl 9053  ax-mulcl 9054  ax-mulrcl 9055  ax-mulcom 9056  ax-addass 9057  ax-mulass 9058  ax-distr 9059  ax-i2m1 9060  ax-1ne0 9061  ax-1rid 9062  ax-rnegex 9063  ax-rrecex 9064  ax-cnre 9065  ax-pre-lttri 9066  ax-pre-lttrn 9067  ax-pre-ltadd 9068  ax-pre-mulgt0 9069
This theorem depends on definitions:  df-bi 179  df-or 361  df-an 362  df-3or 938  df-3an 939  df-tru 1329  df-ex 1552  df-nf 1555  df-sb 1660  df-eu 2287  df-mo 2288  df-clab 2425  df-cleq 2431  df-clel 2434  df-nfc 2563  df-ne 2603  df-nel 2604  df-ral 2712  df-rex 2713  df-reu 2714  df-rab 2716  df-v 2960  df-sbc 3164  df-csb 3254  df-dif 3325  df-un 3327  df-in 3329  df-ss 3336  df-pss 3338  df-nul 3631  df-if 3742  df-pw 3803  df-sn 3822  df-pr 3823  df-tp 3824  df-op 3825  df-uni 4018  df-iun 4097  df-br 4215  df-opab 4269  df-mpt 4270  df-tr 4305  df-eprel 4496  df-id 4500  df-po 4505  df-so 4506  df-fr 4543  df-we 4545  df-ord 4586  df-on 4587  df-lim 4588  df-suc 4589  df-om 4848  df-xp 4886  df-rel 4887  df-cnv 4888  df-co 4889  df-dm 4890  df-rn 4891  df-res 4892  df-ima 4893  df-iota 5420  df-fun 5458  df-fn 5459  df-f 5460  df-f1 5461  df-fo 5462  df-f1o 5463  df-fv 5464  df-ov 6086  df-oprab 6087  df-mpt2 6088  df-riota 6551  df-recs 6635  df-rdg 6670  df-oadd 6730  df-er 6907  df-en 7112  df-dom 7113  df-sdom 7114  df-pnf 9124  df-mnf 9125  df-xr 9126  df-ltxr 9127  df-le 9128  df-sub 9295  df-neg 9296  df-nn 10003  df-n0 10224  df-z 10285  df-uz 10491
  Copyright terms: Public domain W3C validator