Module docstring
{"# Least upper bound and greatest lower bound properties for integers
In this file we prove that a bounded above nonempty set of integers has the greatest element, and a counterpart of this statement for the least element.
Main definitions
Int.leastOfBdd: ifP : ℤ → Propis a decidable predicate,bis a lower bound of the set{m | P m}, and there existsm : ℤsuch thatP m(this time, no witness is required), thenInt.leastOfBddreturns the least numbermsuch thatP m, together with proofs ofP mand of the minimality. This definition is computable and does not rely on the axiom of choice.Int.greatestOfBdd: a similar definition with all inequalities reversed.
Main statements
Int.exists_least_of_bdd: ifP : ℤ → Propis a predicate such that the set{m : P m}is bounded below and nonempty, then this set has the least element. This lemma uses classical logic to avoid assumption[DecidablePred P]. SeeInt.leastOfBddfor a constructive counterpart.Int.coe_leastOfBdd_eq:(Int.leastOfBdd b Hb Hinh : ℤ)does not depend onb.Int.exists_greatest_of_bdd,Int.coe_greatest_of_bdd_eq: versions of the above lemmas with all inequalities reversed.
Tags
integer numbers, least element, greatest element "}