Length of the longest common prefix of two lists #
List.lcpLen u v is the length of the longest common prefix of u and v. The string algorithms
use it as a specification: suffix and LCP arrays
(CslibFrontier.Algorithms.Lean.SuffixArray) and the Z-function
(CslibFrontier.Algorithms.Lean.ZFunction).
Main definitions #
List.lcpLen: length of the longest common prefix of two lists.
Main results #
List.le_lcpLen_iff:k ≤ lcpLen u viff both lists have length at leastkand agree on their firstkentries.List.lcpLen_eq_add_lcpLen_drop: a known common prefix of lengthhsplits off.List.min_lcpLen_eq_of_take_eq: lists that agree on their firstmentries have the same longest common prefix with any list, up tom.List.length_le_lcpLen_append_iff:u ++ xandvshare|u|leading entries iffuis a prefix ofv.List.lcpLen_le_lcpLen_of_le_of_le_leftandList.lcpLen_le_lcpLen_of_le_of_le_right: a list lexicographically between two others shares their longest common prefix.
Length of the longest common prefix of u and v.
@[simp]
@[simp]
@[simp]