Documentation

Init.Data.String.Lemmas.Pattern.String.Basic

theorem String.Slice.Pattern.Model.ForwardSliceSearcher.isLongestMatchAt_iff {pat s : Slice} {pos₁ pos₂ : s.Pos} :
IsLongestMatchAt pat pos₁ pos₂ (h : pos₁ pos₂), (s.slice pos₁ pos₂ h).copy = pat.copy
theorem String.Slice.Pattern.Model.ForwardSliceSearcher.isLongestMatchAtChain_iff {pat s : Slice} {pos₁ pos₂ : s.Pos} :
IsLongestMatchAtChain pat pos₁ pos₂ (h : pos₁ pos₂), (n : Nat), (s.slice pos₁ pos₂ h).copy = String.join (List.replicate n pat.copy)
theorem String.Slice.Pattern.Model.ForwardSliceSearcher.isLongestRevMatchAt_iff {pat s : Slice} {pos₁ pos₂ : s.Pos} :
IsLongestRevMatchAt pat pos₁ pos₂ (h : pos₁ pos₂), (s.slice pos₁ pos₂ h).copy = pat.copy
theorem String.Slice.Pattern.Model.ForwardSliceSearcher.isLongestRevMatchAtChain_iff {pat s : Slice} {pos₁ pos₂ : s.Pos} :
IsLongestRevMatchAtChain pat pos₁ pos₂ (h : pos₁ pos₂), (n : Nat), (s.slice pos₁ pos₂ h).copy = String.join (List.replicate n pat.copy)
theorem String.Slice.Pattern.Model.ForwardSliceSearcher.isLongestMatchAt_iff_splits {pat s : Slice} {pos₁ pos₂ : s.Pos} :
IsLongestMatchAt pat pos₁ pos₂ (t₁ : String), (t₂ : String), pos₁.Splits t₁ (pat.copy ++ t₂) pos₂.Splits (t₁ ++ pat.copy) t₂
theorem String.Slice.Pattern.Model.ForwardSliceSearcher.isLongestRevMatchAt_iff_splits {pat s : Slice} {pos₁ pos₂ : s.Pos} :
IsLongestRevMatchAt pat pos₁ pos₂ (t₁ : String), (t₂ : String), pos₁.Splits t₁ (pat.copy ++ t₂) pos₂.Splits (t₁ ++ pat.copy) t₂
theorem String.Slice.Pattern.Model.ForwardSliceSearcher.offset_of_isLongestMatchAt {pat s : Slice} {pos₁ pos₂ : s.Pos} (h : pat.isEmpty = false) (h' : IsLongestMatchAt pat pos₁ pos₂) :
theorem String.Slice.Pattern.Model.ForwardStringSearcher.isLongestMatchAtChain_iff {pat : String} {s : Slice} {pos₁ pos₂ : s.Pos} :
IsLongestMatchAtChain pat pos₁ pos₂ (h : pos₁ pos₂), (n : Nat), (s.slice pos₁ pos₂ h).copy = String.join (List.replicate n pat)
theorem String.Slice.Pattern.Model.ForwardStringSearcher.isLongestRevMatchAtChain_iff {pat : String} {s : Slice} {pos₁ pos₂ : s.Pos} :
IsLongestRevMatchAtChain pat pos₁ pos₂ (h : pos₁ pos₂), (n : Nat), (s.slice pos₁ pos₂ h).copy = String.join (List.replicate n pat)
theorem String.Slice.Pattern.Model.ForwardStringSearcher.isLongestMatchAt_iff {pat : String} {s : Slice} {pos₁ pos₂ : s.Pos} :
IsLongestMatchAt pat pos₁ pos₂ (h : pos₁ pos₂), (s.slice pos₁ pos₂ h).copy = pat
theorem String.Slice.Pattern.Model.ForwardStringSearcher.isLongestRevMatchAt_iff {pat : String} {s : Slice} {pos₁ pos₂ : s.Pos} :
IsLongestRevMatchAt pat pos₁ pos₂ (h : pos₁ pos₂), (s.slice pos₁ pos₂ h).copy = pat
theorem String.Slice.Pattern.Model.ForwardStringSearcher.isLongestMatchAt_iff_splits {pat : String} {s : Slice} {pos₁ pos₂ : s.Pos} :
IsLongestMatchAt pat pos₁ pos₂ (t₁ : String), (t₂ : String), pos₁.Splits t₁ (pat ++ t₂) pos₂.Splits (t₁ ++ pat) t₂
theorem String.Slice.Pattern.Model.ForwardStringSearcher.isLongestRevMatchAt_iff_splits {pat : String} {s : Slice} {pos₁ pos₂ : s.Pos} :
IsLongestRevMatchAt pat pos₁ pos₂ (t₁ : String), (t₂ : String), pos₁.Splits t₁ (pat ++ t₂) pos₂.Splits (t₁ ++ pat) t₂
theorem String.Slice.Pattern.Model.ForwardStringSearcher.offset_of_isLongestMatchAt {pat : String} {s : Slice} {pos₁ pos₂ : s.Pos} (h : pat "") (h' : IsLongestMatchAt pat pos₁ pos₂) :
theorem String.Slice.Pattern.Model.ForwardStringSearcher.offset_of_isLongestRevMatchAt {pat : String} {s : Slice} {pos₁ pos₂ : s.Pos} (h : pat "") (h' : IsLongestRevMatchAt pat pos₁ pos₂) :