Zulip Chat Archive

Stream: mathlib4

Topic: Eigenvalue coercion


Jireh Loreaux (Jun 14 2023 at 17:06):

As with other subtype synonyms in Lean 4, docs4#Module.End.Eigenvalues no longer automatically inherits the Subtype.val coercion from Eigenvalues f to R. This came up while porting analysis.inner_product_space.spectrum. Should I define Eigenvalues.val and set it up as a coercion?

Eric Wieser (Jun 14 2023 at 18:19):

Should it be reducible?

Eric Wieser (Jun 14 2023 at 18:20):

I don't see much point in declaring "an eigenvalues is a element that is an eigenvalue" an implementation detail

Jireh Loreaux (Jun 14 2023 at 18:29):

Probably, Lean also wasn't able to infer DecidableEq (Eigenvalues f) from DecidableEq R.

Jireh Loreaux (Jun 14 2023 at 18:31):

Oh, hah, I just found a porting note about the coercion. I think whoever ported that file didn't know about CoeOut, which is the appropriate class here.

Jireh Loreaux (Jun 14 2023 at 18:33):

I'm just going to add the necessary instances, but maybe we can make it reducible later if we run into more trouble.

Eric Wieser (Jun 14 2023 at 19:51):

We could try a backport, given it's only one line! I would guess it makes less work overall not more

Eric Wieser (Jun 14 2023 at 19:51):

Note we already made a similar change for module.dual when porting, so there's precedent for changing reducibility to help with porting

Jireh Loreaux (Jun 14 2023 at 20:12):

I've ported several files down the chain and the only extra thing I've needed thus far is the DecidableEq instance, and I'm almost to the leaf files. I'm okay with making it reducible, but let's either not bother with a backport, or not make reducible until after the port.


Last updated: Dec 20 2023 at 11:08 UTC