Corollary consistent_insert_rem : forall {A} (h1 h2 : hist A) a b p v (Hadds : forallb is_add h1 = true),
  consistent (h1 ++ h2) a b -> consistent (h1 ++ QRem p v :: h2) ((p, v) :: a) b.

Lemma interleave_reorder : forall {A} ls1 ls2 (l l' : list A), interleave (ls1 ++ l :: ls2) l' <-> interleave (l :: ls1 ++ ls2) l'.