Documentation

Init.Data.String.Lemmas.Pattern.Char

@[implicit_reducible]
Equations
theorem String.Slice.Pattern.Model.Char.isLongestMatchAt_iff {c : Char} {s : Slice} {pos pos' : s.Pos} :
IsLongestMatchAt c pos pos' (h : pos s.endPos), pos' = pos.next h pos.get h = c
theorem String.Slice.Pattern.Model.Char.isLongestRevMatchAt_iff {c : Char} {s : Slice} {pos pos' : s.Pos} :
IsLongestRevMatchAt c pos pos' (h : pos' s.startPos), pos = pos'.prev h (pos'.prev h).get = c
theorem String.Slice.Pattern.Model.Char.isLongestMatchAt_of_get_eq {c : Char} {s : Slice} {pos : s.Pos} {h : pos s.endPos} (hc : pos.get h = c) :
IsLongestMatchAt c pos (pos.next h)
theorem String.Slice.Pattern.Model.Char.isLongestRevMatchAt_of_get_eq {c : Char} {s : Slice} {pos : s.Pos} {h : pos s.startPos} (hc : (pos.prev h).get = c) :
theorem String.Slice.Pattern.Model.Char.matchesAt_iff {c : Char} {s : Slice} {pos : s.Pos} :
MatchesAt c pos (h : pos s.endPos), pos.get h = c
theorem String.Slice.Pattern.Model.Char.not_matchesAt_of_get_ne {c : Char} {s : Slice} {pos : s.Pos} {h : pos s.endPos} (hc : pos.get h c) :
theorem String.Slice.Pattern.Model.Char.not_revMatchesAt_of_get_ne {c : Char} {s : Slice} {pos : s.Pos} {h : pos s.startPos} (hc : (pos.prev h).get c) :
theorem String.Slice.Pattern.Model.Char.matchAt?_eq {s : Slice} {pos : s.Pos} {c : Char} :
matchAt? c pos = if h₀ : (h : pos s.endPos), pos.get h = c then some (pos.next ) else none
theorem String.Slice.Pattern.Model.Char.revMatchAt?_eq {s : Slice} {pos : s.Pos} {c : Char} :
revMatchAt? c pos = if h₀ : (h : pos s.startPos), (pos.prev h).get = c then some (pos.prev ) else none
theorem String.Slice.Pattern.Model.Char.isMatch_iff_isMatch_beq {c : Char} {s : Slice} {pos : s.Pos} :
IsMatch c pos IsMatch (fun (x : Char) => x == c) pos
theorem String.Slice.Pattern.Model.Char.matchAt?_eq_matchAt?_beq {c : Char} {s : Slice} {pos : s.Pos} :
matchAt? c pos = matchAt? (fun (x : Char) => x == c) pos
theorem String.Slice.Pos.skipWhile_char_eq_skipWhile_beq {c : Char} {s : Slice} (curr : s.Pos) :
curr.skipWhile c = curr.skipWhile fun (x : Char) => x == c
theorem String.Slice.all_char_eq_all_beq {c : Char} {s : Slice} :
s.all c = s.all fun (x : Char) => x == c
theorem String.Slice.find?_char_eq_find?_beq {c : Char} {s : Slice} :
s.find? c = s.find? fun (x : Char) => x == c
theorem String.Slice.Pos.find?_char_eq_find?_beq {c : Char} {s : Slice} {p : s.Pos} :
p.find? c = p.find? fun (x : Char) => x == c
theorem String.Slice.Pos.revSkipWhile_char_eq_revSkipWhile_beq {c : Char} {s : Slice} (curr : s.Pos) :
curr.revSkipWhile c = curr.revSkipWhile fun (x : Char) => x == c