ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- String.utf8GetAux?_of_valid
theorem utf8GetAux?_of_valid (cs cs' : List Char) {i p : Nat} (hp : i + utf8Len cs = p) :
    utf8GetAux? (cs ++ cs') ⟨i⟩ ⟨p⟩ = cs'.head? 
Arguments: (cs cs' : List Char) {i p : Nat} (hp : i + String.utf8Len cs = p)
Goal: String.utf8GetAux? (cs ++ cs') { byteIdx := i } { byteIdx := p } = cs'.head?
-- String.get?_of_valid
theorem get?_of_valid (cs cs' : List Char) : get? ⟨cs ++ cs'⟩ ⟨utf8Len cs⟩ = cs'.head? 
Arguments: (cs cs' : List Char)
Goal: { data := cs ++ cs' }.get? { byteIdx := String.utf8Len cs } = cs'.head?
-- String.utf8SetAux_of_valid
theorem utf8SetAux_of_valid (c' : Char) (cs cs' : List Char) {i p : Nat} (hp : i + utf8Len cs = p) :
    utf8SetAux c' (cs ++ cs') ⟨i⟩ ⟨p⟩ = cs ++ cs'.modifyHead fun _ => c' 
Arguments: (c' : Char) (cs cs' : List Char) {i p : Nat} (hp : i + String.utf8Len cs = p)
Goal: String.utf8SetAux c' (cs ++ cs') { byteIdx := i } { byteIdx := p } = cs ++ List.modifyHead (fun x => c') cs'
-- String.set_of_valid
theorem set_of_valid (cs cs' : List Char) (c' : Char) :
    set ⟨cs ++ cs'⟩ ⟨utf8Len cs⟩ c' = ⟨cs ++ cs'.modifyHead fun _ => c'⟩ 
Arguments: (cs cs' : List Char) (c' : Char)
Goal: { data := cs ++ cs' }.set { byteIdx := String.utf8Len cs } c' = { data := cs ++ List.modifyHead (fun x => c') cs' }
-- String.modify_of_valid
theorem modify_of_valid (cs cs' : List Char) :
    modify ⟨cs ++ cs'⟩ ⟨utf8Len cs⟩ f = ⟨cs ++ cs'.modifyHead f⟩ 
Arguments: {f : Char → Char} (cs cs' : List Char)
Goal: { data := cs ++ cs' }.modify { byteIdx := String.utf8Len cs } f = { data := cs ++ List.modifyHead f cs' }
-- String.next_of_valid'
theorem next_of_valid' (cs cs' : List Char) :
    next ⟨cs ++ cs'⟩ ⟨utf8Len cs⟩ = ⟨utf8Len cs + (cs'.headD default).utf8Size⟩ 
Arguments: (cs cs' : List Char)
Goal: { data := cs ++ cs' }.next { byteIdx := String.utf8Len cs } =
  { byteIdx := String.utf8Len cs + (cs'.headD default).utf8Size }
-- String.next_of_valid
theorem next_of_valid (cs : List Char) (c : Char) (cs' : List Char) :
    next ⟨cs ++ c :: cs'⟩ ⟨utf8Len cs⟩ = ⟨utf8Len cs + c.utf8Size⟩ 
Arguments: (cs : List Char) (c : Char) (cs' : List Char)
Goal: { data := cs ++ c :: cs' }.next { byteIdx := String.utf8Len cs } = { byteIdx := String.utf8Len cs + c.utf8Size }
-- String.atEnd_iff
@[simp] theorem atEnd_iff (s : String) (p : Pos) : atEnd s p ↔ s.endPos ≤ p 
Arguments: (s : String) (p : String.Pos)
Goal: s.atEnd p = true ↔ s.endPos ≤ p
-- String.valid_next
theorem valid_next {p : Pos} (h : p.Valid s) (h₂ : p < s.endPos) : (next s p).Valid s 
Arguments: {s : String} {p : String.Pos} (h : String.Pos.Valid s p) (h₂ : p < s.endPos)
Goal: String.Pos.Valid s (s.next p)
-- String.utf8PrevAux_of_valid
theorem utf8PrevAux_of_valid {cs cs' : List Char} {c : Char} {i p : Nat}
    (hp : i + (utf8Len cs + c.utf8Size) = p) :
    utf8PrevAux (cs ++ c :: cs') ⟨i⟩ ⟨p⟩ = ⟨i + utf8Len cs⟩ 
Arguments: {cs cs' : List Char} {c : Char} {i p : Nat} (hp : i + (String.utf8Len cs + c.utf8Size) = p)
Goal: String.utf8PrevAux (cs ++ c :: cs') { byteIdx := i } { byteIdx := p } = { byteIdx := i + String.utf8Len cs }
-- String.prev_of_valid
theorem prev_of_valid (cs : List Char) (c : Char) (cs' : List Char) :
    prev ⟨cs ++ c :: cs'⟩ ⟨utf8Len cs + c.utf8Size⟩ = ⟨utf8Len cs⟩ 
Arguments: (cs : List Char) (c : Char) (cs' : List Char)
Goal: { data := cs ++ c :: cs' }.prev { byteIdx := String.utf8Len cs + c.utf8Size } = { byteIdx := String.utf8Len cs }
-- String.prev_of_valid'
theorem prev_of_valid' (cs cs' : List Char) :
    prev ⟨cs ++ cs'⟩ ⟨utf8Len cs⟩ = ⟨utf8Len cs.dropLast⟩ 
Arguments: (cs cs' : List Char)
Goal: { data := cs ++ cs' }.prev { byteIdx := String.utf8Len cs } = { byteIdx := String.utf8Len cs.dropLast }
-- String.front_eq
theorem front_eq (s : String) : front s = s.1.headD default 
Arguments: (s : String)
Goal: s.front = s.data.headD default
-- String.back_eq
theorem back_eq (s : String) : back s = s.1.getLastD default 
Arguments: (s : String)
Goal: s.back = s.data.getLastD default
-- String.atEnd_of_valid
theorem atEnd_of_valid (cs : List Char) (cs' : List Char) :
    atEnd ⟨cs ++ cs'⟩ ⟨utf8Len cs⟩ ↔ cs' = [] 
Arguments: (cs cs' : List Char)
Goal: { data := cs ++ cs' }.atEnd { byteIdx := String.utf8Len cs } = true ↔ cs' = []
-- String.posOfAux_eq
theorem posOfAux_eq (s c) : posOfAux s c = findAux s (· == c) 
Arguments: (s : String) (c : Char)
Goal: s.posOfAux c = s.findAux fun x => x == c
-- String.posOf_eq
theorem posOf_eq (s c) : posOf s c = find s (· == c) 
Arguments: (s : String) (c : Char)
Goal: s.posOf c = s.find fun x => x == c
-- String.revPosOfAux_eq
theorem revPosOfAux_eq (s c) : revPosOfAux s c = revFindAux s (· == c) 
Arguments: (s : String) (c : Char)
Goal: s.revPosOfAux c = s.revFindAux fun x => x == c
-- String.revPosOf_eq
theorem revPosOf_eq (s c) : revPosOf s c = revFind s (· == c) 
Arguments: (s : String) (c : Char)
Goal: s.revPosOf c = s.revFind fun x => x == c
-- String.findAux_of_valid
@[nolint unusedHavesSuffices] -- false positive from unfolding String.findAux
theorem findAux_of_valid (p) : ∀ l m r,
    findAux ⟨l ++ m ++ r⟩ p ⟨utf8Len l + utf8Len m⟩ ⟨utf8Len l⟩ =
    ⟨utf8Len l + utf8Len (m.takeWhile (!p ·))⟩
  
Arguments: (p : Char → Bool) (l m r : List Char)
Goal: { data := l ++ m ++ r }.findAux p { byteIdx := String.utf8Len l + String.utf8Len m } { byteIdx := String.utf8Len l } =
  { byteIdx := String.utf8Len l + String.utf8Len (List.takeWhile (fun x => !p x) m) }
-- String.find_of_valid
theorem find_of_valid (p s) : find s p = ⟨utf8Len (s.1.takeWhile (!p ·))⟩ 
Arguments: (p : Char → Bool) (s : String)
Goal: s.find p = { byteIdx := String.utf8Len (List.takeWhile (fun x => !p x) s.data) }
-- String.revFindAux_of_valid
@[nolint unusedHavesSuffices] -- false positive from unfolding String.revFindAux
theorem revFindAux_of_valid (p) : ∀ l r,
    revFindAux ⟨l.reverse ++ r⟩ p ⟨utf8Len l⟩ = (l.dropWhile (!p ·)).tail?.map (⟨utf8Len ·⟩)
  
Arguments: (p : Char → Bool) (l r : List Char)
Goal: { data := l.reverse ++ r }.revFindAux p { byteIdx := String.utf8Len l } =
  Option.map (fun x => { byteIdx := String.utf8Len x }) (List.dropWhile (fun x => !p x) l).tail?
-- String.revFind_of_valid
theorem revFind_of_valid (p s) :
    revFind s p = (s.1.reverse.dropWhile (!p ·)).tail?.map (⟨utf8Len ·⟩) 
Arguments: (p : Char → Bool) (s : String)
Goal: s.revFind p =
  Option.map (fun x => { byteIdx := String.utf8Len x }) (List.dropWhile (fun x => !p x) s.data.reverse).tail?
-- String.firstDiffPos_loop_eq
theorem firstDiffPos_loop_eq (l₁ l₂ r₁ r₂ stop p)
    (hl₁ : p = utf8Len l₁) (hl₂ : p = utf8Len l₂)
    (hstop : stop = min (utf8Len l₁ + utf8Len r₁) (utf8Len l₂ + utf8Len r₂)) :
    firstDiffPos.loop ⟨l₁ ++ r₁⟩ ⟨l₂ ++ r₂⟩ ⟨stop⟩ ⟨p⟩ =
      ⟨p + utf8Len (List.takeWhile₂ (· = ·) r₁ r₂).1⟩ 
Arguments: (l₁ l₂ r₁ r₂ : List Char) (stop p : Nat) (hl₁ : p = String.utf8Len l₁) (hl₂ : p = String.utf8Len l₂) (hstop : stop = min (String.utf8Len l₁ + String.utf8Len r₁) (String.utf8Len l₂ + String.utf8Len r₂))
Goal: String.firstDiffPos.loop { data := l₁ ++ r₁ } { data := l₂ ++ r₂ } { byteIdx := stop } { byteIdx := p } =
  { byteIdx := p + String.utf8Len (List.takeWhile₂ (fun x x_1 => decide (x = x_1)) r₁ r₂).fst }
-- String.firstDiffPos_eq
theorem firstDiffPos_eq (a b : String) :
    firstDiffPos a b = ⟨utf8Len (List.takeWhile₂ (· = ·) a.1 b.1).1⟩ 
Arguments: (a b : String)
Goal: a.firstDiffPos b = { byteIdx := String.utf8Len (List.takeWhile₂ (fun x x_1 => decide (x = x_1)) a.data b.data).fst }
-- String.extract.go₂_add_right_cancel
theorem extract.go₂_add_right_cancel (s : List Char) (i e n : Nat) :
    go₂ s ⟨i + n⟩ ⟨e + n⟩ = go₂ s ⟨i⟩ ⟨e⟩ 
Arguments: (s : List Char) (i e n : Nat)
Goal: String.extract.go₂ s { byteIdx := i + n } { byteIdx := e + n } = String.extract.go₂ s { byteIdx := i } { byteIdx := e }
-- String.extract.go₂_append_left
theorem extract.go₂_append_left : ∀ (s t : List Char) (i e : Nat),
    e = utf8Len s + i → go₂ (s ++ t) ⟨i⟩ ⟨e⟩ = s

Arguments: (s t : List Char) (i e : Nat)
Goal: e = String.utf8Len s + i → String.extract.go₂ (s ++ t) { byteIdx := i } { byteIdx := e } = s
-- String.extract.go₁_add_right_cancel
theorem extract.go₁_add_right_cancel (s : List Char) (i b e n : Nat) :
    go₁ s ⟨i + n⟩ ⟨b + n⟩ ⟨e + n⟩ = go₁ s ⟨i⟩ ⟨b⟩ ⟨e⟩ 
Arguments: (s : List Char) (i b e n : Nat)
Goal: String.extract.go₁ s { byteIdx := i + n } { byteIdx := b + n } { byteIdx := e + n } =
  String.extract.go₁ s { byteIdx := i } { byteIdx := b } { byteIdx := e }
-- String.extract.go₁_cons_addChar
theorem extract.go₁_cons_addChar (c : Char) (cs : List Char) (b e : Pos) :
    go₁ (c :: cs) 0 (b + c) (e + c) = go₁ cs 0 b e 
Arguments: (c : Char) (cs : List Char) (b e : String.Pos)
Goal: String.extract.go₁ (c :: cs) 0 (b + c) (e + c) = String.extract.go₁ cs 0 b e
-- String.extract.go₁_append_right
theorem extract.go₁_append_right : ∀ (s t : List Char) (i b : Nat) (e : Pos),
    b = utf8Len s + i → go₁ (s ++ t) ⟨i⟩ ⟨b⟩ e = go₂ t ⟨b⟩ e

Arguments: (s t : List Char) (i b : Nat) (e : String.Pos)
Goal: b = String.utf8Len s + i →
  String.extract.go₁ (s ++ t) { byteIdx := i } { byteIdx := b } e = String.extract.go₂ t { byteIdx := b } e
-- String.extract.go₁_zero_utf8Len
theorem extract.go₁_zero_utf8Len (s : List Char) : go₁ s 0 0 ⟨utf8Len s⟩ = s 
Arguments: (s : List Char)
Goal: String.extract.go₁ s 0 0 { byteIdx := String.utf8Len s } = s
-- String.extract_cons_addChar
theorem extract_cons_addChar (c : Char) (cs : List Char) (b e : Pos) :
    extract ⟨c :: cs⟩ (b + c) (e + c) = extract ⟨cs⟩ b e 
Arguments: (c : Char) (cs : List Char) (b e : String.Pos)
Goal: { data := c :: cs }.extract (b + c) (e + c) = { data := cs }.extract b e
-- String.extract_zero_endPos
theorem extract_zero_endPos : ∀ (s : String), s.extract 0 (endPos s) = s
  
Arguments: (s : String)
Goal: s.extract 0 s.endPos = s
-- String.extract_of_valid
theorem extract_of_valid (l m r : List Char) :
    extract ⟨l ++ m ++ r⟩ ⟨utf8Len l⟩ ⟨utf8Len l + utf8Len m⟩ = ⟨m⟩ 
Arguments: (l m r : List Char)
Goal: { data := l ++ m ++ r }.extract { byteIdx := String.utf8Len l } { byteIdx := String.utf8Len l + String.utf8Len m } =
  { data := m }
-- String.splitAux_of_valid
theorem splitAux_of_valid (p l m r acc) :
    splitAux ⟨l ++ m ++ r⟩ p ⟨utf8Len l⟩ ⟨utf8Len l + utf8Len m⟩ acc =
      acc.reverse ++ (List.splitOnP.go p r m.reverse).map mk 
Arguments: (p : Char → Bool) (l m r : List Char) (acc : List String)
Goal: { data := l ++ m ++ r }.splitAux p { byteIdx := String.utf8Len l } { byteIdx := String.utf8Len l + String.utf8Len m }
    acc =
  acc.reverse ++ List.map String.mk (List.splitOnP.go p r m.reverse)
-- String.split_of_valid
theorem split_of_valid (s p) : split s p = (List.splitOnP p s.1).map mk 
Arguments: (s : String) (p : Char → Bool)
Goal: s.split p = List.map String.mk (List.splitOnP p s.data)
-- String.toString_toSubstring
@[simp] theorem toString_toSubstring (s : String) : s.toSubstring.toString = s 
Arguments: (s : String)
Goal: s.toSubstring.toString = s
-- String.join_eq.go
theorem join_eq (ss : List String) : join ss = ⟨(ss.map data).join⟩ 
Arguments: (ss : List String) (cs : List Char)
Goal: List.foldl (fun x x_1 => x ++ x_1) { data := cs } ss = { data := cs ++ (List.map String.data ss).join }
-- String.join_eq
theorem join_eq (ss : List String) : join ss = ⟨(ss.map data).join⟩ 
Arguments: (ss : List String)
Goal: String.join ss = { data := (List.map String.data ss).join }
-- String.data_join
@[simp] theorem data_join (ss : List String) : (join ss).data = (ss.map data).join 
Arguments: (ss : List String)
Goal: (String.join ss).data = (List.map String.data ss).join
-- String.Iterator.forward_eq_nextn
@[simp] theorem forward_eq_nextn : forward = nextn 
Goal: String.Iterator.forward = String.Iterator.nextn
-- String.Iterator.hasNext_cons_addChar
theorem hasNext_cons_addChar (c : Char) (cs : List Char) (i : Pos) :
    hasNext ⟨⟨c :: cs⟩, i + c⟩ = hasNext ⟨⟨cs⟩, i⟩ 
Arguments: (c : Char) (cs : List Char) (i : String.Pos)
Goal: { s := { data := c :: cs }, i := i + c }.hasNext = { s := { data := cs }, i := i }.hasNext
-- String.Iterator.ValidFor.valid
theorem valid : ∀ {it}, ValidFor l r it → Valid it
  
Arguments: {l r : List Char} {it : String.Iterator}
Goal: String.Iterator.ValidFor l r it → it.Valid
-- String.Iterator.ValidFor.out
theorem out : ∀ {it}, ValidFor l r it → it = ⟨⟨l.reverseAux r⟩, ⟨utf8Len l⟩⟩
  
Arguments: {l r : List Char} {it : String.Iterator}
Goal: String.Iterator.ValidFor l r it → it = { s := { data := l.reverseAux r }, i := { byteIdx := String.utf8Len l } }
-- String.Iterator.ValidFor.out'
theorem out' : ∀ {it}, ValidFor l r it → it = ⟨⟨l.reverse ++ r⟩, ⟨utf8Len l.reverse⟩⟩
  
Arguments: {l r : List Char} {it : String.Iterator}
Goal: String.Iterator.ValidFor l r it → it = { s := { data := l.reverse ++ r }, i := { byteIdx := String.utf8Len l.reverse } }
-- String.Iterator.ValidFor.mk'
theorem mk' : ValidFor l r ⟨⟨l.reverse ++ r⟩, ⟨utf8Len l.reverse⟩⟩ 
Arguments: {l r : List Char}
Goal: String.Iterator.ValidFor l r { s := { data := l.reverse ++ r }, i := { byteIdx := String.utf8Len l.reverse } }
-- String.Iterator.ValidFor.of_eq
theorem of_eq : ∀ it, it.1.1 = l.reverseAux r → it.2.1 = utf8Len l → ValidFor l r it
  
Arguments: {l r : List Char} (it : String.Iterator)
Goal: it.s.data = l.reverseAux r → it.i.byteIdx = String.utf8Len l → String.Iterator.ValidFor l r it
-- String.validFor_mkIterator
theorem _root_.String.validFor_mkIterator (s) : (mkIterator s).ValidFor [] s.1 
Arguments: (s : String)
Goal: String.Iterator.ValidFor [] s.data s.mkIterator
-- String.Iterator.ValidFor.remainingBytes
theorem remainingBytes : ∀ {it}, ValidFor l r it → it.remainingBytes = utf8Len r
  
Arguments: {l r : List Char} {it : String.Iterator}
Goal: String.Iterator.ValidFor l r it → it.remainingBytes = String.utf8Len r
-- String.Iterator.ValidFor.toString
theorem toString : ∀ {it}, ValidFor l r it → it.1 = ⟨l.reverseAux r⟩
  
Arguments: {l r : List Char} {it : String.Iterator}
Goal: String.Iterator.ValidFor l r it → it.s = { data := l.reverseAux r }
-- String.Iterator.ValidFor.pos
theorem pos : ∀ {it}, ValidFor l r it → it.2 = ⟨utf8Len l⟩
  
Arguments: {l r : List Char} {it : String.Iterator}
Goal: String.Iterator.ValidFor l r it → it.i = { byteIdx := String.utf8Len l }
-- String.Iterator.ValidFor.pos_eq_zero
theorem pos_eq_zero {l r it} (h : ValidFor l r it) : it.2 = 0 ↔ l = [] 
Arguments: {l r : List Char} {it : String.Iterator} (h : String.Iterator.ValidFor l r it)
Goal: it.i = 0 ↔ l = []
-- String.Iterator.ValidFor.pos_eq_endPos
theorem pos_eq_endPos {l r it} (h : ValidFor l r it) : it.2 = it.1.endPos ↔ r = [] 
Arguments: {l r : List Char} {it : String.Iterator} (h : String.Iterator.ValidFor l r it)
Goal: it.i = it.s.endPos ↔ r = []
-- String.Iterator.ValidFor.curr
theorem curr : ∀ {it}, ValidFor l r it → it.curr = r.headD default
  
Arguments: {l r : List Char} {it : String.Iterator}
Goal: String.Iterator.ValidFor l r it → it.curr = r.headD default
-- String.Iterator.ValidFor.next
theorem next : ∀ {it}, ValidFor l (c :: r) it → ValidFor (c :: l) r it.next
  
Arguments: {l : List Char} {c : Char} {r : List Char} {it : String.Iterator}
Goal: String.Iterator.ValidFor l (c :: r) it → String.Iterator.ValidFor (c :: l) r it.next
-- String.Iterator.ValidFor.prev
theorem prev : ∀ {it}, ValidFor (c :: l) r it → ValidFor l (c :: r) it.prev
  
Arguments: {c : Char} {l r : List Char} {it : String.Iterator}
Goal: String.Iterator.ValidFor (c :: l) r it → String.Iterator.ValidFor l (c :: r) it.prev
-- String.Iterator.ValidFor.prev_nil
theorem prev_nil : ∀ {it}, ValidFor [] r it → ValidFor [] r it.prev
  
Arguments: {r : List Char} {it : String.Iterator}
Goal: String.Iterator.ValidFor [] r it → String.Iterator.ValidFor [] r it.prev
-- String.Iterator.ValidFor.atEnd
theorem atEnd : ∀ {it}, ValidFor l r it → (it.atEnd ↔ r = [])
  
Arguments: {l r : List Char} {it : String.Iterator}
Goal: String.Iterator.ValidFor l r it → (it.atEnd = true ↔ r = [])
-- String.Iterator.ValidFor.hasNext
theorem hasNext : ∀ {it}, ValidFor l r it → (it.hasNext ↔ r ≠ [])
  
Arguments: {l r : List Char} {it : String.Iterator}
Goal: String.Iterator.ValidFor l r it → (it.hasNext = true ↔ r ≠ [])
-- String.Iterator.ValidFor.hasPrev
theorem hasPrev : ∀ {it}, ValidFor l r it → (it.hasPrev ↔ l ≠ [])
  
Arguments: {l r : List Char} {it : String.Iterator}
Goal: String.Iterator.ValidFor l r it → (it.hasPrev = true ↔ l ≠ [])
-- String.Iterator.ValidFor.setCurr'
theorem setCurr' : ∀ {it}, ValidFor l r it →
    ValidFor l (r.modifyHead fun _ => c) (it.setCurr c)
  
Arguments: {l r : List Char} {c : Char} {it : String.Iterator}
Goal: String.Iterator.ValidFor l r it → String.Iterator.ValidFor l (List.modifyHead (fun x => c) r) (it.setCurr c)
-- String.Iterator.ValidFor.setCurr
theorem setCurr (h : ValidFor l (c :: r) it) :
    ValidFor l (c :: r) (it.setCurr c) 
Arguments: {l : List Char} {c : Char} {r : List Char} {it : String.Iterator} (h : String.Iterator.ValidFor l (c :: r) it)
Goal: String.Iterator.ValidFor l (c :: r) (it.setCurr c)
-- String.Iterator.ValidFor.toEnd
theorem toEnd (h : ValidFor l r it) : ValidFor (r.reverse ++ l) [] it.toEnd 
Arguments: {l r : List Char} {it : String.Iterator} (h : String.Iterator.ValidFor l r it)
Goal: String.Iterator.ValidFor (r.reverse ++ l) [] it.toEnd
-- String.Iterator.ValidFor.toEnd'
theorem toEnd' (it : Iterator) : ValidFor it.s.1.reverse [] it.toEnd 
Arguments: (it : String.Iterator)
Goal: String.Iterator.ValidFor it.s.data.reverse [] it.toEnd
-- String.Iterator.ValidFor.extract
theorem extract (h₁ : ValidFor l (m ++ r) it₁) (h₂ : ValidFor (m.reverse ++ l) r it₂) :
    it₁.extract it₂ = ⟨m⟩ 
Arguments: {l m r : List Char} {it₁ it₂ : String.Iterator} (h₁ : String.Iterator.ValidFor l (m ++ r) it₁) (h₂ : String.Iterator.ValidFor (m.reverse ++ l) r it₂)
Goal: it₁.extract it₂ = { data := m }
-- String.Iterator.ValidFor.remainingToString
theorem remainingToString {it} (h : ValidFor l r it) : it.remainingToString = ⟨r⟩ 
Arguments: {l r : List Char} {it : String.Iterator} (h : String.Iterator.ValidFor l r it)
Goal: it.remainingToString = { data := r }
-- String.Iterator.ValidFor.nextn
theorem nextn : ∀ {it}, ValidFor l r it →
      ∀ n, n ≤ r.length → ValidFor ((r.take n).reverse ++ l) (r.drop n) (it.nextn n)
  
Arguments: {l r : List Char} {it : String.Iterator}
Goal: String.Iterator.ValidFor l r it →
  ∀ (n : Nat), n ≤ r.length → String.Iterator.ValidFor ((List.take n r).reverse ++ l) (List.drop n r) (it.nextn n)
-- String.Iterator.ValidFor.prevn
theorem prevn : ∀ {it}, ValidFor l r it →
      ∀ n, n ≤ l.length → ValidFor (l.drop n) ((l.take n).reverse ++ r) (it.prevn n)
  
Arguments: {l r : List Char} {it : String.Iterator}
Goal: String.Iterator.ValidFor l r it →
  ∀ (n : Nat), n ≤ l.length → String.Iterator.ValidFor (List.drop n l) ((List.take n l).reverse ++ r) (it.prevn n)
-- String.Iterator.Valid.validFor
theorem validFor : ∀ {it}, Valid it → ∃ l r, ValidFor l r it
  
Arguments: {it : String.Iterator}
Goal: it.Valid → ∃ l r, String.Iterator.ValidFor l r it
-- String.valid_mkIterator
theorem _root_.String.valid_mkIterator (s) : (mkIterator s).Valid 
Arguments: (s : String)
Goal: s.mkIterator.Valid
-- String.Iterator.Valid.remainingBytes_le
theorem remainingBytes_le : ∀ {it}, Valid it → it.remainingBytes ≤ utf8ByteSize it.s
  
Arguments: {it : String.Iterator}
Goal: it.Valid → it.remainingBytes ≤ it.s.utf8ByteSize
-- String.Iterator.Valid.next
theorem next : ∀ {it}, Valid it → it.hasNext → Valid it.next
  
Arguments: {it : String.Iterator}
Goal: it.Valid → it.hasNext = true → it.next.Valid
-- String.Iterator.Valid.prev
theorem prev : ∀ {it}, Valid it → Valid it.prev
  
Arguments: {it : String.Iterator}
Goal: it.Valid → it.prev.Valid
-- String.Iterator.Valid.setCurr
theorem setCurr : ∀ {it}, Valid it → Valid (it.setCurr c)
  
Arguments: {c : Char} {it : String.Iterator}
Goal: it.Valid → (it.setCurr c).Valid
-- String.Iterator.Valid.toEnd
theorem toEnd (it : String.Iterator) : Valid it.toEnd 
Arguments: (it : String.Iterator)
Goal: it.toEnd.Valid
-- String.Iterator.Valid.remainingToString
theorem remainingToString {it} (h : ValidFor l r it) : it.remainingToString = ⟨r⟩ 
Arguments: {l r : List Char} {it : String.Iterator} (h : String.Iterator.ValidFor l r it)
Goal: it.remainingToString = { data := r }
-- String.Iterator.Valid.prevn
theorem prevn (h : Valid it) : ∀ n, Valid (it.prevn n)
  
Arguments: {it : String.Iterator} (h : it.Valid) (n : Nat)
Goal: (it.prevn n).Valid
-- String.offsetOfPosAux_of_valid
@[nolint unusedHavesSuffices] -- false positive from unfolding String.offsetOfPosAux
theorem offsetOfPosAux_of_valid : ∀ l m r n,
    offsetOfPosAux ⟨l ++ m ++ r⟩ ⟨utf8Len l + utf8Len m⟩ ⟨utf8Len l⟩ n = n + m.length
  
Arguments: (l m r : List Char) (n : Nat)
Goal: { data := l ++ m ++ r }.offsetOfPosAux { byteIdx := String.utf8Len l + String.utf8Len m }
    { byteIdx := String.utf8Len l } n =
  n + m.length
-- String.offsetOfPos_of_valid
theorem offsetOfPos_of_valid (l r) : offsetOfPos ⟨l ++ r⟩ ⟨utf8Len l⟩ = l.length 
Arguments: (l r : List Char)
Goal: { data := l ++ r }.offsetOfPos { byteIdx := String.utf8Len l } = l.length
-- String.foldlAux_of_valid
@[nolint unusedHavesSuffices] -- false positive from unfolding String.foldlAux
theorem foldlAux_of_valid (f : α → Char → α) : ∀ l m r a,
    foldlAux f ⟨l ++ m ++ r⟩ ⟨utf8Len l + utf8Len m⟩ ⟨utf8Len l⟩ a = m.foldl f a
  
Arguments: {α : Type u_1} (f : α → Char → α) (l m r : List Char) (a : α)
Goal: String.foldlAux f { data := l ++ m ++ r } { byteIdx := String.utf8Len l + String.utf8Len m }
    { byteIdx := String.utf8Len l } a =
  List.foldl f a m
-- String.foldl_eq
theorem foldl_eq (f : α → Char → α) (s a) : foldl f a s = s.1.foldl f a 
Arguments: {α : Type u_1} (f : α → Char → α) (s : String) (a : α)
Goal: String.foldl f a s = List.foldl f a s.data
-- String.foldrAux_of_valid
@[nolint unusedHavesSuffices] -- false positive from unfolding String.foldrAux
theorem foldrAux_of_valid (f : Char → α → α) (l m r a) :
    foldrAux f a ⟨l ++ m ++ r⟩ ⟨utf8Len l + utf8Len m⟩ ⟨utf8Len l⟩ = m.foldr f a 
Arguments: {α : Type u_1} (f : Char → α → α) (l m r : List Char) (a : α)
Goal: String.foldrAux f a { data := l ++ m ++ r } { byteIdx := String.utf8Len l + String.utf8Len m }
    { byteIdx := String.utf8Len l } =
  List.foldr f a m
-- String.foldr_eq
theorem foldr_eq (f : Char → α → α) (s a) : foldr f a s = s.1.foldr f a 
Arguments: {α : Type u_1} (f : Char → α → α) (s : String) (a : α)
Goal: String.foldr f a s = List.foldr f a s.data
-- String.anyAux_of_valid
@[nolint unusedHavesSuffices] -- false positive from unfolding String.anyAux
theorem anyAux_of_valid (p : Char → Bool) : ∀ l m r,
    anyAux ⟨l ++ m ++ r⟩ ⟨utf8Len l + utf8Len m⟩ p ⟨utf8Len l⟩ = m.any p
  
Arguments: (p : Char → Bool) (l m r : List Char)
Goal: { data := l ++ m ++ r }.anyAux { byteIdx := String.utf8Len l + String.utf8Len m } p { byteIdx := String.utf8Len l } =
  m.any p
-- String.any_eq
theorem any_eq (s : String) (p : Char → Bool) : any s p = s.1.any p 
Arguments: (s : String) (p : Char → Bool)
Goal: s.any p = s.data.any p
-- String.any_iff
theorem any_iff (s : String) (p : Char → Bool) : any s p ↔ ∃ c ∈ s.1, p c 
Arguments: (s : String) (p : Char → Bool)
Goal: s.any p = true ↔ ∃ c, c ∈ s.data ∧ p c = true
-- String.all_eq
theorem all_eq (s : String) (p : Char → Bool) : all s p = s.1.all p 
Arguments: (s : String) (p : Char → Bool)
Goal: s.all p = s.data.all p
-- String.all_iff
theorem all_iff (s : String) (p : Char → Bool) : all s p ↔ ∀ c ∈ s.1, p c 
Arguments: (s : String) (p : Char → Bool)
Goal: s.all p = true ↔ ∀ (c : Char), c ∈ s.data → p c = true
-- String.contains_iff
theorem contains_iff (s : String) (c : Char) : contains s c ↔ c ∈ s.1 
Arguments: (s : String) (c : Char)
Goal: s.contains c = true ↔ c ∈ s.data
-- String.mapAux_of_valid
@[nolint unusedHavesSuffices] -- false positive from unfolding String.mapAux
theorem mapAux_of_valid (f : Char → Char) : ∀ l r, mapAux f ⟨utf8Len l⟩ ⟨l ++ r⟩ = ⟨l ++ r.map f⟩
  
Arguments: (f : Char → Char) (l r : List Char)
Goal: String.mapAux f { byteIdx := String.utf8Len l } { data := l ++ r } = { data := l ++ List.map f r }
-- String.map_eq
theorem map_eq (f : Char → Char) (s) : map f s = ⟨s.1.map f⟩ 
Arguments: (f : Char → Char) (s : String)
Goal: String.map f s = { data := List.map f s.data }