task_id stringlengths 21 23 | challenge_id stringlengths 16 16 | proof_assistant stringclasses 1
value | session stringclasses 1
value | repo stringclasses 57
values | revision stringclasses 57
values | file_path stringlengths 13 92 | theory stringlengths 1 48 | variant int64 0 132 | challenge_type stringclasses 1
value | difficulty null | count null | by_centrality bool 1
class | ablation_prob float64 0.5 0.5 | min_depth int64 1 1 | max_depth int64 1 1 | leaves_only bool 1
class | min_size int64 0 0 | max_size stringclasses 1
value | min_centrality int64 0 0 | max_centrality stringclasses 1
value | seed int64 42 42 | n_proofs int64 1 173 | n_ablated int64 1 60 | holes_filled listlengths 1 60 | deleted_lemmas listlengths 1 1 | corollaries listlengths 1 1 | closure_size int64 1 172 | challenge_file_content stringlengths 133 350k | solution_file_content stringlengths 394 351k | solution_diff stringlengths 243 134k | manifest dict |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ablate_94e860d2a765_8 | 0592b991659f6087 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/Tensor/Basic/FactorizationsOrthonormal.lean | FactorizationsOrthonormal | 8 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 12 | 2 | [
{
"theorem_name": "QT_mul_Q_eq_one",
"depth": 1,
"n_commands": 0,
"n_lines": 7,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n ext a b\n rw [Matrix.mul_apply]\n simp only [Matrix.transpose_apply, Matrix.of_apply, Matrix.one_apply]\n rw [show (∑ i,... | [
{
"name": "Q_orthonormal",
"text": "/-- **Orthonormality of the executable `Q` columns.** Under positive `R` pivots,\n`qₐ · q_b = δₐᵦ`. -/\ntheorem Q_orthonormal (A : Fin m → Fin n → ℝ) (hrank : ∀ j : Fin n, 0 < Rmat A j j) (a b : Fin n) :\n Spec.dotFn (Qcol A a) (Qcol A b) = if a = b then 1 else 0 := by... | [
{
"name": "qrSpec_orthonormal",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 11,
"n_lines": 15,
"n_chars": 929,
"n_subproofs": 2,
"n_tactics": 10,
"cyclomatic": 1,
"n_automation": 4,
"n_rewrites": 4,
"n_structural": 2,
"automation_only": false,
"max_n... | 11 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.Tensor.Basic.FactorizationsReconstruction
public import Mathlib.Analysis.InnerProductSpace.GramSchmidtOrtho
public import Mathlib.Analysis.InnerProductSpace.PiL2
/-!
... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.Tensor.Basic.FactorizationsReconstruction
public import Mathlib.Analysis.InnerProductSpace.GramSchmidtOrtho
public import Mathlib.Analysis.InnerProductSpace.PiL2
/-!
... | @@ -200,12 +200,31 @@
rw [gn_eq]
exact smul_ne_zero (inv_ne_zero (ne_of_gt hpos)) (norm_pos_iff.mp hpos)
+/-- **Orthonormality of the executable `Q` columns.** Under positive `R` pivots,
+`qₐ · q_b = δₐᵦ`. -/
+theorem Q_orthonormal (A : Fin m → Fin n → ℝ) (hrank : ∀ j : Fin n, 0 < Rmat A j j) (a b : Fin n) :
+ ... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_2541278788dd_0 | ba8b1708e58b4f85 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Floats/IEEEExec/Reductions.lean | Reductions | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 8 | 1 | [
{
"theorem_name": "leafCount_ge_one",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": "\n Nat.succ_le_iff.mp (leafCount_pos t)",
"n_chars": 39,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,
... | [
{
"name": "leafCount_pos",
"text": "/-- A reduction tree always has at least one leaf. -/\ntheorem leafCount_pos (t : SumTree α) : 0 < t.leafCount := by\n induction t with\n | leaf => simp [leafCount]\n | node a b ihA ihB =>\n -- `0 < a + b` since `0 < a`.\n simpa [leafCount] using Nat.add_pos_... | [
{
"name": "leafCount_ge_one",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 5,
"n_chars": 176,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": false,
"max_nestin... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Algebra.Order.GroupWithZero.Basic
public import Mathlib.Data.List.Permutation
public import NN.Floats.IEEEExec.BridgeFP32Total
import Mathlib.Tactic.Linarith
import Math... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Algebra.Order.GroupWithZero.Basic
public import Mathlib.Data.List.Permutation
public import NN.Floats.IEEEExec.BridgeFP32Total
import Mathlib.Tactic.Linarith
import Math... | @@ -102,8 +102,17 @@
| leaf _ => 1
| node a b => leafCount a + leafCount b
+/-- A reduction tree always has at least one leaf. -/
+theorem leafCount_pos (t : SumTree α) : 0 < t.leafCount := by
+ induction t with
+ | leaf => simp [leafCount]
+ | node a b ihA ihB =>
+ -- `0 < a + b` since `0 < a`.
+ ... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_2541278788dd_1 | f4db5d78ef357691 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Floats/IEEEExec/Reductions.lean | Reductions | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 8 | 1 | [
{
"theorem_name": "evalRound_enclosure_of_LocalAddBound",
"depth": 1,
"n_commands": 0,
"n_lines": 162,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro t\n induction t with\n | leaf x =>\n simp [evalRound, exactSum, sumAbs, SumTree.leafCou... | [
{
"name": "sumAbs_nonneg",
"text": "/-- `sumAbs leafVal t` is always nonnegative. -/\ntheorem sumAbs_nonneg (leafVal : α → ℝ) (t : SumTree α) : 0 ≤ sumAbs leafVal t := by\n induction t with\n | leaf x => simp [sumAbs]\n | node a b ihA ihB => simpa [sumAbs] using add_nonneg ihA ihB\n\n",
"fan_in": 1,
... | [
{
"name": "evalRound_enclosure_of_LocalAddBound",
"fan_in": 2,
"n_deps_direct": 4,
"n_deps_transitive": 5,
"n_lines": 177,
"n_chars": 9241,
"n_subproofs": 46,
"n_tactics": 137,
"cyclomatic": 2,
"n_automation": 29,
"n_rewrites": 4,
"n_structural": 18,
"automation_o... | 5 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Algebra.Order.GroupWithZero.Basic
public import Mathlib.Data.List.Permutation
public import NN.Floats.IEEEExec.BridgeFP32Total
import Mathlib.Tactic.Linarith
import Math... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Algebra.Order.GroupWithZero.Basic
public import Mathlib.Data.List.Permutation
public import NN.Floats.IEEEExec.BridgeFP32Total
import Mathlib.Tactic.Linarith
import Math... | @@ -164,6 +164,12 @@
| .leaf x => _root_.abs (leafVal x)
| .node a b => sumAbs leafVal a + sumAbs leafVal b
+/-- `sumAbs leafVal t` is always nonnegative. -/
+theorem sumAbs_nonneg (leafVal : α → ℝ) (t : SumTree α) : 0 ≤ sumAbs leafVal t := by
+ induction t with
+ | leaf x => simp [sumAbs]
+ | node a b ihA i... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_2541278788dd_2 | f08877db89e78936 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Floats/IEEEExec/Reductions.lean | Reductions | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 8 | 1 | [
{
"theorem_name": "evalRound_enclosure_of_LocalAddBound",
"depth": 1,
"n_commands": 0,
"n_lines": 162,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro t\n induction t with\n | leaf x =>\n simp [evalRound, exactSum, sumAbs, SumTree.leafCou... | [
{
"name": "abs_exactSum_le_sumAbs",
"text": "/--\nTriangle-inequality bound: the absolute value of the exact sum is at most the sum of absolute\nvalues.\n\nThis is the standard inequality `|Σ a_i| ≤ Σ |a_i|` proved by induction on the tree shape.\n-/\ntheorem abs_exactSum_le_sumAbs (leafVal : α → ℝ) (t : Su... | [
{
"name": "sumTreeResult_enclosure",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 7,
"n_lines": 70,
"n_chars": 2959,
"n_subproofs": 3,
"n_tactics": 13,
"cyclomatic": 2,
"n_automation": 2,
"n_rewrites": 1,
"n_structural": 3,
"automation_only": false,
"... | 7 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Algebra.Order.GroupWithZero.Basic
public import Mathlib.Data.List.Permutation
public import NN.Floats.IEEEExec.BridgeFP32Total
import Mathlib.Tactic.Linarith
import Math... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Algebra.Order.GroupWithZero.Basic
public import Mathlib.Data.List.Permutation
public import NN.Floats.IEEEExec.BridgeFP32Total
import Mathlib.Tactic.Linarith
import Math... | @@ -171,6 +171,27 @@
| node a b ihA ihB => simpa [sumAbs] using add_nonneg ihA ihB
/--
+Triangle-inequality bound: the absolute value of the exact sum is at most the sum of absolute
+values.
+
+This is the standard inequality `|Σ a_i| ≤ Σ |a_i|` proved by induction on the tree shape.
+-/
+theorem abs_exactSum_le_... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_2541278788dd_3 | 9a47ed4ee0275c88 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Floats/IEEEExec/Reductions.lean | Reductions | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 8 | 1 | [
{
"theorem_name": "evalRound_enclosure_of_LocalAddBound",
"depth": 1,
"n_commands": 0,
"n_lines": 162,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro t\n induction t with\n | leaf x =>\n simp [evalRound, exactSum, sumAbs, SumTree.leafCou... | [
{
"name": "abs_exactSum_le_sumAbs",
"text": "/--\nTriangle-inequality bound: the absolute value of the exact sum is at most the sum of absolute\nvalues.\n\nThis is the standard inequality `|Σ a_i| ≤ Σ |a_i|` proved by induction on the tree shape.\n-/\ntheorem abs_exactSum_le_sumAbs (leafVal : α → ℝ) (t : Su... | [
{
"name": "dotTreeResult_enclosure",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 7,
"n_lines": 35,
"n_chars": 1582,
"n_subproofs": 3,
"n_tactics": 14,
"cyclomatic": 2,
"n_automation": 2,
"n_rewrites": 1,
"n_structural": 3,
"automation_only": false,
"... | 7 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Algebra.Order.GroupWithZero.Basic
public import Mathlib.Data.List.Permutation
public import NN.Floats.IEEEExec.BridgeFP32Total
import Mathlib.Tactic.Linarith
import Math... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Algebra.Order.GroupWithZero.Basic
public import Mathlib.Data.List.Permutation
public import NN.Floats.IEEEExec.BridgeFP32Total
import Mathlib.Tactic.Linarith
import Math... | @@ -171,6 +171,27 @@
| node a b ihA ihB => simpa [sumAbs] using add_nonneg ihA ihB
/--
+Triangle-inequality bound: the absolute value of the exact sum is at most the sum of absolute
+values.
+
+This is the standard inequality `|Σ a_i| ≤ Σ |a_i|` proved by induction on the tree shape.
+-/
+theorem abs_exactSum_le_... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_086dbfb1e5f3_0 | 5a9fc7ada133b20f | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Floats/IEEEExec/BridgeFP32/RoundDyadic.lean | RoundDyadic | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 1 | 3 | [
{
"theorem_name": "toReal_posZero",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simpa using (toReal_signedZero (s := false))",
"n_chars": 50,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic"... | [
{
"name": "toReal_signedZero",
"text": "/--\nBoth `+0` and `-0` decode to the real number `0`.\n\nIEEE-754 has signed zeros because they matter for some operations (notably division and some\ntranscendentals). Our finite `FP32` model treats them as equal at the real level, and the bridge\nlemmas in this fil... | [
{
"name": "toReal_posZero",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 5,
"n_chars": 165,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,
"max_nesting":... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Floats.IEEEExec.BridgeFP32.RatBounds
/-!
# IEEE32Exec and FP32: Dyadic Rounder Correctness
-/
@[expose] public section
namespace TorchLean.Floats.IEEE754
open TorchLean.F... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Floats.IEEEExec.BridgeFP32.RatBounds
/-!
# IEEE32Exec and FP32: Dyadic Rounder Correctness
-/
@[expose] public section
namespace TorchLean.Floats.IEEE754
open TorchLean.F... | @@ -22,11 +22,35 @@
/-! ### Signed zeros -/
+/--
+Both `+0` and `-0` decode to the real number `0`.
+
+IEEE-754 has signed zeros because they matter for some operations (notably division and some
+transcendentals). Our finite `FP32` model treats them as equal at the real level, and the bridge
+lemmas in this file ... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_086dbfb1e5f3_1 | f3674b7c6e43138f | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Floats/IEEEExec/BridgeFP32/RoundDyadic.lean | RoundDyadic | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 1 | 3 | [
{
"theorem_name": "toReal_posZero",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simpa using (toReal_signedZero (s := false))",
"n_chars": 50,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic"... | [
{
"name": "toReal_signedZero",
"text": "/--\nBoth `+0` and `-0` decode to the real number `0`.\n\nIEEE-754 has signed zeros because they matter for some operations (notably division and some\ntranscendentals). Our finite `FP32` model treats them as equal at the real level, and the bridge\nlemmas in this fil... | [
{
"name": "toReal_roundDyadicToIEEE32_eq_fp32Round",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 1048,
"n_chars": 60873,
"n_subproofs": 254,
"n_tactics": 934,
"cyclomatic": 20,
"n_automation": 215,
"n_rewrites": 21,
"n_structural": 43,
"aut... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Floats.IEEEExec.BridgeFP32.RatBounds
/-!
# IEEE32Exec and FP32: Dyadic Rounder Correctness
-/
@[expose] public section
namespace TorchLean.Floats.IEEE754
open TorchLean.F... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Floats.IEEEExec.BridgeFP32.RatBounds
/-!
# IEEE32Exec and FP32: Dyadic Rounder Correctness
-/
@[expose] public section
namespace TorchLean.Floats.IEEE754
open TorchLean.F... | @@ -22,11 +22,35 @@
/-! ### Signed zeros -/
+/--
+Both `+0` and `-0` decode to the real number `0`.
+
+IEEE-754 has signed zeros because they matter for some operations (notably division and some
+transcendentals). Our finite `FP32` model treats them as equal at the real level, and the bridge
+lemmas in this file ... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_c5bc123bf59f_0 | f1e46753b02c2973 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/MLTheory/CROWN/Proofs/AlphaBetaReLUScalarSoundness.lean | AlphaBetaReLUScalarSoundness | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 5 | 1 | [
{
"theorem_name": "alphaRelaxLowerScalar_sound",
"depth": 1,
"n_commands": 0,
"n_lines": 10,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n unfold alphaRelaxLowerScalar\n by_cases hu : u > 0\n · by_cases hlpos : l > 0\n · have hxpos : 0 < x := l... | [
{
"name": "relu_ge_alpha_mul",
"text": "private lemma relu_ge_alpha_mul (a z : ℝ) (ha0 : 0 ≤ a) (ha1 : a ≤ 1) :\n a * z ≤ Activation.Math.reluSpec (α := ℝ) z := by\n by_cases hz : z ≤ 0\n · have : a * z ≤ 0 := mul_nonpos_of_nonneg_of_nonpos ha0 hz\n simpa [Activation.Math.reluSpec, max_eq_right hz] ... | [
{
"name": "alphaRelaxLowerScalar_sound",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 15,
"n_chars": 700,
"n_subproofs": 3,
"n_tactics": 10,
"cyclomatic": 1,
"n_automation": 3,
"n_rewrites": 1,
"n_structural": 0,
"automation_only": false,
... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.MLTheory.CROWN.Cert.AlphaBetaCROWN
public import NN.MLTheory.CROWN.Cert.AlphaCROWN
public import NN.Spec.Layers.Activation
import Mathlib.Tactic.Linarith
import Mathlib.Tacti... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.MLTheory.CROWN.Cert.AlphaBetaCROWN
public import NN.MLTheory.CROWN.Cert.AlphaCROWN
public import NN.Spec.Layers.Activation
import Mathlib.Tactic.Linarith
import Mathlib.Tacti... | @@ -35,6 +35,15 @@
noncomputable section
+private lemma relu_ge_alpha_mul (a z : ℝ) (ha0 : 0 ≤ a) (ha1 : a ≤ 1) :
+ a * z ≤ Activation.Math.reluSpec (α := ℝ) z := by
+ by_cases hz : z ≤ 0
+ · have : a * z ≤ 0 := mul_nonpos_of_nonneg_of_nonpos ha0 hz
+ simpa [Activation.Math.reluSpec, max_eq_right hz] using... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_c5bc123bf59f_1 | 0687dfdc0127c53c | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/MLTheory/CROWN/Proofs/AlphaBetaReLUScalarSoundness.lean | AlphaBetaReLUScalarSoundness | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 5 | 2 | [
{
"theorem_name": "phaseRelaxUpperScalar_sound",
"depth": 1,
"n_commands": 0,
"n_lines": 13,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n cases ph with\n | inactive =>\n have hu0 : u ≤ 0 := phaseConsistent_inactive_of_some (l := l) (u := u) h... | [
{
"name": "phaseConsistent_inactive_of_some",
"text": "private lemma phaseConsistent_inactive_of_some (l u : ℝ)\n (h : phaseConsistentScalar? (α := ℝ) l u ReLUPhase.inactive = some ()) :\n u ≤ 0 := by\n -- `inactive` checks `¬ (0 < u)` via the executable `if u > 0 then none else some ()`.\n unfold p... | [
{
"name": "phaseRelaxUpperScalar_sound",
"fan_in": 0,
"n_deps_direct": 3,
"n_deps_transitive": 3,
"n_lines": 19,
"n_chars": 916,
"n_subproofs": 4,
"n_tactics": 13,
"cyclomatic": 2,
"n_automation": 3,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": false,
... | 3 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.MLTheory.CROWN.Cert.AlphaBetaCROWN
public import NN.MLTheory.CROWN.Cert.AlphaCROWN
public import NN.Spec.Layers.Activation
import Mathlib.Tactic.Linarith
import Mathlib.Tacti... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.MLTheory.CROWN.Cert.AlphaBetaCROWN
public import NN.MLTheory.CROWN.Cert.AlphaCROWN
public import NN.Spec.Layers.Activation
import Mathlib.Tactic.Linarith
import Mathlib.Tacti... | @@ -35,6 +35,16 @@
noncomputable section
+private lemma phaseConsistent_inactive_of_some (l u : ℝ)
+ (h : phaseConsistentScalar? (α := ℝ) l u ReLUPhase.inactive = some ()) :
+ u ≤ 0 := by
+ -- `inactive` checks `¬ (0 < u)` via the executable `if u > 0 then none else some ()`.
+ unfold phaseConsistentScalar... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_c5bc123bf59f_2 | 49b536d6cc028039 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/MLTheory/CROWN/Proofs/AlphaBetaReLUScalarSoundness.lean | AlphaBetaReLUScalarSoundness | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 5 | 2 | [
{
"theorem_name": "phaseRelaxUpperScalar_sound",
"depth": 1,
"n_commands": 0,
"n_lines": 13,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n cases ph with\n | inactive =>\n have hu0 : u ≤ 0 := phaseConsistent_inactive_of_some (l := l) (u := u) h... | [
{
"name": "phaseConsistent_inactive_of_some",
"text": "private lemma phaseConsistent_inactive_of_some (l u : ℝ)\n (h : phaseConsistentScalar? (α := ℝ) l u ReLUPhase.inactive = some ()) :\n u ≤ 0 := by\n -- `inactive` checks `¬ (0 < u)` via the executable `if u > 0 then none else some ()`.\n unfold p... | [
{
"name": "phaseRelaxLowerScalar_sound",
"fan_in": 0,
"n_deps_direct": 3,
"n_deps_transitive": 4,
"n_lines": 21,
"n_chars": 1014,
"n_subproofs": 4,
"n_tactics": 13,
"cyclomatic": 2,
"n_automation": 3,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": false,
... | 4 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.MLTheory.CROWN.Cert.AlphaBetaCROWN
public import NN.MLTheory.CROWN.Cert.AlphaCROWN
public import NN.Spec.Layers.Activation
import Mathlib.Tactic.Linarith
import Mathlib.Tacti... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.MLTheory.CROWN.Cert.AlphaBetaCROWN
public import NN.MLTheory.CROWN.Cert.AlphaCROWN
public import NN.Spec.Layers.Activation
import Mathlib.Tactic.Linarith
import Mathlib.Tacti... | @@ -35,6 +35,16 @@
noncomputable section
+private lemma phaseConsistent_inactive_of_some (l u : ℝ)
+ (h : phaseConsistentScalar? (α := ℝ) l u ReLUPhase.inactive = some ()) :
+ u ≤ 0 := by
+ -- `inactive` checks `¬ (0 < u)` via the executable `if u > 0 then none else some ()`.
+ unfold phaseConsistentScalar... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_536aa6e68e35_0 | 49d675c010b061ef | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Verification/TorchLean/Proved/Public.lean | Public | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 1 | 1 | [
{
"theorem_name": "runForwardIR_eq_forward",
"depth": 1,
"n_commands": 0,
"n_lines": 3,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": "\n runForwardIR_eq_evalForward (α := α) (paramShapes := paramShapes) (inShape := inShape)\n (outShape := outShape) p p... | [
{
"name": "runForwardIR_eq_evalForward",
"text": "/-- Main end-to-end compiler correctness using the short name. -/\ntheorem runForwardIR_eq_evalForward\n {α : Type} [Context α] [DecidableEq Shape]\n {paramShapes : List Shape} {inShape outShape : Shape}\n (p : Program α paramShapes inShape outShape... | [
{
"name": "runForwardIR_eq_forward",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 19,
"n_chars": 877,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": false,
"ma... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Verification.TorchLean.Proved.Correctness
/-!
# Verified Forward Fragment: Public Names
Short public names for the compiler and its two main correctness theorems.
-/
@[exp... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Verification.TorchLean.Proved.Correctness
/-!
# Verified Forward Fragment: Public Names
Short public names for the compiler and its two main correctness theorems.
-/
@[exp... | @@ -31,6 +31,23 @@
NN.Verification.TorchLean.CompiledIR α :=
compileVerifiedForward (α := α) (paramShapes := paramShapes) (inShape := inShape) (outShape := outShape) p params
+/-- Main end-to-end compiler correctness using the short name. -/
+theorem runForwardIR_eq_evalForward
+ {α : Type} [Context α] [De... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_f15d5bbc4b75_0 | f5bc35c2ca923e7d | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Floats/IEEEExec/RatScaling.lean | RatScaling | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 4 | 1 | [
{
"theorem_name": "dyadicToReal_div_eq_signedRat_mul",
"depth": 1,
"n_commands": 0,
"n_lines": 66,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n classical\n set sign : Bool := Bool.xor dx.sign dy.sign\n set eDiff : Int := dx.exp - dy.exp\n have h... | [
{
"name": "scaleRat_ofNat",
"text": "/-- Scale a rational by a nonnegative exponent difference by shifting the numerator. -/\nlemma scaleRat_ofNat (num den sh : Nat) :\n ((num : ℝ) / (den : ℝ)) * neuralBpow binaryRadix (Int.ofNat sh) =\n ((Nat.shiftLeft num sh : Nat) : ℝ) / (den : ℝ) := by\n have h... | [
{
"name": "dyadicToReal_div_eq_signedRat_mul",
"fan_in": 1,
"n_deps_direct": 3,
"n_deps_transitive": 3,
"n_lines": 81,
"n_chars": 3939,
"n_subproofs": 14,
"n_tactics": 67,
"cyclomatic": 9,
"n_automation": 15,
"n_rewrites": 2,
"n_structural": 2,
"automation_only": ... | 3 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Algebra.Order.Field.Basic
public import Mathlib.Data.Nat.Bitwise
public import NN.Floats.IEEEExec.Exec32
public import NN.Floats.NeuralFloat.Core
/-!
# RatScaling
Smal... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Algebra.Order.Field.Basic
public import Mathlib.Data.Nat.Bitwise
public import NN.Floats.IEEEExec.Exec32
public import NN.Floats.NeuralFloat.Core
/-!
# RatScaling
Smal... | @@ -42,6 +42,24 @@
let s : ℝ := if d.sign then (-1 : ℝ) else (1 : ℝ)
s * (d.mant : ℝ) * neuralBpow binaryRadix d.exp
+/-- Scale a rational by a nonnegative exponent difference by shifting the numerator. -/
+lemma scaleRat_ofNat (num den sh : Nat) :
+ ((num : ℝ) / (den : ℝ)) * neuralBpow binaryRadix (Int.ofNa... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_f15d5bbc4b75_1 | d6ef4547488e2335 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Floats/IEEEExec/RatScaling.lean | RatScaling | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 4 | 1 | [
{
"theorem_name": "dyadicToReal_div_eq_signedRat_mul",
"depth": 1,
"n_commands": 0,
"n_lines": 66,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n classical\n set sign : Bool := Bool.xor dx.sign dy.sign\n set eDiff : Int := dx.exp - dy.exp\n have h... | [
{
"name": "scaleRat_negSucc",
"text": "/-- Scale a rational by a negative exponent difference by shifting the denominator. -/\nlemma scaleRat_negSucc (num den sh : Nat) :\n ((num : ℝ) / (den : ℝ)) * neuralBpow binaryRadix (Int.negSucc sh) =\n (num : ℝ) / ((Nat.shiftLeft den (sh + 1) : Nat) : ℝ) := b... | [
{
"name": "dyadicToReal_div_eq_signedRat",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 4,
"n_lines": 20,
"n_chars": 787,
"n_subproofs": 0,
"n_tactics": 6,
"cyclomatic": 3,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": false,
... | 4 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Algebra.Order.Field.Basic
public import Mathlib.Data.Nat.Bitwise
public import NN.Floats.IEEEExec.Exec32
public import NN.Floats.NeuralFloat.Core
/-!
# RatScaling
Smal... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Algebra.Order.Field.Basic
public import Mathlib.Data.Nat.Bitwise
public import NN.Floats.IEEEExec.Exec32
public import NN.Floats.NeuralFloat.Core
/-!
# RatScaling
Smal... | @@ -60,6 +60,27 @@
_ = ((Nat.shiftLeft num sh : Nat) : ℝ) / (den : ℝ) := by
rw [hnumShift]
+/-- Scale a rational by a negative exponent difference by shifting the denominator. -/
+lemma scaleRat_negSucc (num den sh : Nat) :
+ ((num : ℝ) / (den : ℝ)) * neuralBpow binaryRadix (Int.negSucc sh) =
+ (n... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_98e7d074ef21_0 | c54f06f6fec96f96 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/MLTheory/LearningTheory/Stability/RidgeRegression1D/Real.lean | Real | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 4 | 4 | [
{
"theorem_name": "Y_nonneg",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": "\n le_trans (abs_nonneg z.y) z.abs_y_le",
"n_chars": 39,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,
"n_autom... | [
{
"name": "abs_y_le",
"text": "/-- The `y` coordinate satisfies the declared bound `|y| ≤ Y`. -/\ntheorem abs_y_le (z : BoundedExample X Y) : |z.y| ≤ Y := z.2.2\n\n",
"fan_in": 4,
"n_lines": 4,
"n_chars": 134,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,
"n_automation": 0,
... | [
{
"name": "Y_nonneg",
"fan_in": 2,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 5,
"n_chars": 163,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": false,
"max_nesting": 2
... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Algebra.BigOperators.Group.Finset.Basic
public import Mathlib.Algebra.Order.BigOperators.Group.Finset
public import Mathlib.Algebra.Order.Ring.Abs
public import Mathlib.... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Algebra.BigOperators.Group.Finset.Basic
public import Mathlib.Algebra.Order.BigOperators.Group.Finset
public import Mathlib.Algebra.Order.Ring.Abs
public import Mathlib.... | @@ -115,12 +115,16 @@
/-- The `x` coordinate satisfies the declared bound `|x| ≤ X`. -/
theorem abs_x_le (z : BoundedExample X Y) : |z.x| ≤ X := z.2.1
+/-- The `y` coordinate satisfies the declared bound `|y| ≤ Y`. -/
+theorem abs_y_le (z : BoundedExample X Y) : |z.y| ≤ Y := z.2.2
+
/-- The declared bound `X` is n... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_98e7d074ef21_1 | 3e306f6a0061e755 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/MLTheory/LearningTheory/Stability/RidgeRegression1D/Real.lean | Real | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 4 | 2 | [
{
"theorem_name": "denom_pos",
"depth": 1,
"n_commands": 0,
"n_lines": 4,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have h1 : 0 ≤ sumXX (n := n) S := sumXX_nonneg (n := n) (X := X) (Y := Y) S\n have h2 : 0 < lam * N (n := n) := mul_pos hlam (N_... | [
{
"name": "sumXX_nonneg",
"text": "/-! `sumXX` is nonnegative (it is a sum of squares). -/\nprivate lemma sumXX_nonneg (S : Dataset (n + 1) (BoundedExample X Y)) :\n 0 ≤ sumXX (n := n) S := by\n classical\n refine Finset.sum_nonneg ?_\n intro i hi\n have : 0 ≤ (Dataset.get S i).x ^ 2 := by nlinarith\... | [
{
"name": "denom_pos",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 12,
"n_chars": 466,
"n_subproofs": 2,
"n_tactics": 4,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": false,
"max_nesting": 2
... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Algebra.BigOperators.Group.Finset.Basic
public import Mathlib.Algebra.Order.BigOperators.Group.Finset
public import Mathlib.Algebra.Order.Ring.Abs
public import Mathlib.... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Algebra.BigOperators.Group.Finset.Basic
public import Mathlib.Algebra.Order.BigOperators.Group.Finset
public import Mathlib.Algebra.Order.Ring.Abs
public import Mathlib.... | @@ -233,6 +233,15 @@
lemma N_pos : 0 < N (n := n) := by
simpa [N] using (Nat.cast_pos.mpr (Nat.succ_pos n))
+/-! `sumXX` is nonnegative (it is a sum of squares). -/
+private lemma sumXX_nonneg (S : Dataset (n + 1) (BoundedExample X Y)) :
+ 0 ≤ sumXX (n := n) S := by
+ classical
+ refine Finset.sum_nonneg ?_
... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_98e7d074ef21_2 | 67883f2f6cdca182 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/MLTheory/LearningTheory/Stability/RidgeRegression1D/Real.lean | Real | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 4 | 2 | [
{
"theorem_name": "abs_sumXY_sub_replaceAt_le",
"depth": 1,
"n_commands": 0,
"n_lines": 31,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n classical\n have hdiff :\n sumXY (n := n) S - sumXY (n := n) (replaceAt S i z') =\n (Dataset.get S... | [
{
"name": "sum_replaceAt_sub",
"text": "/--\nIf you replace a single element of a dataset, then the change in a sum over the dataset can be\nwritten as a single-term difference.\n\nThis is a standard “finite sum perturbation” identity and is the main combinatorial input needed\nto control `sumXX` and `sumXY... | [
{
"name": "abs_sumXY_sub_replaceAt_le",
"fan_in": 0,
"n_deps_direct": 4,
"n_deps_transitive": 4,
"n_lines": 41,
"n_chars": 1895,
"n_subproofs": 10,
"n_tactics": 30,
"cyclomatic": 1,
"n_automation": 7,
"n_rewrites": 0,
"n_structural": 5,
"automation_only": false,
... | 2 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Algebra.BigOperators.Group.Finset.Basic
public import Mathlib.Algebra.Order.BigOperators.Group.Finset
public import Mathlib.Algebra.Order.Ring.Abs
public import Mathlib.... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Algebra.BigOperators.Group.Finset.Basic
public import Mathlib.Algebra.Order.BigOperators.Group.Finset
public import Mathlib.Algebra.Order.Ring.Abs
public import Mathlib.... | @@ -163,6 +163,56 @@
variable {X Y : ℝ}
+/--
+If you replace a single element of a dataset, then the change in a sum over the dataset can be
+written as a single-term difference.
+
+This is a standard “finite sum perturbation” identity and is the main combinatorial input needed
+to control `sumXX` and `sumXY` unde... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_1b46c2877d60_0 | bd50d48c6431bea7 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/RuntimeApprox/FP32/CROWN.lean | CROWN | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 2 | 1 | [
{
"theorem_name": "box_contains_inflateUniform_of_approx",
"depth": 1,
"n_commands": 0,
"n_lines": 46,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n induction s with\n | scalar =>\n cases B with\n | mk lo hi =>\n cases lo with\n ... | [
{
"name": "interval_contains_inflate_of_abs_error",
"text": "/--\nIf a real value `y` lies in `[l, u]` and a runtime value `yR` is within `eps` of `y`, then the\ninterpreted runtime value lies in the widened interval `[l - eps, u + eps]`.\n\nThis is the scalar heart of the FP32/CROWN bridge.\n-/\ntheorem in... | [
{
"name": "box_contains_inflateUniform_of_approx",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 60,
"n_chars": 2766,
"n_subproofs": 5,
"n_tactics": 46,
"cyclomatic": 12,
"n_automation": 3,
"n_rewrites": 0,
"n_structural": 12,
"automation_onl... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.MLTheory.CROWN.Models.Mlp
public import NN.Proofs.RuntimeApprox.FP32.MLP
/-!
# FP32 CROWN/IBP Integration
The CROWN/IBP development (`NN/MLTheory/CROWN/*`) proves *real-val... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.MLTheory.CROWN.Models.Mlp
public import NN.Proofs.RuntimeApprox.FP32.MLP
/-!
# FP32 CROWN/IBP Integration
The CROWN/IBP development (`NN/MLTheory/CROWN/*`) proves *real-val... | @@ -41,6 +41,27 @@
/-! ## Scalar Margin Lemmas -/
+/--
+If a real value `y` lies in `[l, u]` and a runtime value `yR` is within `eps` of `y`, then the
+interpreted runtime value lies in the widened interval `[l - eps, u + eps]`.
+
+This is the scalar heart of the FP32/CROWN bridge.
+-/
+theorem interval_contains_i... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_1b46c2877d60_1 | 41694dba0be844a6 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/RuntimeApprox/FP32/CROWN.lean | CROWN | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 2 | 1 | [
{
"theorem_name": "ibpBound_contains_reluTwoLayerMlp_float32",
"depth": 1,
"n_commands": 0,
"n_lines": 38,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n -- Real IBP box contains the real forward output.\n have hyS :\n NN.MLTheory.CROWN.Box.con... | [
{
"name": "box_contains_inflateUniform_of_approx",
"text": "/--\nTensor version of `interval_contains_inflate_of_abs_error`.\n\nIf the real-spec output `yS` is inside a real CROWN/IBP box `B`, and the FP32 runtime output `yR`\napproximates `yS` within uniform `eps`, then the interpreted FP32 output is insid... | [
{
"name": "ibpBound_contains_reluTwoLayerMlp_float32",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 2,
"n_lines": 70,
"n_chars": 3822,
"n_subproofs": 1,
"n_tactics": 31,
"cyclomatic": 2,
"n_automation": 1,
"n_rewrites": 1,
"n_structural": 3,
"automation_o... | 2 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.MLTheory.CROWN.Models.Mlp
public import NN.Proofs.RuntimeApprox.FP32.MLP
/-!
# FP32 CROWN/IBP Integration
The CROWN/IBP development (`NN/MLTheory/CROWN/*`) proves *real-val... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.MLTheory.CROWN.Models.Mlp
public import NN.Proofs.RuntimeApprox.FP32.MLP
/-!
# FP32 CROWN/IBP Integration
The CROWN/IBP development (`NN/MLTheory/CROWN/*`) proves *real-val... | @@ -75,6 +75,65 @@
, hi := Tensor.addSpec B.hi (Spec.fill (α := ℝ) eps s) }
/--
+Tensor version of `interval_contains_inflate_of_abs_error`.
+
+If the real-spec output `yS` is inside a real CROWN/IBP box `B`, and the FP32 runtime output `yR`
+approximates `yS` within uniform `eps`, then the interpreted FP32 outpu... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_5c88fd271524_0 | 80719ad757dafc4d | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/RuntimeApprox/NF/Ops/Scalar.lean | Scalar | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 1 | [
{
"theorem_name": "toSpec_zero",
"depth": 1,
"n_commands": 0,
"n_lines": 7,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n -- `0 : R` is `NF.ofReal 0`, so `toSpec 0` is `NF.roundR 0`.\n change (TorchLean.Floats.NF.ofReal (β := β) (fexp := fexp) (rnd... | [
{
"name": "NF_roundR_zero",
"text": "/-- The `NF.roundR` wrapper also rounds `0` to `0`. -/\nprivate lemma NF_roundR_zero : TorchLean.Floats.NF.roundR (β := β) (fexp := fexp) (rnd := rnd) (0 :\n ℝ) = 0 := by\n have hrnd0 : rnd (0 : ℝ) = 0 := by\n simpa using (NeuralValidRnd.id (rnd := rnd) (n := (0 : ℤ... | [
{
"name": "toSpec_zero",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 9,
"n_chars": 463,
"n_subproofs": 0,
"n_tactics": 5,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 1,
"n_structural": 0,
"automation_only": false,
"max_nesting": 4... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.RuntimeApprox.NF.Ops.Plumbing
/-!
# NF Scalar Primitive Bounds
Scalar bridge lemmas and forward-error bounds for rounded `NF` primitives. These are the facts
that l... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.RuntimeApprox.NF.Ops.Plumbing
/-!
# NF Scalar Primitive Bounds
Scalar bridge lemmas and forward-error bounds for rounded `NF` primitives. These are the facts
that l... | @@ -53,8 +53,22 @@
forward-approx proofs much easier to read.
-/
+/-- The `NF.roundR` wrapper also rounds `0` to `0`. -/
+private lemma NF_roundR_zero : TorchLean.Floats.NF.roundR (β := β) (fexp := fexp) (rnd := rnd) (0 :
+ ℝ) = 0 := by
+ have hrnd0 : rnd (0 : ℝ) = 0 := by
+ simpa using (NeuralValidRnd.id (rnd... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_5c88fd271524_1 | 95d9f677e1d4bd5f | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/RuntimeApprox/NF/Ops/Scalar.lean | Scalar | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 1 | [
{
"theorem_name": "approx_sqrt_clamp_nf_of_lb",
"depth": 1,
"n_commands": 0,
"n_lines": 89,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n set xhat : ℝ := toSpec (β := β) (fexp := fexp) (rnd := rnd) xR\n have hxhat : abs (xhat - x) ≤ eps := by\n ... | [
{
"name": "abs_sqrt_sub_sqrt_le_div_sqrt_of_le",
"text": "private lemma abs_sqrt_sub_sqrt_le_div_sqrt_of_le {a b η : ℝ} (ha : 0 ≤ a) (hη : 0 < η) (hb : η ≤ b)\n :\n abs (Real.sqrt a - Real.sqrt b) ≤ abs (a - b) / Real.sqrt η := by\n have hb0 : 0 < b := lt_of_lt_of_le hη hb\n have hsb_pos : 0 < Real.sq... | [
{
"name": "approx_sqrt_clamp_nf_of_lb",
"fan_in": 0,
"n_deps_direct": 3,
"n_deps_transitive": 4,
"n_lines": 106,
"n_chars": 5349,
"n_subproofs": 23,
"n_tactics": 81,
"cyclomatic": 1,
"n_automation": 19,
"n_rewrites": 0,
"n_structural": 6,
"automation_only": false,... | 4 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.RuntimeApprox.NF.Ops.Plumbing
/-!
# NF Scalar Primitive Bounds
Scalar bridge lemmas and forward-error bounds for rounded `NF` primitives. These are the facts
that l... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.RuntimeApprox.NF.Ops.Plumbing
/-!
# NF Scalar Primitive Bounds
Scalar bridge lemmas and forward-error bounds for rounded `NF` primitives. These are the facts
that l... | @@ -82,6 +82,39 @@
-- Sqrt (clamped) approximation
-- ---------------------------------------------------------------------------
+private lemma abs_sqrt_sub_sqrt_le_div_sqrt_of_le {a b η : ℝ} (ha : 0 ≤ a) (hη : 0 < η) (hb : η ≤ b)
+ :
+ abs (Real.sqrt a - Real.sqrt b) ≤ abs (a - b) / Real.sqrt η := by
+ have ... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_5c88fd271524_7 | 6b33535ae2ad29a2 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/RuntimeApprox/NF/Ops/Scalar.lean | Scalar | 7 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 1 | [
{
"theorem_name": "approx_safeLog_nf",
"depth": 1,
"n_commands": 0,
"n_lines": 69,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n set xhat : ℝ := toSpec (β := β) (fexp := fexp) (rnd := rnd) xR\n set yhat : ℝ := max xhat ε\n set y : ℝ := max x ε\n\n... | [
{
"name": "abs_log_sub_log_le_one_div_mul_abs_sub",
"text": "private lemma abs_log_sub_log_le_one_div_mul_abs_sub {ε u v : ℝ}\n (hε : 0 < ε) (hu : ε ≤ u) (hv : ε ≤ v) :\n abs (Real.log u - Real.log v) ≤ (1 / ε) * abs (u - v) := by\n -- Mean value theorem on `s = Ici ε` (derivative bounded by `1/ε`).\... | [
{
"name": "approx_safeLog_nf",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 85,
"n_chars": 3922,
"n_subproofs": 12,
"n_tactics": 61,
"cyclomatic": 1,
"n_automation": 11,
"n_rewrites": 0,
"n_structural": 3,
"automation_only": false,
"max_... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.RuntimeApprox.NF.Ops.Plumbing
/-!
# NF Scalar Primitive Bounds
Scalar bridge lemmas and forward-error bounds for rounded `NF` primitives. These are the facts
that l... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.RuntimeApprox.NF.Ops.Plumbing
/-!
# NF Scalar Primitive Bounds
Scalar bridge lemmas and forward-error bounds for rounded `NF` primitives. These are the facts
that l... | @@ -87,6 +87,36 @@
TorchLean.Floats.NF.ofReal (β := β) (fexp := fexp) (rnd := rnd)
(safeLog (ε := ε) (toSpec (β := β) (fexp := fexp) (rnd := rnd) xR))
+private lemma abs_log_sub_log_le_one_div_mul_abs_sub {ε u v : ℝ}
+ (hε : 0 < ε) (hu : ε ≤ u) (hv : ε ≤ v) :
+ abs (Real.log u - Real.log v) ≤ (1 / ε) * ... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_5c88fd271524_8 | 428240f5a3b0b77e | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/RuntimeApprox/NF/Ops/Scalar.lean | Scalar | 8 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 1 | [
{
"theorem_name": "approx_mul_nf",
"depth": 1,
"n_commands": 0,
"n_lines": 12,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hx' :\n Proofs.RuntimeRoundingApprox.scalarApprox x\n (toSpec (β := β) (fexp := fexp) (rnd := rnd) xR) epsx... | [
{
"name": "toSpec_mul",
"text": "/-- `toSpec` respects runtime multiplication, up to an explicit rounding step. -/\nprivate lemma toSpec_mul (x y : R) :\n toSpec (β := β) (fexp := fexp) (rnd := rnd) (x * y) =\n roundedMul (β := β) (fexp := fexp) (rnd := rnd)\n (toSpec (β := β) (fexp := fexp) ... | [
{
"name": "approx_mul_nf",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 31,
"n_chars": 1570,
"n_subproofs": 3,
"n_tactics": 12,
"cyclomatic": 1,
"n_automation": 3,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": false,
"max_nestin... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.RuntimeApprox.NF.Ops.Plumbing
/-!
# NF Scalar Primitive Bounds
Scalar bridge lemmas and forward-error bounds for rounded `NF` primitives. These are the facts
that l... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.RuntimeApprox.NF.Ops.Plumbing
/-!
# NF Scalar Primitive Bounds
Scalar bridge lemmas and forward-error bounds for rounded `NF` primitives. These are the facts
that l... | @@ -69,6 +69,15 @@
(NF_roundR_zero (β := β) (fexp := fexp) (rnd := rnd))
omit [NeuralValidRndToNearest rnd] in
+/-- `toSpec` respects runtime multiplication, up to an explicit rounding step. -/
+private lemma toSpec_mul (x y : R) :
+ toSpec (β := β) (fexp := fexp) (rnd := rnd) (x * y) =
+ roundedMul (β ... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_5c88fd271524_9 | 7fc1b71ca3cab897 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/RuntimeApprox/NF/Ops/Scalar.lean | Scalar | 9 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 2 | [
{
"theorem_name": "approx_div_nf_of_one_le",
"depth": 1,
"n_commands": 0,
"n_lines": 82,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n -- Notation for the embedded runtime values.\n set xhat : ℝ := toSpec (β := β) (fexp := fexp) (rnd := rnd) xR\n ... | [
{
"name": "toSpec_div",
"text": "/-- `toSpec` respects runtime division, up to an explicit rounding step. -/\nprivate lemma toSpec_div (x y : R) :\n toSpec (β := β) (fexp := fexp) (rnd := rnd) (x / y) =\n Proofs.RuntimeRoundingApprox.roundR (β := β) (fexp := fexp) (rnd := rnd)\n (toSpec (β :=... | [
{
"name": "approx_div_nf_of_one_le",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 101,
"n_chars": 4752,
"n_subproofs": 15,
"n_tactics": 68,
"cyclomatic": 1,
"n_automation": 22,
"n_rewrites": 1,
"n_structural": 8,
"automation_only": false,
... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.RuntimeApprox.NF.Ops.Plumbing
/-!
# NF Scalar Primitive Bounds
Scalar bridge lemmas and forward-error bounds for rounded `NF` primitives. These are the facts
that l... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.RuntimeApprox.NF.Ops.Plumbing
/-!
# NF Scalar Primitive Bounds
Scalar bridge lemmas and forward-error bounds for rounded `NF` primitives. These are the facts
that l... | @@ -69,6 +69,15 @@
(NF_roundR_zero (β := β) (fexp := fexp) (rnd := rnd))
omit [NeuralValidRndToNearest rnd] in
+/-- `toSpec` respects runtime division, up to an explicit rounding step. -/
+private lemma toSpec_div (x y : R) :
+ toSpec (β := β) (fexp := fexp) (rnd := rnd) (x / y) =
+ Proofs.RuntimeRoundi... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_5c88fd271524_10 | ca927a44959030aa | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/RuntimeApprox/NF/Ops/Scalar.lean | Scalar | 10 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 2 | [
{
"theorem_name": "approx_div_nf_of_one_le",
"depth": 1,
"n_commands": 0,
"n_lines": 82,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n -- Notation for the embedded runtime values.\n set xhat : ℝ := toSpec (β := β) (fexp := fexp) (rnd := rnd) xR\n ... | [
{
"name": "toSpec_div",
"text": "/-- `toSpec` respects runtime division, up to an explicit rounding step. -/\nprivate lemma toSpec_div (x y : R) :\n toSpec (β := β) (fexp := fexp) (rnd := rnd) (x / y) =\n Proofs.RuntimeRoundingApprox.roundR (β := β) (fexp := fexp) (rnd := rnd)\n (toSpec (β :=... | [
{
"name": "approx_div_nf_of_lb",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 95,
"n_chars": 4721,
"n_subproofs": 19,
"n_tactics": 66,
"cyclomatic": 1,
"n_automation": 18,
"n_rewrites": 1,
"n_structural": 7,
"automation_only": false,
"ma... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.RuntimeApprox.NF.Ops.Plumbing
/-!
# NF Scalar Primitive Bounds
Scalar bridge lemmas and forward-error bounds for rounded `NF` primitives. These are the facts
that l... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.RuntimeApprox.NF.Ops.Plumbing
/-!
# NF Scalar Primitive Bounds
Scalar bridge lemmas and forward-error bounds for rounded `NF` primitives. These are the facts
that l... | @@ -69,6 +69,15 @@
(NF_roundR_zero (β := β) (fexp := fexp) (rnd := rnd))
omit [NeuralValidRndToNearest rnd] in
+/-- `toSpec` respects runtime division, up to an explicit rounding step. -/
+private lemma toSpec_div (x y : R) :
+ toSpec (β := β) (fexp := fexp) (rnd := rnd) (x / y) =
+ Proofs.RuntimeRoundi... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_5c88fd271524_11 | 5c7fe327b33b0315 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/RuntimeApprox/NF/Ops/Scalar.lean | Scalar | 11 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 1 | [
{
"theorem_name": "approx_scale_nf",
"depth": 1,
"n_commands": 0,
"n_lines": 10,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hc : abs (toSpec (β := β) (fexp := fexp) (rnd := rnd) c -\n toSpec (β := β) (fexp := fexp) (rnd := rnd) c) ≤ (... | [
{
"name": "approx_mul_nf",
"text": "/--\nForward approximation bound for multiplication in `NF`.\n\nThis has the standard \"first-order\" shape:\nterms proportional to `|toSpec xR| * epsy` and `|toSpec yR| * epsx`, plus an `ulp` term for the\n final\nrounding. (For classical background, see Higham, *Accura... | [
{
"name": "approx_scale_nf",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 2,
"n_lines": 22,
"n_chars": 1105,
"n_subproofs": 2,
"n_tactics": 9,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": false,
"max_nesti... | 2 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.RuntimeApprox.NF.Ops.Plumbing
/-!
# NF Scalar Primitive Bounds
Scalar bridge lemmas and forward-error bounds for rounded `NF` primitives. These are the facts
that l... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.RuntimeApprox.NF.Ops.Plumbing
/-!
# NF Scalar Primitive Bounds
Scalar bridge lemmas and forward-error bounds for rounded `NF` primitives. These are the facts
that l... | @@ -96,6 +96,36 @@
TorchLean.Floats.NF.ofReal (β := β) (fexp := fexp) (rnd := rnd)
(safeLog (ε := ε) (toSpec (β := β) (fexp := fexp) (rnd := rnd) xR))
+/--
+Forward approximation bound for multiplication in `NF`.
+
+This has the standard "first-order" shape:
+terms proportional to `|toSpec xR| * epsy` and `|t... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_9ecdb57265ae_0 | b12e454e77eb8df8 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Verification/TorchLean/Proved/Correctness/Eval/Core.lean | Core | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 1 | 1 | [
{
"theorem_name": "shapeBNe_refl",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp [bne, shapeBEq_refl s]",
"n_chars": 33,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automa... | [
{
"name": "shapeBEq_refl",
"text": "/-- Reflexivity for the structural shape equality used by IR runtime guards. -/\ntheorem shapeBEq_refl (s : Shape) : (s == s) = true := by\n induction s with\n | scalar => rfl\n | dim _ rest ih =>\n have ih' : Shape.areEqual rest rest = true := by\n ... | [
{
"name": "shapeBNe_refl",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 5,
"n_chars": 172,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,
"max_nesting": ... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Verification.TorchLean.Proved.Correctness.WellFormed
/-!
# Compiled Forward Evaluation: Shared Invariants
-/
@[expose] public section
namespace NN.Verification.TorchLean.P... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Verification.TorchLean.Proved.Correctness.WellFormed
/-!
# Compiled Forward Evaluation: Shared Invariants
-/
@[expose] public section
namespace NN.Verification.TorchLean.P... | @@ -26,8 +26,18 @@
namespace IRStep
+/-- Reflexivity for the structural shape equality used by IR runtime guards. -/
+theorem shapeBEq_refl (s : Shape) : (s == s) = true := by
+ induction s with
+ | scalar => rfl
+ | dim _ rest ih =>
+ have ih' : Shape.areEqual rest rest = true := by
+ simpa... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_45c1a1fa4531_0 | 3227982539247acb | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/RuntimeApprox/NF/ReductionOps.lean | ReductionOps | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 1 | 1 | [
{
"theorem_name": "approxT_reduce_sum_by_column_2d",
"depth": 1,
"n_commands": 0,
"n_lines": 83,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro s hAxis hRed\n classical\n have hε : 0 ≤ eps := approxT_eps_nonneg (β := β) (fexp := fexp) (rnd :=... | [
{
"name": "reduce_sum_by_column_get",
"text": "private lemma reduce_sum_by_column_get\n {α : Type} [Add α] [Zero α]\n {m n : Nat} (x : Tensor α (.dim m (.dim n .scalar)))\n (hRed : Shape.reducibleAlong 0 (.dim m (.dim n .scalar))) (j : Fin n) :\n (match Spec.Tensor.reduceSum (α := α) (s := .dim ... | [
{
"name": "approxT_reduce_sum_by_column_2d",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 103,
"n_chars": 5464,
"n_subproofs": 14,
"n_tactics": 80,
"cyclomatic": 5,
"n_automation": 6,
"n_rewrites": 1,
"n_structural": 11,
"automation_only": f... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.RuntimeApprox.NF.Ops
public import NN.Proofs.RuntimeApprox.NF.Utils
public import NN.Spec.Core.TensorReductionShape
/-!
# NF Reduction Operators
NF (rounded) backend... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.RuntimeApprox.NF.Ops
public import NN.Proofs.RuntimeApprox.NF.Utils
public import NN.Spec.Core.TensorReductionShape
/-!
# NF Reduction Operators
NF (rounded) backend... | @@ -55,6 +55,24 @@
-- Definitional unfoldings for 2D reductions (axis 0/1)
-- ---------------------------------------------------------------------------
+private lemma reduce_sum_by_column_get
+ {α : Type} [Add α] [Zero α]
+ {m n : Nat} (x : Tensor α (.dim m (.dim n .scalar)))
+ (hRed : Shape.reducibleAlo... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_e11547877522_0 | 9972824b5029ce0f | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/RL/FiniteStochasticMDP.lean | FiniteStochasticMDP | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 1 | [
{
"theorem_name": "actionValue_monotone",
"depth": 1,
"n_commands": 0,
"n_lines": 7,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n by_cases hdone : mdp.terminated state action\n · simp [Spec.RL.FiniteStochastic.actionValue, discountedBackup, contin... | [
{
"name": "expectedNextValue_monotone",
"text": "/-- Expected next-state value is monotone in the candidate value function. -/\ntheorem expectedNextValue_monotone\n (mdp : MDP nStates nActions)\n (valid : Valid mdp)\n (values₁ values₂ : ValueFunction ℝ nStates)\n (hValues : ∀ state, valueAt valu... | [
{
"name": "actionValue_monotone",
"fan_in": 2,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 18,
"n_chars": 878,
"n_subproofs": 0,
"n_tactics": 7,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": false,
"max_n... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Real.Basic
public import Mathlib.Logic.Function.Iterate
public import NN.Proofs.RL.FinsetSup
public import NN.Proofs.Tensor.Basic
public import NN.Spec.RL.FiniteSto... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Real.Basic
public import Mathlib.Logic.Function.Iterate
public import NN.Proofs.RL.FinsetSup
public import NN.Proofs.Tensor.Basic
public import NN.Spec.RL.FiniteSto... | @@ -52,6 +52,21 @@
(Finset.univ : Finset (Fin nStates)).sup' Finset.univ_nonempty
(fun state => |valueAt values₁ state - valueAt values₂ state|)
+/-- Expected next-state value is monotone in the candidate value function. -/
+theorem expectedNextValue_monotone
+ (mdp : MDP nStates nActions)
+ (valid : Va... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_e11547877522_1 | 59495ef43e349bd6 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/RL/FiniteStochasticMDP.lean | FiniteStochasticMDP | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 2 | [
{
"theorem_name": "bellmanPolicy_monotone",
"depth": 1,
"n_commands": 0,
"n_lines": 4,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simpa [Spec.RL.FiniteStochastic.bellmanPolicy, valueAt, Spec.Tensor.vecGet, Spec.get,\n Spec.getAtSpec, Spec.Tens... | [
{
"name": "actionValue_monotone",
"text": "/-- Bellman state-action values are monotone in the candidate value function. -/\ntheorem actionValue_monotone\n (mdp : MDP nStates nActions)\n (valid : Valid mdp)\n (values₁ values₂ : ValueFunction ℝ nStates)\n (hValues : ∀ state, valueAt values₁ state... | [
{
"name": "bellmanPolicy_monotone",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 2,
"n_lines": 15,
"n_chars": 742,
"n_subproofs": 0,
"n_tactics": 4,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,
"max_... | 2 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Real.Basic
public import Mathlib.Logic.Function.Iterate
public import NN.Proofs.RL.FinsetSup
public import NN.Proofs.Tensor.Basic
public import NN.Spec.RL.FiniteSto... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Real.Basic
public import Mathlib.Logic.Function.Iterate
public import NN.Proofs.RL.FinsetSup
public import NN.Proofs.Tensor.Basic
public import NN.Spec.RL.FiniteSto... | @@ -67,6 +67,23 @@
exact mul_le_mul_of_nonneg_left (hValues nextState)
(valid.transition_nonneg state action nextState)
+/-- Bellman state-action values are monotone in the candidate value function. -/
+theorem actionValue_monotone
+ (mdp : MDP nStates nActions)
+ (valid : Valid mdp)
+ (values₁ value... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_e11547877522_2 | 37ed40392b5f8608 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/RL/FiniteStochasticMDP.lean | FiniteStochasticMDP | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 2 | [
{
"theorem_name": "bellmanPolicy_monotone",
"depth": 1,
"n_commands": 0,
"n_lines": 4,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simpa [Spec.RL.FiniteStochastic.bellmanPolicy, valueAt, Spec.Tensor.vecGet, Spec.get,\n Spec.getAtSpec, Spec.Tens... | [
{
"name": "actionValue_monotone",
"text": "/-- Bellman state-action values are monotone in the candidate value function. -/\ntheorem actionValue_monotone\n (mdp : MDP nStates nActions)\n (valid : Valid mdp)\n (values₁ values₂ : ValueFunction ℝ nStates)\n (hValues : ∀ state, valueAt values₁ state... | [
{
"name": "bellmanOptimality_monotone",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 2,
"n_lines": 19,
"n_chars": 991,
"n_subproofs": 0,
"n_tactics": 8,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 3,
"automation_only": false,
... | 2 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Real.Basic
public import Mathlib.Logic.Function.Iterate
public import NN.Proofs.RL.FinsetSup
public import NN.Proofs.Tensor.Basic
public import NN.Spec.RL.FiniteSto... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Real.Basic
public import Mathlib.Logic.Function.Iterate
public import NN.Proofs.RL.FinsetSup
public import NN.Proofs.Tensor.Basic
public import NN.Spec.RL.FiniteSto... | @@ -67,6 +67,23 @@
exact mul_le_mul_of_nonneg_left (hValues nextState)
(valid.transition_nonneg state action nextState)
+/-- Bellman state-action values are monotone in the candidate value function. -/
+theorem actionValue_monotone
+ (mdp : MDP nStates nActions)
+ (valid : Valid mdp)
+ (values₁ value... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_e11547877522_3 | 233239858d33f370 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/RL/FiniteStochasticMDP.lean | FiniteStochasticMDP | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 2 | [
{
"theorem_name": "expectedNextValue_abs_sub_le",
"depth": 1,
"n_commands": 0,
"n_lines": 55,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n let row := mdp.transitionProb state action\n have hrewrite :\n Spec.RL.FiniteStochastic.expectedNextVal... | [
{
"name": "abs_sub_valueAt_le_valueSupDist",
"text": "/-- Every pointwise absolute difference is bounded by the sup distance. -/\ntheorem abs_sub_valueAt_le_valueSupDist [Fact (0 < nStates)]\n (values₁ values₂ : ValueFunction ℝ nStates)\n (state : Fin nStates) :\n |valueAt values₁ state - valueAt v... | [
{
"name": "expectedNextValue_abs_sub_le",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 66,
"n_chars": 3272,
"n_subproofs": 1,
"n_tactics": 55,
"cyclomatic": 1,
"n_automation": 9,
"n_rewrites": 6,
"n_structural": 8,
"automation_only": false,
... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Real.Basic
public import Mathlib.Logic.Function.Iterate
public import NN.Proofs.RL.FinsetSup
public import NN.Proofs.Tensor.Basic
public import NN.Spec.RL.FiniteSto... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Real.Basic
public import Mathlib.Logic.Function.Iterate
public import NN.Proofs.RL.FinsetSup
public import NN.Proofs.Tensor.Basic
public import NN.Spec.RL.FiniteSto... | @@ -52,6 +52,14 @@
(Finset.univ : Finset (Fin nStates)).sup' Finset.univ_nonempty
(fun state => |valueAt values₁ state - valueAt values₂ state|)
+/-- Every pointwise absolute difference is bounded by the sup distance. -/
+theorem abs_sub_valueAt_le_valueSupDist [Fact (0 < nStates)]
+ (values₁ values₂ : Val... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_e11547877522_4 | dcddf3549f208c88 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/RL/FiniteStochasticMDP.lean | FiniteStochasticMDP | 4 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 2 | [
{
"theorem_name": "expectedNextValue_abs_sub_le",
"depth": 1,
"n_commands": 0,
"n_lines": 55,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n let row := mdp.transitionProb state action\n have hrewrite :\n Spec.RL.FiniteStochastic.expectedNextVal... | [
{
"name": "abs_sub_valueAt_le_valueSupDist",
"text": "/-- Every pointwise absolute difference is bounded by the sup distance. -/\ntheorem abs_sub_valueAt_le_valueSupDist [Fact (0 < nStates)]\n (values₁ values₂ : ValueFunction ℝ nStates)\n (state : Fin nStates) :\n |valueAt values₁ state - valueAt v... | [
{
"name": "actionValue_abs_sub_le",
"fan_in": 2,
"n_deps_direct": 2,
"n_deps_transitive": 3,
"n_lines": 47,
"n_chars": 2301,
"n_subproofs": 4,
"n_tactics": 35,
"cyclomatic": 1,
"n_automation": 3,
"n_rewrites": 3,
"n_structural": 4,
"automation_only": false,
"m... | 3 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Real.Basic
public import Mathlib.Logic.Function.Iterate
public import NN.Proofs.RL.FinsetSup
public import NN.Proofs.Tensor.Basic
public import NN.Spec.RL.FiniteSto... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Real.Basic
public import Mathlib.Logic.Function.Iterate
public import NN.Proofs.RL.FinsetSup
public import NN.Proofs.Tensor.Basic
public import NN.Spec.RL.FiniteSto... | @@ -65,6 +65,14 @@
(Finset.mem_univ ⟨0, Fact.out⟩)
exact hcoord.trans hle
+/-- Every pointwise absolute difference is bounded by the sup distance. -/
+theorem abs_sub_valueAt_le_valueSupDist [Fact (0 < nStates)]
+ (values₁ values₂ : ValueFunction ℝ nStates)
+ (state : Fin nStates) :
+ |valueAt valu... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_e11547877522_5 | 8f52fce618b00088 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/RL/FiniteStochasticMDP.lean | FiniteStochasticMDP | 5 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 2 | [
{
"theorem_name": "bellmanPolicy_contraction",
"depth": 1,
"n_commands": 0,
"n_lines": 13,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n let _ : Nonempty (Fin nStates) := ⟨⟨0, Fact.out⟩⟩\n unfold valueSupDist\n refine Finset.sup'_le (s := (Finset.... | [
{
"name": "actionValue_abs_sub_le",
"text": "/-- State-action Bellman values are Lipschitz with constant `γ` in the sup metric. -/\ntheorem actionValue_abs_sub_le\n [Fact (0 < nStates)]\n (mdp : MDP nStates nActions)\n (valid : Valid mdp)\n (values₁ values₂ : ValueFunction ℝ nStates)\n (state... | [
{
"name": "bellmanPolicy_contraction",
"fan_in": 2,
"n_deps_direct": 1,
"n_deps_transitive": 4,
"n_lines": 26,
"n_chars": 1292,
"n_subproofs": 0,
"n_tactics": 13,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 2,
"n_structural": 3,
"automation_only": false,
... | 4 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Real.Basic
public import Mathlib.Logic.Function.Iterate
public import NN.Proofs.RL.FinsetSup
public import NN.Proofs.Tensor.Basic
public import NN.Spec.RL.FiniteSto... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Real.Basic
public import Mathlib.Logic.Function.Iterate
public import NN.Proofs.RL.FinsetSup
public import NN.Proofs.Tensor.Basic
public import NN.Spec.RL.FiniteSto... | @@ -138,6 +138,52 @@
(fun nextState => row.vecGet nextState) = 1 by
simpa [row] using valid.transition_sums_to_one state action, one_mul]
+/-- State-action Bellman values are Lipschitz with constant `γ` in the sup metric. -/
+theorem actionValue_abs_sub_le
+ [Fact (0 < nStates)]
+ ... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_e11547877522_6 | 3dabe4522e1c7aaa | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/RL/FiniteStochasticMDP.lean | FiniteStochasticMDP | 6 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 1 | [
{
"theorem_name": "bellmanPolicy_le_bellmanOptimality",
"depth": 1,
"n_commands": 0,
"n_lines": 4,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simpa [Spec.RL.FiniteStochastic.bellmanPolicy, valueAt, Spec.Tensor.vecGet, Spec.get,\n Spec.getAtSpe... | [
{
"name": "actionValue_le_bellmanOptimality",
"text": "/-- Every particular action-value is bounded by Bellman optimality. -/\ntheorem actionValue_le_bellmanOptimality\n [Fact (0 < nActions)]\n (mdp : MDP nStates nActions)\n (values : ValueFunction ℝ nStates)\n (state : Fin nStates)\n (action... | [
{
"name": "bellmanPolicy_le_bellmanOptimality",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 14,
"n_chars": 666,
"n_subproofs": 0,
"n_tactics": 4,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": tru... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Real.Basic
public import Mathlib.Logic.Function.Iterate
public import NN.Proofs.RL.FinsetSup
public import NN.Proofs.Tensor.Basic
public import NN.Spec.RL.FiniteSto... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Real.Basic
public import Mathlib.Logic.Function.Iterate
public import NN.Proofs.RL.FinsetSup
public import NN.Proofs.Tensor.Basic
public import NN.Spec.RL.FiniteSto... | @@ -52,6 +52,19 @@
(Finset.univ : Finset (Fin nStates)).sup' Finset.univ_nonempty
(fun state => |valueAt values₁ state - valueAt values₂ state|)
+/-- Every particular action-value is bounded by Bellman optimality. -/
+theorem actionValue_le_bellmanOptimality
+ [Fact (0 < nActions)]
+ (mdp : MDP nStates ... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_e11547877522_7 | 5af11d93d84dc714 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/RL/FiniteStochasticMDP.lean | FiniteStochasticMDP | 7 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 2 | [
{
"theorem_name": "bellmanPolicy_contraction",
"depth": 1,
"n_commands": 0,
"n_lines": 13,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n let _ : Nonempty (Fin nStates) := ⟨⟨0, Fact.out⟩⟩\n unfold valueSupDist\n refine Finset.sup'_le (s := (Finset.... | [
{
"name": "actionValue_abs_sub_le",
"text": "/-- State-action Bellman values are Lipschitz with constant `γ` in the sup metric. -/\ntheorem actionValue_abs_sub_le\n [Fact (0 < nStates)]\n (mdp : MDP nStates nActions)\n (valid : Valid mdp)\n (values₁ values₂ : ValueFunction ℝ nStates)\n (state... | [
{
"name": "bellmanOptimality_abs_sub_le",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 4,
"n_lines": 42,
"n_chars": 2368,
"n_subproofs": 7,
"n_tactics": 31,
"cyclomatic": 1,
"n_automation": 3,
"n_rewrites": 0,
"n_structural": 5,
"automation_only": false,
... | 4 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Real.Basic
public import Mathlib.Logic.Function.Iterate
public import NN.Proofs.RL.FinsetSup
public import NN.Proofs.Tensor.Basic
public import NN.Spec.RL.FiniteSto... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Real.Basic
public import Mathlib.Logic.Function.Iterate
public import NN.Proofs.RL.FinsetSup
public import NN.Proofs.Tensor.Basic
public import NN.Spec.RL.FiniteSto... | @@ -138,6 +138,52 @@
(fun nextState => row.vecGet nextState) = 1 by
simpa [row] using valid.transition_sums_to_one state action, one_mul]
+/-- State-action Bellman values are Lipschitz with constant `γ` in the sup metric. -/
+theorem actionValue_abs_sub_le
+ [Fact (0 < nStates)]
+ ... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_e11547877522_8 | eb00eaf41945f85c | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/RL/FiniteStochasticMDP.lean | FiniteStochasticMDP | 8 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 2 | [
{
"theorem_name": "bellmanPolicy_contraction",
"depth": 1,
"n_commands": 0,
"n_lines": 13,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n let _ : Nonempty (Fin nStates) := ⟨⟨0, Fact.out⟩⟩\n unfold valueSupDist\n refine Finset.sup'_le (s := (Finset.... | [
{
"name": "actionValue_abs_sub_le",
"text": "/-- State-action Bellman values are Lipschitz with constant `γ` in the sup metric. -/\ntheorem actionValue_abs_sub_le\n [Fact (0 < nStates)]\n (mdp : MDP nStates nActions)\n (valid : Valid mdp)\n (values₁ values₂ : ValueFunction ℝ nStates)\n (state... | [
{
"name": "bellmanOptimality_contraction",
"fan_in": 2,
"n_deps_direct": 1,
"n_deps_transitive": 5,
"n_lines": 38,
"n_chars": 1756,
"n_subproofs": 0,
"n_tactics": 9,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 1,
"n_structural": 3,
"automation_only": false,
... | 5 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Real.Basic
public import Mathlib.Logic.Function.Iterate
public import NN.Proofs.RL.FinsetSup
public import NN.Proofs.Tensor.Basic
public import NN.Spec.RL.FiniteSto... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Real.Basic
public import Mathlib.Logic.Function.Iterate
public import NN.Proofs.RL.FinsetSup
public import NN.Proofs.Tensor.Basic
public import NN.Spec.RL.FiniteSto... | @@ -138,6 +138,52 @@
(fun nextState => row.vecGet nextState) = 1 by
simpa [row] using valid.transition_sums_to_one state action, one_mul]
+/-- State-action Bellman values are Lipschitz with constant `γ` in the sup metric. -/
+theorem actionValue_abs_sub_le
+ [Fact (0 < nStates)]
+ ... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_e11547877522_9 | 5adcac4b28e821ca | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/RL/FiniteStochasticMDP.lean | FiniteStochasticMDP | 9 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 1 | [
{
"theorem_name": "valueSupDist_eq_zero_iff",
"depth": 1,
"n_commands": 0,
"n_lines": 20,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n constructor\n · intro h\n apply (Spec.Tensor.dimScalarEquiv (α := ℝ) nStates).injective\n funext state\n ... | [
{
"name": "dimScalarEquiv_apply_eq_valueAt",
"text": "private lemma dimScalarEquiv_apply_eq_valueAt\n (values : ValueFunction ℝ nStates) (state : Fin nStates) :\n (Spec.Tensor.dimScalarEquiv (α := ℝ) nStates values) state = valueAt values state := by\n cases values with\n | dim _ =>\n rfl\n\n",... | [
{
"name": "valueSupDist_eq_zero_iff",
"fan_in": 2,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 26,
"n_chars": 1118,
"n_subproofs": 5,
"n_tactics": 20,
"cyclomatic": 2,
"n_automation": 3,
"n_rewrites": 1,
"n_structural": 5,
"automation_only": false,
... | 2 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Real.Basic
public import Mathlib.Logic.Function.Iterate
public import NN.Proofs.RL.FinsetSup
public import NN.Proofs.Tensor.Basic
public import NN.Spec.RL.FiniteSto... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Real.Basic
public import Mathlib.Logic.Function.Iterate
public import NN.Proofs.RL.FinsetSup
public import NN.Proofs.Tensor.Basic
public import NN.Spec.RL.FiniteSto... | @@ -64,14 +64,35 @@
variable {nStates nActions : Nat}
+private lemma dimScalarEquiv_apply_eq_valueAt
+ (values : ValueFunction ℝ nStates) (state : Fin nStates) :
+ (Spec.Tensor.dimScalarEquiv (α := ℝ) nStates values) state = valueAt values state := by
+ cases values with
+ | dim _ =>
+ rfl
+
/-- `val... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_e11547877522_10 | 8625425168be9126 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/RL/FiniteStochasticMDP.lean | FiniteStochasticMDP | 10 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 2 | [
{
"theorem_name": "bellmanPolicy_iterate_contraction",
"depth": 1,
"n_commands": 0,
"n_lines": 24,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n induction k generalizing values₁ values₂ with\n | zero =>\n simp\n | succ k ih =>\n let f :=... | [
{
"name": "bellmanPolicy_contraction",
"text": "/-- Bellman expectation is a contraction with modulus `γ` in the sup metric:\n\n`valueSupDist (T^π values₁) (T^π values₂) ≤ γ * valueSupDist values₁ values₂`. -/\ntheorem bellmanPolicy_contraction\n [Fact (0 < nStates)]\n (mdp : MDP nStates nActions)\n ... | [
{
"name": "bellmanPolicy_iterate_contraction",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 5,
"n_lines": 36,
"n_chars": 1739,
"n_subproofs": 4,
"n_tactics": 22,
"cyclomatic": 2,
"n_automation": 4,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": fa... | 5 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Real.Basic
public import Mathlib.Logic.Function.Iterate
public import NN.Proofs.RL.FinsetSup
public import NN.Proofs.Tensor.Basic
public import NN.Spec.RL.FiniteSto... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Real.Basic
public import Mathlib.Logic.Function.Iterate
public import NN.Proofs.RL.FinsetSup
public import NN.Proofs.Tensor.Basic
public import NN.Spec.RL.FiniteSto... | @@ -184,6 +184,31 @@
rw [hrewrite]
exact hmul
+/-- Bellman expectation is a contraction with modulus `γ` in the sup metric:
+
+`valueSupDist (T^π values₁) (T^π values₂) ≤ γ * valueSupDist values₁ values₂`. -/
+theorem bellmanPolicy_contraction
+ [Fact (0 < nStates)]
+ (mdp : MDP nStates nActions)
+ ... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_e11547877522_11 | c2196a71ee187d6a | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/RL/FiniteStochasticMDP.lean | FiniteStochasticMDP | 11 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 1 | [
{
"theorem_name": "valueSupDist_eq_zero_iff",
"depth": 1,
"n_commands": 0,
"n_lines": 20,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n constructor\n · intro h\n apply (Spec.Tensor.dimScalarEquiv (α := ℝ) nStates).injective\n funext state\n ... | [
{
"name": "dimScalarEquiv_apply_eq_valueAt",
"text": "private lemma dimScalarEquiv_apply_eq_valueAt\n (values : ValueFunction ℝ nStates) (state : Fin nStates) :\n (Spec.Tensor.dimScalarEquiv (α := ℝ) nStates values) state = valueAt values state := by\n cases values with\n | dim _ =>\n rfl\n\n",... | [
{
"name": "bellmanPolicy_fixedPoint_unique",
"fan_in": 0,
"n_deps_direct": 3,
"n_deps_transitive": 7,
"n_lines": 42,
"n_chars": 1837,
"n_subproofs": 13,
"n_tactics": 27,
"cyclomatic": 1,
"n_automation": 4,
"n_rewrites": 0,
"n_structural": 4,
"automation_only": fal... | 7 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Real.Basic
public import Mathlib.Logic.Function.Iterate
public import NN.Proofs.RL.FinsetSup
public import NN.Proofs.Tensor.Basic
public import NN.Spec.RL.FiniteSto... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Real.Basic
public import Mathlib.Logic.Function.Iterate
public import NN.Proofs.RL.FinsetSup
public import NN.Proofs.Tensor.Basic
public import NN.Spec.RL.FiniteSto... | @@ -213,14 +213,35 @@
variable {nStates nActions : Nat}
+private lemma dimScalarEquiv_apply_eq_valueAt
+ (values : ValueFunction ℝ nStates) (state : Fin nStates) :
+ (Spec.Tensor.dimScalarEquiv (α := ℝ) nStates values) state = valueAt values state := by
+ cases values with
+ | dim _ =>
+ rfl
+
/-- `v... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_e11547877522_12 | 1c3374364ea63450 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/RL/FiniteStochasticMDP.lean | FiniteStochasticMDP | 12 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 2 | [
{
"theorem_name": "bellmanPolicy_iterate_contraction",
"depth": 1,
"n_commands": 0,
"n_lines": 24,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n induction k generalizing values₁ values₂ with\n | zero =>\n simp\n | succ k ih =>\n let f :=... | [
{
"name": "bellmanPolicy_contraction",
"text": "/-- Bellman expectation is a contraction with modulus `γ` in the sup metric:\n\n`valueSupDist (T^π values₁) (T^π values₂) ≤ γ * valueSupDist values₁ values₂`. -/\ntheorem bellmanPolicy_contraction\n [Fact (0 < nStates)]\n (mdp : MDP nStates nActions)\n ... | [
{
"name": "bellmanPolicy_iterate_error_to_fixedPoint",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 6,
"n_lines": 22,
"n_chars": 972,
"n_subproofs": 2,
"n_tactics": 6,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_onl... | 6 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Real.Basic
public import Mathlib.Logic.Function.Iterate
public import NN.Proofs.RL.FinsetSup
public import NN.Proofs.Tensor.Basic
public import NN.Spec.RL.FiniteSto... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Real.Basic
public import Mathlib.Logic.Function.Iterate
public import NN.Proofs.RL.FinsetSup
public import NN.Proofs.Tensor.Basic
public import NN.Spec.RL.FiniteSto... | @@ -184,6 +184,31 @@
rw [hrewrite]
exact hmul
+/-- Bellman expectation is a contraction with modulus `γ` in the sup metric:
+
+`valueSupDist (T^π values₁) (T^π values₂) ≤ γ * valueSupDist values₁ values₂`. -/
+theorem bellmanPolicy_contraction
+ [Fact (0 < nStates)]
+ (mdp : MDP nStates nActions)
+ ... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_e11547877522_13 | c9a89e323701be37 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/RL/FiniteStochasticMDP.lean | FiniteStochasticMDP | 13 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 2 | [
{
"theorem_name": "bellmanOptimality_iterate_contraction",
"depth": 1,
"n_commands": 0,
"n_lines": 21,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n induction k generalizing values₁ values₂ with\n | zero =>\n simp\n | succ k ih =>\n let ... | [
{
"name": "bellmanOptimality_contraction",
"text": "/-- Bellman optimality is a contraction with modulus `γ` in the sup metric:\n\n`valueSupDist (T* values₁) (T* values₂) ≤ γ * valueSupDist values₁ values₂`. -/\ntheorem bellmanOptimality_contraction\n [Fact (0 < nStates)] [Fact (0 < nActions)]\n (mdp ... | [
{
"name": "bellmanOptimality_iterate_contraction",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 6,
"n_lines": 32,
"n_chars": 1588,
"n_subproofs": 4,
"n_tactics": 21,
"cyclomatic": 2,
"n_automation": 4,
"n_rewrites": 0,
"n_structural": 1,
"automation_only"... | 6 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Real.Basic
public import Mathlib.Logic.Function.Iterate
public import NN.Proofs.RL.FinsetSup
public import NN.Proofs.Tensor.Basic
public import NN.Spec.RL.FiniteSto... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Real.Basic
public import Mathlib.Logic.Function.Iterate
public import NN.Proofs.RL.FinsetSup
public import NN.Proofs.Tensor.Basic
public import NN.Spec.RL.FiniteSto... | @@ -225,6 +225,43 @@
simpa [Spec.RL.FiniteStochastic.bellmanOptimality, valueAt, Spec.Tensor.vecGet, Spec.get,
Spec.getAtSpec, Spec.Tensor.toScalar, f, g, bound] using habs
+/-- Bellman optimality is a contraction with modulus `γ` in the sup metric:
+
+`valueSupDist (T* values₁) (T* values₂) ≤ γ * valueSupDis... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_e11547877522_14 | 4e886bba175dc460 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/RL/FiniteStochasticMDP.lean | FiniteStochasticMDP | 14 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 1 | [
{
"theorem_name": "valueSupDist_eq_zero_iff",
"depth": 1,
"n_commands": 0,
"n_lines": 20,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n constructor\n · intro h\n apply (Spec.Tensor.dimScalarEquiv (α := ℝ) nStates).injective\n funext state\n ... | [
{
"name": "dimScalarEquiv_apply_eq_valueAt",
"text": "private lemma dimScalarEquiv_apply_eq_valueAt\n (values : ValueFunction ℝ nStates) (state : Fin nStates) :\n (Spec.Tensor.dimScalarEquiv (α := ℝ) nStates values) state = valueAt values state := by\n cases values with\n | dim _ =>\n rfl\n\n",... | [
{
"name": "bellmanOptimality_fixedPoint_unique",
"fan_in": 0,
"n_deps_direct": 3,
"n_deps_transitive": 8,
"n_lines": 41,
"n_chars": 1819,
"n_subproofs": 13,
"n_tactics": 27,
"cyclomatic": 1,
"n_automation": 4,
"n_rewrites": 0,
"n_structural": 4,
"automation_only":... | 8 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Real.Basic
public import Mathlib.Logic.Function.Iterate
public import NN.Proofs.RL.FinsetSup
public import NN.Proofs.Tensor.Basic
public import NN.Spec.RL.FiniteSto... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Real.Basic
public import Mathlib.Logic.Function.Iterate
public import NN.Proofs.RL.FinsetSup
public import NN.Proofs.Tensor.Basic
public import NN.Spec.RL.FiniteSto... | @@ -266,14 +266,35 @@
variable {nStates nActions : Nat}
+private lemma dimScalarEquiv_apply_eq_valueAt
+ (values : ValueFunction ℝ nStates) (state : Fin nStates) :
+ (Spec.Tensor.dimScalarEquiv (α := ℝ) nStates values) state = valueAt values state := by
+ cases values with
+ | dim _ =>
+ rfl
+
/-- `v... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_e11547877522_15 | b6aad12219ce2fa8 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/RL/FiniteStochasticMDP.lean | FiniteStochasticMDP | 15 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 2 | [
{
"theorem_name": "bellmanOptimality_iterate_contraction",
"depth": 1,
"n_commands": 0,
"n_lines": 21,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n induction k generalizing values₁ values₂ with\n | zero =>\n simp\n | succ k ih =>\n let ... | [
{
"name": "bellmanOptimality_contraction",
"text": "/-- Bellman optimality is a contraction with modulus `γ` in the sup metric:\n\n`valueSupDist (T* values₁) (T* values₂) ≤ γ * valueSupDist values₁ values₂`. -/\ntheorem bellmanOptimality_contraction\n [Fact (0 < nStates)] [Fact (0 < nActions)]\n (mdp ... | [
{
"name": "bellmanOptimality_iterate_error_to_fixedPoint",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 7,
"n_lines": 19,
"n_chars": 846,
"n_subproofs": 2,
"n_tactics": 6,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation... | 7 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Real.Basic
public import Mathlib.Logic.Function.Iterate
public import NN.Proofs.RL.FinsetSup
public import NN.Proofs.Tensor.Basic
public import NN.Spec.RL.FiniteSto... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Real.Basic
public import Mathlib.Logic.Function.Iterate
public import NN.Proofs.RL.FinsetSup
public import NN.Proofs.Tensor.Basic
public import NN.Spec.RL.FiniteSto... | @@ -225,6 +225,43 @@
simpa [Spec.RL.FiniteStochastic.bellmanOptimality, valueAt, Spec.Tensor.vecGet, Spec.get,
Spec.getAtSpec, Spec.Tensor.toScalar, f, g, bound] using habs
+/-- Bellman optimality is a contraction with modulus `γ` in the sup metric:
+
+`valueSupDist (T* values₁) (T* values₂) ≤ γ * valueSupDis... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_73cec3aa805c_0 | 67ba72577af89151 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Spec/Core/TensorArray.lean | TensorArray | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 2 | 1 | [
{
"theorem_name": "shapeProd_cons",
"depth": 1,
"n_commands": 0,
"n_lines": 4,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n unfold shapeProd\n rw [List.foldl_cons]\n simpa using (foldl_mul_factor n ns)",
"n_chars": 83,
"n_subproofs": 0,
... | [
{
"name": "foldl_mul_factor",
"text": "/--\nHelper lemma: factoring a left-multiplication out of the `foldl` product.\n\nThis is used to prove `shapeProd_cons` and similar \"shape product algebra\" facts.\n-/\ntheorem foldl_mul_factor (n : Nat) (ns : List Nat) :\n List.foldl (fun x1 x2 ↦ x1 * x2) n ns = n ... | [
{
"name": "shapeProd_cons",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 10,
"n_chars": 339,
"n_subproofs": 0,
"n_tactics": 4,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 2,
"n_structural": 0,
"automation_only": false,
"max_nesting... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
/-!
# `TensorArray`: a simple array-backed tensor representation
`Spec.Tensor` is the canonical, shape-indexed tensor type for the spec layer. It is great for
proofs and pure definitions, bu... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
/-!
# `TensorArray`: a simple array-backed tensor representation
`Spec.Tensor` is the canonical, shape-indexed tensor type for the spec layer. It is great for
proofs and pure definitions, bu... | @@ -73,10 +73,28 @@
@[simp]
theorem shapeProd_nil : shapeProd [] = 1 := rfl
+/--
+Helper lemma: factoring a left-multiplication out of the `foldl` product.
+
+This is used to prove `shapeProd_cons` and similar "shape product algebra" facts.
+-/
+theorem foldl_mul_factor (n : Nat) (ns : List Nat) :
+ List.foldl (fu... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_73cec3aa805c_1 | a37f93f69d3e743b | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Spec/Core/TensorArray.lean | TensorArray | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 2 | 1 | [
{
"theorem_name": "flatIndex_lt_shapeProd",
"depth": 1,
"n_commands": 0,
"n_lines": 5,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro h\n have : idx < (0 + 1) * shapeProd shape :=\n flatIndexAux_lt shape indices 0 idx (by simpa [flatIndex] ... | [
{
"name": "flatIndexAux_lt",
"text": "/--\n`flatIndexAux` returns an index that is bounded by the \"mixed-radix\" size implied by the\nremaining `shape`.\n\nIntuition: starting with accumulator `acc`, the recursion computes something of the form\n`acc * shapeProd shape + tail`, where `tail < shapeProd shape... | [
{
"name": "flatIndex_lt_shapeProd",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 3,
"n_lines": 9,
"n_chars": 377,
"n_subproofs": 1,
"n_tactics": 5,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": false,
"max_... | 2 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
/-!
# `TensorArray`: a simple array-backed tensor representation
`Spec.Tensor` is the canonical, shape-indexed tensor type for the spec layer. It is great for
proofs and pure definitions, bu... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
/-!
# `TensorArray`: a simple array-backed tensor representation
`Spec.Tensor` is the canonical, shape-indexed tensor type for the spec layer. It is great for
proofs and pure definitions, bu... | @@ -150,11 +150,59 @@
def flatIndex (shape : List Nat) (indices : List Nat) : Option Nat :=
flatIndexAux shape indices 0
+/--
+`flatIndexAux` returns an index that is bounded by the "mixed-radix" size implied by the
+remaining `shape`.
+
+Intuition: starting with accumulator `acc`, the recursion computes somethin... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_c1332eca0a04_0 | 36a9ae26312dffe0 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/MLTheory/Proofs/Approximation/Universal/UniversalApproximationRate.lean | UniversalApproximationRate | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 3 | 2 | [
{
"theorem_name": "two_mul_mul_sub_div_relu_approximation_width_lt",
"depth": 1,
"n_commands": 0,
"n_lines": 23,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n classical\n let N : ℕ := reluApproximationWidth L a b ε\n have hNpos_nat : 0 < N := relu... | [
{
"name": "relu_approximation_width_pos",
"text": "/-- The explicit ReLU approximation width is always positive. -/\nlemma relu_approximation_width_pos (L a b ε : ℝ) : 0 < reluApproximationWidth L a b ε := by\n simp [reluApproximationWidth]\n\n",
"fan_in": 2,
"n_lines": 5,
"n_chars": 194,
"... | [
{
"name": "two_mul_mul_sub_div_relu_approximation_width_lt",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 32,
"n_chars": 1531,
"n_subproofs": 9,
"n_tactics": 23,
"cyclomatic": 1,
"n_automation": 6,
"n_rewrites": 0,
"n_structural": 2,
"automa... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.MLTheory.Proofs.Approximation.Universal.UniversalApproximation
import Mathlib.Algebra.Order.Archimedean.Real.Basic
import Mathlib.Tactic.Linarith
/-!
# Universal approximati... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.MLTheory.Proofs.Approximation.Universal.UniversalApproximation
import Mathlib.Algebra.Order.Archimedean.Real.Basic
import Mathlib.Tactic.Linarith
/-!
# Universal approximati... | @@ -45,6 +45,10 @@
def reluApproximationWidth (L a b ε : ℝ) : ℕ :=
Nat.ceil (2 * L * (b - a) / ε) + 1
+/-- The explicit ReLU approximation width is always positive. -/
+lemma relu_approximation_width_pos (L a b ε : ℝ) : 0 < reluApproximationWidth L a b ε := by
+ simp [reluApproximationWidth]
+
/--
The chosen w... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_c1332eca0a04_1 | 93e06e94dd7c5d3f | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/MLTheory/Proofs/Approximation/Universal/UniversalApproximationRate.lean | UniversalApproximationRate | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 3 | 2 | [
{
"theorem_name": "two_mul_mul_sub_div_relu_approximation_width_lt",
"depth": 1,
"n_commands": 0,
"n_lines": 23,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n classical\n let N : ℕ := reluApproximationWidth L a b ε\n have hNpos_nat : 0 < N := relu... | [
{
"name": "relu_approximation_width_pos",
"text": "/-- The explicit ReLU approximation width is always positive. -/\nlemma relu_approximation_width_pos (L a b ε : ℝ) : 0 < reluApproximationWidth L a b ε := by\n simp [reluApproximationWidth]\n\n",
"fan_in": 2,
"n_lines": 5,
"n_chars": 194,
"... | [
{
"name": "relu_universal_approximation_Icc_hinge_rate",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 335,
"n_chars": 15691,
"n_subproofs": 121,
"n_tactics": 306,
"cyclomatic": 4,
"n_automation": 75,
"n_rewrites": 5,
"n_structural": 49,
"aut... | 2 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.MLTheory.Proofs.Approximation.Universal.UniversalApproximation
import Mathlib.Algebra.Order.Archimedean.Real.Basic
import Mathlib.Tactic.Linarith
/-!
# Universal approximati... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.MLTheory.Proofs.Approximation.Universal.UniversalApproximation
import Mathlib.Algebra.Order.Archimedean.Real.Basic
import Mathlib.Tactic.Linarith
/-!
# Universal approximati... | @@ -45,6 +45,10 @@
def reluApproximationWidth (L a b ε : ℝ) : ℕ :=
Nat.ceil (2 * L * (b - a) / ε) + 1
+/-- The explicit ReLU approximation width is always positive. -/
+lemma relu_approximation_width_pos (L a b ε : ℝ) : 0 < reluApproximationWidth L a b ε := by
+ simp [reluApproximationWidth]
+
/--
The chosen w... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_c1332eca0a04_2 | dbba5e539d8cf286 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/MLTheory/Proofs/Approximation/Universal/UniversalApproximationRate.lean | UniversalApproximationRate | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 3 | 2 | [
{
"theorem_name": "two_mul_mul_sub_div_relu_approximation_width_lt",
"depth": 1,
"n_commands": 0,
"n_lines": 23,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n classical\n let N : ℕ := reluApproximationWidth L a b ε\n have hNpos_nat : 0 < N := relu... | [
{
"name": "relu_approximation_width_pos",
"text": "/-- The explicit ReLU approximation width is always positive. -/\nlemma relu_approximation_width_pos (L a b ε : ℝ) : 0 < reluApproximationWidth L a b ε := by\n simp [reluApproximationWidth]\n\n",
"fan_in": 2,
"n_lines": 5,
"n_chars": 194,
"... | [
{
"name": "relu_universal_approximation_Icc_rate",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 3,
"n_lines": 32,
"n_chars": 1321,
"n_subproofs": 1,
"n_tactics": 18,
"cyclomatic": 2,
"n_automation": 2,
"n_rewrites": 0,
"n_structural": 4,
"automation_only"... | 3 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.MLTheory.Proofs.Approximation.Universal.UniversalApproximation
import Mathlib.Algebra.Order.Archimedean.Real.Basic
import Mathlib.Tactic.Linarith
/-!
# Universal approximati... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.MLTheory.Proofs.Approximation.Universal.UniversalApproximation
import Mathlib.Algebra.Order.Archimedean.Real.Basic
import Mathlib.Tactic.Linarith
/-!
# Universal approximati... | @@ -45,6 +45,10 @@
def reluApproximationWidth (L a b ε : ℝ) : ℕ :=
Nat.ceil (2 * L * (b - a) / ε) + 1
+/-- The explicit ReLU approximation width is always positive. -/
+lemma relu_approximation_width_pos (L a b ε : ℝ) : 0 < reluApproximationWidth L a b ε := by
+ simp [reluApproximationWidth]
+
/--
The chosen w... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_feba09d4ab26_0 | 69786517932315d5 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Floats/IEEEExec/ErrorBounds.lean | ErrorBounds | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 1 | 5 | [
{
"theorem_name": "toReal_add_abs_error_of_isFinite",
"depth": 1,
"n_commands": 0,
"n_lines": 3,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simpa [toReal_add_eq_fp32Round_of_isFinite (x := x) (y := y) hfin] using\n fp32Round_abs_error (x := to... | [
{
"name": "fp32Round_abs_error",
"text": "/-- `fp32Round` has the standard half-ULP absolute error bound. -/\ntheorem fp32Round_abs_error (x : ℝ) :\n _root_.abs (fp32Round x - x) ≤ eps₃₂ x := by\n -- `fp32Round` is definitionally the `FP32` rounding operator.\n simpa [fp32Round] using (TorchLean.Floats... | [
{
"name": "toReal_add_abs_error_of_isFinite",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 13,
"n_chars": 526,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Floats.IEEEExec.BridgeFP32Total
public import NN.Floats.FP32.Error
/-!
# `IEEE32Exec` per-op real error bounds (finite branch)
`NN.Floats.IEEEExec.BridgeFP32Total` provides... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Floats.IEEEExec.BridgeFP32Total
public import NN.Floats.FP32.Error
/-!
# `IEEE32Exec` per-op real error bounds (finite branch)
`NN.Floats.IEEEExec.BridgeFP32Total` provides... | @@ -38,6 +38,12 @@
noncomputable section
+/-- `fp32Round` has the standard half-ULP absolute error bound. -/
+theorem fp32Round_abs_error (x : ℝ) :
+ _root_.abs (fp32Round x - x) ≤ eps₃₂ x := by
+ -- `fp32Round` is definitionally the `FP32` rounding operator.
+ simpa [fp32Round] using (TorchLean.Floats.FP32.r... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_feba09d4ab26_1 | 285982e73084b17d | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Floats/IEEEExec/ErrorBounds.lean | ErrorBounds | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 1 | 5 | [
{
"theorem_name": "toReal_add_abs_error_of_isFinite",
"depth": 1,
"n_commands": 0,
"n_lines": 3,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simpa [toReal_add_eq_fp32Round_of_isFinite (x := x) (y := y) hfin] using\n fp32Round_abs_error (x := to... | [
{
"name": "fp32Round_abs_error",
"text": "/-- `fp32Round` has the standard half-ULP absolute error bound. -/\ntheorem fp32Round_abs_error (x : ℝ) :\n _root_.abs (fp32Round x - x) ≤ eps₃₂ x := by\n -- `fp32Round` is definitionally the `FP32` rounding operator.\n simpa [fp32Round] using (TorchLean.Floats... | [
{
"name": "toReal_mul_abs_error_of_isFinite",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 13,
"n_chars": 532,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Floats.IEEEExec.BridgeFP32Total
public import NN.Floats.FP32.Error
/-!
# `IEEE32Exec` per-op real error bounds (finite branch)
`NN.Floats.IEEEExec.BridgeFP32Total` provides... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Floats.IEEEExec.BridgeFP32Total
public import NN.Floats.FP32.Error
/-!
# `IEEE32Exec` per-op real error bounds (finite branch)
`NN.Floats.IEEEExec.BridgeFP32Total` provides... | @@ -38,6 +38,12 @@
noncomputable section
+/-- `fp32Round` has the standard half-ULP absolute error bound. -/
+theorem fp32Round_abs_error (x : ℝ) :
+ _root_.abs (fp32Round x - x) ≤ eps₃₂ x := by
+ -- `fp32Round` is definitionally the `FP32` rounding operator.
+ simpa [fp32Round] using (TorchLean.Floats.FP32.r... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_feba09d4ab26_2 | 9b953beae7ec3d19 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Floats/IEEEExec/ErrorBounds.lean | ErrorBounds | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 1 | 5 | [
{
"theorem_name": "toReal_add_abs_error_of_isFinite",
"depth": 1,
"n_commands": 0,
"n_lines": 3,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simpa [toReal_add_eq_fp32Round_of_isFinite (x := x) (y := y) hfin] using\n fp32Round_abs_error (x := to... | [
{
"name": "fp32Round_abs_error",
"text": "/-- `fp32Round` has the standard half-ULP absolute error bound. -/\ntheorem fp32Round_abs_error (x : ℝ) :\n _root_.abs (fp32Round x - x) ≤ eps₃₂ x := by\n -- `fp32Round` is definitionally the `FP32` rounding operator.\n simpa [fp32Round] using (TorchLean.Floats... | [
{
"name": "toReal_div_abs_error_of_isFinite",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 13,
"n_chars": 526,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Floats.IEEEExec.BridgeFP32Total
public import NN.Floats.FP32.Error
/-!
# `IEEE32Exec` per-op real error bounds (finite branch)
`NN.Floats.IEEEExec.BridgeFP32Total` provides... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Floats.IEEEExec.BridgeFP32Total
public import NN.Floats.FP32.Error
/-!
# `IEEE32Exec` per-op real error bounds (finite branch)
`NN.Floats.IEEEExec.BridgeFP32Total` provides... | @@ -38,6 +38,12 @@
noncomputable section
+/-- `fp32Round` has the standard half-ULP absolute error bound. -/
+theorem fp32Round_abs_error (x : ℝ) :
+ _root_.abs (fp32Round x - x) ≤ eps₃₂ x := by
+ -- `fp32Round` is definitionally the `FP32` rounding operator.
+ simpa [fp32Round] using (TorchLean.Floats.FP32.r... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_feba09d4ab26_3 | 97deb8166b9b00ce | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Floats/IEEEExec/ErrorBounds.lean | ErrorBounds | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 1 | 5 | [
{
"theorem_name": "toReal_add_abs_error_of_isFinite",
"depth": 1,
"n_commands": 0,
"n_lines": 3,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simpa [toReal_add_eq_fp32Round_of_isFinite (x := x) (y := y) hfin] using\n fp32Round_abs_error (x := to... | [
{
"name": "fp32Round_abs_error",
"text": "/-- `fp32Round` has the standard half-ULP absolute error bound. -/\ntheorem fp32Round_abs_error (x : ℝ) :\n _root_.abs (fp32Round x - x) ≤ eps₃₂ x := by\n -- `fp32Round` is definitionally the `FP32` rounding operator.\n simpa [fp32Round] using (TorchLean.Floats... | [
{
"name": "toReal_fma_abs_error_of_isFinite",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 14,
"n_chars": 601,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Floats.IEEEExec.BridgeFP32Total
public import NN.Floats.FP32.Error
/-!
# `IEEE32Exec` per-op real error bounds (finite branch)
`NN.Floats.IEEEExec.BridgeFP32Total` provides... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Floats.IEEEExec.BridgeFP32Total
public import NN.Floats.FP32.Error
/-!
# `IEEE32Exec` per-op real error bounds (finite branch)
`NN.Floats.IEEEExec.BridgeFP32Total` provides... | @@ -38,6 +38,12 @@
noncomputable section
+/-- `fp32Round` has the standard half-ULP absolute error bound. -/
+theorem fp32Round_abs_error (x : ℝ) :
+ _root_.abs (fp32Round x - x) ≤ eps₃₂ x := by
+ -- `fp32Round` is definitionally the `FP32` rounding operator.
+ simpa [fp32Round] using (TorchLean.Floats.FP32.r... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_feba09d4ab26_4 | cc81cea0e87d7d51 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Floats/IEEEExec/ErrorBounds.lean | ErrorBounds | 4 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 1 | 5 | [
{
"theorem_name": "toReal_add_abs_error_of_isFinite",
"depth": 1,
"n_commands": 0,
"n_lines": 3,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simpa [toReal_add_eq_fp32Round_of_isFinite (x := x) (y := y) hfin] using\n fp32Round_abs_error (x := to... | [
{
"name": "fp32Round_abs_error",
"text": "/-- `fp32Round` has the standard half-ULP absolute error bound. -/\ntheorem fp32Round_abs_error (x : ℝ) :\n _root_.abs (fp32Round x - x) ≤ eps₃₂ x := by\n -- `fp32Round` is definitionally the `FP32` rounding operator.\n simpa [fp32Round] using (TorchLean.Floats... | [
{
"name": "toReal_sqrt_abs_error_of_isFinite",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 13,
"n_chars": 515,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Floats.IEEEExec.BridgeFP32Total
public import NN.Floats.FP32.Error
/-!
# `IEEE32Exec` per-op real error bounds (finite branch)
`NN.Floats.IEEEExec.BridgeFP32Total` provides... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Floats.IEEEExec.BridgeFP32Total
public import NN.Floats.FP32.Error
/-!
# `IEEE32Exec` per-op real error bounds (finite branch)
`NN.Floats.IEEEExec.BridgeFP32Total` provides... | @@ -38,6 +38,12 @@
noncomputable section
+/-- `fp32Round` has the standard half-ULP absolute error bound. -/
+theorem fp32Round_abs_error (x : ℝ) :
+ _root_.abs (fp32Round x - x) ≤ eps₃₂ x := by
+ -- `fp32Round` is definitionally the `FP32` rounding operator.
+ simpa [fp32Round] using (TorchLean.Floats.FP32.r... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_739bbc64d478_0 | 3b19b96019902c51 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Verification/TorchLean/Proved/Correctness/Eval/Concat.lean | Concat | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 10 | 2 | [
{
"theorem_name": "evalAt_concat_binary_ok",
"depth": 1,
"n_commands": 0,
"n_lines": 4,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rw [evalAt_concat_binary_eq]\n rw [hConcat]\n simp [Graph.normalizeNodeOutput, binaryNodeOut, Except.bind, Pure.p... | [
{
"name": "evalAt_concat_binary_eq",
"text": "/-- Local IR semantics for binary concat, pinned to the shared generic concat interpreter. -/\ntheorem evalAt_concat_binary_eq\n {α : Type} [Context α] [DecidableEq Shape]\n {s₁ s₂ out : Shape} (axis : Nat)\n (lhs : Tensor α s₁) (rhs : Tensor α s₂) :\n ... | [
{
"name": "evalAt_concat_binary_ok",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 27,
"n_chars": 995,
"n_subproofs": 0,
"n_tactics": 4,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 2,
"n_structural": 0,
"automation_only": false,
"ma... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Verification.TorchLean.Proved.Correctness.Eval.LinearAlgebra
/-!
# Concat IR Evaluation
Local semantics for IR concat. The evaluator keeps the generic-axis implementation ... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Verification.TorchLean.Proved.Correctness.Eval.LinearAlgebra
/-!
# Concat IR Evaluation
Local semantics for IR concat. The evaluator keeps the generic-axis implementation ... | @@ -56,6 +56,26 @@
quaternaryNodeOut kind outShape
] }
+/-- Local IR semantics for binary concat, pinned to the shared generic concat interpreter. -/
+theorem evalAt_concat_binary_eq
+ {α : Type} [Context α] [DecidableEq Shape]
+ {s₁ s₂ out : Shape} (axis : Nat)
+ (lhs : Tensor α s₁) (rhs : Tenso... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_739bbc64d478_1 | 36dc44c55a9109d0 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Verification/TorchLean/Proved/Correctness/Eval/Concat.lean | Concat | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 10 | 2 | [
{
"theorem_name": "evalAt_concat_binary_ok",
"depth": 1,
"n_commands": 0,
"n_lines": 4,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rw [evalAt_concat_binary_eq]\n rw [hConcat]\n simp [Graph.normalizeNodeOutput, binaryNodeOut, Except.bind, Pure.p... | [
{
"name": "evalAt_concat_binary_eq",
"text": "/-- Local IR semantics for binary concat, pinned to the shared generic concat interpreter. -/\ntheorem evalAt_concat_binary_eq\n {α : Type} [Context α] [DecidableEq Shape]\n {s₁ s₂ out : Shape} (axis : Nat)\n (lhs : Tensor α s₁) (rhs : Tensor α s₂) :\n ... | [
{
"name": "evalAt_concat_binary_error",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 24,
"n_chars": 833,
"n_subproofs": 0,
"n_tactics": 4,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 2,
"n_structural": 0,
"automation_only": false,
... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Verification.TorchLean.Proved.Correctness.Eval.LinearAlgebra
/-!
# Concat IR Evaluation
Local semantics for IR concat. The evaluator keeps the generic-axis implementation ... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Verification.TorchLean.Proved.Correctness.Eval.LinearAlgebra
/-!
# Concat IR Evaluation
Local semantics for IR concat. The evaluator keeps the generic-axis implementation ... | @@ -56,6 +56,26 @@
quaternaryNodeOut kind outShape
] }
+/-- Local IR semantics for binary concat, pinned to the shared generic concat interpreter. -/
+theorem evalAt_concat_binary_eq
+ {α : Type} [Context α] [DecidableEq Shape]
+ {s₁ s₂ out : Shape} (axis : Nat)
+ (lhs : Tensor α s₁) (rhs : Tenso... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_739bbc64d478_2 | 792545157f811779 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Verification/TorchLean/Proved/Correctness/Eval/Concat.lean | Concat | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 10 | 1 | [
{
"theorem_name": "evalAt_concat_leadingAxis_pair_eq_of_infer",
"depth": 1,
"n_commands": 0,
"n_lines": 5,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n apply evalAt_concat_binary_ok\n rw [evalConcat_leadingAxis_pair_eq_of_infer (lhs := lhs) (rhs :... | [
{
"name": "evalAt_concat_binary_ok",
"text": "/--\nSuccessful binary concat evaluation, once the shared concat interpreter has produced a value with\nthe node's declared output shape.\n-/\ntheorem evalAt_concat_binary_ok\n {α : Type} [Context α] [DecidableEq Shape]\n {s₁ s₂ out : Shape} (axis : Nat)\n... | [
{
"name": "evalAt_concat_leadingAxis_pair_eq_of_infer",
"fan_in": 1,
"n_deps_direct": 3,
"n_deps_transitive": 4,
"n_lines": 26,
"n_chars": 1123,
"n_subproofs": 0,
"n_tactics": 5,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 1,
"n_structural": 2,
"automation_o... | 4 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Verification.TorchLean.Proved.Correctness.Eval.LinearAlgebra
/-!
# Concat IR Evaluation
Local semantics for IR concat. The evaluator keeps the generic-axis implementation ... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Verification.TorchLean.Proved.Correctness.Eval.LinearAlgebra
/-!
# Concat IR Evaluation
Local semantics for IR concat. The evaluator keeps the generic-axis implementation ... | @@ -76,6 +76,32 @@
simp [Graph.evalAt, binaryGraphOut, binaryNodeOut, Graph.getNode, Graph.getNode?,
Graph.normalizeNodeOutput, Bind.bind, Except.bind, Pure.pure, Except.pure]
+/--
+Successful binary concat evaluation, once the shared concat interpreter has produced a value with
+the node's declared output sh... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_739bbc64d478_3 | 0214506ee3f04a90 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Verification/TorchLean/Proved/Correctness/Eval/Concat.lean | Concat | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 10 | 1 | [
{
"theorem_name": "evalAt_concat_leadingAxis_pair_eq_of_infer",
"depth": 1,
"n_commands": 0,
"n_lines": 5,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n apply evalAt_concat_binary_ok\n rw [evalConcat_leadingAxis_pair_eq_of_infer (lhs := lhs) (rhs :... | [
{
"name": "evalConcatLeadingAxisFold_pair_eq",
"text": "/-- The leading-axis concat fold agrees with `Tensor.concatLeadingAxisSpec` for binary concat. -/\ntheorem evalConcatLeadingAxisFold_pair_eq\n {α : Type} [Context α] [DecidableEq Shape]\n {n m : Nat} {rest : Shape}\n (lhs : Tensor α (.dim n re... | [
{
"name": "evalAt_concat_leadingAxis_pair_eq",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 6,
"n_lines": 21,
"n_chars": 871,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": fals... | 6 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Verification.TorchLean.Proved.Correctness.Eval.LinearAlgebra
/-!
# Concat IR Evaluation
Local semantics for IR concat. The evaluator keeps the generic-axis implementation ... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Verification.TorchLean.Proved.Correctness.Eval.LinearAlgebra
/-!
# Concat IR Evaluation
Local semantics for IR concat. The evaluator keeps the generic-axis implementation ... | @@ -102,6 +102,21 @@
rw [hConcat]
simp [Graph.normalizeNodeOutput, binaryNodeOut, Except.bind, Pure.pure, Except.pure]
+/-- The leading-axis concat fold agrees with `Tensor.concatLeadingAxisSpec` for binary concat. -/
+theorem evalConcatLeadingAxisFold_pair_eq
+ {α : Type} [Context α] [DecidableEq Shape]
+ ... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_739bbc64d478_4 | 46d87ecdbea5a734 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Verification/TorchLean/Proved/Correctness/Eval/Concat.lean | Concat | 4 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 10 | 1 | [
{
"theorem_name": "evalAt_concat_leadingAxis_triple_eq",
"depth": 1,
"n_commands": 0,
"n_lines": 10,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hSame : (Shape.dim (n + m + k) rest != Shape.dim (n + m + k) rest) = false :=\n shapeBNe_refl ... | [
{
"name": "inferConcatOutShape_leadingAxis_triple_eq",
"text": "/-- Shape inference for ternary concat along axis 0. -/\ntheorem inferConcatOutShape_leadingAxis_triple_eq\n {n m k : Nat} {rest : Shape} :\n OpContracts.inferConcatOutShape 0 [.dim n rest, .dim m rest, .dim k rest] =\n .ok (.dim (n ... | [
{
"name": "evalAt_concat_leadingAxis_triple_eq",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 32,
"n_chars": 1403,
"n_subproofs": 2,
"n_tactics": 10,
"cyclomatic": 1,
"n_automation": 3,
"n_rewrites": 1,
"n_structural": 0,
"automation_only": ... | 2 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Verification.TorchLean.Proved.Correctness.Eval.LinearAlgebra
/-!
# Concat IR Evaluation
Local semantics for IR concat. The evaluator keeps the generic-axis implementation ... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Verification.TorchLean.Proved.Correctness.Eval.LinearAlgebra
/-!
# Concat IR Evaluation
Local semantics for IR concat. The evaluator keeps the generic-axis implementation ... | @@ -74,6 +74,22 @@
simp [Graph.evalConcatLeadingAxisFold,
DVal.mk, DVal.shape, DVal.tensor, Bind.bind, Except.bind, Pure.pure, Except.pure]
+/-- Shape inference for ternary concat along axis 0. -/
+theorem inferConcatOutShape_leadingAxis_triple_eq
+ {n m k : Nat} {rest : Shape} :
+ OpContracts.inferConc... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_739bbc64d478_5 | 4d62bba230754ac1 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Verification/TorchLean/Proved/Correctness/Eval/Concat.lean | Concat | 5 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 10 | 1 | [
{
"theorem_name": "evalAt_concat_leadingAxis_quad_eq",
"depth": 1,
"n_commands": 0,
"n_lines": 11,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hSame :\n (Shape.dim (n + m + k + l) rest != Shape.dim (n + m + k + l) rest) = false :=\n s... | [
{
"name": "inferConcatOutShape_leadingAxis_quad_eq",
"text": "/-- Shape inference for four-input concat along axis 0. -/\ntheorem inferConcatOutShape_leadingAxis_quad_eq\n {n m k l : Nat} {rest : Shape} :\n OpContracts.inferConcatOutShape 0 [.dim n rest, .dim m rest, .dim k rest, .dim l rest] =\n ... | [
{
"name": "evalAt_concat_leadingAxis_quad_eq",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 35,
"n_chars": 1625,
"n_subproofs": 2,
"n_tactics": 11,
"cyclomatic": 1,
"n_automation": 3,
"n_rewrites": 1,
"n_structural": 0,
"automation_only": fa... | 2 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Verification.TorchLean.Proved.Correctness.Eval.LinearAlgebra
/-!
# Concat IR Evaluation
Local semantics for IR concat. The evaluator keeps the generic-axis implementation ... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Verification.TorchLean.Proved.Correctness.Eval.LinearAlgebra
/-!
# Concat IR Evaluation
Local semantics for IR concat. The evaluator keeps the generic-axis implementation ... | @@ -76,6 +76,23 @@
simp [Graph.evalConcatLeadingAxisFold,
DVal.mk, DVal.shape, DVal.tensor, Bind.bind, Except.bind, Pure.pure, Except.pure]
+/-- Shape inference for four-input concat along axis 0. -/
+theorem inferConcatOutShape_leadingAxis_quad_eq
+ {n m k l : Nat} {rest : Shape} :
+ OpContracts.inferC... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_430f4d0bfc25_0 | 164b657d986363e0 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/Analysis/Softmax.lean | Softmax | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 2 | 1 | [
{
"theorem_name": "sum_spec_softmax_spec_row",
"depth": 1,
"n_commands": 0,
"n_lines": 6,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n cases maskedScores with\n | dim rows =>\n -- `softmax_spec` on a matrix is rowwise, and `get` picks a row.\... | [
{
"name": "sum_spec_softmax_vec_spec",
"text": "/-! ## Softmax sums -/\n/--\n`softmax_vec_spec` produces a vector whose entries sum to `1` (over `ℝ`).\n\nThis is the standard softmax identity:\n\n`∑ᵢ softmax(x)ᵢ = 1`.\n\nThe input shape is `.dim (Nat.succ n) .scalar`, not `.dim n .scalar`, because the theor... | [
{
"name": "sum_spec_softmax_spec_row",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 19,
"n_chars": 770,
"n_subproofs": 0,
"n_tactics": 5,
"cyclomatic": 2,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": false,
"... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Algebra.BigOperators.Field
public import Mathlib.Algebra.Order.BigOperators.Group.Finset
public import Mathlib.Analysis.SpecialFunctions.Exp
public import NN.Proofs.Tens... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Algebra.BigOperators.Field
public import Mathlib.Algebra.Order.BigOperators.Group.Finset
public import Mathlib.Analysis.SpecialFunctions.Exp
public import NN.Proofs.Tens... | @@ -66,6 +66,114 @@
private abbrev scalarVal (t : Tensor ℝ .scalar) : ℝ :=
scalarElim (β := ℝ) t (fun v => v)
+/-! ## Softmax sums -/
+/--
+`softmax_vec_spec` produces a vector whose entries sum to `1` (over `ℝ`).
+
+This is the standard softmax identity:
+
+`∑ᵢ softmax(x)ᵢ = 1`.
+
+The input shape is `.dim (Nat.... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_430f4d0bfc25_1 | 0ce5a8dd366ac9a4 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/Analysis/Softmax.lean | Softmax | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 2 | 1 | [
{
"theorem_name": "sum_spec_softmax_spec_row",
"depth": 1,
"n_commands": 0,
"n_lines": 6,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n cases maskedScores with\n | dim rows =>\n -- `softmax_spec` on a matrix is rowwise, and `get` picks a row.\... | [
{
"name": "sum_spec_softmax_vec_spec",
"text": "/-! ## Softmax sums -/\n/--\n`softmax_vec_spec` produces a vector whose entries sum to `1` (over `ℝ`).\n\nThis is the standard softmax identity:\n\n`∑ᵢ softmax(x)ᵢ = 1`.\n\nThe input shape is `.dim (Nat.succ n) .scalar`, not `.dim n .scalar`, because the theor... | [
{
"name": "sum_spec_softmax_spec_row_of_ne_zero",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 2,
"n_lines": 20,
"n_chars": 777,
"n_subproofs": 0,
"n_tactics": 6,
"cyclomatic": 3,
"n_automation": 2,
"n_rewrites": 0,
"n_structural": 2,
"automation_only": f... | 2 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Algebra.BigOperators.Field
public import Mathlib.Algebra.Order.BigOperators.Group.Finset
public import Mathlib.Analysis.SpecialFunctions.Exp
public import NN.Proofs.Tens... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Algebra.BigOperators.Field
public import Mathlib.Algebra.Order.BigOperators.Group.Finset
public import Mathlib.Analysis.SpecialFunctions.Exp
public import NN.Proofs.Tens... | @@ -66,6 +66,114 @@
private abbrev scalarVal (t : Tensor ℝ .scalar) : ℝ :=
scalarElim (β := ℝ) t (fun v => v)
+/-! ## Softmax sums -/
+/--
+`softmax_vec_spec` produces a vector whose entries sum to `1` (over `ℝ`).
+
+This is the standard softmax identity:
+
+`∑ᵢ softmax(x)ᵢ = 1`.
+
+The input shape is `.dim (Nat.... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_9d90e42f0429_0 | b3ae93766dd78ab9 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/MLTheory/Generative/Latent/VAE.lean | VAE | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 5 | 1 | [
{
"theorem_name": "coordinateKlToStandard_nonneg",
"depth": 1,
"n_commands": 0,
"n_lines": 8,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n unfold coordinateKlToStandard\n have hvar : 0 ≤ Real.exp logvar - 1 - logvar :=\n exp_minus_one_minus_non... | [
{
"name": "exp_minus_one_minus_nonneg",
"text": "/-- The elementary inequality behind VAE KL nonnegativity: `exp x ≥ 1 + x`. -/\ntheorem exp_minus_one_minus_nonneg (x : ℝ) : 0 ≤ Real.exp x - 1 - x := by\n have h := Real.add_one_le_exp x\n linarith\n\n",
"fan_in": 1,
"n_lines": 6,
"n_chars": 20... | [
{
"name": "coordinateKlToStandard_nonneg",
"fan_in": 2,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 12,
"n_chars": 426,
"n_subproofs": 3,
"n_tactics": 8,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 1,
"n_structural": 0,
"automation_only": false,
... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Spec.Models.Vae
public import NN.MLTheory.Generative.Latent.Objective
public import Mathlib.Analysis.SpecialFunctions.Exp
public import Mathlib.Algebra.Order.BigOperators.Gro... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Spec.Models.Vae
public import NN.MLTheory.Generative.Latent.Objective
public import Mathlib.Analysis.SpecialFunctions.Exp
public import Mathlib.Algebra.Order.BigOperators.Gro... | @@ -106,11 +106,17 @@
{n : Nat} (mu logvar : Fin n → ℝ) : ℝ :=
∑ i, coordinateKlToStandard (mu i) (logvar i)
+/-- The elementary inequality behind VAE KL nonnegativity: `exp x ≥ 1 + x`. -/
+theorem exp_minus_one_minus_nonneg (x : ℝ) : 0 ≤ Real.exp x - 1 - x := by
+ have h := Real.add_one_le_exp x
+ linarith... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_9d90e42f0429_1 | eba0f064622031eb | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/MLTheory/Generative/Latent/VAE.lean | VAE | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 5 | 1 | [
{
"theorem_name": "coordinateKlToStandard_eq_zero_iff",
"depth": 1,
"n_commands": 0,
"n_lines": 19,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n constructor\n · intro h\n unfold coordinateKlToStandard at h\n have hnum : Real.exp logvar + mu ... | [
{
"name": "exp_minus_one_minus_pos",
"text": "/-- Strict form of `exp x ≥ 1 + x`; equality occurs only at `x = 0`. -/\ntheorem exp_minus_one_minus_pos {x : ℝ} (hx : x ≠ 0) :\n 0 < Real.exp x - 1 - x := by\n have h := Real.add_one_lt_exp hx\n linarith\n\n",
"fan_in": 1,
"n_lines": 7,
"n_char... | [
{
"name": "coordinateKlToStandard_eq_zero_iff",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 26,
"n_chars": 829,
"n_subproofs": 4,
"n_tactics": 19,
"cyclomatic": 3,
"n_automation": 8,
"n_rewrites": 3,
"n_structural": 4,
"automation_only": fa... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Spec.Models.Vae
public import NN.MLTheory.Generative.Latent.Objective
public import Mathlib.Analysis.SpecialFunctions.Exp
public import Mathlib.Algebra.Order.BigOperators.Gro... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Spec.Models.Vae
public import NN.MLTheory.Generative.Latent.Objective
public import Mathlib.Analysis.SpecialFunctions.Exp
public import Mathlib.Algebra.Order.BigOperators.Gro... | @@ -106,6 +106,12 @@
{n : Nat} (mu logvar : Fin n → ℝ) : ℝ :=
∑ i, coordinateKlToStandard (mu i) (logvar i)
+/-- Strict form of `exp x ≥ 1 + x`; equality occurs only at `x = 0`. -/
+theorem exp_minus_one_minus_pos {x : ℝ} (hx : x ≠ 0) :
+ 0 < Real.exp x - 1 - x := by
+ have h := Real.add_one_lt_exp hx
+ ... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_9d90e42f0429_2 | 471f00179901e23f | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/MLTheory/Generative/Latent/VAE.lean | VAE | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 5 | 1 | [
{
"theorem_name": "coordinateKlToStandard_nonneg",
"depth": 1,
"n_commands": 0,
"n_lines": 8,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n unfold coordinateKlToStandard\n have hvar : 0 ≤ Real.exp logvar - 1 - logvar :=\n exp_minus_one_minus_non... | [
{
"name": "exp_minus_one_minus_nonneg",
"text": "/-- The elementary inequality behind VAE KL nonnegativity: `exp x ≥ 1 + x`. -/\ntheorem exp_minus_one_minus_nonneg (x : ℝ) : 0 ≤ Real.exp x - 1 - x := by\n have h := Real.add_one_le_exp x\n linarith\n\n",
"fan_in": 1,
"n_lines": 6,
"n_chars": 20... | [
{
"name": "diagonalGaussianKlToStandardReal_nonneg",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 2,
"n_lines": 9,
"n_chars": 352,
"n_subproofs": 0,
"n_tactics": 4,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 1,
"n_structural": 1,
"automation_only":... | 2 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Spec.Models.Vae
public import NN.MLTheory.Generative.Latent.Objective
public import Mathlib.Analysis.SpecialFunctions.Exp
public import Mathlib.Algebra.Order.BigOperators.Gro... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Spec.Models.Vae
public import NN.MLTheory.Generative.Latent.Objective
public import Mathlib.Analysis.SpecialFunctions.Exp
public import Mathlib.Algebra.Order.BigOperators.Gro... | @@ -106,11 +106,17 @@
{n : Nat} (mu logvar : Fin n → ℝ) : ℝ :=
∑ i, coordinateKlToStandard (mu i) (logvar i)
+/-- The elementary inequality behind VAE KL nonnegativity: `exp x ≥ 1 + x`. -/
+theorem exp_minus_one_minus_nonneg (x : ℝ) : 0 ≤ Real.exp x - 1 - x := by
+ have h := Real.add_one_le_exp x
+ linarith... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_9d90e42f0429_3 | e4a167b07f36f39f | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/MLTheory/Generative/Latent/VAE.lean | VAE | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 5 | 1 | [
{
"theorem_name": "coordinateKlToStandard_eq_zero_iff",
"depth": 1,
"n_commands": 0,
"n_lines": 19,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n constructor\n · intro h\n unfold coordinateKlToStandard at h\n have hnum : Real.exp logvar + mu ... | [
{
"name": "exp_minus_one_minus_pos",
"text": "/-- Strict form of `exp x ≥ 1 + x`; equality occurs only at `x = 0`. -/\ntheorem exp_minus_one_minus_pos {x : ℝ} (hx : x ≠ 0) :\n 0 < Real.exp x - 1 - x := by\n have h := Real.add_one_lt_exp hx\n linarith\n\n",
"fan_in": 1,
"n_lines": 7,
"n_char... | [
{
"name": "diagonalGaussianKlToStandardReal_eq_zero_iff",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 4,
"n_lines": 36,
"n_chars": 1281,
"n_subproofs": 3,
"n_tactics": 25,
"cyclomatic": 4,
"n_automation": 3,
"n_rewrites": 1,
"n_structural": 12,
"automati... | 4 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Spec.Models.Vae
public import NN.MLTheory.Generative.Latent.Objective
public import Mathlib.Analysis.SpecialFunctions.Exp
public import Mathlib.Algebra.Order.BigOperators.Gro... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Spec.Models.Vae
public import NN.MLTheory.Generative.Latent.Objective
public import Mathlib.Analysis.SpecialFunctions.Exp
public import Mathlib.Algebra.Order.BigOperators.Gro... | @@ -111,6 +111,12 @@
have h := Real.add_one_le_exp x
linarith
+/-- Strict form of `exp x ≥ 1 + x`; equality occurs only at `x = 0`. -/
+theorem exp_minus_one_minus_pos {x : ℝ} (hx : x ≠ 0) :
+ 0 < Real.exp x - 1 - x := by
+ have h := Real.add_one_lt_exp hx
+ linarith
+
/-- A single diagonal-Gaussian KL co... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_9d90e42f0429_4 | eb09f8e54cf14cd2 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/MLTheory/Generative/Latent/VAE.lean | VAE | 4 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 5 | 1 | [
{
"theorem_name": "diagonal_reparameterization_coordinate_law",
"depth": 1,
"n_commands": 0,
"n_lines": 3,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro i\n exact scalar_reparameterization_law (hε i) (mu i) (sigma i)",
"n_chars": 76,
... | [
{
"name": "scalar_reparameterization_law",
"text": "/--\nScalar VAE reparameterization law.\n\nIf `ε ~ N(0, 1)`, then `μ + σ ε ~ N(μ, σ²)`. The diagonal multivariate statement is\nobtained by applying this coordinatewise together with the usual independence/product-measure\nassumptions; TorchLean keeps thi... | [
{
"name": "diagonal_reparameterization_coordinate_law",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 22,
"n_chars": 890,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 2,
"automation_on... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Spec.Models.Vae
public import NN.MLTheory.Generative.Latent.Objective
public import Mathlib.Analysis.SpecialFunctions.Exp
public import Mathlib.Algebra.Order.BigOperators.Gro... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Spec.Models.Vae
public import NN.MLTheory.Generative.Latent.Objective
public import Mathlib.Analysis.SpecialFunctions.Exp
public import Mathlib.Algebra.Order.BigOperators.Gro... | @@ -111,6 +111,25 @@
⟨sigma ^ 2, sq_nonneg sigma⟩
/--
+Scalar VAE reparameterization law.
+
+If `ε ~ N(0, 1)`, then `μ + σ ε ~ N(μ, σ²)`. The diagonal multivariate statement is
+obtained by applying this coordinatewise together with the usual independence/product-measure
+assumptions; TorchLean keeps this scalar... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_80da7de75513_0 | c7a8a86e98ada85a | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/Autograd/Tape/Ops/Conv/BackwardDot/Common.lean | Common | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 11 | 1 | [
{
"theorem_name": "dot_vec_eq_sum_get",
"depth": 1,
"n_commands": 0,
"n_lines": 22,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n classical\n cases a with\n | dim fa =>\n cases b with\n | dim fb =>\n -- Use `dot_dim` to reduce to a sum ... | [
{
"name": "dot_scalar",
"text": "lemma dot_scalar (x y : ℝ) :\n dot (Tensor.scalar x) (Tensor.scalar y) = x * y := by\n simp [dot, sumSpec, tensorFoldlSpec, mulSpec, map2Spec]\n\n",
"fan_in": 1,
"n_lines": 5,
"n_chars": 148,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
... | [
{
"name": "dot_vec_eq_sum_get",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 26,
"n_chars": 967,
"n_subproofs": 3,
"n_tactics": 19,
"cyclomatic": 5,
"n_automation": 4,
"n_rewrites": 1,
"n_structural": 6,
"automation_only": false,
"max_ne... | 2 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.Tensor.Basic
public import NN.Proofs.Utils.List
public import NN.Spec.Layers.Conv
public import NN.Spec.Layers.Utils
public import Mathlib.Algebra.BigOperators.Ring.F... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.Tensor.Basic
public import NN.Proofs.Utils.List
public import NN.Spec.Layers.Conv
public import NN.Spec.Layers.Utils
public import Mathlib.Algebra.BigOperators.Ring.F... | @@ -73,6 +73,10 @@
-- `mul_spec` is pointwise on `.dim`, so each slice is `mul_spec (fa i) (fb i)`.
simpa [dot, mulSpec, map2Spec, get_eq] using hsum
+lemma dot_scalar (x y : ℝ) :
+ dot (Tensor.scalar x) (Tensor.scalar y) = x * y := by
+ simp [dot, sumSpec, tensorFoldlSpec, mulSpec, map2Spec]
+
lem... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_80da7de75513_1 | a5a051a7ce06d320 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/Autograd/Tape/Ops/Conv/BackwardDot/Common.lean | Common | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 11 | 1 | [
{
"theorem_name": "dot_biasBroadcast_eq_dot_bias_deriv",
"depth": 1,
"n_commands": 0,
"n_lines": 113,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n classical\n -- Expand the LHS dot on the 3D output as `∑ oc, dot (sliceA oc) (sliceδ oc)`,\n -- the... | [
{
"name": "mul_sum",
"text": "lemma mul_sum {ι : Type} [Fintype ι] (a : ℝ) (f : ι → ℝ) :\n a * (∑ i : ι, f i) = ∑ i : ι, a * f i := by\n classical\n simpa using (Finset.mul_sum (s := (Finset.univ : Finset ι)) (f := f) a)\n\n",
"fan_in": 1,
"n_lines": 6,
"n_chars": 210,
"n_subproofs": 0,... | [
{
"name": "dot_biasBroadcast_eq_dot_bias_deriv",
"fan_in": 0,
"n_deps_direct": 6,
"n_deps_transitive": 7,
"n_lines": 135,
"n_chars": 6141,
"n_subproofs": 8,
"n_tactics": 91,
"cyclomatic": 1,
"n_automation": 12,
"n_rewrites": 1,
"n_structural": 11,
"automation_only... | 7 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.Tensor.Basic
public import NN.Proofs.Utils.List
public import NN.Spec.Layers.Conv
public import NN.Spec.Layers.Utils
public import Mathlib.Algebra.BigOperators.Ring.F... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.Tensor.Basic
public import NN.Proofs.Utils.List
public import NN.Spec.Layers.Conv
public import NN.Spec.Layers.Utils
public import Mathlib.Algebra.BigOperators.Ring.F... | @@ -233,12 +233,129 @@
db) δ
=
dot db (Spec.conv2dBiasDerivSpec (α := ℝ) (layer := layer) (input := input) (grad_output :=
- δ)) := sorry
+ δ)) := by
+ classical
+ -- Expand the LHS dot on the 3D output as `∑ oc, dot (sliceA oc) (sliceδ oc)`,
+ -- then expand each matrix dot with `do... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_80da7de75513_2 | 11b4ae2820cfaf2c | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/Autograd/Tape/Ops/Conv/BackwardDot/Common.lean | Common | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 11 | 2 | [
{
"theorem_name": "dot_biasBroadcast_eq_dot_bias_deriv",
"depth": 1,
"n_commands": 0,
"n_lines": 113,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n classical\n -- Expand the LHS dot on the 3D output as `∑ oc, dot (sliceA oc) (sliceδ oc)`,\n -- the... | [
{
"name": "get_at_or_zero_get_channel",
"text": "lemma get_at_or_zero_get_channel\n {C H W : Nat} (t : Tensor ℝ (.dim C (.dim H (.dim W .scalar))))\n (c : Fin C) (i : Fin H) (j : Fin W) :\n getAtOrZero (get t c) [i.val, j.val] = getAtOrZero t [c.val, i.val, j.val] := by\n cases t with\n | dim fC ... | [
{
"name": "dot3_eq_sum",
"fan_in": 1,
"n_deps_direct": 3,
"n_deps_transitive": 3,
"n_lines": 33,
"n_chars": 1390,
"n_subproofs": 7,
"n_tactics": 22,
"cyclomatic": 1,
"n_automation": 6,
"n_rewrites": 1,
"n_structural": 7,
"automation_only": false,
"max_nesting"... | 3 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.Tensor.Basic
public import NN.Proofs.Utils.List
public import NN.Spec.Layers.Conv
public import NN.Spec.Layers.Utils
public import Mathlib.Algebra.BigOperators.Ring.F... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.Tensor.Basic
public import NN.Proofs.Utils.List
public import NN.Spec.Layers.Conv
public import NN.Spec.Layers.Utils
public import Mathlib.Algebra.BigOperators.Ring.F... | @@ -90,6 +90,16 @@
| scalar v =>
simp [Spec.get2, get_eq, i.isLt, j.isLt, hrow, hcell]
+lemma get_at_or_zero_get_channel
+ {C H W : Nat} (t : Tensor ℝ (.dim C (.dim H (.dim W .scalar))))
+ (c : Fin C) (i : Fin H) (j : Fin W) :
+ getAtOrZero (get t c) [i.val, j.val] = getAtOrZero t [c.val, i.v... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_80da7de75513_3 | f1a6eb198ebdbe4b | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/Autograd/Tape/Ops/Conv/BackwardDot/Common.lean | Common | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 11 | 1 | [
{
"theorem_name": "dot4_eq_sum",
"depth": 1,
"n_commands": 0,
"n_lines": 12,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n classical\n -- Outer OC dimension.\n rw [dot_dim (a := a) (b := b)]\n refine Finset.sum_congr rfl ?_\n intro oc _\n -- Ap... | [
{
"name": "get_at_or_zero_get_outer3",
"text": "lemma get_at_or_zero_get_outer3\n {OC IC KH KW : Nat}\n (k : Tensor ℝ (.dim OC (.dim IC (.dim KH (.dim KW .scalar)))))\n (oc : Fin OC) (ic : Fin IC) (di : Fin KH) (dj : Fin KW) :\n getAtOrZero (get k oc) [ic.val, di.val, dj.val] =\n getAtOrZer... | [
{
"name": "dot4_eq_sum",
"fan_in": 0,
"n_deps_direct": 3,
"n_deps_transitive": 5,
"n_lines": 20,
"n_chars": 781,
"n_subproofs": 1,
"n_tactics": 7,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 1,
"n_structural": 2,
"automation_only": false,
"max_nesting": ... | 5 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.Tensor.Basic
public import NN.Proofs.Utils.List
public import NN.Spec.Layers.Conv
public import NN.Spec.Layers.Utils
public import Mathlib.Algebra.BigOperators.Ring.F... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.Tensor.Basic
public import NN.Proofs.Utils.List
public import NN.Spec.Layers.Conv
public import NN.Spec.Layers.Utils
public import Mathlib.Algebra.BigOperators.Ring.F... | @@ -140,13 +140,34 @@
simpa [h2] using h1
simp [hA, hB]
+lemma get_at_or_zero_get_outer3
+ {OC IC KH KW : Nat}
+ (k : Tensor ℝ (.dim OC (.dim IC (.dim KH (.dim KW .scalar)))))
+ (oc : Fin OC) (ic : Fin IC) (di : Fin KH) (dj : Fin KW) :
+ getAtOrZero (get k oc) [ic.val, di.val, dj.val] =
+ get... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_80da7de75513_4 | de048e48319e4a7c | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/Autograd/Tape/Ops/Conv/BackwardDot/Common.lean | Common | 4 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 11 | 2 | [
{
"theorem_name": "mkInputIdx_match_eq_paddedInput",
"depth": 1,
"n_commands": 0,
"n_lines": 9,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n classical\n -- Expand the RHS using the explicit padded-input read formula.\n rw [get_at_or_zero_paddedIn... | [
{
"name": "get_at_or_zero_paddedInput",
"text": "lemma get_at_or_zero_paddedInput\n {inC inH inW padding : Nat}\n (img : Spec.MultiChannelImage inC inH inW ℝ) (c : Fin inC) (p q : Nat) :\n getAtOrZero (paddedInput (inC := inC) (inH := inH) (inW := inW) (padding := padding) img)\n [c.val, p, q]... | [
{
"name": "mkInputIdx_match_eq_paddedInput",
"fan_in": 2,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 20,
"n_chars": 890,
"n_subproofs": 0,
"n_tactics": 8,
"cyclomatic": 1,
"n_automation": 3,
"n_rewrites": 1,
"n_structural": 0,
"automation_only": false,... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.Tensor.Basic
public import NN.Proofs.Utils.List
public import NN.Spec.Layers.Conv
public import NN.Spec.Layers.Utils
public import Mathlib.Algebra.BigOperators.Ring.F... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.Tensor.Basic
public import NN.Proofs.Utils.List
public import NN.Spec.Layers.Conv
public import NN.Spec.Layers.Utils
public import Mathlib.Algebra.BigOperators.Ring.F... | @@ -86,6 +86,24 @@
else
padMultiChannel input padding
+lemma get_at_or_zero_paddedInput
+ {inC inH inW padding : Nat}
+ (img : Spec.MultiChannelImage inC inH inW ℝ) (c : Fin inC) (p q : Nat) :
+ getAtOrZero (paddedInput (inC := inC) (inH := inH) (inW := inW) (padding := padding) img)
+ [c.val, p... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_80da7de75513_5 | 296114e2dba5ba42 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/Autograd/Tape/Ops/Conv/BackwardDot/Common.lean | Common | 5 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 11 | 2 | [
{
"theorem_name": "mkInputIdx_match_eq_paddedInput",
"depth": 1,
"n_commands": 0,
"n_lines": 9,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n classical\n -- Expand the RHS using the explicit padded-input read formula.\n rw [get_at_or_zero_paddedIn... | [
{
"name": "get_at_or_zero_paddedInput",
"text": "lemma get_at_or_zero_paddedInput\n {inC inH inW padding : Nat}\n (img : Spec.MultiChannelImage inC inH inW ℝ) (c : Fin inC) (p q : Nat) :\n getAtOrZero (paddedInput (inC := inC) (inH := inH) (inW := inW) (padding := padding) img)\n [c.val, p, q]... | [
{
"name": "sum_shift_eq_paddedInput",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 165,
"n_chars": 7029,
"n_subproofs": 35,
"n_tactics": 149,
"cyclomatic": 12,
"n_automation": 26,
"n_rewrites": 1,
"n_structural": 44,
"automation_only": false... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.Tensor.Basic
public import NN.Proofs.Utils.List
public import NN.Spec.Layers.Conv
public import NN.Spec.Layers.Utils
public import Mathlib.Algebra.BigOperators.Ring.F... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.Tensor.Basic
public import NN.Proofs.Utils.List
public import NN.Spec.Layers.Conv
public import NN.Spec.Layers.Utils
public import Mathlib.Algebra.BigOperators.Ring.F... | @@ -86,6 +86,24 @@
else
padMultiChannel input padding
+lemma get_at_or_zero_paddedInput
+ {inC inH inW padding : Nat}
+ (img : Spec.MultiChannelImage inC inH inW ℝ) (c : Fin inC) (p q : Nat) :
+ getAtOrZero (paddedInput (inC := inC) (inH := inH) (inW := inW) (padding := padding) img)
+ [c.val, p... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_80da7de75513_6 | 1d690927c11472b2 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/Autograd/Tape/Ops/Conv/BackwardDot/Common.lean | Common | 6 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 11 | 2 | [
{
"theorem_name": "conv2d_spec_noBias_get",
"depth": 1,
"n_commands": 0,
"n_lines": 47,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro layerK\n classical\n unfold Spec.conv2dSpec\n -- Peel the requested output entry and convert the nested `f... | [
{
"name": "mkInputIdx_match_eq_paddedInput",
"text": "lemma mkInputIdx_match_eq_paddedInput\n {inC inH inW stride padding : Nat}\n (img : Spec.MultiChannelImage inC inH inW ℝ) (c : Fin inC)\n (oi di oj dj : Nat) :\n (match Private.mkInputIdx? [oi, oj] [di, dj] [stride, stride] [padding, padding]... | [
{
"name": "conv2d_spec_noBias_get",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 2,
"n_lines": 65,
"n_chars": 3225,
"n_subproofs": 3,
"n_tactics": 41,
"cyclomatic": 2,
"n_automation": 9,
"n_rewrites": 1,
"n_structural": 8,
"automation_only": false,
"m... | 2 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.Tensor.Basic
public import NN.Proofs.Utils.List
public import NN.Spec.Layers.Conv
public import NN.Spec.Layers.Utils
public import Mathlib.Algebra.BigOperators.Ring.F... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.Tensor.Basic
public import NN.Proofs.Utils.List
public import NN.Spec.Layers.Conv
public import NN.Spec.Layers.Utils
public import Mathlib.Algebra.BigOperators.Ring.F... | @@ -104,6 +104,25 @@
(Spec.get_at_or_zero_pad_multi_channel (α := ℝ) (img := img) (c := c) (p := p) (q := q)
(padding := padding))
+lemma mkInputIdx_match_eq_paddedInput
+ {inC inH inW stride padding : Nat}
+ (img : Spec.MultiChannelImage inC inH inW ℝ) (c : Fin inC)
+ (oi di oj dj : Nat) :
+... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_80da7de75513_7 | 8da78f84235d75db | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/Autograd/Tape/Ops/Conv/BackwardDot/Common.lean | Common | 7 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 11 | 2 | [
{
"theorem_name": "conv2d_spec_noBias_get",
"depth": 1,
"n_commands": 0,
"n_lines": 47,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro layerK\n classical\n unfold Spec.conv2dSpec\n -- Peel the requested output entry and convert the nested `f... | [
{
"name": "mkInputIdx_match_eq_paddedInput",
"text": "lemma mkInputIdx_match_eq_paddedInput\n {inC inH inW stride padding : Nat}\n (img : Spec.MultiChannelImage inC inH inW ℝ) (c : Fin inC)\n (oi di oj dj : Nat) :\n (match Private.mkInputIdx? [oi, oj] [di, dj] [stride, stride] [padding, padding]... | [
{
"name": "conv2d_kernel_deriv_get",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 2,
"n_lines": 33,
"n_chars": 1405,
"n_subproofs": 1,
"n_tactics": 15,
"cyclomatic": 1,
"n_automation": 3,
"n_rewrites": 1,
"n_structural": 5,
"automation_only": false,
"... | 2 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.Tensor.Basic
public import NN.Proofs.Utils.List
public import NN.Spec.Layers.Conv
public import NN.Spec.Layers.Utils
public import Mathlib.Algebra.BigOperators.Ring.F... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.Tensor.Basic
public import NN.Proofs.Utils.List
public import NN.Spec.Layers.Conv
public import NN.Spec.Layers.Utils
public import Mathlib.Algebra.BigOperators.Ring.F... | @@ -104,6 +104,25 @@
(Spec.get_at_or_zero_pad_multi_channel (α := ℝ) (img := img) (c := c) (p := p) (q := q)
(padding := padding))
+lemma mkInputIdx_match_eq_paddedInput
+ {inC inH inW stride padding : Nat}
+ (img : Spec.MultiChannelImage inC inH inW ℝ) (c : Fin inC)
+ (oi di oj dj : Nat) :
+... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_0391d3e3c0dd_0 | 86642b0cd674efa0 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/Gradients/Activation.lean | Activation | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 7 | 1 | [
{
"theorem_name": "sigmoid_deriv_correct",
"depth": 1,
"n_commands": 0,
"n_lines": 37,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n -- Show denominator ≠ 0\n have h_denom_ne_zero : 1 + Real.exp (-x) ≠ 0 := by\n linarith [Real.exp_pos (-x)]\n\n ... | [
{
"name": "sigmoid_eq_inv_exp",
"text": "/--\nRewrite `sigmoid` into the common “inverse of `1 + exp(-x)`” form.\n-/\nlemma sigmoid_eq_inv_exp (x : ℝ) : Activation.Math.sigmoidSpec x = (1 + Real.exp (-x))⁻¹ := by\n unfold Activation.Math.sigmoidSpec\n rw [mathfunc_exp_eq_rexp]\n rw [one_div]\n\n",
"f... | [
{
"name": "sigmoid_deriv_correct",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 45,
"n_chars": 1749,
"n_subproofs": 8,
"n_tactics": 25,
"cyclomatic": 1,
"n_automation": 5,
"n_rewrites": 3,
"n_structural": 5,
"automation_only": false,
"ma... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Algebra.Group.Basic
public import Mathlib.Algebra.Ring.Basic
public import Mathlib.Analysis.Calculus.Deriv.Add
public import Mathlib.Analysis.Calculus.Deriv.Basic
public... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Algebra.Group.Basic
public import Mathlib.Algebra.Ring.Basic
public import Mathlib.Analysis.Calculus.Deriv.Add
public import Mathlib.Analysis.Calculus.Deriv.Basic
public... | @@ -97,12 +97,56 @@
-/
/--
+Rewrite `sigmoid` into the common “inverse of `1 + exp(-x)`” form.
+-/
+lemma sigmoid_eq_inv_exp (x : ℝ) : Activation.Math.sigmoidSpec x = (1 + Real.exp (-x))⁻¹ := by
+ unfold Activation.Math.sigmoidSpec
+ rw [mathfunc_exp_eq_rexp]
+ rw [one_div]
+
+/--
Correctness of the sigmoid der... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_0391d3e3c0dd_1 | 81d122077acfeb1c | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/Gradients/Activation.lean | Activation | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 7 | 2 | [
{
"theorem_name": "tanh_deriv_correct",
"depth": 1,
"n_commands": 0,
"n_lines": 65,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n -- Unfold definitions\n unfold Activation.Math.tanhSpec Activation.Math.tanhDerivSpec\n\n -- Define numerator and den... | [
{
"name": "eventually_of_forall",
"text": "lemma eventually_of_forall {α : Type*} {l : Filter α} {p : α → Prop} (h : ∀ x, p x) :\n ∀ᶠ x in l, p x :=\n Filter.eventually_of_mem l.univ_mem (fun _ _ => h _)\n\n",
"fan_in": 2,
"n_lines": 5,
"n_chars": 173,
"n_subproofs": 0,
"n_tactics": 1,... | [
{
"name": "tanh_deriv_correct",
"fan_in": 1,
"n_deps_direct": 3,
"n_deps_transitive": 3,
"n_lines": 73,
"n_chars": 2684,
"n_subproofs": 11,
"n_tactics": 42,
"cyclomatic": 1,
"n_automation": 8,
"n_rewrites": 9,
"n_structural": 4,
"automation_only": false,
"max_... | 3 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Algebra.Group.Basic
public import Mathlib.Algebra.Ring.Basic
public import Mathlib.Analysis.Calculus.Deriv.Add
public import Mathlib.Analysis.Calculus.Deriv.Basic
public... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Algebra.Group.Basic
public import Mathlib.Algebra.Ring.Basic
public import Mathlib.Analysis.Calculus.Deriv.Add
public import Mathlib.Analysis.Calculus.Deriv.Basic
public... | @@ -140,6 +140,10 @@
-- `∀ᶠ x in l, p x` from a pointwise `∀ x, p x`.
-- (Mathlib has several variants of this idea; we keep this local helper for readability.)
+lemma eventually_of_forall {α : Type*} {l : Filter α} {p : α → Prop} (h : ∀ x, p x) :
+ ∀ᶠ x in l, p x :=
+ Filter.eventually_of_mem l.univ_mem (fun _ _... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_0391d3e3c0dd_2 | bcb32c2a6b52d52f | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/Gradients/Activation.lean | Activation | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 7 | 2 | [
{
"theorem_name": "tanh_deriv_correct",
"depth": 1,
"n_commands": 0,
"n_lines": 65,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n -- Unfold definitions\n unfold Activation.Math.tanhSpec Activation.Math.tanhDerivSpec\n\n -- Define numerator and den... | [
{
"name": "eventually_of_forall",
"text": "lemma eventually_of_forall {α : Type*} {l : Filter α} {p : α → Prop} (h : ∀ x, p x) :\n ∀ᶠ x in l, p x :=\n Filter.eventually_of_mem l.univ_mem (fun _ _ => h _)\n\n",
"fan_in": 2,
"n_lines": 5,
"n_chars": 173,
"n_subproofs": 0,
"n_tactics": 1,... | [
{
"name": "gelu_deriv_correct",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 4,
"n_lines": 78,
"n_chars": 3787,
"n_subproofs": 16,
"n_tactics": 65,
"cyclomatic": 1,
"n_automation": 8,
"n_rewrites": 3,
"n_structural": 4,
"automation_only": false,
"max_... | 4 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Algebra.Group.Basic
public import Mathlib.Algebra.Ring.Basic
public import Mathlib.Analysis.Calculus.Deriv.Add
public import Mathlib.Analysis.Calculus.Deriv.Basic
public... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Algebra.Group.Basic
public import Mathlib.Algebra.Ring.Basic
public import Mathlib.Analysis.Calculus.Deriv.Add
public import Mathlib.Analysis.Calculus.Deriv.Basic
public... | @@ -140,6 +140,10 @@
-- `∀ᶠ x in l, p x` from a pointwise `∀ x, p x`.
-- (Mathlib has several variants of this idea; we keep this local helper for readability.)
+lemma eventually_of_forall {α : Type*} {l : Filter α} {p : α → Prop} (h : ∀ x, p x) :
+ ∀ᶠ x in l, p x :=
+ Filter.eventually_of_mem l.univ_mem (fun _ _... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_0391d3e3c0dd_3 | b75208ed2b03f519 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/Gradients/Activation.lean | Activation | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 7 | 1 | [
{
"theorem_name": "silu_deriv_correct",
"depth": 1,
"n_commands": 0,
"n_lines": 19,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n unfold Activation.Math.swishSpec Activation.Math.swishDerivSpec\n have hid : HasDerivAt (fun y : ℝ => y) (1 : ℝ) x := ... | [
{
"name": "sigmoid_deriv_correct",
"text": "/--\nCorrectness of the sigmoid derivative spec.\n\nPyTorch correspondence: `torch.sigmoid`.\n-/\ntheorem sigmoid_deriv_correct (x : ℝ) :\n HasDerivAt Activation.Math.sigmoidSpec (Activation.Math.sigmoidDerivSpec x) x := by\n -- Show denominator ≠ 0\n have h_de... | [
{
"name": "silu_deriv_correct",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 2,
"n_lines": 28,
"n_chars": 1271,
"n_subproofs": 5,
"n_tactics": 20,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 2,
"n_structural": 2,
"automation_only": false,
"max_n... | 2 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Algebra.Group.Basic
public import Mathlib.Algebra.Ring.Basic
public import Mathlib.Analysis.Calculus.Deriv.Add
public import Mathlib.Analysis.Calculus.Deriv.Basic
public... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Algebra.Group.Basic
public import Mathlib.Algebra.Ring.Basic
public import Mathlib.Analysis.Calculus.Deriv.Add
public import Mathlib.Analysis.Calculus.Deriv.Basic
public... | @@ -105,6 +105,50 @@
rw [one_div]
/--
+Correctness of the sigmoid derivative spec.
+
+PyTorch correspondence: `torch.sigmoid`.
+-/
+theorem sigmoid_deriv_correct (x : ℝ) :
+ HasDerivAt Activation.Math.sigmoidSpec (Activation.Math.sigmoidDerivSpec x) x := by
+ -- Show denominator ≠ 0
+ have h_denom_ne_zero : 1 ... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_0391d3e3c0dd_4 | 210dbd97d86eafb7 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/Gradients/Activation.lean | Activation | 4 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 7 | 1 | [
{
"theorem_name": "safe_log_deriv_correct",
"depth": 1,
"n_commands": 0,
"n_lines": 22,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n unfold Activation.Math.safeLogSpec Activation.Math.safeLogDerivSpec\n -- `safe_log(x) = log(softplus(x) + ε)`\n h... | [
{
"name": "softplus_deriv_correct",
"text": "/--\nCorrectness of the softplus derivative spec.\n\nPyTorch correspondence: `torch.nn.functional.softplus`.\n-/\ntheorem softplus_deriv_correct (x : ℝ) :\n HasDerivAt Activation.Math.softplusSpec (Activation.Math.softplusDerivSpec x) x := by\n unfold Activat... | [
{
"name": "safe_log_deriv_correct",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 35,
"n_chars": 1726,
"n_subproofs": 7,
"n_tactics": 18,
"cyclomatic": 1,
"n_automation": 6,
"n_rewrites": 1,
"n_structural": 1,
"automation_only": false,
"m... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Algebra.Group.Basic
public import Mathlib.Algebra.Ring.Basic
public import Mathlib.Analysis.Calculus.Deriv.Add
public import Mathlib.Analysis.Calculus.Deriv.Basic
public... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Algebra.Group.Basic
public import Mathlib.Algebra.Ring.Basic
public import Mathlib.Analysis.Calculus.Deriv.Add
public import Mathlib.Analysis.Calculus.Deriv.Basic
public... | @@ -97,6 +97,39 @@
-/
/--
+Correctness of the softplus derivative spec.
+
+PyTorch correspondence: `torch.nn.functional.softplus`.
+-/
+theorem softplus_deriv_correct (x : ℝ) :
+ HasDerivAt Activation.Math.softplusSpec (Activation.Math.softplusDerivSpec x) x := by
+ unfold Activation.Math.softplusSpec Activatio... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_a8b3144beed4_0 | 330370e4cd6a1eea | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/MLTheory/Proofs/ReLU/Approx/ReLUMulApprox.lean | ReLUMulApprox | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 13 | 2 | [
{
"theorem_name": "sum_mem_Icc",
"depth": 1,
"n_commands": 0,
"n_lines": 11,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hx0 := hx.1\n have hx1 := hx.2\n have hx0l : -M ≤ firstCoordinate x := hx0.1\n have hx0u : firstCoordinate x ≤ M := hx... | [
{
"name": "dot_wPlus",
"text": "/-- Evaluate the ridge `wPlus`: it sums the two coordinates. -/\nlemma dot_wPlus (x : PlaneTensorVec) : dot wPlus x = firstCoordinate x + secondCoordinate x := by\n classical\n -- Expand the `Fin 2` sum explicitly.\n simp [dot, wPlus, firstCoordinate, secondCoordinate, Fin... | [
{
"name": "sum_mem_Icc",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 15,
"n_chars": 688,
"n_subproofs": 8,
"n_tactics": 10,
"cyclomatic": 1,
"n_automation": 3,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": false,
"max_nesting":... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Fin.Tuple.Basic
public import NN.MLTheory.Proofs.ReLU.Bridge.ReLUMlpBridge
import Mathlib.Tactic.Ring
/-!
# Approximating multiplication with a 2-layer ReLU MLP (2... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Fin.Tuple.Basic
public import NN.MLTheory.Proofs.ReLU.Bridge.ReLUMlpBridge
import Mathlib.Tactic.Ring
/-!
# Approximating multiplication with a 2-layer ReLU MLP (2... | @@ -51,9 +51,25 @@
/-- Ridge direction with `dot wMinus x` equal to the first coordinate minus the second. -/
noncomputable def wMinus : Fin 2 → ℝ := fun i => if i.1 = 0 then 1 else (-1 : ℝ)
+/-- Evaluate the ridge `wPlus`: it sums the two coordinates. -/
+lemma dot_wPlus (x : PlaneTensorVec) : dot wPlus x = firstC... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_a8b3144beed4_1 | c858c9bc97755a3f | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/MLTheory/Proofs/ReLU/Approx/ReLUMulApprox.lean | ReLUMulApprox | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 13 | 2 | [
{
"theorem_name": "diff_mem_Icc",
"depth": 1,
"n_commands": 0,
"n_lines": 10,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hx0 := hx.1\n have hx1 := hx.2\n have hx0l : -M ≤ firstCoordinate x := hx0.1\n have hx0u : firstCoordinate x ≤ M := h... | [
{
"name": "dot_wMinus",
"text": "/-- Evaluate the ridge `wMinus`: `dot wMinus x = the first coordinate minus secondCoordinate`. -/\nlemma dot_wMinus (x : PlaneTensorVec) : dot wMinus x = firstCoordinate x - secondCoordinate x := by\n classical\n simp [dot, wMinus, firstCoordinate, secondCoordinate, Fin.su... | [
{
"name": "diff_mem_Icc",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 14,
"n_chars": 673,
"n_subproofs": 8,
"n_tactics": 10,
"cyclomatic": 1,
"n_automation": 3,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": false,
"max_nesting"... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Fin.Tuple.Basic
public import NN.MLTheory.Proofs.ReLU.Bridge.ReLUMlpBridge
import Mathlib.Tactic.Ring
/-!
# Approximating multiplication with a 2-layer ReLU MLP (2... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Fin.Tuple.Basic
public import NN.MLTheory.Proofs.ReLU.Bridge.ReLUMlpBridge
import Mathlib.Tactic.Ring
/-!
# Approximating multiplication with a 2-layer ReLU MLP (2... | @@ -51,9 +51,23 @@
/-- Ridge direction with `dot wMinus x` equal to the first coordinate minus the second. -/
noncomputable def wMinus : Fin 2 → ℝ := fun i => if i.1 = 0 then 1 else (-1 : ℝ)
+/-- Evaluate the ridge `wMinus`: `dot wMinus x = the first coordinate minus secondCoordinate`. -/
+lemma dot_wMinus (x : Pla... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_a8b3144beed4_2 | c6371cc8f961dc82 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/MLTheory/Proofs/ReLU/Approx/ReLUMulApprox.lean | ReLUMulApprox | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 13 | 2 | [
{
"theorem_name": "mat_vec_mul_spec_oneRow",
"depth": 1,
"n_commands": 0,
"n_lines": 36,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n classical\n -- Put `A` and `v` into the canonical `matrixMN` / `Tensor.dim (Tensor.scalar ·)` forms,\n -- then u... | [
{
"name": "singleRowMatrix_get_matrixMN",
"text": "/-- `mat1_get` agrees with the `matrixMN` constructor. -/\nlemma singleRowMatrix_get_matrixMN {n : Nat} (f : Fin 1 → Fin n → ℝ) (j : Fin n) :\n mat1Get (matrixMN 1 n (fun i j => f i j)) j = f 0 j := by\n simp [mat1Get, matrixMN, Tensor.toScalar]\n\n",
... | [
{
"name": "mat_vec_mul_spec_oneRow",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 42,
"n_chars": 1742,
"n_subproofs": 3,
"n_tactics": 30,
"cyclomatic": 6,
"n_automation": 5,
"n_rewrites": 1,
"n_structural": 11,
"automation_only": false,
... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Fin.Tuple.Basic
public import NN.MLTheory.Proofs.ReLU.Bridge.ReLUMlpBridge
import Mathlib.Tactic.Ring
/-!
# Approximating multiplication with a 2-layer ReLU MLP (2... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Fin.Tuple.Basic
public import NN.MLTheory.Proofs.ReLU.Bridge.ReLUMlpBridge
import Mathlib.Tactic.Ring
/-!
# Approximating multiplication with a 2-layer ReLU MLP (2... | @@ -75,6 +75,11 @@
match rows ⟨0, by decide⟩ with
| .dim cols => (cols j).toScalar
+/-- `mat1_get` agrees with the `matrixMN` constructor. -/
+lemma singleRowMatrix_get_matrixMN {n : Nat} (f : Fin 1 → Fin n → ℝ) (j : Fin n) :
+ mat1Get (matrixMN 1 n (fun i j => f i j)) j = f 0 j := by
+ simp [mat1Get, m... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_a8b3144beed4_3 | 995885088ad1a8ef | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/MLTheory/Proofs/ReLU/Approx/ReLUMulApprox.lean | ReLUMulApprox | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 13 | 2 | [
{
"theorem_name": "mat_vec_mul_spec_oneRow",
"depth": 1,
"n_commands": 0,
"n_lines": 36,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n classical\n -- Put `A` and `v` into the canonical `matrixMN` / `Tensor.dim (Tensor.scalar ·)` forms,\n -- then u... | [
{
"name": "singleRowMatrix_get_matrixMN",
"text": "/-- `mat1_get` agrees with the `matrixMN` constructor. -/\nlemma singleRowMatrix_get_matrixMN {n : Nat} (f : Fin 1 → Fin n → ℝ) (j : Fin n) :\n mat1Get (matrixMN 1 n (fun i j => f i j)) j = f 0 j := by\n simp [mat1Get, matrixMN, Tensor.toScalar]\n\n",
... | [
{
"name": "mlp_eval_nd_eq_bias_sum",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 3,
"n_lines": 54,
"n_chars": 2500,
"n_subproofs": 2,
"n_tactics": 38,
"cyclomatic": 3,
"n_automation": 3,
"n_rewrites": 2,
"n_structural": 2,
"automation_only": false,
"... | 3 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Fin.Tuple.Basic
public import NN.MLTheory.Proofs.ReLU.Bridge.ReLUMlpBridge
import Mathlib.Tactic.Ring
/-!
# Approximating multiplication with a 2-layer ReLU MLP (2... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Fin.Tuple.Basic
public import NN.MLTheory.Proofs.ReLU.Bridge.ReLUMlpBridge
import Mathlib.Tactic.Ring
/-!
# Approximating multiplication with a 2-layer ReLU MLP (2... | @@ -75,6 +75,11 @@
match rows ⟨0, by decide⟩ with
| .dim cols => (cols j).toScalar
+/-- `mat1_get` agrees with the `matrixMN` constructor. -/
+lemma singleRowMatrix_get_matrixMN {n : Nat} (f : Fin 1 → Fin n → ℝ) (j : Fin n) :
+ mat1Get (matrixMN 1 n (fun i j => f i j)) j = f 0 j := by
+ simp [mat1Get, m... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_a8b3144beed4_4 | 794eab83dedffa91 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/MLTheory/Proofs/ReLU/Approx/ReLUMulApprox.lean | ReLUMulApprox | 4 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 13 | 2 | [
{
"theorem_name": "mat_vec_mul_spec_oneRow",
"depth": 1,
"n_commands": 0,
"n_lines": 36,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n classical\n -- Put `A` and `v` into the canonical `matrixMN` / `Tensor.dim (Tensor.scalar ·)` forms,\n -- then u... | [
{
"name": "singleRowMatrix_get_matrixMN",
"text": "/-- `mat1_get` agrees with the `matrixMN` constructor. -/\nlemma singleRowMatrix_get_matrixMN {n : Nat} (f : Fin 1 → Fin n → ℝ) (j : Fin n) :\n mat1Get (matrixMN 1 n (fun i j => f i j)) j = f 0 j := by\n simp [mat1Get, matrixMN, Tensor.toScalar]\n\n",
... | [
{
"name": "mlp_eval_append_linear",
"fan_in": 1,
"n_deps_direct": 4,
"n_deps_transitive": 6,
"n_lines": 94,
"n_chars": 4672,
"n_subproofs": 5,
"n_tactics": 60,
"cyclomatic": 1,
"n_automation": 5,
"n_rewrites": 4,
"n_structural": 0,
"automation_only": false,
"m... | 6 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Fin.Tuple.Basic
public import NN.MLTheory.Proofs.ReLU.Bridge.ReLUMlpBridge
import Mathlib.Tactic.Ring
/-!
# Approximating multiplication with a 2-layer ReLU MLP (2... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Fin.Tuple.Basic
public import NN.MLTheory.Proofs.ReLU.Bridge.ReLUMlpBridge
import Mathlib.Tactic.Ring
/-!
# Approximating multiplication with a 2-layer ReLU MLP (2... | @@ -75,6 +75,11 @@
match rows ⟨0, by decide⟩ with
| .dim cols => (cols j).toScalar
+/-- `mat1_get` agrees with the `matrixMN` constructor. -/
+lemma singleRowMatrix_get_matrixMN {n : Nat} (f : Fin 1 → Fin n → ℝ) (j : Fin n) :
+ mat1Get (matrixMN 1 n (fun i j => f i j)) j = f 0 j := by
+ simp [mat1Get, m... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_a8b3144beed4_5 | 2b43da460d5a2516 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/MLTheory/Proofs/ReLU/Approx/ReLUMulApprox.lean | ReLUMulApprox | 5 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 13 | 1 | [
{
"theorem_name": "relu_mul_universal_approximation_box",
"depth": 1,
"n_commands": 0,
"n_lines": 128,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro ε hε\n have hM0 : 0 ≤ M := le_of_lt hM\n -- Step 1: approximate `square` on `[-2M,2M]` with ... | [
{
"name": "mul_identity",
"text": "/-- Algebraic identity expressing multiplication via a difference of squares. -/\nlemma mul_identity (x y : ℝ) : x * y = ((x + y) * (x + y) - (x - y) * (x - y)) / 4 := by\n ring\n\n",
"fan_in": 1,
"n_lines": 5,
"n_chars": 180,
"n_subproofs": 0,
"n_tact... | [
{
"name": "relu_mul_universal_approximation_box",
"fan_in": 0,
"n_deps_direct": 7,
"n_deps_transitive": 13,
"n_lines": 140,
"n_chars": 7521,
"n_subproofs": 31,
"n_tactics": 99,
"cyclomatic": 2,
"n_automation": 26,
"n_rewrites": 2,
"n_structural": 8,
"automation_on... | 13 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Fin.Tuple.Basic
public import NN.MLTheory.Proofs.ReLU.Bridge.ReLUMlpBridge
import Mathlib.Tactic.Ring
/-!
# Approximating multiplication with a 2-layer ReLU MLP (2... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.Data.Fin.Tuple.Basic
public import NN.MLTheory.Proofs.ReLU.Bridge.ReLUMlpBridge
import Mathlib.Tactic.Ring
/-!
# Approximating multiplication with a 2-layer ReLU MLP (2... | @@ -62,6 +62,10 @@
classical
simp [dot, wMinus, firstCoordinate, secondCoordinate, Fin.sum_univ_two, sub_eq_add_neg]
+/-- Algebraic identity expressing multiplication via a difference of squares. -/
+lemma mul_identity (x y : ℝ) : x * y = ((x + y) * (x + y) - (x - y) * (x - y)) / 4 := by
+ ring
+
/-- If `x ∈ ... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_9a301b2a386b_0 | 8b8937b1530bd9d4 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Floats/IEEEExec/BridgeFP32Expr.lean | BridgeFP32Expr | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 1 | 1 | [
{
"theorem_name": "toReal_evalRuntime_eq_evalSpec",
"depth": 1,
"n_commands": 0,
"n_lines": 88,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro e d h\n let envS : Nat → ℝ := fun i => IEEE32Exec.toReal (env i)\n induction h with\n | var i d h ... | [
{
"name": "isFinite_eq_true_of_toDyadic?_some",
"text": "private lemma isFinite_eq_true_of_toDyadic?_some {x : IEEE32Exec} {d : Dyadic}\n (hx : toDyadic? x = some d) : isFinite x = true := by\n unfold IEEE32Exec.isFinite\n apply (bne_iff_ne).2\n intro hEq\n have hEqb : (expField x == expAllOnes) = tr... | [
{
"name": "toReal_evalRuntime_eq_evalSpec",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 93,
"n_chars": 4992,
"n_subproofs": 24,
"n_tactics": 88,
"cyclomatic": 2,
"n_automation": 8,
"n_rewrites": 0,
"n_structural": 2,
"automation_only": fals... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Floats.IEEEExec.BridgeFP32
/-!
# BridgeFP32Expr
Compositional refinement lemmas on top of `NN/Floats/IEEEExec/BridgeFP32.lean`.
In `BridgeFP32.lean` we prove refinement th... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Floats.IEEEExec.BridgeFP32
/-!
# BridgeFP32Expr
Compositional refinement lemmas on top of `NN/Floats/IEEEExec/BridgeFP32.lean`.
In `BridgeFP32.lean` we prove refinement th... | @@ -108,6 +108,28 @@
`toDyadic? x = some d` immediately rules out NaN/Inf and unlocks the op-level bridge lemmas.
-/
+private lemma isFinite_eq_true_of_toDyadic?_some {x : IEEE32Exec} {d : Dyadic}
+ (hx : toDyadic? x = some d) : isFinite x = true := by
+ unfold IEEE32Exec.isFinite
+ apply (bne_iff_ne).2
+ int... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_bd9c8549f96e_0 | 7f162d852b2bcacc | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/RuntimeApprox/Graph/ForwardApprox.lean | ForwardApprox | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 3 | 2 | [
{
"theorem_name": "approxCtx_get_tolAbsOnly",
"depth": 1,
"n_commands": 0,
"n_lines": 17,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hi :\n approxT (α := α) (toSpec := toSpec)\n (TList.get (α := SpecScalar) xS i)\n (TList.... | [
{
"name": "approxCtx_get",
"text": "/-- Extract a single entry approximation from `approxCtx`. -/\nlemma approxCtx_get {toSpec : α → SpecScalar} {Γ : List Shape}\n {xS : TList SpecScalar Γ} {xR : TList α Γ} {eps : EList Γ}\n (h : approxCtx (α := α) toSpec xS xR eps) (i : Fin Γ.length) :\n approxT (... | [
{
"name": "approxCtx_get_tolAbsOnly",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 31,
"n_chars": 1303,
"n_subproofs": 2,
"n_tactics": 17,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": false,
... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.Autograd.Tape.Algebra.Soundness
public import NN.Proofs.RuntimeApprox.Core.SpecApprox
/-!
# ForwardApprox
Forward (runtime→spec) approximation framework.
This file ... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.Autograd.Tape.Algebra.Soundness
public import NN.Proofs.RuntimeApprox.Core.SpecApprox
/-!
# ForwardApprox
Forward (runtime→spec) approximation framework.
This file ... | @@ -197,6 +197,37 @@
scoped[RuntimeApprox] notation:50 ΓS " ≈ᶜ[" toSpec "] " ΓR " : " eps =>
Proofs.RuntimeApprox.approxCtx (toSpec := toSpec) ΓS ΓR eps
+/-- Extract a single entry approximation from `approxCtx`. -/
+lemma approxCtx_get {toSpec : α → SpecScalar} {Γ : List Shape}
+ {xS : TList SpecScalar Γ} {xR... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_bd9c8549f96e_1 | 58b27ca6c994c488 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/RuntimeApprox/Graph/ForwardApprox.lean | ForwardApprox | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 3 | 2 | [
{
"theorem_name": "approxCtx_get_tolAbsOnly",
"depth": 1,
"n_commands": 0,
"n_lines": 17,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hi :\n approxT (α := α) (toSpec := toSpec)\n (TList.get (α := SpecScalar) xS i)\n (TList.... | [
{
"name": "approxCtx_get",
"text": "/-- Extract a single entry approximation from `approxCtx`. -/\nlemma approxCtx_get {toSpec : α → SpecScalar} {Γ : List Shape}\n {xS : TList SpecScalar Γ} {xR : TList α Γ} {eps : EList Γ}\n (h : approxCtx (α := α) toSpec xS xR eps) (i : Fin Γ.length) :\n approxT (... | [
{
"name": "approxCtx_getIdx",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 25,
"n_chars": 1126,
"n_subproofs": 1,
"n_tactics": 6,
"cyclomatic": 3,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 2,
"automation_only": false,
"max_nest... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.Autograd.Tape.Algebra.Soundness
public import NN.Proofs.RuntimeApprox.Core.SpecApprox
/-!
# ForwardApprox
Forward (runtime→spec) approximation framework.
This file ... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.Autograd.Tape.Algebra.Soundness
public import NN.Proofs.RuntimeApprox.Core.SpecApprox
/-!
# ForwardApprox
Forward (runtime→spec) approximation framework.
This file ... | @@ -197,6 +197,37 @@
scoped[RuntimeApprox] notation:50 ΓS " ≈ᶜ[" toSpec "] " ΓR " : " eps =>
Proofs.RuntimeApprox.approxCtx (toSpec := toSpec) ΓS ΓR eps
+/-- Extract a single entry approximation from `approxCtx`. -/
+lemma approxCtx_get {toSpec : α → SpecScalar} {Γ : List Shape}
+ {xS : TList SpecScalar Γ} {xR... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_bd9c8549f96e_2 | a01669db427ccfbd | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/RuntimeApprox/Graph/ForwardApprox.lean | ForwardApprox | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 3 | 1 | [
{
"theorem_name": "eval_approx",
"depth": 1,
"n_commands": 0,
"n_lines": 40,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro xS xR epsIn hIn\n induction g generalizing xS xR epsIn with\n | nil =>\n -- `eval*` are casts along `Γ = Γ ++ []`... | [
{
"name": "approxCtx_cast",
"text": "/--\nTransport a context approximation across an equality of shape lists.\n\nThis is used any time we need to reassociate `Γ ++ ss` type indices (casts are unavoidable in this\n`List Shape`-indexed encoding).\n-/\nlemma approxCtx_cast {toSpec : α → SpecScalar} {ss₁ ss₂ :... | [
{
"name": "eval_approx",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 59,
"n_chars": 2810,
"n_subproofs": 3,
"n_tactics": 32,
"cyclomatic": 2,
"n_automation": 4,
"n_rewrites": 0,
"n_structural": 2,
"automation_only": false,
"max_nesting"... | 2 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.Autograd.Tape.Algebra.Soundness
public import NN.Proofs.RuntimeApprox.Core.SpecApprox
/-!
# ForwardApprox
Forward (runtime→spec) approximation framework.
This file ... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.Autograd.Tape.Algebra.Soundness
public import NN.Proofs.RuntimeApprox.Core.SpecApprox
/-!
# ForwardApprox
Forward (runtime→spec) approximation framework.
This file ... | @@ -198,6 +198,22 @@
Proofs.RuntimeApprox.approxCtx (toSpec := toSpec) ΓS ΓR eps
/--
+Transport a context approximation across an equality of shape lists.
+
+This is used any time we need to reassociate `Γ ++ ss` type indices (casts are unavoidable in this
+`List Shape`-indexed encoding).
+-/
+lemma approxCtx_cas... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_69f6bcb4ab1f_0 | 23f4b5790c68efd0 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/MLTheory/Generative/Diffusion/Samplers.lean | Samplers | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 3 | 1 | [
{
"theorem_name": "eulerStep_l2_distance_bound",
"depth": 1,
"n_commands": 0,
"n_lines": 13,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [NN.MLTheory.Robustness.Spec.tensorDistance,\n NN.MLTheory.Robustness.Spec.tensor_distance_tensor... | [
{
"name": "sub_add_scaled_eq",
"text": "/--\nSubtraction algebra for two explicit Euler updates.\n\nThe identity\n\n`(x + dt • fx) - (y + dt • fy) = (x - y) + dt • (fx - fy)`\n\nis the tensor-level algebraic core behind stability and Lipschitz proofs for ODE samplers. We keep\nit private because users shoul... | [
{
"name": "eulerStep_l2_distance_bound",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 39,
"n_chars": 2000,
"n_subproofs": 0,
"n_tactics": 13,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 2,
"n_structural": 1,
"automation_only": false,
... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Spec.Generative.Diffusion
public import NN.Spec.Dynamics.System
public import NN.MLTheory.LearningTheory.Robustness.Spec
public import NN.Proofs.Analysis.Lipschitz
import Ma... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Spec.Generative.Diffusion
public import NN.Spec.Dynamics.System
public import NN.MLTheory.LearningTheory.Robustness.Spec
public import NN.Proofs.Analysis.Lipschitz
import Ma... | @@ -89,6 +89,39 @@
/-! ## Quantitative Euler stability for probability-flow samplers -/
/--
+Subtraction algebra for two explicit Euler updates.
+
+The identity
+
+`(x + dt • fx) - (y + dt • fy) = (x - y) + dt • (fx - fy)`
+
+is the tensor-level algebraic core behind stability and Lipschitz proofs for ODE samplers.... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_69f6bcb4ab1f_1 | 0f24991c9b89e93f | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/MLTheory/Generative/Diffusion/Samplers.lean | Samplers | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 3 | 1 | [
{
"theorem_name": "eulerStep_l2_distance_bound",
"depth": 1,
"n_commands": 0,
"n_lines": 13,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [NN.MLTheory.Robustness.Spec.tensorDistance,\n NN.MLTheory.Robustness.Spec.tensor_distance_tensor... | [
{
"name": "sub_add_scaled_eq",
"text": "/--\nSubtraction algebra for two explicit Euler updates.\n\nThe identity\n\n`(x + dt • fx) - (y + dt • fy) = (x - y) + dt • (fx - fy)`\n\nis the tensor-level algebraic core behind stability and Lipschitz proofs for ODE samplers. We keep\nit private because users shoul... | [
{
"name": "eulerStep_l2_lipschitz_of_rhs_lipschitz",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 2,
"n_lines": 46,
"n_chars": 2285,
"n_subproofs": 3,
"n_tactics": 27,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 0,
"n_structural": 3,
"automation_onl... | 2 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Spec.Generative.Diffusion
public import NN.Spec.Dynamics.System
public import NN.MLTheory.LearningTheory.Robustness.Spec
public import NN.Proofs.Analysis.Lipschitz
import Ma... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Spec.Generative.Diffusion
public import NN.Spec.Dynamics.System
public import NN.MLTheory.LearningTheory.Robustness.Spec
public import NN.Proofs.Analysis.Lipschitz
import Ma... | @@ -89,6 +89,39 @@
/-! ## Quantitative Euler stability for probability-flow samplers -/
/--
+Subtraction algebra for two explicit Euler updates.
+
+The identity
+
+`(x + dt • fx) - (y + dt • fy) = (x - y) + dt • (fx - fy)`
+
+is the tensor-level algebraic core behind stability and Lipschitz proofs for ODE samplers.... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_69f6bcb4ab1f_2 | 907f89659a7f9c71 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/MLTheory/Generative/Diffusion/Samplers.lean | Samplers | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 3 | 1 | [
{
"theorem_name": "eulerStep_l2_distance_bound",
"depth": 1,
"n_commands": 0,
"n_lines": 13,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [NN.MLTheory.Robustness.Spec.tensorDistance,\n NN.MLTheory.Robustness.Spec.tensor_distance_tensor... | [
{
"name": "sub_add_scaled_eq",
"text": "/--\nSubtraction algebra for two explicit Euler updates.\n\nThe identity\n\n`(x + dt • fx) - (y + dt • fy) = (x - y) + dt • (fx - fy)`\n\nis the tensor-level algebraic core behind stability and Lipschitz proofs for ODE samplers. We keep\nit private because users shoul... | [
{
"name": "pfOdeEulerSystem_l2_lipschitz_of_rhs_lipschitz",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 3,
"n_lines": 24,
"n_chars": 1230,
"n_subproofs": 0,
"n_tactics": 4,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automati... | 3 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Spec.Generative.Diffusion
public import NN.Spec.Dynamics.System
public import NN.MLTheory.LearningTheory.Robustness.Spec
public import NN.Proofs.Analysis.Lipschitz
import Ma... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Spec.Generative.Diffusion
public import NN.Spec.Dynamics.System
public import NN.MLTheory.LearningTheory.Robustness.Spec
public import NN.Proofs.Analysis.Lipschitz
import Ma... | @@ -89,6 +89,39 @@
/-! ## Quantitative Euler stability for probability-flow samplers -/
/--
+Subtraction algebra for two explicit Euler updates.
+
+The identity
+
+`(x + dt • fx) - (y + dt • fy) = (x - y) + dt • (fx - fy)`
+
+is the tensor-level algebraic core behind stability and Lipschitz proofs for ODE samplers.... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_659cf05a4c8c_0 | 26f4b49928778fc0 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/RuntimeApprox/NF/Ops/Elementwise/SafeDivSigmoid.lean | SafeDivSigmoid | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 1 | 1 | [
{
"theorem_name": "approxT_safeDiv_spec",
"depth": 1,
"n_commands": 0,
"n_lines": 19,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro xS yS xR yR epsx epsy hx hy\n have h :=\n approxT_map2_spec_of_scalar_bound (α := R) (toSpec := toSpec (β :... | [
{
"name": "approx_safeDiv_nf",
"text": "/--\nForward approximation bound for `safeDiv` in `NF`.\n\n`safeDiv ε x y = x / max y ε` clamps the denominator away from 0. For `ε > 0`, this yields an\nunconditional bound with explicit `(1/ε)` and `(1/ε^2)` sensitivity terms plus one rounding-ULP\n term.\n-/\nlemm... | [
{
"name": "approxT_safeDiv_spec",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 37,
"n_chars": 1754,
"n_subproofs": 1,
"n_tactics": 19,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 0,
"n_structural": 2,
"automation_only": false,
"max... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.RuntimeApprox.NF.Ops.Elementwise.SoftplusSafeLog
/-!
# NF Elementwise Bounds: Safe Division and Sigmoid
-/
@[expose] public section
namespace Proofs
namespace Runti... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Proofs.RuntimeApprox.NF.Ops.Elementwise.SoftplusSafeLog
/-!
# NF Elementwise Bounds: Safe Division and Sigmoid
-/
@[expose] public section
namespace Proofs
namespace Runti... | @@ -49,6 +49,190 @@
(toSpec (β := β) (fexp := fexp) (rnd := rnd) yR))
/--
+Forward approximation bound for `safeDiv` in `NF`.
+
+`safeDiv ε x y = x / max y ε` clamps the denominator away from 0. For `ε > 0`, this yields an
+unconditional bound with explicit `(1/ε)` and `(1/ε^2)` sensitivity terms plus one rou... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_da15a5097074_0 | 4bcdb1d397c86aca | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/Models/Attention/CausalMask.lean | CausalMask | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 3 | 1 | [
{
"theorem_name": "hardMaskedSoftmaxSpec_blocked_eq_zero",
"depth": 1,
"n_commands": 0,
"n_lines": 23,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n cases scores with\n | dim scoreRows =>\n cases mask with\n | dim maskRows =>\n cases hsc... | [
{
"name": "hardMaskedSoftmaxVecSpec_blocked_eq_zero",
"text": "/-- Any blocked coordinate of a hard-masked softmax vector has exactly zero weight. -/\ntheorem hardMaskedSoftmaxVecSpec_blocked_eq_zero\n {n : Nat}\n (scores : Spec.Tensor ℝ (.dim n .scalar))\n (mask : Spec.Tensor Bool (.dim n .scalar)... | [
{
"name": "hardMaskedSoftmaxSpec_blocked_eq_zero",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 32,
"n_chars": 1329,
"n_subproofs": 1,
"n_tactics": 23,
"cyclomatic": 5,
"n_automation": 3,
"n_rewrites": 1,
"n_structural": 5,
"automation_only"... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Spec.Layers.Attention
public import NN.Proofs.Tensor.Basic
/-!
# Causal attention mask laws
This file proves the exact Boolean semantics of TorchLean's causal and future ma... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Spec.Layers.Attention
public import NN.Proofs.Tensor.Basic
/-!
# Causal attention mask laws
This file proves the exact Boolean semantics of TorchLean's causal and future ma... | @@ -81,6 +81,31 @@
past-or-present column.
-/
+/-- Any blocked coordinate of a hard-masked softmax vector has exactly zero weight. -/
+theorem hardMaskedSoftmaxVecSpec_blocked_eq_zero
+ {n : Nat}
+ (scores : Spec.Tensor ℝ (.dim n .scalar))
+ (mask : Spec.Tensor Bool (.dim n .scalar))
+ (j : Fin n)
+ ... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_da15a5097074_1 | 4e3e67d46868a6c3 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/Models/Attention/CausalMask.lean | CausalMask | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 3 | 1 | [
{
"theorem_name": "hardMaskedSoftmaxSpec_blocked_eq_zero",
"depth": 1,
"n_commands": 0,
"n_lines": 23,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n cases scores with\n | dim scoreRows =>\n cases mask with\n | dim maskRows =>\n cases hsc... | [
{
"name": "hardMaskedSoftmaxVecSpec_blocked_eq_zero",
"text": "/-- Any blocked coordinate of a hard-masked softmax vector has exactly zero weight. -/\ntheorem hardMaskedSoftmaxVecSpec_blocked_eq_zero\n {n : Nat}\n (scores : Spec.Tensor ℝ (.dim n .scalar))\n (mask : Spec.Tensor Bool (.dim n .scalar)... | [
{
"name": "hardMaskedSoftmaxSpec_causal_future_zero",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 3,
"n_lines": 10,
"n_chars": 461,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 1,
"automation_only... | 3 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Spec.Layers.Attention
public import NN.Proofs.Tensor.Basic
/-!
# Causal attention mask laws
This file proves the exact Boolean semantics of TorchLean's causal and future ma... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Spec.Layers.Attention
public import NN.Proofs.Tensor.Basic
/-!
# Causal attention mask laws
This file proves the exact Boolean semantics of TorchLean's causal and future ma... | @@ -86,6 +86,31 @@
Spec.get2 (Spec.causalMask n) i j = false := by
simp [Nat.not_le_of_gt hij]
+/-- Any blocked coordinate of a hard-masked softmax vector has exactly zero weight. -/
+theorem hardMaskedSoftmaxVecSpec_blocked_eq_zero
+ {n : Nat}
+ (scores : Spec.Tensor ℝ (.dim n .scalar))
+ (mask : Sp... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_4ab0c1cd60cc_0 | 3972ad60165e0e01 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/Probability/DiffusionForward.lean | DiffusionForward | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 1 | 1 | [
{
"theorem_name": "isGaussian_forwardKernel",
"depth": 1,
"n_commands": 0,
"n_lines": 3,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simpa [forwardKernel_apply (E := E) a b x] using\n (inferInstance : ProbabilityTheory.IsGaussian (forwardNoisin... | [
{
"name": "forwardKernel_apply",
"text": "/--\nApplying the kernel at state `x` recovers exactly the forward-noising measure at `x`.\n\nThe kernel is built from `id × const stdGaussian` so it fits Mathlib kernel\ncomposition; this theorem reconnects that construction to the simpler noising formula.\n-/\nlem... | [
{
"name": "isGaussian_forwardKernel",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 7,
"n_chars": 329,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,
"max... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.MeasureTheory.Measure.Prod
public import Mathlib.MeasureTheory.Measure.Typeclasses.Probability
public import Mathlib.Probability.Distributions.Gaussian.Multivariate
publ... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import Mathlib.MeasureTheory.Measure.Prod
public import Mathlib.MeasureTheory.Measure.Typeclasses.Probability
public import Mathlib.Probability.Distributions.Gaussian.Multivariate
publ... | @@ -104,9 +104,34 @@
(κ := (Kernel.id ×ₖ Kernel.const E (ProbabilityTheory.stdGaussian E)))
(f := fun p : E × E ↦ a • p.1 + b • p.2) (by fun_prop)
+/--
+Applying the kernel at state `x` recovers exactly the forward-noising measure at `x`.
+
+The kernel is built from `id × const stdGaussian` so it fits Mathl... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_79cf0ed3c77b_0 | 1d564dbbe819e2a8 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/Tensor/Basic/FactorizationsReconstruction.lean | FactorizationsReconstruction | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 38 | 1 | [
{
"theorem_name": "choleskyFn_eq_step",
"depth": 1,
"n_commands": 0,
"n_lines": 8,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hlen : j.val < (List.finRange n).length := by rw [List.length_finRange]; exact j.isLt\n show (Spec.choleskyColsFn ... | [
{
"name": "choleskyColsFn_eq",
"text": "/-- `choleskyColsFn` is the snoc-fold appending `cholStep`. -/\ntheorem choleskyColsFn_eq (A : Fin n → Fin n → ℝ) :\n Spec.choleskyColsFn A\n = (List.finRange n).foldl (fun cols j => cols ++ [cholStep A cols j]) [] := rfl\n\n",
"fan_in": 1,
"n_lines": ... | [
{
"name": "choleskyFn_eq_step",
"fan_in": 3,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 12,
"n_chars": 617,
"n_subproofs": 2,
"n_tactics": 9,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 4,
"n_structural": 1,
"automation_only": false,
"max_nes... | 1 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Spec.Core.Tensor.Factorizations
public import NN.Proofs.Tensor.Basic.Factorizations
public import Mathlib.Data.List.GetD
public import Mathlib.Algebra.BigOperators.Fin
/-!
#... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Spec.Core.Tensor.Factorizations
public import NN.Proofs.Tensor.Basic.Factorizations
public import Mathlib.Data.List.GetD
public import Mathlib.Algebra.BigOperators.Fin
/-!
#... | @@ -74,13 +74,25 @@
let s := (cols.map (fun ck => ck i * ck j)).foldl (fun acc x => acc + x) 0
(A i j - s) / Ljj
+/-- `choleskyColsFn` is the snoc-fold appending `cholStep`. -/
+theorem choleskyColsFn_eq (A : Fin n → Fin n → ℝ) :
+ Spec.choleskyColsFn A
+ = (List.finRange n).foldl (fun cols j =>... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_79cf0ed3c77b_1 | 81ea4aa52982569b | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/Tensor/Basic/FactorizationsReconstruction.lean | FactorizationsReconstruction | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 38 | 3 | [
{
"theorem_name": "prefix_eq_map",
"depth": 1,
"n_commands": 0,
"n_lines": 22,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hjval : ((List.finRange n).take j.val).length = j.val := by\n rw [List.length_take, List.length_finRange, Nat.min_eq... | [
{
"name": "choleskyFn_eq_step",
"text": "/-- Entry `(i, j)` of the executable Cholesky factor equals `cholStep` evaluated on the prefix. -/\ntheorem choleskyFn_eq_step (A : Fin n → Fin n → ℝ) (i j : Fin n) :\n Spec.choleskyFn A i j = cholStep A (prefixCols A j) j i := by\n have hlen : j.val < (List.finR... | [
{
"name": "prefix_eq_map",
"fan_in": 2,
"n_deps_direct": 1,
"n_deps_transitive": 2,
"n_lines": 30,
"n_chars": 1376,
"n_subproofs": 3,
"n_tactics": 25,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 14,
"n_structural": 6,
"automation_only": false,
"max_nesti... | 2 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Spec.Core.Tensor.Factorizations
public import NN.Proofs.Tensor.Basic.Factorizations
public import Mathlib.Data.List.GetD
public import Mathlib.Algebra.BigOperators.Fin
/-!
#... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Spec.Core.Tensor.Factorizations
public import NN.Proofs.Tensor.Basic.Factorizations
public import Mathlib.Data.List.GetD
public import Mathlib.Algebra.BigOperators.Fin
/-!
#... | @@ -83,6 +83,17 @@
noncomputable def prefixCols (A : Fin n → Fin n → ℝ) (j : Fin n) : List (Fin n → ℝ) :=
((List.finRange n).take j.val).foldl (fun cols k => cols ++ [cholStep A cols k]) []
+/-- Entry `(i, j)` of the executable Cholesky factor equals `cholStep` evaluated on the prefix. -/
+theorem choleskyFn_eq_s... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_79cf0ed3c77b_2 | 13b1a0bb80e62a33 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/Tensor/Basic/FactorizationsReconstruction.lean | FactorizationsReconstruction | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 38 | 1 | [
{
"theorem_name": "take_map_sum_eq",
"depth": 1,
"n_commands": 0,
"n_lines": 15,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rw [finsum_eq_finRange_sum]\n conv_rhs => rw [show (List.finRange n)\n = (List.finRange n).take m ++ (List.finRange n)... | [
{
"name": "mem_drop_finRange",
"text": "/-- Every element of a `finRange` tail has index at least the cut. -/\ntheorem mem_drop_finRange {m : Nat} {x : Fin n} (hx : x ∈ (List.finRange n).drop m) :\n m ≤ x.val := by\n obtain ⟨p, hp, hpx⟩ := List.getElem_of_mem hx\n rw [List.getElem_drop, List.getElem_fi... | [
{
"name": "take_map_sum_eq",
"fan_in": 3,
"n_deps_direct": 3,
"n_deps_transitive": 3,
"n_lines": 19,
"n_chars": 936,
"n_subproofs": 4,
"n_tactics": 16,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 7,
"n_structural": 3,
"automation_only": false,
"max_nesti... | 3 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Spec.Core.Tensor.Factorizations
public import NN.Proofs.Tensor.Basic.Factorizations
public import Mathlib.Data.List.GetD
public import Mathlib.Algebra.BigOperators.Fin
/-!
#... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Spec.Core.Tensor.Factorizations
public import NN.Proofs.Tensor.Basic.Factorizations
public import Mathlib.Data.List.GetD
public import Mathlib.Algebra.BigOperators.Fin
/-!
#... | @@ -98,6 +98,14 @@
subst hpx
exact lt_of_lt_of_le hp (Nat.min_le_left m n)
+/-- Every element of a `finRange` tail has index at least the cut. -/
+theorem mem_drop_finRange {m : Nat} {x : Fin n} (hx : x ∈ (List.finRange n).drop m) :
+ m ≤ x.val := by
+ obtain ⟨p, hp, hpx⟩ := List.getElem_of_mem hx
+ rw [Li... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
ablate_79cf0ed3c77b_3 | 51c8cc00fec31cf0 | lean | lean | github.com/lean-dojo/TorchLean | a0c5bdf2bb02c25b270a2c89a12ad2335c86c530 | NN/Proofs/Tensor/Basic/FactorizationsReconstruction.lean | FactorizationsReconstruction | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 38 | 1 | [
{
"theorem_name": "take_map_sum_eq",
"depth": 1,
"n_commands": 0,
"n_lines": 15,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rw [finsum_eq_finRange_sum]\n conv_rhs => rw [show (List.finRange n)\n = (List.finRange n).take m ++ (List.finRange n)... | [
{
"name": "mem_take_finRange",
"text": "/-- Every element of a `finRange` prefix has index below the cut. -/\ntheorem mem_take_finRange {m : Nat} {x : Fin n} (hx : x ∈ (List.finRange n).take m) :\n x.val < m := by\n obtain ⟨p, hp, hpx⟩ := List.getElem_of_mem hx\n rw [List.length_take, List.length_finRa... | [
{
"name": "cross_sum_eq",
"fan_in": 1,
"n_deps_direct": 3,
"n_deps_transitive": 8,
"n_lines": 10,
"n_chars": 670,
"n_subproofs": 0,
"n_tactics": 5,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 2,
"n_structural": 1,
"automation_only": false,
"max_nesting":... | 8 | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Spec.Core.Tensor.Factorizations
public import NN.Proofs.Tensor.Basic.Factorizations
public import Mathlib.Data.List.GetD
public import Mathlib.Algebra.BigOperators.Fin
/-!
#... | /-
Copyright (c) 2026 TorchLean
Released under MIT license as described in the file LICENSE.
Authors: TorchLean Team
-/
module
public import NN.Spec.Core.Tensor.Factorizations
public import NN.Proofs.Tensor.Basic.Factorizations
public import Mathlib.Data.List.GetD
public import Mathlib.Algebra.BigOperators.Fin
/-!
#... | @@ -141,6 +141,15 @@
/-! ### List/Finset partial-sum bridges -/
+/-- Every element of a `finRange` prefix has index below the cut. -/
+theorem mem_take_finRange {m : Nat} {x : Fin n} (hx : x ∈ (List.finRange n).take m) :
+ x.val < m := by
+ obtain ⟨p, hp, hpx⟩ := List.getElem_of_mem hx
+ rw [List.length_take,... | {
"repo": "TorchLean",
"git_repo": "github.com/lean-dojo/TorchLean",
"revision": "a0c5bdf2bb02c25b270a2c89a12ad2335c86c530",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.