Finite intervals of integers #
This file proves that ℤ
is a LocallyFiniteOrder
and calculates the cardinality of its
intervals as finsets and fintypes.
Equations
- One or more equations did not get rendered due to their size.
theorem
Int.Icc_eq_finset_map
(a b : ℤ)
:
Finset.Icc a b = Finset.map (Nat.castEmbedding.trans (addLeftEmbedding a)) (Finset.range (b + 1 - a).toNat)
theorem
Int.Ico_eq_finset_map
(a b : ℤ)
:
Finset.Ico a b = Finset.map (Nat.castEmbedding.trans (addLeftEmbedding a)) (Finset.range (b - a).toNat)
theorem
Int.Ioc_eq_finset_map
(a b : ℤ)
:
Finset.Ioc a b = Finset.map (Nat.castEmbedding.trans (addLeftEmbedding (a + 1))) (Finset.range (b - a).toNat)
theorem
Int.Ioo_eq_finset_map
(a b : ℤ)
:
Finset.Ioo a b = Finset.map (Nat.castEmbedding.trans (addLeftEmbedding (a + 1))) (Finset.range (b - a - 1).toNat)
theorem
Int.uIcc_eq_finset_map
(a b : ℤ)
:
Finset.uIcc a b = Finset.map (Nat.castEmbedding.trans (addLeftEmbedding (a ⊓ b))) (Finset.range (a ⊔ b + 1 - a ⊓ b).toNat)