Documentation

Init.Data.String.Lemmas.Pattern.Pred

theorem String.Slice.Pattern.Model.CharPred.isLongestMatchAt_iff {p : CharBool} {s : Slice} {pos pos' : s.Pos} :
IsLongestMatchAt p pos pos' (h : pos s.endPos), pos' = pos.next h p (pos.get h) = true
theorem String.Slice.Pattern.Model.CharPred.isLongestRevMatchAt_iff {p : CharBool} {s : Slice} {pos pos' : s.Pos} :
IsLongestRevMatchAt p pos pos' (h : pos' s.startPos), pos = pos'.prev h p ((pos'.prev h).get ) = true
theorem String.Slice.Pattern.Model.CharPred.isLongestMatchAt_of_get {p : CharBool} {s : Slice} {pos : s.Pos} {h : pos s.endPos} (hc : p (pos.get h) = true) :
IsLongestMatchAt p pos (pos.next h)
theorem String.Slice.Pattern.Model.CharPred.isLongestRevMatchAt_of_get {p : CharBool} {s : Slice} {pos : s.Pos} {h : pos s.startPos} (hc : p ((pos.prev h).get ) = true) :
theorem String.Slice.Pattern.Model.CharPred.matchesAt_iff {p : CharBool} {s : Slice} {pos : s.Pos} :
MatchesAt p pos (h : pos s.endPos), p (pos.get h) = true
theorem String.Slice.Pattern.Model.CharPred.not_matchesAt_of_get {p : CharBool} {s : Slice} {pos : s.Pos} {h : pos s.endPos} (hc : p (pos.get h) = false) :
theorem String.Slice.Pattern.Model.CharPred.not_revMatchesAt_of_get {p : CharBool} {s : Slice} {pos : s.Pos} {h : pos s.startPos} (hc : p ((pos.prev h).get ) = false) :
theorem String.Slice.Pattern.Model.CharPred.matchAt?_eq {s : Slice} {pos : s.Pos} {p : CharBool} :
matchAt? p pos = if h₀ : (h : pos s.endPos), p (pos.get h) = true then some (pos.next ) else none
theorem String.Slice.Pattern.Model.CharPred.revMatchAt?_eq {s : Slice} {pos : s.Pos} {p : CharBool} :
revMatchAt? p pos = if h₀ : (h : pos s.startPos), p ((pos.prev h).get ) = true then some (pos.prev ) else none
@[implicit_reducible]
Equations
  • One or more equations did not get rendered due to their size.
theorem String.Slice.Pattern.Model.CharPred.Decidable.isLongestMatchAt_iff {p : CharProp} [DecidablePred p] {s : Slice} {pos pos' : s.Pos} :
IsLongestMatchAt p pos pos' (h : pos s.endPos), pos' = pos.next h p (pos.get h)
theorem String.Slice.Pattern.Model.CharPred.Decidable.isLongestRevMatchAt_iff {p : CharProp} [DecidablePred p] {s : Slice} {pos pos' : s.Pos} :
IsLongestRevMatchAt p pos pos' (h : pos' s.startPos), pos = pos'.prev h p ((pos'.prev h).get )
theorem String.Slice.Pattern.Model.CharPred.Decidable.isLongestMatchAt_of_get {p : CharProp} [DecidablePred p] {s : Slice} {pos : s.Pos} {h : pos s.endPos} (hc : p (pos.get h)) :
IsLongestMatchAt p pos (pos.next h)
theorem String.Slice.Pattern.Model.CharPred.Decidable.isLongestRevMatchAt_of_get {p : CharProp} [DecidablePred p] {s : Slice} {pos : s.Pos} {h : pos s.startPos} (hc : p ((pos.prev h).get )) :
theorem String.Slice.Pattern.Model.CharPred.Decidable.matchAt?_eq {s : Slice} {pos : s.Pos} {p : CharProp} [DecidablePred p] :
matchAt? p pos = if h₀ : (h : pos s.endPos), p (pos.get h) then some (pos.next ) else none
theorem String.Slice.Pattern.Model.CharPred.Decidable.revMatchAt?_eq {s : Slice} {pos : s.Pos} {p : CharProp} [DecidablePred p] :
revMatchAt? p pos = if h₀ : (h : pos s.startPos), p ((pos.prev h).get ) then some (pos.prev ) else none
theorem String.Slice.Pos.skipWhile_prop_eq_skipWhile_decide {p : CharProp} [DecidablePred p] {s : Slice} (curr : s.Pos) :
curr.skipWhile p = curr.skipWhile fun (x : Char) => decide (p x)
theorem String.Slice.all_prop_eq_all_decide {p : CharProp} [DecidablePred p] {s : Slice} :
s.all p = s.all fun (x : Char) => decide (p x)
theorem String.Slice.find?_prop_eq_find?_decide {p : CharProp} [DecidablePred p] {s : Slice} :
s.find? p = s.find? fun (x : Char) => decide (p x)
theorem String.Slice.Pos.find?_prop_eq_find?_decide {p : CharProp} [DecidablePred p] {s : Slice} {pos : s.Pos} :
pos.find? p = pos.find? fun (x : Char) => decide (p x)