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

Install/export module with inspect definition and notation like eqn #613

Open
palmskog opened this issue Jul 11, 2024 · 0 comments
Open

Comments

@palmskog
Copy link
Contributor

palmskog commented Jul 11, 2024

The inspect pattern relies on the following definition and notation:

Definition inspect {A} (a : A) : {b | a = b} :=
  exist _ a eq_refl.

Notation "x 'eqn:' p" := (exist _ x p) (only parsing, at level 20).

While inspect is available in the module Prop.Logic, it is not imported by From Equations Require Import Equations, and there is no installed module with the eqn notation or anything like it installed by the coq-equations package. This means that practically everyone who wants to use the inspect pattern effectively has to bundle (copy paste) a version of this definition and notation in their project.

A better solution would be to provide this definition and notation in some installed module that is exported by default. Reasonably, the notation should be inside a scope to avoid clashes with similar notations. For example, eqn clashes with destruct x eqn:H.

@palmskog palmskog changed the title Install module with inspect definition and eqn notation Install/export module with inspect definition and notation like eqn Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant