Nat.segment_pre_zero
theoremverifiedformalizationimported Lean
For a strictly monotonic function f : ℕ → ℕ, segment f k = 0 for all k < f 0.
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in open Function Set in variable {f : ℕ → ℕ} in @[scoped grind =] theorem Nat.segment_pre_zero (hm : StrictMono f) {k : ℕ} (h : k < f 0) : segment f k = 0
- Formalizes
- CSLib, `Nat.segment_pre_zero`
- Lean proof
- By Ching-Tsun Chou, from github.com/leanprover/cslib at
3951377e5a3f(Copyright (c) 2025 Ching-Tsun Chou. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.33.0.Nat.segment_pre_zero← Nat.segment_pre_zero (Cslib/Foundations/Data/Nat/Segment.lean:101): verbatim
- Verified
- 08 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 2
- Nat.segmentThe
f-segment ofk, wheref : ℕ → ℕwill be assumed to be at least StrictMono. - Nat.segment_idemFor a strictly monotonic function
f : ℕ → ℕ, the segment off kisk.
- Nat.segmentThe
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
set_option autoImplicit true inset_option relaxedAutoImplicit true inopen Function Set invariable {f : ℕ → ℕ} in/-- For a strictly monotonic function `f : ℕ → ℕ`, `segment f k = 0` for all `k < f 0`. -/@[scoped grind =]theorem Nat.segment_pre_zero (hm : StrictMono f) {k : ℕ} (h : k < f 0) : segment f k = 0 := by classical have h1 : count (· ∈ range f) (k + 1) = 0 := by apply count_of_forall_not rintro n h_n ⟨i, rfl⟩ have := StrictMono.monotone hm <| zero_le i omega rw [segment, h1]