HomeHome Intuitionistic Logic Explorer
Theorem List (p. 112 of 164)
< Previous  Next >
Bad symbols? Try the
GIF version.

Mirrors  >  Metamath Home Page  >  ILE Home Page  >  Theorem List Contents  >  Recent Proofs       This page: Page List

Theorem List for Intuitionistic Logic Explorer - 11101-11200   *Has distinct variable group(s)
TypeLabelDescription
Statement
 
Theoremelfzelfzccat 11101 An element of a finite set of sequential integers up to the length of a word is an element of an extended finite set of sequential integers up to the length of a concatenation of this word with another word. (Contributed by Alexander van der Vekens, 28-Mar-2018.)
((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → (𝑁 ∈ (0...(♯‘𝐴)) → 𝑁 ∈ (0...(♯‘(𝐴 ++ 𝐵)))))
 
Theoremccatvalfn 11102 The concatenation of two words is a function over the half-open integer range having the sum of the lengths of the word as length. (Contributed by Alexander van der Vekens, 30-Mar-2018.)
((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → (𝐴 ++ 𝐵) Fn (0..^((♯‘𝐴) + (♯‘𝐵))))
 
Theoremccatsymb 11103 The symbol at a given position in a concatenated word. (Contributed by AV, 26-May-2018.) (Proof shortened by AV, 24-Nov-2018.)
((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐼 ∈ ℤ) → ((𝐴 ++ 𝐵)‘𝐼) = if(𝐼 < (♯‘𝐴), (𝐴𝐼), (𝐵‘(𝐼 − (♯‘𝐴)))))
 
Theoremccatfv0 11104 The first symbol of a concatenation of two words is the first symbol of the first word if the first word is not empty. (Contributed by Alexander van der Vekens, 22-Sep-2018.)
((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉 ∧ 0 < (♯‘𝐴)) → ((𝐴 ++ 𝐵)‘0) = (𝐴‘0))
 
Theoremccatval1lsw 11105 The last symbol of the left (nonempty) half of a concatenated word. (Contributed by Alexander van der Vekens, 3-Oct-2018.) (Proof shortened by AV, 1-May-2020.)
((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐴 ≠ ∅) → ((𝐴 ++ 𝐵)‘((♯‘𝐴) − 1)) = (lastS‘𝐴))
 
Theoremccatval21sw 11106 The first symbol of the right (nonempty) half of a concatenated word. (Contributed by AV, 23-Apr-2022.)
((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐵 ≠ ∅) → ((𝐴 ++ 𝐵)‘(♯‘𝐴)) = (𝐵‘0))
 
Theoremccatlid 11107 Concatenation of a word by the empty word on the left. (Contributed by Stefan O'Rear, 15-Aug-2015.) (Proof shortened by AV, 1-May-2020.)
(𝑆 ∈ Word 𝐵 → (∅ ++ 𝑆) = 𝑆)
 
Theoremccatrid 11108 Concatenation of a word by the empty word on the right. (Contributed by Stefan O'Rear, 15-Aug-2015.) (Proof shortened by AV, 1-May-2020.)
(𝑆 ∈ Word 𝐵 → (𝑆 ++ ∅) = 𝑆)
 
Theoremccatass 11109 Associative law for concatenation of words. (Contributed by Stefan O'Rear, 15-Aug-2015.)
((𝑆 ∈ Word 𝐵𝑇 ∈ Word 𝐵𝑈 ∈ Word 𝐵) → ((𝑆 ++ 𝑇) ++ 𝑈) = (𝑆 ++ (𝑇 ++ 𝑈)))
 
Theoremccatrn 11110 The range of a concatenated word. (Contributed by Stefan O'Rear, 15-Aug-2015.)
((𝑆 ∈ Word 𝐵𝑇 ∈ Word 𝐵) → ran (𝑆 ++ 𝑇) = (ran 𝑆 ∪ ran 𝑇))
 
Theoremccatidid 11111 Concatenation of the empty word by the empty word. (Contributed by AV, 26-Mar-2022.)
(∅ ++ ∅) = ∅
 
Theoremlswccatn0lsw 11112 The last symbol of a word concatenated with a nonempty word is the last symbol of the nonempty word. (Contributed by AV, 22-Oct-2018.) (Proof shortened by AV, 1-May-2020.)
((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝐵 ≠ ∅) → (lastS‘(𝐴 ++ 𝐵)) = (lastS‘𝐵))
 
Theoremlswccat0lsw 11113 The last symbol of a word concatenated with the empty word is the last symbol of the word. (Contributed by AV, 22-Oct-2018.) (Proof shortened by AV, 1-May-2020.)
(𝑊 ∈ Word 𝑉 → (lastS‘(𝑊 ++ ∅)) = (lastS‘𝑊))
 
4.7.4  Singleton words
 
Syntaxcs1 11114 Syntax for the singleton word constructor.
class ⟨“𝐴”⟩
 
Definitiondf-s1 11115 Define the canonical injection from symbols to words. Although not required, 𝐴 should usually be a set. Otherwise, the singleton word ⟨“𝐴”⟩ would be the singleton word consisting of the empty set, see s1prc 11122, and not, as maybe expected, the empty word. (Contributed by Stefan O'Rear, 15-Aug-2015.) (Revised by Mario Carneiro, 26-Feb-2016.)
⟨“𝐴”⟩ = {⟨0, ( I ‘𝐴)⟩}
 
Theorems1val 11116 Value of a singleton word. (Contributed by Stefan O'Rear, 15-Aug-2015.) (Revised by Mario Carneiro, 26-Feb-2016.)
(𝐴𝑉 → ⟨“𝐴”⟩ = {⟨0, 𝐴⟩})
 
Theorems1rn 11117 The range of a singleton word. (Contributed by Mario Carneiro, 18-Jul-2016.)
(𝐴𝑉 → ran ⟨“𝐴”⟩ = {𝐴})
 
Theorems1eq 11118 Equality theorem for a singleton word. (Contributed by Mario Carneiro, 26-Feb-2016.)
(𝐴 = 𝐵 → ⟨“𝐴”⟩ = ⟨“𝐵”⟩)
 
Theorems1eqd 11119 Equality theorem for a singleton word. (Contributed by Mario Carneiro, 26-Feb-2016.)
(𝜑𝐴 = 𝐵)       (𝜑 → ⟨“𝐴”⟩ = ⟨“𝐵”⟩)
 
Theorems1cl 11120 A singleton word is a word. (Contributed by Stefan O'Rear, 15-Aug-2015.) (Revised by Mario Carneiro, 26-Feb-2016.) (Proof shortened by AV, 23-Nov-2018.)
(𝐴𝐵 → ⟨“𝐴”⟩ ∈ Word 𝐵)
 
Theorems1cld 11121 A singleton word is a word. (Contributed by Mario Carneiro, 26-Feb-2016.)
(𝜑𝐴𝐵)       (𝜑 → ⟨“𝐴”⟩ ∈ Word 𝐵)
 
Theorems1prc 11122 Value of a singleton word if the symbol is a proper class. (Contributed by AV, 26-Mar-2022.)
𝐴 ∈ V → ⟨“𝐴”⟩ = ⟨“∅”⟩)
 
Theorems1leng 11123 Length of a singleton word. (Contributed by Stefan O'Rear, 15-Aug-2015.) (Revised by Mario Carneiro, 26-Feb-2016.)
(𝐴𝑉 → (♯‘⟨“𝐴”⟩) = 1)
 
Theorems1dmg 11124 The domain of a singleton word is a singleton. (Contributed by AV, 9-Jan-2020.)
(𝐴𝑆 → dom ⟨“𝐴”⟩ = {0})
 
Theorems1fv 11125 Sole symbol of a singleton word. (Contributed by Stefan O'Rear, 15-Aug-2015.) (Revised by Mario Carneiro, 26-Feb-2016.)
(𝐴𝐵 → (⟨“𝐴”⟩‘0) = 𝐴)
 
Theoremlsws1 11126 The last symbol of a singleton word is its symbol. (Contributed by AV, 22-Oct-2018.)
(𝐴𝑉 → (lastS‘⟨“𝐴”⟩) = 𝐴)
 
Theoremeqs1 11127 A word of length 1 is a singleton word. (Contributed by Stefan O'Rear, 23-Aug-2015.) (Proof shortened by AV, 1-May-2020.)
((𝑊 ∈ Word 𝐴 ∧ (♯‘𝑊) = 1) → 𝑊 = ⟨“(𝑊‘0)”⟩)
 
Theoremwrdl1exs1 11128* A word of length 1 is a singleton word. (Contributed by AV, 24-Jan-2021.)
((𝑊 ∈ Word 𝑆 ∧ (♯‘𝑊) = 1) → ∃𝑠𝑆 𝑊 = ⟨“𝑠”⟩)
 
Theoremwrdl1s1 11129 A word of length 1 is a singleton word consisting of the first symbol of the word. (Contributed by AV, 22-Jul-2018.) (Proof shortened by AV, 14-Oct-2018.)
(𝑆𝑉 → (𝑊 = ⟨“𝑆”⟩ ↔ (𝑊 ∈ Word 𝑉 ∧ (♯‘𝑊) = 1 ∧ (𝑊‘0) = 𝑆)))
 
Theorems111 11130 The singleton word function is injective. (Contributed by Mario Carneiro, 1-Oct-2015.) (Revised by Mario Carneiro, 26-Feb-2016.)
((𝑆𝐴𝑇𝐴) → (⟨“𝑆”⟩ = ⟨“𝑇”⟩ ↔ 𝑆 = 𝑇))
 
4.7.5  Concatenations with singleton words
 
Theoremccatws1cl 11131 The concatenation of a word with a singleton word is a word. (Contributed by Alexander van der Vekens, 22-Sep-2018.)
((𝑊 ∈ Word 𝑉𝑋𝑉) → (𝑊 ++ ⟨“𝑋”⟩) ∈ Word 𝑉)
 
Theoremccat2s1cl 11132 The concatenation of two singleton words is a word. (Contributed by Alexander van der Vekens, 22-Sep-2018.)
((𝑋𝑉𝑌𝑉) → (⟨“𝑋”⟩ ++ ⟨“𝑌”⟩) ∈ Word 𝑉)
 
Theoremccatws1leng 11133 The length of the concatenation of a word with a singleton word. (Contributed by Alexander van der Vekens, 22-Sep-2018.) (Revised by AV, 4-Mar-2022.)
((𝑊 ∈ Word 𝑉𝑋𝑌) → (♯‘(𝑊 ++ ⟨“𝑋”⟩)) = ((♯‘𝑊) + 1))
 
Theoremccatws1lenp1bg 11134 The length of a word is 𝑁 iff the length of the concatenation of the word with a singleton word is 𝑁 + 1. (Contributed by AV, 4-Mar-2022.)
((𝑊 ∈ Word 𝑉𝑋𝑌𝑁 ∈ ℕ0) → ((♯‘(𝑊 ++ ⟨“𝑋”⟩)) = (𝑁 + 1) ↔ (♯‘𝑊) = 𝑁))
 
Theoremccatw2s1cl 11135 The concatenation of a word with two singleton words is a word. (Contributed by Alexander van der Vekens, 22-Sep-2018.)
((𝑊 ∈ Word 𝑉𝑋𝑉𝑌𝑉) → ((𝑊 ++ ⟨“𝑋”⟩) ++ ⟨“𝑌”⟩) ∈ Word 𝑉)
 
Theoremccats1val1g 11136 Value of a symbol in the left half of a word concatenated with a single symbol. (Contributed by Alexander van der Vekens, 5-Aug-2018.) (Revised by JJ, 20-Jan-2024.)
((𝑊 ∈ Word 𝑉𝑆𝑌𝐼 ∈ (0..^(♯‘𝑊))) → ((𝑊 ++ ⟨“𝑆”⟩)‘𝐼) = (𝑊𝐼))
 
Theoremccats1val2 11137 Value of the symbol concatenated with a word. (Contributed by Alexander van der Vekens, 5-Aug-2018.) (Proof shortened by Alexander van der Vekens, 14-Oct-2018.)
((𝑊 ∈ Word 𝑉𝑆𝑉𝐼 = (♯‘𝑊)) → ((𝑊 ++ ⟨“𝑆”⟩)‘𝐼) = 𝑆)
 
Theoremccat1st1st 11138 The first symbol of a word concatenated with its first symbol is the first symbol of the word. This theorem holds even if 𝑊 is the empty word. (Contributed by AV, 26-Mar-2022.)
(𝑊 ∈ Word 𝑉 → ((𝑊 ++ ⟨“(𝑊‘0)”⟩)‘0) = (𝑊‘0))
 
Theoremccatws1ls 11139 The last symbol of the concatenation of a word with a singleton word is the symbol of the singleton word. (Contributed by AV, 29-Sep-2018.) (Proof shortened by AV, 14-Oct-2018.)
((𝑊 ∈ Word 𝑉𝑋𝑉) → ((𝑊 ++ ⟨“𝑋”⟩)‘(♯‘𝑊)) = 𝑋)
 
Theoremlswccats1 11140 The last symbol of a word concatenated with a singleton word is the symbol of the singleton word. (Contributed by AV, 6-Aug-2018.)
((𝑊 ∈ Word 𝑉𝑆𝑉) → (lastS‘(𝑊 ++ ⟨“𝑆”⟩)) = 𝑆)
 
Theoremlswccats1fst 11141 The last symbol of a nonempty word concatenated with its first symbol is the first symbol. (Contributed by AV, 28-Jun-2018.) (Proof shortened by AV, 1-May-2020.)
((𝑃 ∈ Word 𝑉 ∧ 1 ≤ (♯‘𝑃)) → (lastS‘(𝑃 ++ ⟨“(𝑃‘0)”⟩)) = ((𝑃 ++ ⟨“(𝑃‘0)”⟩)‘0))
 
Theoremccatw2s1p2 11142 Extract the second of two single symbols concatenated with a word. (Contributed by Alexander van der Vekens, 22-Sep-2018.) (Proof shortened by AV, 1-May-2020.)
(((𝑊 ∈ Word 𝑉 ∧ (♯‘𝑊) = 𝑁) ∧ (𝑋𝑉𝑌𝑉)) → (((𝑊 ++ ⟨“𝑋”⟩) ++ ⟨“𝑌”⟩)‘(𝑁 + 1)) = 𝑌)
 
4.7.6  Subwords/substrings
 
Syntaxcsubstr 11143 Syntax for the subword operator.
class substr
 
Definitiondf-substr 11144* 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.)
substr = (𝑠 ∈ V, 𝑏 ∈ (ℤ × ℤ) ↦ if(((1st𝑏)..^(2nd𝑏)) ⊆ dom 𝑠, (𝑥 ∈ (0..^((2nd𝑏) − (1st𝑏))) ↦ (𝑠‘(𝑥 + (1st𝑏)))), ∅))
 
Theoremfzowrddc 11145 Decidability of whether a range of integers is a subset of a word's domain. (Contributed by Jim Kingdon, 23-Dec-2025.)
((𝑆 ∈ Word 𝐴𝐹 ∈ ℤ ∧ 𝐿 ∈ ℤ) → DECID (𝐹..^𝐿) ⊆ dom 𝑆)
 
Theoremswrdval 11146* Value of a subword. (Contributed by Stefan O'Rear, 15-Aug-2015.)
((𝑆𝑉𝐹 ∈ ℤ ∧ 𝐿 ∈ ℤ) → (𝑆 substr ⟨𝐹, 𝐿⟩) = if((𝐹..^𝐿) ⊆ dom 𝑆, (𝑥 ∈ (0..^(𝐿𝐹)) ↦ (𝑆‘(𝑥 + 𝐹))), ∅))
 
Theoremswrd00g 11147 A zero length substring. (Contributed by Stefan O'Rear, 27-Aug-2015.)
((𝑆𝑉𝑋 ∈ ℤ) → (𝑆 substr ⟨𝑋, 𝑋⟩) = ∅)
 
Theoremswrdclg 11148 Closure of the subword extractor. (Contributed by Stefan O'Rear, 16-Aug-2015.) (Revised by Mario Carneiro, 26-Feb-2016.)
((𝑆 ∈ Word 𝐴𝐹 ∈ ℤ ∧ 𝐿 ∈ ℤ) → (𝑆 substr ⟨𝐹, 𝐿⟩) ∈ Word 𝐴)
 
Theoremswrdval2 11149* Value of the subword extractor in its intended domain. (Contributed by Stefan O'Rear, 15-Aug-2015.) (Proof shortened by AV, 2-May-2020.)
((𝑆 ∈ Word 𝐴𝐹 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝑆))) → (𝑆 substr ⟨𝐹, 𝐿⟩) = (𝑥 ∈ (0..^(𝐿𝐹)) ↦ (𝑆‘(𝑥 + 𝐹))))
 
Theoremswrdlen 11150 Length of an extracted subword. (Contributed by Stefan O'Rear, 16-Aug-2015.)
((𝑆 ∈ Word 𝐴𝐹 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝑆))) → (♯‘(𝑆 substr ⟨𝐹, 𝐿⟩)) = (𝐿𝐹))
 
Theoremswrdfv 11151 A symbol in an extracted subword, indexed using the subword's indices. (Contributed by Stefan O'Rear, 16-Aug-2015.)
(((𝑆 ∈ Word 𝐴𝐹 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝑆))) ∧ 𝑋 ∈ (0..^(𝐿𝐹))) → ((𝑆 substr ⟨𝐹, 𝐿⟩)‘𝑋) = (𝑆‘(𝑋 + 𝐹)))
 
Theoremswrdfv0 11152 The first symbol in an extracted subword. (Contributed by AV, 27-Apr-2022.)
((𝑆 ∈ Word 𝐴𝐹 ∈ (0..^𝐿) ∧ 𝐿 ∈ (0...(♯‘𝑆))) → ((𝑆 substr ⟨𝐹, 𝐿⟩)‘0) = (𝑆𝐹))
 
Theoremswrdf 11153 A subword of a word is a function from a half-open range of nonnegative integers of the same length as the subword to the set of symbols for the original word. (Contributed by AV, 13-Nov-2018.)
((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) → (𝑊 substr ⟨𝑀, 𝑁⟩):(0..^(𝑁𝑀))⟶𝑉)
 
Theoremswrdvalfn 11154 Value of the subword extractor as function with domain. (Contributed by Alexander van der Vekens, 28-Mar-2018.) (Proof shortened by AV, 2-May-2020.)
((𝑆 ∈ Word 𝑉𝐹 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝑆))) → (𝑆 substr ⟨𝐹, 𝐿⟩) Fn (0..^(𝐿𝐹)))
 
Theoremswrdrn 11155 The range of a subword of a word is a subset of the set of symbols for the word. (Contributed by AV, 13-Nov-2018.)
((𝑊 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑊))) → ran (𝑊 substr ⟨𝑀, 𝑁⟩) ⊆ 𝑉)
 
Theoremswrdlend 11156 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.)
((𝑊 ∈ Word 𝑉𝐹 ∈ ℤ ∧ 𝐿 ∈ ℤ) → (𝐿𝐹 → (𝑊 substr ⟨𝐹, 𝐿⟩) = ∅))
 
Theoremswrdnd 11157 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.)
((𝑊 ∈ Word 𝑉𝐹 ∈ ℤ ∧ 𝐿 ∈ ℤ) → ((𝐹 < 0 ∨ 𝐿𝐹 ∨ (♯‘𝑊) < 𝐿) → (𝑊 substr ⟨𝐹, 𝐿⟩) = ∅))
 
Theoremswrd0g 11158 A subword of an empty set is always the empty set. (Contributed by AV, 31-Mar-2018.) (Revised by AV, 20-Oct-2018.) (Proof shortened by AV, 2-May-2020.)
((𝐹 ∈ ℤ ∧ 𝐿 ∈ ℤ) → (∅ substr ⟨𝐹, 𝐿⟩) = ∅)
 
Theoremswrdrlen 11159 Length of a right-anchored subword. (Contributed by Alexander van der Vekens, 5-Apr-2018.)
((𝑊 ∈ Word 𝑉𝐼 ∈ (0...(♯‘𝑊))) → (♯‘(𝑊 substr ⟨𝐼, (♯‘𝑊)⟩)) = ((♯‘𝑊) − 𝐼))
 
Theoremswrdlen2 11160 Length of an extracted subword. (Contributed by AV, 5-May-2020.)
((𝑆 ∈ Word 𝑉 ∧ (𝐹 ∈ ℕ0𝐿 ∈ (ℤ𝐹)) ∧ 𝐿 ≤ (♯‘𝑆)) → (♯‘(𝑆 substr ⟨𝐹, 𝐿⟩)) = (𝐿𝐹))
 
Theoremswrdfv2 11161 A symbol in an extracted subword, indexed using the word's indices. (Contributed by AV, 5-May-2020.)
(((𝑆 ∈ Word 𝑉 ∧ (𝐹 ∈ ℕ0𝐿 ∈ (ℤ𝐹)) ∧ 𝐿 ≤ (♯‘𝑆)) ∧ 𝑋 ∈ (𝐹..^𝐿)) → ((𝑆 substr ⟨𝐹, 𝐿⟩)‘(𝑋𝐹)) = (𝑆𝑋))
 
Theoremswrdwrdsymbg 11162 A subword is a word over the symbols it consists of. (Contributed by AV, 2-Dec-2022.)
((𝑆 ∈ Word 𝐴𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑆))) → (𝑆 substr ⟨𝑀, 𝑁⟩) ∈ Word (𝑆 “ (𝑀..^𝑁)))
 
Theoremswrdsb0eq 11163 Two subwords with the same bounds are equal if the range is not valid. (Contributed by AV, 4-May-2020.)
(((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ 𝑁𝑀) → (𝑊 substr ⟨𝑀, 𝑁⟩) = (𝑈 substr ⟨𝑀, 𝑁⟩))
 
Theoremswrdsbslen 11164 Two subwords with the same bounds have the same length. (Contributed by AV, 4-May-2020.)
(((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑁 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) → (♯‘(𝑊 substr ⟨𝑀, 𝑁⟩)) = (♯‘(𝑈 substr ⟨𝑀, 𝑁⟩)))
 
Theoremswrdspsleq 11165* Two words have a common subword (starting at the same position with the same length) iff they have the same symbols at each position. (Contributed by Alexander van der Vekens, 7-Aug-2018.) (Proof shortened by AV, 7-May-2020.)
(((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑁 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) → ((𝑊 substr ⟨𝑀, 𝑁⟩) = (𝑈 substr ⟨𝑀, 𝑁⟩) ↔ ∀𝑖 ∈ (𝑀..^𝑁)(𝑊𝑖) = (𝑈𝑖)))
 
Theoremswrds1 11166 Extract a single symbol from a word. (Contributed by Stefan O'Rear, 23-Aug-2015.)
((𝑊 ∈ Word 𝐴𝐼 ∈ (0..^(♯‘𝑊))) → (𝑊 substr ⟨𝐼, (𝐼 + 1)⟩) = ⟨“(𝑊𝐼)”⟩)
 
Theoremswrdlsw 11167 Extract the last single symbol from a word. (Contributed by Alexander van der Vekens, 23-Sep-2018.)
((𝑊 ∈ Word 𝑉𝑊 ≠ ∅) → (𝑊 substr ⟨((♯‘𝑊) − 1), (♯‘𝑊)⟩) = ⟨“(lastS‘𝑊)”⟩)
 
Theoremccatswrd 11168 Joining two adjacent subwords makes a longer subword. (Contributed by Stefan O'Rear, 20-Aug-2015.)
((𝑆 ∈ Word 𝐴 ∧ (𝑋 ∈ (0...𝑌) ∧ 𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆)))) → ((𝑆 substr ⟨𝑋, 𝑌⟩) ++ (𝑆 substr ⟨𝑌, 𝑍⟩)) = (𝑆 substr ⟨𝑋, 𝑍⟩))
 
Theoremswrdccat2 11169 Recover the right half of a concatenated word. (Contributed by Mario Carneiro, 27-Sep-2015.)
((𝑆 ∈ Word 𝐵𝑇 ∈ Word 𝐵) → ((𝑆 ++ 𝑇) substr ⟨(♯‘𝑆), ((♯‘𝑆) + (♯‘𝑇))⟩) = 𝑇)
 
4.7.7  Prefixes of a word
 
Syntaxcpfx 11170 Syntax for the prefix operator.
class prefix
 
Definitiondf-pfx 11171* Define an operation which extracts prefixes of words, i.e. subwords (or substrings) starting at the beginning of a word (or string). In other words, (𝑆 prefix 𝐿) is the prefix of the word 𝑆 of length 𝐿. Definition in Section 9.1 of [AhoHopUll] p. 318. See also Wikipedia "Substring" https://en.wikipedia.org/wiki/Substring#Prefix. (Contributed by AV, 2-May-2020.)
prefix = (𝑠 ∈ V, 𝑙 ∈ ℕ0 ↦ (𝑠 substr ⟨0, 𝑙⟩))
 
Theorempfxval 11172 Value of a prefix operation. (Contributed by AV, 2-May-2020.)
((𝑆𝑉𝐿 ∈ ℕ0) → (𝑆 prefix 𝐿) = (𝑆 substr ⟨0, 𝐿⟩))
 
Theorempfx00g 11173 The zero length prefix is the empty set. (Contributed by AV, 2-May-2020.)
(𝑆𝑉 → (𝑆 prefix 0) = ∅)
 
Theorempfx0g 11174 A prefix of an empty set is always the empty set. (Contributed by AV, 3-May-2020.)
(𝐿 ∈ ℕ0 → (∅ prefix 𝐿) = ∅)
 
Theoremfnpfx 11175 The domain of the prefix extractor. (Contributed by Jim Kingdon, 8-Jan-2026.)
prefix Fn (V × ℕ0)
 
Theorempfxclg 11176 Closure of the prefix extractor. (Contributed by AV, 2-May-2020.)
((𝑆 ∈ Word 𝐴𝐿 ∈ ℕ0) → (𝑆 prefix 𝐿) ∈ Word 𝐴)
 
Theorempfxclz 11177 Closure of the prefix extractor. This extends pfxclg 11176 from 0 to (negative lengths are trivial, resulting in the empty word). (Contributed by Jim Kingdon, 8-Jan-2026.)
((𝑆 ∈ Word 𝐴𝐿 ∈ ℤ) → (𝑆 prefix 𝐿) ∈ Word 𝐴)
 
Theorempfxmpt 11178* Value of the prefix extractor as a mapping. (Contributed by AV, 2-May-2020.)
((𝑆 ∈ Word 𝐴𝐿 ∈ (0...(♯‘𝑆))) → (𝑆 prefix 𝐿) = (𝑥 ∈ (0..^𝐿) ↦ (𝑆𝑥)))
 
Theorempfxres 11179 Value of the prefix extractor as the restriction of a word. (Contributed by Stefan O'Rear, 24-Aug-2015.) (Revised by AV, 2-May-2020.)
((𝑆 ∈ Word 𝐴𝐿 ∈ (0...(♯‘𝑆))) → (𝑆 prefix 𝐿) = (𝑆 ↾ (0..^𝐿)))
 
Theorempfxf 11180 A prefix of a word is a function from a half-open range of nonnegative integers of the same length as the prefix to the set of symbols for the original word. (Contributed by AV, 2-May-2020.)
((𝑊 ∈ Word 𝑉𝐿 ∈ (0...(♯‘𝑊))) → (𝑊 prefix 𝐿):(0..^𝐿)⟶𝑉)
 
Theorempfxfn 11181 Value of the prefix extractor as function with domain. (Contributed by AV, 2-May-2020.)
((𝑆 ∈ Word 𝑉𝐿 ∈ (0...(♯‘𝑆))) → (𝑆 prefix 𝐿) Fn (0..^𝐿))
 
Theorempfxfv 11182 A symbol in a prefix of a word, indexed using the prefix' indices. (Contributed by Alexander van der Vekens, 16-Jun-2018.) (Revised by AV, 3-May-2020.)
((𝑊 ∈ Word 𝑉𝐿 ∈ (0...(♯‘𝑊)) ∧ 𝐼 ∈ (0..^𝐿)) → ((𝑊 prefix 𝐿)‘𝐼) = (𝑊𝐼))
 
Theorempfxlen 11183 Length of a prefix. (Contributed by Stefan O'Rear, 24-Aug-2015.) (Revised by AV, 2-May-2020.)
((𝑆 ∈ Word 𝐴𝐿 ∈ (0...(♯‘𝑆))) → (♯‘(𝑆 prefix 𝐿)) = 𝐿)
 
Theorempfxid 11184 A word is a prefix of itself. (Contributed by Stefan O'Rear, 16-Aug-2015.) (Revised by AV, 2-May-2020.)
(𝑆 ∈ Word 𝐴 → (𝑆 prefix (♯‘𝑆)) = 𝑆)
 
Theorempfxrn 11185 The range of a prefix of a word is a subset of the set of symbols for the word. (Contributed by AV, 2-May-2020.)
((𝑊 ∈ Word 𝑉𝐿 ∈ (0...(♯‘𝑊))) → ran (𝑊 prefix 𝐿) ⊆ 𝑉)
 
Theorempfxn0 11186 A prefix consisting of at least one symbol is not empty. (Contributed by Alexander van der Vekens, 4-Aug-2018.) (Revised by AV, 2-May-2020.)
((𝑊 ∈ Word 𝑉𝐿 ∈ ℕ ∧ 𝐿 ≤ (♯‘𝑊)) → (𝑊 prefix 𝐿) ≠ ∅)
 
Theorempfxnd 11187 The value of a prefix operation for a length argument larger than the word length is the empty set. (This is due to our definition of function values for out-of-domain arguments, see ndmfvg 5634). (Contributed by AV, 3-May-2020.)
((𝑊 ∈ Word 𝑉𝐿 ∈ ℕ0 ∧ (♯‘𝑊) < 𝐿) → (𝑊 prefix 𝐿) = ∅)
 
Theorempfxwrdsymbg 11188 A prefix of a word is a word over the symbols it consists of. (Contributed by AV, 3-Dec-2022.)
((𝑆 ∈ Word 𝐴𝐿 ∈ ℕ0) → (𝑆 prefix 𝐿) ∈ Word (𝑆 “ (0..^𝐿)))
 
Theoremaddlenpfx 11189 The sum of the lengths of two parts of a word is the length of the word. (Contributed by AV, 21-Oct-2018.) (Revised by AV, 3-May-2020.)
((𝑊 ∈ Word 𝑉𝑀 ∈ (0...(♯‘𝑊))) → ((♯‘(𝑊 prefix 𝑀)) + (♯‘(𝑊 substr ⟨𝑀, (♯‘𝑊)⟩))) = (♯‘𝑊))
 
Theorempfxfv0 11190 The first symbol of a prefix is the first symbol of the word. (Contributed by Alexander van der Vekens, 16-Jun-2018.) (Revised by AV, 3-May-2020.)
((𝑊 ∈ Word 𝑉𝐿 ∈ (1...(♯‘𝑊))) → ((𝑊 prefix 𝐿)‘0) = (𝑊‘0))
 
Theorempfxtrcfv 11191 A symbol in a word truncated by one symbol. (Contributed by Alexander van der Vekens, 16-Jun-2018.) (Revised by AV, 3-May-2020.)
((𝑊 ∈ Word 𝑉𝑊 ≠ ∅ ∧ 𝐼 ∈ (0..^((♯‘𝑊) − 1))) → ((𝑊 prefix ((♯‘𝑊) − 1))‘𝐼) = (𝑊𝐼))
 
Theorempfxtrcfv0 11192 The first symbol in a word truncated by one symbol. (Contributed by Alexander van der Vekens, 16-Jun-2018.) (Revised by AV, 3-May-2020.)
((𝑊 ∈ Word 𝑉 ∧ 2 ≤ (♯‘𝑊)) → ((𝑊 prefix ((♯‘𝑊) − 1))‘0) = (𝑊‘0))
 
Theorempfxfvlsw 11193 The last symbol in a nonempty prefix of a word. (Contributed by Alexander van der Vekens, 24-Jun-2018.) (Revised by AV, 3-May-2020.)
((𝑊 ∈ Word 𝑉𝐿 ∈ (1...(♯‘𝑊))) → (lastS‘(𝑊 prefix 𝐿)) = (𝑊‘(𝐿 − 1)))
 
Theorempfxeq 11194* The prefixes of two words are equal iff they have the same length and the same symbols at each position. (Contributed by Alexander van der Vekens, 7-Aug-2018.) (Revised by AV, 4-May-2020.)
(((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) → ((𝑊 prefix 𝑀) = (𝑈 prefix 𝑁) ↔ (𝑀 = 𝑁 ∧ ∀𝑖 ∈ (0..^𝑀)(𝑊𝑖) = (𝑈𝑖))))
 
Theorempfxtrcfvl 11195 The last symbol in a word truncated by one symbol. (Contributed by AV, 16-Jun-2018.) (Revised by AV, 5-May-2020.)
((𝑊 ∈ Word 𝑉 ∧ 2 ≤ (♯‘𝑊)) → (lastS‘(𝑊 prefix ((♯‘𝑊) − 1))) = (𝑊‘((♯‘𝑊) − 2)))
 
Theorempfxsuffeqwrdeq 11196 Two words are equal if and only if they have the same prefix and the same suffix. (Contributed by Alexander van der Vekens, 23-Sep-2018.) (Revised by AV, 5-May-2020.)
((𝑊 ∈ Word 𝑉𝑆 ∈ Word 𝑉𝐼 ∈ (0..^(♯‘𝑊))) → (𝑊 = 𝑆 ↔ ((♯‘𝑊) = (♯‘𝑆) ∧ ((𝑊 prefix 𝐼) = (𝑆 prefix 𝐼) ∧ (𝑊 substr ⟨𝐼, (♯‘𝑊)⟩) = (𝑆 substr ⟨𝐼, (♯‘𝑊)⟩)))))
 
Theorempfxsuff1eqwrdeq 11197 Two (nonempty) words are equal if and only if they have the same prefix and the same single symbol suffix. (Contributed by Alexander van der Vekens, 23-Sep-2018.) (Revised by AV, 6-May-2020.)
((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉 ∧ 0 < (♯‘𝑊)) → (𝑊 = 𝑈 ↔ ((♯‘𝑊) = (♯‘𝑈) ∧ ((𝑊 prefix ((♯‘𝑊) − 1)) = (𝑈 prefix ((♯‘𝑊) − 1)) ∧ (lastS‘𝑊) = (lastS‘𝑈)))))
 
Theoremdisjwrdpfx 11198* Sets of words are disjoint if each set contains exactly the extensions of distinct words of a fixed length. Remark: A word 𝑊 is called an "extension" of a word 𝑃 if 𝑃 is a prefix of 𝑊. (Contributed by AV, 29-Jul-2018.) (Revised by AV, 6-May-2020.)
Disj 𝑦𝑊 {𝑥 ∈ Word 𝑉 ∣ (𝑥 prefix 𝑁) = 𝑦}
 
Theoremccatpfx 11199 Concatenating a prefix with an adjacent subword makes a longer prefix. (Contributed by AV, 7-May-2020.)
((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) → ((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩)) = (𝑆 prefix 𝑍))
 
Theorempfxccat1 11200 Recover the left half of a concatenated word. (Contributed by Mario Carneiro, 27-Sep-2015.) (Revised by AV, 6-May-2020.)
((𝑆 ∈ Word 𝐵𝑇 ∈ Word 𝐵) → ((𝑆 ++ 𝑇) prefix (♯‘𝑆)) = 𝑆)
    < Previous  Next >

Page List
Jump to page: Contents  1 1-100 2 101-200 3 201-300 4 301-400 5 401-500 6 501-600 7 601-700 8 701-800 9 801-900 10 901-1000 11 1001-1100 12 1101-1200 13 1201-1300 14 1301-1400 15 1401-1500 16 1501-1600 17 1601-1700 18 1701-1800 19 1801-1900 20 1901-2000 21 2001-2100 22 2101-2200 23 2201-2300 24 2301-2400 25 2401-2500 26 2501-2600 27 2601-2700 28 2701-2800 29 2801-2900 30 2901-3000 31 3001-3100 32 3101-3200 33 3201-3300 34 3301-3400 35 3401-3500 36 3501-3600 37 3601-3700 38 3701-3800 39 3801-3900 40 3901-4000 41 4001-4100 42 4101-4200 43 4201-4300 44 4301-4400 45 4401-4500 46 4501-4600 47 4601-4700 48 4701-4800 49 4801-4900 50 4901-5000 51 5001-5100 52 5101-5200 53 5201-5300 54 5301-5400 55 5401-5500 56 5501-5600 57 5601-5700 58 5701-5800 59 5801-5900 60 5901-6000 61 6001-6100 62 6101-6200 63 6201-6300 64 6301-6400 65 6401-6500 66 6501-6600 67 6601-6700 68 6701-6800 69 6801-6900 70 6901-7000 71 7001-7100 72 7101-7200 73 7201-7300 74 7301-7400 75 7401-7500 76 7501-7600 77 7601-7700 78 7701-7800 79 7801-7900 80 7901-8000 81 8001-8100 82 8101-8200 83 8201-8300 84 8301-8400 85 8401-8500 86 8501-8600 87 8601-8700 88 8701-8800 89 8801-8900 90 8901-9000 91 9001-9100 92 9101-9200 93 9201-9300 94 9301-9400 95 9401-9500 96 9501-9600 97 9601-9700 98 9701-9800 99 9801-9900 100 9901-10000 101 10001-10100 102 10101-10200 103 10201-10300 104 10301-10400 105 10401-10500 106 10501-10600 107 10601-10700 108 10701-10800 109 10801-10900 110 10901-11000 111 11001-11100 112 11101-11200 113 11201-11300 114 11301-11400 115 11401-11500 116 11501-11600 117 11601-11700 118 11701-11800 119 11801-11900 120 11901-12000 121 12001-12100 122 12101-12200 123 12201-12300 124 12301-12400 125 12401-12500 126 12501-12600 127 12601-12700 128 12701-12800 129 12801-12900 130 12901-13000 131 13001-13100 132 13101-13200 133 13201-13300 134 13301-13400 135 13401-13500 136 13501-13600 137 13601-13700 138 13701-13800 139 13801-13900 140 13901-14000 141 14001-14100 142 14101-14200 143 14201-14300 144 14301-14400 145 14401-14500 146 14501-14600 147 14601-14700 148 14701-14800 149 14801-14900 150 14901-15000 151 15001-15100 152 15101-15200 153 15201-15300 154 15301-15400 155 15401-15500 156 15501-15600 157 15601-15700 158 15701-15800 159 15801-15900 160 15901-16000 161 16001-16100 162 16101-16200 163 16201-16300 164 16301-16363
  Copyright terms: Public domain < Previous  Next >