File: Mathlib/Data/String/Basic.lean

full_name: String.ltb
code: /-- `<` on string iterators. This coincides with `<` on strings as lists. -/
def ltb (s₁ s₂ : Iterator) : Bool 
goal: Bool

full_name: String.LT'
code: instance LT' : LT String 
goal: LT String

full_name: String.decidableLT
code: instance decidableLT : @DecidableRel String (· < ·) 
goal: DecidableRel fun x x_1 => x < x_1

full_name: String.ltb.inductionOn
code: /-- Induction on `String.ltb`. -/
def ltb.inductionOn.{u} {motive : Iterator → Iterator → Sort u} (it₁ it₂ : Iterator)
    (ind : ∀ s₁ s₂ i₁ i₂, Iterator.hasNext ⟨s₂, i₂⟩ → Iterator.hasNext ⟨s₁, i₁⟩ →
      get s₁ i₁ = get s₂ i₂ → motive (Iterator.next ⟨s₁, i₁⟩) (Iterator.next ⟨s₂, i₂⟩) →
      motive ⟨s₁, i₁⟩ ⟨s₂, i₂⟩)
    (eq : ∀ s₁ s₂ i₁ i₂, Iterator.hasNext ⟨s₂, i₂⟩ → Iterator.hasNext ⟨s₁, i₁⟩ →
      ¬ get s₁ i₁ = get s₂ i₂ → motive ⟨s₁, i₁⟩ ⟨s₂, i₂⟩)
    (base₁ : ∀ s₁ s₂ i₁ i₂, Iterator.hasNext ⟨s₂, i₂⟩ → ¬ Iterator.hasNext ⟨s₁, i₁⟩ →
      motive ⟨s₁, i₁⟩ ⟨s₂, i₂⟩)
    (base₂ : ∀ s₁ s₂ i₁ i₂, ¬ Iterator.hasNext ⟨s₂, i₂⟩ → motive ⟨s₁, i₁⟩ ⟨s₂, i₂⟩) :
    motive it₁ it₂ 
goal: motive it₁ it₂

full_name: String.ltb_cons_addChar
code: theorem ltb_cons_addChar (c : Char) (cs₁ cs₂ : List Char) (i₁ i₂ : Pos) :
    ltb ⟨⟨c :: cs₁⟩, i₁ + c⟩ ⟨⟨c :: cs₂⟩, i₂ + c⟩ = ltb ⟨⟨cs₁⟩, i₁⟩ ⟨⟨cs₂⟩, i₂⟩ 
goal: 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₂ }

full_name: String.lt_iff_toList_lt
code: @[simp]
theorem lt_iff_toList_lt : ∀ {s₁ s₂ : String}, s₁ < s₂ ↔ s₁.toList < s₂.toList
  
goal: s₁ < s₂ ↔ s₁.toList < s₂.toList

full_name: String.LE
code: instance LE : LE String 
goal: LE String

full_name: String.decidableLE
code: instance decidableLE : @DecidableRel String (· ≤ ·) 
goal: DecidableRel fun x x_1 => x ≤ x_1

full_name: String.le_iff_toList_le
code: @[simp]
theorem le_iff_toList_le {s₁ s₂ : String} : s₁ ≤ s₂ ↔ s₁.toList ≤ s₂.toList 
goal: s₁ ≤ s₂ ↔ s₁.toList ≤ s₂.toList

full_name: String.toList_inj
code: theorem toList_inj {s₁ s₂ : String} : s₁.toList = s₂.toList ↔ s₁ = s₂ 
goal: s₁.toList = s₂.toList ↔ s₁ = s₂

full_name: String.asString_nil
code: theorem asString_nil : [].asString = "" 
goal: [].asString = ""

full_name: String.toList_empty
code: @[simp]
theorem toList_empty : "".toList = [] 
goal: "".toList = []

full_name: String.asString_toList
code: theorem asString_toList (s : String) : s.toList.asString = s 
goal: s.toList.asString = s

full_name: String.toList_nonempty
code: theorem toList_nonempty : ∀ {s : String}, s ≠ "" → s.toList = s.head :: (s.drop 1).toList
  
goal: s ≠ "" → s.toList = s.head :: (s.drop 1).toList

full_name: String.head_empty
code: @[simp]
theorem head_empty : "".data.head! = default 
goal: "".data.head! = default

full_name: String.instLinearOrder
code: instance : LinearOrder String 
goal: LinearOrder String

full_name: List.toList_asString
code: theorem toList_asString (l : List Char) : l.asString.toList = l 
goal: l.asString.toList = l

full_name: List.length_asString
code: @[simp]
theorem length_asString (l : List Char) : l.asString.length = l.length 
goal: l.asString.length = l.length

full_name: List.asString_inj
code: @[simp]
theorem asString_inj {l l' : List Char} : l.asString = l'.asString ↔ l = l' 
goal: l.asString = l'.asString ↔ l = l'

full_name: List.asString_eq
code: theorem asString_eq {l : List Char} {s : String} : l.asString = s ↔ l = s.toList 
goal: l.asString = s ↔ l = s.toList

full_name: String.length_data
code: @[simp]
theorem String.length_data (s : String) : s.data.length = s.length 
goal: s.data.length = s.length