public override IExpression?Simplify()
        {
            var newChild = Child?.Simplify();

            if (newChild is ConstantExpression childConst)
            {
                // child is constant
                return(new ConstantExpression(BooleanFunctions.Not(childConst.Value)));
            }
            return(new NegateExpression(newChild));
        }
 protected override Number Evaluate(Number number)
 {
     return(BooleanFunctions.Not(number));
 }