| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Circuit.Logics.Boolean2Ring
Description
Boolean algebra re-read as a ring of characteristic 2.
(+) = XOR (symmetric difference) (*) = AND zero = false one = true negate = id
Keeps Boolean and ring APIs separate while documenting the bridge — relevant if numhask ever wants an explicit Boolean↔Ring story.
Synopsis
- newtype Boolean2Ring b = Boolean2Ring {
- getBoolean2Ring :: b
- xorBool :: Complemented b => b -> b -> b
Documentation
newtype Boolean2Ring b Source #
Carrier wrapper: same Boolean values, ring operations.
Constructors
| Boolean2Ring | |
Fields
| |
Instances
xorBool :: Complemented b => b -> b -> b Source #
XOR on a complemented meet-semilattice with bounds.