Metamath Proof Explorer


Theorem wrdeqs1cat

Description: Decompose a nonempty word by separating off the first symbol. (Contributed by Stefan O'Rear, 25-Aug-2015) (Revised by Mario Carneiro, 1-Oct-2015) (Proof shortened by AV, 12-Oct-2022)

Ref Expression
Assertion wrdeqs1cat WWordAWW=⟨“W0”⟩++Wsubstr1W

Proof

Step Hyp Ref Expression
1 simpl WWordAWWWordA
2 wrdfin WWordAWFin
3 1elfz0hash WFinW10W
4 2 3 sylan WWordAW10W
5 lennncl WWordAWW
6 5 nnnn0d WWordAWW0
7 eluzfz2 W0W0W
8 nn0uz 0=0
9 7 8 eleq2s W0W0W
10 6 9 syl WWordAWW0W
11 ccatpfx WWordA10WW0WWprefix1++Wsubstr1W=WprefixW
12 1 4 10 11 syl3anc WWordAWWprefix1++Wsubstr1W=WprefixW
13 pfx1 WWordAWWprefix1=⟨“W0”⟩
14 13 oveq1d WWordAWWprefix1++Wsubstr1W=⟨“W0”⟩++Wsubstr1W
15 pfxid WWordAWprefixW=W
16 15 adantr WWordAWWprefixW=W
17 12 14 16 3eqtr3rd WWordAWW=⟨“W0”⟩++Wsubstr1W