Metamath Proof Explorer


Theorem pfxf

Description: A prefix of a word is a function from a half-open range of nonnegative integers of the same length as the prefix to the set of symbols for the original word. (Contributed by AV, 2-May-2020)

Ref Expression
Assertion pfxf
|- ( ( W e. Word V /\ L e. ( 0 ... ( # ` W ) ) ) -> ( W prefix L ) : ( 0 ..^ L ) --> V )

Proof

Step Hyp Ref Expression
1 pfxmpt
 |-  ( ( W e. Word V /\ L e. ( 0 ... ( # ` W ) ) ) -> ( W prefix L ) = ( x e. ( 0 ..^ L ) |-> ( W ` x ) ) )
2 simpll
 |-  ( ( ( W e. Word V /\ L e. ( 0 ... ( # ` W ) ) ) /\ x e. ( 0 ..^ L ) ) -> W e. Word V )
3 elfzuz3
 |-  ( L e. ( 0 ... ( # ` W ) ) -> ( # ` W ) e. ( ZZ>= ` L ) )
4 3 adantl
 |-  ( ( W e. Word V /\ L e. ( 0 ... ( # ` W ) ) ) -> ( # ` W ) e. ( ZZ>= ` L ) )
5 fzoss2
 |-  ( ( # ` W ) e. ( ZZ>= ` L ) -> ( 0 ..^ L ) C_ ( 0 ..^ ( # ` W ) ) )
6 4 5 syl
 |-  ( ( W e. Word V /\ L e. ( 0 ... ( # ` W ) ) ) -> ( 0 ..^ L ) C_ ( 0 ..^ ( # ` W ) ) )
7 6 sselda
 |-  ( ( ( W e. Word V /\ L e. ( 0 ... ( # ` W ) ) ) /\ x e. ( 0 ..^ L ) ) -> x e. ( 0 ..^ ( # ` W ) ) )
8 wrdsymbcl
 |-  ( ( W e. Word V /\ x e. ( 0 ..^ ( # ` W ) ) ) -> ( W ` x ) e. V )
9 2 7 8 syl2anc
 |-  ( ( ( W e. Word V /\ L e. ( 0 ... ( # ` W ) ) ) /\ x e. ( 0 ..^ L ) ) -> ( W ` x ) e. V )
10 1 9 fmpt3d
 |-  ( ( W e. Word V /\ L e. ( 0 ... ( # ` W ) ) ) -> ( W prefix L ) : ( 0 ..^ L ) --> V )