Mathbox for Thierry Arnoux < Previous   Next > Nearby theorems Mirrors  >  Home  >  MPE Home  >  Th. List  >   Mathboxes  >  swrdrn3 Structured version   Visualization version   GIF version

Theorem swrdrn3 30626
 Description: Express the range of a subword. Stronger version of swrdrn2 30625. (Contributed by Thierry Arnoux, 13-Dec-2023.)
Assertion
Ref Expression
swrdrn3 ((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) → ran (𝑊 substr ⟨𝑀, 𝑁⟩) = (𝑊 “ (𝑀..^𝑁)))

Proof of Theorem swrdrn3
Dummy variables 𝑖 𝑗 𝑦 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 simpr 488 . . . . . 6 (((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) ∧ 𝑖 ∈ (0..^(𝑁𝑀))) → 𝑖 ∈ (0..^(𝑁𝑀)))
2 fzssz 12902 . . . . . . 7 (0...(♯‘𝑊)) ⊆ ℤ
3 simpl3 1190 . . . . . . 7 (((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) ∧ 𝑖 ∈ (0..^(𝑁𝑀))) → 𝑁 ∈ (0...(♯‘𝑊)))
42, 3sseldi 3949 . . . . . 6 (((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) ∧ 𝑖 ∈ (0..^(𝑁𝑀))) → 𝑁 ∈ ℤ)
5 fzssz 12902 . . . . . . 7 (0...𝑁) ⊆ ℤ
6 simpl2 1189 . . . . . . 7 (((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) ∧ 𝑖 ∈ (0..^(𝑁𝑀))) → 𝑀 ∈ (0...𝑁))
75, 6sseldi 3949 . . . . . 6 (((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) ∧ 𝑖 ∈ (0..^(𝑁𝑀))) → 𝑀 ∈ ℤ)
8 fzoaddel2 13086 . . . . . 6 ((𝑖 ∈ (0..^(𝑁𝑀)) ∧ 𝑁 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (𝑖 + 𝑀) ∈ (𝑀..^𝑁))
91, 4, 7, 8syl3anc 1368 . . . . 5 (((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) ∧ 𝑖 ∈ (0..^(𝑁𝑀))) → (𝑖 + 𝑀) ∈ (𝑀..^𝑁))
10 simpr 488 . . . . . . . 8 (((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) ∧ 𝑗 ∈ (𝑀..^𝑁)) → 𝑗 ∈ (𝑀..^𝑁))
11 simpl2 1189 . . . . . . . . . . . 12 (((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) ∧ 𝑗 ∈ (𝑀..^𝑁)) → 𝑀 ∈ (0...𝑁))
125, 11sseldi 3949 . . . . . . . . . . 11 (((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) ∧ 𝑗 ∈ (𝑀..^𝑁)) → 𝑀 ∈ ℤ)
1312zcnd 12074 . . . . . . . . . 10 (((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) ∧ 𝑗 ∈ (𝑀..^𝑁)) → 𝑀 ∈ ℂ)
14 simpl3 1190 . . . . . . . . . . . 12 (((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) ∧ 𝑗 ∈ (𝑀..^𝑁)) → 𝑁 ∈ (0...(♯‘𝑊)))
152, 14sseldi 3949 . . . . . . . . . . 11 (((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) ∧ 𝑗 ∈ (𝑀..^𝑁)) → 𝑁 ∈ ℤ)
1615zcnd 12074 . . . . . . . . . 10 (((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) ∧ 𝑗 ∈ (𝑀..^𝑁)) → 𝑁 ∈ ℂ)
1713, 16pncan3d 10985 . . . . . . . . 9 (((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) ∧ 𝑗 ∈ (𝑀..^𝑁)) → (𝑀 + (𝑁𝑀)) = 𝑁)
1817oveq2d 7154 . . . . . . . 8 (((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) ∧ 𝑗 ∈ (𝑀..^𝑁)) → (𝑀..^(𝑀 + (𝑁𝑀))) = (𝑀..^𝑁))
1910, 18eleqtrrd 2919 . . . . . . 7 (((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) ∧ 𝑗 ∈ (𝑀..^𝑁)) → 𝑗 ∈ (𝑀..^(𝑀 + (𝑁𝑀))))
2015, 12zsubcld 12078 . . . . . . 7 (((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) ∧ 𝑗 ∈ (𝑀..^𝑁)) → (𝑁𝑀) ∈ ℤ)
21 fzosubel3 13091 . . . . . . 7 ((𝑗 ∈ (𝑀..^(𝑀 + (𝑁𝑀))) ∧ (𝑁𝑀) ∈ ℤ) → (𝑗𝑀) ∈ (0..^(𝑁𝑀)))
2219, 20, 21syl2anc 587 . . . . . 6 (((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) ∧ 𝑗 ∈ (𝑀..^𝑁)) → (𝑗𝑀) ∈ (0..^(𝑁𝑀)))
23 simpr 488 . . . . . . . 8 ((((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) ∧ 𝑗 ∈ (𝑀..^𝑁)) ∧ 𝑖 = (𝑗𝑀)) → 𝑖 = (𝑗𝑀))
2423oveq1d 7153 . . . . . . 7 ((((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) ∧ 𝑗 ∈ (𝑀..^𝑁)) ∧ 𝑖 = (𝑗𝑀)) → (𝑖 + 𝑀) = ((𝑗𝑀) + 𝑀))
2524eqeq2d 2835 . . . . . 6 ((((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) ∧ 𝑗 ∈ (𝑀..^𝑁)) ∧ 𝑖 = (𝑗𝑀)) → (𝑗 = (𝑖 + 𝑀) ↔ 𝑗 = ((𝑗𝑀) + 𝑀)))
26 fzossz 13050 . . . . . . . . . 10 (𝑀..^𝑁) ⊆ ℤ
2726, 10sseldi 3949 . . . . . . . . 9 (((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) ∧ 𝑗 ∈ (𝑀..^𝑁)) → 𝑗 ∈ ℤ)
2827zcnd 12074 . . . . . . . 8 (((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) ∧ 𝑗 ∈ (𝑀..^𝑁)) → 𝑗 ∈ ℂ)
2928, 13npcand 10986 . . . . . . 7 (((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) ∧ 𝑗 ∈ (𝑀..^𝑁)) → ((𝑗𝑀) + 𝑀) = 𝑗)
3029eqcomd 2830 . . . . . 6 (((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) ∧ 𝑗 ∈ (𝑀..^𝑁)) → 𝑗 = ((𝑗𝑀) + 𝑀))
3122, 25, 30rspcedvd 3611 . . . . 5 (((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) ∧ 𝑗 ∈ (𝑀..^𝑁)) → ∃𝑖 ∈ (0..^(𝑁𝑀))𝑗 = (𝑖 + 𝑀))
32 eqcom 2831 . . . . . 6 (𝑦 = (𝑊𝑗) ↔ (𝑊𝑗) = 𝑦)
33 simpr 488 . . . . . . . 8 (((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) ∧ 𝑗 = (𝑖 + 𝑀)) → 𝑗 = (𝑖 + 𝑀))
3433fveq2d 6655 . . . . . . 7 (((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) ∧ 𝑗 = (𝑖 + 𝑀)) → (𝑊𝑗) = (𝑊‘(𝑖 + 𝑀)))
3534eqeq2d 2835 . . . . . 6 (((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) ∧ 𝑗 = (𝑖 + 𝑀)) → (𝑦 = (𝑊𝑗) ↔ 𝑦 = (𝑊‘(𝑖 + 𝑀))))
3632, 35bitr3id 288 . . . . 5 (((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) ∧ 𝑗 = (𝑖 + 𝑀)) → ((𝑊𝑗) = 𝑦𝑦 = (𝑊‘(𝑖 + 𝑀))))
379, 31, 36rexxfrd 5291 . . . 4 ((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) → (∃𝑗 ∈ (𝑀..^𝑁)(𝑊𝑗) = 𝑦 ↔ ∃𝑖 ∈ (0..^(𝑁𝑀))𝑦 = (𝑊‘(𝑖 + 𝑀))))
38 eqid 2824 . . . . 5 (𝑖 ∈ (0..^(𝑁𝑀)) ↦ (𝑊‘(𝑖 + 𝑀))) = (𝑖 ∈ (0..^(𝑁𝑀)) ↦ (𝑊‘(𝑖 + 𝑀)))
39 fvex 6664 . . . . 5 (𝑊‘(𝑖 + 𝑀)) ∈ V
4038, 39elrnmpti 5813 . . . 4 (𝑦 ∈ ran (𝑖 ∈ (0..^(𝑁𝑀)) ↦ (𝑊‘(𝑖 + 𝑀))) ↔ ∃𝑖 ∈ (0..^(𝑁𝑀))𝑦 = (𝑊‘(𝑖 + 𝑀)))
4137, 40syl6bbr 292 . . 3 ((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) → (∃𝑗 ∈ (𝑀..^𝑁)(𝑊𝑗) = 𝑦𝑦 ∈ ran (𝑖 ∈ (0..^(𝑁𝑀)) ↦ (𝑊‘(𝑖 + 𝑀)))))
42 wrdf 13860 . . . . . 6 (𝑊 ∈ Word 𝑉𝑊:(0..^(♯‘𝑊))⟶𝑉)
43423ad2ant1 1130 . . . . 5 ((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) → 𝑊:(0..^(♯‘𝑊))⟶𝑉)
4443ffnd 6496 . . . 4 ((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) → 𝑊 Fn (0..^(♯‘𝑊)))
45 elfzuz 12896 . . . . . . 7 (𝑀 ∈ (0...𝑁) → 𝑀 ∈ (ℤ‘0))
46453ad2ant2 1131 . . . . . 6 ((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) → 𝑀 ∈ (ℤ‘0))
47 fzoss1 13057 . . . . . 6 (𝑀 ∈ (ℤ‘0) → (𝑀..^𝑁) ⊆ (0..^𝑁))
4846, 47syl 17 . . . . 5 ((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) → (𝑀..^𝑁) ⊆ (0..^𝑁))
49 elfzuz3 12897 . . . . . . 7 (𝑁 ∈ (0...(♯‘𝑊)) → (♯‘𝑊) ∈ (ℤ𝑁))
50493ad2ant3 1132 . . . . . 6 ((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) → (♯‘𝑊) ∈ (ℤ𝑁))
51 fzoss2 13058 . . . . . 6 ((♯‘𝑊) ∈ (ℤ𝑁) → (0..^𝑁) ⊆ (0..^(♯‘𝑊)))
5250, 51syl 17 . . . . 5 ((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) → (0..^𝑁) ⊆ (0..^(♯‘𝑊)))
5348, 52sstrd 3961 . . . 4 ((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) → (𝑀..^𝑁) ⊆ (0..^(♯‘𝑊)))
5444, 53fvelimabd 6719 . . 3 ((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) → (𝑦 ∈ (𝑊 “ (𝑀..^𝑁)) ↔ ∃𝑗 ∈ (𝑀..^𝑁)(𝑊𝑗) = 𝑦))
55 swrdval2 13997 . . . . 5 ((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) → (𝑊 substr ⟨𝑀, 𝑁⟩) = (𝑖 ∈ (0..^(𝑁𝑀)) ↦ (𝑊‘(𝑖 + 𝑀))))
5655rneqd 5789 . . . 4 ((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) → ran (𝑊 substr ⟨𝑀, 𝑁⟩) = ran (𝑖 ∈ (0..^(𝑁𝑀)) ↦ (𝑊‘(𝑖 + 𝑀))))
5756eleq2d 2901 . . 3 ((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) → (𝑦 ∈ ran (𝑊 substr ⟨𝑀, 𝑁⟩) ↔ 𝑦 ∈ ran (𝑖 ∈ (0..^(𝑁𝑀)) ↦ (𝑊‘(𝑖 + 𝑀)))))
5841, 54, 573bitr4rd 315 . 2 ((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) → (𝑦 ∈ ran (𝑊 substr ⟨𝑀, 𝑁⟩) ↔ 𝑦 ∈ (𝑊 “ (𝑀..^𝑁))))
5958eqrdv 2822 1 ((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) → ran (𝑊 substr ⟨𝑀, 𝑁⟩) = (𝑊 “ (𝑀..^𝑁)))
 Colors of variables: wff setvar class Syntax hints:   → wi 4   ∧ wa 399   ∧ w3a 1084   = wceq 1538   ∈ wcel 2115  ∃wrex 3133   ⊆ wss 3918  ⟨cop 4554   ↦ cmpt 5127  ran crn 5537   “ cima 5539  ⟶wf 6332  ‘cfv 6336  (class class class)co 7138  0cc0 10522   + caddc 10525   − cmin 10855  ℤcz 11967  ℤ≥cuz 12229  ...cfz 12883  ..^cfzo 13026  ♯chash 13684  Word cword 13855   substr csubstr 13991 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 1912  ax-6 1971  ax-7 2016  ax-8 2117  ax-9 2125  ax-10 2146  ax-11 2162  ax-12 2179  ax-ext 2796  ax-rep 5171  ax-sep 5184  ax-nul 5191  ax-pow 5247  ax-pr 5311  ax-un 7444  ax-cnex 10578  ax-resscn 10579  ax-1cn 10580  ax-icn 10581  ax-addcl 10582  ax-addrcl 10583  ax-mulcl 10584  ax-mulrcl 10585  ax-mulcom 10586  ax-addass 10587  ax-mulass 10588  ax-distr 10589  ax-i2m1 10590  ax-1ne0 10591  ax-1rid 10592  ax-rnegex 10593  ax-rrecex 10594  ax-cnre 10595  ax-pre-lttri 10596  ax-pre-lttrn 10597  ax-pre-ltadd 10598  ax-pre-mulgt0 10599 This theorem depends on definitions:  df-bi 210  df-an 400  df-or 845  df-3or 1085  df-3an 1086  df-tru 1541  df-ex 1782  df-nf 1786  df-sb 2071  df-mo 2624  df-eu 2655  df-clab 2803  df-cleq 2817  df-clel 2896  df-nfc 2964  df-ne 3014  df-nel 3118  df-ral 3137  df-rex 3138  df-reu 3139  df-rab 3141  df-v 3481  df-sbc 3758  df-csb 3866  df-dif 3921  df-un 3923  df-in 3925  df-ss 3935  df-pss 3937  df-nul 4275  df-if 4449  df-pw 4522  df-sn 4549  df-pr 4551  df-tp 4553  df-op 4555  df-uni 4820  df-int 4858  df-iun 4902  df-br 5048  df-opab 5110  df-mpt 5128  df-tr 5154  df-id 5441  df-eprel 5446  df-po 5455  df-so 5456  df-fr 5495  df-we 5497  df-xp 5542  df-rel 5543  df-cnv 5544  df-co 5545  df-dm 5546  df-rn 5547  df-res 5548  df-ima 5549  df-pred 6129  df-ord 6175  df-on 6176  df-lim 6177  df-suc 6178  df-iota 6295  df-fun 6338  df-fn 6339  df-f 6340  df-f1 6341  df-fo 6342  df-f1o 6343  df-fv 6344  df-riota 7096  df-ov 7141  df-oprab 7142  df-mpo 7143  df-om 7564  df-1st 7672  df-2nd 7673  df-wrecs 7930  df-recs 7991  df-rdg 8029  df-1o 8085  df-er 8272  df-en 8493  df-dom 8494  df-sdom 8495  df-fin 8496  df-card 9352  df-pnf 10662  df-mnf 10663  df-xr 10664  df-ltxr 10665  df-le 10666  df-sub 10857  df-neg 10858  df-nn 11624  df-n0 11884  df-z 11968  df-uz 12230  df-fz 12884  df-fzo 13027  df-hash 13685  df-word 13856  df-substr 13992 This theorem is referenced by:  swrdrndisj  30628  cycpmco2rn  30785
 Copyright terms: Public domain W3C validator