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

add tactic set #1101

Merged
merged 18 commits into from
Nov 10, 2024
Merged

add tactic set #1101

merged 18 commits into from
Nov 10, 2024

Conversation

fblanqui
Copy link
Member

@fblanqui fblanqui commented Apr 27, 2024

TODO:

  • print definitions in lsp clients
  • replace t by x in the current goal when doing set x := t
  • extend tactic simplify to defined variables
  • keep syntax set x := t ? (this makes "set" a keyword)
  • define Pure.goal as type goal = (string * string * string option) list * conclusion ?

@fblanqui
Copy link
Member Author

Hi @nicomarg @NotBad4U Could you please check your files with this PR to make sure that it doesn't break anything?

@NotBad4U
Copy link
Member

NotBad4U commented Apr 29, 2024

I am not sure that the PR works correctly.
For example, if you change this Lemma in tests/OK/rewrite2.lp, it is impossible to unfold the definition of neither p or q.
Also, the reflexivity failed where normally the conversion rule should allow to prove this equality.

symbol test2' a b : π (f (a + b) (λ _, 0) = f (b + a) (λ _, 0))
≔ begin
  assume a b;
  simplify;
  set p ≔ (a + b);
  set g ≔ (a + b + 0 + 0);
  type p;
  have foo: π (p = g) {
    try simplify p;
    try simplify q;
    reflexivity;
  };
  rewrite add_com;
  reflexivity
end;

@fblanqui
Copy link
Member Author

@NotBad4U @nicomarg I have fixed a number of things. Could you please check if it works with your own developments?

@NotBad4U
Copy link
Member

I did some tests and it sounds to work well. I think we can merge the PR.
I think we will need to add a tactic similar to unfold/fold, rewrite -[term1]/term2 from SSreflect or change term1 with term2 of Coq.

@fblanqui fblanqui merged commit bd45582 into Deducteam:master Nov 10, 2024
11 checks passed
@fblanqui fblanqui deleted the set branch November 10, 2024 16:40
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

Successfully merging this pull request may close these issues.

2 participants