predicate logic

This commit is contained in:
hi 2025-08-29 12:53:28 +00:00
parent eb965050f3
commit bf846e32ce
5 changed files with 253 additions and 0 deletions

View 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