Skip to content

Instantly share code, notes, and snippets.

@JoeyEremondi
Created February 7, 2018 00:10
Show Gist options
  • Save JoeyEremondi/072aef0d2e667d0d5db04238cb4b7417 to your computer and use it in GitHub Desktop.
Save JoeyEremondi/072aef0d2e667d0d5db04238cb4b7417 to your computer and use it in GitHub Desktop.
% !Ott args = "-coq_expand_list_types=false -o minirust.tex -o minirust.v"
metavar typvar, X ::=
{{ coq nat }} {{ coq-equality }}
indexvar n ::= {{ coq nat }}
grammar
Kind, K :: kind_ ::= {{ coq-equality }}
| KindStar :: :: KindStar
typexpr, T :: T_ ::= {{ coq-equality }}
| X :: :: var
| ForAll << X1 , .. , Xn >> . T :: :: polyarrow
| [ X1 |-> tau1 .. Xn |-> taun ] T :: M :: tsub {{ coq (tsubst_typexpr [[X1 |-> tau1 .. Xn |-> taun]] [[T]]) }}
tau :: tau_ ::=
| X :: :: var
grammar
formula :: 'formula_' ::=
| judgement :: :: judgement
| formula1 .. formulan :: :: dots
subrules
tau <:: T
substitutions
multiple typexpr X :: tsubst
defns
Jtype :: '' ::=
defn
|- T : K :: :: kind :: Kind by
------------------------------------ :: Var
|- T : KindStar
defn
|- T <: T' :: :: sub :: Sub by
</ |- taun : KindStar // n />
------------------------------------------ :: InstL
|- ForAll << </ Xn // n /> >> . T <: [ </ Xn |-> taun // n /> ] T
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment