Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

General-N explicit roots and small-step expressions

Definition
GDGen3RootBase

by Somehow · Oct 12, 2026 · Mathlib 0df444a (Lean v4.33.1)

certificatedefinitionsgd-last-iterate-tight-boundgeneral-n

Explicit positive quadratic roots, reference roots, comparison polynomials, positivity recurrence and the small-step history expressions, all for arbitrary N.

Definition code
import Definitions.Def_GDGen3Base
import Mathlib

noncomputable section

open Finset

namespace GDGen3

def rootXi (r : ℝ) (N i : ℕ) : ℝ :=
  if i = 0 then 0 else if i < N then
    (-(1 + C r N i) + Real.sqrt ((1 + C r N i) ^ 2 + 4 * X r N i / pj r (i + 1))) / 2
  else 1

def referenceXi (r : ℝ) (i : ℕ) : ℝ :=
  (1 + (i : ℝ) * (1 + r) - 1 / r ^ i) / ((1 + r) * (1 + 1 / r ^ (i + 1)))

def rootPoly (r v : ℝ) (i : ℕ) (x : ℝ) : ℝ :=
  pj r (i + 1) * x * (1 + x + v * (i + 1) / ((1 + r) * pj r (i + 1)) - (1 - r) / (1 + r))
    - (v * (i : ℝ) * (i + 1) / 2 - (1 - r) * PiS r i) / (1 + r)

def rootE (r : ℝ) (i : ℕ) : ℝ :=
  (1 + r) / r ^ i - (1 - r) * (1 + (i : ℝ) * (1 + r)) - 2 * r

def rootNu (r : ℝ) (i : ℕ) : ℝ := (i + 1) / pj r (i + 1) - (i : ℝ) / pj r i

def rootJ (r v x : ℝ) (i : ℕ) : ℝ :=
  1 + pj r i / pj r (i + 1) - (1 - pj r i / pj r (i + 1)) * x + v / (1 + r) * rootNu r i

def smallK (N : ℕ) (h : ℝ) (f q : ℕ → ℝ) : ℝ :=
  2 * (∑ i ∈ range N, (f i - f N)) - (h - 1) * (∑ i ∈ range N, q i)
    - (N : ℝ) * (1 + (N : ℝ) * h) * q N

def scaledK (N : ℕ) (a s : ℝ) (f q : ℕ → ℝ) : ℝ :=
  2 * (∑ i ∈ range N, (f i - f N)) - s * (a - 1) * (∑ i ∈ range N, q i)
    - s * (N : ℝ) * (1 + (N : ℝ) * a) * q N

end GDGen3
Source
C:/Users/17632/Desktop/GD最终梯度紧界_任意N通用证明.md

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