Documentation

RegexCorrectness.Regex.Basic

noncomputable def Regex.IsSearchRegex.inner {re : Regex} (s : re.IsSearchRegex) :
Equations
Instances For
    noncomputable def Regex.IsSearchRegex.expr {re : Regex} (s : re.IsSearchRegex) :
    Equations
    Instances For
      theorem Regex.IsSearchRegex.captureNextBuf_soundness' {re : Regex} {bufferSize : } {it : String.Iterator} {matched : Vector (Option String.Pos) bufferSize} (h : re.captureNextBuf bufferSize it = some matched) (s : re.IsSearchRegex) (v : it.Valid) :
      theorem Regex.IsSearchRegex.captureNextBuf_soundness {re : Regex} {bufferSize : } {it : String.Iterator} {matched : Vector (Option String.Pos) bufferSize} (h : re.captureNextBuf bufferSize it = some matched) (s : re.IsSearchRegex) (v : it.Valid) (le : 2 bufferSize) :
      ∃ (it' : String.Iterator) (it'' : String.Iterator) (groups : Data.CaptureGroups), it'.toString = it.toString it.pos it'.pos Data.Expr.Captures it' it'' groups s.expr Strategy.EquivMaterializedUpdate (Strategy.materializeRegexGroups groups) matched matched[0] = some it'.pos matched[1] = some it''.pos
      theorem Regex.IsSearchRegex.captureNextBuf_completeness {re : Regex} {bufferSize : } {it : String.Iterator} (h : re.captureNextBuf bufferSize it = none) (s : re.IsSearchRegex) (v : it.Valid) :
      ¬∃ (it' : String.Iterator) (it'' : String.Iterator) (groups : Data.CaptureGroups), it'.toString = it.toString it.pos it'.pos Data.Expr.Captures it' it'' groups s.expr
      theorem Regex.IsSearchRegex.searchNext_some {re : Regex} {it : String.Iterator} {str : Substring} (h : re.searchNext it = some str) (s : re.IsSearchRegex) (v : it.Valid) :
      ∃ (it' : String.Iterator) (it'' : String.Iterator) (groups : Data.CaptureGroups), it'.toString = it.toString it.pos it'.pos Data.Expr.Captures it' it'' groups s.expr str.startPos = it'.pos str.stopPos = it''.pos