use of kodkod.ast.Variable in project org.alloytools.alloy by AlloyTools.
the class NUM374 method sumProductDistribution.
/**
* Returns the sum_product_distribution axiom.
*
* @return sum_product_distribution
*/
public final Formula sumProductDistribution() {
// ! [X,Y,Z] : product(X,sum(Y,Z)) = sum(product(X,Y),product(X,Z)) )).
final Variable x = Variable.unary("X");
final Variable y = Variable.unary("Y");
final Variable z = Variable.unary("Z");
return product(x, sum(y, z)).eq(sum(product(x, y), product(x, z))).forAll(x.oneOf(UNIV).and(y.oneOf(UNIV)).and(z.oneOf(UNIV)));
}
use of kodkod.ast.Variable in project org.alloytools.alloy by AlloyTools.
the class NUM374 method exponentProductDistribution.
/**
* Returns the exponent_product_distribution axiom.
*
* @return exponent_product_distribution
*/
public final Formula exponentProductDistribution() {
// ! [X,Y,Z] : exponent(product(X,Y),Z) =
// product(exponent(X,Z),exponent(Y,Z))
final Variable x = Variable.unary("X");
final Variable y = Variable.unary("Y");
final Variable z = Variable.unary("Z");
return exponent(product(x, y), z).eq(product(exponent(x, z), exponent(y, z))).forAll(x.oneOf(UNIV).and(y.oneOf(UNIV)).and(z.oneOf(UNIV)));
}
use of kodkod.ast.Variable in project org.alloytools.alloy by AlloyTools.
the class NUM374 method symmetric.
/**
* Returns all X, Y: Num | op[X][Y] = op[Y][X]
*
* @return all X, Y: Num | op[X][Y] = op[Y][X]
*/
final Formula symmetric(Relation op) {
// all X, Y: Num | op[X][Y] = op[Y][X]
final Variable x = Variable.unary("X");
final Variable y = Variable.unary("Y");
return apply(op, x, y).eq(apply(op, y, x)).forAll(x.oneOf(UNIV).and(y.oneOf(UNIV)));
}
use of kodkod.ast.Variable in project org.alloytools.alloy by AlloyTools.
the class SET948 method t97_zfmisc_1.
/**
* Returns t97_zfmisc_1 axiom.
*
* @return t97_zfmisc_1
*/
public final Formula t97_zfmisc_1() {
final Variable a = Variable.unary("A");
final Variable b = Variable.unary("B");
return subset(union(set_intersection2(a, b)), set_intersection2(union(a), union(b))).forAll(a.oneOf(UNIV).and(b.oneOf(UNIV)));
}
use of kodkod.ast.Variable in project org.alloytools.alloy by AlloyTools.
the class SET948 method d3_xboole_0.
/**
* Returns d3_xboole_0 axiom.
*
* @return d3_xboole_0
*/
public final Formula d3_xboole_0() {
final Variable a = Variable.unary("A");
final Variable b = Variable.unary("B");
final Variable c = Variable.unary("C");
return c.eq(set_intersection2(a, b)).iff(in.join(c).eq(in.join(a).intersection(in.join(b)))).forAll(a.oneOf(UNIV).and(b.oneOf(UNIV)).and(c.oneOf(UNIV)));
}
Aggregations