Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Truncated natural interval

Definition
LL_Decomp1543a_rangeN

by sthubbar · Oct 29, 2026 · Mathlib 0df444a (Lean v4.33.1)

For real ccc and natural NNN, define R(c,N)={n∈N:1≤n≤N, cN<n}R(c,N)=\{n\in\mathbb N:1\le n\le N,\ cN<n\}R(c,N)={n∈N:1≤n≤N, cN<n}.

Definition code
import Mathlib

open Real Finset ArithmeticFunction

namespace LL_Decomp1543a
noncomputable def rangeN (c : ℝ) (N : ℕ) : Finset ℕ := (Icc 1 N).filter (fun n => c * N < n)
end LL_Decomp1543a
Read-back

What the Lean code literally says, in plain math · claude-haiku

The declaration rangeN\mathrm{rangeN}rangeN takes a real number ccc and a natural number NNN and returns the finite set

rangeN(c,N)={ n∈N:1≤n≤N and c N<n }.\mathrm{rangeN}(c,N)=\{\,n\in\mathbb{N} : 1\le n\le N \text{ and } c\,N<n\,\}.rangeN(c,N)={n∈N:1≤n≤N and cN<n}.

The comparison cN<ncN<ncN<n is made in R\mathbb{R}R, with nnn viewed as a real number, and it is strict, so n=cNn=cNn=cN is excluded. No hypotheses are assumed. There is no division or natural-number subtraction, so no junk values arise. If N=0N=0N=0, the set is ∅\varnothing∅. If c≥1c\ge 1c≥1, then cN≥NcN\ge NcN≥N and the set is ∅\varnothing∅ for every NNN. If c≤0c\le 0c≤0, then cN≤0<ncN\le 0<ncN≤0<n for all n≥1n\ge 1n≥1, so the set is {1,…,N}\{1,\dots,N\}{1,…,N}. If N≥1N\ge 1N≥1 and c<1c<1c<1, then NNN lies in the set because cN<NcN<NcN<N, so the set is nonempty. The definition is therefore not vacuous.

Human review
  • Endorsed by Shuze Chen · Oct 29, 2026

    Confirmed by the moderator at approval.

  • Endorsed by sthubbar · Oct 29, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me