public void testIntervals() {
Expression contains, evaluated;
Interval interval = new Interval(true, N.create(0), N.create(1), true); // [0, 1]
System.out.printf("%s%n", interval);
contains = new ElementOf(R.create(-1), interval);
evaluated = contains.evaluate();
System.out.printf(" %s : %s%n", contains, evaluated);
assertEquals(evaluated, TruthValue.False);
contains = new ElementOf(R.create(0), interval);
evaluated = contains.evaluate();
System.out.printf(" %s : %s%n", contains, evaluated);
assertEquals(evaluated, TruthValue.True);
interval = new Interval(false, N.create(0), N.create(1), true); // (0, 1]
System.out.printf("%s%n", interval);
contains = new ElementOf(R.create(0), interval);
evaluated = contains.evaluate();
System.out.printf(" %s : %s%n", contains, evaluated);
assertEquals(evaluated, TruthValue.False);
contains = new ElementOf(Z.create(13), interval);
evaluated = contains.evaluate();
System.out.printf(" %s : %s%n", contains, evaluated);
assertEquals(evaluated, TruthValue.False);
interval = new Interval(false, N.create(0), Infinity.PLUS_INFINITY, false); // (0, inf)
System.out.printf("%s%n", interval);
contains = new ElementOf(R.create(3.14), interval);
evaluated = contains.evaluate();
System.out.printf(" %s : %s%n", contains, evaluated);
assertEquals(evaluated, TruthValue.True);
}