Metamath Proof Explorer


Theorem fsumnn0cl

Description: Closure of a finite sum of nonnegative integers. (Contributed by Mario Carneiro, 23-Apr-2015)

Ref Expression
Hypotheses fsumcl.1
|- ( ph -> A e. Fin )
fsumnn0cl.2
|- ( ( ph /\ k e. A ) -> B e. NN0 )
Assertion fsumnn0cl
|- ( ph -> sum_ k e. A B e. NN0 )

Proof

Step Hyp Ref Expression
1 fsumcl.1
 |-  ( ph -> A e. Fin )
2 fsumnn0cl.2
 |-  ( ( ph /\ k e. A ) -> B e. NN0 )
3 nn0sscn
 |-  NN0 C_ CC
4 3 a1i
 |-  ( ph -> NN0 C_ CC )
5 nn0addcl
 |-  ( ( x e. NN0 /\ y e. NN0 ) -> ( x + y ) e. NN0 )
6 5 adantl
 |-  ( ( ph /\ ( x e. NN0 /\ y e. NN0 ) ) -> ( x + y ) e. NN0 )
7 0nn0
 |-  0 e. NN0
8 7 a1i
 |-  ( ph -> 0 e. NN0 )
9 4 6 1 2 8 fsumcllem
 |-  ( ph -> sum_ k e. A B e. NN0 )