Created
October 15, 2017 08:31
-
-
Save nachivpn/77d27b90519d59368247877e982974d6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
¬[_] : ∀ {a b : Name} → Dec (a ≡ b) → Set | |
¬[ (yes x₁) ] = ⊥ | |
¬[ (no x₁) ] = ⊤ | |
data _,_∈x_ (n : Name) (p : Pointer) : Env → Set where | |
zero : ∀ {xs} → n , p ∈x ((n , p) ∷ xs) | |
suc : ∀ {n' : Name} { p' : Pointer} {xs} {pr : ¬[ n == n' ]} | |
→ n , p ∈x xs → n , p ∈x ((n' , p') ∷ xs) | |
private | |
env : Env | |
env = (y , 5) ∷ (x , 1) ∷ (z , 0) ∷(x , 0 ) ∷ [] | |
p₁' : x , 1 ∈x env | |
p₁' = suc zero | |
-- type checker complains! :D | |
-- p₂' : x , 0 ∈x env | |
-- p₂' = suc (suc (suc zero)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment