Created
May 1, 2019 11:25
-
-
Save morteako/12611f1aaf02f81ec6477e56c0c2ac18 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE RebindableSyntax #-} | |
import Prelude hiding ( (>>=),(>>) ) | |
import qualified Prelude as P | |
import Liquid.Haskell.ProofCombinators | |
{-@ (>>) :: x:a -> y:{a | y == x} -> {v:a | v == x && v == y} @-} | |
(>>) x y = x === y | |
{-@ reflect nott @-} | |
nott True = False | |
nott False = True | |
{-@ testProofDo :: x:Bool -> { nott (nott x) = x } @-} | |
testProofDo True = toProof $ do | |
nott (nott True) | |
nott False | |
True | |
testProofDo False = toProof $ do | |
nott (nott False) | |
nott True | |
False | |
{-@ testProofNormal :: x:Bool -> { nott (nott x) = x } @-} | |
testProofNormal True | |
= nott (nott True) | |
=== nott False | |
=== True | |
*** QED | |
testProofNormal False | |
= nott (nott True) | |
=== nott False | |
=== True | |
*** QED | |
main = do | |
print 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment