You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't know if this is the expected behavior, but it looks worse than in Lean3.
My interpretation is: you prefer Lean 4 to silently treat implicit arguments that depend on other outParam as outParams, correct?
If yes, could you please confirm with other users whether they are happy with this change?
My 2c on this issue is that, for the case of instance implicit args specifically, it is already assumed that they are searched only after all of their (non-outParam) arguments are ready. Since F is not an outParam of foo in this example, that means that we would normally expect instance search of [foo F] to happen only after F is available, which means that it is already logically an outparam.
So I think we should silently / automatically upgrade these instance arguments to outparams without requiring an annotation. For regular variables I think the error message makes sense and should stay.
Reacted by Leonardo de Moura, Kim Morrison and Winston Yin
Activity
leodemoura commentedon Nov 18, 2022
My interpretation is: you prefer Lean 4 to silently treat implicit arguments that depend on other
outParamasoutParams, correct?If yes, could you please confirm with other users whether they are happy with this change?
digama0 commentedon Nov 18, 2022
My 2c on this issue is that, for the case of instance implicit args specifically, it is already assumed that they are searched only after all of their (non-outParam) arguments are ready. Since
Fis not an outParam offooin this example, that means that we would normally expect instance search of[foo F]to happen only afterFis available, which means that it is already logically an outparam.So I think we should silently / automatically upgrade these instance arguments to outparams without requiring an annotation. For regular variables I think the error message makes sense and should stay.
fix: fixes leanprover#1852
fix: include instance implicits that depend on `outParams` at `outPar…
Squashed commit of the following:
Squashed commit of the following: