Metamath Proof Explorer


Theorem pfxn0

Description: A prefix consisting of at least one symbol is not empty. (Contributed by Alexander van der Vekens, 4-Aug-2018) (Revised by AV, 2-May-2020)

Ref Expression
Assertion pfxn0
|- ( ( W e. Word V /\ L e. NN /\ L <_ ( # ` W ) ) -> ( W prefix L ) =/= (/) )

Proof

Step Hyp Ref Expression
1 lbfzo0
 |-  ( 0 e. ( 0 ..^ L ) <-> L e. NN )
2 ne0i
 |-  ( 0 e. ( 0 ..^ L ) -> ( 0 ..^ L ) =/= (/) )
3 1 2 sylbir
 |-  ( L e. NN -> ( 0 ..^ L ) =/= (/) )
4 3 3ad2ant2
 |-  ( ( W e. Word V /\ L e. NN /\ L <_ ( # ` W ) ) -> ( 0 ..^ L ) =/= (/) )
5 simp1
 |-  ( ( W e. Word V /\ L e. NN /\ L <_ ( # ` W ) ) -> W e. Word V )
6 nnnn0
 |-  ( L e. NN -> L e. NN0 )
7 6 3ad2ant2
 |-  ( ( W e. Word V /\ L e. NN /\ L <_ ( # ` W ) ) -> L e. NN0 )
8 lencl
 |-  ( W e. Word V -> ( # ` W ) e. NN0 )
9 8 3ad2ant1
 |-  ( ( W e. Word V /\ L e. NN /\ L <_ ( # ` W ) ) -> ( # ` W ) e. NN0 )
10 simp3
 |-  ( ( W e. Word V /\ L e. NN /\ L <_ ( # ` W ) ) -> L <_ ( # ` W ) )
11 elfz2nn0
 |-  ( L e. ( 0 ... ( # ` W ) ) <-> ( L e. NN0 /\ ( # ` W ) e. NN0 /\ L <_ ( # ` W ) ) )
12 7 9 10 11 syl3anbrc
 |-  ( ( W e. Word V /\ L e. NN /\ L <_ ( # ` W ) ) -> L e. ( 0 ... ( # ` W ) ) )
13 pfxf
 |-  ( ( W e. Word V /\ L e. ( 0 ... ( # ` W ) ) ) -> ( W prefix L ) : ( 0 ..^ L ) --> V )
14 5 12 13 syl2anc
 |-  ( ( W e. Word V /\ L e. NN /\ L <_ ( # ` W ) ) -> ( W prefix L ) : ( 0 ..^ L ) --> V )
15 f0dom0
 |-  ( ( W prefix L ) : ( 0 ..^ L ) --> V -> ( ( 0 ..^ L ) = (/) <-> ( W prefix L ) = (/) ) )
16 15 bicomd
 |-  ( ( W prefix L ) : ( 0 ..^ L ) --> V -> ( ( W prefix L ) = (/) <-> ( 0 ..^ L ) = (/) ) )
17 14 16 syl
 |-  ( ( W e. Word V /\ L e. NN /\ L <_ ( # ` W ) ) -> ( ( W prefix L ) = (/) <-> ( 0 ..^ L ) = (/) ) )
18 17 necon3bid
 |-  ( ( W e. Word V /\ L e. NN /\ L <_ ( # ` W ) ) -> ( ( W prefix L ) =/= (/) <-> ( 0 ..^ L ) =/= (/) ) )
19 4 18 mpbird
 |-  ( ( W e. Word V /\ L e. NN /\ L <_ ( # ` W ) ) -> ( W prefix L ) =/= (/) )