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

• Fintype.finite, Finite.of_fintype creates a Finite instance from a Fintype instance. The former lemma takes Fintype α as an explicit argument while the latter takes it as an instance argument.
• Fintype.of_finite noncomputably creates a Fintype instance from a Finite instance.

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

instance Finite.of_subsingleton {α : Sort u_4} [] :
instance Finite.prop (p : Prop) :
instance Finite.instFiniteProd {α : Type u_1} {β : Type u_2} [] [] :
Finite (α × β)
instance Finite.instFinitePProd {α : Sort u_4} {β : Sort u_5} [] [] :
Finite (PProd α β)
theorem Finite.prod_left {α : Type u_1} (β : Type u_4) [Finite (α × β)] [] :
theorem Finite.prod_right {β : Type u_2} (α : Type u_4) [Finite (α × β)] [] :
instance Finite.instFiniteSum {α : Type u_1} {β : Type u_2} [] [] :
Finite (α β)
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} [] [∀ (a : α), Finite (β a)] :
Finite ((a : α) × β a)
instance Finite.instFinitePSigma {ι : Sort u_4} {π : ιSort u_5} [] [∀ (i : ι), Finite (π i)] :
Finite ((i : ι) ×' π i)
instance Finite.instFiniteSet {α : Type u_1} [] :
Finite (Set α)
instance Subtype.finite {α : Sort u_4} [] {p : αProp} :
Finite { x // p x }

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

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