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

Theorem wrdl3s3 13647
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 9986 . . . . . . . 8 0 ∈ V
21tpid1 4278 . . . . . . 7 0 ∈ {0, 1, 2}
3 fzo0to3tp 12503 . . . . . . 7 (0..^3) = {0, 1, 2}
42, 3eleqtrri 2697 . . . . . 6 0 ∈ (0..^3)
5 oveq2 6618 . . . . . 6 ((#‘𝑊) = 3 → (0..^(#‘𝑊)) = (0..^3))
64, 5syl5eleqr 2705 . . . . 5 ((#‘𝑊) = 3 → 0 ∈ (0..^(#‘𝑊)))
7 wrdsymbcl 13265 . . . . 5 ((𝑊 ∈ Word 𝑉 ∧ 0 ∈ (0..^(#‘𝑊))) → (𝑊‘0) ∈ 𝑉)
86, 7sylan2 491 . . . 4 ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = 3) → (𝑊‘0) ∈ 𝑉)
9 1ex 9987 . . . . . . . 8 1 ∈ V
109tpid2 4279 . . . . . . 7 1 ∈ {0, 1, 2}
1110, 3eleqtrri 2697 . . . . . 6 1 ∈ (0..^3)
1211, 5syl5eleqr 2705 . . . . 5 ((#‘𝑊) = 3 → 1 ∈ (0..^(#‘𝑊)))
13 wrdsymbcl 13265 . . . . 5 ((𝑊 ∈ Word 𝑉 ∧ 1 ∈ (0..^(#‘𝑊))) → (𝑊‘1) ∈ 𝑉)
1412, 13sylan2 491 . . . 4 ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = 3) → (𝑊‘1) ∈ 𝑉)
15 2ex 11044 . . . . . . . 8 2 ∈ V
1615tpid3 4282 . . . . . . 7 2 ∈ {0, 1, 2}
1716, 3eleqtrri 2697 . . . . . 6 2 ∈ (0..^3)
1817, 5syl5eleqr 2705 . . . . 5 ((#‘𝑊) = 3 → 2 ∈ (0..^(#‘𝑊)))
19 wrdsymbcl 13265 . . . . 5 ((𝑊 ∈ Word 𝑉 ∧ 2 ∈ (0..^(#‘𝑊))) → (𝑊‘2) ∈ 𝑉)
2018, 19sylan2 491 . . . 4 ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = 3) → (𝑊‘2) ∈ 𝑉)
21 simpr 477 . . . . 5 ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = 3) → (#‘𝑊) = 3)
22 eqid 2621 . . . . . 6 (𝑊‘0) = (𝑊‘0)
23 eqid 2621 . . . . . 6 (𝑊‘1) = (𝑊‘1)
24 eqid 2621 . . . . . 6 (𝑊‘2) = (𝑊‘2)
2522, 23, 243pm3.2i 1237 . . . . 5 ((𝑊‘0) = (𝑊‘0) ∧ (𝑊‘1) = (𝑊‘1) ∧ (𝑊‘2) = (𝑊‘2))
2621, 25jctir 560 . . . 4 ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = 3) → ((#‘𝑊) = 3 ∧ ((𝑊‘0) = (𝑊‘0) ∧ (𝑊‘1) = (𝑊‘1) ∧ (𝑊‘2) = (𝑊‘2))))
27 eqeq2 2632 . . . . . . 7 (𝑎 = (𝑊‘0) → ((𝑊‘0) = 𝑎 ↔ (𝑊‘0) = (𝑊‘0)))
28273anbi1d 1400 . . . . . 6 (𝑎 = (𝑊‘0) → (((𝑊‘0) = 𝑎 ∧ (𝑊‘1) = 𝑏 ∧ (𝑊‘2) = 𝑐) ↔ ((𝑊‘0) = (𝑊‘0) ∧ (𝑊‘1) = 𝑏 ∧ (𝑊‘2) = 𝑐)))
2928anbi2d 739 . . . . 5 (𝑎 = (𝑊‘0) → (((#‘𝑊) = 3 ∧ ((𝑊‘0) = 𝑎 ∧ (𝑊‘1) = 𝑏 ∧ (𝑊‘2) = 𝑐)) ↔ ((#‘𝑊) = 3 ∧ ((𝑊‘0) = (𝑊‘0) ∧ (𝑊‘1) = 𝑏 ∧ (𝑊‘2) = 𝑐))))
30 eqeq2 2632 . . . . . . 7 (𝑏 = (𝑊‘1) → ((𝑊‘1) = 𝑏 ↔ (𝑊‘1) = (𝑊‘1)))
31303anbi2d 1401 . . . . . 6 (𝑏 = (𝑊‘1) → (((𝑊‘0) = (𝑊‘0) ∧ (𝑊‘1) = 𝑏 ∧ (𝑊‘2) = 𝑐) ↔ ((𝑊‘0) = (𝑊‘0) ∧ (𝑊‘1) = (𝑊‘1) ∧ (𝑊‘2) = 𝑐)))
3231anbi2d 739 . . . . 5 (𝑏 = (𝑊‘1) → (((#‘𝑊) = 3 ∧ ((𝑊‘0) = (𝑊‘0) ∧ (𝑊‘1) = 𝑏 ∧ (𝑊‘2) = 𝑐)) ↔ ((#‘𝑊) = 3 ∧ ((𝑊‘0) = (𝑊‘0) ∧ (𝑊‘1) = (𝑊‘1) ∧ (𝑊‘2) = 𝑐))))
33 eqeq2 2632 . . . . . . 7 (𝑐 = (𝑊‘2) → ((𝑊‘2) = 𝑐 ↔ (𝑊‘2) = (𝑊‘2)))
34333anbi3d 1402 . . . . . 6 (𝑐 = (𝑊‘2) → (((𝑊‘0) = (𝑊‘0) ∧ (𝑊‘1) = (𝑊‘1) ∧ (𝑊‘2) = 𝑐) ↔ ((𝑊‘0) = (𝑊‘0) ∧ (𝑊‘1) = (𝑊‘1) ∧ (𝑊‘2) = (𝑊‘2))))
3534anbi2d 739 . . . . 5 (𝑐 = (𝑊‘2) → (((#‘𝑊) = 3 ∧ ((𝑊‘0) = (𝑊‘0) ∧ (𝑊‘1) = (𝑊‘1) ∧ (𝑊‘2) = 𝑐)) ↔ ((#‘𝑊) = 3 ∧ ((𝑊‘0) = (𝑊‘0) ∧ (𝑊‘1) = (𝑊‘1) ∧ (𝑊‘2) = (𝑊‘2)))))
3629, 32, 35rspc3ev 3314 . . . 4 ((((𝑊‘0) ∈ 𝑉 ∧ (𝑊‘1) ∈ 𝑉 ∧ (𝑊‘2) ∈ 𝑉) ∧ ((#‘𝑊) = 3 ∧ ((𝑊‘0) = (𝑊‘0) ∧ (𝑊‘1) = (𝑊‘1) ∧ (𝑊‘2) = (𝑊‘2)))) → ∃𝑎𝑉𝑏𝑉𝑐𝑉 ((#‘𝑊) = 3 ∧ ((𝑊‘0) = 𝑎 ∧ (𝑊‘1) = 𝑏 ∧ (𝑊‘2) = 𝑐)))
378, 14, 20, 26, 36syl31anc 1326 . . 3 ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = 3) → ∃𝑎𝑉𝑏𝑉𝑐𝑉 ((#‘𝑊) = 3 ∧ ((𝑊‘0) = 𝑎 ∧ (𝑊‘1) = 𝑏 ∧ (𝑊‘2) = 𝑐)))
38 df-3an 1038 . . . . . . . . 9 ((𝑎𝑉𝑏𝑉𝑐𝑉) ↔ ((𝑎𝑉𝑏𝑉) ∧ 𝑐𝑉))
39 eqwrds3 13646 . . . . . . . . . 10 ((𝑊 ∈ Word 𝑉 ∧ (𝑎𝑉𝑏𝑉𝑐𝑉)) → (𝑊 = ⟨“𝑎𝑏𝑐”⟩ ↔ ((#‘𝑊) = 3 ∧ ((𝑊‘0) = 𝑎 ∧ (𝑊‘1) = 𝑏 ∧ (𝑊‘2) = 𝑐))))
4039ex 450 . . . . . . . . 9 (𝑊 ∈ Word 𝑉 → ((𝑎𝑉𝑏𝑉𝑐𝑉) → (𝑊 = ⟨“𝑎𝑏𝑐”⟩ ↔ ((#‘𝑊) = 3 ∧ ((𝑊‘0) = 𝑎 ∧ (𝑊‘1) = 𝑏 ∧ (𝑊‘2) = 𝑐)))))
4138, 40syl5bir 233 . . . . . . . 8 (𝑊 ∈ Word 𝑉 → (((𝑎𝑉𝑏𝑉) ∧ 𝑐𝑉) → (𝑊 = ⟨“𝑎𝑏𝑐”⟩ ↔ ((#‘𝑊) = 3 ∧ ((𝑊‘0) = 𝑎 ∧ (𝑊‘1) = 𝑏 ∧ (𝑊‘2) = 𝑐)))))
4241expd 452 . . . . . . 7 (𝑊 ∈ Word 𝑉 → ((𝑎𝑉𝑏𝑉) → (𝑐𝑉 → (𝑊 = ⟨“𝑎𝑏𝑐”⟩ ↔ ((#‘𝑊) = 3 ∧ ((𝑊‘0) = 𝑎 ∧ (𝑊‘1) = 𝑏 ∧ (𝑊‘2) = 𝑐))))))
4342adantr 481 . . . . . 6 ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = 3) → ((𝑎𝑉𝑏𝑉) → (𝑐𝑉 → (𝑊 = ⟨“𝑎𝑏𝑐”⟩ ↔ ((#‘𝑊) = 3 ∧ ((𝑊‘0) = 𝑎 ∧ (𝑊‘1) = 𝑏 ∧ (𝑊‘2) = 𝑐))))))
4443imp31 448 . . . . 5 ((((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = 3) ∧ (𝑎𝑉𝑏𝑉)) ∧ 𝑐𝑉) → (𝑊 = ⟨“𝑎𝑏𝑐”⟩ ↔ ((#‘𝑊) = 3 ∧ ((𝑊‘0) = 𝑎 ∧ (𝑊‘1) = 𝑏 ∧ (𝑊‘2) = 𝑐))))
4544rexbidva 3043 . . . 4 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = 3) ∧ (𝑎𝑉𝑏𝑉)) → (∃𝑐𝑉 𝑊 = ⟨“𝑎𝑏𝑐”⟩ ↔ ∃𝑐𝑉 ((#‘𝑊) = 3 ∧ ((𝑊‘0) = 𝑎 ∧ (𝑊‘1) = 𝑏 ∧ (𝑊‘2) = 𝑐))))
46452rexbidva 3050 . . 3 ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = 3) → (∃𝑎𝑉𝑏𝑉𝑐𝑉 𝑊 = ⟨“𝑎𝑏𝑐”⟩ ↔ ∃𝑎𝑉𝑏𝑉𝑐𝑉 ((#‘𝑊) = 3 ∧ ((𝑊‘0) = 𝑎 ∧ (𝑊‘1) = 𝑏 ∧ (𝑊‘2) = 𝑐))))
4737, 46mpbird 247 . 2 ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = 3) → ∃𝑎𝑉𝑏𝑉𝑐𝑉 𝑊 = ⟨“𝑎𝑏𝑐”⟩)
48 s3cl 13568 . . . . . . . 8 ((𝑎𝑉𝑏𝑉𝑐𝑉) → ⟨“𝑎𝑏𝑐”⟩ ∈ Word 𝑉)
4948ad4ant123 1291 . . . . . . 7 ((((𝑎𝑉𝑏𝑉) ∧ 𝑐𝑉) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩) → ⟨“𝑎𝑏𝑐”⟩ ∈ Word 𝑉)
50 s3len 13583 . . . . . . 7 (#‘⟨“𝑎𝑏𝑐”⟩) = 3
5149, 50jctir 560 . . . . . 6 ((((𝑎𝑉𝑏𝑉) ∧ 𝑐𝑉) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩) → (⟨“𝑎𝑏𝑐”⟩ ∈ Word 𝑉 ∧ (#‘⟨“𝑎𝑏𝑐”⟩) = 3))
52 eleq1 2686 . . . . . . . 8 (𝑊 = ⟨“𝑎𝑏𝑐”⟩ → (𝑊 ∈ Word 𝑉 ↔ ⟨“𝑎𝑏𝑐”⟩ ∈ Word 𝑉))
53 fveq2 6153 . . . . . . . . 9 (𝑊 = ⟨“𝑎𝑏𝑐”⟩ → (#‘𝑊) = (#‘⟨“𝑎𝑏𝑐”⟩))
5453eqeq1d 2623 . . . . . . . 8 (𝑊 = ⟨“𝑎𝑏𝑐”⟩ → ((#‘𝑊) = 3 ↔ (#‘⟨“𝑎𝑏𝑐”⟩) = 3))
5552, 54anbi12d 746 . . . . . . 7 (𝑊 = ⟨“𝑎𝑏𝑐”⟩ → ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = 3) ↔ (⟨“𝑎𝑏𝑐”⟩ ∈ Word 𝑉 ∧ (#‘⟨“𝑎𝑏𝑐”⟩) = 3)))
5655adantl 482 . . . . . 6 ((((𝑎𝑉𝑏𝑉) ∧ 𝑐𝑉) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩) → ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = 3) ↔ (⟨“𝑎𝑏𝑐”⟩ ∈ Word 𝑉 ∧ (#‘⟨“𝑎𝑏𝑐”⟩) = 3)))
5751, 56mpbird 247 . . . . 5 ((((𝑎𝑉𝑏𝑉) ∧ 𝑐𝑉) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩) → (𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = 3))
5857ex 450 . . . 4 (((𝑎𝑉𝑏𝑉) ∧ 𝑐𝑉) → (𝑊 = ⟨“𝑎𝑏𝑐”⟩ → (𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = 3)))
5958rexlimdva 3025 . . 3 ((𝑎𝑉𝑏𝑉) → (∃𝑐𝑉 𝑊 = ⟨“𝑎𝑏𝑐”⟩ → (𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = 3)))
6059rexlimivv 3030 . 2 (∃𝑎𝑉𝑏𝑉𝑐𝑉 𝑊 = ⟨“𝑎𝑏𝑐”⟩ → (𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = 3))
6147, 60impbii 199 1 ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = 3) ↔ ∃𝑎𝑉𝑏𝑉𝑐𝑉 𝑊 = ⟨“𝑎𝑏𝑐”⟩)
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 196  wa 384  w3a 1036   = wceq 1480  wcel 1987  wrex 2908  {ctp 4157  cfv 5852  (class class class)co 6610  0cc0 9888  1c1 9889  2c2 11022  3c3 11023  ..^cfzo 12414  #chash 13065  Word cword 13238  ⟨“cs3 13532
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1719  ax-4 1734  ax-5 1836  ax-6 1885  ax-7 1932  ax-8 1989  ax-9 1996  ax-10 2016  ax-11 2031  ax-12 2044  ax-13 2245  ax-ext 2601  ax-rep 4736  ax-sep 4746  ax-nul 4754  ax-pow 4808  ax-pr 4872  ax-un 6909  ax-cnex 9944  ax-resscn 9945  ax-1cn 9946  ax-icn 9947  ax-addcl 9948  ax-addrcl 9949  ax-mulcl 9950  ax-mulrcl 9951  ax-mulcom 9952  ax-addass 9953  ax-mulass 9954  ax-distr 9955  ax-i2m1 9956  ax-1ne0 9957  ax-1rid 9958  ax-rnegex 9959  ax-rrecex 9960  ax-cnre 9961  ax-pre-lttri 9962  ax-pre-lttrn 9963  ax-pre-ltadd 9964  ax-pre-mulgt0 9965
This theorem depends on definitions:  df-bi 197  df-or 385  df-an 386  df-3or 1037  df-3an 1038  df-tru 1483  df-ex 1702  df-nf 1707  df-sb 1878  df-eu 2473  df-mo 2474  df-clab 2608  df-cleq 2614  df-clel 2617  df-nfc 2750  df-ne 2791  df-nel 2894  df-ral 2912  df-rex 2913  df-reu 2914  df-rab 2916  df-v 3191  df-sbc 3422  df-csb 3519  df-dif 3562  df-un 3564  df-in 3566  df-ss 3573  df-pss 3575  df-nul 3897  df-if 4064  df-pw 4137  df-sn 4154  df-pr 4156  df-tp 4158  df-op 4160  df-uni 4408  df-int 4446  df-iun 4492  df-br 4619  df-opab 4679  df-mpt 4680  df-tr 4718  df-eprel 4990  df-id 4994  df-po 5000  df-so 5001  df-fr 5038  df-we 5040  df-xp 5085  df-rel 5086  df-cnv 5087  df-co 5088  df-dm 5089  df-rn 5090  df-res 5091  df-ima 5092  df-pred 5644  df-ord 5690  df-on 5691  df-lim 5692  df-suc 5693  df-iota 5815  df-fun 5854  df-fn 5855  df-f 5856  df-f1 5857  df-fo 5858  df-f1o 5859  df-fv 5860  df-riota 6571  df-ov 6613  df-oprab 6614  df-mpt2 6615  df-om 7020  df-1st 7120  df-2nd 7121  df-wrecs 7359  df-recs 7420  df-rdg 7458  df-1o 7512  df-oadd 7516  df-er 7694  df-en 7908  df-dom 7909  df-sdom 7910  df-fin 7911  df-card 8717  df-pnf 10028  df-mnf 10029  df-xr 10030  df-ltxr 10031  df-le 10032  df-sub 10220  df-neg 10221  df-nn 10973  df-2 11031  df-3 11032  df-n0 11245  df-z 11330  df-uz 11640  df-fz 12277  df-fzo 12415  df-hash 13066  df-word 13246  df-concat 13248  df-s1 13249  df-s2 13538  df-s3 13539
This theorem is referenced by:  elwwlks2s3  26744
  Copyright terms: Public domain W3C validator