elems1 <- c("a", "b", "c", "d", "e")
elems2 <- c("f", "g", "h")
dom1 <- matrix(c(
"a", "b",
"c", "b",
"d", "b"
), ncol = 2, byrow = TRUE)
dom2 <- matrix(c(
"g", "f",
"h", "f"
), ncol = 2, byrow = TRUE)
pos1 <- POSet(elements = elems1, dom = dom1)
pos2 <- POSet(elements = elems2, dom = dom2)
#Lexicographic product of pos1 and pos2
lex.prod <- LexicographicProductPOSet(pos1, pos2)
Run the code above in your browser using DataLab