Zulip Chat Archive

Stream: new members

Topic: Inferring fintype for a function


Yakov Pechersky (Oct 15 2020 at 21:47):

What's the missing piece here?

example {α β : Type*} [fintype α] [fintype β] : fintype (α  β) := by apply_instance -- doesn't generate one

Yakov Pechersky (Oct 15 2020 at 21:49):

Ah:

example {α β : Type*} [fintype α] [fintype β] [decidable_eq α] [decidable_eq β] :
  fintype (α  β) := pi.fintype

Julian Berman (Oct 15 2020 at 21:51):

apply_instance looks like it works too once the equality conditions are there

Julian Berman (Oct 15 2020 at 21:52):

It looks like the [decidable_eq β] isn't actually needed too

Julian Berman (Oct 15 2020 at 21:53):

(I don't know what I'm doing, just doing compiler driven development)


Last updated: Dec 20 2023 at 11:08 UTC