liquid-prelude-0.8.10.2: General utility modules for LiquidHaskell
Safe HaskellNone
LanguageHaskell2010

Language.Haskell.Liquid.ProofCombinators

Synopsis

Proof is just a () alias

type Proof = () Source #

Proof is just a () alias -------------------------------------------------

Proof constructors

trivial :: Proof Source #

Proof Construction -------------------------------------------------------

trivial is proof by SMT

(***) :: a -> QED -> Proof infixl 3 Source #

proof casting | `x *** QED`: x is a proof certificate* strong enough for SMT to prove your theorem | `x *** Admit`: x is an unfinished proof

data QED Source #

Constructors

Admit 
QED 

Proof certificate constructors

(?) :: a -> b -> a infixl 3 Source #

? is basically Haskell's $ and is used for the right precedence | ? lets you "add" some fact into a proof term

These two operators check all intermediate equalities

(===) :: a -> a -> a infixl 3 Source #

  • Checked Proof Certificates ---------------------------------------------

Implicit equality

(=<=) :: a -> a -> a infixl 3 Source #

(=>=) :: a -> a -> a infixl 3 Source #

This operator does not check intermediate equalities

(==.) :: a -> a -> a infixl 3 Source #

Deprecated: Use (===) instead

To summarize:

  • (==!) is *only* for proof debugging - (===) does not require explicit proof term
  • (?) lets you insert "lemmas" as other Proof values
  • Unchecked Proof Certificates -------------------------------------------

The above operators check each intermediate proof step. The operator ==. below accepts an optional proof term argument, but does not check intermediate steps. TODO: What is it USEFUL FOR?

(==!) :: a -> a -> a infixl 3 Source #

Assumed equality `x ==! y ` returns the admitted proof certificate that result value is equals x and y

Combining Proofs

(&&&) :: Proof -> Proof -> Proof Source #

  • Combining Proof Certificates -------------------------------------------

withProof :: a -> b -> a Source #

impossible :: a -> b Source #