Skip to content

Conversation

@dhalilov
Copy link
Contributor

@dhalilov dhalilov commented Jun 26, 2025

Moves away from generated names f, f0, etc., and instead uses the constructor names for the hypotheses of the induction scheme.

  • Added / updated test-suite.
  • Added changelog.
  • Opened overlay pull requests.

Overlays:

@dhalilov dhalilov requested review from a team as code owners June 26, 2025 12:58
@coqbot-app coqbot-app bot added the needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI. label Jun 26, 2025
@ppedrot
Copy link
Member

ppedrot commented Jun 26, 2025

@coqbot run full ci

@coqbot-app coqbot-app bot removed the needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI. label Jun 26, 2025
@dhalilov dhalilov force-pushed the better-names-for-induction-principle-cases branch from fea4334 to 76dcadd Compare June 26, 2025 14:40
@coqbot-app coqbot-app bot added the needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI. label Jun 26, 2025
@ppedrot ppedrot self-assigned this Jun 26, 2025
@ppedrot
Copy link
Member

ppedrot commented Jun 26, 2025

@coqbot run full ci

@coqbot-app coqbot-app bot removed the needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI. label Jun 26, 2025
@ppedrot ppedrot added this to the 9.2+rc1 milestone Jun 26, 2025
@ppedrot ppedrot added kind: enhancement Enhancement to an existing user-facing feature, tactic, etc. needs: changelog entry This should be documented in doc/changelog. needs: overlay This is breaking external developments we track in CI. labels Jun 26, 2025
@ppedrot
Copy link
Member

ppedrot commented Jun 26, 2025

In addition to overlays, this will also need a changelog.

Copy link
Member

@ppedrot ppedrot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks desirable to me, both codewise and in terms of feature.

dhalilov added a commit to dhalilov/HoTT that referenced this pull request Jun 26, 2025
@coqbot-app coqbot-app bot added the needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI. label Jun 26, 2025
Comment on lines +16 to +18
(srefl : P a (srefl a)) (a0 : A) (s : seq a a0) =>
match s :> seq a a0 as s0 in (seq _ a1) return (P a1 s0) with
| srefl _ => f
| srefl _ => srefl

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expressions like this look confusing to me, with two of the srefls being constructors, and the other two being the argument (IIUC). It seems to me that this makes it harder for the reader to quickly see what is going on, especially if the expression appears further from the argument list. Is this really an improvement? What about calling the argument something like srefl' instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change was made partially with the intent of using those names to generate goal names (see #20809), and in that use case it would not make much sense to write [true']: instead of [true]: as a goal selector.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe true_case then?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd argue this is a printer issue, we should disambiguate the constructor names when there are bound variables that clash with it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #20824 for a fix that makes this readable.

dhalilov added a commit to dhalilov/HoTT that referenced this pull request Jun 26, 2025
dhalilov added a commit to dhalilov/stdlib that referenced this pull request Jun 27, 2025
@dhalilov dhalilov force-pushed the better-names-for-induction-principle-cases branch from 0327afd to 0cc933b Compare June 27, 2025 19:04
@dhalilov
Copy link
Contributor Author

@ppedrot this PR is ready for a full CI run

@ppedrot
Copy link
Member

ppedrot commented Jun 29, 2025

@coqbot run full ci

@coqbot-app coqbot-app bot removed the needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI. label Jun 29, 2025
@dhalilov
Copy link
Contributor Author

(CI failure looks unrelated, also fails on master)

@ppedrot ppedrot removed needs: overlay This is breaking external developments we track in CI. needs: changelog entry This should be documented in doc/changelog. labels Jul 1, 2025
@ppedrot
Copy link
Member

ppedrot commented Jul 2, 2025

This got a green light at the Rocq call, so I guess we can just @coqbot merge now

@coqbot-app coqbot-app bot merged commit c340e2c into rocq-prover:master Jul 2, 2025
8 of 10 checks passed
@coqbot-app
Copy link
Contributor

coqbot-app bot commented Jul 2, 2025

@ppedrot: Please take care of the following overlays:

  • 20813-dhalilov-better-names-for-induction-principle-cases.sh

ppedrot added a commit to rocq-prover/stdlib that referenced this pull request Jul 2, 2025
…ciple-cases

Adapt to rocq-prover/rocq#20813 (Update default hypothesis name in generated schemes)
SkySkimmer added a commit to SkySkimmer/rocq that referenced this pull request Jul 2, 2025
SkySkimmer added a commit to HoTT/Coq-HoTT that referenced this pull request Jul 2, 2025
…nciple-cases

Adapt to rocq-prover/rocq#20813 (Update default hypothesese names in generated schemes)
coqbot-app bot added a commit that referenced this pull request Jul 2, 2025
Tragicus pushed a commit to Tragicus/coq that referenced this pull request Sep 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind: enhancement Enhancement to an existing user-facing feature, tactic, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants