Zulip Chat Archive

Stream: PR reviews

Topic: !4#4707 Algebra.Module.PID


Ruben Van de Velde (Jun 06 2023 at 08:47):

How could I not share this...

failed to synthesize instance
  Module
    ((AddMonoid.End N ×
        AddMonoid.End N ×
          AddMonoid.End N ×
            AddMonoid.End N ×
              AddMonoid.End N ×
                AddMonoid.End N ×
                  AddMonoid.End N ×
                    AddMonoid.End N ×
                      AddMonoid.End N ×
                        AddMonoid.End N ×
                          AddMonoid.End N ×
                            AddMonoid.End N ×
                              AddMonoid.End N ×
                                AddMonoid.End N ×
                                  AddMonoid.End N ×
                                    AddMonoid.End N ×
                                      AddMonoid.End N ×
                                        AddMonoid.End N ×
                                          AddMonoid.End N ×
                                            AddMonoid.End N ×
                                              AddMonoid.End N ×
                                                AddMonoid.End N ×
                                                  AddMonoid.End N ×
                                                    AddMonoid.End N ×
                                                      AddMonoid.End N ×
                                                        AddMonoid.End N ×
                                                          AddMonoid.End N ×
                                                            AddMonoid.End N ×
                                                              AddMonoid.End N ×
                                                                AddMonoid.End N ×
                                                                  AddMonoid.End N ×
                                                                    AddMonoid.End N ×
                                                                      AddMonoid.End N ×
                                                                        AddMonoid.End N ×
                                                                          AddMonoid.End N ×
                                                                            AddMonoid.End N ×
                                                                              AddMonoid.End N ×
                                                                                AddMonoid.End N ×
                                                                                  AddMonoid.End N ×
                                                                                    AddMonoid.End N ×
                                                                                      AddMonoid.End N ×
                                                                                        AddMonoid.End N) ×
      AddMonoid.End N)
    N

Kevin Buzzard (Jun 06 2023 at 08:57):

Yeah I've seen something like this before, but this was before lean4#2210 . How did it happen? User error or is it the typeclass system going wrong?

Ruben Van de Velde (Jun 06 2023 at 08:59):

This is the code:

      refine'
        _,
          ⟨(((@lequivProdOfRightSplitExact _ _ _ _ _ _ _ _ _ _ _ _
                            ((f.trans ULift.moduleEquiv.{u, u, v}.symm).toLinearMap.comp <| mkQ _)
                            ((DirectSum.toModule _ _ _ fun i =>
                                  (liftQSpanSingleton.{u, u} (p ^ k i)
                                      (LinearMap.toSpanSingleton _ _ _) (this i).choose_spec.left :
                                    R  _ →ₗ[R] _)).comp
                              ULift.moduleEquiv.toLinearMap)
                            (R  s j).injective_subtype _ _).symm.trans <|
                      ((quotTorsionOfEquivSpanSingleton _ _ _).symm.trans <|
                            quotEquivOfEqBot _ _ <|
                              Ideal.torsionOf_eq_span_pow_pOrder hp hN _).prod <|
                        ULift.moduleEquiv).trans <|
                  (@DirectSum.lequivProdDirectSum R _ _ _
                      (fun i => R  R  p ^ @Option.rec _ (fun _ => ) (pOrder hN <| s j) k i) _
                      _).symm).trans <|
              DirectSum.lequivCongrLeft R (finSuccEquiv d).symm⟩⟩

Ruben Van de Velde (Jun 06 2023 at 09:00):

Your guess is as good as mine (probably better)

Kevin Buzzard (Jun 06 2023 at 09:02):

All those trans and comps make me think that calc mode could be useful, however I failed to get it working with linear isos before and I'm not sure there's an easy fix :-/

Ruben Van de Velde (Jun 06 2023 at 09:20):

In any case, I'm stepping away from this file for a while, in case someone wants to look into it

Mario Carneiro (Jun 06 2023 at 10:35):

also reminds me of:
the-end.jpg


Last updated: Dec 20 2023 at 11:08 UTC