Structures · Data types
Finite
A type is Finite if it is in bijective correspondence to some Fin n.
This is similar to Fintype, but Finite is a proposition rather than data.
A particular benefit to this is that Finite instances are definitionally equal to one another
(due to proof irrelevance) rather than being merely propositionally equal,
and, furthermore, Finite instances generally avoid the need for Decidable instances.
One other notable difference is that Finite allows there to be Finite p instances
for all p : Prop, which is not allowed by Fintype due to universe constraints.
An application of this is that Finite (x ∈ s → β x) follows from the general instance for pi
types, assuming [∀ x, Finite (β x)].
Implementation note: this is a reason Finite α is not defined as Nonempty (Fintype α).
Every Fintype instance provides a Finite instance via Finite.of_fintype.
Conversely, one can noncomputably create a Fintype instance from a Finite instance
via Fintype.ofFinite. In a proof one might write
``lean
have := Fintype.ofFinite α
`
to obtain such an instance.
Do not write noncomputable Fintype instances; instead write Finite instances
and use this Fintype.ofFinite interface.
The Fintype instances should be relied upon to be computable for evaluation purposes.
Theorems should use Finite instead of Fintype, unless definitions in the theorem statement
require Fintype.
Definitions should prefer Finite as well, unless it is important that the definitions
are meant to be computable in the reduction or #eval` sense.
- Defined in
- Mathlib.Data.Finite.Defs
- Shape
- One type argument, not a structure
Extends0
Extends nothing: this is a root of the hierarchy.
Extended by2
Forgetful instances
Every Finite is also a
Provided automatically by
Concrete types that are instances84
- Bool
- Quiver.Hom
- TopCat.carrier
- CategoryTheory.Functor.obj
- CStarMatrix
- Matrix
- Units
- IsLocalRing.ResidueField
- Polynomial.SplittingField
- GaloisField
- CategoryTheory.Discrete
- FiniteField.Extension
- Matrix.SpecialLinearGroup
- AlgEquiv
- PrimeSpectrum
- SimpleGraph
- TopologicalSpace.Opens
- Abelianization
- PontryaginDual
- AlgHom
- LieModule.Weight
- Sym
- PProd
- Projectivization
- WithTopology
- CategoryTheory.Arrow
- CategoryTheory.Aut
- SimpleGraph.ConnectedComponent
- Function.Embedding
- MulChar
- PSum
- SimpleGraph.Subgraph
- SimpleGraph.Hom
- AddGrpCat.carrier
- List.Vector
- MaximalSpectrum
- GrpCat.carrier
- RegularWreathProduct
- TopologicalSpace.Clopens
- IteratedWreathProduct
- AddEquiv
- MulEquiv
- ConnectedComponents
- ZerothHomotopy
- CategoryTheory.Iso
- SimpleGraph.EdgeLabeling
- Sylow
- CategoryTheory.ObjectProperty.FullSubcategory.obj
- SimpleGraph.ComponentCompl
- SSet.N
- Configuration.Dual
- ConjClasses
- Sym.Sym'
- Ideal.ResidueField
- CategoryTheory.Subfunctor.IsFinite.Index
- CategoryTheory.Functor.ColimitType
- AddAction.orbitRel.Quotient
- MulAction.orbitRel.Quotient
- Function.Fiber
- SheafOfModules.GeneratingSections.I
- CuspOrbits
- ModN
- Subtype
- Prod
- OrderDual
- Set.Elem
- ULift
- HasQuotient.Quotient
- Shrink
- WithTop
- WithBot
- Sum
- Multiplicative
- Additive
- Sigma
- Set
- Ideal
- Option
- Quotient
- MonoidHom
- PLift
- Quot
- Equiv
- PSigma
How is a type an instance?
Loading the hierarchy index…
Assumed by2,892
- nonempty_fintype
- Fintype.ofFinite
- LinearMap.toMatrix
- Set.toFinite
- Module.Basis.equivFun
- Pi.basisFun
- Matrix.toLin
- Set.finite_range
- LinearMap.toMatrix_apply
- Set.finite_univ
- Finsupp.equivFunOnFinite
- Algebra.SubmersivePresentation.toPreSubmersivePresentation
- RootPairing.chainTopCoeff
- RootPairing.chainBotCoeff
- Nat.card_pos
- Matrix.SeparatingRight
- Matrix.SeparatingLeft
- Finite.of_injective
- Algebra.PreSubmersivePresentation.jacobian
- Module.Basis.dualBasis
- MvPowerSeries.truncTotal
- Finsupp.linearEquivFunOnFinite
- FintypeCat.of
- LinearMap.pi_ext'
- Finite.exists_equiv_fin
- MeasureTheory.Measure.toBoxAdditive
- CategoryTheory.Limits.biproduct.matrix
- Module.Finite.of_basis
- Module.Basis.finiteDimensional_of_finite
- RootPairing.GeckConstruction.e
- Finite.of_equiv
- LinearMap.BilinForm.dualBasis
- ContinuousMultilinearMap.ext_ring
- Nat.card_le_card_of_injective
- IsCyclotomicExtension.numberField
- RootPairing.GeckConstruction.f
- Module.Basis.equivFunL
- Finite.le_ciSup_of_le
- LieAlgebra.Basis.h
- LinearMap.toMvPolynomial
- Filter.eventually_all
- CategoryTheory.leftDistributor
- Module.Basis.coe_dualBasis
- LieAlgebra.Basis.baseSupp
- LieAlgebra.Basis.e
- CategoryTheory.rightDistributor
- orderOf_pos
- LinearMap.toMatrix_toLin
- Set.finite_iUnion
- Finite.of_surjective