2024-06-06 14:21:04 +00:00
|
|
|
|
module Ahmed.Day1 where
|
2024-06-04 14:31:23 +00:00
|
|
|
|
|
2024-06-06 14:21:04 +00:00
|
|
|
|
open import Data.Empty
|
|
|
|
|
open import Data.Unit
|
|
|
|
|
open import Relation.Nullary using (Dec; yes; no)
|
2024-06-04 14:31:23 +00:00
|
|
|
|
|
2024-06-06 14:21:04 +00:00
|
|
|
|
data type : Set where
|
|
|
|
|
bool : type
|
|
|
|
|
_-→_ : type -> type -> type
|
2024-06-04 14:31:23 +00:00
|
|
|
|
|
2024-06-06 14:21:04 +00:00
|
|
|
|
data term : Set where
|
|
|
|
|
true : term
|
2024-06-04 14:31:23 +00:00
|
|
|
|
|
2024-06-06 14:21:04 +00:00
|
|
|
|
data ctx : Set where
|
|
|
|
|
nil : ctx
|
|
|
|
|
cons : ctx -> type -> ctx
|
2024-06-04 14:31:23 +00:00
|
|
|
|
|
2024-06-06 14:21:04 +00:00
|
|
|
|
data substitution : Set where
|
|
|
|
|
nil : substitution
|
|
|
|
|
cons : substitution -> term -> substitution
|
2024-06-04 14:31:23 +00:00
|
|
|
|
|
2024-06-06 14:21:04 +00:00
|
|
|
|
isGoodSubstitution : (Γ : ctx) -> (γ : substitution) -> Set
|
|
|
|
|
isGoodSubstitution nil nil = ⊤
|
|
|
|
|
isGoodSubstitution nil (cons γ x) = ⊥
|
|
|
|
|
isGoodSubstitution (cons Γ x) nil = ⊥
|
|
|
|
|
isGoodSubstitution (cons Γ x) (cons γ x₁) = {! !}
|