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 ( ( 𝑊 ∈ Word 𝐴𝐹 : 𝐴𝐵 ) → ( ♯ ‘ ( 𝐹𝑊 ) ) = ( ♯ ‘ 𝑊 ) )

Proof

Step Hyp Ref Expression
1 simpr ( ( 𝑊 ∈ Word 𝐴𝐹 : 𝐴𝐵 ) → 𝐹 : 𝐴𝐵 )
2 wrdf ( 𝑊 ∈ Word 𝐴𝑊 : ( 0 ..^ ( ♯ ‘ 𝑊 ) ) ⟶ 𝐴 )
3 2 adantr ( ( 𝑊 ∈ Word 𝐴𝐹 : 𝐴𝐵 ) → 𝑊 : ( 0 ..^ ( ♯ ‘ 𝑊 ) ) ⟶ 𝐴 )
4 fco ( ( 𝐹 : 𝐴𝐵𝑊 : ( 0 ..^ ( ♯ ‘ 𝑊 ) ) ⟶ 𝐴 ) → ( 𝐹𝑊 ) : ( 0 ..^ ( ♯ ‘ 𝑊 ) ) ⟶ 𝐵 )
5 1 3 4 syl2anc ( ( 𝑊 ∈ Word 𝐴𝐹 : 𝐴𝐵 ) → ( 𝐹𝑊 ) : ( 0 ..^ ( ♯ ‘ 𝑊 ) ) ⟶ 𝐵 )
6 ffn ( ( 𝐹𝑊 ) : ( 0 ..^ ( ♯ ‘ 𝑊 ) ) ⟶ 𝐵 → ( 𝐹𝑊 ) Fn ( 0 ..^ ( ♯ ‘ 𝑊 ) ) )
7 hashfn ( ( 𝐹𝑊 ) Fn ( 0 ..^ ( ♯ ‘ 𝑊 ) ) → ( ♯ ‘ ( 𝐹𝑊 ) ) = ( ♯ ‘ ( 0 ..^ ( ♯ ‘ 𝑊 ) ) ) )
8 5 6 7 3syl ( ( 𝑊 ∈ Word 𝐴𝐹 : 𝐴𝐵 ) → ( ♯ ‘ ( 𝐹𝑊 ) ) = ( ♯ ‘ ( 0 ..^ ( ♯ ‘ 𝑊 ) ) ) )
9 ffn ( 𝑊 : ( 0 ..^ ( ♯ ‘ 𝑊 ) ) ⟶ 𝐴𝑊 Fn ( 0 ..^ ( ♯ ‘ 𝑊 ) ) )
10 hashfn ( 𝑊 Fn ( 0 ..^ ( ♯ ‘ 𝑊 ) ) → ( ♯ ‘ 𝑊 ) = ( ♯ ‘ ( 0 ..^ ( ♯ ‘ 𝑊 ) ) ) )
11 3 9 10 3syl ( ( 𝑊 ∈ Word 𝐴𝐹 : 𝐴𝐵 ) → ( ♯ ‘ 𝑊 ) = ( ♯ ‘ ( 0 ..^ ( ♯ ‘ 𝑊 ) ) ) )
12 8 11 eqtr4d ( ( 𝑊 ∈ Word 𝐴𝐹 : 𝐴𝐵 ) → ( ♯ ‘ ( 𝐹𝑊 ) ) = ( ♯ ‘ 𝑊 ) )