MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  ccat0 Structured version   Visualization version   GIF version

Theorem ccat0 14532
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.)
Assertion
Ref Expression
ccat0 ((𝑆 ∈ Word 𝐴𝑇 ∈ Word 𝐵) → ((𝑆 ++ 𝑇) = ∅ ↔ (𝑆 = ∅ ∧ 𝑇 = ∅)))

Proof of Theorem ccat0
StepHypRef Expression
1 ccatlen 14531 . . . 4 ((𝑆 ∈ Word 𝐴𝑇 ∈ Word 𝐵) → (♯‘(𝑆 ++ 𝑇)) = ((♯‘𝑆) + (♯‘𝑇)))
21eqeq1d 2732 . . 3 ((𝑆 ∈ Word 𝐴𝑇 ∈ Word 𝐵) → ((♯‘(𝑆 ++ 𝑇)) = 0 ↔ ((♯‘𝑆) + (♯‘𝑇)) = 0))
3 ovex 7446 . . . 4 (𝑆 ++ 𝑇) ∈ V
4 hasheq0 14329 . . . 4 ((𝑆 ++ 𝑇) ∈ V → ((♯‘(𝑆 ++ 𝑇)) = 0 ↔ (𝑆 ++ 𝑇) = ∅))
53, 4mp1i 13 . . 3 ((𝑆 ∈ Word 𝐴𝑇 ∈ Word 𝐵) → ((♯‘(𝑆 ++ 𝑇)) = 0 ↔ (𝑆 ++ 𝑇) = ∅))
6 lencl 14489 . . . . 5 (𝑆 ∈ Word 𝐴 → (♯‘𝑆) ∈ ℕ0)
7 nn0re 12487 . . . . . 6 ((♯‘𝑆) ∈ ℕ0 → (♯‘𝑆) ∈ ℝ)
8 nn0ge0 12503 . . . . . 6 ((♯‘𝑆) ∈ ℕ0 → 0 ≤ (♯‘𝑆))
97, 8jca 510 . . . . 5 ((♯‘𝑆) ∈ ℕ0 → ((♯‘𝑆) ∈ ℝ ∧ 0 ≤ (♯‘𝑆)))
106, 9syl 17 . . . 4 (𝑆 ∈ Word 𝐴 → ((♯‘𝑆) ∈ ℝ ∧ 0 ≤ (♯‘𝑆)))
11 lencl 14489 . . . . 5 (𝑇 ∈ Word 𝐵 → (♯‘𝑇) ∈ ℕ0)
12 nn0re 12487 . . . . . 6 ((♯‘𝑇) ∈ ℕ0 → (♯‘𝑇) ∈ ℝ)
13 nn0ge0 12503 . . . . . 6 ((♯‘𝑇) ∈ ℕ0 → 0 ≤ (♯‘𝑇))
1412, 13jca 510 . . . . 5 ((♯‘𝑇) ∈ ℕ0 → ((♯‘𝑇) ∈ ℝ ∧ 0 ≤ (♯‘𝑇)))
1511, 14syl 17 . . . 4 (𝑇 ∈ Word 𝐵 → ((♯‘𝑇) ∈ ℝ ∧ 0 ≤ (♯‘𝑇)))
16 add20 11732 . . . 4 ((((♯‘𝑆) ∈ ℝ ∧ 0 ≤ (♯‘𝑆)) ∧ ((♯‘𝑇) ∈ ℝ ∧ 0 ≤ (♯‘𝑇))) → (((♯‘𝑆) + (♯‘𝑇)) = 0 ↔ ((♯‘𝑆) = 0 ∧ (♯‘𝑇) = 0)))
1710, 15, 16syl2an 594 . . 3 ((𝑆 ∈ Word 𝐴𝑇 ∈ Word 𝐵) → (((♯‘𝑆) + (♯‘𝑇)) = 0 ↔ ((♯‘𝑆) = 0 ∧ (♯‘𝑇) = 0)))
182, 5, 173bitr3d 308 . 2 ((𝑆 ∈ Word 𝐴𝑇 ∈ Word 𝐵) → ((𝑆 ++ 𝑇) = ∅ ↔ ((♯‘𝑆) = 0 ∧ (♯‘𝑇) = 0)))
19 hasheq0 14329 . . 3 (𝑆 ∈ Word 𝐴 → ((♯‘𝑆) = 0 ↔ 𝑆 = ∅))
20 hasheq0 14329 . . 3 (𝑇 ∈ Word 𝐵 → ((♯‘𝑇) = 0 ↔ 𝑇 = ∅))
2119, 20bi2anan9 635 . 2 ((𝑆 ∈ Word 𝐴𝑇 ∈ Word 𝐵) → (((♯‘𝑆) = 0 ∧ (♯‘𝑇) = 0) ↔ (𝑆 = ∅ ∧ 𝑇 = ∅)))
2218, 21bitrd 278 1 ((𝑆 ∈ Word 𝐴𝑇 ∈ Word 𝐵) → ((𝑆 ++ 𝑇) = ∅ ↔ (𝑆 = ∅ ∧ 𝑇 = ∅)))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 205  wa 394   = wceq 1539  wcel 2104  Vcvv 3472  c0 4323   class class class wbr 5149  cfv 6544  (class class class)co 7413  cr 11113  0cc0 11114   + caddc 11117  cle 11255  0cn0 12478  chash 14296  Word cword 14470   ++ cconcat 14526
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1795  ax-4 1809  ax-5 1911  ax-6 1969  ax-7 2009  ax-8 2106  ax-9 2114  ax-10 2135  ax-11 2152  ax-12 2169  ax-ext 2701  ax-rep 5286  ax-sep 5300  ax-nul 5307  ax-pow 5364  ax-pr 5428  ax-un 7729  ax-cnex 11170  ax-resscn 11171  ax-1cn 11172  ax-icn 11173  ax-addcl 11174  ax-addrcl 11175  ax-mulcl 11176  ax-mulrcl 11177  ax-mulcom 11178  ax-addass 11179  ax-mulass 11180  ax-distr 11181  ax-i2m1 11182  ax-1ne0 11183  ax-1rid 11184  ax-rnegex 11185  ax-rrecex 11186  ax-cnre 11187  ax-pre-lttri 11188  ax-pre-lttrn 11189  ax-pre-ltadd 11190  ax-pre-mulgt0 11191
This theorem depends on definitions:  df-bi 206  df-an 395  df-or 844  df-3or 1086  df-3an 1087  df-tru 1542  df-fal 1552  df-ex 1780  df-nf 1784  df-sb 2066  df-mo 2532  df-eu 2561  df-clab 2708  df-cleq 2722  df-clel 2808  df-nfc 2883  df-ne 2939  df-nel 3045  df-ral 3060  df-rex 3069  df-reu 3375  df-rab 3431  df-v 3474  df-sbc 3779  df-csb 3895  df-dif 3952  df-un 3954  df-in 3956  df-ss 3966  df-pss 3968  df-nul 4324  df-if 4530  df-pw 4605  df-sn 4630  df-pr 4632  df-op 4636  df-uni 4910  df-int 4952  df-iun 5000  df-br 5150  df-opab 5212  df-mpt 5233  df-tr 5267  df-id 5575  df-eprel 5581  df-po 5589  df-so 5590  df-fr 5632  df-we 5634  df-xp 5683  df-rel 5684  df-cnv 5685  df-co 5686  df-dm 5687  df-rn 5688  df-res 5689  df-ima 5690  df-pred 6301  df-ord 6368  df-on 6369  df-lim 6370  df-suc 6371  df-iota 6496  df-fun 6546  df-fn 6547  df-f 6548  df-f1 6549  df-fo 6550  df-f1o 6551  df-fv 6552  df-riota 7369  df-ov 7416  df-oprab 7417  df-mpo 7418  df-om 7860  df-1st 7979  df-2nd 7980  df-frecs 8270  df-wrecs 8301  df-recs 8375  df-rdg 8414  df-1o 8470  df-er 8707  df-en 8944  df-dom 8945  df-sdom 8946  df-fin 8947  df-card 9938  df-pnf 11256  df-mnf 11257  df-xr 11258  df-ltxr 11259  df-le 11260  df-sub 11452  df-neg 11453  df-nn 12219  df-n0 12479  df-z 12565  df-uz 12829  df-fz 13491  df-fzo 13634  df-hash 14297  df-word 14471  df-concat 14527
This theorem is referenced by:  clwwlkccat  29508  clwwlkwwlksb  29572
  Copyright terms: Public domain W3C validator