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

Theorem wrdl3s3 13751
Description: A word of length 3 is a length 3 string. (Contributed by AV, 18-May-2021.)
Assertion
Ref Expression
wrdl3s3 ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = 3) ↔ ∃𝑎𝑉𝑏𝑉𝑐𝑉 𝑊 = ⟨“𝑎𝑏𝑐”⟩)
Distinct variable groups:   𝑉,𝑎,𝑏,𝑐   𝑊,𝑎,𝑏,𝑐

Proof of Theorem wrdl3s3
StepHypRef Expression
1 c0ex 10072 . . . . . . . 8 0 ∈ V
21tpid1 4335 . . . . . . 7 0 ∈ {0, 1, 2}
3 fzo0to3tp 12594 . . . . . . 7 (0..^3) = {0, 1, 2}
42, 3eleqtrri 2729 . . . . . 6 0 ∈ (0..^3)
5 oveq2 6698 . . . . . 6 ((#‘𝑊) = 3 → (0..^(#‘𝑊)) = (0..^3))
64, 5syl5eleqr 2737 . . . . 5 ((#‘𝑊) = 3 → 0 ∈ (0..^(#‘𝑊)))
7 wrdsymbcl 13350 . . . . 5 ((𝑊 ∈ Word 𝑉 ∧ 0 ∈ (0..^(#‘𝑊))) → (𝑊‘0) ∈ 𝑉)
86, 7sylan2 490 . . . 4 ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = 3) → (𝑊‘0) ∈ 𝑉)
9 1ex 10073 . . . . . . . 8 1 ∈ V
109tpid2 4336 . . . . . . 7 1 ∈ {0, 1, 2}
1110, 3eleqtrri 2729 . . . . . 6 1 ∈ (0..^3)
1211, 5syl5eleqr 2737 . . . . 5 ((#‘𝑊) = 3 → 1 ∈ (0..^(#‘𝑊)))
13 wrdsymbcl 13350 . . . . 5 ((𝑊 ∈ Word 𝑉 ∧ 1 ∈ (0..^(#‘𝑊))) → (𝑊‘1) ∈ 𝑉)
1412, 13sylan2 490 . . . 4 ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = 3) → (𝑊‘1) ∈ 𝑉)
15 2ex 11130 . . . . . . . 8 2 ∈ V
1615tpid3 4338 . . . . . . 7 2 ∈ {0, 1, 2}
1716, 3eleqtrri 2729 . . . . . 6 2 ∈ (0..^3)
1817, 5syl5eleqr 2737 . . . . 5 ((#‘𝑊) = 3 → 2 ∈ (0..^(#‘𝑊)))
19 wrdsymbcl 13350 . . . . 5 ((𝑊 ∈ Word 𝑉 ∧ 2 ∈ (0..^(#‘𝑊))) → (𝑊‘2) ∈ 𝑉)
2018, 19sylan2 490 . . . 4 ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = 3) → (𝑊‘2) ∈ 𝑉)
21 simpr 476 . . . . 5 ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = 3) → (#‘𝑊) = 3)
22 eqid 2651 . . . . . 6 (𝑊‘0) = (𝑊‘0)
23 eqid 2651 . . . . . 6 (𝑊‘1) = (𝑊‘1)
24 eqid 2651 . . . . . 6 (𝑊‘2) = (𝑊‘2)
2522, 23, 243pm3.2i 1259 . . . . 5 ((𝑊‘0) = (𝑊‘0) ∧ (𝑊‘1) = (𝑊‘1) ∧ (𝑊‘2) = (𝑊‘2))
2621, 25jctir 560 . . . 4 ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = 3) → ((#‘𝑊) = 3 ∧ ((𝑊‘0) = (𝑊‘0) ∧ (𝑊‘1) = (𝑊‘1) ∧ (𝑊‘2) = (𝑊‘2))))
27 eqeq2 2662 . . . . . . 7 (𝑎 = (𝑊‘0) → ((𝑊‘0) = 𝑎 ↔ (𝑊‘0) = (𝑊‘0)))
28273anbi1d 1443 . . . . . 6 (𝑎 = (𝑊‘0) → (((𝑊‘0) = 𝑎 ∧ (𝑊‘1) = 𝑏 ∧ (𝑊‘2) = 𝑐) ↔ ((𝑊‘0) = (𝑊‘0) ∧ (𝑊‘1) = 𝑏 ∧ (𝑊‘2) = 𝑐)))
2928anbi2d 740 . . . . 5 (𝑎 = (𝑊‘0) → (((#‘𝑊) = 3 ∧ ((𝑊‘0) = 𝑎 ∧ (𝑊‘1) = 𝑏 ∧ (𝑊‘2) = 𝑐)) ↔ ((#‘𝑊) = 3 ∧ ((𝑊‘0) = (𝑊‘0) ∧ (𝑊‘1) = 𝑏 ∧ (𝑊‘2) = 𝑐))))
30 eqeq2 2662 . . . . . . 7 (𝑏 = (𝑊‘1) → ((𝑊‘1) = 𝑏 ↔ (𝑊‘1) = (𝑊‘1)))
31303anbi2d 1444 . . . . . 6 (𝑏 = (𝑊‘1) → (((𝑊‘0) = (𝑊‘0) ∧ (𝑊‘1) = 𝑏 ∧ (𝑊‘2) = 𝑐) ↔ ((𝑊‘0) = (𝑊‘0) ∧ (𝑊‘1) = (𝑊‘1) ∧ (𝑊‘2) = 𝑐)))
3231anbi2d 740 . . . . 5 (𝑏 = (𝑊‘1) → (((#‘𝑊) = 3 ∧ ((𝑊‘0) = (𝑊‘0) ∧ (𝑊‘1) = 𝑏 ∧ (𝑊‘2) = 𝑐)) ↔ ((#‘𝑊) = 3 ∧ ((𝑊‘0) = (𝑊‘0) ∧ (𝑊‘1) = (𝑊‘1) ∧ (𝑊‘2) = 𝑐))))
33 eqeq2 2662 . . . . . . 7 (𝑐 = (𝑊‘2) → ((𝑊‘2) = 𝑐 ↔ (𝑊‘2) = (𝑊‘2)))
34333anbi3d 1445 . . . . . 6 (𝑐 = (𝑊‘2) → (((𝑊‘0) = (𝑊‘0) ∧ (𝑊‘1) = (𝑊‘1) ∧ (𝑊‘2) = 𝑐) ↔ ((𝑊‘0) = (𝑊‘0) ∧ (𝑊‘1) = (𝑊‘1) ∧ (𝑊‘2) = (𝑊‘2))))
3534anbi2d 740 . . . . 5 (𝑐 = (𝑊‘2) → (((#‘𝑊) = 3 ∧ ((𝑊‘0) = (𝑊‘0) ∧ (𝑊‘1) = (𝑊‘1) ∧ (𝑊‘2) = 𝑐)) ↔ ((#‘𝑊) = 3 ∧ ((𝑊‘0) = (𝑊‘0) ∧ (𝑊‘1) = (𝑊‘1) ∧ (𝑊‘2) = (𝑊‘2)))))
3629, 32, 35rspc3ev 3357 . . . 4 ((((𝑊‘0) ∈ 𝑉 ∧ (𝑊‘1) ∈ 𝑉 ∧ (𝑊‘2) ∈ 𝑉) ∧ ((#‘𝑊) = 3 ∧ ((𝑊‘0) = (𝑊‘0) ∧ (𝑊‘1) = (𝑊‘1) ∧ (𝑊‘2) = (𝑊‘2)))) → ∃𝑎𝑉𝑏𝑉𝑐𝑉 ((#‘𝑊) = 3 ∧ ((𝑊‘0) = 𝑎 ∧ (𝑊‘1) = 𝑏 ∧ (𝑊‘2) = 𝑐)))
378, 14, 20, 26, 36syl31anc 1369 . . 3 ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = 3) → ∃𝑎𝑉𝑏𝑉𝑐𝑉 ((#‘𝑊) = 3 ∧ ((𝑊‘0) = 𝑎 ∧ (𝑊‘1) = 𝑏 ∧ (𝑊‘2) = 𝑐)))
38 df-3an 1056 . . . . . . . . 9 ((𝑎𝑉𝑏𝑉𝑐𝑉) ↔ ((𝑎𝑉𝑏𝑉) ∧ 𝑐𝑉))
39 eqwrds3 13750 . . . . . . . . . 10 ((𝑊 ∈ Word 𝑉 ∧ (𝑎𝑉𝑏𝑉𝑐𝑉)) → (𝑊 = ⟨“𝑎𝑏𝑐”⟩ ↔ ((#‘𝑊) = 3 ∧ ((𝑊‘0) = 𝑎 ∧ (𝑊‘1) = 𝑏 ∧ (𝑊‘2) = 𝑐))))
4039ex 449 . . . . . . . . 9 (𝑊 ∈ Word 𝑉 → ((𝑎𝑉𝑏𝑉𝑐𝑉) → (𝑊 = ⟨“𝑎𝑏𝑐”⟩ ↔ ((#‘𝑊) = 3 ∧ ((𝑊‘0) = 𝑎 ∧ (𝑊‘1) = 𝑏 ∧ (𝑊‘2) = 𝑐)))))
4138, 40syl5bir 233 . . . . . . . 8 (𝑊 ∈ Word 𝑉 → (((𝑎𝑉𝑏𝑉) ∧ 𝑐𝑉) → (𝑊 = ⟨“𝑎𝑏𝑐”⟩ ↔ ((#‘𝑊) = 3 ∧ ((𝑊‘0) = 𝑎 ∧ (𝑊‘1) = 𝑏 ∧ (𝑊‘2) = 𝑐)))))
4241expd 451 . . . . . . 7 (𝑊 ∈ Word 𝑉 → ((𝑎𝑉𝑏𝑉) → (𝑐𝑉 → (𝑊 = ⟨“𝑎𝑏𝑐”⟩ ↔ ((#‘𝑊) = 3 ∧ ((𝑊‘0) = 𝑎 ∧ (𝑊‘1) = 𝑏 ∧ (𝑊‘2) = 𝑐))))))
4342adantr 480 . . . . . 6 ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = 3) → ((𝑎𝑉𝑏𝑉) → (𝑐𝑉 → (𝑊 = ⟨“𝑎𝑏𝑐”⟩ ↔ ((#‘𝑊) = 3 ∧ ((𝑊‘0) = 𝑎 ∧ (𝑊‘1) = 𝑏 ∧ (𝑊‘2) = 𝑐))))))
4443imp31 447 . . . . 5 ((((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = 3) ∧ (𝑎𝑉𝑏𝑉)) ∧ 𝑐𝑉) → (𝑊 = ⟨“𝑎𝑏𝑐”⟩ ↔ ((#‘𝑊) = 3 ∧ ((𝑊‘0) = 𝑎 ∧ (𝑊‘1) = 𝑏 ∧ (𝑊‘2) = 𝑐))))
4544rexbidva 3078 . . . 4 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = 3) ∧ (𝑎𝑉𝑏𝑉)) → (∃𝑐𝑉 𝑊 = ⟨“𝑎𝑏𝑐”⟩ ↔ ∃𝑐𝑉 ((#‘𝑊) = 3 ∧ ((𝑊‘0) = 𝑎 ∧ (𝑊‘1) = 𝑏 ∧ (𝑊‘2) = 𝑐))))
46452rexbidva 3085 . . 3 ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = 3) → (∃𝑎𝑉𝑏𝑉𝑐𝑉 𝑊 = ⟨“𝑎𝑏𝑐”⟩ ↔ ∃𝑎𝑉𝑏𝑉𝑐𝑉 ((#‘𝑊) = 3 ∧ ((𝑊‘0) = 𝑎 ∧ (𝑊‘1) = 𝑏 ∧ (𝑊‘2) = 𝑐))))
4737, 46mpbird 247 . 2 ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = 3) → ∃𝑎𝑉𝑏𝑉𝑐𝑉 𝑊 = ⟨“𝑎𝑏𝑐”⟩)
48 s3cl 13670 . . . . . . . 8 ((𝑎𝑉𝑏𝑉𝑐𝑉) → ⟨“𝑎𝑏𝑐”⟩ ∈ Word 𝑉)
4948ad4ant123 1319 . . . . . . 7 ((((𝑎𝑉𝑏𝑉) ∧ 𝑐𝑉) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩) → ⟨“𝑎𝑏𝑐”⟩ ∈ Word 𝑉)
50 s3len 13685 . . . . . . 7 (#‘⟨“𝑎𝑏𝑐”⟩) = 3
5149, 50jctir 560 . . . . . 6 ((((𝑎𝑉𝑏𝑉) ∧ 𝑐𝑉) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩) → (⟨“𝑎𝑏𝑐”⟩ ∈ Word 𝑉 ∧ (#‘⟨“𝑎𝑏𝑐”⟩) = 3))
52 eleq1 2718 . . . . . . . 8 (𝑊 = ⟨“𝑎𝑏𝑐”⟩ → (𝑊 ∈ Word 𝑉 ↔ ⟨“𝑎𝑏𝑐”⟩ ∈ Word 𝑉))
53 fveq2 6229 . . . . . . . . 9 (𝑊 = ⟨“𝑎𝑏𝑐”⟩ → (#‘𝑊) = (#‘⟨“𝑎𝑏𝑐”⟩))
5453eqeq1d 2653 . . . . . . . 8 (𝑊 = ⟨“𝑎𝑏𝑐”⟩ → ((#‘𝑊) = 3 ↔ (#‘⟨“𝑎𝑏𝑐”⟩) = 3))
5552, 54anbi12d 747 . . . . . . 7 (𝑊 = ⟨“𝑎𝑏𝑐”⟩ → ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = 3) ↔ (⟨“𝑎𝑏𝑐”⟩ ∈ Word 𝑉 ∧ (#‘⟨“𝑎𝑏𝑐”⟩) = 3)))
5655adantl 481 . . . . . 6 ((((𝑎𝑉𝑏𝑉) ∧ 𝑐𝑉) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩) → ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = 3) ↔ (⟨“𝑎𝑏𝑐”⟩ ∈ Word 𝑉 ∧ (#‘⟨“𝑎𝑏𝑐”⟩) = 3)))
5751, 56mpbird 247 . . . . 5 ((((𝑎𝑉𝑏𝑉) ∧ 𝑐𝑉) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩) → (𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = 3))
5857ex 449 . . . 4 (((𝑎𝑉𝑏𝑉) ∧ 𝑐𝑉) → (𝑊 = ⟨“𝑎𝑏𝑐”⟩ → (𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = 3)))
5958rexlimdva 3060 . . 3 ((𝑎𝑉𝑏𝑉) → (∃𝑐𝑉 𝑊 = ⟨“𝑎𝑏𝑐”⟩ → (𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = 3)))
6059rexlimivv 3065 . 2 (∃𝑎𝑉𝑏𝑉𝑐𝑉 𝑊 = ⟨“𝑎𝑏𝑐”⟩ → (𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = 3))
6147, 60impbii 199 1 ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = 3) ↔ ∃𝑎𝑉𝑏𝑉𝑐𝑉 𝑊 = ⟨“𝑎𝑏𝑐”⟩)
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 196  wa 383  w3a 1054   = wceq 1523  wcel 2030  wrex 2942  {ctp 4214  cfv 5926  (class class class)co 6690  0cc0 9974  1c1 9975  2c2 11108  3c3 11109  ..^cfzo 12504  #chash 13157  Word cword 13323  ⟨“cs3 13633
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1762  ax-4 1777  ax-5 1879  ax-6 1945  ax-7 1981  ax-8 2032  ax-9 2039  ax-10 2059  ax-11 2074  ax-12 2087  ax-13 2282  ax-ext 2631  ax-rep 4804  ax-sep 4814  ax-nul 4822  ax-pow 4873  ax-pr 4936  ax-un 6991  ax-cnex 10030  ax-resscn 10031  ax-1cn 10032  ax-icn 10033  ax-addcl 10034  ax-addrcl 10035  ax-mulcl 10036  ax-mulrcl 10037  ax-mulcom 10038  ax-addass 10039  ax-mulass 10040  ax-distr 10041  ax-i2m1 10042  ax-1ne0 10043  ax-1rid 10044  ax-rnegex 10045  ax-rrecex 10046  ax-cnre 10047  ax-pre-lttri 10048  ax-pre-lttrn 10049  ax-pre-ltadd 10050  ax-pre-mulgt0 10051
This theorem depends on definitions:  df-bi 197  df-or 384  df-an 385  df-3or 1055  df-3an 1056  df-tru 1526  df-ex 1745  df-nf 1750  df-sb 1938  df-eu 2502  df-mo 2503  df-clab 2638  df-cleq 2644  df-clel 2647  df-nfc 2782  df-ne 2824  df-nel 2927  df-ral 2946  df-rex 2947  df-reu 2948  df-rab 2950  df-v 3233  df-sbc 3469  df-csb 3567  df-dif 3610  df-un 3612  df-in 3614  df-ss 3621  df-pss 3623  df-nul 3949  df-if 4120  df-pw 4193  df-sn 4211  df-pr 4213  df-tp 4215  df-op 4217  df-uni 4469  df-int 4508  df-iun 4554  df-br 4686  df-opab 4746  df-mpt 4763  df-tr 4786  df-id 5053  df-eprel 5058  df-po 5064  df-so 5065  df-fr 5102  df-we 5104  df-xp 5149  df-rel 5150  df-cnv 5151  df-co 5152  df-dm 5153  df-rn 5154  df-res 5155  df-ima 5156  df-pred 5718  df-ord 5764  df-on 5765  df-lim 5766  df-suc 5767  df-iota 5889  df-fun 5928  df-fn 5929  df-f 5930  df-f1 5931  df-fo 5932  df-f1o 5933  df-fv 5934  df-riota 6651  df-ov 6693  df-oprab 6694  df-mpt2 6695  df-om 7108  df-1st 7210  df-2nd 7211  df-wrecs 7452  df-recs 7513  df-rdg 7551  df-1o 7605  df-oadd 7609  df-er 7787  df-en 7998  df-dom 7999  df-sdom 8000  df-fin 8001  df-card 8803  df-pnf 10114  df-mnf 10115  df-xr 10116  df-ltxr 10117  df-le 10118  df-sub 10306  df-neg 10307  df-nn 11059  df-2 11117  df-3 11118  df-n0 11331  df-z 11416  df-uz 11726  df-fz 12365  df-fzo 12505  df-hash 13158  df-word 13331  df-concat 13333  df-s1 13334  df-s2 13639  df-s3 13640
This theorem is referenced by:  elwwlks2s3  26916
  Copyright terms: Public domain W3C validator