coq: add another typing example
This commit is contained in:
parent
ad107759bf
commit
4323e7d09f
1 changed files with 19 additions and 0 deletions
19
coq/typing.v
19
coq/typing.v
|
@ -190,4 +190,23 @@ Proof.
|
|||
apply TSubst_VarReplace.
|
||||
Qed.
|
||||
|
||||
|
||||
Example typing4 : (is_well_typed
|
||||
[[ Λ"T" ↦ Λ"U" ↦ λ"x" %"T"% ↦ λ"y" %"U"% ↦ %"x"% ]]
|
||||
).
|
||||
Proof.
|
||||
unfold is_well_typed.
|
||||
exists (ctx_assign "x" [%"T"%]
|
||||
(ctx_assign "y" [%"U"%] ctx_empty)).
|
||||
exists [ ∀"T",∀"U",%"T"%->%"U"%->%"T"% ].
|
||||
apply T_CompatTypeAbs.
|
||||
apply T_CompatTypeAbs.
|
||||
apply T_CompatAbs.
|
||||
apply C_take.
|
||||
apply T_CompatAbs.
|
||||
apply C_shuffle. apply C_take.
|
||||
apply T_CompatVar.
|
||||
apply C_take.
|
||||
Qed.
|
||||
|
||||
End Typing.
|
||||
|
|
Loading…
Reference in a new issue