Zulip Chat Archive
Stream: mathlib4
Topic: !4#4280 Analysis.InnerProductSpace.Basic
Jireh Loreaux (May 23 2023 at 19:15):
In porting this file I ran across a "cannot find synthesization order" error on attribute [local instance] toNorm
where the toNorm
has type:
InnerProductSpace.Core.toNorm.{u_1, u_2} {π : Type u_1} {F : Type u_2} [instβ : IsROrC π] [instβΒΉ : AddCommGroup F]
[instβΒ² : Module π F] [c : Core π F] : Norm F
The error says:
cannot find synthesization order for instance @toNorm with type
{π : Type u_1} β
{F : Type u_2} β [inst : IsROrC π] β [inst_1 : AddCommGroup F] β [inst_2 : Module π F] β [c : Core π F] β Norm F
all remaining arguments have metavariables:
IsROrC ?π
@Module ?π F DivisionSemiring.toSemiring AddCommGroup.toAddCommMonoid
@Core ?π F ?instβ instβΒΉ ?instβΒΉ
The problem is that π
is a metavariable, but since we're looking for as isROrC π
instance, so there are only two options and enumerating all of them is not the problem it usually is. What do I do here? Am I supposed to mark something as a SemiOutParam
@Gabriel Ebner ?
Gabriel Ebner (May 23 2023 at 19:18):
Yes, since there are only the two instances IsROrC β
and IsROrC β
it's safe to mark it IsROrC (K : semiOutParam Type)
.
Gabriel Ebner (May 23 2023 at 19:19):
It would only be an issue if we had an instance like [ConditionallyCompleteLinearOrderedField K] : IsROrC K
.
Jireh Loreaux (May 23 2023 at 19:22):
And I mark this on the declaration docs4#IsROrC itself right, not when setting up variable
s or in the declaration toNorm
?
Gabriel Ebner (May 23 2023 at 19:29):
Yes, that should be on IsROrC
directly.
Eric Wieser (May 23 2023 at 19:59):
I think this definition is only used internally anyway, so presumably it could just be set up locally somehow?
Eric Wieser (May 23 2023 at 20:00):
Which is to say, inner_product_space
itself no longer relies on:
Gabriel Ebner said:
Yes, since there are only the two instances
IsROrC β
andIsROrC β
it's safe to mark itIsROrC (K : semiOutParam Type)
.
Jireh Loreaux (May 23 2023 at 23:51):
ah shoot, I just realized I was supposed to wait for #19058 to start this. My bad. I'll just keep my edits locally as I'm about half way done. @Moritz Doll please let me know when that gets merged and then I'll pull in the new version from mathport.
Jireh Loreaux (May 24 2023 at 03:49):
Moritz said I should just continue with porting this file. I have just pushed changes and there are only a few errors left.
- In one case I had to increase the
synthInstance.maxHeartbeats
to 80000 :grimacing: toSesqForm
is broken and I don't really understand why, but it seems to be something to do with applyingLinearIsometryEquiv.toContinuousLinearEquiv
to(ContinuousLinearMap.flipβα΅’' E E' π (starRingEnd π) (RingHom.id π))
- I haven't yet edited names or anything, I've only dealt with errors.
Help welcome unless I say otherwise. I'll be asleep for 8 hours or so.
Jireh Loreaux (May 24 2023 at 12:42):
I'm locking this file again to work on it.
Jireh Loreaux (May 24 2023 at 18:56):
This is green, but there are two places where I had to increase maxHeartbeats
by a lot. We should probably deal with these, but I need help because I couldn't figure it out.
Last updated: Dec 20 2023 at 11:08 UTC