Documentation

RegexCorrectness.Data.String

theorem String.Pos.valid_of_isValidAux (cs : List Char) (p i : Pos) (h : isValid.go p cs i = true) :
(cs₁ : List Char), (cs₂ : List Char), cs = cs₁ ++ cs₂ p = i + { byteIdx := utf8Len cs₁ }
theorem String.Pos.valid_of_isValid {s : String} {p : Pos} (v : isValid s p = true) :
Valid s p
theorem String.Pos.isValid_of_validAux (cs₁ cs₂ : List Char) (p i : Pos) (hp : p = i + { byteIdx := utf8Len cs₁ }) :
isValid.go p (cs₁ ++ cs₂) i = true
theorem String.Pos.isValid_of_valid (cs₁ cs₂ : List Char) (p : Pos) (hp : p = { byteIdx := utf8Len cs₁ }) :
isValid { data := cs₁ ++ cs₂ } p = true
theorem String.Iterator.ext {it₁ it₂ : Iterator} (hs : it₁.s = it₂.s) (hi : it₁.i = it₂.i) :
it₁ = it₂
theorem String.Iterator.ext_iff {it₁ it₂ : Iterator} :
it₁ = it₂ it₁.s = it₂.s it₁.i = it₂.i
@[simp]
@[simp]
theorem String.eq_of_append_utf8Len {cs₁ cs₂ cs₃ cs₄ : List Char} (h₁ : cs₁ ++ cs₂ = cs₃ ++ cs₄) (h₂ : utf8Len cs₁ = utf8Len cs₃) :
cs₁ = cs₃ cs₂ = cs₄
theorem String.eq_of_append_eq (l mr lm r : List Char) (le : utf8Len l utf8Len lm) (eq : l ++ mr = lm ++ r) :
(m : List Char), mr = m ++ r lm = l ++ m
theorem String.Iterator.Valid.validFor_of_valid_pos_le {it it' : Iterator} (v : it.Valid) (v' : it'.Valid) (eqs : it.toString = it'.toString) (le : it.pos it'.pos) :
theorem String.Iterator.Valid.pos_le_or_ge_next {it it' : Iterator} (v : it.Valid) (v' : it'.Valid) (eqs : it.toString = it'.toString) :
it.pos it'.pos it'.next.pos it.pos
theorem String.Iterator.ValidFor.eq {it : Iterator} {l₁ r₁ l₂ r₂ : List Char} (v₁ : ValidFor l₁ r₁ it) (v₂ : ValidFor l₂ r₂ it) :
l₁ = l₂ r₁ = r₂
theorem String.Iterator.ValidFor.eq_it {it₁ it₂ : Iterator} {l r : List Char} (v₁ : ValidFor l r it₁) (v₂ : ValidFor l r it₂) :
it₁ = it₂
theorem String.Iterator.eq_of_valid_of_next_eq {it₁ it₂ : Iterator} (v₁ : it₁.Valid) (v₂ : it₂.Valid) (h : it₁.next = it₂.next) :
it₁ = it₂

A variant of Valid that allows past-one position that represents the position after running a search at the end of the string.

Equations
Instances For
    theorem String.Pos.Valid.validPlus {s : String} {p : Pos} :
    Valid s pValidPlus s p
    theorem String.Pos.next_endPos {s : String} :
    s.next s.endPos = s.endPos + { byteIdx := 1 }
    theorem String.Pos.ValidPlus.valid_of_le {s : String} {p : Pos} (le : p s.endPos) (vp : ValidPlus s p) :
    Valid s p