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

View file

@ -1056,7 +1056,34 @@ to the list
[ ⟨ "z" , ` ⟩ , ⟨ "s" , ` ⇒ ` ⟩ ] [ ⟨ "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 ### Lookup judgment