Debian Codegraph @

src/Algebra/Solver/IdempotentCommutativeMonoid/Example.agda

raw
1 ------------------------------------------------------------------------
2 -- The Agda standard library
3 --
4 -- An example of how Algebra.IdempotentCommutativeMonoidSolver can be
5 -- used
6 ------------------------------------------------------------------------
7
8 {-# OPTIONS --cubical-compatible --safe #-}
9
10 module Algebra.Solver.IdempotentCommutativeMonoid.Example where
11
12 import Algebra.Solver.IdempotentCommutativeMonoid as ICM-Solver
13
14 open import Data.Bool.Base using (_∨_)
15 open import Data.Bool.Properties using (∨-idempotentCommutativeMonoid)
16 open import Data.Fin.Base using (zero; suc)
17 open import Data.Vec.Base using ([]; _∷_)
18 open import Relation.Binary.PropositionalEquality.Core using (_≡_)
19
20 open ICM-Solver ∨-idempotentCommutativeMonoid
21
22 test : ∀ x y z → (x ∨ y) ∨ (x ∨ z) ≡ (z ∨ y) ∨ x
23 test a b c = let _∨_ = _⊕_ in
24 prove 3 ((x ∨ y) ∨ (x ∨ z)) ((z ∨ y) ∨ x) (a ∷ b ∷ c ∷ [])
25 where
26 x = var zero
27 y = var (suc zero)
28 z = var (suc (suc zero))