Definition midObj {A} {JA: Join A} (a : A) : Prop := ~identity a /\ ~ full a.Definition ijoinable A {JA: Join A} : Type := {sh : A & midObj sh}.Definition ijoin {A} {JA: Join A} (j1 j2 j3 : ijoinable A) : Prop :=
  match (j1, j2, j3) with
  (existT _ t1 _, existT _ t2 _, existT _ t3 _) => join t1 t2 t3
  end.

(* Specifications: *)
Lemma ijoin_eq {A} {JA: Join A}{PA: Perm_alg A} : forall j1 j2 j3 j3', ijoin j1 j2 j3 -> ijoin j1 j2 j3' -> j3 = j3'.
Lemma ijoin_com {A} {JA: Join A}{PA: Perm_alg A} : forall j1 j2 j3, ijoin j1 j2 j3 -> ijoin j2 j1 j3.
Lemma ijoin_assoc {A} {JA: Join A}{PA: Perm_alg A}{SA: Sep_alg A}{CA: Disj_alg A} : forall a b c d e, ijoin a b d -> ijoin d c e -> {f : ijoinable A | ijoin b c f /\ ijoin a f e}.
Lemma ijoin_canc {A} {JA: Join A}{SA: Sep_alg A}{CA: Canc_alg A}: forall a a' b c, ijoin a b c -> ijoin a' b c -> a = a'.
Lemma ijoin_identity1 {A} {JA: Join A}{PA: Perm_alg A}{SA: Sep_alg A}{CA: Disj_alg A}: forall a b, ijoin a b b -> False.
Lemma ijoin_identity2 {A} {JA: Join A}{PA: Perm_alg A}{SA: Sep_alg A}{DA: Disj_alg A}: forall a b, ijoin a a b -> False.