Metamath Proof Explorer


Definition df-lsw

Description: Extract the last symbol of a word. May be not meaningful for other sets which are not words. The name lastS (as abbreviation of "lastSymbol") is a compromise between usually used names for corresponding functions in computer programs (as last() or lastChar()), the terminology used for words in set.mm ("symbol" instead of "character") and brevity ("lastS" is shorter than "lastChar" and "lastSymbol"). Labels of theorems about last symbols of a word will contain the abbreviation "lsw" (Last Symbol of a Word). (Contributed by Alexander van der Vekens, 18-Mar-2018)

Ref Expression
Assertion df-lsw lastS = ( 𝑤 ∈ V ↦ ( 𝑤 ‘ ( ( ♯ ‘ 𝑤 ) − 1 ) ) )

Detailed syntax breakdown

Step Hyp Ref Expression
0 clsw lastS
1 vw 𝑤
2 cvv V
3 1 cv 𝑤
4 chash
5 3 4 cfv ( ♯ ‘ 𝑤 )
6 cmin
7 c1 1
8 5 7 6 co ( ( ♯ ‘ 𝑤 ) − 1 )
9 8 3 cfv ( 𝑤 ‘ ( ( ♯ ‘ 𝑤 ) − 1 ) )
10 1 2 9 cmpt ( 𝑤 ∈ V ↦ ( 𝑤 ‘ ( ( ♯ ‘ 𝑤 ) − 1 ) ) )
11 0 10 wceq lastS = ( 𝑤 ∈ V ↦ ( 𝑤 ‘ ( ( ♯ ‘ 𝑤 ) − 1 ) ) )