Module docstring
{"# The finite type with n elements
Fin n is the type whose elements are natural numbers smaller than n.
This file expands on the development in the core library.
Main definitions
Induction principles
finZeroElim: Elimination principle for the empty setFin 0, generalizesFin.elim0. Further definitions and eliminators can be found inInit.Data.Fin.Lemmas
Embeddings and isomorphisms
Fin.valEmbedding: coercion to natural numbers as anEmbedding;Fin.succEmb:Fin.succas anEmbedding;Fin.castLEEmb h:Fin.castLEas anEmbedding, embedFin nintoFin m,h : n ≤ m;finCongr:Fin.castas anEquiv, equivalence betweenFin nandFin mwhenn = m;Fin.castAddEmb m:Fin.castAddas anEmbedding, embedFin nintoFin (n+m);Fin.castSuccEmb:Fin.castSuccas anEmbedding, embedFin nintoFin (n+1);Fin.addNatEmb m i:Fin.addNatas anEmbedding, addmonion the right, generalizesFin.succ;Fin.natAddEmb n i:Fin.natAddas anEmbedding, addsnonion the left;
Other casts
Fin.divNat i: dividesi : Fin (m * n)byn;Fin.modNat i: takes the mod ofi : Fin (m * n)byn;
","### coercions and constructions
","### order
","### Coercions to ℤ and the fin_omega tactic. ","### addition, numerals, and coercion from Nat
","### succ and casts into larger Fin types
","### pred
","### recursion and induction principles
","### mul
"}