Interface SemiLattice<E>
A set equipped with a commutative, associative and idempotent binary
operation.
This structure represents half of a lattice. The operation is typically called "join" (∨) or "meet" (∧).
Mathematical Definition
A semilattice (S, •) satisfies:
- Associativity: (a • b) • c = a • (b • c)
- Commutativity: a • b = b • a
- Idempotency: a • a = a
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanTests whether this magma's operation is associative.default booleanTests whether this magma's operation is commutative.default booleanTests for idempotency (a • a = a).The binary operation (join or meet).Methods inherited from interface Set
contains, description, isEmpty
-
Method Details
-
operate
-
isAssociative
default boolean isAssociative()Description copied from interface:MagmaTests whether this magma's operation is associative.An operation ∗ is associative if for all a, b, c:
(a ∗ b) ∗ c = a ∗ (b ∗ c)If this returns
true, this magma is actually a.invalid reference
Semigroup- Specified by:
isAssociativein interfaceMagma<E>- Returns:
trueif the operation is associative- See Also:
-
isCommutative
default boolean isCommutative()Description copied from interface:MagmaTests whether this magma's operation is commutative.An operation ∗ is commutative if for all a, b:
a ∗ b = b ∗ a- Specified by:
isCommutativein interfaceMagma<E>- Returns:
trueif the operation is commutative
-
isIdempotent
default boolean isIdempotent()Tests for idempotency (a • a = a).- Returns:
- always true for semilattices
-