Repository navigation
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a rewrite from scratch of the
field_simptactic. The former implementation was a lightweight wrapper aroundsimp(with a custom simp-set and discharger).Broadly speaking, the new implementation reduces expressions to an internal normal form
x1 ^ k1 * ... * xn ^ kn, wherex1, ...xnare atoms tracked by theAtomMmonad andk1, ...knare integers.This is more robust: the tactic now solves goals which were not in scope for the simp-set version, often to the confusion of users. For example,
x ^ 2 / xis now reduced tox, andx / (x * y)is now reduced, given(hx : x ≠ 0), to1 / y.It's also faster: on a typical large example taken from Mathlib, the heartbeat count reduces from 19983 heartbeats to 2979 heartbeats.
There is a big diff: the old
field_simpsubsumedsimp, and this was often exploited. We offer a simproc version of the newfield_simp, and switching to asimpcall with this simproc fixes about 80% of the cases that break; the rest are handled individually (typically by alternatingsimpandfield_simpcalls).Developed at Big Proof at the Isaac Newton Institute.
Co-authored-by: Arend Mellendijk @fldutchmann
Co-authored-by: Michael Rothgang @grunweg
For ease of review, the PR is built from two commits: the tactic implementation itself (+1318, -265), and the fixes across the library (+511, -533).
A good way to get a sense of the changed implementation is to look at the diff in
MathlibTest.FieldSimp.Zulip announcement
Zulip PR reviews discussion