Metamath Proof Explorer


Theorem seqfn

Description: The sequence builder function is a function. (Contributed by Mario Carneiro, 24-Jun-2013) (Revised by Mario Carneiro, 15-Sep-2013)

Ref Expression
Assertion seqfn
|- ( M e. ZZ -> seq M ( .+ , F ) Fn ( ZZ>= ` M ) )

Proof

Step Hyp Ref Expression
1 seqeq1
 |-  ( M = if ( M e. ZZ , M , 0 ) -> seq M ( .+ , F ) = seq if ( M e. ZZ , M , 0 ) ( .+ , F ) )
2 fveq2
 |-  ( M = if ( M e. ZZ , M , 0 ) -> ( ZZ>= ` M ) = ( ZZ>= ` if ( M e. ZZ , M , 0 ) ) )
3 1 2 fneq12d
 |-  ( M = if ( M e. ZZ , M , 0 ) -> ( seq M ( .+ , F ) Fn ( ZZ>= ` M ) <-> seq if ( M e. ZZ , M , 0 ) ( .+ , F ) Fn ( ZZ>= ` if ( M e. ZZ , M , 0 ) ) ) )
4 0z
 |-  0 e. ZZ
5 4 elimel
 |-  if ( M e. ZZ , M , 0 ) e. ZZ
6 eqid
 |-  ( rec ( ( x e. _V |-> ( x + 1 ) ) , if ( M e. ZZ , M , 0 ) ) |` _om ) = ( rec ( ( x e. _V |-> ( x + 1 ) ) , if ( M e. ZZ , M , 0 ) ) |` _om )
7 fvex
 |-  ( F ` if ( M e. ZZ , M , 0 ) ) e. _V
8 eqid
 |-  ( rec ( ( x e. _V , y e. _V |-> <. ( x + 1 ) , ( x ( z e. _V , w e. _V |-> ( w .+ ( F ` ( z + 1 ) ) ) ) y ) >. ) , <. if ( M e. ZZ , M , 0 ) , ( F ` if ( M e. ZZ , M , 0 ) ) >. ) |` _om ) = ( rec ( ( x e. _V , y e. _V |-> <. ( x + 1 ) , ( x ( z e. _V , w e. _V |-> ( w .+ ( F ` ( z + 1 ) ) ) ) y ) >. ) , <. if ( M e. ZZ , M , 0 ) , ( F ` if ( M e. ZZ , M , 0 ) ) >. ) |` _om )
9 8 seqval
 |-  seq if ( M e. ZZ , M , 0 ) ( .+ , F ) = ran ( rec ( ( x e. _V , y e. _V |-> <. ( x + 1 ) , ( x ( z e. _V , w e. _V |-> ( w .+ ( F ` ( z + 1 ) ) ) ) y ) >. ) , <. if ( M e. ZZ , M , 0 ) , ( F ` if ( M e. ZZ , M , 0 ) ) >. ) |` _om )
10 5 6 7 8 9 uzrdgfni
 |-  seq if ( M e. ZZ , M , 0 ) ( .+ , F ) Fn ( ZZ>= ` if ( M e. ZZ , M , 0 ) )
11 3 10 dedth
 |-  ( M e. ZZ -> seq M ( .+ , F ) Fn ( ZZ>= ` M ) )