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 scoped 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

@[instance 100]
instance Finite.of_subsingleton {α : Sort u_4} [Subsingleton α] :
Equations
  • =
instance Finite.prop (p : Prop) :
Equations
  • =
instance Finite.instProd {α : Type u_1} {β : Type u_2} [Finite α] [Finite β] :
Finite (α × β)
Equations
  • =
instance Finite.instPProd {α : Sort u_4} {β : Sort u_5} [Finite α] [Finite β] :
Finite (α ×' β)
Equations
  • =
theorem Finite.prod_left {α : Type u_1} (β : Type u_4) [Finite (α × β)] [Nonempty β] :
theorem Finite.prod_right {β : Type u_2} (α : Type u_4) [Finite (α × β)] [Nonempty α] :
instance Finite.instSum {α : Type u_1} {β : Type u_2} [Finite α] [Finite β] :
Finite (α β)
Equations
  • =
theorem Finite.sum_left {α : Type u_1} (β : Type u_4) [Finite (α β)] :
theorem Finite.sum_right {β : Type u_2} (α : Type u_4) [Finite (α β)] :
instance Finite.instSigma {α : Type u_1} {β : αType u_4} [Finite α] [∀ (a : α), Finite (β a)] :
Finite ((a : α) × β a)
Equations
  • =
instance Finite.instPSigma {ι : Sort u_4} {π : ιSort u_5} [Finite ι] [∀ (i : ι), Finite (π i)] :
Finite ((i : ι) ×' π i)
Equations
  • =
instance Finite.instSet {α : Type u_1} [Finite α] :
Finite (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 : } :
Equations
  • =
instance Quot.finite {α : Sort u_4} [Finite α] (r : ααProp) :
Equations
  • =
instance Quotient.finite {α : Sort u_4} [Finite α] (s : Setoid α) :
Equations
  • =
instance Function.Embedding.finite {α : Sort u_4} {β : Sort u_5} [Finite β] :
Finite (α β)
Equations
  • =
instance Equiv.finite_right {α : Sort u_4} {β : Sort u_5} [Finite β] :
Finite (α β)
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
  • =