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

Definition df-substr 14282
Description: Define an operation which extracts portions (called subwords or substrings) of words. Definition in Section 9.1 of [AhoHopUll] p. 318. (Contributed by Stefan O'Rear, 15-Aug-2015.)
Assertion
Ref Expression
df-substr substr = (𝑠 ∈ V, 𝑏 ∈ (ℤ × ℤ) ↦ if(((1st𝑏)..^(2nd𝑏)) ⊆ dom 𝑠, (𝑥 ∈ (0..^((2nd𝑏) − (1st𝑏))) ↦ (𝑠‘(𝑥 + (1st𝑏)))), ∅))
Distinct variable group:   𝑠,𝑏,𝑥

Detailed syntax breakdown of Definition df-substr
StepHypRef Expression
1 csubstr 14281 . 2 class substr
2 vs . . 3 setvar 𝑠
3 vb . . 3 setvar 𝑏
4 cvv 3422 . . 3 class V
5 cz 12249 . . . 4 class
65, 5cxp 5578 . . 3 class (ℤ × ℤ)
73cv 1538 . . . . . . 7 class 𝑏
8 c1st 7802 . . . . . . 7 class 1st
97, 8cfv 6418 . . . . . 6 class (1st𝑏)
10 c2nd 7803 . . . . . . 7 class 2nd
117, 10cfv 6418 . . . . . 6 class (2nd𝑏)
12 cfzo 13311 . . . . . 6 class ..^
139, 11, 12co 7255 . . . . 5 class ((1st𝑏)..^(2nd𝑏))
142cv 1538 . . . . . 6 class 𝑠
1514cdm 5580 . . . . 5 class dom 𝑠
1613, 15wss 3883 . . . 4 wff ((1st𝑏)..^(2nd𝑏)) ⊆ dom 𝑠
17 vx . . . . 5 setvar 𝑥
18 cc0 10802 . . . . . 6 class 0
19 cmin 11135 . . . . . . 7 class
2011, 9, 19co 7255 . . . . . 6 class ((2nd𝑏) − (1st𝑏))
2118, 20, 12co 7255 . . . . 5 class (0..^((2nd𝑏) − (1st𝑏)))
2217cv 1538 . . . . . . 7 class 𝑥
23 caddc 10805 . . . . . . 7 class +
2422, 9, 23co 7255 . . . . . 6 class (𝑥 + (1st𝑏))
2524, 14cfv 6418 . . . . 5 class (𝑠‘(𝑥 + (1st𝑏)))
2617, 21, 25cmpt 5153 . . . 4 class (𝑥 ∈ (0..^((2nd𝑏) − (1st𝑏))) ↦ (𝑠‘(𝑥 + (1st𝑏))))
27 c0 4253 . . . 4 class
2816, 26, 27cif 4456 . . 3 class if(((1st𝑏)..^(2nd𝑏)) ⊆ dom 𝑠, (𝑥 ∈ (0..^((2nd𝑏) − (1st𝑏))) ↦ (𝑠‘(𝑥 + (1st𝑏)))), ∅)
292, 3, 4, 6, 28cmpo 7257 . 2 class (𝑠 ∈ V, 𝑏 ∈ (ℤ × ℤ) ↦ if(((1st𝑏)..^(2nd𝑏)) ⊆ dom 𝑠, (𝑥 ∈ (0..^((2nd𝑏) − (1st𝑏))) ↦ (𝑠‘(𝑥 + (1st𝑏)))), ∅))
301, 29wceq 1539 1 wff substr = (𝑠 ∈ V, 𝑏 ∈ (ℤ × ℤ) ↦ if(((1st𝑏)..^(2nd𝑏)) ⊆ dom 𝑠, (𝑥 ∈ (0..^((2nd𝑏) − (1st𝑏))) ↦ (𝑠‘(𝑥 + (1st𝑏)))), ∅))
Colors of variables: wff setvar class
This definition is referenced by:  swrdnznd  14283  swrdval  14284  swrd00  14285  swrdcl  14286  swrd0  14299
  Copyright terms: Public domain W3C validator