proposition: Lemma prefixes_r n a b : list_before (prefixes n) a b -> r b a -> False.
proof: Proof. assert (X := sorted_prefixes n); unfold list_before; ins; desf. rewrite H1 in *. apply StronglySorted_app_r, StronglySorted_inv, proj2 in SORT. rewrite Forall_app, Forall_cons in SORT; desc. apply INCL in H0; eapply TOT; eapply TOT; eauto. Qed.
imports: Arith micromega.Lia Setoid IndefiniteDescription ClassicalChoice HahnBase HahnList HahnEquational HahnRewrite HahnRelationsBasic HahnSets HahnNatExtra HahnListBefore HahnWf HahnSorted HahnTotalExt