Zulip Chat Archive
Stream: mathlib4
Topic: Instances in refine (for port/RingTheory.Jacobson)
Antoine Chambert-Loir (Jul 02 2023 at 17:49):
I am trying to finish to port that file written in Lean 3 by @Devon Tuma
I have one question about instances as arguments.
Some statements have arguments of the form (P : Ideal R) [hP : IsMaximal P]
, but it seems that Lean 3 and Lean 4 behave differently, in so that Lean 4 blocks if the instance hP
cannot be found, while Lean 3, if it finds P
seems to be capable of creating the goal IsMaximal P
.
Am I right ? If yes, how to circumvent this issue ?
One option would be to change the arguments formats to {P : Ideal R} (hP : IsMaximal P)
.
Riccardo Brasca (Jul 02 2023 at 19:33):
Doing refine' @foo _ _ _
should still work.
Riccardo Brasca (Jul 02 2023 at 19:34):
But I agree it would be nice if refine
asks for instances that is not able to find, at least if they're Prop
valued.
Kyle Miller (Jul 02 2023 at 19:41):
You might need to put (_)
in place of _
for the instance argument
Scott Morrison (Jul 04 2023 at 07:30):
You can also use apply (config := {allowSynthFailures := true})
.
Last updated: Dec 20 2023 at 11:08 UTC