Documentation

Init.Data.String.Lemmas.Pattern.Split.Basic

@[irreducible]
noncomputable def String.Slice.Pattern.Model.split {ρ : Type} (pat : ρ) [PatternModel pat] {s : Slice} (firstRejected curr : s.Pos) (hle : firstRejected curr) :
Equations
  • One or more equations did not get rendered due to their size.
Instances For
    @[simp]
    theorem String.Slice.Pattern.Model.split_endPos {ρ : Type} {pat : ρ} [PatternModel pat] {s : Slice} {firstRejected : s.Pos} :
    Model.split pat firstRejected s.endPos = [s.subslice firstRejected s.endPos ]
    theorem String.Slice.Pattern.Model.split_eq_of_isLongestMatchAt {ρ : Type} {pat : ρ} [PatternModel pat] {s : Slice} {firstRejected start stop : s.Pos} {hle : firstRejected start} (h : IsLongestMatchAt pat start stop) :
    Model.split pat firstRejected start hle = s.subslice firstRejected start hle :: Model.split pat stop stop
    theorem String.Slice.Pattern.Model.split_eq_of_not_matchesAt {ρ : Type} {pat : ρ} [PatternModel pat] {s : Slice} {firstRejected start : s.Pos} (stop : s.Pos) (h₀ : start stop) {hle : firstRejected start} (h : ∀ (p : s.Pos), start pp < stop¬MatchesAt pat p) :
    Model.split pat firstRejected start hle = Model.split pat firstRejected stop
    theorem String.Slice.Pattern.Model.split_eq_next_of_not_matchesAt {ρ : Type} {pat : ρ} [PatternModel pat] {s : Slice} {firstRejected start : s.Pos} {hle : firstRejected start} (hs : start s.endPos) (h : ¬MatchesAt pat start) :
    Model.split pat firstRejected start hle = Model.split pat firstRejected (start.next hs)
    theorem String.split_eq_split_toSlice {ρ : Type} {pat : ρ} {σ : SliceType} [Slice.Pattern.ToForwardSearcher pat σ] [(s : Slice) → Std.Iterator (σ s) Id (Slice.Pattern.SearchStep s)] {s : String} :
    s.split pat = s.toSlice.split pat