OAI/Combinatorics/BinaryEdit/MatchingSublist.lean
3 declarations, 0 contain sorry, 0 declared as axioms
- theorem
OAI.TreeEdit.BinaryLower.ofFn_get_sublistline 10Source documentation
Strictly increasing index selections produce sublists.
theorem ofFn_get_sublist {α : Type*} (x : List α) {k : ℕ} (i : Fin k → Fin x.length) (hi : StrictMono i) : (List.ofFn (fun t => x.get (i t))).Sublist x := by … - theorem
OAI.TreeEdit.BinaryLower.common_sublist_of_strict_matchingline 23Source documentation
A matching described by two increasing index maps is a common sublist with exactly as many symbols as matched index pairs.
theorem common_sublist_of_strict_matching {α : Type*} (x y : List α) {k : ℕ} (i : Fin k → Fin x.length) (j : Fin k → Fin y.length) (hi : StrictMono i) (hj : StrictMono j) (hlabel : ∀ t, x.get (i t) = y.get (j t)) : ∃ z : List α, z.Sublist x ∧ z.Sublist y ∧ z.length = k := by … - theorem
OAI.TreeEdit.BinaryLower.matching_length_le_lcsline 35Source documentation
Every increasing matching has size at most the longest common subsequence.
theorem matching_length_le_lcs {α : Type*} (x y : List α) {k : ℕ} (i : Fin k → Fin x.length) (j : Fin k → Fin y.length) (hi : StrictMono i) (hj : StrictMono j) (hlabel : ∀ t, x.get (i t) = y.get (j t)) : k ≤ lcs x y := by …Mentions: OAI.TreeEdit.lcs