mathlib documentation

data.fin.interval

Finite intervals in fin n #

This file proves that fin n is a locally_finite_order and calculates the cardinality of its intervals as finsets and fintypes.

@[protected, instance]
Equations
theorem fin.Icc_eq_finset_subtype {n : ℕ} (a b : fin n) :
finset.Icc a b = finset.subtype (λ (x : ℕ), x < n) (finset.Icc ↑a ↑b)
theorem fin.Ico_eq_finset_subtype {n : ℕ} (a b : fin n) :
finset.Ico a b = finset.subtype (λ (x : ℕ), x < n) (finset.Ico ↑a ↑b)
theorem fin.Ioc_eq_finset_subtype {n : ℕ} (a b : fin n) :
finset.Ioc a b = finset.subtype (λ (x : ℕ), x < n) (finset.Ioc ↑a ↑b)
theorem fin.Ioo_eq_finset_subtype {n : ℕ} (a b : fin n) :
finset.Ioo a b = finset.subtype (λ (x : ℕ), x < n) (finset.Ioo ↑a ↑b)
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
theorem fin.card_Icc {n : ℕ} (a b : fin n) :
(finset.Icc a b).card = ↑b + 1 - ↑a
@[simp]
theorem fin.card_Ico {n : ℕ} (a b : fin n) :
@[simp]
theorem fin.card_Ioc {n : ℕ} (a b : fin n) :
@[simp]
theorem fin.card_Ioo {n : ℕ} (a b : fin n) :
(finset.Ioo a b).card = ↑b - ↑a - 1
@[simp]
theorem fin.card_fintype_Icc {n : ℕ} (a b : fin n) :
@[simp]
theorem fin.card_fintype_Ico {n : ℕ} (a b : fin n) :
@[simp]
theorem fin.card_fintype_Ioc {n : ℕ} (a b : fin n) :
@[simp]
theorem fin.card_fintype_Ioo {n : ℕ} (a b : fin n) :
theorem fin.Ici_eq_finset_subtype {n : ℕ} (a : fin (n + 1)) :
finset.Ici a = finset.subtype (λ (x : ℕ), x < n + 1) (finset.Icc ↑a (n + 1))
theorem fin.Ioi_eq_finset_subtype {n : ℕ} (a : fin (n + 1)) :
finset.Ioi a = finset.subtype (λ (x : ℕ), x < n + 1) (finset.Ioc ↑a (n + 1))
theorem fin.Iic_eq_finset_subtype {n : ℕ} (b : fin (n + 1)) :
finset.Iic b = finset.subtype (λ (x : ℕ), x < n + 1) (finset.Iic ↑b)
theorem fin.Iio_eq_finset_subtype {n : ℕ} (b : fin (n + 1)) :
finset.Iio b = finset.subtype (λ (x : ℕ), x < n + 1) (finset.Iio ↑b)
@[simp]
theorem fin.map_subtype_embedding_Ici {n : ℕ} (a : fin (n + 1)) :
@[simp]
theorem fin.map_subtype_embedding_Ioi {n : ℕ} (a : fin (n + 1)) :
@[simp]
theorem fin.map_subtype_embedding_Iic {n : ℕ} (b : fin (n + 1)) :
@[simp]
theorem fin.map_subtype_embedding_Iio {n : ℕ} (b : fin (n + 1)) :
@[simp]
theorem fin.card_Ici {n : ℕ} (a : fin (n + 1)) :
(finset.Ici a).card = n + 1 - ↑a
@[simp]
theorem fin.card_Ioi {n : ℕ} (a : fin (n + 1)) :
@[simp]
theorem fin.card_Iic {n : ℕ} (b : fin (n + 1)) :
@[simp]
theorem fin.card_Iio {n : ℕ} (b : fin (n + 1)) :
@[simp]
theorem fin.card_fintype_Ici {n : ℕ} (a : fin (n + 1)) :
@[simp]
theorem fin.card_fintype_Ioi {n : ℕ} (a : fin (n + 1)) :
@[simp]
theorem fin.card_fintype_Iic {n : ℕ} (b : fin (n + 1)) :
@[simp]
theorem fin.card_fintype_Iio {n : ℕ} (b : fin (n + 1)) :