Zulip Chat Archive

Stream: general

Topic: funny error


Kenny Lau (May 31 2018 at 03:05):

I could not minimize this error.

Kenny Lau (May 31 2018 at 03:05):

https://gist.github.com/kckennylau/a62295136d2daf48146f6fcdb8e37a49

Kenny Lau (May 31 2018 at 03:05):

error:

Kenny Lau (May 31 2018 at 03:05):

type mismatch at field 'right_inv'
  ?m_1
has type
  function.right_inverse (λ (φ : alg_hom (polynomial R) A), φ.val (finsupp.single 1 1))
    (λ (r : A),
       ⟨λ (f : polynomial R),
          finsupp.sum f (λ (n : ) (c : R), (λ (r : R) (x : A), algebra.f A r * x) c (monoid.pow r n)),
        _⟩)
but is expected to have type
  function.right_inverse (λ (φ : alg_hom (polynomial R) A), φ.val (finsupp.single 1 1))
    (λ (r : A), ⟨λ (f : polynomial R), finsupp.sum f (λ (n : ) (c : R), c  r ^ n), _⟩)

Kenny Lau (May 31 2018 at 03:06):

where ?m_1 was a literal underscore

Kenny Lau (May 31 2018 at 03:06):

that's it folks, an underscore has a type error

Kenny Lau (May 31 2018 at 03:06):

@Mario Carneiro

Kevin Buzzard (May 31 2018 at 04:13):

I think we've seen this happen before

Kevin Buzzard (May 31 2018 at 04:13):

were you making a big structure and doing crazy stuff like sorrying out constants?

Kevin Buzzard (May 31 2018 at 04:16):

I find these sorts of things a bit annoying to do for reasons like this


Last updated: Dec 20 2023 at 11:08 UTC