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

Theorem splval 14106
 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 14105 . . 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 770 . . . . 5 (((𝑆𝑉 ∧ (𝐹𝑊𝑇𝑋𝑅𝑌)) ∧ (𝑠 = 𝑆𝑏 = ⟨𝐹, 𝑇, 𝑅⟩)) → 𝑠 = 𝑆)
4 2fveq3 6650 . . . . . . 7 (𝑏 = ⟨𝐹, 𝑇, 𝑅⟩ → (1st ‘(1st𝑏)) = (1st ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩)))
54adantl 485 . . . . . 6 ((𝑠 = 𝑆𝑏 = ⟨𝐹, 𝑇, 𝑅⟩) → (1st ‘(1st𝑏)) = (1st ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩)))
6 ot1stg 7687 . . . . . . 7 ((𝐹𝑊𝑇𝑋𝑅𝑌) → (1st ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩)) = 𝐹)
76adantl 485 . . . . . 6 ((𝑆𝑉 ∧ (𝐹𝑊𝑇𝑋𝑅𝑌)) → (1st ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩)) = 𝐹)
85, 7sylan9eqr 2855 . . . . 5 (((𝑆𝑉 ∧ (𝐹𝑊𝑇𝑋𝑅𝑌)) ∧ (𝑠 = 𝑆𝑏 = ⟨𝐹, 𝑇, 𝑅⟩)) → (1st ‘(1st𝑏)) = 𝐹)
93, 8oveq12d 7153 . . . 4 (((𝑆𝑉 ∧ (𝐹𝑊𝑇𝑋𝑅𝑌)) ∧ (𝑠 = 𝑆𝑏 = ⟨𝐹, 𝑇, 𝑅⟩)) → (𝑠 prefix (1st ‘(1st𝑏))) = (𝑆 prefix 𝐹))
10 fveq2 6645 . . . . . 6 (𝑏 = ⟨𝐹, 𝑇, 𝑅⟩ → (2nd𝑏) = (2nd ‘⟨𝐹, 𝑇, 𝑅⟩))
1110adantl 485 . . . . 5 ((𝑠 = 𝑆𝑏 = ⟨𝐹, 𝑇, 𝑅⟩) → (2nd𝑏) = (2nd ‘⟨𝐹, 𝑇, 𝑅⟩))
12 ot3rdg 7689 . . . . . . 7 (𝑅𝑌 → (2nd ‘⟨𝐹, 𝑇, 𝑅⟩) = 𝑅)
13123ad2ant3 1132 . . . . . 6 ((𝐹𝑊𝑇𝑋𝑅𝑌) → (2nd ‘⟨𝐹, 𝑇, 𝑅⟩) = 𝑅)
1413adantl 485 . . . . 5 ((𝑆𝑉 ∧ (𝐹𝑊𝑇𝑋𝑅𝑌)) → (2nd ‘⟨𝐹, 𝑇, 𝑅⟩) = 𝑅)
1511, 14sylan9eqr 2855 . . . 4 (((𝑆𝑉 ∧ (𝐹𝑊𝑇𝑋𝑅𝑌)) ∧ (𝑠 = 𝑆𝑏 = ⟨𝐹, 𝑇, 𝑅⟩)) → (2nd𝑏) = 𝑅)
169, 15oveq12d 7153 . . 3 (((𝑆𝑉 ∧ (𝐹𝑊𝑇𝑋𝑅𝑌)) ∧ (𝑠 = 𝑆𝑏 = ⟨𝐹, 𝑇, 𝑅⟩)) → ((𝑠 prefix (1st ‘(1st𝑏))) ++ (2nd𝑏)) = ((𝑆 prefix 𝐹) ++ 𝑅))
17 2fveq3 6650 . . . . . . 7 (𝑏 = ⟨𝐹, 𝑇, 𝑅⟩ → (2nd ‘(1st𝑏)) = (2nd ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩)))
1817adantl 485 . . . . . 6 ((𝑠 = 𝑆𝑏 = ⟨𝐹, 𝑇, 𝑅⟩) → (2nd ‘(1st𝑏)) = (2nd ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩)))
19 ot2ndg 7688 . . . . . . 7 ((𝐹𝑊𝑇𝑋𝑅𝑌) → (2nd ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩)) = 𝑇)
2019adantl 485 . . . . . 6 ((𝑆𝑉 ∧ (𝐹𝑊𝑇𝑋𝑅𝑌)) → (2nd ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩)) = 𝑇)
2118, 20sylan9eqr 2855 . . . . 5 (((𝑆𝑉 ∧ (𝐹𝑊𝑇𝑋𝑅𝑌)) ∧ (𝑠 = 𝑆𝑏 = ⟨𝐹, 𝑇, 𝑅⟩)) → (2nd ‘(1st𝑏)) = 𝑇)
223fveq2d 6649 . . . . 5 (((𝑆𝑉 ∧ (𝐹𝑊𝑇𝑋𝑅𝑌)) ∧ (𝑠 = 𝑆𝑏 = ⟨𝐹, 𝑇, 𝑅⟩)) → (♯‘𝑠) = (♯‘𝑆))
2321, 22opeq12d 4773 . . . 4 (((𝑆𝑉 ∧ (𝐹𝑊𝑇𝑋𝑅𝑌)) ∧ (𝑠 = 𝑆𝑏 = ⟨𝐹, 𝑇, 𝑅⟩)) → ⟨(2nd ‘(1st𝑏)), (♯‘𝑠)⟩ = ⟨𝑇, (♯‘𝑆)⟩)
243, 23oveq12d 7153 . . 3 (((𝑆𝑉 ∧ (𝐹𝑊𝑇𝑋𝑅𝑌)) ∧ (𝑠 = 𝑆𝑏 = ⟨𝐹, 𝑇, 𝑅⟩)) → (𝑠 substr ⟨(2nd ‘(1st𝑏)), (♯‘𝑠)⟩) = (𝑆 substr ⟨𝑇, (♯‘𝑆)⟩))
2516, 24oveq12d 7153 . 2 (((𝑆𝑉 ∧ (𝐹𝑊𝑇𝑋𝑅𝑌)) ∧ (𝑠 = 𝑆𝑏 = ⟨𝐹, 𝑇, 𝑅⟩)) → (((𝑠 prefix (1st ‘(1st𝑏))) ++ (2nd𝑏)) ++ (𝑠 substr ⟨(2nd ‘(1st𝑏)), (♯‘𝑠)⟩)) = (((𝑆 prefix 𝐹) ++ 𝑅) ++ (𝑆 substr ⟨𝑇, (♯‘𝑆)⟩)))
26 elex 3459 . . 3 (𝑆𝑉𝑆 ∈ V)
2726adantr 484 . 2 ((𝑆𝑉 ∧ (𝐹𝑊𝑇𝑋𝑅𝑌)) → 𝑆 ∈ V)
28 otex 5322 . . 3 𝐹, 𝑇, 𝑅⟩ ∈ V
2928a1i 11 . 2 ((𝑆𝑉 ∧ (𝐹𝑊𝑇𝑋𝑅𝑌)) → ⟨𝐹, 𝑇, 𝑅⟩ ∈ V)
30 ovexd 7170 . 2 ((𝑆𝑉 ∧ (𝐹𝑊𝑇𝑋𝑅𝑌)) → (((𝑆 prefix 𝐹) ++ 𝑅) ++ (𝑆 substr ⟨𝑇, (♯‘𝑆)⟩)) ∈ V)
312, 25, 27, 29, 30ovmpod 7282 1 ((𝑆𝑉 ∧ (𝐹𝑊𝑇𝑋𝑅𝑌)) → (𝑆 splice ⟨𝐹, 𝑇, 𝑅⟩) = (((𝑆 prefix 𝐹) ++ 𝑅) ++ (𝑆 substr ⟨𝑇, (♯‘𝑆)⟩)))
 Colors of variables: wff setvar class Syntax hints:   → wi 4   ∧ wa 399   ∧ w3a 1084   = wceq 1538   ∈ wcel 2111  Vcvv 3441  ⟨cop 4531  ⟨cotp 4533  ‘cfv 6324  (class class class)co 7135   ∈ cmpo 7137  1st c1st 7671  2nd c2nd 7672  ♯chash 13688   ++ cconcat 13915   substr csubstr 13995   prefix cpfx 14025   splice csplice 14104 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 5167  ax-nul 5174  ax-pow 5231  ax-pr 5295  ax-un 7443 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-rab 3115  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-ot 4534  df-uni 4801  df-br 5031  df-opab 5093  df-mpt 5111  df-id 5425  df-xp 5525  df-rel 5526  df-cnv 5527  df-co 5528  df-dm 5529  df-rn 5530  df-iota 6283  df-fun 6326  df-fv 6332  df-ov 7138  df-oprab 7139  df-mpo 7140  df-1st 7673  df-2nd 7674  df-splice 14105 This theorem is referenced by:  splid  14108  spllen  14109  splfv1  14110  splfv2a  14111  splval2  14112  gsumspl  18003  efgredleme  18864  efgredlemc  18866  efgcpbllemb  18876  frgpuplem  18893  splfv3  30665  cycpmco2f1  30823  cycpmco2rn  30824  cycpmco2lem2  30826  cycpmco2lem3  30827  cycpmco2lem4  30828  cycpmco2lem5  30829  cycpmco2lem6  30830  cycpmco2  30832
 Copyright terms: Public domain W3C validator