Move Bool to live on its own (#118)

This commit is contained in:
Patrick Stevens
2020-04-18 17:14:39 +01:00
committed by GitHub
parent 264a5e2bd9
commit 84a146f72c
30 changed files with 270 additions and 123 deletions

16
Decidable/Reduction.agda Normal file
View File

@@ -0,0 +1,16 @@
{-# OPTIONS --safe --warning=error --without-K #-}
open import LogicalFormulae
open import Decidable.Relations
open import Boolean.Definition
module Decidable.Reduction where
squash : {a b : _} {A : Set a} {f : A Set b} DecidableRelation f A Bool
squash rel a with rel a
... | inl x = BoolTrue
... | inr x = BoolFalse
unsquash : {a b : _} {A : Set a} {f : A Set b} (rel : DecidableRelation f) {x : A} .(squash rel x BoolTrue) f x
unsquash rel {x} pr with rel x
... | inl ans = ans