| 1 |
Class Join (t: Type) : Type := mkJoin {join: t -> t -> t -> Prop}. |
| 2 |
|
| 3 |
Class sepalg (t: Type) {JOIN: Join t} : Type := |
| 4 |
SepAlg { |
| 5 |
join_eq: forall {x y z z'}, join x y z -> join x y z' -> z = z'; |
| 6 |
join_assoc: forall {a b c d e}, join a b d -> join d c e -> |
| 7 |
{f : t & join b c f /\ join a f e}; |
| 8 |
join_com: forall {a b c}, join a b c -> join b a c; |
| 9 |
join_canc: forall {a1 a2 b c}, join a1 b c -> join a2 b c -> a1=a2; |
| 10 |
|
| 11 |
unit_for : t -> t -> Prop := fun e a => join e a a; |
| 12 |
join_ex_units: forall a, {e : t & unit_for e a} |
| 13 |
}. |
| 14 |
|
| 15 |
Definition joins {A} `{Join A} (a b : A) : Prop := |
| 16 |
exists c, join a b c. |
| 17 |
|
| 18 |
Lemma join_joins {A} `{sepalg A}: forall {a b c}, |
| 19 |
join a b c -> joins a b. |
| 20 |
Proof. |
| 21 |
firstorder. |
| 22 |
Qed. |