manyvalued
Safe HaskellNone
LanguageGHC2024

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

Documentation

newtype Boolean2Ring b Source #

Carrier wrapper: same Boolean values, ring operations.

Constructors

Boolean2Ring 

Fields

Instances

Instances details
Eq b => Eq (Boolean2Ring b) Source # 
Instance details

Defined in Circuit.Logics.Boolean2Ring

Ord b => Ord (Boolean2Ring b) Source # 
Instance details

Defined in Circuit.Logics.Boolean2Ring

(MeetSemiLattice b, Complemented b, LowerBounded b, UpperBounded b) => Num (Boolean2Ring b) Source # 
Instance details

Defined in Circuit.Logics.Boolean2Ring

Read b => Read (Boolean2Ring b) Source # 
Instance details

Defined in Circuit.Logics.Boolean2Ring

Show b => Show (Boolean2Ring b) Source # 
Instance details

Defined in Circuit.Logics.Boolean2Ring

xorBool :: Complemented b => b -> b -> b Source #

XOR on a complemented meet-semilattice with bounds.