Belnap levels #
References #
- [N. D. Belnap, A Useful Four-Valued Logic][Belnap1977]
- [Ghica, Kaye, and Sprunger, A Complete Theory of Sequential Digital Circuits][Ghica2025]
The Belnap four-valued logic lattice on Bool, with a bottom (no information) and a
top (conflicting information) adjoined.
Equations
Instances For
@[implicit_reducible]
Equations
- Circuit.BelnapLevel.instCoeWithBotTopBool = { coe := fun (l : WithBotTop Bool) => l }
@[implicit_reducible]
Equations
- Circuit.BelnapLevel.instBot = { bot := none }
@[implicit_reducible]
Equations
- Circuit.BelnapLevel.instTop = { top := ↑none }
@[inline]
The information ordering on Belnap levels: ⊥ is below everything, everything is below ⊤,
and the two classical values are only related to themselves.
Equations
Instances For
@[implicit_reducible]
Equations
- One or more equations did not get rendered due to their size.
The join (least upper bound) on Belnap levels in the information order.
Equations
Instances For
@[implicit_reducible]
Equations
- One or more equations did not get rendered due to their size.
@[inline]
Logical AND.
Equations
- Circuit.BelnapLevel.and (some (some false)) b = WithBotTop.coe false
- a.and (some (some false)) = WithBotTop.coe false
- Circuit.BelnapLevel.and (some (some true)) b = b
- a.and (some (some true)) = a
- Circuit.BelnapLevel.and none none = ⊥
- Circuit.BelnapLevel.and (some none) (some none) = ⊤
- a.and b = WithBotTop.coe false
Instances For
@[inline]
Logical OR.
Equations
- Circuit.BelnapLevel.or (some (some true)) b = WithBotTop.coe true
- a.or (some (some true)) = WithBotTop.coe true
- Circuit.BelnapLevel.or (some (some false)) b = b
- a.or (some (some false)) = a
- Circuit.BelnapLevel.or none none = ⊥
- Circuit.BelnapLevel.or (some none) (some none) = ⊤
- a.or b = WithBotTop.coe true
Instances For
@[inline]
Logical NOT.
Equations
- Circuit.BelnapLevel.not (some (some b)) = WithBotTop.coe !b
- x✝.not = x✝