Documentation

Mathlib.Data.Finite.Basic

Finite types #

In this file we prove some theorems about Finite and provide some instances. This typeclass is a Prop-valued counterpart of the typeclass Fintype. See more details in the file where Finite is defined.

Main definitions #

Implementation notes #

There is an apparent duplication of many Fintype instances in this module, however they follow a pattern: if a Fintype instance depends on Decidable instances or other Fintype instances, then we need to "lower" the instance to be a Finite instance by removing the Decidable instances and switching the Fintype instances to Finite instances. These are precisely the ones that cannot be inferred using Finite.of_fintype. (However, when using open Classical or the classical tactic the instances relying only on Decidable instances will give Finite instances.) In the future we might consider writing automation to create these "lowered" instances.

Tags #

finiteness, finite types

theorem Finite.prod_left {α : Type u_1} (β : Type u_4) [Finite (α × β)] [Nonempty β] :
theorem Finite.prod_right {β : Type u_2} (α : Type u_4) [Finite (α × β)] [Nonempty α] :
theorem Finite.sum_left {α : Type u_1} (β : Type u_4) [Finite (α β)] :
theorem Finite.sum_right {β : Type u_2} (α : Type u_4) [Finite (α β)] :
instance Finite.instFiniteSigma {α : Type u_1} {β : αType u_4} [Finite α] [∀ (a : α), Finite (β a)] :
Finite ((a : α) × β a)
Equations
instance Finite.instFinitePSigma {ι : Sort u_4} {π : ιSort u_5} [Finite ι] [∀ (i : ι), Finite (π i)] :
Finite ((i : ι) ×' π i)
Equations
instance Subtype.finite {α : Sort u_4} [Finite α] {p : αProp} :
Finite { x // p x }

This instance also provides [Finite s] for s : Set α.

Equations
instance Pi.finite {α : Sort u_4} {β : αSort u_5} [Finite α] [∀ (a : α), Finite (β a)] :
Finite ((a : α) → β a)
Equations
instance Vector.finite {α : Type u_4} [Finite α] {n : } :
Finite (Vector α n)
Equations
instance Quot.finite {α : Sort u_4} [Finite α] (r : ααProp) :
Equations
instance Equiv.finite_left {α : Sort u_4} {β : Sort u_5} [Finite α] :
Finite (α β)
Equations
instance instFiniteSym {α : Type u_1} [Finite α] {n : } :
Finite (Sym α n)
Equations