Closed adomasbaliuka closed 4 weeks ago
Sorry for delay! I've updated to recent Mathlib now, and also ported my mono
machinery over to a much cleaner custom approx
tactic built on Aesop. The new version of your code is:
import Interval
def Interval.f (x : Interval) : Interval := x / 2
noncomputable def Real.f (x : ℝ) : ℝ := x / 2
@[mono] lemma mem_approx_f (ix : Interval) (x : ℝ) (m : x ∈ approx ix) :
x.f ∈ approx ix.f := by
simp only [Real.f, Interval.f]
approx
Unfortunately all the OfNat
related lemmas have to be carefully marked with no_index
due to https://github.com/leanprover/lean4/issues/2867, but this should be all done now.
That works great, thanks!
How should one prove
mem_approx_f
below?I don't know how to prove the sorry and also don't know how one might generalize
mem_approx_ofNat
to work for numbers besides2
.With naive approach of adding
mono
does not pick up on it.