Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Finite coefficient interval

Definition
LL_Decomp1543a_lRange

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

For natural NNN and real U,XU,XU,X, define L(N,U,X)={m∈N:1≤m≤N, U<m≤X}L(N,U,X)=\{m\in\mathbb N:1\le m\le N,\ U<m\le X\}L(N,U,X)={m∈N:1≤m≤N, U<m≤X}.

Definition code
import Mathlib

open Real Finset ArithmeticFunction

namespace LL_Decomp1543a
noncomputable def lRange (N : ℕ) (U X : ℝ) : Finset ℕ := (Icc 1 N).filter (fun m => U < m ∧ (m : ℝ) ≤ X)
end LL_Decomp1543a
Read-back

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

This file defines lRange(N,U,X)\mathrm{lRange}(N,U,X)lRange(N,U,X) for N∈NN \in \mathbb{N}N∈N and real U,XU, XU,X, as a finite set of natural numbers:

lRange(N,U,X)={ m∈N:1≤m≤N, U<m, m≤X }.\mathrm{lRange}(N,U,X) = \{\, m \in \mathbb{N} : 1 \le m \le N,\ U < m,\ m \le X \,\}.lRange(N,U,X)={m∈N:1≤m≤N, U<m, m≤X}.

Each mmm is compared with UUU and XXX as a real number. The conditions are joined by conjunction: m≥1m \ge 1m≥1, so 000 is excluded; m≤Nm \le Nm≤N; a strict lower bound U<mU < mU<m; and a non-strict upper bound m≤Xm \le Xm≤X. There are no hypotheses, so the definition applies to every NNN, UUU, XXX. The set is empty when N=0N = 0N=0, and also when no integer mmm with 1≤m≤N1 \le m \le N1≤m≤N lies in (U,X](U, X](U,X], for example when X≤UX \le UX≤U or U≥NU \ge NU≥N. There are no divisions or natural-number subtractions, so no junk values arise. The modifier noncomputable affects only code generation and does not change the set.

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