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

Theorem pfxval 14029
 Description: Value of a prefix operation. (Contributed by AV, 2-May-2020.)
Assertion
Ref Expression
pfxval ((𝑆𝑉𝐿 ∈ ℕ0) → (𝑆 prefix 𝐿) = (𝑆 substr ⟨0, 𝐿⟩))

Proof of Theorem pfxval
Dummy variables 𝑙 𝑠 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 df-pfx 14027 . . 3 prefix = (𝑠 ∈ V, 𝑙 ∈ ℕ0 ↦ (𝑠 substr ⟨0, 𝑙⟩))
21a1i 11 . 2 ((𝑆𝑉𝐿 ∈ ℕ0) → prefix = (𝑠 ∈ V, 𝑙 ∈ ℕ0 ↦ (𝑠 substr ⟨0, 𝑙⟩)))
3 simpl 486 . . . 4 ((𝑠 = 𝑆𝑙 = 𝐿) → 𝑠 = 𝑆)
4 opeq2 4766 . . . . 5 (𝑙 = 𝐿 → ⟨0, 𝑙⟩ = ⟨0, 𝐿⟩)
54adantl 485 . . . 4 ((𝑠 = 𝑆𝑙 = 𝐿) → ⟨0, 𝑙⟩ = ⟨0, 𝐿⟩)
63, 5oveq12d 7154 . . 3 ((𝑠 = 𝑆𝑙 = 𝐿) → (𝑠 substr ⟨0, 𝑙⟩) = (𝑆 substr ⟨0, 𝐿⟩))
76adantl 485 . 2 (((𝑆𝑉𝐿 ∈ ℕ0) ∧ (𝑠 = 𝑆𝑙 = 𝐿)) → (𝑠 substr ⟨0, 𝑙⟩) = (𝑆 substr ⟨0, 𝐿⟩))
8 elex 3459 . . 3 (𝑆𝑉𝑆 ∈ V)
98adantr 484 . 2 ((𝑆𝑉𝐿 ∈ ℕ0) → 𝑆 ∈ V)
10 simpr 488 . 2 ((𝑆𝑉𝐿 ∈ ℕ0) → 𝐿 ∈ ℕ0)
11 ovexd 7171 . 2 ((𝑆𝑉𝐿 ∈ ℕ0) → (𝑆 substr ⟨0, 𝐿⟩) ∈ V)
122, 7, 9, 10, 11ovmpod 7283 1 ((𝑆𝑉𝐿 ∈ ℕ0) → (𝑆 prefix 𝐿) = (𝑆 substr ⟨0, 𝐿⟩))
 Colors of variables: wff setvar class Syntax hints:   → wi 4   ∧ wa 399   = wceq 1538   ∈ wcel 2111  Vcvv 3441  ⟨cop 4531  (class class class)co 7136   ∈ cmpo 7138  0cc0 10529  ℕ0cn0 11888   substr csubstr 13996   prefix cpfx 14026 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-sep 5168  ax-nul 5175  ax-pr 5296 This theorem depends on definitions:  df-bi 210  df-an 400  df-or 845  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-ral 3111  df-rex 3112  df-v 3443  df-sbc 3721  df-dif 3884  df-un 3886  df-in 3888  df-ss 3898  df-nul 4244  df-if 4426  df-sn 4526  df-pr 4528  df-op 4532  df-uni 4802  df-br 5032  df-opab 5094  df-id 5426  df-xp 5526  df-rel 5527  df-cnv 5528  df-co 5529  df-dm 5530  df-iota 6284  df-fun 6327  df-fv 6333  df-ov 7139  df-oprab 7140  df-mpo 7141  df-pfx 14027 This theorem is referenced by:  pfx00  14030  pfx0  14031  pfxval0  14032  pfxcl  14033  pfxmpt  14034  pfxfv  14038  pfxnd  14043  pfx1  14059  pfxswrd  14062  swrdpfx  14063  pfxpfx  14064  swrdccat  14091  pfxccatpfx1  14092  pfxccatpfx2  14093  cshw0  14150  pfxco  14194  clwwlkf1  27844  cycpmco2f1  30826
 Copyright terms: Public domain W3C validator