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_3} [Subsingleton α] :
Equations
  • =
instance Finite.prop (p : Prop) :
Equations
  • =
instance Quot.finite {α : Sort u_3} [Finite α] (r : ααProp) :
Equations
  • =
instance Quotient.finite {α : Sort u_3} [Finite α] (s : Setoid α) :
Equations
  • =
instance Function.Embedding.finite {α : Sort u_3} {β : Sort u_4} [Finite β] :
Finite (α β)
Equations
  • =
instance Equiv.finite_right {α : Sort u_3} {β : Sort u_4} [Finite β] :
Finite (α β)
Equations
  • =
instance Equiv.finite_left {α : Sort u_3} {β : Sort u_4} [Finite α] :
Finite (α β)
Equations
  • =