| 1 |
------------------------------------------------------------------------ |
| 2 |
-- The Agda standard library |
| 3 |
-- |
| 4 |
-- Automatic solvers for equations over booleans |
| 5 |
------------------------------------------------------------------------ |
| 6 |
|
| 7 |
-- See README.Data.Nat for examples of how to use similar solvers |
| 8 |
|
| 9 |
{-# OPTIONS --cubical-compatible --safe #-} |
| 10 |
|
| 11 |
module Data.Bool.Solver where |
| 12 |
|
| 13 |
import Algebra.Solver.Ring.Simple as Solver |
| 14 |
import Algebra.Solver.Ring.AlmostCommutativeRing as ACR |
| 15 |
open import Data.Bool.Properties |
| 16 |
using (_≟_; ∨-∧-commutativeSemiring; xor-∧-commutativeRing) |
| 17 |
|
| 18 |
------------------------------------------------------------------------ |
| 19 |
-- A module for automatically solving propositional equivalences |
| 20 |
-- containing _∨_ and _∧_ |
| 21 |
|
| 22 |
module ∨-∧-Solver = |
| 23 |
Solver (ACR.fromCommutativeSemiring ∨-∧-commutativeSemiring) _≟_ |
| 24 |
|
| 25 |
------------------------------------------------------------------------ |
| 26 |
-- A module for automatically solving propositional equivalences |
| 27 |
-- containing _xor_ and _∧_ |
| 28 |
|
| 29 |
module xor-∧-Solver = |
| 30 |
Solver (ACR.fromCommutativeRing xor-∧-commutativeRing) _≟_ |