Metamath Proof Explorer


Theorem lsws2

Description: The last symbol of a doubleton word is its second symbol. (Contributed by AV, 8-Feb-2021)

Ref Expression
Assertion lsws2 ⊢ B ∈ V → lastS ⁡ ⟨“ AB ”⟩ = B

Proof

Step Hyp Ref Expression
1 s2cli ⊢ ⟨“ AB ”⟩ ∈ Word V
2 lsw ⊢ ⟨“ AB ”⟩ ∈ Word V → lastS ⁡ ⟨“ AB ”⟩ = ⟨“ AB ”⟩ ⁡ ⟨“ AB ”⟩ − 1
3 1 2 mp1i ⊢ B ∈ V → lastS ⁡ ⟨“ AB ”⟩ = ⟨“ AB ”⟩ ⁡ ⟨“ AB ”⟩ − 1
4 s2len ⊢ ⟨“ AB ”⟩ = 2
5 4 oveq1i ⊢ ⟨“ AB ”⟩ − 1 = 2 − 1
6 2m1e1 ⊢ 2 − 1 = 1
7 5 6 eqtri ⊢ ⟨“ AB ”⟩ − 1 = 1
8 7 fveq2i ⊢ ⟨“ AB ”⟩ ⁡ ⟨“ AB ”⟩ − 1 = ⟨“ AB ”⟩ ⁡ 1
9 8 a1i ⊢ B ∈ V → ⟨“ AB ”⟩ ⁡ ⟨“ AB ”⟩ − 1 = ⟨“ AB ”⟩ ⁡ 1
10 s2fv1 ⊢ B ∈ V → ⟨“ AB ”⟩ ⁡ 1 = B
11 3 9 10 3eqtrd ⊢ B ∈ V → lastS ⁡ ⟨“ AB ”⟩ = B