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

Theorem splcl 13624
 Description: Closure of the substring replacement operator. (Contributed by Stefan O'Rear, 26-Aug-2015.)
Assertion
Ref Expression
splcl ((𝑆 ∈ Word 𝐴𝑅 ∈ Word 𝐴) → (𝑆 splice ⟨𝐹, 𝑇, 𝑅⟩) ∈ Word 𝐴)

Proof of Theorem splcl
Dummy variables 𝑠 𝑏 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 elex 3316 . . . 4 (𝑆 ∈ Word 𝐴𝑆 ∈ V)
2 otex 5038 . . . 4 𝐹, 𝑇, 𝑅⟩ ∈ V
3 id 22 . . . . . . . 8 (𝑠 = 𝑆𝑠 = 𝑆)
4 fveq2 6304 . . . . . . . . . 10 (𝑏 = ⟨𝐹, 𝑇, 𝑅⟩ → (1st𝑏) = (1st ‘⟨𝐹, 𝑇, 𝑅⟩))
54fveq2d 6308 . . . . . . . . 9 (𝑏 = ⟨𝐹, 𝑇, 𝑅⟩ → (1st ‘(1st𝑏)) = (1st ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩)))
65opeq2d 4516 . . . . . . . 8 (𝑏 = ⟨𝐹, 𝑇, 𝑅⟩ → ⟨0, (1st ‘(1st𝑏))⟩ = ⟨0, (1st ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩))⟩)
73, 6oveqan12d 6784 . . . . . . 7 ((𝑠 = 𝑆𝑏 = ⟨𝐹, 𝑇, 𝑅⟩) → (𝑠 substr ⟨0, (1st ‘(1st𝑏))⟩) = (𝑆 substr ⟨0, (1st ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩))⟩))
8 simpr 479 . . . . . . . 8 ((𝑠 = 𝑆𝑏 = ⟨𝐹, 𝑇, 𝑅⟩) → 𝑏 = ⟨𝐹, 𝑇, 𝑅⟩)
98fveq2d 6308 . . . . . . 7 ((𝑠 = 𝑆𝑏 = ⟨𝐹, 𝑇, 𝑅⟩) → (2nd𝑏) = (2nd ‘⟨𝐹, 𝑇, 𝑅⟩))
107, 9oveq12d 6783 . . . . . 6 ((𝑠 = 𝑆𝑏 = ⟨𝐹, 𝑇, 𝑅⟩) → ((𝑠 substr ⟨0, (1st ‘(1st𝑏))⟩) ++ (2nd𝑏)) = ((𝑆 substr ⟨0, (1st ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩))⟩) ++ (2nd ‘⟨𝐹, 𝑇, 𝑅⟩)))
11 simpl 474 . . . . . . 7 ((𝑠 = 𝑆𝑏 = ⟨𝐹, 𝑇, 𝑅⟩) → 𝑠 = 𝑆)
128fveq2d 6308 . . . . . . . . 9 ((𝑠 = 𝑆𝑏 = ⟨𝐹, 𝑇, 𝑅⟩) → (1st𝑏) = (1st ‘⟨𝐹, 𝑇, 𝑅⟩))
1312fveq2d 6308 . . . . . . . 8 ((𝑠 = 𝑆𝑏 = ⟨𝐹, 𝑇, 𝑅⟩) → (2nd ‘(1st𝑏)) = (2nd ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩)))
1411fveq2d 6308 . . . . . . . 8 ((𝑠 = 𝑆𝑏 = ⟨𝐹, 𝑇, 𝑅⟩) → (♯‘𝑠) = (♯‘𝑆))
1513, 14opeq12d 4517 . . . . . . 7 ((𝑠 = 𝑆𝑏 = ⟨𝐹, 𝑇, 𝑅⟩) → ⟨(2nd ‘(1st𝑏)), (♯‘𝑠)⟩ = ⟨(2nd ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩)), (♯‘𝑆)⟩)
1611, 15oveq12d 6783 . . . . . 6 ((𝑠 = 𝑆𝑏 = ⟨𝐹, 𝑇, 𝑅⟩) → (𝑠 substr ⟨(2nd ‘(1st𝑏)), (♯‘𝑠)⟩) = (𝑆 substr ⟨(2nd ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩)), (♯‘𝑆)⟩))
1710, 16oveq12d 6783 . . . . 5 ((𝑠 = 𝑆𝑏 = ⟨𝐹, 𝑇, 𝑅⟩) → (((𝑠 substr ⟨0, (1st ‘(1st𝑏))⟩) ++ (2nd𝑏)) ++ (𝑠 substr ⟨(2nd ‘(1st𝑏)), (♯‘𝑠)⟩)) = (((𝑆 substr ⟨0, (1st ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩))⟩) ++ (2nd ‘⟨𝐹, 𝑇, 𝑅⟩)) ++ (𝑆 substr ⟨(2nd ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩)), (♯‘𝑆)⟩)))
18 df-splice 13411 . . . . 5 splice = (𝑠 ∈ V, 𝑏 ∈ V ↦ (((𝑠 substr ⟨0, (1st ‘(1st𝑏))⟩) ++ (2nd𝑏)) ++ (𝑠 substr ⟨(2nd ‘(1st𝑏)), (♯‘𝑠)⟩)))
19 ovex 6793 . . . . 5 (((𝑆 substr ⟨0, (1st ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩))⟩) ++ (2nd ‘⟨𝐹, 𝑇, 𝑅⟩)) ++ (𝑆 substr ⟨(2nd ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩)), (♯‘𝑆)⟩)) ∈ V
2017, 18, 19ovmpt2a 6908 . . . 4 ((𝑆 ∈ V ∧ ⟨𝐹, 𝑇, 𝑅⟩ ∈ V) → (𝑆 splice ⟨𝐹, 𝑇, 𝑅⟩) = (((𝑆 substr ⟨0, (1st ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩))⟩) ++ (2nd ‘⟨𝐹, 𝑇, 𝑅⟩)) ++ (𝑆 substr ⟨(2nd ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩)), (♯‘𝑆)⟩)))
211, 2, 20sylancl 697 . . 3 (𝑆 ∈ Word 𝐴 → (𝑆 splice ⟨𝐹, 𝑇, 𝑅⟩) = (((𝑆 substr ⟨0, (1st ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩))⟩) ++ (2nd ‘⟨𝐹, 𝑇, 𝑅⟩)) ++ (𝑆 substr ⟨(2nd ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩)), (♯‘𝑆)⟩)))
2221adantr 472 . 2 ((𝑆 ∈ Word 𝐴𝑅 ∈ Word 𝐴) → (𝑆 splice ⟨𝐹, 𝑇, 𝑅⟩) = (((𝑆 substr ⟨0, (1st ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩))⟩) ++ (2nd ‘⟨𝐹, 𝑇, 𝑅⟩)) ++ (𝑆 substr ⟨(2nd ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩)), (♯‘𝑆)⟩)))
23 swrdcl 13539 . . . . 5 (𝑆 ∈ Word 𝐴 → (𝑆 substr ⟨0, (1st ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩))⟩) ∈ Word 𝐴)
2423adantr 472 . . . 4 ((𝑆 ∈ Word 𝐴𝑅 ∈ Word 𝐴) → (𝑆 substr ⟨0, (1st ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩))⟩) ∈ Word 𝐴)
25 ot3rdg 7301 . . . . . 6 (𝑅 ∈ Word 𝐴 → (2nd ‘⟨𝐹, 𝑇, 𝑅⟩) = 𝑅)
2625adantl 473 . . . . 5 ((𝑆 ∈ Word 𝐴𝑅 ∈ Word 𝐴) → (2nd ‘⟨𝐹, 𝑇, 𝑅⟩) = 𝑅)
27 simpr 479 . . . . 5 ((𝑆 ∈ Word 𝐴𝑅 ∈ Word 𝐴) → 𝑅 ∈ Word 𝐴)
2826, 27eqeltrd 2803 . . . 4 ((𝑆 ∈ Word 𝐴𝑅 ∈ Word 𝐴) → (2nd ‘⟨𝐹, 𝑇, 𝑅⟩) ∈ Word 𝐴)
29 ccatcl 13467 . . . 4 (((𝑆 substr ⟨0, (1st ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩))⟩) ∈ Word 𝐴 ∧ (2nd ‘⟨𝐹, 𝑇, 𝑅⟩) ∈ Word 𝐴) → ((𝑆 substr ⟨0, (1st ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩))⟩) ++ (2nd ‘⟨𝐹, 𝑇, 𝑅⟩)) ∈ Word 𝐴)
3024, 28, 29syl2anc 696 . . 3 ((𝑆 ∈ Word 𝐴𝑅 ∈ Word 𝐴) → ((𝑆 substr ⟨0, (1st ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩))⟩) ++ (2nd ‘⟨𝐹, 𝑇, 𝑅⟩)) ∈ Word 𝐴)
31 swrdcl 13539 . . . 4 (𝑆 ∈ Word 𝐴 → (𝑆 substr ⟨(2nd ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩)), (♯‘𝑆)⟩) ∈ Word 𝐴)
3231adantr 472 . . 3 ((𝑆 ∈ Word 𝐴𝑅 ∈ Word 𝐴) → (𝑆 substr ⟨(2nd ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩)), (♯‘𝑆)⟩) ∈ Word 𝐴)
33 ccatcl 13467 . . 3 ((((𝑆 substr ⟨0, (1st ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩))⟩) ++ (2nd ‘⟨𝐹, 𝑇, 𝑅⟩)) ∈ Word 𝐴 ∧ (𝑆 substr ⟨(2nd ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩)), (♯‘𝑆)⟩) ∈ Word 𝐴) → (((𝑆 substr ⟨0, (1st ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩))⟩) ++ (2nd ‘⟨𝐹, 𝑇, 𝑅⟩)) ++ (𝑆 substr ⟨(2nd ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩)), (♯‘𝑆)⟩)) ∈ Word 𝐴)
3430, 32, 33syl2anc 696 . 2 ((𝑆 ∈ Word 𝐴𝑅 ∈ Word 𝐴) → (((𝑆 substr ⟨0, (1st ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩))⟩) ++ (2nd ‘⟨𝐹, 𝑇, 𝑅⟩)) ++ (𝑆 substr ⟨(2nd ‘(1st ‘⟨𝐹, 𝑇, 𝑅⟩)), (♯‘𝑆)⟩)) ∈ Word 𝐴)
3522, 34eqeltrd 2803 1 ((𝑆 ∈ Word 𝐴𝑅 ∈ Word 𝐴) → (𝑆 splice ⟨𝐹, 𝑇, 𝑅⟩) ∈ Word 𝐴)
 Colors of variables: wff setvar class Syntax hints:   → wi 4   ∧ wa 383   = wceq 1596   ∈ wcel 2103  Vcvv 3304  ⟨cop 4291  ⟨cotp 4293  ‘cfv 6001  (class class class)co 6765  1st c1st 7283  2nd c2nd 7284  0cc0 10049  ♯chash 13232  Word cword 13398   ++ cconcat 13400   substr csubstr 13402   splice csplice 13403 This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1835  ax-4 1850  ax-5 1952  ax-6 2018  ax-7 2054  ax-8 2105  ax-9 2112  ax-10 2132  ax-11 2147  ax-12 2160  ax-13 2355  ax-ext 2704  ax-rep 4879  ax-sep 4889  ax-nul 4897  ax-pow 4948  ax-pr 5011  ax-un 7066  ax-cnex 10105  ax-resscn 10106  ax-1cn 10107  ax-icn 10108  ax-addcl 10109  ax-addrcl 10110  ax-mulcl 10111  ax-mulrcl 10112  ax-mulcom 10113  ax-addass 10114  ax-mulass 10115  ax-distr 10116  ax-i2m1 10117  ax-1ne0 10118  ax-1rid 10119  ax-rnegex 10120  ax-rrecex 10121  ax-cnre 10122  ax-pre-lttri 10123  ax-pre-lttrn 10124  ax-pre-ltadd 10125  ax-pre-mulgt0 10126 This theorem depends on definitions:  df-bi 197  df-or 384  df-an 385  df-3or 1073  df-3an 1074  df-tru 1599  df-ex 1818  df-nf 1823  df-sb 2011  df-eu 2575  df-mo 2576  df-clab 2711  df-cleq 2717  df-clel 2720  df-nfc 2855  df-ne 2897  df-nel 3000  df-ral 3019  df-rex 3020  df-reu 3021  df-rab 3023  df-v 3306  df-sbc 3542  df-csb 3640  df-dif 3683  df-un 3685  df-in 3687  df-ss 3694  df-pss 3696  df-nul 4024  df-if 4195  df-pw 4268  df-sn 4286  df-pr 4288  df-tp 4290  df-op 4292  df-ot 4294  df-uni 4545  df-int 4584  df-iun 4630  df-br 4761  df-opab 4821  df-mpt 4838  df-tr 4861  df-id 5128  df-eprel 5133  df-po 5139  df-so 5140  df-fr 5177  df-we 5179  df-xp 5224  df-rel 5225  df-cnv 5226  df-co 5227  df-dm 5228  df-rn 5229  df-res 5230  df-ima 5231  df-pred 5793  df-ord 5839  df-on 5840  df-lim 5841  df-suc 5842  df-iota 5964  df-fun 6003  df-fn 6004  df-f 6005  df-f1 6006  df-fo 6007  df-f1o 6008  df-fv 6009  df-riota 6726  df-ov 6768  df-oprab 6769  df-mpt2 6770  df-om 7183  df-1st 7285  df-2nd 7286  df-wrecs 7527  df-recs 7588  df-rdg 7626  df-1o 7680  df-oadd 7684  df-er 7862  df-en 8073  df-dom 8074  df-sdom 8075  df-fin 8076  df-card 8878  df-pnf 10189  df-mnf 10190  df-xr 10191  df-ltxr 10192  df-le 10193  df-sub 10381  df-neg 10382  df-nn 11134  df-n0 11406  df-z 11491  df-uz 11801  df-fz 12441  df-fzo 12581  df-hash 13233  df-word 13406  df-concat 13408  df-substr 13410  df-splice 13411 This theorem is referenced by:  psgnunilem2  18036  efglem  18250  efgtf  18256  frgpuplem  18306
 Copyright terms: Public domain W3C validator