create static method

Logic create(
  1. Logic arg
)

Implementation

static Logic create(Logic arg) {
  return switch (arg) {
    LogicAtom() => Not._(arg),
    True() => False(),
    False() => True(),
    Not() => arg.arg,
    // XXX this is a hack to expand right from the beginning
    And() => arg._evalPropagateNot(),
    Or() => arg._evalPropagateNot(),
  };
}