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

Theorem splval 14464
Description: Value of the substring replacement operator. (Contributed by Stefan O'Rear, 15-Aug-2015.) (Revised by AV, 11-May-2020.) (Revised by AV, 15-Oct-2022.)
Assertion
Ref Expression
splval ((𝑆𝑉 ∧ (𝐹𝑊𝑇𝑋𝑅𝑌)) → (𝑆 splice ⟨𝐹, 𝑇, 𝑅⟩) = (((𝑆 prefix 𝐹) ++ 𝑅) ++ (𝑆 substr ⟨𝑇, (♯‘𝑆)⟩)))

Proof of Theorem splval
Dummy variables 𝑠 𝑏 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 df-splice 14463 . . 3 splice = (𝑠 ∈ V, 𝑏 ∈ V ↦ (((𝑠 prefix (1st ‘(1st𝑏))) ++ (2nd𝑏)) ++ (𝑠 substr ⟨(2nd ‘(1st𝑏)), (♯‘𝑠)⟩)))
21a1i 11 . 2 ((𝑆𝑉 ∧ (𝐹𝑊𝑇𝑋𝑅𝑌)) → splice = (𝑠 ∈ V, 𝑏 ∈ V ↦ (((𝑠 prefix (1st ‘(1st𝑏))) ++ (2nd𝑏)) ++ (𝑠 substr ⟨(2nd ‘(1st𝑏)), (♯‘𝑠)⟩))))
3 simprl 768 . . . . 5 (((𝑆𝑉 ∧ (𝐹𝑊𝑇𝑋𝑅𝑌)) ∧ (𝑠 = 𝑆𝑏 = ⟨𝐹, 𝑇, 𝑅⟩)) → 𝑠 = 𝑆)
4 2fveq3 6779 . . . . . . 7 (𝑏 = ⟨𝐹, 𝑇, 𝑅⟩ → (1st ‘(1st𝑏)) = (1st ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩)))
54adantl 482 . . . . . 6 ((𝑠 = 𝑆𝑏 = ⟨𝐹, 𝑇, 𝑅⟩) → (1st ‘(1st𝑏)) = (1st ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩)))
6 ot1stg 7845 . . . . . . 7 ((𝐹𝑊𝑇𝑋𝑅𝑌) → (1st ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩)) = 𝐹)
76adantl 482 . . . . . 6 ((𝑆𝑉 ∧ (𝐹𝑊𝑇𝑋𝑅𝑌)) → (1st ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩)) = 𝐹)
85, 7sylan9eqr 2800 . . . . 5 (((𝑆𝑉 ∧ (𝐹𝑊𝑇𝑋𝑅𝑌)) ∧ (𝑠 = 𝑆𝑏 = ⟨𝐹, 𝑇, 𝑅⟩)) → (1st ‘(1st𝑏)) = 𝐹)
93, 8oveq12d 7293 . . . 4 (((𝑆𝑉 ∧ (𝐹𝑊𝑇𝑋𝑅𝑌)) ∧ (𝑠 = 𝑆𝑏 = ⟨𝐹, 𝑇, 𝑅⟩)) → (𝑠 prefix (1st ‘(1st𝑏))) = (𝑆 prefix 𝐹))
10 fveq2 6774 . . . . . 6 (𝑏 = ⟨𝐹, 𝑇, 𝑅⟩ → (2nd𝑏) = (2nd ‘⟨𝐹, 𝑇, 𝑅⟩))
1110adantl 482 . . . . 5 ((𝑠 = 𝑆𝑏 = ⟨𝐹, 𝑇, 𝑅⟩) → (2nd𝑏) = (2nd ‘⟨𝐹, 𝑇, 𝑅⟩))
12 ot3rdg 7847 . . . . . . 7 (𝑅𝑌 → (2nd ‘⟨𝐹, 𝑇, 𝑅⟩) = 𝑅)
13123ad2ant3 1134 . . . . . 6 ((𝐹𝑊𝑇𝑋𝑅𝑌) → (2nd ‘⟨𝐹, 𝑇, 𝑅⟩) = 𝑅)
1413adantl 482 . . . . 5 ((𝑆𝑉 ∧ (𝐹𝑊𝑇𝑋𝑅𝑌)) → (2nd ‘⟨𝐹, 𝑇, 𝑅⟩) = 𝑅)
1511, 14sylan9eqr 2800 . . . 4 (((𝑆𝑉 ∧ (𝐹𝑊𝑇𝑋𝑅𝑌)) ∧ (𝑠 = 𝑆𝑏 = ⟨𝐹, 𝑇, 𝑅⟩)) → (2nd𝑏) = 𝑅)
169, 15oveq12d 7293 . . 3 (((𝑆𝑉 ∧ (𝐹𝑊𝑇𝑋𝑅𝑌)) ∧ (𝑠 = 𝑆𝑏 = ⟨𝐹, 𝑇, 𝑅⟩)) → ((𝑠 prefix (1st ‘(1st𝑏))) ++ (2nd𝑏)) = ((𝑆 prefix 𝐹) ++ 𝑅))
17 2fveq3 6779 . . . . . . 7 (𝑏 = ⟨𝐹, 𝑇, 𝑅⟩ → (2nd ‘(1st𝑏)) = (2nd ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩)))
1817adantl 482 . . . . . 6 ((𝑠 = 𝑆𝑏 = ⟨𝐹, 𝑇, 𝑅⟩) → (2nd ‘(1st𝑏)) = (2nd ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩)))
19 ot2ndg 7846 . . . . . . 7 ((𝐹𝑊𝑇𝑋𝑅𝑌) → (2nd ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩)) = 𝑇)
2019adantl 482 . . . . . 6 ((𝑆𝑉 ∧ (𝐹𝑊𝑇𝑋𝑅𝑌)) → (2nd ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩)) = 𝑇)
2118, 20sylan9eqr 2800 . . . . 5 (((𝑆𝑉 ∧ (𝐹𝑊𝑇𝑋𝑅𝑌)) ∧ (𝑠 = 𝑆𝑏 = ⟨𝐹, 𝑇, 𝑅⟩)) → (2nd ‘(1st𝑏)) = 𝑇)
223fveq2d 6778 . . . . 5 (((𝑆𝑉 ∧ (𝐹𝑊𝑇𝑋𝑅𝑌)) ∧ (𝑠 = 𝑆𝑏 = ⟨𝐹, 𝑇, 𝑅⟩)) → (♯‘𝑠) = (♯‘𝑆))
2321, 22opeq12d 4812 . . . 4 (((𝑆𝑉 ∧ (𝐹𝑊𝑇𝑋𝑅𝑌)) ∧ (𝑠 = 𝑆𝑏 = ⟨𝐹, 𝑇, 𝑅⟩)) → ⟨(2nd ‘(1st𝑏)), (♯‘𝑠)⟩ = ⟨𝑇, (♯‘𝑆)⟩)
243, 23oveq12d 7293 . . 3 (((𝑆𝑉 ∧ (𝐹𝑊𝑇𝑋𝑅𝑌)) ∧ (𝑠 = 𝑆𝑏 = ⟨𝐹, 𝑇, 𝑅⟩)) → (𝑠 substr ⟨(2nd ‘(1st𝑏)), (♯‘𝑠)⟩) = (𝑆 substr ⟨𝑇, (♯‘𝑆)⟩))
2516, 24oveq12d 7293 . 2 (((𝑆𝑉 ∧ (𝐹𝑊𝑇𝑋𝑅𝑌)) ∧ (𝑠 = 𝑆𝑏 = ⟨𝐹, 𝑇, 𝑅⟩)) → (((𝑠 prefix (1st ‘(1st𝑏))) ++ (2nd𝑏)) ++ (𝑠 substr ⟨(2nd ‘(1st𝑏)), (♯‘𝑠)⟩)) = (((𝑆 prefix 𝐹) ++ 𝑅) ++ (𝑆 substr ⟨𝑇, (♯‘𝑆)⟩)))
26 elex 3450 . . 3 (𝑆𝑉𝑆 ∈ V)
2726adantr 481 . 2 ((𝑆𝑉 ∧ (𝐹𝑊𝑇𝑋𝑅𝑌)) → 𝑆 ∈ V)
28 otex 5380 . . 3 𝐹, 𝑇, 𝑅⟩ ∈ V
2928a1i 11 . 2 ((𝑆𝑉 ∧ (𝐹𝑊𝑇𝑋𝑅𝑌)) → ⟨𝐹, 𝑇, 𝑅⟩ ∈ V)
30 ovexd 7310 . 2 ((𝑆𝑉 ∧ (𝐹𝑊𝑇𝑋𝑅𝑌)) → (((𝑆 prefix 𝐹) ++ 𝑅) ++ (𝑆 substr ⟨𝑇, (♯‘𝑆)⟩)) ∈ V)
312, 25, 27, 29, 30ovmpod 7425 1 ((𝑆𝑉 ∧ (𝐹𝑊𝑇𝑋𝑅𝑌)) → (𝑆 splice ⟨𝐹, 𝑇, 𝑅⟩) = (((𝑆 prefix 𝐹) ++ 𝑅) ++ (𝑆 substr ⟨𝑇, (♯‘𝑆)⟩)))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wa 396  w3a 1086   = wceq 1539  wcel 2106  Vcvv 3432  cop 4567  cotp 4569  cfv 6433  (class class class)co 7275  cmpo 7277  1st c1st 7829  2nd c2nd 7830  chash 14044   ++ cconcat 14273   substr csubstr 14353   prefix cpfx 14383   splice csplice 14462
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1798  ax-4 1812  ax-5 1913  ax-6 1971  ax-7 2011  ax-8 2108  ax-9 2116  ax-10 2137  ax-11 2154  ax-12 2171  ax-ext 2709  ax-sep 5223  ax-nul 5230  ax-pr 5352  ax-un 7588
This theorem depends on definitions:  df-bi 206  df-an 397  df-or 845  df-3an 1088  df-tru 1542  df-fal 1552  df-ex 1783  df-nf 1787  df-sb 2068  df-mo 2540  df-eu 2569  df-clab 2716  df-cleq 2730  df-clel 2816  df-nfc 2889  df-ral 3069  df-rex 3070  df-rab 3073  df-v 3434  df-sbc 3717  df-dif 3890  df-un 3892  df-in 3894  df-ss 3904  df-nul 4257  df-if 4460  df-sn 4562  df-pr 4564  df-op 4568  df-ot 4570  df-uni 4840  df-br 5075  df-opab 5137  df-mpt 5158  df-id 5489  df-xp 5595  df-rel 5596  df-cnv 5597  df-co 5598  df-dm 5599  df-rn 5600  df-iota 6391  df-fun 6435  df-fv 6441  df-ov 7278  df-oprab 7279  df-mpo 7280  df-1st 7831  df-2nd 7832  df-splice 14463
This theorem is referenced by:  splid  14466  spllen  14467  splfv1  14468  splfv2a  14469  splval2  14470  gsumspl  18483  efgredleme  19349  efgredlemc  19351  efgcpbllemb  19361  frgpuplem  19378  splfv3  31230  cycpmco2f1  31391  cycpmco2rn  31392  cycpmco2lem2  31394  cycpmco2lem3  31395  cycpmco2lem4  31396  cycpmco2lem5  31397  cycpmco2lem6  31398  cycpmco2  31400
  Copyright terms: Public domain W3C validator