coq: add another typing example

This commit is contained in:
Michael Sippel 2024-08-22 08:31:14 +02:00
parent ad107759bf
commit 4323e7d09f
Signed by: senvas
GPG key ID: F96CF119C34B64A6

View file

@ -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.