## Create the multiplication table
s <- matrix(data=c(1, 1, 1, 3, 3, 3, 3, 3, 3), nrow=3, ncol=3, byrow=TRUE)
## make a semigroup object with labels
S <- as.semigroup(s, labels=c('n', 'm', '<f1>'))
## convert to a symbolic form a semigroup with relabeled strings
convert(relabel(S, labels=c('a', 'b', 'c')))
Run the code above in your browser using DataLab