Zulip Chat Archive

Stream: new members

Topic: Membership of small finset


Justus Springer (Sep 06 2021 at 16:00):

What's the idiomatic way of solving problems like these? Is there a tactic that can do this?

import data.finset.basic

example : 7  ({1, 2, 3, 4, 5, 6, 7, 8} : finset ) :=
begin
  right, right, right, right, right, right, left, refl,
end

Kevin Buzzard (Sep 06 2021 at 16:01):

norm_num

Justus Springer (Sep 06 2021 at 16:08):

Wow, it works even for types other than ℕ. Thanks!

Justus Springer (Sep 06 2021 at 16:11):

I didn't expect that, I thought norm_num only proves stuff about numbers.

Kevin Buzzard (Sep 06 2021 at 16:15):

yeah, this is some kind of relatively recent plugin which Mario wrote for it I think.

Eric Rodriguez (Sep 06 2021 at 16:27):

Why use norm_num over dec_trivial?

Kevin Buzzard (Sep 06 2021 at 16:30):

I don't believe in decidability.

Mario Carneiro (Sep 06 2021 at 16:44):

norm_num doesn't know anything about this problem, but it calls simp using norm_num to discharge side goals

Mario Carneiro (Sep 06 2021 at 16:44):

in fact, I think simp alone will do this


Last updated: Dec 20 2023 at 11:08 UTC