M5: list facts #
- filters whose predicate changes at one element (
filter_erase_of,filter_snoc_of,filter_cons_of): how a range changes when one chunk moves; - a convex filter is an infix (
filter_infix_of_convex): ranges are blocks of the chunk list; - neighbours in an infix triple
[a, b, c](Infix3.*).
Filters changed at one element #
Convex filters #
Ends of a list #
Erasing an element #
Inserting around an element in a list and a superlist #
theorem
OrderMaintenance.Proof.Top.before_lift
{A B : List ℕ}
{x y z c d : ℕ}
(hnd : (A ++ y :: x :: z :: B).Nodup)
(hc : c ∈ A ++ y :: x :: z :: B)
(hd : d ∈ A ++ y :: x :: z :: B)
(hne : (if c = y ∨ c = z then x else c) ≠ if d = y ∨ d = z then x else d)
(h : Before (A ++ x :: B) (if c = y ∨ c = z then x else c) (if d = y ∨ d = z then x else d))
:
Order in A, x, B lifts to A, y, x, z, B through the collapse of y, z onto x.