theorem
Regex.CapturedGroups.lt_of_get_some
{haystack : String}
{self : CapturedGroups haystack}
{index : ℕ}
{slice : String.Slice}
(h : self.get index = some slice)
:
def
Regex.CapturedGroups.materialize
{haystack : String}
(self : CapturedGroups haystack)
(groups : Data.CaptureGroups haystack)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Regex.CapturedGroups.Spec
{re : Regex}
(s : re.IsSearchRegex)
(haystack : String)
(startPos : haystack.ValidPosPlusOne)
(self : CapturedGroups haystack)
:
CapturedGroups conforms to the spec if and only if:
- The start position is valid (i.e., in the range of the haystack)
- The slice starts after the start position
- There is a regex match spanning the slice
- The captured groups contains the slices corresponding to the capture groups in the regex match
- In particular, the first group corresponds to the slice of the overall match
- the last match wins in case the same group is captured multiple times
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
Regex.Captures.captures_of_next?_some
{haystack : String}
{self self' : Captures haystack}
{captured : CapturedGroups haystack}
(h : self.next? = some (captured, self'))
(isr : self.regex.IsSearchRegex)
:
CapturedGroups.Spec isr haystack self.currentPos captured