The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V03. Sets, finite structures and big operators

Mathlib.Data.Set.Finite.Monad

10 declarations. Mathlib docs · Source

Finiteness of the Set monad operations

Tags

finite sets

Fintype instances

Every instance here should have a corresponding Set.Finite constructor in the next section.

Finite instances

There is seemingly some overlap between the following instances and the Fintype instances in Data.Set.Finite. While every Fintype instance gives a Finite instance, those instances that depend on Fintype or Decidable instances need an additional Finite instance to be able to generally apply.

Some set instances do not appear here since they are consequences of others, for example Subtype.Finite for subsets of a finite type.

Constructors for Set.Finite

Every constructor here should have a corresponding Fintype instance in the previous section (or in the Fintype module).

The implementation of these constructors ideally should be no more than Set.toFinite, after possibly setting up some Fintype and classical Decidable instances.

def Set.fintypeBind E1 #

{α β : Type u_1} →
  [DecidableEq β] →
    (s : Set α) → [Fintype ↑s] → (f : α → Set β) → ((a : α) → a ∈ s → Fintype ↑(f a)) → Fintype ↑(s >>= f)

If s : Set α is a set with Fintype instance and f : α → Set β is a function such that each f a, a ∈ s, has a Fintype structure, then s >>= f has a Fintype structure.

instance Set.fintypeBind' E0 #

{α β : Type u_1} →
  [DecidableEq β] → (s : Set α) → [Fintype ↑s] → (f : α → Set β) → [(a : α) → Fintype ↑(f a)] → Fintype ↑(s >>= f)

instance Set.fintypePure E0 #

{α : Type u} → (a : α) → Fintype ↑(pure a)

instance Set.fintypeSeq E0 #

{α : Type u} →
  {β : Type v} → [DecidableEq β] → (f : Set (α → β)) → (s : Set α) → [Fintype ↑f] → [Fintype ↑s] → Fintype ↑(f.seq s)

instance Set.fintypeSeq' E0 #

{α β : Type u} → [DecidableEq β] → (f : Set (α → β)) → (s : Set α) → [Fintype ↑f] → [Fintype ↑s] → Fintype ↑(f <*> s)

theorem Finite.Set.finite_pure E1 #

∀ {α : Type u} (a : α), (pure a).Finite

instance Finite.Set.finite_seq E0 #

∀ {α : Type u} {β : Type v} (f : Set (α → β)) (s : Set α) [Finite ↑f] [Finite ↑s], Finite ↑(f.seq s)

theorem Set.Finite.bind E1 #

∀ {α β : Type u_1} {s : Set α} {f : α → Set β}, s.Finite → (∀ a ∈ s, (f a).Finite) → (s >>= f).Finite

theorem Set.Finite.seq E1 #

∀ {α : Type u} {β : Type v} {f : Set (α → β)} {s : Set α}, f.Finite → s.Finite → (f.seq s).Finite

theorem Set.Finite.seq' E1 #

∀ {α β : Type u} {f : Set (α → β)} {s : Set α}, f.Finite → s.Finite → (f <*> s).Finite