Documentation

Mathlib.Data.String.Basic

Strings #

Supplementary theorems about the String type.

< on string iterators. This coincides with < on strings as lists.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    instance String.LT' :
    Equations
    instance String.decidableLT :
    DecidableRel fun (x x_1 : String) => x < x_1
    Equations
    def String.ltb.inductionOn {motive : String.IteratorString.IteratorSort u} (it₁ : String.Iterator) (it₂ : String.Iterator) (ind : (s₁ s₂ : String) → (i₁ i₂ : String.Pos) → String.Iterator.hasNext { s := s₂, i := i₂ } = trueString.Iterator.hasNext { s := s₁, i := i₁ } = trueString.get s₁ i₁ = String.get s₂ i₂motive (String.Iterator.next { s := s₁, i := i₁ }) (String.Iterator.next { s := s₂, i := i₂ })motive { s := s₁, i := i₁ } { s := s₂, i := i₂ }) (eq : (s₁ s₂ : String) → (i₁ i₂ : String.Pos) → String.Iterator.hasNext { s := s₂, i := i₂ } = trueString.Iterator.hasNext { s := s₁, i := i₁ } = true¬String.get s₁ i₁ = String.get s₂ i₂motive { s := s₁, i := i₁ } { s := s₂, i := i₂ }) (base₁ : (s₁ s₂ : String) → (i₁ i₂ : String.Pos) → String.Iterator.hasNext { s := s₂, i := i₂ } = true¬String.Iterator.hasNext { s := s₁, i := i₁ } = truemotive { s := s₁, i := i₁ } { s := s₂, i := i₂ }) (base₂ : (s₁ s₂ : String) → (i₁ i₂ : String.Pos) → ¬String.Iterator.hasNext { s := s₂, i := i₂ } = truemotive { s := s₁, i := i₁ } { s := s₂, i := i₂ }) :
    motive it₁ it₂

    Induction on String.ltb.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      theorem String.ltb_cons_addChar (c : Char) (cs₁ : List Char) (cs₂ : List Char) (i₁ : String.Pos) (i₂ : String.Pos) :
      String.ltb { s := { data := c :: cs₁ }, i := i₁ + c } { s := { data := c :: cs₂ }, i := i₂ + c } = String.ltb { s := { data := cs₁ }, i := i₁ } { s := { data := cs₂ }, i := i₂ }
      @[simp]
      theorem String.lt_iff_toList_lt {s₁ : String} {s₂ : String} :
      s₁ < s₂ String.toList s₁ < String.toList s₂
      instance String.LE :
      Equations
      instance String.decidableLE :
      DecidableRel fun (x x_1 : String) => x x_1
      Equations
      @[simp]
      theorem String.le_iff_toList_le {s₁ : String} {s₂ : String} :
      s₁ s₂ String.toList s₁ String.toList s₂
      theorem String.toList_inj {s₁ : String} {s₂ : String} :
      String.toList s₁ = String.toList s₂ s₁ = s₂
      @[simp]
      theorem String.head_empty :
      List.head! "".data = default
      @[simp]