Equations
- ch.isWordChar = (ch.isAlphanum || decide (ch = '_'))
Instances For
Equations
- p.isCurrWord = if h : p ≠ s.endValidPos then (p.get h).isWordChar else false
Instances For
Equations
- p.isPrevWord = if h : p ≠ s.startValidPos then ((p.prev h).get ⋯).isWordChar else false
Instances For
Equations
- p.isAtWordBoundary = (p.isCurrWord != p.isPrevWord)
Instances For
Equations
- p.isAtNonWordBoundary = (p.isCurrWord == p.isPrevWord)
Instances For
theorem
String.ValidPos.ne_endValidPos_of_lt
{s : String}
{pos pos' : s.ValidPos}
(lt : pos < pos')
:
@[simp]
@[irreducible]
def
String.ValidPos.posRevInduction
{s : String}
{motive : s.ValidPos → Sort u}
(endValidPos : motive s.endValidPos)
(next : (p : s.ValidPos) → (h : p ≠ s.endValidPos) → motive (p.next h) → motive p)
(p : s.ValidPos)
:
motive p
Equations
- String.ValidPos.posRevInduction endValidPos next p = if h : p = s.endValidPos then ⋯ ▸ endValidPos else next p h (String.ValidPos.posRevInduction endValidPos next (p.next h))
Instances For
theorem
String.ValidPos.next_inj
{s : String}
{pos pos' : s.ValidPos}
{h : pos ≠ s.endValidPos}
{h' : pos' ≠ s.endValidPos}
(eq : pos.next h = pos'.next h')
:
theorem
String.ValidPos.le_of_lt_next
{s : String}
{pos pos' : s.ValidPos}
{h' : pos' ≠ s.endValidPos}
(lt : pos < pos'.next h')
:
theorem
String.ValidPos.lt_next_iff
{s : String}
{pos pos' : s.ValidPos}
{h' : pos' ≠ s.endValidPos}
:
theorem
String.ValidPosPlusOne.ext
{s : String}
{x y : s.ValidPosPlusOne}
(offset : x.offset = y.offset)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[match_pattern]
Equations
- String.ValidPosPlusOne.validPos p = { offset := p.offset, isValidOrPlusOne := ⋯ }
Instances For
@[match_pattern]
Equations
Instances For
def
String.ValidPosPlusOne.rec'
{s : String}
{motive : s.ValidPosPlusOne → Sort u}
(validPos : (p : s.ValidPos) → motive (validPos p))
(sentinel : motive (sentinel s))
(p : s.ValidPosPlusOne)
:
motive p
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
def
String.ValidPosPlusOne.asValidPos
{s : String}
(p : s.ValidPosPlusOne)
(h : p.isValid = true)
:
s.ValidPos
Equations
- p.asValidPos h = { offset := p.offset, isValid := ⋯ }
Instances For
Instances For
Equations
Equations
- p₁.instDecidableLt p₂ = decidable_of_iff' (p₁.offset < p₂.offset) ⋯
Equations
- p.next h = if h' : p.asValidPos h ≠ s.endValidPos then String.ValidPosPlusOne.validPos ((p.asValidPos h).next h') else String.ValidPosPlusOne.sentinel s
Instances For
theorem
String.ValidPosPlusOne.lt_sentinel_of_valid
{s : String}
{p : s.ValidPosPlusOne}
(h : p.isValid = true)
:
@[simp]
theorem
String.ValidPosPlusOne.lt_next
{s : String}
(p : s.ValidPosPlusOne)
(h : p.isValid = true)
:
Instances For
theorem
String.ValidPosPlusOne.wellFounded_gt
{s : String}
:
WellFounded fun (p q : s.ValidPosPlusOne) => q < p
Equations
- String.ValidPosPlusOne.instWellFoundedRelation = { rel := fun (p q : s.ValidPosPlusOne) => q < p, wf := ⋯ }
Instances For
Equations
Equations
- p₁.instDecidableLe p₂ = decidable_of_iff' (p₁.offset ≤ p₂.offset) ⋯
Instances For
def
String.ValidPosPlusOne.orElse
{s : String}
(p₁ : s.ValidPosPlusOne)
(p₂ : Unit → s.ValidPosPlusOne)
:
Instances For
Equations
@[simp]
theorem
String.ValidPosPlusOne.orElse_eq_or
{s : String}
{p₁ : s.ValidPosPlusOne}
{p₂ : Unit → s.ValidPosPlusOne}
:
@[simp]
theorem
String.ValidPosPlusOne.hOrElse_eq_orElse
{s : String}
{p₁ : s.ValidPosPlusOne}
{p₂ : Unit → s.ValidPosPlusOne}
:
@[simp]
theorem
String.ValidPosPlusOne.or_valid
{s : String}
{p₁ p₂ : s.ValidPosPlusOne}
(h : p₁.isValid = true)
:
@[simp]
theorem
String.ValidPosPlusOne.or_not_valid
{s : String}
{p₁ p₂ : s.ValidPosPlusOne}
(h : ¬p₁.isValid = true)
:
@[simp]
theorem
String.ValidPosPlusOne.sentinel_or
{s : String}
{p₁ p₂ : s.ValidPosPlusOne}
(h : p₁ = sentinel s)
:
@[simp]
theorem
String.ValidPosPlusOne.validPos_or
{s : String}
{p : s.ValidPos}
{p₁ p₂ : s.ValidPosPlusOne}
(h : p₁ = validPos p)
:
@[simp]
theorem
String.ValidPosPlusOne.or_sentinel
{s : String}
{p₁ p₂ : s.ValidPosPlusOne}
(h : p₂ = sentinel s)
:
@[simp]
@[simp]
@[simp]
theorem
String.ValidPosPlusOne.validPos_asValidPos
{s : String}
{p : s.ValidPosPlusOne}
{h : p.isValid = true}
: