This is an inofficial mirror of http://metamath.tirix.org for personal testing of a visualizer extension only.
Description: Closure of the last symbol: the last symbol of a nonempty word belongs to the alphabet for the word. (Contributed by AV, 2-Aug-2018) (Proof shortened by AV, 29-Apr-2020)
| Ref | Expression | ||
|---|---|---|---|
| Assertion | lswcl | |- ( ( W e. Word V /\ W =/= (/) ) -> ( lastS ` W ) e. V ) |
| Step | Hyp | Ref | Expression |
|---|---|---|---|
| 1 | lsw | |- ( W e. Word V -> ( lastS ` W ) = ( W ` ( ( # ` W ) - 1 ) ) ) |
|
| 2 | 1 | adantr | |- ( ( W e. Word V /\ W =/= (/) ) -> ( lastS ` W ) = ( W ` ( ( # ` W ) - 1 ) ) ) |
| 3 | lennncl | |- ( ( W e. Word V /\ W =/= (/) ) -> ( # ` W ) e. NN ) |
|
| 4 | fzo0end | |- ( ( # ` W ) e. NN -> ( ( # ` W ) - 1 ) e. ( 0 ..^ ( # ` W ) ) ) |
|
| 5 | 3 4 | syl | |- ( ( W e. Word V /\ W =/= (/) ) -> ( ( # ` W ) - 1 ) e. ( 0 ..^ ( # ` W ) ) ) |
| 6 | wrdsymbcl | |- ( ( W e. Word V /\ ( ( # ` W ) - 1 ) e. ( 0 ..^ ( # ` W ) ) ) -> ( W ` ( ( # ` W ) - 1 ) ) e. V ) |
|
| 7 | 5 6 | syldan | |- ( ( W e. Word V /\ W =/= (/) ) -> ( W ` ( ( # ` W ) - 1 ) ) e. V ) |
| 8 | 2 7 | eqeltrd | |- ( ( W e. Word V /\ W =/= (/) ) -> ( lastS ` W ) e. V ) |