mathlib documentation

data.int.interval

Finite intervals of integers #

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

@[protected, instance]
Equations
@[simp]
theorem int.card_Icc (a b : ) :
(finset.Icc a b).card = (b + 1 - a).to_nat
@[simp]
theorem int.card_Ico (a b : ) :
(finset.Ico a b).card = (b - a).to_nat
@[simp]
theorem int.card_Ioc (a b : ) :
(finset.Ioc a b).card = (b - a).to_nat
@[simp]
theorem int.card_Ioo (a b : ) :
(finset.Ioo a b).card = (b - a - 1).to_nat
theorem int.card_Icc_of_le (a b : ) (h : a b + 1) :
((finset.Icc a b).card) = b + 1 - a
theorem int.card_Ico_of_le (a b : ) (h : a b) :
((finset.Ico a b).card) = b - a
theorem int.card_Ioc_of_le (a b : ) (h : a b) :
((finset.Ioc a b).card) = b - a
theorem int.card_Ioo_of_lt (a b : ) (h : a < b) :
((finset.Ioo a b).card) = b - a - 1
@[simp]
theorem int.card_fintype_Icc (a b : ) :
@[simp]
theorem int.card_fintype_Ico (a b : ) :
@[simp]
theorem int.card_fintype_Ioc (a b : ) :
@[simp]
theorem int.card_fintype_Ioo (a b : ) :
theorem int.card_fintype_Icc_of_le (a b : ) (h : a b + 1) :
theorem int.card_fintype_Ico_of_le (a b : ) (h : a b) :
theorem int.card_fintype_Ioc_of_le (a b : ) (h : a b) :
theorem int.card_fintype_Ioo_of_lt (a b : ) (h : a < b) :