From e258c78a5ab9529242b4c8fa168eda85430e641e Mon Sep 17 00:00:00 2001 From: Greg Brown Date: Mon, 28 Oct 2024 15:34:16 +0000 Subject: Make everything relevant. Too few proofs were relevant. Now they are. --- src/Data/These/Decidable.idr | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 src/Data/These/Decidable.idr (limited to 'src/Data/These/Decidable.idr') diff --git a/src/Data/These/Decidable.idr b/src/Data/These/Decidable.idr deleted file mode 100644 index c044ca4..0000000 --- a/src/Data/These/Decidable.idr +++ /dev/null @@ -1,16 +0,0 @@ -module Data.These.Decidable - -import Data.Bool.Decidable -import Data.These - -export -viaEquivalence : a <=> b -> a `Reflects` x -> b `Reflects` x -viaEquivalence eq (RTrue x) = RTrue (eq.leftToRight x) -viaEquivalence eq (RFalse f) = RFalse (f . eq.rightToLeft) - -export -reflectThese : a `Reflects` x -> b `Reflects` y -> These a b `Reflects` x || y -reflectThese (RTrue x) (RTrue y) = RTrue (Both x y) -reflectThese (RTrue x) (RFalse ny) = RTrue (This x) -reflectThese (RFalse nx) (RTrue y) = RTrue (That y) -reflectThese (RFalse nx) (RFalse ny) = RFalse (these nx ny $ const ny) -- cgit v1.2.3