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

Ltac2's exact is less powerful than Ltac1's exact #12827

Closed
JasonGross opened this issue Aug 12, 2020 · 5 comments · Fixed by #18157
Closed

Ltac2's exact is less powerful than Ltac1's exact #12827

JasonGross opened this issue Aug 12, 2020 · 5 comments · Fixed by #18157
Labels
part: ltac2 Issues and PRs related to the (in development) Ltac2 tactic langauge.
Projects
Milestone

Comments

@JasonGross
Copy link
Member

Description of the problem

Existing Class True.
Existing Instance I.
Goal True. exact _. Qed.
Require Import Ltac2.Ltac2.
Require Import Ltac2.Notations.
Goal True. exact _. (* Error: Cannot infer this placeholder of type "True" (no type class instance
found).
*)

Perhaps exact needs to take preterm or whatever the Ltac2-equivalent of uconstr is and typecheck it with respect to the goal?

cc @ppedrot, is this solvable as Ltac2 currently stands, or do we need new primitives / types?

Coq Version

8.11

@JasonGross JasonGross added the part: ltac2 Issues and PRs related to the (in development) Ltac2 tactic langauge. label Aug 12, 2020
@Janno
Copy link
Contributor

Janno commented Aug 14, 2020

lazy_match! goal with [ |- ?g ] => let evar := open_constr:(_ : $g) in exact $evar end should work.

@Janno
Copy link
Contributor

Janno commented Aug 14, 2020

Oh, I realize the example is maybe a tad too minimal: you are looking for a way to allow arbitrary _ in the term?

@JasonGross
Copy link
Member Author

Yes, and to write a tactic / tactic notation that has this behavior.

@ppedrot
Copy link
Member

ppedrot commented Apr 23, 2021

Indeed, exact should probably take a preterm. We don't have a lot of API for those yet, so before making these changes it might be better to implement the former.

@ppedrot
Copy link
Member

ppedrot commented Feb 16, 2022

Note that since then, the OCaml exact tactic was modified to take a glob_constr indeed. It's mostly a matter of exposing that to the Ltac2 world.

@Alizter Alizter added this to Regular priority in Ltac2 May 18, 2022
SkySkimmer added a commit to SkySkimmer/coq that referenced this issue Oct 13, 2023
Fix coq#12827

The implementation uses a generalization of Constr.pretype which takes
flags (an opaque type) and a typing constraint.

Changing `refine` is left to the future as the notation takes a tactic
thunk at constr type so would be backwards incompatible.
SkySkimmer added a commit to SkySkimmer/coq that referenced this issue Oct 30, 2023
Fix coq#12827

The implementation uses a generalization of Constr.pretype which takes
flags (an opaque type) and a typing constraint.

Changing `refine` is left to the future as the notation takes a tactic
thunk at constr type so would be backwards incompatible.
SkySkimmer added a commit to SkySkimmer/coq that referenced this issue Nov 3, 2023
Fix coq#12827

The implementation uses a generalization of Constr.pretype which takes
flags (an opaque type) and a typing constraint.

Changing `refine` is left to the future as the notation takes a tactic
thunk at constr type so would be backwards incompatible.
SkySkimmer added a commit to SkySkimmer/coq that referenced this issue Nov 9, 2023
Fix coq#12827

The implementation uses a generalization of Constr.pretype which takes
flags (an opaque type) and a typing constraint.

Changing `refine` is left to the future as the notation takes a tactic
thunk at constr type so would be backwards incompatible.
SkySkimmer added a commit to SkySkimmer/coq that referenced this issue Nov 13, 2023
Fix coq#12827

The implementation uses a generalization of Constr.pretype which takes
flags (an opaque type) and a typing constraint.

Changing `refine` is left to the future as the notation takes a tactic
thunk at constr type so would be backwards incompatible.
Ltac2 automation moved this from Regular priority to Done Nov 18, 2023
@coqbot-app coqbot-app bot added this to the 8.19+rc1 milestone Nov 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
part: ltac2 Issues and PRs related to the (in development) Ltac2 tactic langauge.
Projects
Ltac2
  
Done
Development

Successfully merging a pull request may close this issue.

3 participants