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

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

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