---
layout: default
title : "Examples.Structures.Basic module (Agda Universal Algebra Library)"
date : "2021-07-29"
author: "agda-algebras development team"
---
### Examples of Structures
<!--
```agda
{-# OPTIONS --cubical-compatible --exact-split --safe #-}
module Examples.Structures.Basic where
open import Level using ( 0ā )
open import Data.Product using ( _,_ ; _Ć_ )
open import Relation.Unary using ( Pred ; _ā_ )
open import Overture using ( š ; š )
open import Legacy.Base.Structures using ( structure )
open import Examples.Structures.Signatures using ( S001 ; Sā
; S0001 )
```
-->
```agda
SL : structure S001
Sā
{Ļ = 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}).
```agda
data NAE3SAT : Pred (š Ć š Ć š) 0ā where
r1 : (š.š , š.š , š.š) ā NAE3SAT
r2 : (š.š , š.š , š.š) ā NAE3SAT
r3 : (š.š , š.š , š.š) ā NAE3SAT
r4 : (š.š , š.š , š.š) ā NAE3SAT
r5 : (š.š , š.š , š.š) ā NAE3SAT
r6 : (š.š , š.š , š.š) ā NAE3SAT
nae3sat : structure Sā
S0001
nae3sat = record { carrier = š
; op = Ī» ()
; rel = Ī» _ x ā ((x š.š) , (x š.š) , (x š.š)) ā NAE3SAT
}
```