Metamath Proof Explorer


Theorem onasuc

Description: Addition with successor. Theorem 4I(A2) of Enderton p. 79. (Note that this version of oasuc does not need Replacement.) (Contributed by Mario Carneiro, 16-Nov-2014)

Ref Expression
Assertion onasuc
|- ( ( A e. On /\ B e. _om ) -> ( A +o suc B ) = suc ( A +o B ) )

Proof

Step Hyp Ref Expression
1 frsuc
 |-  ( B e. _om -> ( ( rec ( ( x e. _V |-> suc x ) , A ) |` _om ) ` suc B ) = ( ( x e. _V |-> suc x ) ` ( ( rec ( ( x e. _V |-> suc x ) , A ) |` _om ) ` B ) ) )
2 1 adantl
 |-  ( ( A e. On /\ B e. _om ) -> ( ( rec ( ( x e. _V |-> suc x ) , A ) |` _om ) ` suc B ) = ( ( x e. _V |-> suc x ) ` ( ( rec ( ( x e. _V |-> suc x ) , A ) |` _om ) ` B ) ) )
3 peano2
 |-  ( B e. _om -> suc B e. _om )
4 3 adantl
 |-  ( ( A e. On /\ B e. _om ) -> suc B e. _om )
5 4 fvresd
 |-  ( ( A e. On /\ B e. _om ) -> ( ( rec ( ( x e. _V |-> suc x ) , A ) |` _om ) ` suc B ) = ( rec ( ( x e. _V |-> suc x ) , A ) ` suc B ) )
6 fvres
 |-  ( B e. _om -> ( ( rec ( ( x e. _V |-> suc x ) , A ) |` _om ) ` B ) = ( rec ( ( x e. _V |-> suc x ) , A ) ` B ) )
7 6 adantl
 |-  ( ( A e. On /\ B e. _om ) -> ( ( rec ( ( x e. _V |-> suc x ) , A ) |` _om ) ` B ) = ( rec ( ( x e. _V |-> suc x ) , A ) ` B ) )
8 7 fveq2d
 |-  ( ( A e. On /\ B e. _om ) -> ( ( x e. _V |-> suc x ) ` ( ( rec ( ( x e. _V |-> suc x ) , A ) |` _om ) ` B ) ) = ( ( x e. _V |-> suc x ) ` ( rec ( ( x e. _V |-> suc x ) , A ) ` B ) ) )
9 2 5 8 3eqtr3d
 |-  ( ( A e. On /\ B e. _om ) -> ( rec ( ( x e. _V |-> suc x ) , A ) ` suc B ) = ( ( x e. _V |-> suc x ) ` ( rec ( ( x e. _V |-> suc x ) , A ) ` B ) ) )
10 nnon
 |-  ( B e. _om -> B e. On )
11 suceloni
 |-  ( B e. On -> suc B e. On )
12 10 11 syl
 |-  ( B e. _om -> suc B e. On )
13 oav
 |-  ( ( A e. On /\ suc B e. On ) -> ( A +o suc B ) = ( rec ( ( x e. _V |-> suc x ) , A ) ` suc B ) )
14 12 13 sylan2
 |-  ( ( A e. On /\ B e. _om ) -> ( A +o suc B ) = ( rec ( ( x e. _V |-> suc x ) , A ) ` suc B ) )
15 ovex
 |-  ( A +o B ) e. _V
16 suceq
 |-  ( x = ( A +o B ) -> suc x = suc ( A +o B ) )
17 eqid
 |-  ( x e. _V |-> suc x ) = ( x e. _V |-> suc x )
18 15 sucex
 |-  suc ( A +o B ) e. _V
19 16 17 18 fvmpt
 |-  ( ( A +o B ) e. _V -> ( ( x e. _V |-> suc x ) ` ( A +o B ) ) = suc ( A +o B ) )
20 15 19 ax-mp
 |-  ( ( x e. _V |-> suc x ) ` ( A +o B ) ) = suc ( A +o B )
21 oav
 |-  ( ( A e. On /\ B e. On ) -> ( A +o B ) = ( rec ( ( x e. _V |-> suc x ) , A ) ` B ) )
22 10 21 sylan2
 |-  ( ( A e. On /\ B e. _om ) -> ( A +o B ) = ( rec ( ( x e. _V |-> suc x ) , A ) ` B ) )
23 22 fveq2d
 |-  ( ( A e. On /\ B e. _om ) -> ( ( x e. _V |-> suc x ) ` ( A +o B ) ) = ( ( x e. _V |-> suc x ) ` ( rec ( ( x e. _V |-> suc x ) , A ) ` B ) ) )
24 20 23 eqtr3id
 |-  ( ( A e. On /\ B e. _om ) -> suc ( A +o B ) = ( ( x e. _V |-> suc x ) ` ( rec ( ( x e. _V |-> suc x ) , A ) ` B ) ) )
25 9 14 24 3eqtr4d
 |-  ( ( A e. On /\ B e. _om ) -> ( A +o suc B ) = suc ( A +o B ) )