-
Notifications
You must be signed in to change notification settings - Fork 632
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
Fix support of Program-style pattern-matching for multiple arguments in inductive families #18929
Fix support of Program-style pattern-matching for multiple arguments in inductive families #18929
Conversation
🔴 CI failure at commit 356f99e without any failure in the test-suite ✔️ Corresponding job for the base commit 9ee4af8 succeeded ❔ Ask me to try to extract a minimal test case that can be added to the test-suite 🏃
|
356f99e
to
595f14b
Compare
595f14b
to
fb683f9
Compare
This was missing when pattern-matching on multiple terms with a dependent type not in 1st position.
Indeed, we have the invariant "nargeqs + slift = nar". But the next bugfix commit will change nargeqs so that the invariant becomes "neqs + nargeqs + nar".
…ith inductive families. This allows the attached test to compile.
…lities. We foresee a possible use of JMeq for heterogenous disequality, but without activating it.
…args of a term to match be evars. At this stage, the example from issue coq#1956 works.
fb683f9
to
55117d8
Compare
@coqbot run full ci |
I believe this to be ready. |
Looking for an assignee (it is mostly completing/fixing code which was not yet working; for the details, it might help to look at commits separetedly). |
@coqbot merge now |
17 years after the first version of
Program
, this PR debugs the (anticipated) support for multiple patterns involving inductive families. By fixing several de Bruijn indexes bugs, by detecting heteregeneous disequalities, and by addressing a few other typing bugs, it allows for instance to support, without returning strange typing errors, basic examples such as:In particular, it morally fixes #5777 (up to heterogeneous equality discrimination issues still not addressed).
Also fixes #1956.
[More generally, I feel that there is a nice architecture to build by combining
Program
, Equations, small inversion, which all provide crucial advanced reasoning bricks about inductive types. All of the following are somehow independent parameters that should be freely combinable: Goguen-McBride-McKinna, or Cockx, or small inversion emulation of dependent pattern-matching; adding or not equations and inequations to the typing context; failing or opening obligations or goals on existential variables.]Depends on #18921 (merged)