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
- fin.locally_finite_order n = subtype.locally_finite_order (λ (i : ℕ), i < n)
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]
theorem
fin.map_subtype_embedding_Icc
{n : ℕ}
(a b : fin n) :
finset.map (function.embedding.subtype (λ (i : ℕ), i < n)) (finset.Icc a b) = finset.Icc ↑a ↑b
@[simp]
theorem
fin.map_subtype_embedding_Ico
{n : ℕ}
(a b : fin n) :
finset.map (function.embedding.subtype (λ (i : ℕ), i < n)) (finset.Ico a b) = finset.Ico ↑a ↑b
@[simp]
theorem
fin.map_subtype_embedding_Ioc
{n : ℕ}
(a b : fin n) :
finset.map (function.embedding.subtype (λ (i : ℕ), i < n)) (finset.Ioc a b) = finset.Ioc ↑a ↑b
@[simp]
theorem
fin.map_subtype_embedding_Ioo
{n : ℕ}
(a b : fin n) :
finset.map (function.embedding.subtype (λ (i : ℕ), i < n)) (finset.Ioo a b) = finset.Ioo ↑a ↑b
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)) :
finset.map (function.embedding.subtype (λ (i : ℕ), i < n + 1)) (finset.Ici a) = finset.Icc ↑a n
@[simp]
theorem
fin.map_subtype_embedding_Ioi
{n : ℕ}
(a : fin (n + 1)) :
finset.map (function.embedding.subtype (λ (i : ℕ), i < n + 1)) (finset.Ioi a) = finset.Ioc ↑a n
@[simp]
theorem
fin.map_subtype_embedding_Iic
{n : ℕ}
(b : fin (n + 1)) :
finset.map (function.embedding.subtype (λ (i : ℕ), i < n + 1)) (finset.Iic b) = finset.Iic ↑b
@[simp]
theorem
fin.map_subtype_embedding_Iio
{n : ℕ}
(b : fin (n + 1)) :
finset.map (function.embedding.subtype (λ (i : ℕ), i < n + 1)) (finset.Iio b) = finset.Iio ↑b
@[simp]
@[simp]
theorem
fin.card_filter_lt
{n : ℕ}
(a : fin n) :
(finset.filter (λ (j : fin n), a < j) finset.univ).card = n - ↑a - 1
@[simp]
theorem
fin.card_filter_le
{n : ℕ}
(a : fin n) :
(finset.filter (λ (j : fin n), a ≤ j) finset.univ).card = n - ↑a
@[simp]
theorem
fin.card_filter_gt
{n : ℕ}
(a : fin n) :
(finset.filter (λ (j : fin n), j < a) finset.univ).card = ↑a
@[simp]
theorem
fin.card_filter_ge
{n : ℕ}
(a : fin n) :
(finset.filter (λ (j : fin n), j ≤ a) finset.univ).card = ↑a + 1
@[simp]
@[simp]
theorem
fin.prod_filter_lt_mul_neg_eq_prod_off_diag
{R : Type u_1}
[comm_monoid R]
{n : ℕ}
{f : fin n → fin n → R} :
∏ (i : fin n), ∏ (j : fin n) in finset.filter (λ (j : fin n), i < j) finset.univ, (f j i) * f i j = ∏ (i : fin n), ∏ (j : fin n) in finset.filter (λ (j : fin n), i ≠ j) finset.univ, f j i