Theorem List for Intuitionistic Logic Explorer - 11101-11200 *Has distinct variable
group(s)
| Type | Label | Description |
| Statement |
| |
| Theorem | ccat1st1st 11101 |
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)) |
| |
| Theorem | ccatws1ls 11102 |
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 𝑉 ∧ 𝑋 ∈ 𝑉) → ((𝑊 ++ 〈“𝑋”〉)‘(♯‘𝑊)) = 𝑋) |
| |
| Theorem | lswccats1 11103 |
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‘(𝑊 ++ 〈“𝑆”〉)) = 𝑆) |
| |
| Theorem | lswccats1fst 11104 |
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)) |
| |
| Theorem | ccatw2s1p2 11105 |
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
|
| |
| Syntax | csubstr 11106 |
Syntax for the subword operator.
|
| class substr |
| |
| Definition | df-substr 11107* |
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 ‘𝑏)))), ∅)) |
| |
| Theorem | fzowrddc 11108 |
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 𝑆) |
| |
| Theorem | swrdval 11109* |
Value of a subword. (Contributed by Stefan O'Rear, 15-Aug-2015.)
|
| ⊢ ((𝑆 ∈ 𝑉 ∧ 𝐹 ∈ ℤ ∧ 𝐿 ∈ ℤ) → (𝑆 substr 〈𝐹, 𝐿〉) = if((𝐹..^𝐿) ⊆ dom 𝑆, (𝑥 ∈ (0..^(𝐿 − 𝐹)) ↦ (𝑆‘(𝑥 + 𝐹))), ∅)) |
| |
| Theorem | swrd00g 11110 |
A zero length substring. (Contributed by Stefan O'Rear,
27-Aug-2015.)
|
| ⊢ ((𝑆 ∈ 𝑉 ∧ 𝑋 ∈ ℤ) → (𝑆 substr 〈𝑋, 𝑋〉) = ∅) |
| |
| Theorem | swrdclg 11111 |
Closure of the subword extractor. (Contributed by Stefan O'Rear,
16-Aug-2015.) (Revised by Mario Carneiro, 26-Feb-2016.)
|
| ⊢ ((𝑆 ∈ Word 𝐴 ∧ 𝐹 ∈ ℤ ∧ 𝐿 ∈ ℤ) → (𝑆 substr 〈𝐹, 𝐿〉) ∈ Word 𝐴) |
| |
| Theorem | swrdval2 11112* |
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..^(𝐿 − 𝐹)) ↦ (𝑆‘(𝑥 + 𝐹)))) |
| |
| Theorem | swrdlen 11113 |
Length of an extracted subword. (Contributed by Stefan O'Rear,
16-Aug-2015.)
|
| ⊢ ((𝑆 ∈ Word 𝐴 ∧ 𝐹 ∈ (0...𝐿) ∧ 𝐿 ∈ (0...(♯‘𝑆))) →
(♯‘(𝑆 substr
〈𝐹, 𝐿〉)) = (𝐿 − 𝐹)) |
| |
| Theorem | swrdfv 11114 |
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 〈𝐹, 𝐿〉)‘𝑋) = (𝑆‘(𝑋 + 𝐹))) |
| |
| Theorem | swrdfv0 11115 |
The first symbol in an extracted subword. (Contributed by AV,
27-Apr-2022.)
|
| ⊢ ((𝑆 ∈ Word 𝐴 ∧ 𝐹 ∈ (0..^𝐿) ∧ 𝐿 ∈ (0...(♯‘𝑆))) → ((𝑆 substr 〈𝐹, 𝐿〉)‘0) = (𝑆‘𝐹)) |
| |
| Theorem | swrdf 11116 |
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..^(𝑁 − 𝑀))⟶𝑉) |
| |
| Theorem | swrdvalfn 11117 |
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..^(𝐿 − 𝐹))) |
| |
| Theorem | swrdrn 11118 |
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 〈𝑀, 𝑁〉) ⊆ 𝑉) |
| |
| Theorem | swrdlend 11119 |
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 〈𝐹, 𝐿〉) = ∅)) |
| |
| Theorem | swrdnd 11120 |
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 〈𝐹, 𝐿〉) = ∅)) |
| |
| Theorem | swrd0g 11121 |
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
〈𝐹, 𝐿〉) = ∅) |
| |
| Theorem | swrdrlen 11122 |
Length of a right-anchored subword. (Contributed by Alexander van der
Vekens, 5-Apr-2018.)
|
| ⊢ ((𝑊 ∈ Word 𝑉 ∧ 𝐼 ∈ (0...(♯‘𝑊))) →
(♯‘(𝑊 substr
〈𝐼,
(♯‘𝑊)〉))
= ((♯‘𝑊)
− 𝐼)) |
| |
| Theorem | swrdlen2 11123 |
Length of an extracted subword. (Contributed by AV, 5-May-2020.)
|
| ⊢ ((𝑆 ∈ Word 𝑉 ∧ (𝐹 ∈ ℕ0 ∧ 𝐿 ∈
(ℤ≥‘𝐹)) ∧ 𝐿 ≤ (♯‘𝑆)) → (♯‘(𝑆 substr 〈𝐹, 𝐿〉)) = (𝐿 − 𝐹)) |
| |
| Theorem | swrdfv2 11124 |
A symbol in an extracted subword, indexed using the word's indices.
(Contributed by AV, 5-May-2020.)
|
| ⊢ (((𝑆 ∈ Word 𝑉 ∧ (𝐹 ∈ ℕ0 ∧ 𝐿 ∈
(ℤ≥‘𝐹)) ∧ 𝐿 ≤ (♯‘𝑆)) ∧ 𝑋 ∈ (𝐹..^𝐿)) → ((𝑆 substr 〈𝐹, 𝐿〉)‘(𝑋 − 𝐹)) = (𝑆‘𝑋)) |
| |
| Theorem | swrdwrdsymbg 11125 |
A subword is a word over the symbols it consists of. (Contributed by
AV, 2-Dec-2022.)
|
| ⊢ ((𝑆 ∈ Word 𝐴 ∧ 𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝑆))) → (𝑆 substr 〈𝑀, 𝑁〉) ∈ Word (𝑆 “ (𝑀..^𝑁))) |
| |
| Theorem | swrdsb0eq 11126 |
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 〈𝑀, 𝑁〉)) |
| |
| Theorem | swrdsbslen 11127 |
Two subwords with the same bounds have the same length. (Contributed by
AV, 4-May-2020.)
|
| ⊢ (((𝑊 ∈ Word 𝑉 ∧ 𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0 ∧ 𝑁 ∈ ℕ0)
∧ (𝑁 ≤
(♯‘𝑊) ∧
𝑁 ≤
(♯‘𝑈))) →
(♯‘(𝑊 substr
〈𝑀, 𝑁〉)) = (♯‘(𝑈 substr 〈𝑀, 𝑁〉))) |
| |
| Theorem | swrdspsleq 11128* |
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 〈𝑀, 𝑁〉) ↔ ∀𝑖 ∈ (𝑀..^𝑁)(𝑊‘𝑖) = (𝑈‘𝑖))) |
| |
| Theorem | swrds1 11129 |
Extract a single symbol from a word. (Contributed by Stefan O'Rear,
23-Aug-2015.)
|
| ⊢ ((𝑊 ∈ Word 𝐴 ∧ 𝐼 ∈ (0..^(♯‘𝑊))) → (𝑊 substr 〈𝐼, (𝐼 + 1)〉) = 〈“(𝑊‘𝐼)”〉) |
| |
| Theorem | swrdlsw 11130 |
Extract the last single symbol from a word. (Contributed by Alexander van
der Vekens, 23-Sep-2018.)
|
| ⊢ ((𝑊 ∈ Word 𝑉 ∧ 𝑊 ≠ ∅) → (𝑊 substr 〈((♯‘𝑊) − 1),
(♯‘𝑊)〉) =
〈“(lastS‘𝑊)”〉) |
| |
| Theorem | ccatswrd 11131 |
Joining two adjacent subwords makes a longer subword. (Contributed by
Stefan O'Rear, 20-Aug-2015.)
|
| ⊢ ((𝑆 ∈ Word 𝐴 ∧ (𝑋 ∈ (0...𝑌) ∧ 𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆)))) → ((𝑆 substr 〈𝑋, 𝑌〉) ++ (𝑆 substr 〈𝑌, 𝑍〉)) = (𝑆 substr 〈𝑋, 𝑍〉)) |
| |
| Theorem | swrdccat2 11132 |
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
|
| |
| Syntax | cpfx 11133 |
Syntax for the prefix operator.
|
| class prefix |
| |
| Definition | df-pfx 11134* |
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, 𝑙〉)) |
| |
| Theorem | pfxval 11135 |
Value of a prefix operation. (Contributed by AV, 2-May-2020.)
|
| ⊢ ((𝑆 ∈ 𝑉 ∧ 𝐿 ∈ ℕ0) → (𝑆 prefix 𝐿) = (𝑆 substr 〈0, 𝐿〉)) |
| |
| Theorem | pfx00g 11136 |
The zero length prefix is the empty set. (Contributed by AV,
2-May-2020.)
|
| ⊢ (𝑆 ∈ 𝑉 → (𝑆 prefix 0) = ∅) |
| |
| Theorem | pfx0g 11137 |
A prefix of an empty set is always the empty set. (Contributed by AV,
3-May-2020.)
|
| ⊢ (𝐿 ∈ ℕ0 → (∅
prefix 𝐿) =
∅) |
| |
| Theorem | pfxclg 11138 |
Closure of the prefix extractor. (Contributed by AV, 2-May-2020.)
|
| ⊢ ((𝑆 ∈ Word 𝐴 ∧ 𝐿 ∈ ℕ0) → (𝑆 prefix 𝐿) ∈ Word 𝐴) |
| |
| Theorem | pfxmpt 11139* |
Value of the prefix extractor as a mapping. (Contributed by AV,
2-May-2020.)
|
| ⊢ ((𝑆 ∈ Word 𝐴 ∧ 𝐿 ∈ (0...(♯‘𝑆))) → (𝑆 prefix 𝐿) = (𝑥 ∈ (0..^𝐿) ↦ (𝑆‘𝑥))) |
| |
| Theorem | pfxres 11140 |
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..^𝐿))) |
| |
| Theorem | pfxf 11141 |
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..^𝐿)⟶𝑉) |
| |
| Theorem | pfxfn 11142 |
Value of the prefix extractor as function with domain. (Contributed by
AV, 2-May-2020.)
|
| ⊢ ((𝑆 ∈ Word 𝑉 ∧ 𝐿 ∈ (0...(♯‘𝑆))) → (𝑆 prefix 𝐿) Fn (0..^𝐿)) |
| |
| Theorem | pfxfv 11143 |
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 𝐿)‘𝐼) = (𝑊‘𝐼)) |
| |
| Theorem | pfxlen 11144 |
Length of a prefix. (Contributed by Stefan O'Rear, 24-Aug-2015.)
(Revised by AV, 2-May-2020.)
|
| ⊢ ((𝑆 ∈ Word 𝐴 ∧ 𝐿 ∈ (0...(♯‘𝑆))) →
(♯‘(𝑆 prefix
𝐿)) = 𝐿) |
| |
| Theorem | pfxid 11145 |
A word is a prefix of itself. (Contributed by Stefan O'Rear,
16-Aug-2015.) (Revised by AV, 2-May-2020.)
|
| ⊢ (𝑆 ∈ Word 𝐴 → (𝑆 prefix (♯‘𝑆)) = 𝑆) |
| |
| Theorem | pfxrn 11146 |
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 𝐿) ⊆ 𝑉) |
| |
| Theorem | pfxn0 11147 |
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 𝐿) ≠ ∅) |
| |
| Theorem | pfxnd 11148 |
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 5614). (Contributed by AV,
3-May-2020.)
|
| ⊢ ((𝑊 ∈ Word 𝑉 ∧ 𝐿 ∈ ℕ0 ∧
(♯‘𝑊) <
𝐿) → (𝑊 prefix 𝐿) = ∅) |
| |
| Theorem | pfxwrdsymbg 11149 |
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..^𝐿))) |
| |
| Theorem | addlenpfx 11150 |
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
〈𝑀,
(♯‘𝑊)〉)))
= (♯‘𝑊)) |
| |
| Theorem | pfxfv0 11151 |
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)) |
| |
| Theorem | pfxtrcfv 11152 |
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))‘𝐼) = (𝑊‘𝐼)) |
| |
| Theorem | pfxtrcfv0 11153 |
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)) |
| |
| Theorem | pfxfvlsw 11154 |
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))) |
| |
| Theorem | pfxeq 11155* |
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..^𝑀)(𝑊‘𝑖) = (𝑈‘𝑖)))) |
| |
| Theorem | pfxtrcfvl 11156 |
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))) |
| |
| Theorem | pfxsuffeqwrdeq 11157 |
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 〈𝐼, (♯‘𝑊)〉))))) |
| |
| Theorem | pfxsuff1eqwrdeq 11158 |
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‘𝑈))))) |
| |
| Theorem | disjwrdpfx 11159* |
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 𝑁) = 𝑦} |
| |
| Theorem | ccatpfx 11160 |
Concatenating a prefix with an adjacent subword makes a longer prefix.
(Contributed by AV, 7-May-2020.)
|
| ⊢ ((𝑆 ∈ Word 𝐴 ∧ 𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) → ((𝑆 prefix 𝑌) ++ (𝑆 substr 〈𝑌, 𝑍〉)) = (𝑆 prefix 𝑍)) |
| |
| Theorem | pfxccat1 11161 |
Recover the left half of a concatenated word. (Contributed by Mario
Carneiro, 27-Sep-2015.) (Revised by AV, 6-May-2020.)
|
| ⊢ ((𝑆 ∈ Word 𝐵 ∧ 𝑇 ∈ Word 𝐵) → ((𝑆 ++ 𝑇) prefix (♯‘𝑆)) = 𝑆) |
| |
| Theorem | pfx1 11162 |
The prefix of length one of a nonempty word expressed as a singleton word.
(Contributed by AV, 15-May-2020.)
|
| ⊢ ((𝑊 ∈ Word 𝑉 ∧ 𝑊 ≠ ∅) → (𝑊 prefix 1) = 〈“(𝑊‘0)”〉) |
| |
| 4.7.8 Subwords of subwords
|
| |
| Theorem | swrdswrdlem 11163 |
Lemma for swrdswrd 11164. (Contributed by Alexander van der Vekens,
4-Apr-2018.)
|
| ⊢ (((𝑊 ∈ Word 𝑉 ∧ 𝑁 ∈ (0...(♯‘𝑊)) ∧ 𝑀 ∈ (0...𝑁)) ∧ (𝐾 ∈ (0...(𝑁 − 𝑀)) ∧ 𝐿 ∈ (𝐾...(𝑁 − 𝑀)))) → (𝑊 ∈ Word 𝑉 ∧ (𝑀 + 𝐾) ∈ (0...(𝑀 + 𝐿)) ∧ (𝑀 + 𝐿) ∈ (0...(♯‘𝑊)))) |
| |
| Theorem | swrdswrd 11164 |
A subword of a subword is a subword. (Contributed by Alexander van der
Vekens, 4-Apr-2018.)
|
| ⊢ ((𝑊 ∈ Word 𝑉 ∧ 𝑁 ∈ (0...(♯‘𝑊)) ∧ 𝑀 ∈ (0...𝑁)) → ((𝐾 ∈ (0...(𝑁 − 𝑀)) ∧ 𝐿 ∈ (𝐾...(𝑁 − 𝑀))) → ((𝑊 substr 〈𝑀, 𝑁〉) substr 〈𝐾, 𝐿〉) = (𝑊 substr 〈(𝑀 + 𝐾), (𝑀 + 𝐿)〉))) |
| |
| Theorem | pfxswrd 11165 |
A prefix of a subword is a subword. (Contributed by AV, 2-Apr-2018.)
(Revised by AV, 8-May-2020.)
|
| ⊢ ((𝑊 ∈ Word 𝑉 ∧ 𝑁 ∈ (0...(♯‘𝑊)) ∧ 𝑀 ∈ (0...𝑁)) → (𝐿 ∈ (0...(𝑁 − 𝑀)) → ((𝑊 substr 〈𝑀, 𝑁〉) prefix 𝐿) = (𝑊 substr 〈𝑀, (𝑀 + 𝐿)〉))) |
| |
| Theorem | swrdpfx 11166 |
A subword of a prefix is a subword. (Contributed by Alexander van der
Vekens, 6-Apr-2018.) (Revised by AV, 8-May-2020.)
|
| ⊢ ((𝑊 ∈ Word 𝑉 ∧ 𝑁 ∈ (0...(♯‘𝑊))) → ((𝐾 ∈ (0...𝑁) ∧ 𝐿 ∈ (𝐾...𝑁)) → ((𝑊 prefix 𝑁) substr 〈𝐾, 𝐿〉) = (𝑊 substr 〈𝐾, 𝐿〉))) |
| |
| Theorem | pfxpfx 11167 |
A prefix of a prefix is a prefix. (Contributed by Alexander van der
Vekens, 7-Apr-2018.) (Revised by AV, 8-May-2020.)
|
| ⊢ ((𝑊 ∈ Word 𝑉 ∧ 𝑁 ∈ (0...(♯‘𝑊)) ∧ 𝐿 ∈ (0...𝑁)) → ((𝑊 prefix 𝑁) prefix 𝐿) = (𝑊 prefix 𝐿)) |
| |
| Theorem | pfxpfxid 11168 |
A prefix of a prefix with the same length is the original prefix. In
other words, the operation "prefix of length 𝑁 " is idempotent.
(Contributed by AV, 5-Apr-2018.) (Revised by AV, 8-May-2020.)
|
| ⊢ ((𝑊 ∈ Word 𝑉 ∧ 𝑁 ∈ (0...(♯‘𝑊))) → ((𝑊 prefix 𝑁) prefix 𝑁) = (𝑊 prefix 𝑁)) |
| |
| 4.8 Elementary real and complex
functions
|
| |
| 4.8.1 The "shift" operation
|
| |
| Syntax | cshi 11169 |
Extend class notation with function shifter.
|
| class shift |
| |
| Definition | df-shft 11170* |
Define a function shifter. This operation offsets the value argument of
a function (ordinarily on a subset of ℂ)
and produces a new
function on ℂ. See shftval 11180 for its value. (Contributed by NM,
20-Jul-2005.)
|
| ⊢ shift = (𝑓 ∈ V, 𝑥 ∈ ℂ ↦ {〈𝑦, 𝑧〉 ∣ (𝑦 ∈ ℂ ∧ (𝑦 − 𝑥)𝑓𝑧)}) |
| |
| Theorem | shftlem 11171* |
Two ways to write a shifted set (𝐵 + 𝐴). (Contributed by Mario
Carneiro, 3-Nov-2013.)
|
| ⊢ ((𝐴 ∈ ℂ ∧ 𝐵 ⊆ ℂ) → {𝑥 ∈ ℂ ∣ (𝑥 − 𝐴) ∈ 𝐵} = {𝑥 ∣ ∃𝑦 ∈ 𝐵 𝑥 = (𝑦 + 𝐴)}) |
| |
| Theorem | shftuz 11172* |
A shift of the upper integers. (Contributed by Mario Carneiro,
5-Nov-2013.)
|
| ⊢ ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) → {𝑥 ∈ ℂ ∣ (𝑥 − 𝐴) ∈
(ℤ≥‘𝐵)} = (ℤ≥‘(𝐵 + 𝐴))) |
| |
| Theorem | shftfvalg 11173* |
The value of the sequence shifter operation is a function on ℂ.
𝐴 is ordinarily an integer.
(Contributed by NM, 20-Jul-2005.)
(Revised by Mario Carneiro, 3-Nov-2013.)
|
| ⊢ ((𝐴 ∈ ℂ ∧ 𝐹 ∈ 𝑉) → (𝐹 shift 𝐴) = {〈𝑥, 𝑦〉 ∣ (𝑥 ∈ ℂ ∧ (𝑥 − 𝐴)𝐹𝑦)}) |
| |
| Theorem | ovshftex 11174 |
Existence of the result of applying shift. (Contributed by Jim Kingdon,
15-Aug-2021.)
|
| ⊢ ((𝐹 ∈ 𝑉 ∧ 𝐴 ∈ ℂ) → (𝐹 shift 𝐴) ∈ V) |
| |
| Theorem | shftfibg 11175 |
Value of a fiber of the relation 𝐹. (Contributed by Jim Kingdon,
15-Aug-2021.)
|
| ⊢ ((𝐹 ∈ 𝑉 ∧ 𝐴 ∈ ℂ ∧ 𝐵 ∈ ℂ) → ((𝐹 shift 𝐴) “ {𝐵}) = (𝐹 “ {(𝐵 − 𝐴)})) |
| |
| Theorem | shftfval 11176* |
The value of the sequence shifter operation is a function on ℂ.
𝐴 is ordinarily an integer.
(Contributed by NM, 20-Jul-2005.)
(Revised by Mario Carneiro, 3-Nov-2013.)
|
| ⊢ 𝐹 ∈ V ⇒ ⊢ (𝐴 ∈ ℂ → (𝐹 shift 𝐴) = {〈𝑥, 𝑦〉 ∣ (𝑥 ∈ ℂ ∧ (𝑥 − 𝐴)𝐹𝑦)}) |
| |
| Theorem | shftdm 11177* |
Domain of a relation shifted by 𝐴. The set on the right is more
commonly notated as (dom 𝐹 + 𝐴) (meaning add 𝐴 to every
element of dom 𝐹). (Contributed by Mario Carneiro,
3-Nov-2013.)
|
| ⊢ 𝐹 ∈ V ⇒ ⊢ (𝐴 ∈ ℂ → dom (𝐹 shift 𝐴) = {𝑥 ∈ ℂ ∣ (𝑥 − 𝐴) ∈ dom 𝐹}) |
| |
| Theorem | shftfib 11178 |
Value of a fiber of the relation 𝐹. (Contributed by Mario
Carneiro, 4-Nov-2013.)
|
| ⊢ 𝐹 ∈ V ⇒ ⊢ ((𝐴 ∈ ℂ ∧ 𝐵 ∈ ℂ) → ((𝐹 shift 𝐴) “ {𝐵}) = (𝐹 “ {(𝐵 − 𝐴)})) |
| |
| Theorem | shftfn 11179* |
Functionality and domain of a sequence shifted by 𝐴. (Contributed
by NM, 20-Jul-2005.) (Revised by Mario Carneiro, 3-Nov-2013.)
|
| ⊢ 𝐹 ∈ V ⇒ ⊢ ((𝐹 Fn 𝐵 ∧ 𝐴 ∈ ℂ) → (𝐹 shift 𝐴) Fn {𝑥 ∈ ℂ ∣ (𝑥 − 𝐴) ∈ 𝐵}) |
| |
| Theorem | shftval 11180 |
Value of a sequence shifted by 𝐴. (Contributed by NM,
20-Jul-2005.) (Revised by Mario Carneiro, 4-Nov-2013.)
|
| ⊢ 𝐹 ∈ V ⇒ ⊢ ((𝐴 ∈ ℂ ∧ 𝐵 ∈ ℂ) → ((𝐹 shift 𝐴)‘𝐵) = (𝐹‘(𝐵 − 𝐴))) |
| |
| Theorem | shftval2 11181 |
Value of a sequence shifted by 𝐴 − 𝐵. (Contributed by NM,
20-Jul-2005.) (Revised by Mario Carneiro, 5-Nov-2013.)
|
| ⊢ 𝐹 ∈ V ⇒ ⊢ ((𝐴 ∈ ℂ ∧ 𝐵 ∈ ℂ ∧ 𝐶 ∈ ℂ) → ((𝐹 shift (𝐴 − 𝐵))‘(𝐴 + 𝐶)) = (𝐹‘(𝐵 + 𝐶))) |
| |
| Theorem | shftval3 11182 |
Value of a sequence shifted by 𝐴 − 𝐵. (Contributed by NM,
20-Jul-2005.)
|
| ⊢ 𝐹 ∈ V ⇒ ⊢ ((𝐴 ∈ ℂ ∧ 𝐵 ∈ ℂ) → ((𝐹 shift (𝐴 − 𝐵))‘𝐴) = (𝐹‘𝐵)) |
| |
| Theorem | shftval4 11183 |
Value of a sequence shifted by -𝐴. (Contributed by NM,
18-Aug-2005.) (Revised by Mario Carneiro, 5-Nov-2013.)
|
| ⊢ 𝐹 ∈ V ⇒ ⊢ ((𝐴 ∈ ℂ ∧ 𝐵 ∈ ℂ) → ((𝐹 shift -𝐴)‘𝐵) = (𝐹‘(𝐴 + 𝐵))) |
| |
| Theorem | shftval5 11184 |
Value of a shifted sequence. (Contributed by NM, 19-Aug-2005.)
(Revised by Mario Carneiro, 5-Nov-2013.)
|
| ⊢ 𝐹 ∈ V ⇒ ⊢ ((𝐴 ∈ ℂ ∧ 𝐵 ∈ ℂ) → ((𝐹 shift 𝐴)‘(𝐵 + 𝐴)) = (𝐹‘𝐵)) |
| |
| Theorem | shftf 11185* |
Functionality of a shifted sequence. (Contributed by NM, 19-Aug-2005.)
(Revised by Mario Carneiro, 5-Nov-2013.)
|
| ⊢ 𝐹 ∈ V ⇒ ⊢ ((𝐹:𝐵⟶𝐶 ∧ 𝐴 ∈ ℂ) → (𝐹 shift 𝐴):{𝑥 ∈ ℂ ∣ (𝑥 − 𝐴) ∈ 𝐵}⟶𝐶) |
| |
| Theorem | 2shfti 11186 |
Composite shift operations. (Contributed by NM, 19-Aug-2005.) (Revised
by Mario Carneiro, 5-Nov-2013.)
|
| ⊢ 𝐹 ∈ V ⇒ ⊢ ((𝐴 ∈ ℂ ∧ 𝐵 ∈ ℂ) → ((𝐹 shift 𝐴) shift 𝐵) = (𝐹 shift (𝐴 + 𝐵))) |
| |
| Theorem | shftidt2 11187 |
Identity law for the shift operation. (Contributed by Mario Carneiro,
5-Nov-2013.)
|
| ⊢ 𝐹 ∈ V ⇒ ⊢ (𝐹 shift 0) = (𝐹 ↾ ℂ) |
| |
| Theorem | shftidt 11188 |
Identity law for the shift operation. (Contributed by NM, 19-Aug-2005.)
(Revised by Mario Carneiro, 5-Nov-2013.)
|
| ⊢ 𝐹 ∈ V ⇒ ⊢ (𝐴 ∈ ℂ → ((𝐹 shift 0)‘𝐴) = (𝐹‘𝐴)) |
| |
| Theorem | shftcan1 11189 |
Cancellation law for the shift operation. (Contributed by NM,
4-Aug-2005.) (Revised by Mario Carneiro, 5-Nov-2013.)
|
| ⊢ 𝐹 ∈ V ⇒ ⊢ ((𝐴 ∈ ℂ ∧ 𝐵 ∈ ℂ) → (((𝐹 shift 𝐴) shift -𝐴)‘𝐵) = (𝐹‘𝐵)) |
| |
| Theorem | shftcan2 11190 |
Cancellation law for the shift operation. (Contributed by NM,
4-Aug-2005.) (Revised by Mario Carneiro, 5-Nov-2013.)
|
| ⊢ 𝐹 ∈ V ⇒ ⊢ ((𝐴 ∈ ℂ ∧ 𝐵 ∈ ℂ) → (((𝐹 shift -𝐴) shift 𝐴)‘𝐵) = (𝐹‘𝐵)) |
| |
| Theorem | shftvalg 11191 |
Value of a sequence shifted by 𝐴. (Contributed by Scott Fenton,
16-Dec-2017.)
|
| ⊢ ((𝐹 ∈ 𝑉 ∧ 𝐴 ∈ ℂ ∧ 𝐵 ∈ ℂ) → ((𝐹 shift 𝐴)‘𝐵) = (𝐹‘(𝐵 − 𝐴))) |
| |
| Theorem | shftval4g 11192 |
Value of a sequence shifted by -𝐴. (Contributed by Jim Kingdon,
19-Aug-2021.)
|
| ⊢ ((𝐹 ∈ 𝑉 ∧ 𝐴 ∈ ℂ ∧ 𝐵 ∈ ℂ) → ((𝐹 shift -𝐴)‘𝐵) = (𝐹‘(𝐴 + 𝐵))) |
| |
| Theorem | seq3shft 11193* |
Shifting the index set of a sequence. (Contributed by NM, 17-Mar-2005.)
(Revised by Jim Kingdon, 17-Oct-2022.)
|
| ⊢ (𝜑 → 𝐹 ∈ 𝑉)
& ⊢ (𝜑 → 𝑀 ∈ ℤ) & ⊢ (𝜑 → 𝑁 ∈ ℤ) & ⊢ ((𝜑 ∧ 𝑥 ∈ (ℤ≥‘(𝑀 − 𝑁))) → (𝐹‘𝑥) ∈ 𝑆)
& ⊢ ((𝜑 ∧ (𝑥 ∈ 𝑆 ∧ 𝑦 ∈ 𝑆)) → (𝑥 + 𝑦) ∈ 𝑆) ⇒ ⊢ (𝜑 → seq𝑀( + , (𝐹 shift 𝑁)) = (seq(𝑀 − 𝑁)( + , 𝐹) shift 𝑁)) |
| |
| 4.8.2 Real and imaginary parts;
conjugate
|
| |
| Syntax | ccj 11194 |
Extend class notation to include complex conjugate function.
|
| class ∗ |
| |
| Syntax | cre 11195 |
Extend class notation to include real part of a complex number.
|
| class ℜ |
| |
| Syntax | cim 11196 |
Extend class notation to include imaginary part of a complex number.
|
| class ℑ |
| |
| Definition | df-cj 11197* |
Define the complex conjugate function. See cjcli 11268 for its closure and
cjval 11200 for its value. (Contributed by NM,
9-May-1999.) (Revised by
Mario Carneiro, 6-Nov-2013.)
|
| ⊢ ∗ = (𝑥 ∈ ℂ ↦ (℩𝑦 ∈ ℂ ((𝑥 + 𝑦) ∈ ℝ ∧ (i · (𝑥 − 𝑦)) ∈ ℝ))) |
| |
| Definition | df-re 11198 |
Define a function whose value is the real part of a complex number. See
reval 11204 for its value, recli 11266 for its closure, and replim 11214 for its use
in decomposing a complex number. (Contributed by NM, 9-May-1999.)
|
| ⊢ ℜ = (𝑥 ∈ ℂ ↦ ((𝑥 + (∗‘𝑥)) / 2)) |
| |
| Definition | df-im 11199 |
Define a function whose value is the imaginary part of a complex number.
See imval 11205 for its value, imcli 11267 for its closure, and replim 11214 for its
use in decomposing a complex number. (Contributed by NM,
9-May-1999.)
|
| ⊢ ℑ = (𝑥 ∈ ℂ ↦ (ℜ‘(𝑥 / i))) |
| |
| Theorem | cjval 11200* |
The value of the conjugate of a complex number. (Contributed by Mario
Carneiro, 6-Nov-2013.)
|
| ⊢ (𝐴 ∈ ℂ →
(∗‘𝐴) =
(℩𝑥 ∈
ℂ ((𝐴 + 𝑥) ∈ ℝ ∧ (i
· (𝐴 − 𝑥)) ∈
ℝ))) |