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

Theorem ccatval2 14620
Description: Value of a symbol in the right half of a concatenated word. (Contributed by Stefan O'Rear, 15-Aug-2015.) (Revised by Mario Carneiro, 22-Sep-2015.)
Assertion
Ref Expression
ccatval2 ((𝑆 ∈ Word 𝐵𝑇 ∈ Word 𝐵𝐼 ∈ ((♯‘𝑆)..^((♯‘𝑆) + (♯‘𝑇)))) → ((𝑆 ++ 𝑇)‘𝐼) = (𝑇‘(𝐼 − (♯‘𝑆))))

Proof of Theorem ccatval2
Dummy variable 𝑥 is distinct from all other variables.
StepHypRef Expression
1 ccatfval 14615 . . 3 ((𝑆 ∈ Word 𝐵𝑇 ∈ Word 𝐵) → (𝑆 ++ 𝑇) = (𝑥 ∈ (0..^((♯‘𝑆) + (♯‘𝑇))) ↦ if(𝑥 ∈ (0..^(♯‘𝑆)), (𝑆𝑥), (𝑇‘(𝑥 − (♯‘𝑆))))))
213adant3 1150 . 2 ((𝑆 ∈ Word 𝐵𝑇 ∈ Word 𝐵𝐼 ∈ ((♯‘𝑆)..^((♯‘𝑆) + (♯‘𝑇)))) → (𝑆 ++ 𝑇) = (𝑥 ∈ (0..^((♯‘𝑆) + (♯‘𝑇))) ↦ if(𝑥 ∈ (0..^(♯‘𝑆)), (𝑆𝑥), (𝑇‘(𝑥 − (♯‘𝑆))))))
3 eleq1 2851 . . . 4 (𝑥 = 𝐼 → (𝑥 ∈ (0..^(♯‘𝑆)) ↔ 𝐼 ∈ (0..^(♯‘𝑆))))
4 fveq2 6881 . . . 4 (𝑥 = 𝐼 → (𝑆𝑥) = (𝑆𝐼))
5 fvoveq1 7433 . . . 4 (𝑥 = 𝐼 → (𝑇‘(𝑥 − (♯‘𝑆))) = (𝑇‘(𝐼 − (♯‘𝑆))))
63, 4, 5ifbieq12d 4516 . . 3 (𝑥 = 𝐼 → if(𝑥 ∈ (0..^(♯‘𝑆)), (𝑆𝑥), (𝑇‘(𝑥 − (♯‘𝑆)))) = if(𝐼 ∈ (0..^(♯‘𝑆)), (𝑆𝐼), (𝑇‘(𝐼 − (♯‘𝑆)))))
7 fzodisj 13727 . . . . . 6 ((0..^(♯‘𝑆)) ∩ ((♯‘𝑆)..^((♯‘𝑆) + (♯‘𝑇)))) = ∅
8 minel 4426 . . . . . 6 ((𝐼 ∈ ((♯‘𝑆)..^((♯‘𝑆) + (♯‘𝑇))) ∧ ((0..^(♯‘𝑆)) ∩ ((♯‘𝑆)..^((♯‘𝑆) + (♯‘𝑇)))) = ∅) → ¬ 𝐼 ∈ (0..^(♯‘𝑆)))
97, 8mpan2 703 . . . . 5 (𝐼 ∈ ((♯‘𝑆)..^((♯‘𝑆) + (♯‘𝑇))) → ¬ 𝐼 ∈ (0..^(♯‘𝑆)))
1093ad2ant3 1153 . . . 4 ((𝑆 ∈ Word 𝐵𝑇 ∈ Word 𝐵𝐼 ∈ ((♯‘𝑆)..^((♯‘𝑆) + (♯‘𝑇)))) → ¬ 𝐼 ∈ (0..^(♯‘𝑆)))
1110iffalsed 4498 . . 3 ((𝑆 ∈ Word 𝐵𝑇 ∈ Word 𝐵𝐼 ∈ ((♯‘𝑆)..^((♯‘𝑆) + (♯‘𝑇)))) → if(𝐼 ∈ (0..^(♯‘𝑆)), (𝑆𝐼), (𝑇‘(𝐼 − (♯‘𝑆)))) = (𝑇‘(𝐼 − (♯‘𝑆))))
126, 11sylan9eqr 2820 . 2 (((𝑆 ∈ Word 𝐵𝑇 ∈ Word 𝐵𝐼 ∈ ((♯‘𝑆)..^((♯‘𝑆) + (♯‘𝑇)))) ∧ 𝑥 = 𝐼) → if(𝑥 ∈ (0..^(♯‘𝑆)), (𝑆𝑥), (𝑇‘(𝑥 − (♯‘𝑆)))) = (𝑇‘(𝐼 − (♯‘𝑆))))
13 wrdfin 14574 . . . . . 6 (𝑆 ∈ Word 𝐵𝑆 ∈ Fin)
1413adantr 485 . . . . 5 ((𝑆 ∈ Word 𝐵𝑇 ∈ Word 𝐵) → 𝑆 ∈ Fin)
15 hashcl 14397 . . . . 5 (𝑆 ∈ Fin → (♯‘𝑆) ∈ ℕ0)
16 fzoss1 13720 . . . . . 6 ((♯‘𝑆) ∈ (ℤ‘0) → ((♯‘𝑆)..^((♯‘𝑆) + (♯‘𝑇))) ⊆ (0..^((♯‘𝑆) + (♯‘𝑇))))
17 nn0uz 12904 . . . . . 6 0 = (ℤ‘0)
1816, 17eleq2s 2881 . . . . 5 ((♯‘𝑆) ∈ ℕ0 → ((♯‘𝑆)..^((♯‘𝑆) + (♯‘𝑇))) ⊆ (0..^((♯‘𝑆) + (♯‘𝑇))))
1914, 15, 183syl 19 . . . 4 ((𝑆 ∈ Word 𝐵𝑇 ∈ Word 𝐵) → ((♯‘𝑆)..^((♯‘𝑆) + (♯‘𝑇))) ⊆ (0..^((♯‘𝑆) + (♯‘𝑇))))
2019sseld 3936 . . 3 ((𝑆 ∈ Word 𝐵𝑇 ∈ Word 𝐵) → (𝐼 ∈ ((♯‘𝑆)..^((♯‘𝑆) + (♯‘𝑇))) → 𝐼 ∈ (0..^((♯‘𝑆) + (♯‘𝑇)))))
21203impia 1135 . 2 ((𝑆 ∈ Word 𝐵𝑇 ∈ Word 𝐵𝐼 ∈ ((♯‘𝑆)..^((♯‘𝑆) + (♯‘𝑇)))) → 𝐼 ∈ (0..^((♯‘𝑆) + (♯‘𝑇))))
22 fvexd 6896 . 2 ((𝑆 ∈ Word 𝐵𝑇 ∈ Word 𝐵𝐼 ∈ ((♯‘𝑆)..^((♯‘𝑆) + (♯‘𝑇)))) → (𝑇‘(𝐼 − (♯‘𝑆))) ∈ V)
232, 12, 21, 22fvmptd 6997 1 ((𝑆 ∈ Word 𝐵𝑇 ∈ Word 𝐵𝐼 ∈ ((♯‘𝑆)..^((♯‘𝑆) + (♯‘𝑇)))) → ((𝑆 ++ 𝑇)‘𝐼) = (𝑇‘(𝐼 − (♯‘𝑆))))
Colors of variables:    wff setvar class
This proof depends on syntax axioms:  ¬ wn 3  wi 4  wa 400  w3a 1103   = wceq 1570  wcel 2143  Vcvv 3455  cin 3904  wss 3905  c0 4286  ifcif 4487  cmpt 5192  cfv 6536  (class class class)co 7410  Fincfn 8939  0cc0 11104   + caddc 11107  cmin 11445  0cn0 12508  cuz 12866  ..^cfzo 13687  chash 14371  Word cword 14555   ++ cconcat 14612
This proof depends on axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1825  ax-4 1839  ax-5 1940  ax-6 1997  ax-7 2038  ax-8 2145  ax-9 2153  ax-10 2176  ax-11 2192  ax-12 2213  ax-ext 2735  ax-rep 5238  ax-sep 5257  ax-nul 5269  ax-pow 5336  ax-pr 5404  ax-un 7732  ax-cnex 11160  ax-resscn 11161  ax-1cn 11162  ax-icn 11163  ax-addcl 11164  ax-addrcl 11165  ax-mulcl 11166  ax-mulrcl 11167  ax-mulcom 11168  ax-addass 11169  ax-mulass 11170  ax-distr 11171  ax-i2m1 11172  ax-1ne0 11173  ax-1rid 11174  ax-rnegex 11175  ax-rrecex 11176  ax-cnre 11177  ax-pre-lttri 11178  ax-pre-lttrn 11179  ax-pre-ltadd 11180  ax-pre-mulgt0 11181
This proof depends on definitions:  df-bi 210  df-an 401  df-or 861  df-3or 1104  df-3an 1105  df-tru 1573  df-fal 1583  df-ex 1810  df-nf 1814  df-sb 2097  df-mo 2567  df-eu 2597  df-clab 2742  df-cleq 2755  df-clel 2838  df-nfc 2912  df-ne 2959  df-nel 3065  df-ral 3080  df-rex 3090  df-reu 3370  df-rab 3417  df-v 3457  df-sbc 3745  df-csb 3854  df-dif 3908  df-un 3910  df-in 3912  df-ss 3922  df-pss 3925  df-nul 4287  df-if 4488  df-pw 4564  df-sn 4590  df-pr 4592  df-op 4596  df-uni 4873  df-int 4913  df-iun 4958  df-br 5110  df-opab 5174  df-mpt 5193  df-tr 5219  df-id 5556  df-eprel 5561  df-po 5569  df-so 5570  df-fr 5614  df-we 5616  df-xp 5667  df-rel 5668  df-cnv 5669  df-co 5670  df-dm 5671  df-rn 5672  df-res 5673  df-ima 5674  df-pred 6302  df-ord 6363  df-on 6364  df-lim 6365  df-suc 6366  df-iota 6492  df-fun 6538  df-fn 6539  df-f 6540  df-f1 6541  df-fo 6542  df-f1o 6543  df-fv 6544  df-riota 7367  df-ov 7413  df-oprab 7414  df-mpo 7415  df-om 7859  df-1st 7982  df-2nd 7983  df-frecs 8274  df-wrecs 8305  df-recs 8354  df-rdg 8393  df-1o 8449  df-er 8690  df-en 8940  df-dom 8941  df-sdom 8942  df-fin 8943  df-card 9930  df-pnf 11249  df-mnf 11250  df-xr 11251  df-ltxr 11252  df-le 11253  df-sub 11447  df-neg 11448  df-nn 12238  df-n0 12509  df-z 12596  df-uz 12867  df-fz 13540  df-fzo 13688  df-hash 14372  df-word 14556  df-concat 14613
This theorem is used by:  ccatval3  14621  ccatsymb  14625  ccatval21sw  14628  ccatlid  14629  ccatass  14631  ccatrn  14632  lswccatn0lsw  14634  ccats1val2  14670  ccat2s1p2  14673  ccatswrd  14711  ccatpfx  14743  pfxccatin12lem2  14773  pfxccatin12  14775  revccat  14808  cshwidxmod  14845  chnccat  18686  clwwlkccatlem  30349  ccatf1  33278  cycpmco2lem2  33456  cycpmco2lem4  33458
  Copyright terms: Public domain W3C validator