Helpers for termination arguments about functions operating on strings #
The number of bytes between p and the end position. This number decreases as p advances.
Equations
Instances For
Type alias for String.Slice.Pos representing that the given position is expected to decrease
in recursive calls.
- inner : s.Pos
Instances For
Equations
- String.Slice.Pos.instWellFoundedRelationDown = { rel := fun (p q : String.Slice.Pos.Down s) => p.inner < q.inner, wf := ⋯ }
The number of bytes between p and the end position. This number decreases as p advances.
Equations
Instances For
@[simp]
Type alias for String.ValidPos representing that the given position is expected to decrease
in recursive calls.
- inner : s.ValidPos
Instances For
Equations
- String.ValidPos.instWellFoundedRelationDown = { rel := fun (p q : String.ValidPos.Down s) => p.inner < q.inner, wf := ⋯ }
@[simp]
theorem
String.ValidPos.lt_next_next
{s : String}
{p : s.ValidPos}
{h : p ≠ s.endValidPos}
{h' : p.next h ≠ s.endValidPos}
:
@[simp]
theorem
String.ValidPos.prev_prev_lt
{s : String}
{p : s.ValidPos}
{h : p ≠ s.startValidPos}
{h' : p.prev h ≠ s.startValidPos}
:
theorem
String.ValidPos.Splits.remainingBytes_eq
{s : String}
{p : s.ValidPos}
{t₁ t₂ : String}
(h : p.Splits t₁ t₂)
:
@[simp]
theorem
String.Slice.Pos.Splits.remainingBytes_eq
{s : Slice}
{p : s.Pos}
{t₁ t₂ : String}
(h : p.Splits t₁ t₂)
: