rocq-prover / rocq-prover/stdlib

Primitive projections should be on by default

Open
#52 3 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rocq Prover
Stars
42
Forks
38
Avg merge
14h 6m
Merged PRs (30d)
3

Description

Version

8.8+alpha

Description of the problem

I would like to see primitive projections + eta on by default in the standard library, especially for types like and, prod, sig, sigT, sigT2, sig2, etc. Not only should this make things faster, there are also a number of useful things to be gained by having judgmental eta. (See, for example, this stack overflow comment and associated discussion.)

I think there will be two stages to this: the first is to turn the standard library constructions from Inductive into Record; this will break anyone relying on autogenerated names from destructing such pairs, but I think this is a cost worth paying, and one that is not unreasonable, given that we are tracking so many contributions in the CI.

The second stage will be to turn on primitive projections and eta. This will break developments relying on a particular unfolding order of canonical structures for these types. I think this may require more discussion. I think the most compatibility preserving option here is to add a way to disable judgmental eta in unification problems (but not conversion problems) for particular inductives, or a way to delay using eta for those records during unification. (cc @mattam82 @ggonthier @beta-ziliani )

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the standard-library definitions for and, prod, sig, sigT, sigT2, and sig2, then review how they are currently declared. The issue describes converting these constructions to records and later enabling primitive projections and eta; done requires resolving the stated compatibility concerns and implementing both stages.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.