sbv-11.4: 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.KnuckleDragger.Tao

Description

Proves a problem originating in algebra: https://mathoverflow.net/questions/450890/is-there-an-identity-between-the-commutative-identity-and-the-constant-identity/

Apparently this was 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 that op must be commutative.

Synopsis

Documentation

data T Source #

Create an uninterpreted type to do the proofs over.

Instances

Instances details
Data T Source # 
Instance details

Defined in Documentation.SBV.Examples.KnuckleDragger.Tao

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> T -> c T #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c T #

toConstr :: T -> Constr #

dataTypeOf :: T -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c T) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c T) #

gmapT :: (forall b. Data b => b -> b) -> T -> T #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> T -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> T -> r #

gmapQ :: (forall d. Data d => d -> u) -> T -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> T -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> T -> m T #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> T -> m T #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> T -> m T #

Read T Source # 
Instance details

Defined in Documentation.SBV.Examples.KnuckleDragger.Tao

Show T Source # 
Instance details

Defined in Documentation.SBV.Examples.KnuckleDragger.Tao

Methods

showsPrec :: Int -> T -> ShowS #

show :: T -> String #

showList :: [T] -> ShowS #

SymVal T Source # 
Instance details

Defined in Documentation.SBV.Examples.KnuckleDragger.Tao

HasKind T Source # 
Instance details

Defined in Documentation.SBV.Examples.KnuckleDragger.Tao

SatModel T Source # 
Instance details

Defined in Documentation.SBV.Examples.KnuckleDragger.Tao

Methods

parseCVs :: [CV] -> Maybe (T, [CV]) Source #

cvtModel :: (T -> Maybe b) -> Maybe (T, [CV]) -> Maybe (b, [CV]) Source #

type ST = SBV T Source #

Symbolic version of the type T.

tao :: IO Proof Source #

Prove that:

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

means that op is commutative.

We have:

>>> tao
Lemma: tao                              Q.E.D.
[Proven] tao