(** The elements of a multi-unit separation algebra can be partitioned
    into equivalance classes, where two elements are in the class iff
    they have the same unit.
  *)

  Definition comparable {A} `{Sep_alg A}  (a b:A)
    := core a = core b.

(* Specifications: *)
Lemma comparable_refl {A} `{Sep_alg A} : forall a, comparable a a.
Lemma comparable_sym {A} `{Sep_alg A}: forall a b, comparable a b -> comparable b a.
Lemma comparable_trans {A} `{Sep_alg A}: forall a b c, comparable a b -> comparable b c -> comparable a c.
Lemma comparable_common_unit {A} `{Sep_alg A}: forall a b, comparable a b -> exists e, join e a a /\ join e b b.
Lemma common_unit_comparable {A} `{Sep_alg A} : forall a b, (exists e, join e a a /\ join e b b) -> comparable a b.
Lemma join_comparable {A} `{Sep_alg A}: forall phi1 phi2 phi3, join phi1 phi2 phi3 -> comparable phi1 phi3.
Lemma join_comparable2 {A} {J: Join A}{PA: Perm_alg A}{SA: Sep_alg A}: forall phi1 phi2 phi3, join phi1 phi2 phi3 -> comparable phi1 phi2.
Lemma join_sub_comparable {A} `{Sep_alg A} : forall a c, join_sub a c -> comparable a c.
Lemma joins_comparable {A} {J: Join A}{PA: Perm_alg A}{SA: Sep_alg A} : forall a c, joins a c -> comparable a c.
Lemma join_unit1 {A} `{Perm_alg A}: forall x y z, unit_for x z -> y = z -> join x y z.
Lemma join_unit2 {A} `{Perm_alg A}: forall x y z, unit_for y z -> x = z -> join x y z.
Lemma join_unit1_e {A} `{Perm_alg A}: forall x y z, identity x -> join x y z -> y = z.
Lemma join_unit2_e {A} `{Perm_alg A}: forall x y z, identity y -> join x y z -> x = z.
Lemma PermAlg_ext: forall (T: Type) (J: @Join T) (sa1 sa2: @Perm_alg T J), sa1=sa2.
Lemma Sep_alg_ext {T} {J} {PA: @Perm_alg _ J}: forall (sa1 sa2: @Sep_alg T J), sa1=sa2.