First commit, a functional proof completeness of kripke structure for propositional logic
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
module test2 where
|
||||
|
||||
open import Data.Nat using (ℕ)
|
||||
open import Data.Vec using (Vec; _∷_)
|
||||
open import Data.Fin using (Fin; zero; suc)
|
||||
|
||||
variable
|
||||
A : Set
|
||||
n : ℕ
|
||||
|
||||
lookup : Vec A n → Fin n → A
|
||||
lookup (a ∷ as) zero = a
|
||||
lookup (a ∷ as) (suc i) = lookup as i
|
||||
@@ -0,0 +1,16 @@
|
||||
module test3 where
|
||||
|
||||
open import Data.Nat using (ℕ; _+_)
|
||||
open import Relation.Binary.PropositionalEquality using (_≡_)
|
||||
|
||||
+-assoc : Set
|
||||
+-assoc = ∀ (x y z : ℕ) → x + (y + z) ≡ (x + y) + z
|
||||
|
||||
open import Data.Nat using (zero; suc)
|
||||
open import Relation.Binary.PropositionalEquality using (refl; cong)
|
||||
|
||||
+-assoc-proof : +-assoc
|
||||
|
||||
+-assoc-proof zero y z = refl
|
||||
+-assoc-proof (suc x') y z = cong suc (+-assoc-proof x' y z)
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
data Greeting : Set where
|
||||
hello : Greeting
|
||||
|
||||
greet : Greeting
|
||||
greet = hello
|
||||
|
||||
module hello-world-dep where
|
||||
|
||||
open import Data.Nat using (ℕ; zero; suc)
|
||||
|
||||
data Vec (A : Set) : ℕ → Set where
|
||||
[] : Vec A zero
|
||||
_∷_ : ∀ {n} (x : A) (xs : Vec A n) → Vec A (suc n)
|
||||
|
||||
infixr 5 _∷_
|
||||
|
||||
|
||||
Reference in New Issue
Block a user