Started adding First order logic

This commit is contained in:
Mysaa 2023-06-01 14:43:12 +02:00
parent b11c60fc3d
commit 16917c0c44
Signed by: Mysaa
GPG Key ID: 7054D5D6A90F084F
2 changed files with 32 additions and 1 deletions

30
FirstOrderLogic.agda Normal file
View File

@ -0,0 +1,30 @@
{-# OPTIONS --prop #-}
open import Agda.Builtin.Nat
module FirstOrderLogic (TV : Set) (F : Nat Set) (R : Nat Set) where
open import PropUtil
open import ListUtil
mutual
data FArgs : Nat Set where
zero : FArgs 0
next : {n : Nat} FArgs n Term FArgs (suc n)
data Term : Set where
Var : TV Term
Fun : {n : Nat} F n FArgs n Term
data RArgs : Nat Set where
zero : RArgs 0
next : {n : Nat} RArgs n Term RArgs (suc n)
data Form : Set where
Rel : {n : Nat} R n (RArgs n) Form
_⇒_ : Form Form Form
_∧∧_ : Form Form Form
_∀∀_ : TV Form Form
infixr 10 _∧∧_
infixr 8 _⇒_

View File

@ -3,7 +3,7 @@
module ListUtil where module ListUtil where
open import Data.List using (List; _∷_; []) public open import Data.List using (List; _∷_; []) public
private private
variable variable
T : Set T : Set
@ -138,3 +138,4 @@ module ListUtil where
⊆→∈* : L L' L ∈* L' ⊆→∈* : L L' L ∈* L'
⊆→∈* h = ⊂⁺→∈* (⊂→⊂⁺ (⊆→⊂ h)) ⊆→∈* h = ⊂⁺→∈* (⊂→⊂⁺ (⊆→⊂ h))