Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

The max-plus function is affine on a cell.

Proved
TropicalKernelDynamics.tropicalValue_sub_of_sameCell

by raver1975 · Sep 12, 2026 · Mathlib c5ea003 (Lean v4.30.0)

aether-catalogmachinelearning

The max-plus function is affine on a cell. Two points of the same cell differ by the linear form of the cell's piece.

theorem TropicalKernelDynamics.tropicalValue_sub_of_sameCell{a : Fin (M + 1) → (Fin P → ℝ)} {b : Fin (M + 1) → ℝ}
    {x y : Fin P → ℝ} (h : SameTropicalCell (activeSet a b) x y) :
    tropicalValue a b x - tropicalValue a b y
      = ∑ j, a (activePiece a b x) j * (x j - y j) := by sorry

Formalization Note Transplanted verbatim from the Aether Catalog source MachineLearning/TropicalNTKDynamics.lean; the statement is byte-identical to the source declaration, elaborated with autoImplicit disabled in the platform environment.

Preamble
-- Thm stub generated from MachineLearning/TropicalNTKDynamics.lean
import Mathlib
import Definitions.Def_MachineLearning_TropicalNTKDynamics

/-!
# Tropical cells and the freezing of a neural tangent kernel

`MachineLearning/NTKConvergence/Convergence.lean` uses a *tropical cell criterion* as its
geometric source of frozen kernels, but the module it imported for that criterion was
missing from this repository, so the whole `NTKConvergence` chapter failed to build.  This
file supplies it.

The idea is the one behind lazy training of piecewise-linear networks.  A max-plus
("tropical") function

  `T(x) = maxᵢ (⟨aᵢ, x⟩ + bᵢ)`

is affine on each *cell*, the region on which the set of maximizing indices is constant.
Its gradient — and hence any kernel built from the gradient — is therefore literally
constant along a trajectory that stays inside one cell.  `IsCellwiseConstant` abstracts
"constant on cells", `SameTropicalCell` abstracts "in the same cell", and
`tropical_lazy_training_of_cell_invariance` is the resulting freezing statement used
downstream.

## Main results

* `tropical_lazy_training_of_cell_invariance` — a cellwise-constant kernel is constant
  along a cell-confined trajectory.
* `tropicalValue_eq_of_mem_activeSet` — inside a cell the max-plus function *is* one of its
  affine pieces.
* `tropicalValue_sub_of_sameCell` — two points of the same cell differ by the linear form of
  that piece: the function is affine on the cell.
* `activeSetGrad_cellwiseConstant` — consequently the gradient, and any kernel assembled
  from it, is cellwise constant, which is exactly the hypothesis the NTK chapter needs.
-/

open TropicalKernelDynamics

/-! ### The abstract cell framework -/







/-! ### The tropical (max-plus) model that produces such cells -/

variable {M P : ℕ}
Formal statement
theorem TropicalKernelDynamics.tropicalValue_sub_of_sameCell{a : Fin (M + 1) → (Fin P → ℝ)} {b : Fin (M + 1) → ℝ}
    {x y : Fin P → ℝ} (h : SameTropicalCell (activeSet a b) x y) :
    tropicalValue a b x - tropicalValue a b y
      = ∑ j, a (activePiece a b x) j * (x j - y j) := by sorry
Source
https://github.com/paulklemstine/Lean/blob/53c2925a02/Catalog/MachineLearning/TropicalNTKDynamics.lean#L105

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