carpool_threshold_A_diff
For any integer threshold D : ℤ and natural number k : ℕ, the forward difference carpool_threshold_A D (k + 1) - carpool_threshold_A D k equals D - 30 * (k : ℤ).
Statement
theorem carpool_threshold_A_diff (D : ℤ) (k : ℕ) :
carpool_threshold_A D (k + 1) - carpool_threshold_A D k = D - 30 * (k : ℤ)- Formalizes
- arXiv:2611.00388 Section 4.1
- Verified
- 07 Nov 2026
- Axioms
Quot.soundpropext- Built on 1
- carpool_threshold_AThe quadratic threshold function carpool_threshold_A taking an integer parameter D : ℤ and a natural number k : ℕ, defined as the integer…
- Used by 1
- carpool_backward_step_slack_increaseFor natural numbers n and T, an integer D, trajectory d : ℕ → Fin n → ℤ, and receiver/sender functions a, b : ℕ → Fin n satisfying for all…
Read back from the Lean
For every integer $D$ and every natural number $k$, the difference $\operatorname{carpool\_threshold\_A}(D, k + 1) - \operatorname{carpool\_threshold\_A}(D, k)$ is equal to $D - 30k$ (with $k$ coerced to an integer).
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
The proof, explained
The identity is proved by direct algebraic expansion. Unfolding the definition of carpool_threshold_A expresses the forward difference A(k+1) - A(k) as a polynomial expression in D and the integer cast of k. Polynomial ring normalization then verifies that this expression simplifies to D - 30 * k.
In terms of the integer coercion of $k$, the difference $A(k+1) - A(k)$ expands to $((k + 1) D - 15(k + 1)k) - (k D - 15k(k - 1))$.
Unfolding the definition $\text{carpool\_threshold\_A}(D, n) = n D - 15 n (n - 1)$ for $n = k + 1$ and $n = k$ expresses the difference explicitly. Applying `push_cast` distributes the coercion from $\mathbb{N}$ to $\mathbb{Z}$ across $k + 1$, converting $\uparrow(k + 1)$ into $\uparrow k + 1$.
unfold carpool_threshold_A push_cast
The expanded polynomial expression reduces to $D - 30k$.
Expanding both products over the ring of integers yields $(k D + D - 15k^2 - 15k) - (k D - 15k^2 + 15k)$. The higher-degree terms $k D$ and $-15k^2$ cancel, while $-15k - 15k$ simplifies to $-30k$, leaving $D - 30k$. The `ring` tactic verifies this polynomial identity.
ring
Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.
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.
/-- Forward increment of the threshold function: A(k+1) - A(k) = D - 30*k. -/theorem carpool_threshold_A_diff (D : ℤ) (k : ℕ) : carpool_threshold_A D (k + 1) - carpool_threshold_A D k = D - 30 * (k : ℤ) := by unfold carpool_threshold_A push_cast ring