rocq-prover / rocq-prover/stdlib

Importing PeanoNat.Nat shadows eq definition

Open
#242 3 comments 0 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

From Stdlib Require Import PeanoNat.
About eq. (* Corelib.Init.Logiq.eq *)
Import Nat.
About eq. (* Stdlib.Arith.PeanoNat *)

This prevents writing, e.g. eq_refl in a proof term (except for nat of course).

A possible (heavy but maybe beneficial in the long run) fix would be to change Numbers so that equality is Leibniz everywhere instead.
Or I learn to live with it and stop Importing Nat, but this is painful for a (somewhat basic) course.

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 reproducing the PeanoNat import example and compare the two reported results of About eq before and after Import Nat. Read the PeanoNat and Numbers modules to understand how the Nat equality definition is exposed. Done should mean an agreed resolution for the eq shadowing, with the behavior and any compatibility impact documented.

Written by the indexing model from the issue text.

Assessment

Domain
developer-experience
Issue type
Bug
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.