A discovered life-saving library for computing set theory relevant issues. Name of library is set.

Here is simple definition and using cartesian function:

library(sets)

a=set(“x”,“y”,“z”)

b=set(“y,q”)

set_cartesian(a,a)