Set Bullet Behavior "Strict Subproofs".
(** * Results on joining lists and the necessary algebras *)
Fixpoint joinlist {A} {JA : Join A} (l : list A) (x : A) :=
match l with
| nil => identity x
| h :: l => exists y, joinlist l y /\ join h y x
end.
Instance Permutation_length' A {JA : Join A} {PA : Perm_alg A} :
Proper (@Permutation A ==> @eq A ==> Logic.iff) joinlist | 10.

Lemma joinlist_swap {A} {JA : Join A} {PA : Perm_alg A} (a b x : A) l :
joinlist (a :: b :: l) x =
joinlist (b :: a :: l) x.