Finite intervals in Fin n
#
This file proves that Fin n
is a LocallyFiniteOrder
and calculates the cardinality of its
intervals as Finsets and Fintypes.
Equations
- Fin.instLocallyFiniteOrder n = Fin.orderIsoSubtype.locallyFiniteOrder
Equations
- Fin.instLocallyFiniteOrderBot n = Fin.orderIsoSubtype.locallyFiniteOrderBot
Equations
- Fin.instLocallyFiniteOrderTop 0 = IsEmpty.toLocallyFiniteOrderTop
- Fin.instLocallyFiniteOrderTop n.succ = inferInstance
theorem
Fin.Icc_eq_finset_subtype
{n : ℕ}
(a b : Fin n)
:
Finset.Icc a b = Finset.fin n (Finset.Icc ↑a ↑b)
theorem
Fin.Ico_eq_finset_subtype
{n : ℕ}
(a b : Fin n)
:
Finset.Ico a b = Finset.fin n (Finset.Ico ↑a ↑b)
theorem
Fin.Ioc_eq_finset_subtype
{n : ℕ}
(a b : Fin n)
:
Finset.Ioc a b = Finset.fin n (Finset.Ioc ↑a ↑b)
theorem
Fin.Ioo_eq_finset_subtype
{n : ℕ}
(a b : Fin n)
:
Finset.Ioo a b = Finset.fin n (Finset.Ioo ↑a ↑b)
theorem
Fin.uIcc_eq_finset_subtype
{n : ℕ}
(a b : Fin n)
:
Finset.uIcc a b = Finset.fin n (Finset.uIcc ↑a ↑b)
@[simp]
theorem
Fin.map_valEmbedding_Icc
{n : ℕ}
(a b : Fin n)
:
Finset.map Fin.valEmbedding (Finset.Icc a b) = Finset.Icc ↑a ↑b
@[simp]
theorem
Fin.map_valEmbedding_Ico
{n : ℕ}
(a b : Fin n)
:
Finset.map Fin.valEmbedding (Finset.Ico a b) = Finset.Ico ↑a ↑b
@[simp]
theorem
Fin.map_valEmbedding_Ioc
{n : ℕ}
(a b : Fin n)
:
Finset.map Fin.valEmbedding (Finset.Ioc a b) = Finset.Ioc ↑a ↑b
@[simp]
theorem
Fin.map_valEmbedding_Ioo
{n : ℕ}
(a b : Fin n)
:
Finset.map Fin.valEmbedding (Finset.Ioo a b) = Finset.Ioo ↑a ↑b
@[simp]
theorem
Fin.map_subtype_embedding_uIcc
{n : ℕ}
(a b : Fin n)
:
Finset.map Fin.valEmbedding (Finset.uIcc a b) = Finset.uIcc ↑a ↑b
@[simp]
theorem
Fin.card_fintype_uIcc
{n : ℕ}
(a b : Fin n)
:
Fintype.card ↑(Set.uIcc a b) = (↑↑b - ↑↑a).natAbs + 1
theorem
Fin.Ici_eq_finset_subtype
{n : ℕ}
(a : Fin n)
:
Finset.Ici a = Finset.fin n (Finset.Icc (↑a) n)
theorem
Fin.Ioi_eq_finset_subtype
{n : ℕ}
(a : Fin n)
:
Finset.Ioi a = Finset.fin n (Finset.Ioc (↑a) n)
@[simp]
theorem
Fin.map_valEmbedding_Ici
{n : ℕ}
(a : Fin n)
:
Finset.map Fin.valEmbedding (Finset.Ici a) = Finset.Icc (↑a) (n - 1)
@[simp]
theorem
Fin.map_valEmbedding_Ioi
{n : ℕ}
(a : Fin n)
:
Finset.map Fin.valEmbedding (Finset.Ioi a) = Finset.Ioc (↑a) (n - 1)
@[simp]
theorem
Fin.map_valEmbedding_Iic
{n : ℕ}
(b : Fin n)
:
Finset.map Fin.valEmbedding (Finset.Iic b) = Finset.Iic ↑b
@[simp]
theorem
Fin.map_valEmbedding_Iio
{n : ℕ}
(b : Fin n)
:
Finset.map Fin.valEmbedding (Finset.Iio b) = Finset.Iio ↑b