# The conjunction described under 'details'
v1 <- cf("Y", 0)
v2 <- cf("Y", 1, c("X" = 0))
c1 <- conj(v1, v2)
# Alternative construction
c1 <- v1 + v2
# Adding further variables
v3 <- cf("X", 1)
c2 <- c1 + v3
# A specific value of a variable (a unique combination of `var` and `sub`)
# can only appear once in a given conjunction,
# otherwise the conjunction would be trivially inconsistent
v4 <- cf("Y", 0, c("X" = 0))
v5 <- cf("Y", 1, c("X" = 0))
c3 <- try(conj(v4, v5))
# Y without an assigned value or any interventions
cf("Y")
# Y with a value assignment y, but no interventions
cf("Y", 0)
# Y with a different value y', but no interventions
cf("Y", 1)
# Y with the same value as the previous under the intervention do(X = x)
cf("Y", 1, c("X" = 0))
# Y with yet another value y'', under the intervention
# do(X = x', Z = z), i.e., the intervention on X has a different value
# than the previous (x != x') and Z is also assigned the value z
cf("Y", 2, c("X" = 1, "Z" = 0))
Run the code above in your browser using DataLab