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

Theorem swrdlend 14590
Description: The value of the subword extractor is the empty set (undefined) if the range is not valid. (Contributed by Alexander van der Vekens, 16-Mar-2018.) (Proof shortened by AV, 2-May-2020.)
Assertion
Ref Expression
swrdlend ((𝑊 ∈ Word 𝑉𝐹 ∈ ℤ ∧ 𝐿 ∈ ℤ) → (𝐿𝐹 → (𝑊 substr ⟨𝐹, 𝐿⟩) = ∅))

Proof of Theorem swrdlend
Dummy variable 𝑖 is distinct from all other variables.
StepHypRef Expression
1 swrdval 14580 . . . 4 ((𝑊 ∈ Word 𝑉𝐹 ∈ ℤ ∧ 𝐿 ∈ ℤ) → (𝑊 substr ⟨𝐹, 𝐿⟩) = if((𝐹..^𝐿) ⊆ dom 𝑊, (𝑖 ∈ (0..^(𝐿𝐹)) ↦ (𝑊‘(𝑖 + 𝐹))), ∅))
21adantr 482 . . 3 (((𝑊 ∈ Word 𝑉𝐹 ∈ ℤ ∧ 𝐿 ∈ ℤ) ∧ 𝐿𝐹) → (𝑊 substr ⟨𝐹, 𝐿⟩) = if((𝐹..^𝐿) ⊆ dom 𝑊, (𝑖 ∈ (0..^(𝐿𝐹)) ↦ (𝑊‘(𝑖 + 𝐹))), ∅))
3 simpr 486 . . . . . 6 (((𝑊 ∈ Word 𝑉𝐹 ∈ ℤ ∧ 𝐿 ∈ ℤ) ∧ 𝐿𝐹) → 𝐿𝐹)
4 3simpc 1151 . . . . . . . 8 ((𝑊 ∈ Word 𝑉𝐹 ∈ ℤ ∧ 𝐿 ∈ ℤ) → (𝐹 ∈ ℤ ∧ 𝐿 ∈ ℤ))
54adantr 482 . . . . . . 7 (((𝑊 ∈ Word 𝑉𝐹 ∈ ℤ ∧ 𝐿 ∈ ℤ) ∧ 𝐿𝐹) → (𝐹 ∈ ℤ ∧ 𝐿 ∈ ℤ))
6 fzon 13640 . . . . . . 7 ((𝐹 ∈ ℤ ∧ 𝐿 ∈ ℤ) → (𝐿𝐹 ↔ (𝐹..^𝐿) = ∅))
75, 6syl 17 . . . . . 6 (((𝑊 ∈ Word 𝑉𝐹 ∈ ℤ ∧ 𝐿 ∈ ℤ) ∧ 𝐿𝐹) → (𝐿𝐹 ↔ (𝐹..^𝐿) = ∅))
83, 7mpbid 231 . . . . 5 (((𝑊 ∈ Word 𝑉𝐹 ∈ ℤ ∧ 𝐿 ∈ ℤ) ∧ 𝐿𝐹) → (𝐹..^𝐿) = ∅)
9 0ss 4394 . . . . 5 ∅ ⊆ dom 𝑊
108, 9eqsstrdi 4034 . . . 4 (((𝑊 ∈ Word 𝑉𝐹 ∈ ℤ ∧ 𝐿 ∈ ℤ) ∧ 𝐿𝐹) → (𝐹..^𝐿) ⊆ dom 𝑊)
1110iftrued 4532 . . 3 (((𝑊 ∈ Word 𝑉𝐹 ∈ ℤ ∧ 𝐿 ∈ ℤ) ∧ 𝐿𝐹) → if((𝐹..^𝐿) ⊆ dom 𝑊, (𝑖 ∈ (0..^(𝐿𝐹)) ↦ (𝑊‘(𝑖 + 𝐹))), ∅) = (𝑖 ∈ (0..^(𝐿𝐹)) ↦ (𝑊‘(𝑖 + 𝐹))))
12 fzo0n 13641 . . . . . . 7 ((𝐹 ∈ ℤ ∧ 𝐿 ∈ ℤ) → (𝐿𝐹 ↔ (0..^(𝐿𝐹)) = ∅))
1312biimpa 478 . . . . . 6 (((𝐹 ∈ ℤ ∧ 𝐿 ∈ ℤ) ∧ 𝐿𝐹) → (0..^(𝐿𝐹)) = ∅)
14133adantl1 1167 . . . . 5 (((𝑊 ∈ Word 𝑉𝐹 ∈ ℤ ∧ 𝐿 ∈ ℤ) ∧ 𝐿𝐹) → (0..^(𝐿𝐹)) = ∅)
1514mpteq1d 5239 . . . 4 (((𝑊 ∈ Word 𝑉𝐹 ∈ ℤ ∧ 𝐿 ∈ ℤ) ∧ 𝐿𝐹) → (𝑖 ∈ (0..^(𝐿𝐹)) ↦ (𝑊‘(𝑖 + 𝐹))) = (𝑖 ∈ ∅ ↦ (𝑊‘(𝑖 + 𝐹))))
16 mpt0 6682 . . . 4 (𝑖 ∈ ∅ ↦ (𝑊‘(𝑖 + 𝐹))) = ∅
1715, 16eqtrdi 2789 . . 3 (((𝑊 ∈ Word 𝑉𝐹 ∈ ℤ ∧ 𝐿 ∈ ℤ) ∧ 𝐿𝐹) → (𝑖 ∈ (0..^(𝐿𝐹)) ↦ (𝑊‘(𝑖 + 𝐹))) = ∅)
182, 11, 173eqtrd 2777 . 2 (((𝑊 ∈ Word 𝑉𝐹 ∈ ℤ ∧ 𝐿 ∈ ℤ) ∧ 𝐿𝐹) → (𝑊 substr ⟨𝐹, 𝐿⟩) = ∅)
1918ex 414 1 ((𝑊 ∈ Word 𝑉𝐹 ∈ ℤ ∧ 𝐿 ∈ ℤ) → (𝐿𝐹 → (𝑊 substr ⟨𝐹, 𝐿⟩) = ∅))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 205  wa 397  w3a 1088   = wceq 1542  wcel 2107  wss 3946  c0 4320  ifcif 4524  cop 4630   class class class wbr 5144  cmpt 5227  dom cdm 5672  cfv 6535  (class class class)co 7396  0cc0 11097   + caddc 11100  cle 11236  cmin 11431  cz 12545  ..^cfzo 13614  Word cword 14451   substr csubstr 14577
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1798  ax-4 1812  ax-5 1914  ax-6 1972  ax-7 2012  ax-8 2109  ax-9 2117  ax-10 2138  ax-11 2155  ax-12 2172  ax-ext 2704  ax-rep 5281  ax-sep 5295  ax-nul 5302  ax-pow 5359  ax-pr 5423  ax-un 7712  ax-cnex 11153  ax-resscn 11154  ax-1cn 11155  ax-icn 11156  ax-addcl 11157  ax-addrcl 11158  ax-mulcl 11159  ax-mulrcl 11160  ax-mulcom 11161  ax-addass 11162  ax-mulass 11163  ax-distr 11164  ax-i2m1 11165  ax-1ne0 11166  ax-1rid 11167  ax-rnegex 11168  ax-rrecex 11169  ax-cnre 11170  ax-pre-lttri 11171  ax-pre-lttrn 11172  ax-pre-ltadd 11173  ax-pre-mulgt0 11174
This theorem depends on definitions:  df-bi 206  df-an 398  df-or 847  df-3or 1089  df-3an 1090  df-tru 1545  df-fal 1555  df-ex 1783  df-nf 1787  df-sb 2069  df-mo 2535  df-eu 2564  df-clab 2711  df-cleq 2725  df-clel 2811  df-nfc 2886  df-ne 2942  df-nel 3048  df-ral 3063  df-rex 3072  df-reu 3378  df-rab 3434  df-v 3477  df-sbc 3776  df-csb 3892  df-dif 3949  df-un 3951  df-in 3953  df-ss 3963  df-pss 3965  df-nul 4321  df-if 4525  df-pw 4600  df-sn 4625  df-pr 4627  df-op 4631  df-uni 4905  df-iun 4995  df-br 5145  df-opab 5207  df-mpt 5228  df-tr 5262  df-id 5570  df-eprel 5576  df-po 5584  df-so 5585  df-fr 5627  df-we 5629  df-xp 5678  df-rel 5679  df-cnv 5680  df-co 5681  df-dm 5682  df-rn 5683  df-res 5684  df-ima 5685  df-pred 6292  df-ord 6359  df-on 6360  df-lim 6361  df-suc 6362  df-iota 6487  df-fun 6537  df-fn 6538  df-f 6539  df-f1 6540  df-fo 6541  df-f1o 6542  df-fv 6543  df-riota 7352  df-ov 7399  df-oprab 7400  df-mpo 7401  df-om 7843  df-1st 7962  df-2nd 7963  df-frecs 8253  df-wrecs 8284  df-recs 8358  df-rdg 8397  df-er 8691  df-en 8928  df-dom 8929  df-sdom 8930  df-pnf 11237  df-mnf 11238  df-xr 11239  df-ltxr 11240  df-le 11241  df-sub 11433  df-neg 11434  df-nn 12200  df-n0 12460  df-z 12546  df-uz 12810  df-fz 13472  df-fzo 13615  df-substr 14578
This theorem is referenced by:  swrdnd  14591  swrdnd2  14592  swrdsb0eq  14600  swrdccat  14672
  Copyright terms: Public domain W3C validator