Repository navigation
feat: use IsApply for ContinuousMap - #45093
EtienneC30 wants to merge 37 commits into
Conversation
PR summary a81cdf663bImport changes for modified filesNo significant changes to the import graph Import changes for all files
|
…lib4 into apply-continuous
grunweg
left a comment
There was a problem hiding this comment.
Thanks for doing this. I have only minor comments.
| (f ^ n) x = f x ^ n := | ||
| rfl | ||
| @[deprecated (since := "2026-10-20")] alias coe_nsmul := FunLike.coe_smul | ||
| @[to_additive existing, deprecated (since := "2026-10-20")] alias coe_pow := FunLike.coe_pow |
There was a problem hiding this comment.
Do these declarations differ in their order of implicit arguments? (Do we care? Can we make the deprecation indicate this, e.g. via +typeChanged.)
There was a problem hiding this comment.
In general, these names are somewhat common among other classes: should we mark more of these aliasses are protected?
There was a problem hiding this comment.
In #45081 Moritz indeed deprecated with +typeChanged instead of just putting an alias. Here it is actually the explicit arguments that are swapped for some reason. But among all the fixes I had to do they were all in simp or rw calls, so the arguments were not the issue.
To answer your second question, in most cases the coe_smul lemmas should not be protected but deprecated in favor of the right IsApply class.
There was a problem hiding this comment.
I agree about the deprecation. My question is: should we have a deprecated alias or a deprecated protected alias? If the latter ends up nicer, I think we should do the latter. (Perhaps it doesn't work, I haven't tested.)
There was a problem hiding this comment.
I think there is no need to protect the coe lemmas because the corresponding FunLike ones are in the FunLike namespace which is never opened. However the apply lemmas should be protected because the corresponding FunLike lemmas do not have a namespace.
| theorem mul_apply [Mul β] [ContinuousMul β] (f g : C(α, β)) (x : α) : (f * g) x = f x * g x := | ||
| rfl | ||
| @[deprecated (since := "2026-10-20")] alias coe_add := FunLike.coe_add | ||
| @[to_additive existing, deprecated (since := "2026-10-20")] alias coe_mul := FunLike.coe_mul |
There was a problem hiding this comment.
For instance, should these be protected? (Though I gather that this will be written explicitly much less.)
| def coeFnRingHom {α : Type*} {β : Type*} [TopologicalSpace α] [TopologicalSpace β] [Semiring β] | ||
| [IsTopologicalSemiring β] : C(α, β) →+* α → β := | ||
| { (coeFnMonoidHom : C(α, β) →* _), | ||
| (coeFnAddMonoidHom : C(α, β) →+ _) with } | ||
| { (FunLike.coeMonoidHom _ _ _ : C(α, β) →* _), | ||
| (FunLike.coeAddMonoidHom _ _ _ : C(α, β) →+ _) with } |
There was a problem hiding this comment.
I think this should be an abstract definition for FunLike in the file for rings
|
This pull request has conflicts, please merge |
…lib4 into apply-continuous
IsApplyforBoundedContinuousFunction#45087IsApplyforFiniteMeasure#45123