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

Theorem reuccatpfxs1 14120
 Description: There is a unique word having the length of a given word increased by 1 with the given word as prefix if there is a unique symbol which extends the given word. (Contributed by Alexander van der Vekens, 6-Oct-2018.) (Revised by AV, 21-Jan-2022.) (Revised by AV, 13-Oct-2022.)
Hypothesis
Ref Expression
reuccatpfxs1.1 𝑣𝑋
Assertion
Ref Expression
reuccatpfxs1 ((𝑊 ∈ Word 𝑉 ∧ ∀𝑥𝑋 (𝑥 ∈ Word 𝑉 ∧ (♯‘𝑥) = ((♯‘𝑊) + 1))) → (∃!𝑣𝑉 (𝑊 ++ ⟨“𝑣”⟩) ∈ 𝑋 → ∃!𝑥𝑋 𝑊 = (𝑥 prefix (♯‘𝑊))))
Distinct variable groups:   𝑣,𝑉,𝑥   𝑣,𝑊,𝑥   𝑥,𝑋
Allowed substitution hint:   𝑋(𝑣)

Proof of Theorem reuccatpfxs1
Dummy variables 𝑢 𝑦 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 eleq1w 2872 . . . 4 (𝑥 = 𝑦 → (𝑥 ∈ Word 𝑉𝑦 ∈ Word 𝑉))
2 fveqeq2 6664 . . . 4 (𝑥 = 𝑦 → ((♯‘𝑥) = ((♯‘𝑊) + 1) ↔ (♯‘𝑦) = ((♯‘𝑊) + 1)))
31, 2anbi12d 633 . . 3 (𝑥 = 𝑦 → ((𝑥 ∈ Word 𝑉 ∧ (♯‘𝑥) = ((♯‘𝑊) + 1)) ↔ (𝑦 ∈ Word 𝑉 ∧ (♯‘𝑦) = ((♯‘𝑊) + 1))))
43cbvralvw 3397 . 2 (∀𝑥𝑋 (𝑥 ∈ Word 𝑉 ∧ (♯‘𝑥) = ((♯‘𝑊) + 1)) ↔ ∀𝑦𝑋 (𝑦 ∈ Word 𝑉 ∧ (♯‘𝑦) = ((♯‘𝑊) + 1)))
5 reuccatpfxs1.1 . . . . 5 𝑣𝑋
65nfel2 2973 . . . 4 𝑣(𝑊 ++ ⟨“𝑢”⟩) ∈ 𝑋
75nfel2 2973 . . . 4 𝑣(𝑊 ++ ⟨“𝑥”⟩) ∈ 𝑋
8 s1eq 13965 . . . . . 6 (𝑣 = 𝑥 → ⟨“𝑣”⟩ = ⟨“𝑥”⟩)
98oveq2d 7161 . . . . 5 (𝑣 = 𝑥 → (𝑊 ++ ⟨“𝑣”⟩) = (𝑊 ++ ⟨“𝑥”⟩))
109eleq1d 2874 . . . 4 (𝑣 = 𝑥 → ((𝑊 ++ ⟨“𝑣”⟩) ∈ 𝑋 ↔ (𝑊 ++ ⟨“𝑥”⟩) ∈ 𝑋))
11 s1eq 13965 . . . . . 6 (𝑥 = 𝑢 → ⟨“𝑥”⟩ = ⟨“𝑢”⟩)
1211oveq2d 7161 . . . . 5 (𝑥 = 𝑢 → (𝑊 ++ ⟨“𝑥”⟩) = (𝑊 ++ ⟨“𝑢”⟩))
1312eleq1d 2874 . . . 4 (𝑥 = 𝑢 → ((𝑊 ++ ⟨“𝑥”⟩) ∈ 𝑋 ↔ (𝑊 ++ ⟨“𝑢”⟩) ∈ 𝑋))
146, 7, 10, 13reu8nf 3808 . . 3 (∃!𝑣𝑉 (𝑊 ++ ⟨“𝑣”⟩) ∈ 𝑋 ↔ ∃𝑣𝑉 ((𝑊 ++ ⟨“𝑣”⟩) ∈ 𝑋 ∧ ∀𝑢𝑉 ((𝑊 ++ ⟨“𝑢”⟩) ∈ 𝑋𝑣 = 𝑢)))
15 nfv 1915 . . . . 5 𝑣 𝑊 ∈ Word 𝑉
16 nfv 1915 . . . . . 6 𝑣(𝑦 ∈ Word 𝑉 ∧ (♯‘𝑦) = ((♯‘𝑊) + 1))
175, 16nfralw 3189 . . . . 5 𝑣𝑦𝑋 (𝑦 ∈ Word 𝑉 ∧ (♯‘𝑦) = ((♯‘𝑊) + 1))
1815, 17nfan 1900 . . . 4 𝑣(𝑊 ∈ Word 𝑉 ∧ ∀𝑦𝑋 (𝑦 ∈ Word 𝑉 ∧ (♯‘𝑦) = ((♯‘𝑊) + 1)))
19 nfv 1915 . . . . 5 𝑣 𝑊 = (𝑥 prefix (♯‘𝑊))
205, 19nfreuw 3328 . . . 4 𝑣∃!𝑥𝑋 𝑊 = (𝑥 prefix (♯‘𝑊))
21 simprl 770 . . . . . 6 ((((𝑊 ∈ Word 𝑉 ∧ ∀𝑦𝑋 (𝑦 ∈ Word 𝑉 ∧ (♯‘𝑦) = ((♯‘𝑊) + 1))) ∧ 𝑣𝑉) ∧ ((𝑊 ++ ⟨“𝑣”⟩) ∈ 𝑋 ∧ ∀𝑢𝑉 ((𝑊 ++ ⟨“𝑢”⟩) ∈ 𝑋𝑣 = 𝑢))) → (𝑊 ++ ⟨“𝑣”⟩) ∈ 𝑋)
22 simpl 486 . . . . . . . . . . 11 ((𝑊 ∈ Word 𝑉 ∧ ∀𝑦𝑋 (𝑦 ∈ Word 𝑉 ∧ (♯‘𝑦) = ((♯‘𝑊) + 1))) → 𝑊 ∈ Word 𝑉)
2322ad2antrr 725 . . . . . . . . . 10 ((((𝑊 ∈ Word 𝑉 ∧ ∀𝑦𝑋 (𝑦 ∈ Word 𝑉 ∧ (♯‘𝑦) = ((♯‘𝑊) + 1))) ∧ 𝑣𝑉) ∧ ((𝑊 ++ ⟨“𝑣”⟩) ∈ 𝑋 ∧ ∀𝑢𝑉 ((𝑊 ++ ⟨“𝑢”⟩) ∈ 𝑋𝑣 = 𝑢))) → 𝑊 ∈ Word 𝑉)
2423anim1i 617 . . . . . . . . 9 (((((𝑊 ∈ Word 𝑉 ∧ ∀𝑦𝑋 (𝑦 ∈ Word 𝑉 ∧ (♯‘𝑦) = ((♯‘𝑊) + 1))) ∧ 𝑣𝑉) ∧ ((𝑊 ++ ⟨“𝑣”⟩) ∈ 𝑋 ∧ ∀𝑢𝑉 ((𝑊 ++ ⟨“𝑢”⟩) ∈ 𝑋𝑣 = 𝑢))) ∧ 𝑥𝑋) → (𝑊 ∈ Word 𝑉𝑥𝑋))
25 simplrr 777 . . . . . . . . 9 (((((𝑊 ∈ Word 𝑉 ∧ ∀𝑦𝑋 (𝑦 ∈ Word 𝑉 ∧ (♯‘𝑦) = ((♯‘𝑊) + 1))) ∧ 𝑣𝑉) ∧ ((𝑊 ++ ⟨“𝑣”⟩) ∈ 𝑋 ∧ ∀𝑢𝑉 ((𝑊 ++ ⟨“𝑢”⟩) ∈ 𝑋𝑣 = 𝑢))) ∧ 𝑥𝑋) → ∀𝑢𝑉 ((𝑊 ++ ⟨“𝑢”⟩) ∈ 𝑋𝑣 = 𝑢))
26 simp-4r 783 . . . . . . . . 9 (((((𝑊 ∈ Word 𝑉 ∧ ∀𝑦𝑋 (𝑦 ∈ Word 𝑉 ∧ (♯‘𝑦) = ((♯‘𝑊) + 1))) ∧ 𝑣𝑉) ∧ ((𝑊 ++ ⟨“𝑣”⟩) ∈ 𝑋 ∧ ∀𝑢𝑉 ((𝑊 ++ ⟨“𝑢”⟩) ∈ 𝑋𝑣 = 𝑢))) ∧ 𝑥𝑋) → ∀𝑦𝑋 (𝑦 ∈ Word 𝑉 ∧ (♯‘𝑦) = ((♯‘𝑊) + 1)))
27 reuccatpfxs1lem 14119 . . . . . . . . 9 (((𝑊 ∈ Word 𝑉𝑥𝑋) ∧ ∀𝑢𝑉 ((𝑊 ++ ⟨“𝑢”⟩) ∈ 𝑋𝑣 = 𝑢) ∧ ∀𝑦𝑋 (𝑦 ∈ Word 𝑉 ∧ (♯‘𝑦) = ((♯‘𝑊) + 1))) → (𝑊 = (𝑥 prefix (♯‘𝑊)) → 𝑥 = (𝑊 ++ ⟨“𝑣”⟩)))
2824, 25, 26, 27syl3anc 1368 . . . . . . . 8 (((((𝑊 ∈ Word 𝑉 ∧ ∀𝑦𝑋 (𝑦 ∈ Word 𝑉 ∧ (♯‘𝑦) = ((♯‘𝑊) + 1))) ∧ 𝑣𝑉) ∧ ((𝑊 ++ ⟨“𝑣”⟩) ∈ 𝑋 ∧ ∀𝑢𝑉 ((𝑊 ++ ⟨“𝑢”⟩) ∈ 𝑋𝑣 = 𝑢))) ∧ 𝑥𝑋) → (𝑊 = (𝑥 prefix (♯‘𝑊)) → 𝑥 = (𝑊 ++ ⟨“𝑣”⟩)))
29 oveq1 7152 . . . . . . . . . . 11 (𝑥 = (𝑊 ++ ⟨“𝑣”⟩) → (𝑥 prefix (♯‘𝑊)) = ((𝑊 ++ ⟨“𝑣”⟩) prefix (♯‘𝑊)))
30 s1cl 13967 . . . . . . . . . . . . . 14 (𝑣𝑉 → ⟨“𝑣”⟩ ∈ Word 𝑉)
3122, 30anim12i 615 . . . . . . . . . . . . 13 (((𝑊 ∈ Word 𝑉 ∧ ∀𝑦𝑋 (𝑦 ∈ Word 𝑉 ∧ (♯‘𝑦) = ((♯‘𝑊) + 1))) ∧ 𝑣𝑉) → (𝑊 ∈ Word 𝑉 ∧ ⟨“𝑣”⟩ ∈ Word 𝑉))
3231ad2antrr 725 . . . . . . . . . . . 12 (((((𝑊 ∈ Word 𝑉 ∧ ∀𝑦𝑋 (𝑦 ∈ Word 𝑉 ∧ (♯‘𝑦) = ((♯‘𝑊) + 1))) ∧ 𝑣𝑉) ∧ ((𝑊 ++ ⟨“𝑣”⟩) ∈ 𝑋 ∧ ∀𝑢𝑉 ((𝑊 ++ ⟨“𝑢”⟩) ∈ 𝑋𝑣 = 𝑢))) ∧ 𝑥𝑋) → (𝑊 ∈ Word 𝑉 ∧ ⟨“𝑣”⟩ ∈ Word 𝑉))
33 pfxccat1 14075 . . . . . . . . . . . 12 ((𝑊 ∈ Word 𝑉 ∧ ⟨“𝑣”⟩ ∈ Word 𝑉) → ((𝑊 ++ ⟨“𝑣”⟩) prefix (♯‘𝑊)) = 𝑊)
3432, 33syl 17 . . . . . . . . . . 11 (((((𝑊 ∈ Word 𝑉 ∧ ∀𝑦𝑋 (𝑦 ∈ Word 𝑉 ∧ (♯‘𝑦) = ((♯‘𝑊) + 1))) ∧ 𝑣𝑉) ∧ ((𝑊 ++ ⟨“𝑣”⟩) ∈ 𝑋 ∧ ∀𝑢𝑉 ((𝑊 ++ ⟨“𝑢”⟩) ∈ 𝑋𝑣 = 𝑢))) ∧ 𝑥𝑋) → ((𝑊 ++ ⟨“𝑣”⟩) prefix (♯‘𝑊)) = 𝑊)
3529, 34sylan9eqr 2855 . . . . . . . . . 10 ((((((𝑊 ∈ Word 𝑉 ∧ ∀𝑦𝑋 (𝑦 ∈ Word 𝑉 ∧ (♯‘𝑦) = ((♯‘𝑊) + 1))) ∧ 𝑣𝑉) ∧ ((𝑊 ++ ⟨“𝑣”⟩) ∈ 𝑋 ∧ ∀𝑢𝑉 ((𝑊 ++ ⟨“𝑢”⟩) ∈ 𝑋𝑣 = 𝑢))) ∧ 𝑥𝑋) ∧ 𝑥 = (𝑊 ++ ⟨“𝑣”⟩)) → (𝑥 prefix (♯‘𝑊)) = 𝑊)
3635eqcomd 2804 . . . . . . . . 9 ((((((𝑊 ∈ Word 𝑉 ∧ ∀𝑦𝑋 (𝑦 ∈ Word 𝑉 ∧ (♯‘𝑦) = ((♯‘𝑊) + 1))) ∧ 𝑣𝑉) ∧ ((𝑊 ++ ⟨“𝑣”⟩) ∈ 𝑋 ∧ ∀𝑢𝑉 ((𝑊 ++ ⟨“𝑢”⟩) ∈ 𝑋𝑣 = 𝑢))) ∧ 𝑥𝑋) ∧ 𝑥 = (𝑊 ++ ⟨“𝑣”⟩)) → 𝑊 = (𝑥 prefix (♯‘𝑊)))
3736ex 416 . . . . . . . 8 (((((𝑊 ∈ Word 𝑉 ∧ ∀𝑦𝑋 (𝑦 ∈ Word 𝑉 ∧ (♯‘𝑦) = ((♯‘𝑊) + 1))) ∧ 𝑣𝑉) ∧ ((𝑊 ++ ⟨“𝑣”⟩) ∈ 𝑋 ∧ ∀𝑢𝑉 ((𝑊 ++ ⟨“𝑢”⟩) ∈ 𝑋𝑣 = 𝑢))) ∧ 𝑥𝑋) → (𝑥 = (𝑊 ++ ⟨“𝑣”⟩) → 𝑊 = (𝑥 prefix (♯‘𝑊))))
3828, 37impbid 215 . . . . . . 7 (((((𝑊 ∈ Word 𝑉 ∧ ∀𝑦𝑋 (𝑦 ∈ Word 𝑉 ∧ (♯‘𝑦) = ((♯‘𝑊) + 1))) ∧ 𝑣𝑉) ∧ ((𝑊 ++ ⟨“𝑣”⟩) ∈ 𝑋 ∧ ∀𝑢𝑉 ((𝑊 ++ ⟨“𝑢”⟩) ∈ 𝑋𝑣 = 𝑢))) ∧ 𝑥𝑋) → (𝑊 = (𝑥 prefix (♯‘𝑊)) ↔ 𝑥 = (𝑊 ++ ⟨“𝑣”⟩)))
3938ralrimiva 3149 . . . . . 6 ((((𝑊 ∈ Word 𝑉 ∧ ∀𝑦𝑋 (𝑦 ∈ Word 𝑉 ∧ (♯‘𝑦) = ((♯‘𝑊) + 1))) ∧ 𝑣𝑉) ∧ ((𝑊 ++ ⟨“𝑣”⟩) ∈ 𝑋 ∧ ∀𝑢𝑉 ((𝑊 ++ ⟨“𝑢”⟩) ∈ 𝑋𝑣 = 𝑢))) → ∀𝑥𝑋 (𝑊 = (𝑥 prefix (♯‘𝑊)) ↔ 𝑥 = (𝑊 ++ ⟨“𝑣”⟩)))
40 reu6i 3669 . . . . . 6 (((𝑊 ++ ⟨“𝑣”⟩) ∈ 𝑋 ∧ ∀𝑥𝑋 (𝑊 = (𝑥 prefix (♯‘𝑊)) ↔ 𝑥 = (𝑊 ++ ⟨“𝑣”⟩))) → ∃!𝑥𝑋 𝑊 = (𝑥 prefix (♯‘𝑊)))
4121, 39, 40syl2anc 587 . . . . 5 ((((𝑊 ∈ Word 𝑉 ∧ ∀𝑦𝑋 (𝑦 ∈ Word 𝑉 ∧ (♯‘𝑦) = ((♯‘𝑊) + 1))) ∧ 𝑣𝑉) ∧ ((𝑊 ++ ⟨“𝑣”⟩) ∈ 𝑋 ∧ ∀𝑢𝑉 ((𝑊 ++ ⟨“𝑢”⟩) ∈ 𝑋𝑣 = 𝑢))) → ∃!𝑥𝑋 𝑊 = (𝑥 prefix (♯‘𝑊)))
4241exp31 423 . . . 4 ((𝑊 ∈ Word 𝑉 ∧ ∀𝑦𝑋 (𝑦 ∈ Word 𝑉 ∧ (♯‘𝑦) = ((♯‘𝑊) + 1))) → (𝑣𝑉 → (((𝑊 ++ ⟨“𝑣”⟩) ∈ 𝑋 ∧ ∀𝑢𝑉 ((𝑊 ++ ⟨“𝑢”⟩) ∈ 𝑋𝑣 = 𝑢)) → ∃!𝑥𝑋 𝑊 = (𝑥 prefix (♯‘𝑊)))))
4318, 20, 42rexlimd 3277 . . 3 ((𝑊 ∈ Word 𝑉 ∧ ∀𝑦𝑋 (𝑦 ∈ Word 𝑉 ∧ (♯‘𝑦) = ((♯‘𝑊) + 1))) → (∃𝑣𝑉 ((𝑊 ++ ⟨“𝑣”⟩) ∈ 𝑋 ∧ ∀𝑢𝑉 ((𝑊 ++ ⟨“𝑢”⟩) ∈ 𝑋𝑣 = 𝑢)) → ∃!𝑥𝑋 𝑊 = (𝑥 prefix (♯‘𝑊))))
4414, 43syl5bi 245 . 2 ((𝑊 ∈ Word 𝑉 ∧ ∀𝑦𝑋 (𝑦 ∈ Word 𝑉 ∧ (♯‘𝑦) = ((♯‘𝑊) + 1))) → (∃!𝑣𝑉 (𝑊 ++ ⟨“𝑣”⟩) ∈ 𝑋 → ∃!𝑥𝑋 𝑊 = (𝑥 prefix (♯‘𝑊))))
454, 44sylan2b 596 1 ((𝑊 ∈ Word 𝑉 ∧ ∀𝑥𝑋 (𝑥 ∈ Word 𝑉 ∧ (♯‘𝑥) = ((♯‘𝑊) + 1))) → (∃!𝑣𝑉 (𝑊 ++ ⟨“𝑣”⟩) ∈ 𝑋 → ∃!𝑥𝑋 𝑊 = (𝑥 prefix (♯‘𝑊))))
 Colors of variables: wff setvar class Syntax hints:   → wi 4   ↔ wb 209   ∧ wa 399   = wceq 1538   ∈ wcel 2111  Ⅎwnfc 2936  ∀wral 3106  ∃wrex 3107  ∃!wreu 3108  ‘cfv 6332  (class class class)co 7145  1c1 10545   + caddc 10547  ♯chash 13706  Word cword 13877   ++ cconcat 13933  ⟨“cs1 13960   prefix cpfx 14043 This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1797  ax-4 1811  ax-5 1911  ax-6 1970  ax-7 2015  ax-8 2113  ax-9 2121  ax-10 2142  ax-11 2158  ax-12 2175  ax-ext 2770  ax-rep 5158  ax-sep 5171  ax-nul 5178  ax-pow 5235  ax-pr 5299  ax-un 7454  ax-cnex 10600  ax-resscn 10601  ax-1cn 10602  ax-icn 10603  ax-addcl 10604  ax-addrcl 10605  ax-mulcl 10606  ax-mulrcl 10607  ax-mulcom 10608  ax-addass 10609  ax-mulass 10610  ax-distr 10611  ax-i2m1 10612  ax-1ne0 10613  ax-1rid 10614  ax-rnegex 10615  ax-rrecex 10616  ax-cnre 10617  ax-pre-lttri 10618  ax-pre-lttrn 10619  ax-pre-ltadd 10620  ax-pre-mulgt0 10621 This theorem depends on definitions:  df-bi 210  df-an 400  df-or 845  df-3or 1085  df-3an 1086  df-tru 1541  df-ex 1782  df-nf 1786  df-sb 2070  df-mo 2598  df-eu 2629  df-clab 2777  df-cleq 2791  df-clel 2870  df-nfc 2938  df-ne 2988  df-nel 3092  df-ral 3111  df-rex 3112  df-reu 3113  df-rab 3115  df-v 3444  df-sbc 3723  df-csb 3831  df-dif 3886  df-un 3888  df-in 3890  df-ss 3900  df-pss 3902  df-nul 4247  df-if 4429  df-pw 4502  df-sn 4529  df-pr 4531  df-tp 4533  df-op 4535  df-uni 4805  df-int 4843  df-iun 4887  df-br 5035  df-opab 5097  df-mpt 5115  df-tr 5141  df-id 5429  df-eprel 5434  df-po 5442  df-so 5443  df-fr 5482  df-we 5484  df-xp 5529  df-rel 5530  df-cnv 5531  df-co 5532  df-dm 5533  df-rn 5534  df-res 5535  df-ima 5536  df-pred 6123  df-ord 6169  df-on 6170  df-lim 6171  df-suc 6172  df-iota 6291  df-fun 6334  df-fn 6335  df-f 6336  df-f1 6337  df-fo 6338  df-f1o 6339  df-fv 6340  df-riota 7103  df-ov 7148  df-oprab 7149  df-mpo 7150  df-om 7574  df-1st 7684  df-2nd 7685  df-wrecs 7948  df-recs 8009  df-rdg 8047  df-1o 8103  df-oadd 8107  df-er 8290  df-en 8511  df-dom 8512  df-sdom 8513  df-fin 8514  df-card 9370  df-pnf 10684  df-mnf 10685  df-xr 10686  df-ltxr 10687  df-le 10688  df-sub 10879  df-neg 10880  df-nn 11644  df-n0 11904  df-xnn0 11976  df-z 11990  df-uz 12252  df-fz 12906  df-fzo 13049  df-hash 13707  df-word 13878  df-lsw 13926  df-concat 13934  df-s1 13961  df-substr 14014  df-pfx 14044 This theorem is referenced by:  reuccatpfxs1v  14121  numclwlk2lem2f1o  28208
 Copyright terms: Public domain W3C validator