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

Bad typing for range values #3238

Closed
mtzguido opened this issue Apr 10, 2024 · 0 comments · Fixed by #3239
Closed

Bad typing for range values #3238

mtzguido opened this issue Apr 10, 2024 · 0 comments · Fixed by #3239

Comments

@mtzguido
Copy link
Member

open FStar.Range

assume val p : range -> prop

assume val lem : r:range -> Lemma (p r)

let test () : range =
  let r = normalize_term (mk_range "asd" 1 2 3 4) in
  Classical.forall_intro lem;
  assert (p r);
  r

This fails to prove the property since the encoded range value is just a Range_const 0 without any useful axiom for its typing. We seem to add an axiom for the typing of range constants, but it's broken as it is specialized to a particular one:

;;;;;;;;;;;;;;;;Range_const typing
;;; Fact-ids: Name FStar.Range.range; Namespace FStar.Range
(assert (! (HasTypeZ (Range_const 1)
FStar.Range.range)
:named typing_range_const))
mtzguido added a commit to mtzguido/FStar that referenced this issue Apr 10, 2024
@mtzguido mtzguido mentioned this issue Apr 10, 2024
mtzguido added a commit that referenced this issue Apr 11, 2024
mtzguido added a commit to mtzguido/FStar that referenced this issue Apr 12, 2024
mtzguido added a commit to mtzguido/FStar that referenced this issue Apr 12, 2024
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

Successfully merging a pull request may close this issue.

1 participant