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

[Merged by Bors] - feat: tfae tactics #2062

Closed
wants to merge 23 commits into from
Closed

[Merged by Bors] - feat: tfae tactics #2062

wants to merge 23 commits into from

Conversation

thorimur
Copy link
Collaborator

@thorimur thorimur commented Feb 4, 2023

We implement a basic version of #2061 to attain mathlib parity:

  • tfae_have followed by e.g. a tactic block, in parallel to mathlib have syntax (note: tfae_have 1 → 2 := ... is not supported yet, as it was not supported by the original tfae_have tactic, and would constitute new syntax)
example : TFAE [P, Q, R] := by
  tfae_have h : 1 → 2
  { /- proof of P → Q -/ }
  tfae_have 2 → 3
  { /- proof of Q → R -/ }
  ...
  • tfae_finish, which looks through the local context and simply tries to prove each implication in a cycle via solve_by_elim

Open in Gitpod

@thorimur thorimur added WIP Work in progress t-meta Tactics, attributes or user commands labels Feb 4, 2023
@thorimur thorimur linked an issue Feb 4, 2023 that may be closed by this pull request
3 tasks
@thorimur thorimur added awaiting-review The author would like community review of the PR and removed WIP Work in progress labels Feb 5, 2023
@thorimur thorimur mentioned this pull request Feb 5, 2023
3 tasks
@thorimur thorimur removed a link to an issue Feb 5, 2023
3 tasks
failure
catch _ =>
throwError "couldn't prove {P} → {P'}"
instantiateMVars t
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to make sure that this instantiateMVars is in a good place, and check that it isn't needed further downstream.

Mathlib/Tactic/TFAE.lean Show resolved Hide resolved
@semorrison semorrison added the merge-conflict The PR has a merge conflict with master, and needs manual merging. label Feb 13, 2023
@semorrison semorrison removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. label Feb 15, 2023
@semorrison semorrison added the merge-conflict The PR has a merge conflict with master, and needs manual merging. label Feb 19, 2023
@semorrison semorrison removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. label Feb 20, 2023
@jcommelin
Copy link
Member

@thorimur As far as I can tell, this is looking pretty good and stable. If you agree, let's just merge this. If there are small bugs, we can fix them later.

bors d+

@bors
Copy link

bors bot commented Feb 21, 2023

✌️ thorimur can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@github-actions github-actions bot added delegated and removed awaiting-review The author would like community review of the PR labels Feb 21, 2023
@thorimur
Copy link
Collaborator Author

bors r+

bors bot pushed a commit that referenced this pull request Feb 21, 2023
We implement a basic version of #2061 to attain mathlib parity:
* `tfae_have` followed by e.g. a tactic block, in parallel to mathlib `have` syntax (note: `tfae_have 1 → 2 := ...` is not supported yet, as it was not supported by the original `tfae_have` tactic, and would constitute new syntax)
```
example : TFAE [P, Q, R] := by
  tfae_have h : 1 → 2
  { /- proof of P → Q -/ }
  tfae_have 2 → 3
  { /- proof of Q → R -/ }
  ...
```
* `tfae_finish`, which looks through the local context and simply tries to prove each implication in a cycle via `solve_by_elim`
@bors
Copy link

bors bot commented Feb 21, 2023

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat: tfae tactics [Merged by Bors] - feat: tfae tactics Feb 21, 2023
@bors bors bot closed this Feb 21, 2023
@bors bors bot deleted the tfae branch February 21, 2023 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delegated t-meta Tactics, attributes or user commands
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants