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 app_joinlist {A} {JA : Join A} {SA : Sep_alg A} {PA : Perm_alg A} l1 l2 x :
joinlist (l1 ++ l2) x ->
exists x1 x2,
joinlist l1 x1 /\
joinlist l2 x2 /\
join x1 x2 x.