Dom::Boolean
--
boolean semiring
Dom::Boolean
creates a domain for the semiring of booleans.
Dom::Boolean
(n)
represents the boolean constant 0
for FALSE if n=0, or 1 for TRUE otherwise.
Dom::Boolean
(n)
n | - | integer. |
Cat::SemiRing
the boolean constant 0.
the boolean constant 1.
_plus(dom a1...)
a1+a2+...+ak
of booleans is defined to be the boolean
value 0 if a1=a2=...=ak=0
, the boolean value 1 otherwise._plus
.
_mult(dom a1...)
a1*a2*...*ak
of booleans is defined to be the boolean
value 1 if a1=a2=...=ak=1
, the boolean value 0 otherwise._mult
.
_power(dom a,Dom::Integer n)
a^n
of the boolean a
._power
.
expr(dom a)
a
.This example shows the idempotency of the boolean semiring:
>> B:=Dom::Boolean:
>> B(0) + B(0);
B(1) + B(1)
0 1
Ax::canonicalRep, Ax::normalRep
Dom::Boolean
is a new function
MuPAD Combinat, an open source algebraic combinatorics package