Metamath Proof Explorer


Theorem ccat0

Description: The concatenation of two words is empty iff the two words are empty. (Contributed by AV, 4-Mar-2022) (Revised by JJ, 18-Jan-2024)

Ref Expression
Assertion ccat0 SWordATWordBS++T=S=T=

Proof

Step Hyp Ref Expression
1 ccatlen SWordATWordBS++T=S+T
2 1 eqeq1d SWordATWordBS++T=0S+T=0
3 ovex S++TV
4 hasheq0 S++TVS++T=0S++T=
5 3 4 mp1i SWordATWordBS++T=0S++T=
6 lencl SWordAS0
7 nn0re S0S
8 nn0ge0 S00S
9 7 8 jca S0S0S
10 6 9 syl SWordAS0S
11 lencl TWordBT0
12 nn0re T0T
13 nn0ge0 T00T
14 12 13 jca T0T0T
15 11 14 syl TWordBT0T
16 add20 S0ST0TS+T=0S=0T=0
17 10 15 16 syl2an SWordATWordBS+T=0S=0T=0
18 2 5 17 3bitr3d SWordATWordBS++T=S=0T=0
19 hasheq0 SWordAS=0S=
20 hasheq0 TWordBT=0T=
21 19 20 bi2anan9 SWordATWordBS=0T=0S=T=
22 18 21 bitrd SWordATWordBS++T=S=T=