on master help sign in
Merge pull request #1384 from lenary/correct-semilattices
9b9d513Edwin Brady
libs/prelude/Prelude/Algebra.idr+8−8
@@ -177,7 +177,7 @@ class MeetSemilattice a => VerifiedMeetSemilattice a where
177 total meetSemilatticeMeetIsIdempotent : (e : a) -> meet e e = e
177 total meetSemilatticeMeetIsIdempotent : (e : a) -> meet e e = e
178
178
179||| Sets equipped with a binary operation that is commutative, associative and
179||| Sets equipped with a binary operation that is commutative, associative and
180−||| idempotent and supplied with a neutral element. Must satisfy the following
180+||| idempotent and supplied with a unitary element. Must satisfy the following
181||| laws:
181||| laws:
182|||
182|||
183||| + Associativity of join:
183||| + Associativity of join:
@@ -186,8 +186,8 @@ class MeetSemilattice a => VerifiedMeetSemilattice a where
186||| forall a b, join a b == join b a
186||| forall a b, join a b == join b a
187||| + Idempotency of join:
187||| + Idempotency of join:
188||| forall a, join a a == a
188||| forall a, join a a == a
189−||| + Bottom:
189+||| + Bottom (Unitary Element):
190−||| forall a, join a bottom == bottom
190+||| forall a, join a bottom == a
191|||
191|||
192||| Join semilattices capture the notion of sets with a "least upper bound"
192||| Join semilattices capture the notion of sets with a "least upper bound"
193||| equipped with a "bottom" element.
193||| equipped with a "bottom" element.
@@ -195,10 +195,10 @@ class JoinSemilattice a => BoundedJoinSemilattice a where
195 bottom : a
195 bottom : a
196
196
197class (VerifiedJoinSemilattice a, BoundedJoinSemilattice a) => VerifiedBoundedJoinSemilattice a where
197class (VerifiedJoinSemilattice a, BoundedJoinSemilattice a) => VerifiedBoundedJoinSemilattice a where
198− total boundedJoinSemilatticeBottomIsBottom : (e : a) -> join e bottom = bottom
198+ total boundedJoinSemilatticeBottomIsBottom : (e : a) -> join e bottom = e
199
199
200||| Sets equipped with a binary operation that is commutative, associative and
200||| Sets equipped with a binary operation that is commutative, associative and
201−||| idempotent and supplied with a neutral element. Must satisfy the following
201+||| idempotent and supplied with a unitary element. Must satisfy the following
202||| laws:
202||| laws:
203|||
203|||
204||| + Associativity of meet:
204||| + Associativity of meet:
@@ -207,8 +207,8 @@ class (VerifiedJoinSemilattice a, BoundedJoinSemilattice a) => VerifiedBoundedJo
207||| forall a b, meet a b == meet b a
207||| forall a b, meet a b == meet b a
208||| + Idempotency of meet:
208||| + Idempotency of meet:
209||| forall a, meet a a == a
209||| forall a, meet a a == a
210−||| + Top:
210+||| + Top (Unitary Element):
211−||| forall a, meet a top == top
211+||| forall a, meet a top == a
212|||
212|||
213||| Meet semilattices capture the notion of sets with a "greatest lower bound"
213||| Meet semilattices capture the notion of sets with a "greatest lower bound"
214||| equipped with a "top" element.
214||| equipped with a "top" element.
@@ -216,7 +216,7 @@ class MeetSemilattice a => BoundedMeetSemilattice a where
216 top : a
216 top : a
217
217
218class (VerifiedMeetSemilattice a, BoundedMeetSemilattice a) => VerifiedBoundedMeetSemilattice a where
218class (VerifiedMeetSemilattice a, BoundedMeetSemilattice a) => VerifiedBoundedMeetSemilattice a where
219− total boundedMeetSemilatticeTopIsTop : (e : a) -> meet e top = top
219+ total boundedMeetSemilatticeTopIsTop : (e : a) -> meet e top = e
220
220
221||| Sets equipped with two binary operations that are both commutative,
221||| Sets equipped with two binary operations that are both commutative,
222||| associative and idempotent, along with absorbtion laws for relating the two
222||| associative and idempotent, along with absorbtion laws for relating the two