Zulip Chat Archive

Stream: new members

Topic: How to do Finset (Finset Type) instead of Set (Finset Type)


Icaro Costa (Aug 04 2025 at 16:02):

How do I make these definitions have type Finset (Finset Type) instead of Set (Finset Type)?

import Mathlib
open Nat
open Finset

variable {N k: }(hk: k  N)(hk2: k  2)
variable {V : Finset } (hV : V  Finset.range N)

def U (a b : V) (k : ) := {X : Finset V | ({a,b}  X  )  (X.card = k)}

Aaron Liu (Aug 04 2025 at 16:04):

def U (a b : V) (k : ) : Finset (Finset V) := {X : Finset V | ({a,b}  X  )  (X.card = k)}

Icaro Costa (Aug 04 2025 at 16:05):

Oh right, sorry for the stupid question

Kenny Lau (Aug 04 2025 at 16:23):

this is why you should always indicate the type in a def


Last updated: Dec 20 2025 at 21:32 UTC