Zulip Chat Archive
Stream: mathlib4
Topic: Importing Mathlib breaks `Polynomial.aeval`
Oliver Nash (Jan 30 2024 at 14:04):
Can anyone explain this:
Oliver Nash (Jan 30 2024 at 14:04):
import Mathlib.Data.Polynomial.AlgebraMap
import Mathlib
variable {R A : Type*} [CommSemiring R] [Semiring A] [Algebra R A] {a : A} {p : Polynomial R}
#check Polynomial.aeval a p -- Works only when `import Mathlib` omitted
#check Polynomial.aeval (R := R) a p -- Always works
Ruben Van de Velde (Jan 30 2024 at 14:08):
With error
function expected at
Polynomial.aeval a
term has type
Polynomial ?m.539 →ₐ[?m.539] A
Is this related to the big FunLike refactor?
Oliver Nash (Jan 30 2024 at 14:11):
Not to my knowledge. The above is on master FWIW.
Ruben Van de Velde (Jan 30 2024 at 14:13):
Oh, look: https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Polynomial.2Eaeval.20broke
Jireh Loreaux (Jan 30 2024 at 14:16):
See here:
Jireh Loreaux said:
Perhaps you've had problems elaborating
AlgHom
s orStarAlgHom
s. If so, I've come across two instances (I think I added them) that are causing the pain.
Jireh Loreaux (Jan 30 2024 at 14:16):
That's the only way I can figure out how to link to a thread on mobile.
Oliver Nash (Jan 30 2024 at 14:18):
Thank you both!
Jireh Loreaux (Jan 30 2024 at 14:19):
Upshot, it's fixed with #8386 but you could temporarily disable those instances.
Oliver Nash (Jan 30 2024 at 14:23):
(This isn't even hitting me, I just wanted to run #find_home
with everything imported.)
Oliver Nash (Jan 30 2024 at 14:29):
For posterity I will record that adding:
attribute [-instance] AlgHom.instContinuousLinearMapClassToSemiringToDivisionSemiringToSemifieldToFieldToTopologicalSpaceToUniformSpaceToPseudoMetricSpaceToSeminormedRingToAddCommMonoidToNonUnitalNonAssocSemiringToNonUnitalNonAssocRingToNonAssocRingToRingToTopologicalSpaceToUniformSpaceToPseudoMetricSpaceToSeminormedRingToSeminormedCommRingToNormedCommRingToAddCommMonoidToNonUnitalNonAssocSemiringToNonUnitalNonAssocCommSemiringToNonUnitalNonAssocCommRingToNonUnitalCommRingToNonUnitalSeminormedCommRingToModuleToSeminormedAddCommGroupToNonUnitalSeminormedRingToNonUnitalNormedRingToNormedSpace'ToModuleToSeminormedAddCommGroupToNonUnitalSeminormedRingToNormedSpace
fixes this issue.
Last updated: May 02 2025 at 03:31 UTC