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

Theorem ccatlen 14632
Description: The length of a concatenated word. (Contributed by Stefan O'Rear, 15-Aug-2015.) (Revised by JJ, 1-Jan-2024.)
Assertion
Ref Expression
ccatlen ((𝑆 ∈ Word 𝐴𝑇 ∈ Word 𝐵) → (♯‘(𝑆 ++ 𝑇)) = ((♯‘𝑆) + (♯‘𝑇)))

Proof of Theorem ccatlen
Dummy variable 𝑥 is distinct from all other variables.
StepHypRef Expression
1 ccatfval 14630 . . 3 ((𝑆 ∈ Word 𝐴𝑇 ∈ Word 𝐵) → (𝑆 ++ 𝑇) = (𝑥 ∈ (0..^((♯‘𝑆) + (♯‘𝑇))) ↦ if(𝑥 ∈ (0..^(♯‘𝑆)), (𝑆𝑥), (𝑇‘(𝑥 − (♯‘𝑆))))))
21fveq2d 6892 . 2 ((𝑆 ∈ Word 𝐴𝑇 ∈ Word 𝐵) → (♯‘(𝑆 ++ 𝑇)) = (♯‘(𝑥 ∈ (0..^((♯‘𝑆) + (♯‘𝑇))) ↦ if(𝑥 ∈ (0..^(♯‘𝑆)), (𝑆𝑥), (𝑇‘(𝑥 − (♯‘𝑆)))))))
3 fvex 6901 . . . . 5 (𝑆𝑥) ∈ V
4 fvex 6901 . . . . 5 (𝑇‘(𝑥 − (♯‘𝑆))) ∈ V
53, 4ifex 4543 . . . 4 if(𝑥 ∈ (0..^(♯‘𝑆)), (𝑆𝑥), (𝑇‘(𝑥 − (♯‘𝑆)))) ∈ V
6 eqid 2766 . . . 4 (𝑥 ∈ (0..^((♯‘𝑆) + (♯‘𝑇))) ↦ if(𝑥 ∈ (0..^(♯‘𝑆)), (𝑆𝑥), (𝑇‘(𝑥 − (♯‘𝑆))))) = (𝑥 ∈ (0..^((♯‘𝑆) + (♯‘𝑇))) ↦ if(𝑥 ∈ (0..^(♯‘𝑆)), (𝑆𝑥), (𝑇‘(𝑥 − (♯‘𝑆)))))
75, 6fnmpti 6685 . . 3 (𝑥 ∈ (0..^((♯‘𝑆) + (♯‘𝑇))) ↦ if(𝑥 ∈ (0..^(♯‘𝑆)), (𝑆𝑥), (𝑇‘(𝑥 − (♯‘𝑆))))) Fn (0..^((♯‘𝑆) + (♯‘𝑇)))
8 hashfn 14431 . . 3 ((𝑥 ∈ (0..^((♯‘𝑆) + (♯‘𝑇))) ↦ if(𝑥 ∈ (0..^(♯‘𝑆)), (𝑆𝑥), (𝑇‘(𝑥 − (♯‘𝑆))))) Fn (0..^((♯‘𝑆) + (♯‘𝑇))) → (♯‘(𝑥 ∈ (0..^((♯‘𝑆) + (♯‘𝑇))) ↦ if(𝑥 ∈ (0..^(♯‘𝑆)), (𝑆𝑥), (𝑇‘(𝑥 − (♯‘𝑆)))))) = (♯‘(0..^((♯‘𝑆) + (♯‘𝑇)))))
97, 8mp1i 14 . 2 ((𝑆 ∈ Word 𝐴𝑇 ∈ Word 𝐵) → (♯‘(𝑥 ∈ (0..^((♯‘𝑆) + (♯‘𝑇))) ↦ if(𝑥 ∈ (0..^(♯‘𝑆)), (𝑆𝑥), (𝑇‘(𝑥 − (♯‘𝑆)))))) = (♯‘(0..^((♯‘𝑆) + (♯‘𝑇)))))
10 lencl 14590 . . . 4 (𝑆 ∈ Word 𝐴 → (♯‘𝑆) ∈ ℕ0)
11 lencl 14590 . . . 4 (𝑇 ∈ Word 𝐵 → (♯‘𝑇) ∈ ℕ0)
12 nn0addcl 12557 . . . 4 (((♯‘𝑆) ∈ ℕ0 ∧ (♯‘𝑇) ∈ ℕ0) → ((♯‘𝑆) + (♯‘𝑇)) ∈ ℕ0)
1310, 11, 12syl2an 608 . . 3 ((𝑆 ∈ Word 𝐴𝑇 ∈ Word 𝐵) → ((♯‘𝑆) + (♯‘𝑇)) ∈ ℕ0)
14 hashfzo0 14487 . . 3 (((♯‘𝑆) + (♯‘𝑇)) ∈ ℕ0 → (♯‘(0..^((♯‘𝑆) + (♯‘𝑇)))) = ((♯‘𝑆) + (♯‘𝑇)))
1513, 14syl 18 . 2 ((𝑆 ∈ Word 𝐴𝑇 ∈ Word 𝐵) → (♯‘(0..^((♯‘𝑆) + (♯‘𝑇)))) = ((♯‘𝑆) + (♯‘𝑇)))
162, 9, 153eqtrd 2805 1 ((𝑆 ∈ Word 𝐴𝑇 ∈ Word 𝐵) → (♯‘(𝑆 ++ 𝑇)) = ((♯‘𝑆) + (♯‘𝑇)))
Colors of variables:    wff setvar class
This proof depends on syntax axioms:  wi 4  wa 401   = wceq 1570  wcel 2146  ifcif 4492  cmpt 5197   Fn wfn 6538  cfv 6543  (class class class)co 7423  0cc0 11118   + caddc 11121  cmin 11459  0cn0 12522  ..^cfzo 13701  chash 14386  Word cword 14570   ++ cconcat 14627
This proof depends on axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1828  ax-4 1842  ax-5 1943  ax-6 2000  ax-7 2041  ax-8 2148  ax-9 2156  ax-10 2179  ax-11 2195  ax-12 2216  ax-ext 2738  ax-rep 5243  ax-sep 5262  ax-nul 5274  ax-pow 5341  ax-pr 5409  ax-un 7745  ax-cnex 11174  ax-resscn 11175  ax-1cn 11176  ax-icn 11177  ax-addcl 11178  ax-addrcl 11179  ax-mulcl 11180  ax-mulrcl 11181  ax-mulcom 11182  ax-addass 11183  ax-mulass 11184  ax-distr 11185  ax-i2m1 11186  ax-1ne0 11187  ax-1rid 11188  ax-rnegex 11189  ax-rrecex 11190  ax-cnre 11191  ax-pre-lttri 11192  ax-pre-lttrn 11193  ax-pre-ltadd 11194  ax-pre-mulgt0 11195
This proof depends on definitions:  df-bi 210  df-an 402  df-or 862  df-3or 1104  df-3an 1105  df-tru 1573  df-fal 1583  df-ex 1813  df-nf 1817  df-sb 2100  df-mo 2570  df-eu 2600  df-clab 2745  df-cleq 2758  df-clel 2841  df-nfc 2915  df-ne 2962  df-nel 3068  df-ral 3083  df-rex 3093  df-reu 3373  df-rab 3420  df-v 3460  df-sbc 3748  df-csb 3857  df-dif 3911  df-un 3913  df-in 3915  df-ss 3925  df-pss 3928  df-nul 4290  df-if 4493  df-pw 4569  df-sn 4595  df-pr 4597  df-op 4601  df-uni 4878  df-int 4918  df-iun 4963  df-br 5115  df-opab 5179  df-mpt 5198  df-tr 5224  df-id 5561  df-eprel 5566  df-po 5574  df-so 5575  df-fr 5619  df-we 5621  df-xp 5672  df-rel 5673  df-cnv 5674  df-co 5675  df-dm 5676  df-rn 5677  df-res 5678  df-ima 5679  df-pred 6309  df-ord 6370  df-on 6371  df-lim 6372  df-suc 6373  df-iota 6499  df-fun 6545  df-fn 6546  df-f 6547  df-f1 6548  df-fo 6549  df-f1o 6550  df-fv 6551  df-riota 7380  df-ov 7426  df-oprab 7427  df-mpo 7428  df-om 7872  df-1st 7995  df-2nd 7996  df-frecs 8287  df-wrecs 8318  df-recs 8367  df-rdg 8406  df-1o 8462  df-er 8703  df-en 8953  df-dom 8954  df-sdom 8955  df-fin 8956  df-card 9944  df-pnf 11263  df-mnf 11264  df-xr 11265  df-ltxr 11266  df-le 11267  df-sub 11461  df-neg 11462  df-nn 12252  df-n0 12523  df-z 12610  df-uz 12881  df-fz 13554  df-fzo 13702  df-hash 14387  df-word 14571  df-concat 14628
This theorem is used by:  ccat0  14633  elfzelfzccat  14637  ccatdmss  14639  ccatsymb  14640  ccatass  14646  ccatf1  14648  lswccatn0lsw  14650  ccatws1len  14680  ccat2s1len  14683  ccatswrd  14730  swrdccat2  14731  ccatpfx  14762  pfxccat1  14763  lenrevpfxcctswrd  14773  ccatopth  14777  ccatopth2  14778  swrdccatfn  14785  swrdccatin2  14790  pfxccatin12lem2c  14791  spllen  14815  splfv1  14816  splfv2a  14817  splval2  14818  revccat  14827  cshwlen  14862  cats1len  14923  chnccat  18707  gsumsgrpccat  18930  psgnuni  19600  efginvrel2  19828  efgsval2  19834  efgsp1  19838  efgredleme  19844  efgredlemc  19846  efgcpbllemb  19856  pgpfaclem1  20184  psgnghm  21767  wwlksnext  30279  wwlksnextbi  30280  clwwlkccatlem  30377  clwlkclwwlk2  30391  clwwlkel  30434  clwwlkwwlksb  30442  clwwlknccat  30451  splfv3  33309  gsumwrd2dccatlem  33428  cycpmco2lem3  33479  cycpmco2lem4  33480  cycpmco2lem5  33481  cycpmco2lem6  33482  cycpmco2  33484  ofcccat  34965  signstfvn  34988  signstfvp  34990  signstfvc  34993  signsvfn  35001  signshf  35007  lpadlen2  35103  elmrsubrn  36033  ccatcan2d  43060  frlmfzoccat  43320
  Copyright terms: Public domain W3C validator