FormalConjecturesForMathlib/Data/Int/IntermediateValue.lean
Explanation legend Lean4 Domain Explanation Language (L4DEL)
L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.
- L4DEL
- Lean4 Domain Explanation Language
Credit: The upstream authors and contributors retain credit for the project and mathematics. lean4-explainer only renders their pinned source and adds the separately disclosed explanation layer.
Project sources: Pinned project documentation, Formal Conjectures paper, arXiv v1
1 declarations, 0 contain sorry, 0 declared as axioms
A discrete intermediate value theorem
An integer-valued sequence whose consecutive terms differ by at most 1 attains every
integer value lying between two of its terms. This is the discrete analogue of the
intermediate value theorem for a unit-step walk on ℤ.
Imported by 1 file
- theorem
Int.exists_eq_of_natAbs_sub_le_oneDiscrete intermediate value theorem line 35 sourceSource documentation
Discrete intermediate value theorem. If an integer-valued sequence
f : ℕ → ℤhas consecutive terms differing by at most1, then it attains every value betweenf aandf b: fora ≤ bandf a ≤ t ≤ f bthere is some indexc ∈ [a, b]withf c = t.standard axioms: Quot.sound, propext what this means
Statement uses:
Nat,Int,LE.le,Int.natAbs,HSub.hSub,HAdd.hAdd,OfNat.ofNat,Exists,And,EqProof uses:
Nat.le_induction,Exists.intro,And.intro,le_refl,le_antisymm,dite,Decidable.byContradiction,Not25 instances, coercions and auxiliary constants left out.
Tactic trace: 12 steps
Open to load the checked before-and-after goal states.
theorem Int.exists_eq_of_natAbs_sub_le_one (f : ℕ → ℤ) (hf : ∀ n, (f (n + 1) - f n).natAbs ≤ 1) {a b : ℕ} (hab : a ≤ b) {t : ℤ} (hta : f a ≤ t) (htb : t ≤ f b) : ∃ c, a ≤ c ∧ c ≤ b ∧ f c = t := by …Mentions: c