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

Theorem pfx1 14739
Description: The prefix of length one of a nonempty word expressed as a singleton word. (Contributed by AV, 15-May-2020.)
Assertion
Ref Expression
pfx1 ((𝑊 ∈ Word 𝑉𝑊 ≠ ∅) → (𝑊 prefix 1) = ⟨“(𝑊‘0)”⟩)

Proof of Theorem pfx1
StepHypRef Expression
1 1nn0 12519 . . . 4 1 ∈ ℕ0
21a1i 11 . . 3 (𝑊 ≠ ∅ → 1 ∈ ℕ0)
3 pfxval 14710 . . 3 ((𝑊 ∈ Word 𝑉 ∧ 1 ∈ ℕ0) → (𝑊 prefix 1) = (𝑊 substr ⟨0, 1⟩))
42, 3sylan2 604 . 2 ((𝑊 ∈ Word 𝑉𝑊 ≠ ∅) → (𝑊 prefix 1) = (𝑊 substr ⟨0, 1⟩))
5 1e0p1 12757 . . . . 5 1 = (0 + 1)
65opeq2i 4846 . . . 4 ⟨0, 1⟩ = ⟨0, (0 + 1)⟩
76oveq2i 7422 . . 3 (𝑊 substr ⟨0, 1⟩) = (𝑊 substr ⟨0, (0 + 1)⟩)
87a1i 11 . 2 ((𝑊 ∈ Word 𝑉𝑊 ≠ ∅) → (𝑊 substr ⟨0, 1⟩) = (𝑊 substr ⟨0, (0 + 1)⟩))
9 lennncl 14570 . . . 4 ((𝑊 ∈ Word 𝑉𝑊 ≠ ∅) → (♯‘𝑊) ∈ ℕ)
10 lbfzo0 13727 . . . 4 (0 ∈ (0..^(♯‘𝑊)) ↔ (♯‘𝑊) ∈ ℕ)
119, 10sylibr 237 . . 3 ((𝑊 ∈ Word 𝑉𝑊 ≠ ∅) → 0 ∈ (0..^(♯‘𝑊)))
12 swrds1 14703 . . 3 ((𝑊 ∈ Word 𝑉 ∧ 0 ∈ (0..^(♯‘𝑊))) → (𝑊 substr ⟨0, (0 + 1)⟩) = ⟨“(𝑊‘0)”⟩)
1311, 12syldan 602 . 2 ((𝑊 ∈ Word 𝑉𝑊 ≠ ∅) → (𝑊 substr ⟨0, (0 + 1)⟩) = ⟨“(𝑊‘0)”⟩)
144, 8, 133eqtrd 2808 1 ((𝑊 ∈ Word 𝑉𝑊 ≠ ∅) → (𝑊 prefix 1) = ⟨“(𝑊‘0)”⟩)
Colors of variables: wff setvar class
Syntax hints:  wi 4  wa 400   = wceq 1567  wcel 2149  wne 2964  c0 4294  cop 4600  cfv 6537  (class class class)co 7411  0cc0 11099  1c1 11100   + caddc 11102  cn 12232  0cn0 12503  ..^cfzo 13681  chash 14365  Word cword 14549  ⟨“cs1 14632   substr csubstr 14677   prefix cpfx 14707
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1822  ax-4 1836  ax-5 1937  ax-6 1994  ax-7 2035  ax-8 2151  ax-9 2159  ax-10 2182  ax-11 2198  ax-12 2219  ax-ext 2741  ax-rep 5242  ax-sep 5261  ax-nul 5271  ax-pow 5337  ax-pr 5405  ax-un 7733  ax-cnex 11155  ax-resscn 11156  ax-1cn 11157  ax-icn 11158  ax-addcl 11159  ax-addrcl 11160  ax-mulcl 11161  ax-mulrcl 11162  ax-mulcom 11163  ax-addass 11164  ax-mulass 11165  ax-distr 11166  ax-i2m1 11167  ax-1ne0 11168  ax-1rid 11169  ax-rnegex 11170  ax-rrecex 11171  ax-cnre 11172  ax-pre-lttri 11173  ax-pre-lttrn 11174  ax-pre-ltadd 11175  ax-pre-mulgt0 11176
This theorem depends on definitions:  df-bi 210  df-an 401  df-or 861  df-3or 1102  df-3an 1103  df-tru 1570  df-fal 1580  df-ex 1807  df-nf 1811  df-sb 2098  df-mo 2573  df-eu 2603  df-clab 2748  df-cleq 2761  df-clel 2844  df-nfc 2918  df-ne 2965  df-nel 3071  df-ral 3086  df-rex 3096  df-reu 3377  df-rab 3424  df-v 3465  df-sbc 3754  df-csb 3862  df-dif 3916  df-un 3918  df-in 3920  df-ss 3930  df-pss 3933  df-nul 4295  df-if 4493  df-pw 4569  df-sn 4595  df-pr 4597  df-op 4601  df-uni 4877  df-int 4917  df-iun 4962  df-br 5114  df-opab 5178  df-mpt 5197  df-tr 5223  df-id 5557  df-eprel 5562  df-po 5570  df-so 5571  df-fr 5615  df-we 5617  df-xp 5668  df-rel 5669  df-cnv 5670  df-co 5671  df-dm 5672  df-rn 5673  df-res 5674  df-ima 5675  df-pred 6303  df-ord 6364  df-on 6365  df-lim 6366  df-suc 6367  df-iota 6493  df-fun 6539  df-fn 6540  df-f 6541  df-f1 6542  df-fo 6543  df-f1o 6544  df-fv 6545  df-riota 7368  df-ov 7414  df-oprab 7415  df-mpo 7416  df-om 7862  df-1st 7985  df-2nd 7986  df-frecs 8277  df-wrecs 8308  df-recs 8357  df-rdg 8396  df-1o 8452  df-er 8693  df-en 8943  df-dom 8944  df-sdom 8945  df-fin 8946  df-card 9924  df-pnf 11244  df-mnf 11245  df-xr 11246  df-ltxr 11247  df-le 11248  df-sub 11442  df-neg 11443  df-nn 12233  df-n0 12504  df-z 12591  df-uz 12862  df-fz 13535  df-fzo 13682  df-hash 14366  df-word 14550  df-s1 14633  df-substr 14678  df-pfx 14708
This theorem is referenced by:  wrdeqs1cat  14756  pfx1s2  33199
  Copyright terms: Public domain W3C validator