sbv-13.1: SMT Based Verification: Symbolic Haskell theorem prover using SMT solving.
Copyright(c) Levent Erkok
LicenseBSD3
Maintainererkokl@gmail.com
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Documentation.SBV.Examples.TP.Tao

Description

A question posed by Terrence Tao: https://mathstodon.xyz/@tao/110736805384878353. Essentially, for an arbitrary binary operation op, we prove that

   (x op x) op y == y op x

Implies op must be commutative.

Synopsis

Documentation

data T Source #

Create an uninterpreted type to do the proofs over.

Instances

Instances details
Arbitrary T Source # 
Instance details

Defined in Documentation.SBV.Examples.TP.Tao

Methods

arbitrary :: Gen T #

shrink :: T -> [T] #

SymVal T Source # 
Instance details

Defined in Documentation.SBV.Examples.TP.Tao

HasKind T Source # 
Instance details

Defined in Documentation.SBV.Examples.TP.Tao

cv2T :: String -> [CV] -> T Source #

Conversion from SMT values to T values.

_undefiner_T :: a Source #

Autogenerated definition to avoid unused-variable warnings from GHC.

type ST = SBV T Source #

Symbolic version of the type T.

tao :: SymVal a => (SBV a -> SBV a -> SBV a) -> IO (Proof SBool) Source #

Prove that:

   (x op x) op y == y op x
 

means that op is commutative.

We have:

>>> tao @T (uninterpret "op")
Lemma: tao                              Q.E.D.
[Proven] tao :: Bool