Conversation
Two independent breakages, both small.
1. Interval/Fixed.lean: Fixed.ofInt0_natCast
On current Mathlib, simp normalises both sides of the goal to the same term
but no longer closes it, leaving an X = X goal. Appending rfl closes it.
2. Interval/Interval/Preinterval.lean and Mul.lean: a real-valued argument
defeats erasure
Preinterval.mix' took a real-valued implicit argument whose only purpose was
to state the proposition in the next argument:
def mix' (x : Preinterval) {a : R} (m : approx x a) : Interval
A real is data, not a proof, so it is not erased. mix' is @[inline], and at
its sole definitional call site, Interval.mul, that argument instantiates to a
term containing Floating.val, which is noncomputable by design. Interval.mul
therefore failed to compile with 'depends on Floating.val, which is
noncomputable'.
Moving the real inside the proposition means nothing real crosses the
boundary:
def mix' (x : Preinterval) (m : exists a : R, approx x a) : Interval
mix' has exactly one non-lemma use, so this touches one definition, two lemma
signatures and one call site.
Tested: with these changes Interval.Interval.Mul, Interval.Interval.Exp and
Interval.Interval.Log all build against Mathlib v4.29.1 (rev 5e932f97).
Not addressed here: Interval.Interval.Pow still fails via
Interval/Interval/Division.lean, which has the same underlying problem in a
harder place. There the real is a type index (Around x.val inverse), computed
through Real.instInv, so this fix does not transfer. Repairing it needs a
decision about whether Around should carry its centre as an index, which is a
design question rather than a repair. See the accompanying issue.
The lean-toolchain pin is deliberately left untouched.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Fixes the build against Mathlib at Lean v4.29.1. Two independent breakages, both small. Reported in #30.
1.
Interval/Fixed.lean—Fixed.ofInt0_natCastOn current Mathlib,
simpnormalises both sides of the goal to the same term but no longer closes it, leaving a literalX = X. Appendingrflcloses it.2.
Preinterval.mix'— a real-valued argument defeats erasuremix'took a real-valued implicit argument whose only purpose was to state the proposition in the next argument:A real is data, not a proof, so it is not erased.
mix'is@[inline], and at its sole definitional call site —Interval.mul— that argument instantiates to a term containingFloating.val, which isnoncomputableby design.Interval.multherefore failed with "depends onFloating.val, which isnoncomputable".Moving the real inside the proposition means nothing real crosses the boundary:
mix'has exactly one non-lemma use, so this touches one definition, two lemma signatures and one call site.Testing
With these changes,
Interval.Interval.Mul,Interval.Interval.ExpandInterval.Interval.Logall build against Mathlib v4.29.1 (rev5e932f97).Note that consumers also need to pin Mathlib's full transitive dependency closure explicitly, declared before
interval, or Lake resolvesbatteriestomainandClitov4.27.0-rc1and overrides Mathlib's own pinned set. That is a packaging observation, not part of this PR.Deliberately not addressed
Interval.Interval.Powstill fails viaInterval/Interval/Division.lean. It is the same underlying problem in a harder place: there the real is a type index (Around x.val⁻¹), computed throughReal.instInv, so this fix does not transfer. Repairing it needs a decision about whetherAroundshould carry its centre as an index — a design question rather than a repair, and yours to make.The
lean-toolchainpin is deliberately left untouched.