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

Int63 numbers are not captured by patterns in proofs #12770

Closed
mgbedmar opened this issue Jul 29, 2020 · 2 comments · Fixed by #14660
Closed

Int63 numbers are not captured by patterns in proofs #12770

mgbedmar opened this issue Jul 29, 2020 · 2 comments · Fixed by #14660
Assignees
Labels
good first issue Beginners welcome to submit a pull request. part: ssreflect The SSReflect proof language.
Milestone

Comments

@mgbedmar
Copy link

Description of the problem

Trying to capture an Int63 number X in a proof using a pattern fails with Error: term X does not match any subterm in the goal.

Example:

Require Import Int63 ssreflect ssrfun ssrbool.

Lemma test : 43%int63 = (42 + 1)%int63.
Proof. set X := 43%int63. (* does not capture int63 *)

Coq Version

Coq 8.11.2

@ppedrot
Copy link
Member

ppedrot commented Jul 29, 2020

set uses the legacy unification engine, so it's probably been forgotten to add the relevant parts in there.

@gares gares added the part: ssreflect The SSReflect proof language. label Jul 31, 2020
@gares
Copy link
Member

gares commented Jul 31, 2020

This is about the set of SSR, which uses ssrmatching that has never been ported to the new term constructors.
I guess it is sufficient to fix this:

let isRigid c = match kind c with
| Prod _ | Sort _ | Lambda _ | Case _ | Fix _ | CoFix _ -> true
| _ -> false

and return true also on native int/float/arrays

@gares gares added the good first issue Beginners welcome to submit a pull request. label Jul 31, 2020
@maximedenes maximedenes self-assigned this Aug 20, 2020
@coqbot-app coqbot-app bot added this to the 8.15+rc1 milestone Jul 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Beginners welcome to submit a pull request. part: ssreflect The SSReflect proof language.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants