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

destruct on section variable picks an already-used name #14728

Open
samuelgruetter opened this issue Jul 30, 2021 · 0 comments
Open

destruct on section variable picks an already-used name #14728

samuelgruetter opened this issue Jul 30, 2021 · 0 comments
Labels
kind: bug An error, flaw, fault or unintended behaviour. part: ltac Issues and PRs related to the Ltac tactic language.

Comments

@samuelgruetter
Copy link
Contributor

Axiom Z: Type.
Inductive InstructionSet := RV32I | RV32IM.
Axiom bitwidth: InstructionSet -> Z.

Class bitwidth_iset(width: Z)(iset: InstructionSet): Prop :=
  bitwidth_matches: bitwidth iset = width.

Section FitsStack.
  Context {iset: InstructionSet} {width: Z} {myname: bitwidth_iset width iset}.

  Definition stack_usage_rec: unit. Admitted.

  Goal stack_usage_rec = tt -> False.
    intros. destruct iset.

fails with

Error: myname is already used.

Desired behavior: destruct should succeed, or if that's not possible because of how Section works, a more helpful error message, eg something like cannot destruct iset because it is used implicitly in stack_usage_rec, should be displayed.

Coq version: 8.13.2

@Alizter Alizter added kind: bug An error, flaw, fault or unintended behaviour. part: ltac Issues and PRs related to the Ltac tactic language. labels Aug 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug An error, flaw, fault or unintended behaviour. part: ltac Issues and PRs related to the Ltac tactic language.
Projects
None yet
Development

No branches or pull requests

2 participants