Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsound STLC axiom #46

Open
Pat-Lafon opened this issue Oct 22, 2024 · 0 comments
Open

Unsound STLC axiom #46

Pat-Lafon opened this issue Oct 22, 2024 · 0 comments

Comments

@Pat-Lafon
Copy link
Contributor

The following axiom

let[@axiom] stlc_abd_typing_rev (gamma : stlc_tyctx) (v : stlc_term)
(tau : stlc_ty) (ty : stlc_ty) (body : stlc_term) (body_ty : stlc_ty)
(gamma1 : stlc_tyctx) =
(typing gamma v tau && stlc_abs_ty v ty && stlc_abs_body v body
&& stlc_tyctx_hd gamma1 ty && stlc_tyctx_tl gamma1 gamma)
#==> (typing gamma1 body body_ty)

Does not have any constraints on what body_ty can be and is unsound.

I would propose the following axiom instead, which I've checked against my coq definition.

let[@axiom] stlc_abd_typing_rev (gamma : stlc_tyctx) (v : stlc_term)
    (tau : stlc_ty) (ty : stlc_ty) (body : stlc_term) (body_ty : stlc_ty)
    (gamma1 : stlc_tyctx) =
  (typing gamma v tau && stlc_abs_ty v ty && stlc_abs_body v body
 && stlc_ty_arr1 tau ty && stlc_ty_arr2 tau body_ty && stlc_tyctx_hd gamma1 ty
 && stlc_tyctx_tl gamma1 gamma)
  #==> (typing gamma1 body body_ty)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant