Metamath Proof Explorer


Theorem ccats1pfxeqrex

Description: There exists a symbol such that its concatenation after the prefix obtained by deleting the last symbol of a nonempty word results in the word itself. (Contributed by AV, 5-Oct-2018) (Revised by AV, 9-May-2020)

Ref Expression
Assertion ccats1pfxeqrex WWordVUWordVU=W+1W=UprefixWsVU=W++⟨“s”⟩

Proof

Step Hyp Ref Expression
1 simp2 WWordVUWordVU=W+1UWordV
2 lencl WWordVW0
3 2 3ad2ant1 WWordVUWordVU=W+1W0
4 nn0p1nn W0W+1
5 nngt0 W+10<W+1
6 3 4 5 3syl WWordVUWordVU=W+10<W+1
7 breq2 U=W+10<U0<W+1
8 7 3ad2ant3 WWordVUWordVU=W+10<U0<W+1
9 6 8 mpbird WWordVUWordVU=W+10<U
10 hashgt0n0 UWordV0<UU
11 1 9 10 syl2anc WWordVUWordVU=W+1U
12 lswcl UWordVUlastSUV
13 1 11 12 syl2anc WWordVUWordVU=W+1lastSUV
14 ccats1pfxeq WWordVUWordVU=W+1W=UprefixWU=W++⟨“lastSU”⟩
15 s1eq s=lastSU⟨“s”⟩=⟨“lastSU”⟩
16 15 oveq2d s=lastSUW++⟨“s”⟩=W++⟨“lastSU”⟩
17 16 rspceeqv lastSUVU=W++⟨“lastSU”⟩sVU=W++⟨“s”⟩
18 13 14 17 syl6an WWordVUWordVU=W+1W=UprefixWsVU=W++⟨“s”⟩