fuck agda

This commit is contained in:
Michael Zhang 2021-10-13 00:12:38 -05:00
parent 367d61bdd5
commit d24d992786
Signed by: michael
GPG key ID: BDA47A31A3C8EE6B
2 changed files with 44 additions and 12 deletions

View file

@ -10,8 +10,14 @@ if !exists('g:agda#default_glyphs')
" Extra Shit
call extend(g:agda#default_glyphs, {
\ 'Gl-': 'ƛ',
\ '==': '≡',
\ '<': '⟨',
\ '>': '⟩',
\ 'em': '—',
\ '=>': '⇒',
\ '~-': '≃',
\ 'r': '→',
\ '0': '∅',
\})
" Combining marks
@ -365,16 +371,16 @@ if !exists('g:agda#default_glyphs')
" Subscripts
call extend(g:agda#default_glyphs, {
\ '0': '₀',
\ '1': '₁',
\ '2': '₂',
\ '3': '₃',
\ '4': '₄',
\ '5': '₅',
\ '6': '₆',
\ '7': '₇',
\ '8': '₈',
\ '9': '₉',
\ '_0': '₀',
\ '_1': '₁',
\ '_2': '₂',
\ '_3': '₃',
\ '_4': '₄',
\ '_5': '₅',
\ '_6': '₆',
\ '_7': '₇',
\ '_8': '₈',
\ '_9': '₉',
\ '_a': 'ₐ',
\ '_e': 'ₑ',
\ '_h': 'ₕ',
@ -451,7 +457,6 @@ if !exists('g:agda#default_glyphs')
\ 'pi': 'π',
\ 'p': 'π',
\ 'rho': 'ρ',
\ 'r': 'ρ',
\ 'sigma': 'σ',
\ 's': 'σ',
\ 'varsigma': 'ς',

View file

@ -1056,7 +1056,34 @@ to the list
[ ⟨ "z" , ` ⟩ , ⟨ "s" , ` ⇒ ` ⟩ ]
```
-- Your code goes here
open import plfa.part1.Isomorphism using (_≃_)
open import Data.Product using (_×_; _,_)
open import Relation.Binary.PropositionalEquality
open ≡-Reasoning renaming (begin_ to begin-≡_; _∎ to _∎-≡)
contextOfList : (l : List (Id × Type)) → Context
contextOfList [] = ∅
contextOfList ((id , type) ∷ l) = (contextOfList l) , id ⦂ type
listOfContext : (c : Context) → List (Id × Type)
listOfContext ∅ = []
listOfContext (c , x ⦂ x₁) = (x , x₁) ∷ listOfContext c
contextListIso : (c : Context) → contextOfList (listOfContext c) ≡ c
contextListIso ∅ = refl
contextListIso (c , x ⦂ x₁) = cong (_, x ⦂ x₁) (contextListIso c)
listContextIso : (l : List (Id × Type)) → listOfContext (contextOfList l) ≡ l
listContextIso [] = refl
listContextIso (x ∷ l) = cong (x ∷_) (listContextIso l)
Context≃List : Context ≃ List (Id × Type)
Context≃List = record
{ from = contextOfList
; to = listOfContext
; from∘to = contextListIso
; to∘from = ?
}
```
### Lookup judgment