Metamath Proof Explorer


Theorem lenco

Description: Length of a mapped word is unchanged. (Contributed by Stefan O'Rear, 27-Aug-2015)

Ref Expression
Assertion lenco
|- ( ( W e. Word A /\ F : A --> B ) -> ( # ` ( F o. W ) ) = ( # ` W ) )

Proof

Step Hyp Ref Expression
1 simpr
 |-  ( ( W e. Word A /\ F : A --> B ) -> F : A --> B )
2 wrdf
 |-  ( W e. Word A -> W : ( 0 ..^ ( # ` W ) ) --> A )
3 2 adantr
 |-  ( ( W e. Word A /\ F : A --> B ) -> W : ( 0 ..^ ( # ` W ) ) --> A )
4 fco
 |-  ( ( F : A --> B /\ W : ( 0 ..^ ( # ` W ) ) --> A ) -> ( F o. W ) : ( 0 ..^ ( # ` W ) ) --> B )
5 1 3 4 syl2anc
 |-  ( ( W e. Word A /\ F : A --> B ) -> ( F o. W ) : ( 0 ..^ ( # ` W ) ) --> B )
6 ffn
 |-  ( ( F o. W ) : ( 0 ..^ ( # ` W ) ) --> B -> ( F o. W ) Fn ( 0 ..^ ( # ` W ) ) )
7 hashfn
 |-  ( ( F o. W ) Fn ( 0 ..^ ( # ` W ) ) -> ( # ` ( F o. W ) ) = ( # ` ( 0 ..^ ( # ` W ) ) ) )
8 5 6 7 3syl
 |-  ( ( W e. Word A /\ F : A --> B ) -> ( # ` ( F o. W ) ) = ( # ` ( 0 ..^ ( # ` W ) ) ) )
9 ffn
 |-  ( W : ( 0 ..^ ( # ` W ) ) --> A -> W Fn ( 0 ..^ ( # ` W ) ) )
10 hashfn
 |-  ( W Fn ( 0 ..^ ( # ` W ) ) -> ( # ` W ) = ( # ` ( 0 ..^ ( # ` W ) ) ) )
11 3 9 10 3syl
 |-  ( ( W e. Word A /\ F : A --> B ) -> ( # ` W ) = ( # ` ( 0 ..^ ( # ` W ) ) ) )
12 8 11 eqtr4d
 |-  ( ( W e. Word A /\ F : A --> B ) -> ( # ` ( F o. W ) ) = ( # ` W ) )