Zulip Chat Archive

Stream: Is there code for X?

Topic: module.free ℝ (fin 2 → ℝ)


Alex Kontorovich (Aug 09 2022 at 12:37):

I would think this would be a simp lemma or something?... Thanks in advance!

import linear_algebra.free_module.basic
import data.real.basic

example : module.free  (fin 2  ) := sorry

Eric Wieser (Aug 09 2022 at 12:38):

Does by apply_instance find it?

Alex Kontorovich (Aug 09 2022 at 12:39):

Nevermind, sorry. Librarysearch found it... (It was timing out before. So I moved it to the top of the file and used #exit...)

Eric Wieser (Aug 09 2022 at 12:40):

You shouldn't be using library_search for this anyway, it's a typeclass

Eric Wieser (Aug 09 2022 at 12:40):

Which means lean will just find it for you whever you need it

Yakov Pechersky (Aug 09 2022 at 12:41):

Why does docs#module.free say "Type ?" even though the source says it's the same universe as M?

Eric Wieser (Aug 09 2022 at 12:42):

Probably a bug in the doc-gen export

Riccardo Brasca (Aug 09 2022 at 12:50):

Note that if you also need that it is finite you may need to explicitly write

  letI : module.finite  (fin 1.succ  ) := module.finite.pi,

There is a discussion why sometimes Lean doesn't find it automatically, but I don't remember the details.

Eric Wieser (Aug 09 2022 at 12:52):

I just created #15956 to cleanup some mess around module.free

Riccardo Brasca (Aug 09 2022 at 13:02):

Thanks!


Last updated: Dec 20 2023 at 11:08 UTC