Metamath Proof Explorer


Theorem hashnbusgrnn0

Description: The number of neighbors of a vertex in a finite simple graph is a nonnegative integer. (Contributed by Alexander van der Vekens, 14-Jul-2018) (Revised by AV, 15-Dec-2020)

Ref Expression
Hypothesis hashnbusgrnn0.v
|- V = ( Vtx ` G )
Assertion hashnbusgrnn0
|- ( ( G e. FinUSGraph /\ U e. V ) -> ( # ` ( G NeighbVtx U ) ) e. NN0 )

Proof

Step Hyp Ref Expression
1 hashnbusgrnn0.v
 |-  V = ( Vtx ` G )
2 1 eleq2i
 |-  ( U e. V <-> U e. ( Vtx ` G ) )
3 nbfiusgrfi
 |-  ( ( G e. FinUSGraph /\ U e. ( Vtx ` G ) ) -> ( G NeighbVtx U ) e. Fin )
4 2 3 sylan2b
 |-  ( ( G e. FinUSGraph /\ U e. V ) -> ( G NeighbVtx U ) e. Fin )
5 hashcl
 |-  ( ( G NeighbVtx U ) e. Fin -> ( # ` ( G NeighbVtx U ) ) e. NN0 )
6 4 5 syl
 |-  ( ( G e. FinUSGraph /\ U e. V ) -> ( # ` ( G NeighbVtx U ) ) e. NN0 )