Download Generating Finite Integral Relation Algebras
Transcript
data NA
= NaH HomNA
NaS SplitNA
NaC CombineNA
deriving (Ord,Eq,Show,Read)
The function checkRA is used to test whether a NA is a RA or not .
checkRA :: NA -> Boo1
checkRA (NaH hna)
beRA hna
checkRA (NaS sna)
beRA (rootObject sna)
checkRA (NaC cna)
and [checkRA xlx<-naList cna]
4.3.1
HomNA Module
By Definition 20 in Chapter 3, we defined a new data type HomNA using the data
keyword.
data HomNA
HNA {
name
String,
atomN
Int,
atomS
Int,
index
Integer,
beRA
Boo1,
cycList
Cycle
} deriving (Ord,Eq,Show,Read)
Recall that a HomNA resembles the atom structure of a nonassociative relation algebra. By importing the Atom Structure module, the user only needs to provide three
parameters in order to construct such a complicated structure.
46