The Boolean semiring over bool.
More...
#include "Boolean.h"
|
| typedef bool | value_type |
| | The carrier type of this semiring.
|
The Boolean semiring over bool.
Provides the standard Boolean interpretation of provenance circuits.
Definition at line 40 of file Boolean.h.
◆ absorptive()
| virtual bool semiring::Boolean::absorptive |
( |
| ) |
const |
|
inlineoverridevirtual |
Return true if this semiring is absorptive ( \(\mathbb{1} \oplus a = \mathbb{1}\) for all \(a\)).
When true, the circuit evaluator and HAVING-semantics machinery may exploit the resulting idempotency ( \(a \oplus a = a\), implied by absorptivity) to deduplicate children of plus gates and to short-circuit over the multiplicative identity.
- Returns
false by default; override to return true.
Reimplemented from semiring::Semiring< bool >.
Definition at line 67 of file Boolean.h.
◆ compatibleWithBooleanRewrite()
| virtual bool semiring::Boolean::compatibleWithBooleanRewrite |
( |
| ) |
const |
|
inlineoverridevirtual |
The identity map BoolFunc(X) →+* Bool (evaluating a free Boolean function at a valuation) is an m-semiring homomorphism, so the safe-query Boolean rewrite preserves evaluation results in this semiring.
Lean: Provenance.Semirings.Bool.homomorphism_to_BoolFunc and Bool.homomorphism_from_BoolFunc (provenance-lean/Provenance/Semirings/Bool.lean).
Reimplemented from semiring::Semiring< bool >.
Definition at line 80 of file Boolean.h.
◆ delta()
◆ monus()
◆ one()
| virtual value_type semiring::Boolean::one |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ parse_leaf()
| value_type semiring::Boolean::parse_leaf |
( |
const char * | v | ) |
const |
|
inline |
◆ plus()
Apply the additive operation to a list of values.
- Parameters
-
| v | Ordered list of operands (empty list should return zero()). |
- Returns
- \(v_0 \oplus v_1 \oplus \cdots\).
Implements semiring::Semiring< bool >.
Definition at line 49 of file Boolean.h.
◆ times()
Apply the multiplicative operation to a list of values.
- Parameters
-
| v | Ordered list of operands (empty list should return one()). |
- Returns
- \(v_0 \otimes v_1 \otimes \cdots\).
Implements semiring::Semiring< bool >.
Definition at line 54 of file Boolean.h.
◆ zero()
| virtual value_type semiring::Boolean::zero |
( |
| ) |
const |
|
inlineoverridevirtual |
The documentation for this class was generated from the following file:
- /home/pierre/git/software/provsql/src/semiring/Boolean.h