Metamath Proof Explorer


Theorem repswlen

Description: The length of a "repeated symbol word". (Contributed by AV, 4-Nov-2018)

Ref Expression
Assertion repswlen
|- ( ( S e. V /\ N e. NN0 ) -> ( # ` ( S repeatS N ) ) = N )

Proof

Step Hyp Ref Expression
1 repsf
 |-  ( ( S e. V /\ N e. NN0 ) -> ( S repeatS N ) : ( 0 ..^ N ) --> V )
2 ffn
 |-  ( ( S repeatS N ) : ( 0 ..^ N ) --> V -> ( S repeatS N ) Fn ( 0 ..^ N ) )
3 hashfn
 |-  ( ( S repeatS N ) Fn ( 0 ..^ N ) -> ( # ` ( S repeatS N ) ) = ( # ` ( 0 ..^ N ) ) )
4 1 2 3 3syl
 |-  ( ( S e. V /\ N e. NN0 ) -> ( # ` ( S repeatS N ) ) = ( # ` ( 0 ..^ N ) ) )
5 hashfzo0
 |-  ( N e. NN0 -> ( # ` ( 0 ..^ N ) ) = N )
6 5 adantl
 |-  ( ( S e. V /\ N e. NN0 ) -> ( # ` ( 0 ..^ N ) ) = N )
7 4 6 eqtrd
 |-  ( ( S e. V /\ N e. NN0 ) -> ( # ` ( S repeatS N ) ) = N )