Composing and splitting aligned lists #
Two lists aligned by List.Forall₂ R can be cut at matching positions: a cut of one side, as an
append or around a middle element, gives a cut of the other side with the same lengths, and the
parts stay aligned. Proofs that keep several lists aligned with one another, such as the chains,
hole triples and runs of a search, split them all around the element that changes.
Main results #
List.Forall₂.trans: compose alignments through a transitive triple of relations.List.Forall₂.split_right,List.Forall₂.split_right_cons,List.Forall₂.split_left_cons: cutting one side cuts the other.List.Forall₂.split_of_length_eq: two appends aligned with parts of equal lengths.List.Forall₂.exists_mem_of_mem: each element has an aligned partner.
Composing alignments pointwise composes their element relations.