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

feat: activate new tactic configuration syntax for most tactics #5898

Merged
merged 6 commits into from
Nov 1, 2024

Conversation

kmill
Copy link
Collaborator

@kmill kmill commented Oct 31, 2024

PR #5883 added a new syntax for tactic configuration, and this PR enables it in most tactics. Example: simp +contextual.

There will be followup PRs to modify the remaining ones.

Breaking change: Tactics that are macros for simp or other core tactics need to adapt. The easiest way is to replace (config)? with optConfig and then in the syntax quotations replace $[$cfg]? by $cfg:optConfig. For tactics that manipulate the configuration, see erw for an example:

macro "erw" c:optConfig s:rwRuleSeq loc:(location)? : tactic => do
  `(tactic| rw $[$(getConfigItems c)]* (transparency := .default) $s:rwRuleSeq $(loc)?)

Configuration options are processed left-to-right, so this forces the transparency to always be .default.

There will be followup PRs to modify the remaining ones.
@kmill kmill requested review from digama0 and kim-em as code owners October 31, 2024 09:02
@github-actions github-actions bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Oct 31, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Oct 31, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Oct 31, 2024
@leanprover-community-bot leanprover-community-bot added the breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan label Oct 31, 2024
@leanprover-community-bot
Copy link
Collaborator

leanprover-community-bot commented Oct 31, 2024

Mathlib CI status (docs):

leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Oct 31, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Oct 31, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Oct 31, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Oct 31, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Nov 1, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Nov 1, 2024
src/Init/Conv.lean Outdated Show resolved Hide resolved
src/Init/Meta.lean Outdated Show resolved Hide resolved
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Nov 1, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Nov 1, 2024
@leanprover-community-bot leanprover-community-bot added builds-mathlib CI has verified that Mathlib builds against this PR and removed breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan labels Nov 1, 2024
@kmill kmill added this pull request to the merge queue Nov 1, 2024
Merged via the queue into leanprover:master with commit 3b80d1e Nov 1, 2024
18 checks passed
kmill added a commit to kmill/lean4 that referenced this pull request Nov 3, 2024
…w tactic syntax

Following up leanprover#5928, updates the syntax for `omega` and `solve_by_elim` and restores the syntax quotations in their implementations.

Following up leanprover#5898, uses the new tactic syntax in the library, replacing all uses of `(config := ...)`.
github-merge-queue bot pushed a commit that referenced this pull request Nov 3, 2024
…w tactic syntax (#5932)

Following up #5928, updates the syntax for `omega` and `solve_by_elim`
and restores the syntax quotations in their implementations.

Following up #5898, uses the new tactic syntax in the library, replacing
all uses of `(config := ...)`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builds-mathlib CI has verified that Mathlib builds against this PR toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants