predicate logic
This commit is contained in:
parent
eb965050f3
commit
c3b4eb3d24
5 changed files with 253 additions and 0 deletions
20
lib/Logic/Predicate/Illegal.hs
Normal file
20
lib/Logic/Predicate/Illegal.hs
Normal file
|
@ -0,0 +1,20 @@
|
|||
module Logic.Predicate.Illegal where
|
||||
|
||||
-- some illegal states are representable
|
||||
-- e.g. a function with arity 2 having 3 arguments
|
||||
|
||||
data Formula
|
||||
= Not Formula
|
||||
| Or Formula Formula
|
||||
| And Formula Formula
|
||||
| Implies Formula Formula
|
||||
| Iff Formula Formula
|
||||
| Forall String Formula
|
||||
| Exists String Formula
|
||||
| Predicate String [Term]
|
||||
deriving Show
|
||||
|
||||
data Term
|
||||
= Variable String
|
||||
| Function String [Term]
|
||||
deriving Show
|
Loading…
Add table
Add a link
Reference in a new issue