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

Theorem hashgadd 11406
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 5908 . . . . . 6  |-  ( n  =  (/)  ->  ( A  +o  n )  =  ( A  +o  (/) ) )
21fveq2d 5567 . . . . 5  |-  ( n  =  (/)  ->  ( G `
 ( A  +o  n ) )  =  ( G `  ( A  +o  (/) ) ) )
3 fveq2 5563 . . . . . 6  |-  ( n  =  (/)  ->  ( G `
 n )  =  ( G `  (/) ) )
43oveq2d 5916 . . . . 5  |-  ( n  =  (/)  ->  ( ( G `  A )  +  ( G `  n ) )  =  ( ( G `  A )  +  ( G `  (/) ) ) )
52, 4eqeq12d 2330 . . . 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 5908 . . . . . 6  |-  ( n  =  z  ->  ( A  +o  n )  =  ( A  +o  z
) )
87fveq2d 5567 . . . . 5  |-  ( n  =  z  ->  ( G `  ( A  +o  n ) )  =  ( G `  ( A  +o  z ) ) )
9 fveq2 5563 . . . . . 6  |-  ( n  =  z  ->  ( G `  n )  =  ( G `  z ) )
109oveq2d 5916 . . . . 5  |-  ( n  =  z  ->  (
( G `  A
)  +  ( G `
 n ) )  =  ( ( G `
 A )  +  ( G `  z
) ) )
118, 10eqeq12d 2330 . . . 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 5908 . . . . . 6  |-  ( n  =  suc  z  -> 
( A  +o  n
)  =  ( A  +o  suc  z ) )
1413fveq2d 5567 . . . . 5  |-  ( n  =  suc  z  -> 
( G `  ( A  +o  n ) )  =  ( G `  ( A  +o  suc  z
) ) )
15 fveq2 5563 . . . . . 6  |-  ( n  =  suc  z  -> 
( G `  n
)  =  ( G `
 suc  z )
)
1615oveq2d 5916 . . . . 5  |-  ( n  =  suc  z  -> 
( ( G `  A )  +  ( G `  n ) )  =  ( ( G `  A )  +  ( G `  suc  z ) ) )
1714, 16eqeq12d 2330 . . . 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 5908 . . . . . 6  |-  ( n  =  B  ->  ( A  +o  n )  =  ( A  +o  B
) )
2019fveq2d 5567 . . . . 5  |-  ( n  =  B  ->  ( G `  ( A  +o  n ) )  =  ( G `  ( A  +o  B ) ) )
21 fveq2 5563 . . . . . 6  |-  ( n  =  B  ->  ( G `  n )  =  ( G `  B ) )
2221oveq2d 5916 . . . . 5  |-  ( n  =  B  ->  (
( G `  A
)  +  ( G `
 n ) )  =  ( ( G `
 A )  +  ( G `  B
) ) )
2320, 22eqeq12d 2330 . . . 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 11080 . . . . . . . 8  |-  G : om
-1-1-onto-> NN0
27 f1of 5510 . . . . . . . 8  |-  ( G : om -1-1-onto-> NN0  ->  G : om
--> NN0 )
2826, 27ax-mp 8 . . . . . . 7  |-  G : om
--> NN0
2928ffvelrni 5702 . . . . . 6  |-  ( A  e.  om  ->  ( G `  A )  e.  NN0 )
3029nn0cnd 10067 . . . . 5  |-  ( A  e.  om  ->  ( G `  A )  e.  CC )
3130addid1d 9057 . . . 4  |-  ( A  e.  om  ->  (
( G `  A
)  +  0 )  =  ( G `  A ) )
32 0z 10082 . . . . . . 7  |-  0  e.  ZZ
3332, 25om2uz0i 11057 . . . . . 6  |-  ( G `
 (/) )  =  0
3433oveq2i 5911 . . . . 5  |-  ( ( G `  A )  +  ( G `  (/) ) )  =  ( ( G `  A
)  +  0 )
3534a1i 10 . . . 4  |-  ( A  e.  om  ->  (
( G `  A
)  +  ( G `
 (/) ) )  =  ( ( G `  A )  +  0 ) )
36 nna0 6644 . . . . 5  |-  ( A  e.  om  ->  ( A  +o  (/) )  =  A )
3736fveq2d 5567 . . . 4  |-  ( A  e.  om  ->  ( G `  ( A  +o  (/) ) )  =  ( G `  A
) )
3831, 35, 373eqtr4rd 2359 . . 3  |-  ( A  e.  om  ->  ( G `  ( A  +o  (/) ) )  =  ( ( G `  A )  +  ( G `  (/) ) ) )
39 nnasuc 6646 . . . . . . . . . 10  |-  ( ( A  e.  om  /\  z  e.  om )  ->  ( A  +o  suc  z )  =  suc  ( A  +o  z
) )
4039fveq2d 5567 . . . . . . . . 9  |-  ( ( A  e.  om  /\  z  e.  om )  ->  ( G `  ( A  +o  suc  z ) )  =  ( G `
 suc  ( A  +o  z ) ) )
41 nnacl 6651 . . . . . . . . . 10  |-  ( ( A  e.  om  /\  z  e.  om )  ->  ( A  +o  z
)  e.  om )
4232, 25om2uzsuci 11058 . . . . . . . . . 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 2348 . . . . . . . 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 5702 . . . . . . . . . . 11  |-  ( z  e.  om  ->  ( G `  z )  e.  NN0 )
4746nn0cnd 10067 . . . . . . . . . 10  |-  ( z  e.  om  ->  ( G `  z )  e.  CC )
48 ax-1cn 8840 . . . . . . . . . . 11  |-  1  e.  CC
49 addass 8869 . . . . . . . . . . 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 5907 . . . . . . . . 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 11058 . . . . . . . . . 10  |-  ( z  e.  om  ->  ( G `  suc  z )  =  ( ( G `
 z )  +  1 ) )
5655oveq2d 5916 . . . . . . . . 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 2358 . . . . . . 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 2348 . . . . . 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 4719 . 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 1633    e. wcel 1701   _Vcvv 2822   (/)c0 3489    e. cmpt 4114   suc csuc 4431   omcom 4693    |` cres 4728   -->wf 5288   -1-1-onto->wf1o 5291   ` cfv 5292  (class class class)co 5900   reccrdg 6464    +o coa 6518   CCcc 8780   0cc0 8782   1c1 8783    + caddc 8785   NN0cn0 10012
This theorem is referenced by:  hashdom  11408  hashun  11411
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1537  ax-5 1548  ax-17 1607  ax-9 1645  ax-8 1666  ax-13 1703  ax-14 1705  ax-6 1720  ax-7 1725  ax-11 1732  ax-12 1897  ax-ext 2297  ax-sep 4178  ax-nul 4186  ax-pow 4225  ax-pr 4251  ax-un 4549  ax-cnex 8838  ax-resscn 8839  ax-1cn 8840  ax-icn 8841  ax-addcl 8842  ax-addrcl 8843  ax-mulcl 8844  ax-mulrcl 8845  ax-mulcom 8846  ax-addass 8847  ax-mulass 8848  ax-distr 8849  ax-i2m1 8850  ax-1ne0 8851  ax-1rid 8852  ax-rnegex 8853  ax-rrecex 8854  ax-cnre 8855  ax-pre-lttri 8856  ax-pre-lttrn 8857  ax-pre-ltadd 8858  ax-pre-mulgt0 8859
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 1533  df-nf 1536  df-sb 1640  df-eu 2180  df-mo 2181  df-clab 2303  df-cleq 2309  df-clel 2312  df-nfc 2441  df-ne 2481  df-nel 2482  df-ral 2582  df-rex 2583  df-reu 2584  df-rab 2586  df-v 2824  df-sbc 3026  df-csb 3116  df-dif 3189  df-un 3191  df-in 3193  df-ss 3200  df-pss 3202  df-nul 3490  df-if 3600  df-pw 3661  df-sn 3680  df-pr 3681  df-tp 3682  df-op 3683  df-uni 3865  df-iun 3944  df-br 4061  df-opab 4115  df-mpt 4116  df-tr 4151  df-eprel 4342  df-id 4346  df-po 4351  df-so 4352  df-fr 4389  df-we 4391  df-ord 4432  df-on 4433  df-lim 4434  df-suc 4435  df-om 4694  df-xp 4732  df-rel 4733  df-cnv 4734  df-co 4735  df-dm 4736  df-rn 4737  df-res 4738  df-ima 4739  df-iota 5256  df-fun 5294  df-fn 5295  df-f 5296  df-f1 5297  df-fo 5298  df-f1o 5299  df-fv 5300  df-ov 5903  df-oprab 5904  df-mpt2 5905  df-riota 6346  df-recs 6430  df-rdg 6465  df-oadd 6525  df-er 6702  df-en 6907  df-dom 6908  df-sdom 6909  df-pnf 8914  df-mnf 8915  df-xr 8916  df-ltxr 8917  df-le 8918  df-sub 9084  df-neg 9085  df-nn 9792  df-n0 10013  df-z 10072  df-uz 10278
  Copyright terms: Public domain W3C validator