Examples.Structures.Basic¶
Examples of Structures¶
-- An example of a (purely) algebraic structure is a 3-element meet semilattice. SL : structure S001 -- (one binary operation symbol) Sā -- (no relation symbols) {Ļ = 0ā} SL = record { carrier = š ; op = Ī» _ x ā meet (x š.š) (x š.š) ; rel = Ī» () } where meet : š ā š ā š meet š.š š.š = š.š meet š.š š.š = š.š meet š.š š.š = š.š meet š.š š.š = š.š meet š.š š.š = š.š meet š.š š.š = š.š meet š.š š.š = š.š meet š.š š.š = š.š meet š.š š.š = š.š
An example of a (purely) relational structure is the 2 element structure with the ternary NAE-3-SAT relation, R = S³ - {(0,0,0), (1,1,1)} (where S = {0, 1}).
data NAE3SAT : Pred (š Ć š Ć š) 0ā where r1 : (š.š , š.š , š.š) ā NAE3SAT r2 : (š.š , š.š , š.š) ā NAE3SAT r3 : (š.š , š.š , š.š) ā NAE3SAT r4 : (š.š , š.š , š.š) ā NAE3SAT r5 : (š.š , š.š , š.š) ā NAE3SAT r6 : (š.š , š.š , š.š) ā NAE3SAT nae3sat : structure Sā -- (no operation symbols) S0001 -- (one ternary relation symbol) nae3sat = record { carrier = š ; op = Ī» () ; rel = Ī» _ x ā ((x š.š) , (x š.š) , (x š.š)) ā NAE3SAT }