Documentation

Init.Data.String.Lemmas.Iterate

@[irreducible]

A list of all positions starting at p.

This function is not meant to be used in actual progams. Actual programs should use Slice.positionsFrom or Slice.positions.

Equations
Instances For
    theorem String.Slice.Model.map_get_positionsFrom_of_splits {s : Slice} {p : s.Pos} {t₁ t₂ : String} (hp : p.Splits t₁ t₂) :
    List.map (fun (p : { p : s.Pos // p s.endPos }) => p.val.get ) (Model.positionsFrom p) = t₂.toList
    @[irreducible]

    A list of all positions strictly before p, ordered from largest to smallest.

    This function is not meant to be used in actual programs. Actual programs should use Slice.revPositionsFrom and Slice.revPositions.

    Equations
    Instances For
      theorem String.Slice.Model.map_get_revPositionsFrom_of_splits {s : Slice} {p : s.Pos} {t₁ t₂ : String} (hp : p.Splits t₁ t₂) :
      List.map (fun (p : { p : s.Pos // p s.endPos }) => p.val.get ) (Model.revPositionsFrom p) = t₁.toList.reverse
      theorem String.Slice.forIn_eq_forIn_chars {β : Type u} {m : Type u → Type v} [Monad m] {s : Slice} {b : β} {f : Charβm (ForInStep β)} :
      forIn s b f = forIn s.chars b f
      @[simp]
      theorem String.Slice.forIn_eq_forIn_toList {β : Type u} {m : Type u → Type v} [Monad m] [LawfulMonad m] {s : Slice} {b : β} {f : Charβm (ForInStep β)} :
      forIn s b f = forIn s.copy.toList b f
      @[irreducible]

      A list of all positions starting at p.

      This function is not meant to be used in actual progams. Actual programs should use Slice.positionsFrom or Slice.positions.

      Equations
      Instances For
        theorem String.Model.map_get_positionsFrom_of_splits {s : String} {p : s.Pos} {t₁ t₂ : String} (hp : p.Splits t₁ t₂) :
        List.map (fun (p : { p : s.Pos // p s.endPos }) => p.val.get ) (Model.positionsFrom p) = t₂.toList
        @[irreducible]

        A list of all positions strictly before p, ordered from largest to smallest.

        This function is not meant to be used in actual programs. Actual programs should use Slice.revPositionsFrom and Slice.revPositions.

        Equations
        Instances For
          theorem String.Model.map_get_revPositionsFrom_of_splits {s : String} {p : s.Pos} {t₁ t₂ : String} (hp : p.Splits t₁ t₂) :
          List.map (fun (p : { p : s.Pos // p s.endPos }) => p.val.get ) (Model.revPositionsFrom p) = t₁.toList.reverse
          theorem String.forIn_eq_forIn_chars {β : Type u} {m : Type u → Type v} [Monad m] {s : String} {b : β} {f : Charβm (ForInStep β)} :
          forIn s b f = forIn s.chars b f
          @[simp]
          theorem String.forIn_eq_forIn_toList {β : Type u} {m : Type u → Type v} [Monad m] [LawfulMonad m] {s : String} {b : β} {f : Charβm (ForInStep β)} :
          forIn s b f = forIn s.toList b f