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_47fd08dea9e3_19 | fdb72920e2bccdfc | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 19 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 4 | [
{
"theorem_name": "exact_cubic_lt_wExpCubicKernel_scaled_add_error",
"depth": 1,
"n_commands": 0,
"n_lines": 42,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n let second := (r * r) / (2 * WAD_NAT)\n let third := (second * r) / (3 * WAD_NAT)\n let ... | [
{
"name": "WAD_NAT_pos",
"text": "/-- The wad scale used by the TickLib exponential kernel is positive. -/\nprivate theorem WAD_NAT_pos : 0 < WAD_NAT := by\n decide\n\n",
"fan_in": 4,
"n_lines": 5,
"n_chars": 131,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation"... | [
{
"name": "sdivTrunc_ofNat_mul_WAD",
"fan_in": 3,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 15,
"n_chars": 602,
"n_subproofs": 4,
"n_tactics": 11,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 1,
"n_structural": 2,
"automation_only": false,
"m... | 2 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -35,6 +35,10 @@
/-! ## BN254 Field Helpers -/
+/-- The wad scale used by the TickLib exponential kernel is positive. -/
+private theorem WAD_NAT_pos : 0 < WAD_NAT := by
+ decide
+
private theorem sdivTrunc_of_nonneg {a b : Int} (ha : 0 ≤ a) (hb : 0 < b) :
sdivTrunc a b = Int.ofNat (a.toNat / b.natAbs) :=... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_20 | 2198fcac18b8414b | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 20 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 3 | [
{
"theorem_name": "sdivTrunc_sq_of_nonneg",
"depth": 1,
"n_commands": 0,
"n_lines": 9,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hsquare : r * r = Int.ofNat (r.toNat * r.toNat) := by\n rw [← Int.toNat_of_nonneg hr]\n change ((r.toNat ... | [
{
"name": "sdivTrunc_ofNat_mul_WAD",
"text": "private theorem sdivTrunc_ofNat_mul_WAD (a k : Nat) (hk : 0 < k) :\n sdivTrunc (Int.ofNat a) (Int.ofNat (k * WAD_NAT)) =\n Int.ofNat (a / (k * WAD_NAT)) := by\n have hden : (0 : Int) < Int.ofNat (k * WAD_NAT) := by\n exact Int.natCast_pos.mpr (Nat.mu... | [
{
"name": "sdivTrunc_sq_of_nonneg",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 3,
"n_lines": 13,
"n_chars": 509,
"n_subproofs": 1,
"n_tactics": 9,
"cyclomatic": 1,
"n_automation": 3,
"n_rewrites": 3,
"n_structural": 0,
"automation_only": false,
"max... | 3 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -46,9 +46,31 @@
have hnot : ¬a < 0 := by omega
simp [hb_ne, hnot]
+private theorem sdivTrunc_ofNat_mul_WAD (a k : Nat) (hk : 0 < k) :
+ sdivTrunc (Int.ofNat a) (Int.ofNat (k * WAD_NAT)) =
+ Int.ofNat (a / (k * WAD_NAT)) := by
+ have hden : (0 : Int) < Int.ofNat (k * WAD_NAT) := by
+ exact Int.nat... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_21 | b8dd0a04a2ecb750 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 21 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 3 | [
{
"theorem_name": "sdivTrunc_sq_of_nonneg",
"depth": 1,
"n_commands": 0,
"n_lines": 9,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hsquare : r * r = Int.ofNat (r.toNat * r.toNat) := by\n rw [← Int.toNat_of_nonneg hr]\n change ((r.toNat ... | [
{
"name": "sdivTrunc_ofNat_mul_WAD",
"text": "private theorem sdivTrunc_ofNat_mul_WAD (a k : Nat) (hk : 0 < k) :\n sdivTrunc (Int.ofNat a) (Int.ofNat (k * WAD_NAT)) =\n Int.ofNat (a / (k * WAD_NAT)) := by\n have hden : (0 : Int) < Int.ofNat (k * WAD_NAT) := by\n exact Int.natCast_pos.mpr (Nat.mu... | [
{
"name": "wExpSignedCubicKernel_eq_natKernel_of_nonneg",
"fan_in": 3,
"n_deps_direct": 2,
"n_deps_transitive": 4,
"n_lines": 28,
"n_chars": 1279,
"n_subproofs": 3,
"n_tactics": 23,
"cyclomatic": 1,
"n_automation": 4,
"n_rewrites": 7,
"n_structural": 1,
"automatio... | 4 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -46,9 +46,31 @@
have hnot : ¬a < 0 := by omega
simp [hb_ne, hnot]
+private theorem sdivTrunc_ofNat_mul_WAD (a k : Nat) (hk : 0 < k) :
+ sdivTrunc (Int.ofNat a) (Int.ofNat (k * WAD_NAT)) =
+ Int.ofNat (a / (k * WAD_NAT)) := by
+ have hden : (0 : Int) < Int.ofNat (k * WAD_NAT) := by
+ exact Int.nat... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_22 | 3fe1b3d3f10a9fc7 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 22 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 1 | [
{
"theorem_name": "wExpSignedCubicKernel_eq_natKernel_of_nonneg",
"depth": 1,
"n_commands": 0,
"n_lines": 23,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n unfold wExpSignedCubicKernel wExpCubicKernel\n rw [sdivTrunc_sq_of_nonneg hr]\n have hr_cas... | [
{
"name": "sdivTrunc_sq_of_nonneg",
"text": "private theorem sdivTrunc_sq_of_nonneg {r : Int} (hr : 0 ≤ r) :\n sdivTrunc (r * r) (2 * Int.ofNat WAD_NAT) =\n Int.ofNat ((r.toNat * r.toNat) / (2 * WAD_NAT)) := by\n have hsquare : r * r = Int.ofNat (r.toNat * r.toNat) := by\n rw [← Int.toNat_of_non... | [
{
"name": "wExpSignedCubicKernel_real_error_nonneg",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 10,
"n_lines": 16,
"n_chars": 719,
"n_subproofs": 4,
"n_tactics": 9,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 1,
"n_structural": 0,
"automation_only... | 10 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -238,10 +238,44 @@
rw [hnum, hdenAbs] at h
exact h
+private theorem sdivTrunc_sq_of_nonneg {r : Int} (hr : 0 ≤ r) :
+ sdivTrunc (r * r) (2 * Int.ofNat WAD_NAT) =
+ Int.ofNat ((r.toNat * r.toNat) / (2 * WAD_NAT)) := by
+ have hsquare : r * r = Int.ofNat (r.toNat * r.toNat) := by
+ rw [← Int.toNat_... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_23 | a7210294865774fd | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 23 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 4 | [
{
"theorem_name": "exact_cubic_lt_wExpCubicKernel_scaled_add_error",
"depth": 1,
"n_commands": 0,
"n_lines": 42,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n let second := (r * r) / (2 * WAD_NAT)\n let third := (second * r) / (3 * WAD_NAT)\n let ... | [
{
"name": "WAD_NAT_pos",
"text": "/-- The wad scale used by the TickLib exponential kernel is positive. -/\nprivate theorem WAD_NAT_pos : 0 < WAD_NAT := by\n decide\n\n",
"fan_in": 4,
"n_lines": 5,
"n_chars": 131,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation"... | [
{
"name": "sdivTrunc_neg_ofNat_mul_WAD",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 28,
"n_chars": 1198,
"n_subproofs": 7,
"n_tactics": 24,
"cyclomatic": 1,
"n_automation": 5,
"n_rewrites": 4,
"n_structural": 3,
"automation_only": false,
... | 1 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -35,11 +35,16 @@
/-! ## BN254 Field Helpers -/
+/-- The wad scale used by the TickLib exponential kernel is positive. -/
+private theorem WAD_NAT_pos : 0 < WAD_NAT := by
+ decide
+
private theorem sdivTrunc_neg_ofNat_mul_WAD (a k : Nat) (hk : 0 < k) :
sdivTrunc (-(Int.ofNat a)) (Int.ofNat (k * WAD_NAT)) ... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_24 | 63fae1aa8db14eb6 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 24 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 3 | [
{
"theorem_name": "sdivTrunc_sq_of_nonneg",
"depth": 1,
"n_commands": 0,
"n_lines": 9,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hsquare : r * r = Int.ofNat (r.toNat * r.toNat) := by\n rw [← Int.toNat_of_nonneg hr]\n change ((r.toNat ... | [
{
"name": "sdivTrunc_ofNat_mul_WAD",
"text": "private theorem sdivTrunc_ofNat_mul_WAD (a k : Nat) (hk : 0 < k) :\n sdivTrunc (Int.ofNat a) (Int.ofNat (k * WAD_NAT)) =\n Int.ofNat (a / (k * WAD_NAT)) := by\n have hden : (0 : Int) < Int.ofNat (k * WAD_NAT) := by\n exact Int.natCast_pos.mpr (Nat.mu... | [
{
"name": "sdivTrunc_sq_of_neg_nat",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 3,
"n_lines": 10,
"n_chars": 366,
"n_subproofs": 1,
"n_tactics": 6,
"cyclomatic": 1,
"n_automation": 3,
"n_rewrites": 1,
"n_structural": 0,
"automation_only": false,
"ma... | 3 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -46,9 +46,28 @@
have hnot : ¬a < 0 := by omega
simp [hb_ne, hnot]
+private theorem sdivTrunc_ofNat_mul_WAD (a k : Nat) (hk : 0 < k) :
+ sdivTrunc (Int.ofNat a) (Int.ofNat (k * WAD_NAT)) =
+ Int.ofNat (a / (k * WAD_NAT)) := by
+ have hden : (0 : Int) < Int.ofNat (k * WAD_NAT) := by
+ exact Int.nat... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_25 | 3250a5b46a174983 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 25 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 4 | [
{
"theorem_name": "exact_cubic_lt_wExpCubicKernel_scaled_add_error",
"depth": 1,
"n_commands": 0,
"n_lines": 42,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n let second := (r * r) / (2 * WAD_NAT)\n let third := (second * r) / (3 * WAD_NAT)\n let ... | [
{
"name": "WAD_NAT_pos",
"text": "/-- The wad scale used by the TickLib exponential kernel is positive. -/\nprivate theorem WAD_NAT_pos : 0 < WAD_NAT := by\n decide\n\n",
"fan_in": 4,
"n_lines": 5,
"n_chars": 131,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation"... | [
{
"name": "sdivTrunc_neg_third_of_nat",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 2,
"n_lines": 10,
"n_chars": 419,
"n_subproofs": 1,
"n_tactics": 6,
"cyclomatic": 1,
"n_automation": 3,
"n_rewrites": 1,
"n_structural": 0,
"automation_only": false,
... | 2 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -35,11 +35,16 @@
/-! ## BN254 Field Helpers -/
+/-- The wad scale used by the TickLib exponential kernel is positive. -/
+private theorem WAD_NAT_pos : 0 < WAD_NAT := by
+ decide
+
private theorem sdivTrunc_neg_ofNat_mul_WAD (a k : Nat) (hk : 0 < k) :
sdivTrunc (-(Int.ofNat a)) (Int.ofNat (k * WAD_NAT)) ... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_26 | 033a9985c2f928a4 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 26 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 1 | [
{
"theorem_name": "sdivTrunc_neg_third_of_nat",
"depth": 1,
"n_commands": 0,
"n_lines": 6,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hmul : Int.ofNat secondNat * -(s : Int) = -Int.ofNat (secondNat * s) := by\n norm_num [Int.natCast_mul]\... | [
{
"name": "sdivTrunc_neg_ofNat_mul_WAD",
"text": "private theorem sdivTrunc_neg_ofNat_mul_WAD (a k : Nat) (hk : 0 < k) :\n sdivTrunc (-(Int.ofNat a)) (Int.ofNat (k * WAD_NAT)) =\n -Int.ofNat (a / (k * WAD_NAT)) := by\n unfold sdivTrunc\n have hb_ne : (Int.ofNat (k * WAD_NAT) : Int) ≠ 0 := by\n ... | [
{
"name": "wExpSignedCubicKernel_neg_eq",
"fan_in": 3,
"n_deps_direct": 2,
"n_deps_transitive": 6,
"n_lines": 18,
"n_chars": 793,
"n_subproofs": 0,
"n_tactics": 11,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 4,
"n_structural": 0,
"automation_only": false,
... | 6 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -60,6 +60,33 @@
rw [hnum, hdenAbs] at h
exact h
+private theorem sdivTrunc_neg_ofNat_mul_WAD (a k : Nat) (hk : 0 < k) :
+ sdivTrunc (-(Int.ofNat a)) (Int.ofNat (k * WAD_NAT)) =
+ -Int.ofNat (a / (k * WAD_NAT)) := by
+ unfold sdivTrunc
+ have hb_ne : (Int.ofNat (k * WAD_NAT) : Int) ≠ 0 := by
+ ex... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_27 | 90e9ad39a3e6397c | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 27 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 2 | [
{
"theorem_name": "neg_second_floor_slack_bounds",
"depth": 1,
"n_commands": 0,
"n_lines": 11,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro secondNat\n have h2W : 0 < 2 * WAD_NAT := by decide\n have h := nat_div_floor_real_bounds (s * s) (2... | [
{
"name": "nat_div_floor_real_bounds",
"text": "private theorem nat_div_floor_real_bounds (n d : Nat) (hd : 0 < d) :\n 0 ≤ (n:ℝ)/(d:ℝ) - ((n/d:Nat):ℝ) ∧\n (n:ℝ)/(d:ℝ) - ((n/d:Nat):ℝ) < 1 := by\n have hdR : (0 : ℝ) < d := by exact_mod_cast hd\n have hloNat : (n / d) * d ≤ n := Nat.div_mul_le_self n... | [
{
"name": "neg_second_floor_slack_bounds",
"fan_in": 2,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 16,
"n_chars": 628,
"n_subproofs": 4,
"n_tactics": 11,
"cyclomatic": 2,
"n_automation": 3,
"n_rewrites": 0,
"n_structural": 4,
"automation_only": false,
... | 1 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -35,10 +35,39 @@
/-! ## BN254 Field Helpers -/
+private theorem nat_div_floor_real_bounds (n d : Nat) (hd : 0 < d) :
+ 0 ≤ (n:ℝ)/(d:ℝ) - ((n/d:Nat):ℝ) ∧
+ (n:ℝ)/(d:ℝ) - ((n/d:Nat):ℝ) < 1 := by
+ have hdR : (0 : ℝ) < d := by exact_mod_cast hd
+ have hloNat : (n / d) * d ≤ n := Nat.div_mul_le_self n d
+... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_28 | a17906a678407e51 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 28 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 2 | [
{
"theorem_name": "neg_second_floor_slack_bounds",
"depth": 1,
"n_commands": 0,
"n_lines": 11,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro secondNat\n have h2W : 0 < 2 * WAD_NAT := by decide\n have h := nat_div_floor_real_bounds (s * s) (2... | [
{
"name": "nat_div_floor_real_bounds",
"text": "private theorem nat_div_floor_real_bounds (n d : Nat) (hd : 0 < d) :\n 0 ≤ (n:ℝ)/(d:ℝ) - ((n/d:Nat):ℝ) ∧\n (n:ℝ)/(d:ℝ) - ((n/d:Nat):ℝ) < 1 := by\n have hdR : (0 : ℝ) < d := by exact_mod_cast hd\n have hloNat : (n / d) * d ≤ n := Nat.div_mul_le_self n... | [
{
"name": "neg_third_floor_slack_bounds",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 17,
"n_chars": 710,
"n_subproofs": 4,
"n_tactics": 11,
"cyclomatic": 2,
"n_automation": 3,
"n_rewrites": 0,
"n_structural": 4,
"automation_only": false,
... | 1 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -35,11 +35,40 @@
/-! ## BN254 Field Helpers -/
+private theorem nat_div_floor_real_bounds (n d : Nat) (hd : 0 < d) :
+ 0 ≤ (n:ℝ)/(d:ℝ) - ((n/d:Nat):ℝ) ∧
+ (n:ℝ)/(d:ℝ) - ((n/d:Nat):ℝ) < 1 := by
+ have hdR : (0 : ℝ) < d := by exact_mod_cast hd
+ have hloNat : (n / d) * d ≤ n := Nat.div_mul_le_self n d
+... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_29 | 80e90c8f797028ef | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 29 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 2 | [
{
"theorem_name": "neg_third_exact_bridge_bounds",
"depth": 1,
"n_commands": 0,
"n_lines": 25,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro secondNat\n have hWpos : (0 : ℝ) < (WAD_NAT : ℝ) := by norm_num [WAD_NAT]\n have hWne : (WAD_NAT : ℝ... | [
{
"name": "neg_second_floor_slack_bounds",
"text": "private theorem neg_second_floor_slack_bounds (s : Nat) :\n let secondNat := (s * s) / (2 * WAD_NAT)\n 0 ≤ (s : ℝ)^2 / (2 * (WAD_NAT : ℝ)) - (secondNat : ℝ) ∧\n (s : ℝ)^2 / (2 * (WAD_NAT : ℝ)) - (secondNat : ℝ) < 1 := by\n intro secondNat\n ha... | [
{
"name": "neg_third_exact_bridge_bounds",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 2,
"n_lines": 32,
"n_chars": 1522,
"n_subproofs": 11,
"n_tactics": 25,
"cyclomatic": 2,
"n_automation": 10,
"n_rewrites": 3,
"n_structural": 3,
"automation_only": fals... | 2 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -54,12 +54,51 @@
simpa using htmp
constructor <;> linarith
+private theorem neg_second_floor_slack_bounds (s : Nat) :
+ let secondNat := (s * s) / (2 * WAD_NAT)
+ 0 ≤ (s : ℝ)^2 / (2 * (WAD_NAT : ℝ)) - (secondNat : ℝ) ∧
+ (s : ℝ)^2 / (2 * (WAD_NAT : ℝ)) - (secondNat : ℝ) < 1 := by
+ intro second... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_30 | 3dc9a1723639f7fd | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 30 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 1 | [
{
"theorem_name": "neg_kernel_inner_floor_slack",
"depth": 1,
"n_commands": 0,
"n_lines": 7,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro secondNat thirdNat\n have hA := neg_second_floor_slack_bounds s\n have hB := neg_third_floor_slack_bou... | [
{
"name": "neg_third_floor_slack_bounds",
"text": "private theorem neg_third_floor_slack_bounds (s : Nat) :\n let secondNat := (s * s) / (2 * WAD_NAT)\n let thirdNat := (secondNat * s) / (3 * WAD_NAT)\n 0 ≤ (secondNat : ℝ) * (s : ℝ) / (3 * (WAD_NAT : ℝ)) - (thirdNat : ℝ) ∧\n (secondNat : ℝ) * ... | [
{
"name": "neg_kernel_inner_floor_slack",
"fan_in": 1,
"n_deps_direct": 3,
"n_deps_transitive": 4,
"n_lines": 13,
"n_chars": 572,
"n_subproofs": 3,
"n_tactics": 8,
"cyclomatic": 3,
"n_automation": 1,
"n_rewrites": 1,
"n_structural": 2,
"automation_only": false,
... | 4 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -69,6 +69,22 @@
norm_num [WAD_NAT, secondNat, pow_two, mul_assoc, mul_comm, mul_left_comm] at h1 ⊢
exact h1
+private theorem neg_third_floor_slack_bounds (s : Nat) :
+ let secondNat := (s * s) / (2 * WAD_NAT)
+ let thirdNat := (secondNat * s) / (3 * WAD_NAT)
+ 0 ≤ (secondNat : ℝ) * (s : ℝ) / (3 ... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_31 | 24edc6bab5ff4902 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 31 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 1 | [
{
"theorem_name": "neg_kernel_inner_floor_slack",
"depth": 1,
"n_commands": 0,
"n_lines": 7,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro secondNat thirdNat\n have hA := neg_second_floor_slack_bounds s\n have hB := neg_third_floor_slack_bou... | [
{
"name": "neg_third_exact_bridge_bounds",
"text": "private theorem neg_third_exact_bridge_bounds {s : Nat} (hs : s ≤ WEXP_RANGE_OFFSET) :\n let secondNat := (s * s) / (2 * WAD_NAT)\n 0 ≤ (s : ℝ)^3 / (6 * (WAD_NAT : ℝ)^2) -\n (secondNat : ℝ) * (s : ℝ) / (3 * (WAD_NAT : ℝ)) ∧\n (s : ℝ)^3 / ... | [
{
"name": "neg_kernel_floor_slack",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 5,
"n_lines": 21,
"n_chars": 1010,
"n_subproofs": 4,
"n_tactics": 13,
"cyclomatic": 1,
"n_automation": 4,
"n_rewrites": 1,
"n_structural": 2,
"automation_only": false,
"m... | 5 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -85,11 +85,48 @@
norm_num [WAD_NAT, thirdNat, mul_assoc, mul_comm, mul_left_comm] at h1 ⊢
exact h1
+private theorem neg_third_exact_bridge_bounds {s : Nat} (hs : s ≤ WEXP_RANGE_OFFSET) :
+ let secondNat := (s * s) / (2 * WAD_NAT)
+ 0 ≤ (s : ℝ)^3 / (6 * (WAD_NAT : ℝ)^2) -
+ (secondNat : ℝ) * ... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_32 | 9d8deba0888febbe | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 32 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 2 | [
{
"theorem_name": "neg_third_exact_bridge_bounds",
"depth": 1,
"n_commands": 0,
"n_lines": 25,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro secondNat\n have hWpos : (0 : ℝ) < (WAD_NAT : ℝ) := by norm_num [WAD_NAT]\n have hWne : (WAD_NAT : ℝ... | [
{
"name": "neg_second_floor_slack_bounds",
"text": "private theorem neg_second_floor_slack_bounds (s : Nat) :\n let secondNat := (s * s) / (2 * WAD_NAT)\n 0 ≤ (s : ℝ)^2 / (2 * (WAD_NAT : ℝ)) - (secondNat : ℝ) ∧\n (s : ℝ)^2 / (2 * (WAD_NAT : ℝ)) - (secondNat : ℝ) < 1 := by\n intro secondNat\n ha... | [
{
"name": "wExpSignedCubicKernel_real_error_neg_nat",
"fan_in": 1,
"n_deps_direct": 3,
"n_deps_transitive": 14,
"n_lines": 44,
"n_chars": 2144,
"n_subproofs": 13,
"n_tactics": 38,
"cyclomatic": 1,
"n_automation": 9,
"n_rewrites": 6,
"n_structural": 3,
"automation_... | 14 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -153,6 +153,21 @@
simpa using htmp
constructor <;> linarith
+private theorem neg_second_floor_slack_bounds (s : Nat) :
+ let secondNat := (s * s) / (2 * WAD_NAT)
+ 0 ≤ (s : ℝ)^2 / (2 * (WAD_NAT : ℝ)) - (secondNat : ℝ) ∧
+ (s : ℝ)^2 / (2 * (WAD_NAT : ℝ)) - (secondNat : ℝ) < 1 := by
+ intro secon... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_33 | 01b888bd6512fee3 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 33 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 2 | [
{
"theorem_name": "neg_third_exact_bridge_bounds",
"depth": 1,
"n_commands": 0,
"n_lines": 25,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro secondNat\n have hWpos : (0 : ℝ) < (WAD_NAT : ℝ) := by norm_num [WAD_NAT]\n have hWne : (WAD_NAT : ℝ... | [
{
"name": "neg_second_floor_slack_bounds",
"text": "private theorem neg_second_floor_slack_bounds (s : Nat) :\n let secondNat := (s * s) / (2 * WAD_NAT)\n 0 ≤ (s : ℝ)^2 / (2 * (WAD_NAT : ℝ)) - (secondNat : ℝ) ∧\n (s : ℝ)^2 / (2 * (WAD_NAT : ℝ)) - (secondNat : ℝ) < 1 := by\n intro secondNat\n ha... | [
{
"name": "wExpSignedCubicKernel_real_error_neg",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 15,
"n_lines": 13,
"n_chars": 548,
"n_subproofs": 3,
"n_tactics": 8,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 1,
"n_structural": 2,
"automation_only": ... | 15 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -153,6 +153,21 @@
simpa using htmp
constructor <;> linarith
+private theorem neg_second_floor_slack_bounds (s : Nat) :
+ let secondNat := (s * s) / (2 * WAD_NAT)
+ 0 ≤ (s : ℝ)^2 / (2 * (WAD_NAT : ℝ)) - (secondNat : ℝ) ∧
+ (s : ℝ)^2 / (2 * (WAD_NAT : ℝ)) - (secondNat : ℝ) < 1 := by
+ intro secon... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_34 | 21052661bbb68f70 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 34 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 2 | [
{
"theorem_name": "neg_second_floor_slack_bounds",
"depth": 1,
"n_commands": 0,
"n_lines": 11,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro secondNat\n have h2W : 0 < 2 * WAD_NAT := by decide\n have h := nat_div_floor_real_bounds (s * s) (2... | [
{
"name": "nat_div_floor_real_bounds",
"text": "private theorem nat_div_floor_real_bounds (n d : Nat) (hd : 0 < d) :\n 0 ≤ (n:ℝ)/(d:ℝ) - ((n/d:Nat):ℝ) ∧\n (n:ℝ)/(d:ℝ) - ((n/d:Nat):ℝ) < 1 := by\n have hdR : (0 : ℝ) < d := by exact_mod_cast hd\n have hloNat : (n / d) * d ≤ n := Nat.div_mul_le_self n... | [
{
"name": "wExpSignedCubicKernel_real_error",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 24,
"n_lines": 19,
"n_chars": 1132,
"n_subproofs": 3,
"n_tactics": 12,
"cyclomatic": 2,
"n_automation": 2,
"n_rewrites": 0,
"n_structural": 5,
"automation_only": fa... | 24 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -366,16 +366,55 @@
norm_num [Nat.factorial] at h
exact h
+private theorem nat_div_floor_real_bounds (n d : Nat) (hd : 0 < d) :
+ 0 ≤ (n:ℝ)/(d:ℝ) - ((n/d:Nat):ℝ) ∧
+ (n:ℝ)/(d:ℝ) - ((n/d:Nat):ℝ) < 1 := by
+ have hdR : (0 : ℝ) < d := by exact_mod_cast hd
+ have hloNat : (n / d) * d ≤ n := Nat.div_mul_... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_35 | 884c3c490cf2cd56 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 35 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 2 | [
{
"theorem_name": "wExpRangeR_lower_bound",
"depth": 1,
"n_commands": 0,
"n_lines": 5,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rw [wExpRangeR_eq_mod_sub_offset]\n have hnonneg : (0 : Int) ≤ Int.ofNat ((xAbs + WEXP_RANGE_OFFSET) % WEXP_LN2) :=... | [
{
"name": "wExpRangeR_eq_mod_sub_offset",
"text": "/-- `wExpRangeR` is the Euclidean remainder of the offset input, shifted back\nby the range-reduction offset. -/\ntheorem wExpRangeR_eq_mod_sub_offset (xAbs : Nat) :\n wExpRangeR xAbs =\n Int.ofNat ((xAbs + WEXP_RANGE_OFFSET) % WEXP_LN2) -\n ... | [
{
"name": "wExpRangeR_lower_bound",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 9,
"n_chars": 329,
"n_subproofs": 1,
"n_tactics": 5,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 1,
"n_structural": 1,
"automation_only": false,
"max_... | 1 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -35,9 +35,36 @@
/-! ## BN254 Field Helpers -/
+/-- `wExpRangeR` is the Euclidean remainder of the offset input, shifted back
+by the range-reduction offset. -/
+theorem wExpRangeR_eq_mod_sub_offset (xAbs : Nat) :
+ wExpRangeR xAbs =
+ Int.ofNat ((xAbs + WEXP_RANGE_OFFSET) % WEXP_LN2) -
+ Int.ofNa... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_36 | fbf98dee534f9a1a | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 36 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 2 | [
{
"theorem_name": "wExpRangeR_lower_bound",
"depth": 1,
"n_commands": 0,
"n_lines": 5,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rw [wExpRangeR_eq_mod_sub_offset]\n have hnonneg : (0 : Int) ≤ Int.ofNat ((xAbs + WEXP_RANGE_OFFSET) % WEXP_LN2) :=... | [
{
"name": "wExpRangeR_eq_mod_sub_offset",
"text": "/-- `wExpRangeR` is the Euclidean remainder of the offset input, shifted back\nby the range-reduction offset. -/\ntheorem wExpRangeR_eq_mod_sub_offset (xAbs : Nat) :\n wExpRangeR xAbs =\n Int.ofNat ((xAbs + WEXP_RANGE_OFFSET) % WEXP_LN2) -\n ... | [
{
"name": "wExpRangeR_upper_bound",
"fan_in": 1,
"n_deps_direct": 3,
"n_deps_transitive": 3,
"n_lines": 18,
"n_chars": 761,
"n_subproofs": 3,
"n_tactics": 14,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 3,
"n_structural": 1,
"automation_only": false,
"ma... | 3 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -41,9 +41,45 @@
private theorem WEXP_RANGE_OFFSET_lt_LN2 : WEXP_RANGE_OFFSET < WEXP_LN2 := by
decide
+/-- `wExpRangeR` is the Euclidean remainder of the offset input, shifted back
+by the range-reduction offset. -/
+theorem wExpRangeR_eq_mod_sub_offset (xAbs : Nat) :
+ wExpRangeR xAbs =
+ Int.ofNat ((x... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_37 | 186616318261ed77 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 37 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 1 | [
{
"theorem_name": "wExpRangeR_bounds",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": "\n ⟨wExpRangeR_lower_bound xAbs, wExpRangeR_upper_bound xAbs⟩",
"n_chars": 65,
"n_subproofs": 0,
"n_tactics": 1,
... | [
{
"name": "wExpRangeR_lower_bound",
"text": "/-- Lower bound for the TickLib range-reduction residual. -/\ntheorem wExpRangeR_lower_bound (xAbs : Nat) :\n -Int.ofNat WEXP_RANGE_OFFSET ≤ wExpRangeR xAbs := by\n rw [wExpRangeR_eq_mod_sub_offset]\n have hnonneg : (0 : Int) ≤ Int.ofNat ((xAbs + WEXP_RANGE_... | [
{
"name": "wExpRangeR_bounds",
"fan_in": 3,
"n_deps_direct": 2,
"n_deps_transitive": 5,
"n_lines": 7,
"n_chars": 296,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": false,
"max_nesti... | 5 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -64,6 +64,14 @@
((WEXP_RANGE_OFFSET : Nat) : Int)
omega
+/-- Lower bound for the TickLib range-reduction residual. -/
+theorem wExpRangeR_lower_bound (xAbs : Nat) :
+ -Int.ofNat WEXP_RANGE_OFFSET ≤ wExpRangeR xAbs := by
+ rw [wExpRangeR_eq_mod_sub_offset]
+ have hnonneg : (0 : Int) ≤ Int.ofNat ((xAb... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_38 | b61a360760b3f5a7 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 38 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 2 | [
{
"theorem_name": "WEXP_RANGE_OFFSET_le_three_WAD",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n exact Nat.le_trans WEXP_RANGE_OFFSET_le_WAD (Nat.le_mul_of_pos_left WAD_NAT (by decide))",
"n_chars": 94... | [
{
"name": "WEXP_RANGE_OFFSET_le_WAD",
"text": "private theorem WEXP_RANGE_OFFSET_le_WAD : WEXP_RANGE_OFFSET ≤ WAD_NAT := by\n norm_num [WEXP_RANGE_OFFSET, WAD_NAT]\n\n",
"fan_in": 2,
"n_lines": 4,
"n_chars": 120,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation":... | [
{
"name": "WEXP_RANGE_OFFSET_le_three_WAD",
"fan_in": 2,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 4,
"n_chars": 181,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": false,
... | 1 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -35,8 +35,12 @@
/-! ## BN254 Field Helpers -/
-private theorem WEXP_RANGE_OFFSET_le_three_WAD : WEXP_RANGE_OFFSET ≤ 3 * WAD_NAT := sorry
+private theorem WEXP_RANGE_OFFSET_le_WAD : WEXP_RANGE_OFFSET ≤ WAD_NAT := by
+ norm_num [WEXP_RANGE_OFFSET, WAD_NAT]
+private theorem WEXP_RANGE_OFFSET_le_three_WAD : WEXP... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_39 | f3cb064617c491aa | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 39 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 3 | [
{
"theorem_name": "wExpSignedCubicKernel_real_error_neg_nat",
"depth": 1,
"n_commands": 0,
"n_lines": 38,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n let secondNat := (s * s) / (2 * WAD_NAT)\n let thirdNat := (secondNat * s) / (3 * WAD_NAT)\n le... | [
{
"name": "wExpSignedCubicKernel_neg_eq",
"text": "/-- On a negative residual, signed truncating division evaluates the TickLib\ncubic kernel as the expected alternating floor expression. -/\ntheorem wExpSignedCubicKernel_neg_eq (s : Nat) :\n wExpSignedCubicKernel (-(s:Int))\n = (WAD_NAT:Int) - s + ... | [
{
"name": "wExpSignedCubicKernel_neg_nonneg_of_le_offset",
"fan_in": 1,
"n_deps_direct": 3,
"n_deps_transitive": 9,
"n_lines": 30,
"n_chars": 1365,
"n_subproofs": 8,
"n_tactics": 26,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 2,
"n_structural": 4,
"automati... | 9 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -105,6 +105,23 @@
simpa [Int.natCast_mul] using
sdivTrunc_neg_ofNat_mul_WAD (secondNat * s) 3 (by norm_num)
+/-- On a negative residual, signed truncating division evaluates the TickLib
+cubic kernel as the expected alternating floor expression. -/
+theorem wExpSignedCubicKernel_neg_eq (s : Nat) :
+ wEx... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_40 | 6443438230e2b117 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 40 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 3 | [
{
"theorem_name": "wExpSignedCubicKernel_real_error_neg_nat",
"depth": 1,
"n_commands": 0,
"n_lines": 38,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n let secondNat := (s * s) / (2 * WAD_NAT)\n let thirdNat := (secondNat * s) / (3 * WAD_NAT)\n le... | [
{
"name": "wExpSignedCubicKernel_neg_eq",
"text": "/-- On a negative residual, signed truncating division evaluates the TickLib\ncubic kernel as the expected alternating floor expression. -/\ntheorem wExpSignedCubicKernel_neg_eq (s : Nat) :\n wExpSignedCubicKernel (-(s:Int))\n = (WAD_NAT:Int) - s + ... | [
{
"name": "wExpSignedCubicKernel_nonneg_of_range",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 12,
"n_lines": 17,
"n_chars": 736,
"n_subproofs": 3,
"n_tactics": 11,
"cyclomatic": 2,
"n_automation": 2,
"n_rewrites": 2,
"n_structural": 4,
"automation_only"... | 12 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -144,6 +144,23 @@
simpa [Int.natCast_mul] using
sdivTrunc_neg_ofNat_mul_WAD (secondNat * s) 3 (by norm_num)
+/-- On a negative residual, signed truncating division evaluates the TickLib
+cubic kernel as the expected alternating floor expression. -/
+theorem wExpSignedCubicKernel_neg_eq (s : Nat) :
+ wEx... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_41 | ecaeb66e0afc998e | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 41 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 2 | [
{
"theorem_name": "WEXP_RANGE_OFFSET_le_three_WAD",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n exact Nat.le_trans WEXP_RANGE_OFFSET_le_WAD (Nat.le_mul_of_pos_left WAD_NAT (by decide))",
"n_chars": 94... | [
{
"name": "WEXP_RANGE_OFFSET_le_WAD",
"text": "private theorem WEXP_RANGE_OFFSET_le_WAD : WEXP_RANGE_OFFSET ≤ WAD_NAT := by\n norm_num [WEXP_RANGE_OFFSET, WAD_NAT]\n\n",
"fan_in": 2,
"n_lines": 4,
"n_chars": 120,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation":... | [
{
"name": "wExpSignedCubicKernel_neg_pos_of_le_offset",
"fan_in": 1,
"n_deps_direct": 3,
"n_deps_transitive": 10,
"n_lines": 30,
"n_chars": 1369,
"n_subproofs": 8,
"n_tactics": 26,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 2,
"n_structural": 4,
"automation... | 10 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -122,10 +122,14 @@
rw [sdivTrunc_neg_third_of_nat secondNat s]
simp [sub_eq_add_neg, add_assoc, add_comm]
+private theorem WEXP_RANGE_OFFSET_le_WAD : WEXP_RANGE_OFFSET ≤ WAD_NAT := by
+ norm_num [WEXP_RANGE_OFFSET, WAD_NAT]
+
private theorem WEXP_RANGE_OFFSET_lt_WAD : WEXP_RANGE_OFFSET < WAD_NAT := by
n... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_42 | 3b95633ef43e6ef4 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 42 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 2 | [
{
"theorem_name": "WEXP_RANGE_OFFSET_le_three_WAD",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n exact Nat.le_trans WEXP_RANGE_OFFSET_le_WAD (Nat.le_mul_of_pos_left WAD_NAT (by decide))",
"n_chars": 94... | [
{
"name": "WEXP_RANGE_OFFSET_le_WAD",
"text": "private theorem WEXP_RANGE_OFFSET_le_WAD : WEXP_RANGE_OFFSET ≤ WAD_NAT := by\n norm_num [WEXP_RANGE_OFFSET, WAD_NAT]\n\n",
"fan_in": 2,
"n_lines": 4,
"n_chars": 120,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation":... | [
{
"name": "wExpSignedCubicKernel_pos_of_range",
"fan_in": 1,
"n_deps_direct": 3,
"n_deps_transitive": 13,
"n_lines": 25,
"n_chars": 1195,
"n_subproofs": 6,
"n_tactics": 19,
"cyclomatic": 2,
"n_automation": 2,
"n_rewrites": 3,
"n_structural": 3,
"automation_only": ... | 13 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -161,10 +161,14 @@
rw [sdivTrunc_neg_third_of_nat secondNat s]
simp [sub_eq_add_neg, add_assoc, add_comm]
+private theorem WEXP_RANGE_OFFSET_le_WAD : WEXP_RANGE_OFFSET ≤ WAD_NAT := by
+ norm_num [WEXP_RANGE_OFFSET, WAD_NAT]
+
private theorem WEXP_RANGE_OFFSET_lt_WAD : WEXP_RANGE_OFFSET < WAD_NAT := by
n... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_43 | cba23770f898b26e | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 43 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 3 | [
{
"theorem_name": "tickWExpReference_neg_scaled_pos",
"depth": 1,
"n_commands": 0,
"n_lines": 24,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n let xAbs := wExpAbsInput x\n let q := wExpRangeQ xAbs\n let r := wExpRangeR xAbs\n have hrange := wExp... | [
{
"name": "wExpRangeR_bounds",
"text": "/-- Tight interval for the TickLib range-reduction residual. -/\ntheorem wExpRangeR_bounds (xAbs : Nat) :\n -Int.ofNat WEXP_RANGE_OFFSET ≤ wExpRangeR xAbs ∧\n wExpRangeR xAbs < Int.ofNat (WEXP_LN2 - WEXP_RANGE_OFFSET) :=\n ⟨wExpRangeR_lower_bound xAbs, wExpRa... | [
{
"name": "tickWExpReference_neg_scaled_pos",
"fan_in": 2,
"n_deps_direct": 2,
"n_deps_transitive": 20,
"n_lines": 31,
"n_chars": 1431,
"n_subproofs": 10,
"n_tactics": 24,
"cyclomatic": 1,
"n_automation": 6,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": f... | 20 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -215,6 +215,12 @@
rw [Int.natCast_sub hoff_le]
omega
+/-- Tight interval for the TickLib range-reduction residual. -/
+theorem wExpRangeR_bounds (xAbs : Nat) :
+ -Int.ofNat WEXP_RANGE_OFFSET ≤ wExpRangeR xAbs ∧
+ wExpRangeR xAbs < Int.ofNat (WEXP_LN2 - WEXP_RANGE_OFFSET) :=
+ ⟨wExpRangeR_lower_bound... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_44 | d1d62b2fea5315b9 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 44 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 3 | [
{
"theorem_name": "tickWExpReference_neg_scaled_pos",
"depth": 1,
"n_commands": 0,
"n_lines": 24,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n let xAbs := wExpAbsInput x\n let q := wExpRangeQ xAbs\n let r := wExpRangeR xAbs\n have hrange := wExp... | [
{
"name": "wExpRangeR_bounds",
"text": "/-- Tight interval for the TickLib range-reduction residual. -/\ntheorem wExpRangeR_bounds (xAbs : Nat) :\n -Int.ofNat WEXP_RANGE_OFFSET ≤ wExpRangeR xAbs ∧\n wExpRangeR xAbs < Int.ofNat (WEXP_LN2 - WEXP_RANGE_OFFSET) :=\n ⟨wExpRangeR_lower_bound xAbs, wExpRa... | [
{
"name": "tickWExpReference_real_nonneg_eq_kernel_mul_two_pow",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 19,
"n_lines": 30,
"n_chars": 1373,
"n_subproofs": 7,
"n_tactics": 25,
"cyclomatic": 1,
"n_automation": 4,
"n_rewrites": 3,
"n_structural": 1,
"a... | 19 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -215,6 +215,12 @@
rw [Int.natCast_sub hoff_le]
omega
+/-- Tight interval for the TickLib range-reduction residual. -/
+theorem wExpRangeR_bounds (xAbs : Nat) :
+ -Int.ofNat WEXP_RANGE_OFFSET ≤ wExpRangeR xAbs ∧
+ wExpRangeR xAbs < Int.ofNat (WEXP_LN2 - WEXP_RANGE_OFFSET) :=
+ ⟨wExpRangeR_lower_bound... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_45 | db1acfd8e64ae68e | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 45 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 2 | [
{
"theorem_name": "wExpRangeR_lower_bound",
"depth": 1,
"n_commands": 0,
"n_lines": 5,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rw [wExpRangeR_eq_mod_sub_offset]\n have hnonneg : (0 : Int) ≤ Int.ofNat ((xAbs + WEXP_RANGE_OFFSET) % WEXP_LN2) :=... | [
{
"name": "wExpRangeR_eq_mod_sub_offset",
"text": "/-- `wExpRangeR` is the Euclidean remainder of the offset input, shifted back\nby the range-reduction offset. -/\ntheorem wExpRangeR_eq_mod_sub_offset (xAbs : Nat) :\n wExpRangeR xAbs =\n Int.ofNat ((xAbs + WEXP_RANGE_OFFSET) % WEXP_LN2) -\n ... | [
{
"name": "tickWExpReference_real_error_nonneg",
"fan_in": 1,
"n_deps_direct": 6,
"n_deps_transitive": 44,
"n_lines": 52,
"n_chars": 2591,
"n_subproofs": 11,
"n_tactics": 39,
"cyclomatic": 1,
"n_automation": 8,
"n_rewrites": 1,
"n_structural": 3,
"automation_only"... | 44 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -739,13 +739,53 @@
private theorem WEXP_RANGE_OFFSET_lt_LN2 : WEXP_RANGE_OFFSET < WEXP_LN2 := by
decide
+/-- `wExpRangeR` is the Euclidean remainder of the offset input, shifted back
+by the range-reduction offset. -/
+theorem wExpRangeR_eq_mod_sub_offset (xAbs : Nat) :
+ wExpRangeR xAbs =
+ Int.ofNat ... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_46 | 25e97d4a63cb2424 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 46 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 3 | [
{
"theorem_name": "tickWExpReference_neg_scaled_pos",
"depth": 1,
"n_commands": 0,
"n_lines": 24,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n let xAbs := wExpAbsInput x\n let q := wExpRangeQ xAbs\n let r := wExpRangeR xAbs\n have hrange := wExp... | [
{
"name": "wExpRangeR_bounds",
"text": "/-- Tight interval for the TickLib range-reduction residual. -/\ntheorem wExpRangeR_bounds (xAbs : Nat) :\n -Int.ofNat WEXP_RANGE_OFFSET ≤ wExpRangeR xAbs ∧\n wExpRangeR xAbs < Int.ofNat (WEXP_LN2 - WEXP_RANGE_OFFSET) :=\n ⟨wExpRangeR_lower_bound xAbs, wExpRa... | [
{
"name": "WEXP_ONE_E36_real_div_scaled_div_WAD_eq_inv",
"fan_in": 1,
"n_deps_direct": 4,
"n_deps_transitive": 48,
"n_lines": 28,
"n_chars": 1468,
"n_subproofs": 5,
"n_tactics": 22,
"cyclomatic": 1,
"n_automation": 4,
"n_rewrites": 1,
"n_structural": 0,
"automatio... | 48 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -787,6 +787,12 @@
rw [Int.natCast_sub hoff_le]
omega
+/-- Tight interval for the TickLib range-reduction residual. -/
+theorem wExpRangeR_bounds (xAbs : Nat) :
+ -Int.ofNat WEXP_RANGE_OFFSET ≤ wExpRangeR xAbs ∧
+ wExpRangeR xAbs < Int.ofNat (WEXP_LN2 - WEXP_RANGE_OFFSET) :=
+ ⟨wExpRangeR_lower_bound... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_47 | c5a95733d670fb33 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 47 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 1 | [
{
"theorem_name": "wExpSignedCubicKernel_neg_pos_of_le_offset",
"depth": 1,
"n_commands": 0,
"n_lines": 26,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hs_lt_WAD : s < WAD_NAT :=\n Nat.lt_of_le_of_lt hs_le WEXP_RANGE_OFFSET_lt_WAD\n have ... | [
{
"name": "WEXP_RANGE_OFFSET_lt_WAD",
"text": "private theorem WEXP_RANGE_OFFSET_lt_WAD : WEXP_RANGE_OFFSET < WAD_NAT := by\n norm_num [WEXP_RANGE_OFFSET, WAD_NAT]\n\n",
"fan_in": 1,
"n_lines": 4,
"n_chars": 118,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation":... | [
{
"name": "tickWExpReference_neg_floor_error",
"fan_in": 1,
"n_deps_direct": 3,
"n_deps_transitive": 54,
"n_lines": 19,
"n_chars": 902,
"n_subproofs": 4,
"n_tactics": 13,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 2,
"n_structural": 0,
"automation_only": fa... | 54 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -796,6 +796,9 @@
private theorem WEXP_RANGE_OFFSET_le_WAD : WEXP_RANGE_OFFSET ≤ WAD_NAT := by
norm_num [WEXP_RANGE_OFFSET, WAD_NAT]
+private theorem WEXP_RANGE_OFFSET_lt_WAD : WEXP_RANGE_OFFSET < WAD_NAT := by
+ norm_num [WEXP_RANGE_OFFSET, WAD_NAT]
+
private theorem WEXP_RANGE_OFFSET_le_three_WAD : WEXP_RAN... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_49 | 25793b2094455190 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 49 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 2 | [
{
"theorem_name": "wExpSignedCubicKernel_neg_nonneg_of_le_offset",
"depth": 1,
"n_commands": 0,
"n_lines": 26,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hs_le_WAD : s ≤ WAD_NAT :=\n Nat.le_trans hs_le WEXP_RANGE_OFFSET_le_WAD\n have hs_... | [
{
"name": "WEXP_RANGE_OFFSET_le_three_WAD",
"text": "private theorem WEXP_RANGE_OFFSET_le_three_WAD : WEXP_RANGE_OFFSET ≤ 3 * WAD_NAT := by\n exact Nat.le_trans WEXP_RANGE_OFFSET_le_WAD (Nat.le_mul_of_pos_left WAD_NAT (by decide))\n\n",
"fan_in": 2,
"n_lines": 4,
"n_chars": 181,
"n_subproof... | [
{
"name": "tickWExpReference_real_error_neg",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 57,
"n_lines": 46,
"n_chars": 2658,
"n_subproofs": 2,
"n_tactics": 26,
"cyclomatic": 1,
"n_automation": 3,
"n_rewrites": 0,
"n_structural": 2,
"automation_only": fa... | 57 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -799,6 +799,9 @@
private theorem WEXP_RANGE_OFFSET_lt_WAD : WEXP_RANGE_OFFSET < WAD_NAT := by
norm_num [WEXP_RANGE_OFFSET, WAD_NAT]
+private theorem WEXP_RANGE_OFFSET_le_three_WAD : WEXP_RANGE_OFFSET ≤ 3 * WAD_NAT := by
+ exact Nat.le_trans WEXP_RANGE_OFFSET_le_WAD (Nat.le_mul_of_pos_left WAD_NAT (by decide))... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_50 | f9d6241303a78cf5 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 50 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 2 | [
{
"theorem_name": "nat_ceil_div_antitone_divisor",
"depth": 1,
"n_commands": 0,
"n_lines": 26,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hC₂Pos : 0 < c₂ := Nat.pos_of_ne_zero hC₂\n have hUpper :\n ((n + (c₂ - 1)) / c₂) * c₂ < n + c₂ :... | [
{
"name": "ceil_mul_div_le_add_pred",
"text": "private theorem ceil_mul_div_le_add_pred (n d : Nat) :\n ((n + (d - 1)) / d) * d ≤ n + (d - 1) := by\n simpa [Nat.mul_comm] using Nat.mul_div_le (n + (d - 1)) d\n\n",
"fan_in": 2,
"n_lines": 5,
"n_chars": 166,
"n_subproofs": 0,
"n_tactic... | [
{
"name": "nat_ceil_div_antitone_divisor",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 32,
"n_chars": 1258,
"n_subproofs": 5,
"n_tactics": 26,
"cyclomatic": 1,
"n_automation": 3,
"n_rewrites": 0,
"n_structural": 4,
"automation_only": false,... | 2 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -45,6 +45,10 @@
have h : n ≤ d * ((n + (d - 1)) / d) := Nat.le_of_add_le_add_right hle
simpa [Nat.mul_comm] using h
+private theorem ceil_mul_div_le_add_pred (n d : Nat) :
+ ((n + (d - 1)) / d) * d ≤ n + (d - 1) := by
+ simpa [Nat.mul_comm] using Nat.mul_div_le (n + (d - 1)) d
+
private theorem nat_ceil... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_51 | e65adf4478f2e73d | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 51 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 8 | [
{
"theorem_name": "mulDiv512Down?_mul_le",
"depth": 1,
"n_commands": 0,
"n_lines": 5,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rcases (mulDiv512Down?_eq_some_iff a b c out).mp h with ⟨_hC, hFit, hOut⟩\n rw [← hOut]\n simp [Nat.mod_eq_of_lt (l... | [
{
"name": "mulDiv512Down?_eq_some_iff",
"text": "/-- The quotient returned by `mulDiv512Down?` is the full-precision natural quotient. -/\ntheorem mulDiv512Down?_eq_some_iff (a b c out : Uint256) :\n mulDiv512Down? a b c = some out ↔\n (c : Nat) ≠ 0 ∧\n ((a : Nat) * (b : Nat)) / (c : Nat) ≤ MAX... | [
{
"name": "mulDiv512Down?_mul_le",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 3,
"n_lines": 10,
"n_chars": 445,
"n_subproofs": 0,
"n_tactics": 5,
"cyclomatic": 2,
"n_automation": 1,
"n_rewrites": 1,
"n_structural": 2,
"automation_only": false,
"max_... | 3 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -48,10 +48,29 @@
set_option maxRecDepth 100000
+/-- The quotient returned by `mulDiv512Down?` is the full-precision natural quotient. -/
+theorem mulDiv512Down?_eq_some_iff (a b c out : Uint256) :
+ mulDiv512Down? a b c = some out ↔
+ (c : Nat) ≠ 0 ∧
+ ((a : Nat) * (b : Nat)) / (c : Nat) ≤ MAX_UINT... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_52 | 522d03316a3cfb22 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 52 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 8 | [
{
"theorem_name": "mulDiv512Down?_mul_le",
"depth": 1,
"n_commands": 0,
"n_lines": 5,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rcases (mulDiv512Down?_eq_some_iff a b c out).mp h with ⟨_hC, hFit, hOut⟩\n rw [← hOut]\n simp [Nat.mod_eq_of_lt (l... | [
{
"name": "mulDiv512Down?_eq_some_iff",
"text": "/-- The quotient returned by `mulDiv512Down?` is the full-precision natural quotient. -/\ntheorem mulDiv512Down?_eq_some_iff (a b c out : Uint256) :\n mulDiv512Down? a b c = some out ↔\n (c : Nat) ≠ 0 ∧\n ((a : Nat) * (b : Nat)) / (c : Nat) ≤ MAX... | [
{
"name": "mulDiv512Down?_lt_succ_mul",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 3,
"n_lines": 12,
"n_chars": 514,
"n_subproofs": 0,
"n_tactics": 6,
"cyclomatic": 2,
"n_automation": 2,
"n_rewrites": 1,
"n_structural": 1,
"automation_only": false,
... | 3 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -48,11 +48,31 @@
set_option maxRecDepth 100000
+/-- The quotient returned by `mulDiv512Down?` is the full-precision natural quotient. -/
+theorem mulDiv512Down?_eq_some_iff (a b c out : Uint256) :
+ mulDiv512Down? a b c = some out ↔
+ (c : Nat) ≠ 0 ∧
+ ((a : Nat) * (b : Nat)) / (c : Nat) ≤ MAX_UINT... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_53 | 0c6f9572ccf6be14 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 53 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 8 | [
{
"theorem_name": "mulDiv512Down?_mul_le",
"depth": 1,
"n_commands": 0,
"n_lines": 5,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rcases (mulDiv512Down?_eq_some_iff a b c out).mp h with ⟨_hC, hFit, hOut⟩\n rw [← hOut]\n simp [Nat.mod_eq_of_lt (l... | [
{
"name": "mulDiv512Down?_eq_some_iff",
"text": "/-- The quotient returned by `mulDiv512Down?` is the full-precision natural quotient. -/\ntheorem mulDiv512Down?_eq_some_iff (a b c out : Uint256) :\n mulDiv512Down? a b c = some out ↔\n (c : Nat) ≠ 0 ∧\n ((a : Nat) * (b : Nat)) / (c : Nat) ≤ MAX... | [
{
"name": "mulDiv512Down?_mul_lt_add",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 4,
"n_lines": 8,
"n_chars": 354,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,
"ma... | 4 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -48,11 +48,31 @@
set_option maxRecDepth 100000
+/-- The quotient returned by `mulDiv512Down?` is the full-precision natural quotient. -/
+theorem mulDiv512Down?_eq_some_iff (a b c out : Uint256) :
+ mulDiv512Down? a b c = some out ↔
+ (c : Nat) ≠ 0 ∧
+ ((a : Nat) * (b : Nat)) / (c : Nat) ≤ MAX_UINT... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_54 | eb415ee686006e86 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 54 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 1 | [
{
"theorem_name": "mulDiv512Down?_zero_right",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simpa [mulDiv512Down?_comm] using mulDiv512Down?_zero_left a c hC",
"n_chars": 71,
"n_subproofs": 0,
... | [
{
"name": "mulDiv512Down?_zero_left",
"text": "/-- A zero left numerator collapses full-precision floor multiplication to zero. -/\ntheorem mulDiv512Down?_zero_left (b c : Uint256)\n (hC : (c : Nat) ≠ 0) :\n mulDiv512Down? 0 b c = some 0 := by\n simp [Verity.Stdlib.Math.mulDiv512Down?, hC]\n\n",
... | [
{
"name": "mulDiv512Down?_zero_right",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 7,
"n_chars": 273,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,
"ma... | 2 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -42,10 +42,17 @@
mulDiv512Down? a b c = mulDiv512Down? b a c := by
simp [Verity.Stdlib.Math.mulDiv512Down?, Nat.mul_comm]
+/-- A zero left numerator collapses full-precision floor multiplication to zero. -/
+theorem mulDiv512Down?_zero_left (b c : Uint256)
+ (hC : (c : Nat) ≠ 0) :
+ mulDiv512Down? 0 ... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_55 | aa36440a380474ad | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 55 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 8 | [
{
"theorem_name": "mulDiv512Down?_mul_le",
"depth": 1,
"n_commands": 0,
"n_lines": 5,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rcases (mulDiv512Down?_eq_some_iff a b c out).mp h with ⟨_hC, hFit, hOut⟩\n rw [← hOut]\n simp [Nat.mod_eq_of_lt (l... | [
{
"name": "mulDiv512Down?_eq_some_iff",
"text": "/-- The quotient returned by `mulDiv512Down?` is the full-precision natural quotient. -/\ntheorem mulDiv512Down?_eq_some_iff (a b c out : Uint256) :\n mulDiv512Down? a b c = some out ↔\n (c : Nat) ≠ 0 ∧\n ((a : Nat) * (b : Nat)) / (c : Nat) ≤ MAX... | [
{
"name": "mulDiv512Down?_pos",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 3,
"n_lines": 13,
"n_chars": 539,
"n_subproofs": 1,
"n_tactics": 6,
"cyclomatic": 2,
"n_automation": 2,
"n_rewrites": 1,
"n_structural": 1,
"automation_only": false,
"max_nes... | 3 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -48,12 +48,32 @@
set_option maxRecDepth 100000
+/-- The quotient returned by `mulDiv512Down?` is the full-precision natural quotient. -/
+theorem mulDiv512Down?_eq_some_iff (a b c out : Uint256) :
+ mulDiv512Down? a b c = some out ↔
+ (c : Nat) ≠ 0 ∧
+ ((a : Nat) * (b : Nat)) / (c : Nat) ≤ MAX_UINT... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_56 | 7f206cdfac825379 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 56 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 3 | [
{
"theorem_name": "mulDiv512Down?_cancel_right",
"depth": 1,
"n_commands": 0,
"n_lines": 11,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hCPos : 0 < (c : Nat) := Nat.pos_of_ne_zero hC\n have hQuot : (a : Nat) * (c : Nat) / (c : Nat) = (a : N... | [
{
"name": "mulDiv512Down?_some",
"text": "/-- `mulDiv512Down?` returns the exact full-precision floor quotient when it fits. -/\ntheorem mulDiv512Down?_some (a b c : Uint256)\n (hC : (c : Nat) ≠ 0)\n (hFit : ((a : Nat) * (b : Nat)) / (c : Nat) ≤ MAX_UINT256) :\n mulDiv512Down? a b c =\n some (... | [
{
"name": "mulDiv512Down?_cancel_right",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 16,
"n_chars": 644,
"n_subproofs": 3,
"n_tactics": 11,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 3,
"n_structural": 2,
"automation_only": false,
... | 1 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -37,10 +37,28 @@
set_option maxRecDepth 100000
+/-- `mulDiv512Down?` returns the exact full-precision floor quotient when it fits. -/
+theorem mulDiv512Down?_some (a b c : Uint256)
+ (hC : (c : Nat) ≠ 0)
+ (hFit : ((a : Nat) * (b : Nat)) / (c : Nat) ≤ MAX_UINT256) :
+ mulDiv512Down? a b c =
+ some... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_57 | 8ca1562874af9dc9 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 57 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 2 | [
{
"theorem_name": "mulDiv512Down?_zero_right",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simpa [mulDiv512Down?_comm] using mulDiv512Down?_zero_left a c hC",
"n_chars": 71,
"n_subproofs": 0,
... | [
{
"name": "mulDiv512Down?_comm",
"text": "/-- Full-precision floor multiplication is commutative in its numerator operands. -/\ntheorem mulDiv512Down?_comm (a b c : Uint256) :\n mulDiv512Down? a b c = mulDiv512Down? b a c := by\n simp [Verity.Stdlib.Math.mulDiv512Down?, Nat.mul_comm]\n\n",
"fan_in":... | [
{
"name": "mulDiv512Down?_cancel_left",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 3,
"n_lines": 8,
"n_chars": 275,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 1,
"n_structural": 1,
"automation_only": false,
"... | 3 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -45,6 +45,11 @@
some (Verity.Core.Uint256.ofNat (((a : Nat) * (b : Nat)) / (c : Nat))) := by
simp [Verity.Stdlib.Math.mulDiv512Down?, hC, Nat.not_lt.mpr hFit]
+/-- Full-precision floor multiplication is commutative in its numerator operands. -/
+theorem mulDiv512Down?_comm (a b c : Uint256) :
+ mulDiv... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_58 | 9be98cc1f3260322 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 58 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 8 | [
{
"theorem_name": "mulDiv512Down?_mul_le",
"depth": 1,
"n_commands": 0,
"n_lines": 5,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rcases (mulDiv512Down?_eq_some_iff a b c out).mp h with ⟨_hC, hFit, hOut⟩\n rw [← hOut]\n simp [Nat.mod_eq_of_lt (l... | [
{
"name": "mulDiv512Down?_eq_some_iff",
"text": "/-- The quotient returned by `mulDiv512Down?` is the full-precision natural quotient. -/\ntheorem mulDiv512Down?_eq_some_iff (a b c out : Uint256) :\n mulDiv512Down? a b c = some out ↔\n (c : Nat) ≠ 0 ∧\n ((a : Nat) * (b : Nat)) / (c : Nat) ≤ MAX... | [
{
"name": "mulDiv512Down?_monotone_left",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 3,
"n_lines": 15,
"n_chars": 771,
"n_subproofs": 0,
"n_tactics": 7,
"cyclomatic": 3,
"n_automation": 1,
"n_rewrites": 1,
"n_structural": 3,
"automation_only": false,
... | 3 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -48,13 +48,34 @@
set_option maxRecDepth 100000
+/-- The quotient returned by `mulDiv512Down?` is the full-precision natural quotient. -/
+theorem mulDiv512Down?_eq_some_iff (a b c out : Uint256) :
+ mulDiv512Down? a b c = some out ↔
+ (c : Nat) ≠ 0 ∧
+ ((a : Nat) * (b : Nat)) / (c : Nat) ≤ MAX_UINT... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_59 | c4a97e54d1d1f0aa | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 59 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 8 | [
{
"theorem_name": "mulDiv512Down?_mul_le",
"depth": 1,
"n_commands": 0,
"n_lines": 5,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rcases (mulDiv512Down?_eq_some_iff a b c out).mp h with ⟨_hC, hFit, hOut⟩\n rw [← hOut]\n simp [Nat.mod_eq_of_lt (l... | [
{
"name": "mulDiv512Down?_eq_some_iff",
"text": "/-- The quotient returned by `mulDiv512Down?` is the full-precision natural quotient. -/\ntheorem mulDiv512Down?_eq_some_iff (a b c out : Uint256) :\n mulDiv512Down? a b c = some out ↔\n (c : Nat) ≠ 0 ∧\n ((a : Nat) * (b : Nat)) / (c : Nat) ≤ MAX... | [
{
"name": "mulDiv512Down?_monotone_right",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 3,
"n_lines": 15,
"n_chars": 772,
"n_subproofs": 0,
"n_tactics": 7,
"cyclomatic": 3,
"n_automation": 1,
"n_rewrites": 1,
"n_structural": 3,
"automation_only": false,
... | 3 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -48,13 +48,34 @@
set_option maxRecDepth 100000
+/-- The quotient returned by `mulDiv512Down?` is the full-precision natural quotient. -/
+theorem mulDiv512Down?_eq_some_iff (a b c out : Uint256) :
+ mulDiv512Down? a b c = some out ↔
+ (c : Nat) ≠ 0 ∧
+ ((a : Nat) * (b : Nat)) / (c : Nat) ≤ MAX_UINT... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_60 | 7adfddaf53c7c4a2 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 60 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 8 | [
{
"theorem_name": "mulDiv512Down?_mul_le",
"depth": 1,
"n_commands": 0,
"n_lines": 5,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rcases (mulDiv512Down?_eq_some_iff a b c out).mp h with ⟨_hC, hFit, hOut⟩\n rw [← hOut]\n simp [Nat.mod_eq_of_lt (l... | [
{
"name": "mulDiv512Down?_eq_some_iff",
"text": "/-- The quotient returned by `mulDiv512Down?` is the full-precision natural quotient. -/\ntheorem mulDiv512Down?_eq_some_iff (a b c out : Uint256) :\n mulDiv512Down? a b c = some out ↔\n (c : Nat) ≠ 0 ∧\n ((a : Nat) * (b : Nat)) / (c : Nat) ≤ MAX... | [
{
"name": "mulDiv512Down?_antitone_divisor",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 3,
"n_lines": 15,
"n_chars": 763,
"n_subproofs": 0,
"n_tactics": 7,
"cyclomatic": 3,
"n_automation": 1,
"n_rewrites": 1,
"n_structural": 3,
"automation_only": false,... | 3 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -48,13 +48,34 @@
set_option maxRecDepth 100000
+/-- The quotient returned by `mulDiv512Down?` is the full-precision natural quotient. -/
+theorem mulDiv512Down?_eq_some_iff (a b c out : Uint256) :
+ mulDiv512Down? a b c = some out ↔
+ (c : Nat) ≠ 0 ∧
+ ((a : Nat) * (b : Nat)) / (c : Nat) ≤ MAX_UINT... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_61 | 6631bc3989badef4 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 61 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 19 | [
{
"theorem_name": "max_uint256_lt_modulus",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": "\n lt_modulus_of_le_max (Nat.le_refl MAX_UINT256)",
"n_chars": 49,
"n_subproofs": 0,
"n_tactics": 1,
"cycl... | [
{
"name": "lt_modulus_of_le_max",
"text": "private theorem lt_modulus_of_le_max {n : Nat} (h : n ≤ MAX_UINT256) :\n n < Verity.Core.Uint256.modulus := by\n calc\n n < MAX_UINT256 + 1 := Nat.lt_succ_of_le h\n _ = Verity.Core.Uint256.modulus := by simp [modulus_eq_max_succ]\n\n",
"fan_in": 19,
... | [
{
"name": "mulDiv512Down?_wide_product_regression",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 3,
"n_lines": 20,
"n_chars": 817,
"n_subproofs": 3,
"n_tactics": 11,
"cyclomatic": 1,
"n_automation": 3,
"n_rewrites": 0,
"n_structural": 0,
"automation_only"... | 3 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -40,8 +40,15 @@
symm
exact Verity.Core.Uint256.max_uint256_succ_eq_modulus
+private theorem lt_modulus_of_le_max {n : Nat} (h : n ≤ MAX_UINT256) :
+ n < Verity.Core.Uint256.modulus := by
+ calc
+ n < MAX_UINT256 + 1 := Nat.lt_succ_of_le h
+ _ = Verity.Core.Uint256.modulus := by simp [modulus_eq_max... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_62 | 1af74e11a466694a | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 62 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 19 | [
{
"theorem_name": "max_uint256_lt_modulus",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": "\n lt_modulus_of_le_max (Nat.le_refl MAX_UINT256)",
"n_chars": 49,
"n_subproofs": 0,
"n_tactics": 1,
"cycl... | [
{
"name": "lt_modulus_of_le_max",
"text": "private theorem lt_modulus_of_le_max {n : Nat} (h : n ≤ MAX_UINT256) :\n n < Verity.Core.Uint256.modulus := by\n calc\n n < MAX_UINT256 + 1 := Nat.lt_succ_of_le h\n _ = Verity.Core.Uint256.modulus := by simp [modulus_eq_max_succ]\n\n",
"fan_in": 19,
... | [
{
"name": "mulDiv512Down?_final_overflow_regression",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 3,
"n_lines": 25,
"n_chars": 1046,
"n_subproofs": 5,
"n_tactics": 16,
"cyclomatic": 1,
"n_automation": 5,
"n_rewrites": 0,
"n_structural": 0,
"automation_on... | 3 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -40,8 +40,15 @@
symm
exact Verity.Core.Uint256.max_uint256_succ_eq_modulus
+private theorem lt_modulus_of_le_max {n : Nat} (h : n ≤ MAX_UINT256) :
+ n < Verity.Core.Uint256.modulus := by
+ calc
+ n < MAX_UINT256 + 1 := Nat.lt_succ_of_le h
+ _ = Verity.Core.Uint256.modulus := by simp [modulus_eq_max... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_63 | 2b4cd4ef2456ce04 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 63 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 9 | [
{
"theorem_name": "mulDiv512Up?_mul_ge",
"depth": 1,
"n_commands": 0,
"n_lines": 5,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rcases (mulDiv512Up?_eq_some_iff a b c out).mp h with ⟨hC, hFit, hOut⟩\n rw [← hOut]\n simp [Nat.mod_eq_of_lt (lt_mod... | [
{
"name": "mulDiv512Up?_eq_some_iff",
"text": "/-- The quotient returned by `mulDiv512Up?` is the full-precision rounded-up quotient. -/\ntheorem mulDiv512Up?_eq_some_iff (a b c out : Uint256) :\n mulDiv512Up? a b c = some out ↔\n (c : Nat) ≠ 0 ∧\n (((a : Nat) * (b : Nat)) + ((c : Nat) - 1)) / ... | [
{
"name": "mulDiv512Up?_mul_ge",
"fan_in": 0,
"n_deps_direct": 3,
"n_deps_transitive": 4,
"n_lines": 10,
"n_chars": 457,
"n_subproofs": 0,
"n_tactics": 5,
"cyclomatic": 2,
"n_automation": 1,
"n_rewrites": 1,
"n_structural": 2,
"automation_only": false,
"max_ne... | 4 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -56,10 +56,33 @@
have h : n ≤ d * ((n + (d - 1)) / d) := Nat.le_of_add_le_add_right hle
simpa [Nat.mul_comm] using h
+/-- The quotient returned by `mulDiv512Up?` is the full-precision rounded-up quotient. -/
+theorem mulDiv512Up?_eq_some_iff (a b c out : Uint256) :
+ mulDiv512Up? a b c = some out ↔
+ ... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_64 | 746aef7ae2bbf517 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 64 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 9 | [
{
"theorem_name": "mulDiv512Up?_mul_ge",
"depth": 1,
"n_commands": 0,
"n_lines": 5,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rcases (mulDiv512Up?_eq_some_iff a b c out).mp h with ⟨hC, hFit, hOut⟩\n rw [← hOut]\n simp [Nat.mod_eq_of_lt (lt_mod... | [
{
"name": "mulDiv512Up?_eq_some_iff",
"text": "/-- The quotient returned by `mulDiv512Up?` is the full-precision rounded-up quotient. -/\ntheorem mulDiv512Up?_eq_some_iff (a b c out : Uint256) :\n mulDiv512Up? a b c = some out ↔\n (c : Nat) ≠ 0 ∧\n (((a : Nat) * (b : Nat)) + ((c : Nat) - 1)) / ... | [
{
"name": "mulDiv512Up?_mul_le_add_pred",
"fan_in": 1,
"n_deps_direct": 3,
"n_deps_transitive": 4,
"n_lines": 11,
"n_chars": 494,
"n_subproofs": 0,
"n_tactics": 5,
"cyclomatic": 2,
"n_automation": 1,
"n_rewrites": 1,
"n_structural": 2,
"automation_only": false,
... | 4 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -52,11 +52,34 @@
((n + (d - 1)) / d) * d ≤ n + (d - 1) := by
simpa [Nat.mul_comm] using Nat.mul_div_le (n + (d - 1)) d
+/-- The quotient returned by `mulDiv512Up?` is the full-precision rounded-up quotient. -/
+theorem mulDiv512Up?_eq_some_iff (a b c out : Uint256) :
+ mulDiv512Up? a b c = some out ↔
+ ... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_65 | 15c3df6bd6dce00c | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 65 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 9 | [
{
"theorem_name": "mulDiv512Up?_mul_ge",
"depth": 1,
"n_commands": 0,
"n_lines": 5,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rcases (mulDiv512Up?_eq_some_iff a b c out).mp h with ⟨hC, hFit, hOut⟩\n rw [← hOut]\n simp [Nat.mod_eq_of_lt (lt_mod... | [
{
"name": "mulDiv512Up?_eq_some_iff",
"text": "/-- The quotient returned by `mulDiv512Up?` is the full-precision rounded-up quotient. -/\ntheorem mulDiv512Up?_eq_some_iff (a b c out : Uint256) :\n mulDiv512Up? a b c = some out ↔\n (c : Nat) ≠ 0 ∧\n (((a : Nat) * (b : Nat)) + ((c : Nat) - 1)) / ... | [
{
"name": "mulDiv512Up?_mul_lt_add",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 5,
"n_lines": 11,
"n_chars": 505,
"n_subproofs": 0,
"n_tactics": 5,
"cyclomatic": 2,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 2,
"automation_only": false,
"ma... | 5 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -52,17 +52,44 @@
((n + (d - 1)) / d) * d ≤ n + (d - 1) := by
simpa [Nat.mul_comm] using Nat.mul_div_le (n + (d - 1)) d
+/-- The quotient returned by `mulDiv512Up?` is the full-precision rounded-up quotient. -/
+theorem mulDiv512Up?_eq_some_iff (a b c out : Uint256) :
+ mulDiv512Up? a b c = some out ↔
+ ... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_66 | 3f6bbf4e39273cf3 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 66 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 1 | [
{
"theorem_name": "mulDiv512Down?_isSome_of_up_isSome",
"depth": 1,
"n_commands": 0,
"n_lines": 8,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rw [mulDiv512Up?_isSome_iff] at h\n rw [mulDiv512Down?_isSome_iff]\n rcases h with ⟨hC, hFit⟩\n refin... | [
{
"name": "mulDiv512Up?_isSome_iff",
"text": "/-- `mulDiv512Up?` succeeds exactly when the divisor is nonzero and the\nfull-precision rounded-up quotient fits in `uint256`. -/\ntheorem mulDiv512Up?_isSome_iff (a b c : Uint256) :\n (mulDiv512Up? a b c).isSome ↔\n (c : Nat) ≠ 0 ∧\n (((a : Nat) * ... | [
{
"name": "mulDiv512Down?_isSome_of_up_isSome",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 14,
"n_chars": 474,
"n_subproofs": 0,
"n_tactics": 8,
"cyclomatic": 2,
"n_automation": 0,
"n_rewrites": 2,
"n_structural": 3,
"automation_only": fal... | 2 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -52,11 +52,37 @@
· have hFit : ((a : Nat) * (b : Nat)) / (c : Nat) ≤ MAX_UINT256 := Nat.le_of_not_gt hOverflow
simp [Verity.Stdlib.Math.mulDiv512Down?, hC, hOverflow, hFit]
+/-- `mulDiv512Up?` succeeds exactly when the divisor is nonzero and the
+full-precision rounded-up quotient fits in `uint256`. -/... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_67 | 10aec2cee7348a80 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 67 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 1 | [
{
"theorem_name": "mulDiv512Up?_isNone_of_down_isNone",
"depth": 1,
"n_commands": 0,
"n_lines": 8,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rw [mulDiv512Down?_isNone_iff] at h\n rw [mulDiv512Up?_isNone_iff]\n rcases h with hZero | hOverflow\n... | [
{
"name": "mulDiv512Up?_isNone_iff",
"text": "/-- `mulDiv512Up?` rejects exactly zero divisors or overflowing rounded-up quotients. -/\ntheorem mulDiv512Up?_isNone_iff (a b c : Uint256) :\n (mulDiv512Up? a b c).isNone ↔\n (c : Nat) = 0 ∨\n MAX_UINT256 <\n (((a : Nat) * (b : Nat)) + ((c :... | [
{
"name": "mulDiv512Up?_isNone_of_down_isNone",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 14,
"n_chars": 521,
"n_subproofs": 0,
"n_tactics": 8,
"cyclomatic": 2,
"n_automation": 0,
"n_rewrites": 2,
"n_structural": 3,
"automation_only": fal... | 2 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -48,11 +48,31 @@
· simp [Verity.Stdlib.Math.mulDiv512Down?, hC, hOverflow]
· simp [Verity.Stdlib.Math.mulDiv512Down?, hC, hOverflow]
+/-- `mulDiv512Up?` rejects exactly zero divisors or overflowing rounded-up quotients. -/
+theorem mulDiv512Up?_isNone_iff (a b c : Uint256) :
+ (mulDiv512Up? a b c).isN... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_68 | aebc279c94cb9a8b | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 68 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 5 | [
{
"theorem_name": "mulDiv512Up?_zero_left",
"depth": 1,
"n_commands": 0,
"n_lines": 7,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hCeilZero : (((0 : Uint256) : Nat) * (b : Nat) + ((c : Nat) - 1)) / (c : Nat) = 0 := by\n simpa using Nat.di... | [
{
"name": "mulDiv512Up?_some",
"text": "/-- `mulDiv512Up?` returns the exact full-precision ceil quotient when it fits. -/\ntheorem mulDiv512Up?_some (a b c : Uint256)\n (hC : (c : Nat) ≠ 0)\n (hFit : (((a : Nat) * (b : Nat)) + ((c : Nat) - 1)) / (c : Nat) ≤ MAX_UINT256) :\n mulDiv512Up? a b c =\n ... | [
{
"name": "mulDiv512Up?_zero_left",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 12,
"n_chars": 453,
"n_subproofs": 1,
"n_tactics": 7,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 3,
"n_structural": 1,
"automation_only": false,
"max... | 1 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -37,10 +37,24 @@
set_option maxRecDepth 100000
+/-- `mulDiv512Up?` returns the exact full-precision ceil quotient when it fits. -/
+theorem mulDiv512Up?_some (a b c : Uint256)
+ (hC : (c : Nat) ≠ 0)
+ (hFit : (((a : Nat) * (b : Nat)) + ((c : Nat) - 1)) / (c : Nat) ≤ MAX_UINT256) :
+ mulDiv512Up? a b c ... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_69 | a15e60dc37a8f991 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 69 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 2 | [
{
"theorem_name": "mulDiv512Up?_zero_right",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simpa [mulDiv512Up?_comm] using mulDiv512Up?_zero_left a c hC",
"n_chars": 67,
"n_subproofs": 0,
"n_tac... | [
{
"name": "mulDiv512Up?_comm",
"text": "/-- Full-precision ceil multiplication is commutative in its numerator operands. -/\ntheorem mulDiv512Up?_comm (a b c : Uint256) :\n mulDiv512Up? a b c = mulDiv512Up? b a c := by\n simp [Verity.Stdlib.Math.mulDiv512Up?, Nat.mul_comm]\n\n",
"fan_in": 2,
"n_... | [
{
"name": "mulDiv512Up?_zero_right",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 3,
"n_lines": 7,
"n_chars": 264,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,
"max_... | 3 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -45,6 +45,11 @@
some (Verity.Core.Uint256.ofNat ((((a : Nat) * (b : Nat)) + ((c : Nat) - 1)) / (c : Nat))) := by
simp [Verity.Stdlib.Math.mulDiv512Up?, hC, Nat.not_lt.mpr hFit]
+/-- Full-precision ceil multiplication is commutative in its numerator operands. -/
+theorem mulDiv512Up?_comm (a b c : Uint256... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_70 | 0a0a1ef08da2009a | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 70 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 9 | [
{
"theorem_name": "mulDiv512Up?_mul_ge",
"depth": 1,
"n_commands": 0,
"n_lines": 5,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rcases (mulDiv512Up?_eq_some_iff a b c out).mp h with ⟨hC, hFit, hOut⟩\n rw [← hOut]\n simp [Nat.mod_eq_of_lt (lt_mod... | [
{
"name": "mulDiv512Up?_eq_some_iff",
"text": "/-- The quotient returned by `mulDiv512Up?` is the full-precision rounded-up quotient. -/\ntheorem mulDiv512Up?_eq_some_iff (a b c out : Uint256) :\n mulDiv512Up? a b c = some out ↔\n (c : Nat) ≠ 0 ∧\n (((a : Nat) * (b : Nat)) + ((c : Nat) - 1)) / ... | [
{
"name": "mulDiv512Up?_pos",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 3,
"n_lines": 18,
"n_chars": 683,
"n_subproofs": 3,
"n_tactics": 10,
"cyclomatic": 2,
"n_automation": 3,
"n_rewrites": 1,
"n_structural": 1,
"automation_only": false,
"max_nest... | 3 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -48,13 +48,41 @@
set_option maxRecDepth 100000
+/-- The quotient returned by `mulDiv512Up?` is the full-precision rounded-up quotient. -/
+theorem mulDiv512Up?_eq_some_iff (a b c out : Uint256) :
+ mulDiv512Up? a b c = some out ↔
+ (c : Nat) ≠ 0 ∧
+ (((a : Nat) * (b : Nat)) + ((c : Nat) - 1)) / (c ... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_71 | e8f6566bf04d5845 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 71 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 5 | [
{
"theorem_name": "mulDiv512Up?_zero_left",
"depth": 1,
"n_commands": 0,
"n_lines": 7,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hCeilZero : (((0 : Uint256) : Nat) * (b : Nat) + ((c : Nat) - 1)) / (c : Nat) = 0 := by\n simpa using Nat.di... | [
{
"name": "mulDiv512Up?_some",
"text": "/-- `mulDiv512Up?` returns the exact full-precision ceil quotient when it fits. -/\ntheorem mulDiv512Up?_some (a b c : Uint256)\n (hC : (c : Nat) ≠ 0)\n (hFit : (((a : Nat) * (b : Nat)) + ((c : Nat) - 1)) / (c : Nat) ≤ MAX_UINT256) :\n mulDiv512Up? a b c =\n ... | [
{
"name": "mulDiv512Up?_cancel_right",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 26,
"n_chars": 1070,
"n_subproofs": 4,
"n_tactics": 21,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 4,
"n_structural": 3,
"automation_only": false,
... | 1 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -37,10 +37,38 @@
set_option maxRecDepth 100000
+/-- `mulDiv512Up?` returns the exact full-precision ceil quotient when it fits. -/
+theorem mulDiv512Up?_some (a b c : Uint256)
+ (hC : (c : Nat) ≠ 0)
+ (hFit : (((a : Nat) * (b : Nat)) + ((c : Nat) - 1)) / (c : Nat) ≤ MAX_UINT256) :
+ mulDiv512Up? a b c ... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_72 | 97c9ba43e632b3eb | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 72 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 2 | [
{
"theorem_name": "mulDiv512Up?_zero_right",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simpa [mulDiv512Up?_comm] using mulDiv512Up?_zero_left a c hC",
"n_chars": 67,
"n_subproofs": 0,
"n_tac... | [
{
"name": "mulDiv512Up?_comm",
"text": "/-- Full-precision ceil multiplication is commutative in its numerator operands. -/\ntheorem mulDiv512Up?_comm (a b c : Uint256) :\n mulDiv512Up? a b c = mulDiv512Up? b a c := by\n simp [Verity.Stdlib.Math.mulDiv512Up?, Nat.mul_comm]\n\n",
"fan_in": 2,
"n_... | [
{
"name": "mulDiv512Up?_cancel_left",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 3,
"n_lines": 8,
"n_chars": 266,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 1,
"n_structural": 1,
"automation_only": false,
"ma... | 3 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -45,6 +45,11 @@
some (Verity.Core.Uint256.ofNat ((((a : Nat) * (b : Nat)) + ((c : Nat) - 1)) / (c : Nat))) := by
simp [Verity.Stdlib.Math.mulDiv512Up?, hC, Nat.not_lt.mpr hFit]
+/-- Full-precision ceil multiplication is commutative in its numerator operands. -/
+theorem mulDiv512Up?_comm (a b c : Uint256... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_73 | 1b45ecb5b01489ee | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 73 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 9 | [
{
"theorem_name": "mulDiv512Up?_mul_ge",
"depth": 1,
"n_commands": 0,
"n_lines": 5,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rcases (mulDiv512Up?_eq_some_iff a b c out).mp h with ⟨hC, hFit, hOut⟩\n rw [← hOut]\n simp [Nat.mod_eq_of_lt (lt_mod... | [
{
"name": "mulDiv512Up?_eq_some_iff",
"text": "/-- The quotient returned by `mulDiv512Up?` is the full-precision rounded-up quotient. -/\ntheorem mulDiv512Up?_eq_some_iff (a b c out : Uint256) :\n mulDiv512Up? a b c = some out ↔\n (c : Nat) ≠ 0 ∧\n (((a : Nat) * (b : Nat)) + ((c : Nat) - 1)) / ... | [
{
"name": "mulDiv512Up?_monotone_left",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 3,
"n_lines": 15,
"n_chars": 785,
"n_subproofs": 0,
"n_tactics": 7,
"cyclomatic": 3,
"n_automation": 1,
"n_rewrites": 1,
"n_structural": 3,
"automation_only": false,
... | 3 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -48,13 +48,38 @@
set_option maxRecDepth 100000
+/-- The quotient returned by `mulDiv512Up?` is the full-precision rounded-up quotient. -/
+theorem mulDiv512Up?_eq_some_iff (a b c out : Uint256) :
+ mulDiv512Up? a b c = some out ↔
+ (c : Nat) ≠ 0 ∧
+ (((a : Nat) * (b : Nat)) + ((c : Nat) - 1)) / (c ... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_74 | 73371a987e98d415 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 74 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 9 | [
{
"theorem_name": "mulDiv512Up?_mul_ge",
"depth": 1,
"n_commands": 0,
"n_lines": 5,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rcases (mulDiv512Up?_eq_some_iff a b c out).mp h with ⟨hC, hFit, hOut⟩\n rw [← hOut]\n simp [Nat.mod_eq_of_lt (lt_mod... | [
{
"name": "mulDiv512Up?_eq_some_iff",
"text": "/-- The quotient returned by `mulDiv512Up?` is the full-precision rounded-up quotient. -/\ntheorem mulDiv512Up?_eq_some_iff (a b c out : Uint256) :\n mulDiv512Up? a b c = some out ↔\n (c : Nat) ≠ 0 ∧\n (((a : Nat) * (b : Nat)) + ((c : Nat) - 1)) / ... | [
{
"name": "mulDiv512Up?_monotone_right",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 3,
"n_lines": 15,
"n_chars": 786,
"n_subproofs": 0,
"n_tactics": 7,
"cyclomatic": 3,
"n_automation": 1,
"n_rewrites": 1,
"n_structural": 3,
"automation_only": false,
... | 3 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -48,13 +48,38 @@
set_option maxRecDepth 100000
+/-- The quotient returned by `mulDiv512Up?` is the full-precision rounded-up quotient. -/
+theorem mulDiv512Up?_eq_some_iff (a b c out : Uint256) :
+ mulDiv512Up? a b c = some out ↔
+ (c : Nat) ≠ 0 ∧
+ (((a : Nat) * (b : Nat)) + ((c : Nat) - 1)) / (c ... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_75 | e681474762251772 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 75 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 9 | [
{
"theorem_name": "mulDiv512Up?_mul_ge",
"depth": 1,
"n_commands": 0,
"n_lines": 5,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rcases (mulDiv512Up?_eq_some_iff a b c out).mp h with ⟨hC, hFit, hOut⟩\n rw [← hOut]\n simp [Nat.mod_eq_of_lt (lt_mod... | [
{
"name": "mulDiv512Up?_eq_some_iff",
"text": "/-- The quotient returned by `mulDiv512Up?` is the full-precision rounded-up quotient. -/\ntheorem mulDiv512Up?_eq_some_iff (a b c out : Uint256) :\n mulDiv512Up? a b c = some out ↔\n (c : Nat) ≠ 0 ∧\n (((a : Nat) * (b : Nat)) + ((c : Nat) - 1)) / ... | [
{
"name": "mulDiv512Up?_antitone_divisor",
"fan_in": 0,
"n_deps_direct": 3,
"n_deps_transitive": 6,
"n_lines": 15,
"n_chars": 792,
"n_subproofs": 0,
"n_tactics": 7,
"cyclomatic": 3,
"n_automation": 1,
"n_rewrites": 1,
"n_structural": 3,
"automation_only": false,
... | 6 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -91,13 +91,38 @@
simpa [Nat.mul_comm] using hLt
exact Nat.lt_succ_iff.mp (Nat.lt_of_mul_lt_mul_left hLt')
+/-- The quotient returned by `mulDiv512Up?` is the full-precision rounded-up quotient. -/
+theorem mulDiv512Up?_eq_some_iff (a b c out : Uint256) :
+ mulDiv512Up? a b c = some out ↔
+ (c : Nat... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_76 | 57d37d368943ffa4 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 76 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 19 | [
{
"theorem_name": "max_uint256_lt_modulus",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": "\n lt_modulus_of_le_max (Nat.le_refl MAX_UINT256)",
"n_chars": 49,
"n_subproofs": 0,
"n_tactics": 1,
"cycl... | [
{
"name": "lt_modulus_of_le_max",
"text": "private theorem lt_modulus_of_le_max {n : Nat} (h : n ≤ MAX_UINT256) :\n n < Verity.Core.Uint256.modulus := by\n calc\n n < MAX_UINT256 + 1 := Nat.lt_succ_of_le h\n _ = Verity.Core.Uint256.modulus := by simp [modulus_eq_max_succ]\n\n",
"fan_in": 19,
... | [
{
"name": "mulDiv512Up?_wide_product_regression",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 3,
"n_lines": 27,
"n_chars": 1163,
"n_subproofs": 3,
"n_tactics": 18,
"cyclomatic": 1,
"n_automation": 6,
"n_rewrites": 4,
"n_structural": 1,
"automation_only":... | 3 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -40,8 +40,15 @@
symm
exact Verity.Core.Uint256.max_uint256_succ_eq_modulus
+private theorem lt_modulus_of_le_max {n : Nat} (h : n ≤ MAX_UINT256) :
+ n < Verity.Core.Uint256.modulus := by
+ calc
+ n < MAX_UINT256 + 1 := Nat.lt_succ_of_le h
+ _ = Verity.Core.Uint256.modulus := by simp [modulus_eq_max... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_77 | 5c2030358a95b4a1 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 77 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 19 | [
{
"theorem_name": "max_uint256_lt_modulus",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": "\n lt_modulus_of_le_max (Nat.le_refl MAX_UINT256)",
"n_chars": 49,
"n_subproofs": 0,
"n_tactics": 1,
"cycl... | [
{
"name": "lt_modulus_of_le_max",
"text": "private theorem lt_modulus_of_le_max {n : Nat} (h : n ≤ MAX_UINT256) :\n n < Verity.Core.Uint256.modulus := by\n calc\n n < MAX_UINT256 + 1 := Nat.lt_succ_of_le h\n _ = Verity.Core.Uint256.modulus := by simp [modulus_eq_max_succ]\n\n",
"fan_in": 19,
... | [
{
"name": "mulDiv512Up?_final_overflow_regression",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 3,
"n_lines": 25,
"n_chars": 973,
"n_subproofs": 4,
"n_tactics": 14,
"cyclomatic": 1,
"n_automation": 4,
"n_rewrites": 0,
"n_structural": 0,
"automation_only"... | 3 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -40,8 +40,15 @@
symm
exact Verity.Core.Uint256.max_uint256_succ_eq_modulus
+private theorem lt_modulus_of_le_max {n : Nat} (h : n ≤ MAX_UINT256) :
+ n < Verity.Core.Uint256.modulus := by
+ calc
+ n < MAX_UINT256 + 1 := Nat.lt_succ_of_le h
+ _ = Verity.Core.Uint256.modulus := by simp [modulus_eq_max... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_78 | d0c822cf0dd2de0b | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 78 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 19 | [
{
"theorem_name": "max_uint256_lt_modulus",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": "\n lt_modulus_of_le_max (Nat.le_refl MAX_UINT256)",
"n_chars": 49,
"n_subproofs": 0,
"n_tactics": 1,
"cycl... | [
{
"name": "lt_modulus_of_le_max",
"text": "private theorem lt_modulus_of_le_max {n : Nat} (h : n ≤ MAX_UINT256) :\n n < Verity.Core.Uint256.modulus := by\n calc\n n < MAX_UINT256 + 1 := Nat.lt_succ_of_le h\n _ = Verity.Core.Uint256.modulus := by simp [modulus_eq_max_succ]\n\n",
"fan_in": 19,
... | [
{
"name": "mulDivDown_nat_eq",
"fan_in": 15,
"n_deps_direct": 1,
"n_deps_transitive": 2,
"n_lines": 24,
"n_chars": 1331,
"n_subproofs": 4,
"n_tactics": 19,
"cyclomatic": 1,
"n_automation": 4,
"n_rewrites": 0,
"n_structural": 2,
"automation_only": false,
"max_n... | 2 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -40,13 +40,20 @@
symm
exact Verity.Core.Uint256.max_uint256_succ_eq_modulus
+private theorem lt_modulus_of_le_max {n : Nat} (h : n ≤ MAX_UINT256) :
+ n < Verity.Core.Uint256.modulus := by
+ calc
+ n < MAX_UINT256 + 1 := Nat.lt_succ_of_le h
+ _ = Verity.Core.Uint256.modulus := by simp [modulus_eq_ma... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_79 | 24d643f68f60a589 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 79 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 15 | [
{
"theorem_name": "mulDivDown_mul_le",
"depth": 1,
"n_commands": 0,
"n_lines": 7,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n by_cases hZero : (c : Nat) = 0\n · rw [mulDivDown_nat_eq a b c hMul]\n simp [hZero]\n · rw [mulDivDown_nat_eq a b c ... | [
{
"name": "mulDivDown_nat_eq",
"text": "/-- `mulDivDown` agrees with exact natural-number division when the numerator does not wrap. -/\ntheorem mulDivDown_nat_eq (a b c : Uint256) (hMul : (a : Nat) * (b : Nat) ≤ MAX_UINT256) :\n (mulDivDown a b c : Nat) =\n if (c : Nat) = 0 then 0 else ((a : Nat) *... | [
{
"name": "mulDivDown_mul_le",
"fan_in": 2,
"n_deps_direct": 1,
"n_deps_transitive": 3,
"n_lines": 11,
"n_chars": 413,
"n_subproofs": 0,
"n_tactics": 7,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 2,
"n_structural": 1,
"automation_only": false,
"max_nest... | 3 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -48,12 +48,38 @@
set_option maxRecDepth 100000
+/-- `mulDivDown` agrees with exact natural-number division when the numerator does not wrap. -/
+theorem mulDivDown_nat_eq (a b c : Uint256) (hMul : (a : Nat) * (b : Nat) ≤ MAX_UINT256) :
+ (mulDivDown a b c : Nat) =
+ if (c : Nat) = 0 then 0 else ((a : Na... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_80 | a07b60caa818fd05 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 80 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 15 | [
{
"theorem_name": "mulDivDown_mul_le",
"depth": 1,
"n_commands": 0,
"n_lines": 7,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n by_cases hZero : (c : Nat) = 0\n · rw [mulDivDown_nat_eq a b c hMul]\n simp [hZero]\n · rw [mulDivDown_nat_eq a b c ... | [
{
"name": "mulDivDown_nat_eq",
"text": "/-- `mulDivDown` agrees with exact natural-number division when the numerator does not wrap. -/\ntheorem mulDivDown_nat_eq (a b c : Uint256) (hMul : (a : Nat) * (b : Nat) ≤ MAX_UINT256) :\n (mulDivDown a b c : Nat) =\n if (c : Nat) = 0 then 0 else ((a : Nat) *... | [
{
"name": "mulDivDown_pos",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 3,
"n_lines": 15,
"n_chars": 560,
"n_subproofs": 2,
"n_tactics": 8,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 1,
"n_structural": 3,
"automation_only": false,
"max_nesting... | 3 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -48,12 +48,42 @@
set_option maxRecDepth 100000
+/-- `mulDivDown` agrees with exact natural-number division when the numerator does not wrap. -/
+theorem mulDivDown_nat_eq (a b c : Uint256) (hMul : (a : Nat) * (b : Nat) ≤ MAX_UINT256) :
+ (mulDivDown a b c : Nat) =
+ if (c : Nat) = 0 then 0 else ((a : Na... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_81 | 8f0713ac6b8d3802 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 81 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 15 | [
{
"theorem_name": "mulDivDown_mul_le",
"depth": 1,
"n_commands": 0,
"n_lines": 7,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n by_cases hZero : (c : Nat) = 0\n · rw [mulDivDown_nat_eq a b c hMul]\n simp [hZero]\n · rw [mulDivDown_nat_eq a b c ... | [
{
"name": "mulDivDown_nat_eq",
"text": "/-- `mulDivDown` agrees with exact natural-number division when the numerator does not wrap. -/\ntheorem mulDivDown_nat_eq (a b c : Uint256) (hMul : (a : Nat) * (b : Nat) ≤ MAX_UINT256) :\n (mulDivDown a b c : Nat) =\n if (c : Nat) = 0 then 0 else ((a : Nat) *... | [
{
"name": "mulDivDown_zero_left",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 3,
"n_lines": 11,
"n_chars": 368,
"n_subproofs": 1,
"n_tactics": 7,
"cyclomatic": 1,
"n_automation": 3,
"n_rewrites": 2,
"n_structural": 0,
"automation_only": false,
"max_n... | 3 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -48,13 +48,38 @@
set_option maxRecDepth 100000
+/-- `mulDivDown` agrees with exact natural-number division when the numerator does not wrap. -/
+theorem mulDivDown_nat_eq (a b c : Uint256) (hMul : (a : Nat) * (b : Nat) ≤ MAX_UINT256) :
+ (mulDivDown a b c : Nat) =
+ if (c : Nat) = 0 then 0 else ((a : Na... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_82 | fbe33632727cbb70 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 82 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 15 | [
{
"theorem_name": "mulDivDown_mul_le",
"depth": 1,
"n_commands": 0,
"n_lines": 7,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n by_cases hZero : (c : Nat) = 0\n · rw [mulDivDown_nat_eq a b c hMul]\n simp [hZero]\n · rw [mulDivDown_nat_eq a b c ... | [
{
"name": "mulDivDown_nat_eq",
"text": "/-- `mulDivDown` agrees with exact natural-number division when the numerator does not wrap. -/\ntheorem mulDivDown_nat_eq (a b c : Uint256) (hMul : (a : Nat) * (b : Nat) ≤ MAX_UINT256) :\n (mulDivDown a b c : Nat) =\n if (c : Nat) = 0 then 0 else ((a : Nat) *... | [
{
"name": "mulDivDown_zero_right",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 3,
"n_lines": 11,
"n_chars": 370,
"n_subproofs": 1,
"n_tactics": 7,
"cyclomatic": 1,
"n_automation": 3,
"n_rewrites": 2,
"n_structural": 0,
"automation_only": false,
"max_... | 3 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -48,13 +48,38 @@
set_option maxRecDepth 100000
+/-- `mulDivDown` agrees with exact natural-number division when the numerator does not wrap. -/
+theorem mulDivDown_nat_eq (a b c : Uint256) (hMul : (a : Nat) * (b : Nat) ≤ MAX_UINT256) :
+ (mulDivDown a b c : Nat) =
+ if (c : Nat) = 0 then 0 else ((a : Na... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_83 | 8640bb2d7fd57904 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 83 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 15 | [
{
"theorem_name": "mulDivDown_mul_le",
"depth": 1,
"n_commands": 0,
"n_lines": 7,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n by_cases hZero : (c : Nat) = 0\n · rw [mulDivDown_nat_eq a b c hMul]\n simp [hZero]\n · rw [mulDivDown_nat_eq a b c ... | [
{
"name": "mulDivDown_nat_eq",
"text": "/-- `mulDivDown` agrees with exact natural-number division when the numerator does not wrap. -/\ntheorem mulDivDown_nat_eq (a b c : Uint256) (hMul : (a : Nat) * (b : Nat) ≤ MAX_UINT256) :\n (mulDivDown a b c : Nat) =\n if (c : Nat) = 0 then 0 else ((a : Nat) *... | [
{
"name": "mulDivDown_monotone_left",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 3,
"n_lines": 15,
"n_chars": 721,
"n_subproofs": 1,
"n_tactics": 9,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 2,
"n_structural": 2,
"automation_only": false,
"m... | 3 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -48,6 +48,29 @@
set_option maxRecDepth 100000
+/-- `mulDivDown` agrees with exact natural-number division when the numerator does not wrap. -/
+theorem mulDivDown_nat_eq (a b c : Uint256) (hMul : (a : Nat) * (b : Nat) ≤ MAX_UINT256) :
+ (mulDivDown a b c : Nat) =
+ if (c : Nat) = 0 then 0 else ((a : Nat... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_84 | 3d73faf65ee79e74 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 84 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 15 | [
{
"theorem_name": "mulDivDown_mul_le",
"depth": 1,
"n_commands": 0,
"n_lines": 7,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n by_cases hZero : (c : Nat) = 0\n · rw [mulDivDown_nat_eq a b c hMul]\n simp [hZero]\n · rw [mulDivDown_nat_eq a b c ... | [
{
"name": "mulDivDown_nat_eq",
"text": "/-- `mulDivDown` agrees with exact natural-number division when the numerator does not wrap. -/\ntheorem mulDivDown_nat_eq (a b c : Uint256) (hMul : (a : Nat) * (b : Nat) ≤ MAX_UINT256) :\n (mulDivDown a b c : Nat) =\n if (c : Nat) = 0 then 0 else ((a : Nat) *... | [
{
"name": "mulDivDown_monotone_right",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 3,
"n_lines": 15,
"n_chars": 721,
"n_subproofs": 1,
"n_tactics": 9,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 2,
"n_structural": 2,
"automation_only": false,
"... | 3 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -48,6 +48,29 @@
set_option maxRecDepth 100000
+/-- `mulDivDown` agrees with exact natural-number division when the numerator does not wrap. -/
+theorem mulDivDown_nat_eq (a b c : Uint256) (hMul : (a : Nat) * (b : Nat) ≤ MAX_UINT256) :
+ (mulDivDown a b c : Nat) =
+ if (c : Nat) = 0 then 0 else ((a : Nat... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_85 | ae387c4527d3f503 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 85 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 15 | [
{
"theorem_name": "mulDivDown_mul_le",
"depth": 1,
"n_commands": 0,
"n_lines": 7,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n by_cases hZero : (c : Nat) = 0\n · rw [mulDivDown_nat_eq a b c hMul]\n simp [hZero]\n · rw [mulDivDown_nat_eq a b c ... | [
{
"name": "mulDivDown_nat_eq",
"text": "/-- `mulDivDown` agrees with exact natural-number division when the numerator does not wrap. -/\ntheorem mulDivDown_nat_eq (a b c : Uint256) (hMul : (a : Nat) * (b : Nat) ≤ MAX_UINT256) :\n (mulDivDown a b c : Nat) =\n if (c : Nat) = 0 then 0 else ((a : Nat) *... | [
{
"name": "mulDivDown_cancel_right",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 3,
"n_lines": 14,
"n_chars": 480,
"n_subproofs": 2,
"n_tactics": 8,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 1,
"n_structural": 3,
"automation_only": false,
"ma... | 3 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -48,11 +48,41 @@
set_option maxRecDepth 100000
+/-- `mulDivDown` agrees with exact natural-number division when the numerator does not wrap. -/
+theorem mulDivDown_nat_eq (a b c : Uint256) (hMul : (a : Nat) * (b : Nat) ≤ MAX_UINT256) :
+ (mulDivDown a b c : Nat) =
+ if (c : Nat) = 0 then 0 else ((a : Na... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_86 | a94a7214ad8cea58 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 86 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 15 | [
{
"theorem_name": "mulDivDown_mul_le",
"depth": 1,
"n_commands": 0,
"n_lines": 7,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n by_cases hZero : (c : Nat) = 0\n · rw [mulDivDown_nat_eq a b c hMul]\n simp [hZero]\n · rw [mulDivDown_nat_eq a b c ... | [
{
"name": "mulDivDown_nat_eq",
"text": "/-- `mulDivDown` agrees with exact natural-number division when the numerator does not wrap. -/\ntheorem mulDivDown_nat_eq (a b c : Uint256) (hMul : (a : Nat) * (b : Nat) ≤ MAX_UINT256) :\n (mulDivDown a b c : Nat) =\n if (c : Nat) = 0 then 0 else ((a : Nat) *... | [
{
"name": "mulDivDown_cancel_left",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 3,
"n_lines": 14,
"n_chars": 493,
"n_subproofs": 2,
"n_tactics": 8,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 1,
"n_structural": 3,
"automation_only": false,
"max... | 3 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -48,11 +48,41 @@
set_option maxRecDepth 100000
+/-- `mulDivDown` agrees with exact natural-number division when the numerator does not wrap. -/
+theorem mulDivDown_nat_eq (a b c : Uint256) (hMul : (a : Nat) * (b : Nat) ≤ MAX_UINT256) :
+ (mulDivDown a b c : Nat) =
+ if (c : Nat) = 0 then 0 else ((a : Na... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_87 | 9dc71c77e3bb5a92 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 87 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 15 | [
{
"theorem_name": "mulDivDown_mul_le",
"depth": 1,
"n_commands": 0,
"n_lines": 7,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n by_cases hZero : (c : Nat) = 0\n · rw [mulDivDown_nat_eq a b c hMul]\n simp [hZero]\n · rw [mulDivDown_nat_eq a b c ... | [
{
"name": "mulDivDown_nat_eq",
"text": "/-- `mulDivDown` agrees with exact natural-number division when the numerator does not wrap. -/\ntheorem mulDivDown_nat_eq (a b c : Uint256) (hMul : (a : Nat) * (b : Nat) ≤ MAX_UINT256) :\n (mulDivDown a b c : Nat) =\n if (c : Nat) = 0 then 0 else ((a : Nat) *... | [
{
"name": "mulDivDown_mul_lt_add",
"fan_in": 2,
"n_deps_direct": 1,
"n_deps_transitive": 3,
"n_lines": 22,
"n_chars": 1025,
"n_subproofs": 2,
"n_tactics": 16,
"cyclomatic": 1,
"n_automation": 4,
"n_rewrites": 1,
"n_structural": 5,
"automation_only": false,
"ma... | 3 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -48,11 +48,49 @@
set_option maxRecDepth 100000
+/-- `mulDivDown` agrees with exact natural-number division when the numerator does not wrap. -/
+theorem mulDivDown_nat_eq (a b c : Uint256) (hMul : (a : Nat) * (b : Nat) ≤ MAX_UINT256) :
+ (mulDivDown a b c : Nat) =
+ if (c : Nat) = 0 then 0 else ((a : Na... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_88 | 28f2870a0c375d8d | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 88 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 15 | [
{
"theorem_name": "mulDivDown_mul_le",
"depth": 1,
"n_commands": 0,
"n_lines": 7,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n by_cases hZero : (c : Nat) = 0\n · rw [mulDivDown_nat_eq a b c hMul]\n simp [hZero]\n · rw [mulDivDown_nat_eq a b c ... | [
{
"name": "mulDivDown_nat_eq",
"text": "/-- `mulDivDown` agrees with exact natural-number division when the numerator does not wrap. -/\ntheorem mulDivDown_nat_eq (a b c : Uint256) (hMul : (a : Nat) * (b : Nat) ≤ MAX_UINT256) :\n (mulDivDown a b c : Nat) =\n if (c : Nat) = 0 then 0 else ((a : Nat) *... | [
{
"name": "mulDivDown_antitone_divisor",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 5,
"n_lines": 37,
"n_chars": 1660,
"n_subproofs": 6,
"n_tactics": 30,
"cyclomatic": 1,
"n_automation": 4,
"n_rewrites": 0,
"n_structural": 7,
"automation_only": false,
... | 5 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -48,18 +48,59 @@
set_option maxRecDepth 100000
+/-- `mulDivDown` agrees with exact natural-number division when the numerator does not wrap. -/
+theorem mulDivDown_nat_eq (a b c : Uint256) (hMul : (a : Nat) * (b : Nat) ≤ MAX_UINT256) :
+ (mulDivDown a b c : Nat) =
+ if (c : Nat) = 0 then 0 else ((a : Na... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_89 | 29252abecd94b661 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 89 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 19 | [
{
"theorem_name": "max_uint256_lt_modulus",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": "\n lt_modulus_of_le_max (Nat.le_refl MAX_UINT256)",
"n_chars": 49,
"n_subproofs": 0,
"n_tactics": 1,
"cycl... | [
{
"name": "lt_modulus_of_le_max",
"text": "private theorem lt_modulus_of_le_max {n : Nat} (h : n ≤ MAX_UINT256) :\n n < Verity.Core.Uint256.modulus := by\n calc\n n < MAX_UINT256 + 1 := Nat.lt_succ_of_le h\n _ = Verity.Core.Uint256.modulus := by simp [modulus_eq_max_succ]\n\n",
"fan_in": 19,
... | [
{
"name": "mulDivUp_nat_eq",
"fan_in": 14,
"n_deps_direct": 1,
"n_deps_transitive": 2,
"n_lines": 41,
"n_chars": 2096,
"n_subproofs": 10,
"n_tactics": 35,
"cyclomatic": 1,
"n_automation": 5,
"n_rewrites": 0,
"n_structural": 6,
"automation_only": false,
"max_ne... | 2 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -40,6 +40,12 @@
symm
exact Verity.Core.Uint256.max_uint256_succ_eq_modulus
+private theorem lt_modulus_of_le_max {n : Nat} (h : n ≤ MAX_UINT256) :
+ n < Verity.Core.Uint256.modulus := by
+ calc
+ n < MAX_UINT256 + 1 := Nat.lt_succ_of_le h
+ _ = Verity.Core.Uint256.modulus := by simp [modulus_eq_max... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_90 | 02d63b9daa7b44a5 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 90 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 15 | [
{
"theorem_name": "mulDivDown_mul_le",
"depth": 1,
"n_commands": 0,
"n_lines": 7,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n by_cases hZero : (c : Nat) = 0\n · rw [mulDivDown_nat_eq a b c hMul]\n simp [hZero]\n · rw [mulDivDown_nat_eq a b c ... | [
{
"name": "mulDivDown_nat_eq",
"text": "/-- `mulDivDown` agrees with exact natural-number division when the numerator does not wrap. -/\ntheorem mulDivDown_nat_eq (a b c : Uint256) (hMul : (a : Nat) * (b : Nat) ≤ MAX_UINT256) :\n (mulDivDown a b c : Nat) =\n if (c : Nat) = 0 then 0 else ((a : Nat) *... | [
{
"name": "mulDiv512Down?_eq_mulDivDown_of_no_overflow",
"fan_in": 0,
"n_deps_direct": 3,
"n_deps_transitive": 4,
"n_lines": 15,
"n_chars": 647,
"n_subproofs": 1,
"n_tactics": 8,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 3,
"n_structural": 1,
"automation_o... | 4 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -56,12 +56,42 @@
some (Verity.Core.Uint256.ofNat (((a : Nat) * (b : Nat)) / (c : Nat))) := by
simp [Verity.Stdlib.Math.mulDiv512Down?, hC, Nat.not_lt.mpr hFit]
+/-- `mulDivDown` agrees with exact natural-number division when the numerator does not wrap. -/
+theorem mulDivDown_nat_eq (a b c : Uint256) (hM... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_91 | 2e573d015e3e8efb | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 91 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 14 | [
{
"theorem_name": "mulDiv512Up?_eq_mulDivUp_of_no_overflow",
"depth": 1,
"n_commands": 0,
"n_lines": 12,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hCUint : c ≠ 0 := by\n intro h\n exact hC (by simpa using congrArg (fun x : Uint256 => ... | [
{
"name": "mulDivUp_nat_eq",
"text": "/-- `mulDivUp` agrees with exact ceil-division when the widened numerator does not wrap. -/\ntheorem mulDivUp_nat_eq (a b c : Uint256)\n (hC : c ≠ 0)\n (hNum : (a : Nat) * (b : Nat) + ((c : Nat) - 1) ≤ MAX_UINT256) :\n (mulDivUp a b c : Nat) = (((a : Nat) * (b ... | [
{
"name": "mulDiv512Up?_eq_mulDivUp_of_no_overflow",
"fan_in": 0,
"n_deps_direct": 3,
"n_deps_transitive": 4,
"n_lines": 19,
"n_chars": 800,
"n_subproofs": 2,
"n_tactics": 12,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 3,
"n_structural": 3,
"automation_only... | 4 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -56,12 +56,63 @@
some (Verity.Core.Uint256.ofNat ((((a : Nat) * (b : Nat)) + ((c : Nat) - 1)) / (c : Nat))) := by
simp [Verity.Stdlib.Math.mulDiv512Up?, hC, Nat.not_lt.mpr hFit]
+/-- `mulDivUp` agrees with exact ceil-division when the widened numerator does not wrap. -/
+theorem mulDivUp_nat_eq (a b c : ... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_92 | 7861bc4f252c3015 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 92 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 14 | [
{
"theorem_name": "mulDiv512Up?_eq_mulDivUp_of_no_overflow",
"depth": 1,
"n_commands": 0,
"n_lines": 12,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hCUint : c ≠ 0 := by\n intro h\n exact hC (by simpa using congrArg (fun x : Uint256 => ... | [
{
"name": "mulDivUp_nat_eq",
"text": "/-- `mulDivUp` agrees with exact ceil-division when the widened numerator does not wrap. -/\ntheorem mulDivUp_nat_eq (a b c : Uint256)\n (hC : c ≠ 0)\n (hNum : (a : Nat) * (b : Nat) + ((c : Nat) - 1) ≤ MAX_UINT256) :\n (mulDivUp a b c : Nat) = (((a : Nat) * (b ... | [
{
"name": "mulDivDown_le_mulDivUp",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 4,
"n_lines": 17,
"n_chars": 646,
"n_subproofs": 2,
"n_tactics": 11,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 1,
"n_structural": 6,
"automation_only": false,
"ma... | 4 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -71,11 +71,61 @@
_ = dite ((c : Nat) = 0) (fun _ => 0) (fun _ => ((a : Nat) * (b : Nat)) / (c : Nat)) := by
simp [hZero]
+/-- `mulDivUp` agrees with exact ceil-division when the widened numerator does not wrap. -/
+theorem mulDivUp_nat_eq (a b c : Uint256)
+ (hC : c ≠ 0)
+ (hNum : (a : ... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_93 | 558740437c748d66 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 93 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 5 | [
{
"theorem_name": "mulDiv512Up?_zero_left",
"depth": 1,
"n_commands": 0,
"n_lines": 7,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hCeilZero : (((0 : Uint256) : Nat) * (b : Nat) + ((c : Nat) - 1)) / (c : Nat) = 0 := by\n simpa using Nat.di... | [
{
"name": "mulDiv512Up?_some",
"text": "/-- `mulDiv512Up?` returns the exact full-precision ceil quotient when it fits. -/\ntheorem mulDiv512Up?_some (a b c : Uint256)\n (hC : (c : Nat) ≠ 0)\n (hFit : (((a : Nat) * (b : Nat)) + ((c : Nat) - 1)) / (c : Nat) ≤ MAX_UINT256) :\n mulDiv512Up? a b c =\n ... | [
{
"name": "mulDiv512Up?_eq_down_of_dvd",
"fan_in": 0,
"n_deps_direct": 3,
"n_deps_transitive": 3,
"n_lines": 16,
"n_chars": 700,
"n_subproofs": 1,
"n_tactics": 9,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 3,
"n_structural": 0,
"automation_only": false,
... | 3 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -45,6 +45,14 @@
some (Verity.Core.Uint256.ofNat (((a : Nat) * (b : Nat)) / (c : Nat))) := by
simp [Verity.Stdlib.Math.mulDiv512Down?, hC, Nat.not_lt.mpr hFit]
+/-- `mulDiv512Up?` returns the exact full-precision ceil quotient when it fits. -/
+theorem mulDiv512Up?_some (a b c : Uint256)
+ (hC : (c : N... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_94 | 730c511f7dc44213 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 94 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 2 | [
{
"theorem_name": "mulDiv512Up?_some_succ_of_not_dvd",
"depth": 1,
"n_commands": 0,
"n_lines": 8,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hCeil :\n (((a : Nat) * (b : Nat)) + ((c : Nat) - 1)) / (c : Nat) =\n ((a : Nat) * (b : ... | [
{
"name": "nat_ceil_div_eq_div_add_one_of_not_dvd",
"text": "private theorem nat_ceil_div_eq_div_add_one_of_not_dvd (n c : Nat) (hC : c ≠ 0)\n (hNotDvd : ¬ c ∣ n) :\n (n + (c - 1)) / c = n / c + 1 := by\n have hCPos : 0 < c := Nat.pos_of_ne_zero hC\n have hSubLt : c - 1 < c := Nat.sub_lt hCPos (by d... | [
{
"name": "mulDiv512Up?_some_succ_of_not_dvd",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 17,
"n_chars": 756,
"n_subproofs": 1,
"n_tactics": 8,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 2,
"n_structural": 0,
"automation_only": fals... | 2 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -45,6 +45,24 @@
some (Verity.Core.Uint256.ofNat ((((a : Nat) * (b : Nat)) + ((c : Nat) - 1)) / (c : Nat))) := by
simp [Verity.Stdlib.Math.mulDiv512Up?, hC, Nat.not_lt.mpr hFit]
+private theorem nat_ceil_div_eq_div_add_one_of_not_dvd (n c : Nat) (hC : c ≠ 0)
+ (hNotDvd : ¬ c ∣ n) :
+ (n + (c - 1)) /... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_95 | bd67a89a18661dd2 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 95 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 9 | [
{
"theorem_name": "mulDiv512Up?_mul_ge",
"depth": 1,
"n_commands": 0,
"n_lines": 5,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rcases (mulDiv512Up?_eq_some_iff a b c out).mp h with ⟨hC, hFit, hOut⟩\n rw [← hOut]\n simp [Nat.mod_eq_of_lt (lt_mod... | [
{
"name": "mulDiv512Up?_eq_some_iff",
"text": "/-- The quotient returned by `mulDiv512Up?` is the full-precision rounded-up quotient. -/\ntheorem mulDiv512Up?_eq_some_iff (a b c out : Uint256) :\n mulDiv512Up? a b c = some out ↔\n (c : Nat) ≠ 0 ∧\n (((a : Nat) * (b : Nat)) + ((c : Nat) - 1)) / ... | [
{
"name": "mulDiv512Down?_le_up",
"fan_in": 1,
"n_deps_direct": 3,
"n_deps_transitive": 4,
"n_lines": 15,
"n_chars": 659,
"n_subproofs": 0,
"n_tactics": 8,
"cyclomatic": 3,
"n_automation": 1,
"n_rewrites": 1,
"n_structural": 4,
"automation_only": false,
"max_n... | 4 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -63,12 +63,38 @@
· have hFit : ((a : Nat) * (b : Nat)) / (c : Nat) ≤ MAX_UINT256 := Nat.le_of_not_gt hOverflow
simp [Verity.Stdlib.Math.mulDiv512Down?, hC, hOverflow, hFit]
+/-- The quotient returned by `mulDiv512Up?` is the full-precision rounded-up quotient. -/
+theorem mulDiv512Up?_eq_some_iff (a b ... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_96 | 69c10a80b8dbd001 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 96 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 9 | [
{
"theorem_name": "mulDiv512Up?_mul_ge",
"depth": 1,
"n_commands": 0,
"n_lines": 5,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rcases (mulDiv512Up?_eq_some_iff a b c out).mp h with ⟨hC, hFit, hOut⟩\n rw [← hOut]\n simp [Nat.mod_eq_of_lt (lt_mod... | [
{
"name": "mulDiv512Up?_eq_some_iff",
"text": "/-- The quotient returned by `mulDiv512Up?` is the full-precision rounded-up quotient. -/\ntheorem mulDiv512Up?_eq_some_iff (a b c out : Uint256) :\n mulDiv512Up? a b c = some out ↔\n (c : Nat) ≠ 0 ∧\n (((a : Nat) * (b : Nat)) + ((c : Nat) - 1)) / ... | [
{
"name": "mulDiv512Up?_le_down_add_one",
"fan_in": 1,
"n_deps_direct": 4,
"n_deps_transitive": 5,
"n_lines": 14,
"n_chars": 697,
"n_subproofs": 0,
"n_tactics": 7,
"cyclomatic": 3,
"n_automation": 1,
"n_rewrites": 1,
"n_structural": 3,
"automation_only": false,
... | 5 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -63,6 +63,25 @@
· have hFit : ((a : Nat) * (b : Nat)) / (c : Nat) ≤ MAX_UINT256 := Nat.le_of_not_gt hOverflow
simp [Verity.Stdlib.Math.mulDiv512Down?, hC, hOverflow, hFit]
+/-- The quotient returned by `mulDiv512Up?` is the full-precision rounded-up quotient. -/
+theorem mulDiv512Up?_eq_some_iff (a b c... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_97 | d1db67634acdee4e | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 97 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 9 | [
{
"theorem_name": "mulDiv512Up?_mul_ge",
"depth": 1,
"n_commands": 0,
"n_lines": 5,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rcases (mulDiv512Up?_eq_some_iff a b c out).mp h with ⟨hC, hFit, hOut⟩\n rw [← hOut]\n simp [Nat.mod_eq_of_lt (lt_mod... | [
{
"name": "mulDiv512Up?_eq_some_iff",
"text": "/-- The quotient returned by `mulDiv512Up?` is the full-precision rounded-up quotient. -/\ntheorem mulDiv512Up?_eq_some_iff (a b c out : Uint256) :\n mulDiv512Up? a b c = some out ↔\n (c : Nat) ≠ 0 ∧\n (((a : Nat) * (b : Nat)) + ((c : Nat) - 1)) / ... | [
{
"name": "mulDiv512Up?_eq_down_or_succ",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 7,
"n_lines": 13,
"n_chars": 545,
"n_subproofs": 2,
"n_tactics": 6,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": false,
... | 7 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -63,6 +63,25 @@
· have hFit : ((a : Nat) * (b : Nat)) / (c : Nat) ≤ MAX_UINT256 := Nat.le_of_not_gt hOverflow
simp [Verity.Stdlib.Math.mulDiv512Down?, hC, hOverflow, hFit]
+/-- The quotient returned by `mulDiv512Up?` is the full-precision rounded-up quotient. -/
+theorem mulDiv512Up?_eq_some_iff (a b c... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_98 | 911d77bfda2dda78 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 98 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 14 | [
{
"theorem_name": "mulDiv512Up?_eq_mulDivUp_of_no_overflow",
"depth": 1,
"n_commands": 0,
"n_lines": 12,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hCUint : c ≠ 0 := by\n intro h\n exact hC (by simpa using congrArg (fun x : Uint256 => ... | [
{
"name": "mulDivUp_nat_eq",
"text": "/-- `mulDivUp` agrees with exact ceil-division when the widened numerator does not wrap. -/\ntheorem mulDivUp_nat_eq (a b c : Uint256)\n (hC : c ≠ 0)\n (hNum : (a : Nat) * (b : Nat) + ((c : Nat) - 1) ≤ MAX_UINT256) :\n (mulDivUp a b c : Nat) = (((a : Nat) * (b ... | [
{
"name": "mulDivUp_le_mulDivDown_add_one",
"fan_in": 1,
"n_deps_direct": 3,
"n_deps_transitive": 5,
"n_lines": 16,
"n_chars": 694,
"n_subproofs": 2,
"n_tactics": 10,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 1,
"n_structural": 5,
"automation_only": false,... | 5 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -71,6 +71,46 @@
_ = dite ((c : Nat) = 0) (fun _ => 0) (fun _ => ((a : Nat) * (b : Nat)) / (c : Nat)) := by
simp [hZero]
+/-- `mulDivUp` agrees with exact ceil-division when the widened numerator does not wrap. -/
+theorem mulDivUp_nat_eq (a b c : Uint256)
+ (hC : c ≠ 0)
+ (hNum : (a : N... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_99 | 6969b5c741150cc2 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 99 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 14 | [
{
"theorem_name": "mulDiv512Up?_eq_mulDivUp_of_no_overflow",
"depth": 1,
"n_commands": 0,
"n_lines": 12,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hCUint : c ≠ 0 := by\n intro h\n exact hC (by simpa using congrArg (fun x : Uint256 => ... | [
{
"name": "mulDivUp_nat_eq",
"text": "/-- `mulDivUp` agrees with exact ceil-division when the widened numerator does not wrap. -/\ntheorem mulDivUp_nat_eq (a b c : Uint256)\n (hC : c ≠ 0)\n (hNum : (a : Nat) * (b : Nat) + ((c : Nat) - 1) ≤ MAX_UINT256) :\n (mulDivUp a b c : Nat) = (((a : Nat) * (b ... | [
{
"name": "mulDivUp_eq_mulDivDown_or_succ",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 7,
"n_lines": 13,
"n_chars": 578,
"n_subproofs": 2,
"n_tactics": 6,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": false,
... | 7 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -71,11 +71,61 @@
_ = dite ((c : Nat) = 0) (fun _ => 0) (fun _ => ((a : Nat) * (b : Nat)) / (c : Nat)) := by
simp [hZero]
+/-- `mulDivUp` agrees with exact ceil-division when the widened numerator does not wrap. -/
+theorem mulDivUp_nat_eq (a b c : Uint256)
+ (hC : c ≠ 0)
+ (hNum : (a : ... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_100 | fd2b7aa67f96235d | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 100 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 14 | [
{
"theorem_name": "mulDiv512Up?_eq_mulDivUp_of_no_overflow",
"depth": 1,
"n_commands": 0,
"n_lines": 12,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hCUint : c ≠ 0 := by\n intro h\n exact hC (by simpa using congrArg (fun x : Uint256 => ... | [
{
"name": "mulDivUp_nat_eq",
"text": "/-- `mulDivUp` agrees with exact ceil-division when the widened numerator does not wrap. -/\ntheorem mulDivUp_nat_eq (a b c : Uint256)\n (hC : c ≠ 0)\n (hNum : (a : Nat) * (b : Nat) + ((c : Nat) - 1) ≤ MAX_UINT256) :\n (mulDivUp a b c : Nat) = (((a : Nat) * (b ... | [
{
"name": "mulDivUp_eq_mulDivDown_of_dvd",
"fan_in": 0,
"n_deps_direct": 3,
"n_deps_transitive": 5,
"n_lines": 17,
"n_chars": 728,
"n_subproofs": 2,
"n_tactics": 10,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 1,
"n_structural": 5,
"automation_only": false,
... | 5 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -71,6 +71,46 @@
_ = dite ((c : Nat) = 0) (fun _ => 0) (fun _ => ((a : Nat) * (b : Nat)) / (c : Nat)) := by
simp [hZero]
+/-- `mulDivUp` agrees with exact ceil-division when the widened numerator does not wrap. -/
+theorem mulDivUp_nat_eq (a b c : Uint256)
+ (hC : c ≠ 0)
+ (hNum : (a : N... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_101 | 2d49e6dbe58b1746 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 101 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 14 | [
{
"theorem_name": "mulDiv512Up?_eq_mulDivUp_of_no_overflow",
"depth": 1,
"n_commands": 0,
"n_lines": 12,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hCUint : c ≠ 0 := by\n intro h\n exact hC (by simpa using congrArg (fun x : Uint256 => ... | [
{
"name": "mulDivUp_nat_eq",
"text": "/-- `mulDivUp` agrees with exact ceil-division when the widened numerator does not wrap. -/\ntheorem mulDivUp_nat_eq (a b c : Uint256)\n (hC : c ≠ 0)\n (hNum : (a : Nat) * (b : Nat) + ((c : Nat) - 1) ≤ MAX_UINT256) :\n (mulDivUp a b c : Nat) = (((a : Nat) * (b ... | [
{
"name": "mulDivUp_eq_mulDivDown_add_one_of_not_dvd",
"fan_in": 0,
"n_deps_direct": 3,
"n_deps_transitive": 5,
"n_lines": 17,
"n_chars": 786,
"n_subproofs": 2,
"n_tactics": 10,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 1,
"n_structural": 5,
"automation_on... | 5 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -71,6 +71,46 @@
_ = dite ((c : Nat) = 0) (fun _ => 0) (fun _ => ((a : Nat) * (b : Nat)) / (c : Nat)) := by
simp [hZero]
+/-- `mulDivUp` agrees with exact ceil-division when the widened numerator does not wrap. -/
+theorem mulDivUp_nat_eq (a b c : Uint256)
+ (hC : c ≠ 0)
+ (hNum : (a : N... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_102 | b2dc31df6f58b474 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 102 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 14 | [
{
"theorem_name": "mulDiv512Up?_eq_mulDivUp_of_no_overflow",
"depth": 1,
"n_commands": 0,
"n_lines": 12,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hCUint : c ≠ 0 := by\n intro h\n exact hC (by simpa using congrArg (fun x : Uint256 => ... | [
{
"name": "mulDivUp_nat_eq",
"text": "/-- `mulDivUp` agrees with exact ceil-division when the widened numerator does not wrap. -/\ntheorem mulDivUp_nat_eq (a b c : Uint256)\n (hC : c ≠ 0)\n (hNum : (a : Nat) * (b : Nat) + ((c : Nat) - 1) ≤ MAX_UINT256) :\n (mulDivUp a b c : Nat) = (((a : Nat) * (b ... | [
{
"name": "mulDivUp_pos",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 3,
"n_lines": 20,
"n_chars": 716,
"n_subproofs": 4,
"n_tactics": 12,
"cyclomatic": 1,
"n_automation": 3,
"n_rewrites": 1,
"n_structural": 3,
"automation_only": false,
"max_nesting"... | 3 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -48,13 +48,64 @@
set_option maxRecDepth 100000
+/-- `mulDivUp` agrees with exact ceil-division when the widened numerator does not wrap. -/
+theorem mulDivUp_nat_eq (a b c : Uint256)
+ (hC : c ≠ 0)
+ (hNum : (a : Nat) * (b : Nat) + ((c : Nat) - 1) ≤ MAX_UINT256) :
+ (mulDivUp a b c : Nat) = (((a : Nat)... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_103 | 09739eb81dabbf7c | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 103 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 14 | [
{
"theorem_name": "mulDiv512Up?_eq_mulDivUp_of_no_overflow",
"depth": 1,
"n_commands": 0,
"n_lines": 12,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hCUint : c ≠ 0 := by\n intro h\n exact hC (by simpa using congrArg (fun x : Uint256 => ... | [
{
"name": "mulDivUp_nat_eq",
"text": "/-- `mulDivUp` agrees with exact ceil-division when the widened numerator does not wrap. -/\ntheorem mulDivUp_nat_eq (a b c : Uint256)\n (hC : c ≠ 0)\n (hNum : (a : Nat) * (b : Nat) + ((c : Nat) - 1) ≤ MAX_UINT256) :\n (mulDivUp a b c : Nat) = (((a : Nat) * (b ... | [
{
"name": "mulDivUp_zero_left",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 3,
"n_lines": 18,
"n_chars": 724,
"n_subproofs": 3,
"n_tactics": 13,
"cyclomatic": 1,
"n_automation": 4,
"n_rewrites": 1,
"n_structural": 4,
"automation_only": false,
"max_ne... | 3 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -48,10 +48,62 @@
set_option maxRecDepth 100000
+/-- `mulDivUp` agrees with exact ceil-division when the widened numerator does not wrap. -/
+theorem mulDivUp_nat_eq (a b c : Uint256)
+ (hC : c ≠ 0)
+ (hNum : (a : Nat) * (b : Nat) + ((c : Nat) - 1) ≤ MAX_UINT256) :
+ (mulDivUp a b c : Nat) = (((a : Nat)... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_104 | d113659a46e8bd6e | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 104 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 14 | [
{
"theorem_name": "mulDiv512Up?_eq_mulDivUp_of_no_overflow",
"depth": 1,
"n_commands": 0,
"n_lines": 12,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hCUint : c ≠ 0 := by\n intro h\n exact hC (by simpa using congrArg (fun x : Uint256 => ... | [
{
"name": "mulDivUp_nat_eq",
"text": "/-- `mulDivUp` agrees with exact ceil-division when the widened numerator does not wrap. -/\ntheorem mulDivUp_nat_eq (a b c : Uint256)\n (hC : c ≠ 0)\n (hNum : (a : Nat) * (b : Nat) + ((c : Nat) - 1) ≤ MAX_UINT256) :\n (mulDivUp a b c : Nat) = (((a : Nat) * (b ... | [
{
"name": "mulDivUp_zero_right",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 3,
"n_lines": 18,
"n_chars": 726,
"n_subproofs": 3,
"n_tactics": 13,
"cyclomatic": 1,
"n_automation": 4,
"n_rewrites": 1,
"n_structural": 4,
"automation_only": false,
"max_n... | 3 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -48,10 +48,62 @@
set_option maxRecDepth 100000
+/-- `mulDivUp` agrees with exact ceil-division when the widened numerator does not wrap. -/
+theorem mulDivUp_nat_eq (a b c : Uint256)
+ (hC : c ≠ 0)
+ (hNum : (a : Nat) * (b : Nat) + ((c : Nat) - 1) ≤ MAX_UINT256) :
+ (mulDivUp a b c : Nat) = (((a : Nat)... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_105 | c449defb136756c5 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 105 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 14 | [
{
"theorem_name": "mulDiv512Up?_eq_mulDivUp_of_no_overflow",
"depth": 1,
"n_commands": 0,
"n_lines": 12,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hCUint : c ≠ 0 := by\n intro h\n exact hC (by simpa using congrArg (fun x : Uint256 => ... | [
{
"name": "mulDivUp_nat_eq",
"text": "/-- `mulDivUp` agrees with exact ceil-division when the widened numerator does not wrap. -/\ntheorem mulDivUp_nat_eq (a b c : Uint256)\n (hC : c ≠ 0)\n (hNum : (a : Nat) * (b : Nat) + ((c : Nat) - 1) ≤ MAX_UINT256) :\n (mulDivUp a b c : Nat) = (((a : Nat) * (b ... | [
{
"name": "mulDivUp_monotone_left",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 3,
"n_lines": 12,
"n_chars": 680,
"n_subproofs": 1,
"n_tactics": 5,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 1,
"n_structural": 2,
"automation_only": false,
"max... | 3 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -48,12 +48,56 @@
set_option maxRecDepth 100000
+/-- `mulDivUp` agrees with exact ceil-division when the widened numerator does not wrap. -/
+theorem mulDivUp_nat_eq (a b c : Uint256)
+ (hC : c ≠ 0)
+ (hNum : (a : Nat) * (b : Nat) + ((c : Nat) - 1) ≤ MAX_UINT256) :
+ (mulDivUp a b c : Nat) = (((a : Nat)... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_106 | 140274afd4725bcc | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 106 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 14 | [
{
"theorem_name": "mulDiv512Up?_eq_mulDivUp_of_no_overflow",
"depth": 1,
"n_commands": 0,
"n_lines": 12,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hCUint : c ≠ 0 := by\n intro h\n exact hC (by simpa using congrArg (fun x : Uint256 => ... | [
{
"name": "mulDivUp_nat_eq",
"text": "/-- `mulDivUp` agrees with exact ceil-division when the widened numerator does not wrap. -/\ntheorem mulDivUp_nat_eq (a b c : Uint256)\n (hC : c ≠ 0)\n (hNum : (a : Nat) * (b : Nat) + ((c : Nat) - 1) ≤ MAX_UINT256) :\n (mulDivUp a b c : Nat) = (((a : Nat) * (b ... | [
{
"name": "mulDivUp_monotone_right",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 3,
"n_lines": 12,
"n_chars": 680,
"n_subproofs": 1,
"n_tactics": 5,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 1,
"n_structural": 2,
"automation_only": false,
"ma... | 3 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -48,12 +48,56 @@
set_option maxRecDepth 100000
+/-- `mulDivUp` agrees with exact ceil-division when the widened numerator does not wrap. -/
+theorem mulDivUp_nat_eq (a b c : Uint256)
+ (hC : c ≠ 0)
+ (hNum : (a : Nat) * (b : Nat) + ((c : Nat) - 1) ≤ MAX_UINT256) :
+ (mulDivUp a b c : Nat) = (((a : Nat)... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_107 | e655998fcbf0b1da | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 107 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 14 | [
{
"theorem_name": "mulDiv512Up?_eq_mulDivUp_of_no_overflow",
"depth": 1,
"n_commands": 0,
"n_lines": 12,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hCUint : c ≠ 0 := by\n intro h\n exact hC (by simpa using congrArg (fun x : Uint256 => ... | [
{
"name": "mulDivUp_nat_eq",
"text": "/-- `mulDivUp` agrees with exact ceil-division when the widened numerator does not wrap. -/\ntheorem mulDivUp_nat_eq (a b c : Uint256)\n (hC : c ≠ 0)\n (hNum : (a : Nat) * (b : Nat) + ((c : Nat) - 1) ≤ MAX_UINT256) :\n (mulDivUp a b c : Nat) = (((a : Nat) * (b ... | [
{
"name": "mulDivUp_cancel_right",
"fan_in": 2,
"n_deps_direct": 1,
"n_deps_transitive": 3,
"n_lines": 25,
"n_chars": 1096,
"n_subproofs": 5,
"n_tactics": 19,
"cyclomatic": 1,
"n_automation": 4,
"n_rewrites": 1,
"n_structural": 7,
"automation_only": false,
"ma... | 3 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -48,11 +48,69 @@
set_option maxRecDepth 100000
+/-- `mulDivUp` agrees with exact ceil-division when the widened numerator does not wrap. -/
+theorem mulDivUp_nat_eq (a b c : Uint256)
+ (hC : c ≠ 0)
+ (hNum : (a : Nat) * (b : Nat) + ((c : Nat) - 1) ≤ MAX_UINT256) :
+ (mulDivUp a b c : Nat) = (((a : Nat)... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_108 | 8b9428727371a853 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 108 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 14 | [
{
"theorem_name": "mulDiv512Up?_eq_mulDivUp_of_no_overflow",
"depth": 1,
"n_commands": 0,
"n_lines": 12,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hCUint : c ≠ 0 := by\n intro h\n exact hC (by simpa using congrArg (fun x : Uint256 => ... | [
{
"name": "mulDivUp_nat_eq",
"text": "/-- `mulDivUp` agrees with exact ceil-division when the widened numerator does not wrap. -/\ntheorem mulDivUp_nat_eq (a b c : Uint256)\n (hC : c ≠ 0)\n (hNum : (a : Nat) * (b : Nat) + ((c : Nat) - 1) ≤ MAX_UINT256) :\n (mulDivUp a b c : Nat) = (((a : Nat) * (b ... | [
{
"name": "mulDivUp_cancel_left",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 4,
"n_lines": 10,
"n_chars": 455,
"n_subproofs": 1,
"n_tactics": 4,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": false,
"max_n... | 4 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -48,11 +48,69 @@
set_option maxRecDepth 100000
+/-- `mulDivUp` agrees with exact ceil-division when the widened numerator does not wrap. -/
+theorem mulDivUp_nat_eq (a b c : Uint256)
+ (hC : c ≠ 0)
+ (hNum : (a : Nat) * (b : Nat) + ((c : Nat) - 1) ≤ MAX_UINT256) :
+ (mulDivUp a b c : Nat) = (((a : Nat)... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_109 | ccede7a8fdd81a76 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 109 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 14 | [
{
"theorem_name": "mulDiv512Up?_eq_mulDivUp_of_no_overflow",
"depth": 1,
"n_commands": 0,
"n_lines": 12,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hCUint : c ≠ 0 := by\n intro h\n exact hC (by simpa using congrArg (fun x : Uint256 => ... | [
{
"name": "mulDivUp_nat_eq",
"text": "/-- `mulDivUp` agrees with exact ceil-division when the widened numerator does not wrap. -/\ntheorem mulDivUp_nat_eq (a b c : Uint256)\n (hC : c ≠ 0)\n (hNum : (a : Nat) * (b : Nat) + ((c : Nat) - 1) ≤ MAX_UINT256) :\n (mulDivUp a b c : Nat) = (((a : Nat) * (b ... | [
{
"name": "mulDivUp_mul_lt_add",
"fan_in": 2,
"n_deps_direct": 1,
"n_deps_transitive": 3,
"n_lines": 17,
"n_chars": 750,
"n_subproofs": 1,
"n_tactics": 11,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 1,
"n_structural": 5,
"automation_only": false,
"max_n... | 3 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -48,11 +48,61 @@
set_option maxRecDepth 100000
+/-- `mulDivUp` agrees with exact ceil-division when the widened numerator does not wrap. -/
+theorem mulDivUp_nat_eq (a b c : Uint256)
+ (hC : c ≠ 0)
+ (hNum : (a : Nat) * (b : Nat) + ((c : Nat) - 1) ≤ MAX_UINT256) :
+ (mulDivUp a b c : Nat) = (((a : Nat)... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_110 | 4c2e7cc5c96a53b7 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 110 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 14 | [
{
"theorem_name": "mulDiv512Up?_eq_mulDivUp_of_no_overflow",
"depth": 1,
"n_commands": 0,
"n_lines": 12,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hCUint : c ≠ 0 := by\n intro h\n exact hC (by simpa using congrArg (fun x : Uint256 => ... | [
{
"name": "mulDivUp_nat_eq",
"text": "/-- `mulDivUp` agrees with exact ceil-division when the widened numerator does not wrap. -/\ntheorem mulDivUp_nat_eq (a b c : Uint256)\n (hC : c ≠ 0)\n (hNum : (a : Nat) * (b : Nat) + ((c : Nat) - 1) ≤ MAX_UINT256) :\n (mulDivUp a b c : Nat) = (((a : Nat) * (b ... | [
{
"name": "mulDivUp_mul_ge",
"fan_in": 2,
"n_deps_direct": 1,
"n_deps_transitive": 3,
"n_lines": 18,
"n_chars": 713,
"n_subproofs": 3,
"n_tactics": 12,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 1,
"n_structural": 4,
"automation_only": false,
"max_nesti... | 3 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -48,11 +48,62 @@
set_option maxRecDepth 100000
+/-- `mulDivUp` agrees with exact ceil-division when the widened numerator does not wrap. -/
+theorem mulDivUp_nat_eq (a b c : Uint256)
+ (hC : c ≠ 0)
+ (hNum : (a : Nat) * (b : Nat) + ((c : Nat) - 1) ≤ MAX_UINT256) :
+ (mulDivUp a b c : Nat) = (((a : Nat)... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_111 | 1daf28f08fa98fe0 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 111 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 14 | [
{
"theorem_name": "mulDiv512Up?_eq_mulDivUp_of_no_overflow",
"depth": 1,
"n_commands": 0,
"n_lines": 12,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hCUint : c ≠ 0 := by\n intro h\n exact hC (by simpa using congrArg (fun x : Uint256 => ... | [
{
"name": "mulDivUp_nat_eq",
"text": "/-- `mulDivUp` agrees with exact ceil-division when the widened numerator does not wrap. -/\ntheorem mulDivUp_nat_eq (a b c : Uint256)\n (hC : c ≠ 0)\n (hNum : (a : Nat) * (b : Nat) + ((c : Nat) - 1) ≤ MAX_UINT256) :\n (mulDivUp a b c : Nat) = (((a : Nat) * (b ... | [
{
"name": "mulDivUp_antitone_divisor",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 5,
"n_lines": 32,
"n_chars": 1548,
"n_subproofs": 5,
"n_tactics": 24,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 0,
"n_structural": 4,
"automation_only": false,
... | 5 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -48,17 +48,78 @@
set_option maxRecDepth 100000
+/-- `mulDivUp` agrees with exact ceil-division when the widened numerator does not wrap. -/
+theorem mulDivUp_nat_eq (a b c : Uint256)
+ (hC : c ≠ 0)
+ (hNum : (a : Nat) * (b : Nat) + ((c : Nat) - 1) ≤ MAX_UINT256) :
+ (mulDivUp a b c : Nat) = (((a : Nat)... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_112 | 67d8054662b36b0f | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 112 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 15 | [
{
"theorem_name": "mulDivDown_mul_le",
"depth": 1,
"n_commands": 0,
"n_lines": 7,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n by_cases hZero : (c : Nat) = 0\n · rw [mulDivDown_nat_eq a b c hMul]\n simp [hZero]\n · rw [mulDivDown_nat_eq a b c ... | [
{
"name": "mulDivDown_nat_eq",
"text": "/-- `mulDivDown` agrees with exact natural-number division when the numerator does not wrap. -/\ntheorem mulDivDown_nat_eq (a b c : Uint256) (hMul : (a : Nat) * (b : Nat) ≤ MAX_UINT256) :\n (mulDivDown a b c : Nat) =\n if (c : Nat) = 0 then 0 else ((a : Nat) *... | [
{
"name": "wMulDown_nat_eq",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 3,
"n_lines": 8,
"n_chars": 308,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 1,
"n_structural": 0,
"automation_only": false,
"max_nesting... | 3 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -48,10 +48,35 @@
set_option maxRecDepth 100000
+/-- `mulDivDown` agrees with exact natural-number division when the numerator does not wrap. -/
+theorem mulDivDown_nat_eq (a b c : Uint256) (hMul : (a : Nat) * (b : Nat) ≤ MAX_UINT256) :
+ (mulDivDown a b c : Nat) =
+ if (c : Nat) = 0 then 0 else ((a : Na... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_113 | c43515af715f1f8e | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 113 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 15 | [
{
"theorem_name": "mulDivDown_mul_le",
"depth": 1,
"n_commands": 0,
"n_lines": 7,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n by_cases hZero : (c : Nat) = 0\n · rw [mulDivDown_nat_eq a b c hMul]\n simp [hZero]\n · rw [mulDivDown_nat_eq a b c ... | [
{
"name": "mulDivDown_nat_eq",
"text": "/-- `mulDivDown` agrees with exact natural-number division when the numerator does not wrap. -/\ntheorem mulDivDown_nat_eq (a b c : Uint256) (hMul : (a : Nat) * (b : Nat) ≤ MAX_UINT256) :\n (mulDivDown a b c : Nat) =\n if (c : Nat) = 0 then 0 else ((a : Nat) *... | [
{
"name": "wMulDown_mul_le",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 4,
"n_lines": 7,
"n_chars": 280,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,
"max_nesting"... | 4 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -48,12 +48,38 @@
set_option maxRecDepth 100000
+/-- `mulDivDown` agrees with exact natural-number division when the numerator does not wrap. -/
+theorem mulDivDown_nat_eq (a b c : Uint256) (hMul : (a : Nat) * (b : Nat) ≤ MAX_UINT256) :
+ (mulDivDown a b c : Nat) =
+ if (c : Nat) = 0 then 0 else ((a : Na... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_114 | 786454534db60e1b | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 114 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 15 | [
{
"theorem_name": "mulDivDown_mul_le",
"depth": 1,
"n_commands": 0,
"n_lines": 7,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n by_cases hZero : (c : Nat) = 0\n · rw [mulDivDown_nat_eq a b c hMul]\n simp [hZero]\n · rw [mulDivDown_nat_eq a b c ... | [
{
"name": "mulDivDown_nat_eq",
"text": "/-- `mulDivDown` agrees with exact natural-number division when the numerator does not wrap. -/\ntheorem mulDivDown_nat_eq (a b c : Uint256) (hMul : (a : Nat) * (b : Nat) ≤ MAX_UINT256) :\n (mulDivDown a b c : Nat) =\n if (c : Nat) = 0 then 0 else ((a : Nat) *... | [
{
"name": "wMulDown_pos",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 4,
"n_lines": 8,
"n_chars": 327,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,
"max_nesting": 2... | 4 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -48,12 +48,42 @@
set_option maxRecDepth 100000
+/-- `mulDivDown` agrees with exact natural-number division when the numerator does not wrap. -/
+theorem mulDivDown_nat_eq (a b c : Uint256) (hMul : (a : Nat) * (b : Nat) ≤ MAX_UINT256) :
+ (mulDivDown a b c : Nat) =
+ if (c : Nat) = 0 then 0 else ((a : Na... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_115 | f1b79345451f700d | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 115 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 15 | [
{
"theorem_name": "mulDivDown_mul_le",
"depth": 1,
"n_commands": 0,
"n_lines": 7,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n by_cases hZero : (c : Nat) = 0\n · rw [mulDivDown_nat_eq a b c hMul]\n simp [hZero]\n · rw [mulDivDown_nat_eq a b c ... | [
{
"name": "mulDivDown_nat_eq",
"text": "/-- `mulDivDown` agrees with exact natural-number division when the numerator does not wrap. -/\ntheorem mulDivDown_nat_eq (a b c : Uint256) (hMul : (a : Nat) * (b : Nat) ≤ MAX_UINT256) :\n (mulDivDown a b c : Nat) =\n if (c : Nat) = 0 then 0 else ((a : Nat) *... | [
{
"name": "wMulDown_zero_left",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 4,
"n_lines": 6,
"n_chars": 171,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": false,
"max_nest... | 4 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -48,13 +48,38 @@
set_option maxRecDepth 100000
+/-- `mulDivDown` agrees with exact natural-number division when the numerator does not wrap. -/
+theorem mulDivDown_nat_eq (a b c : Uint256) (hMul : (a : Nat) * (b : Nat) ≤ MAX_UINT256) :
+ (mulDivDown a b c : Nat) =
+ if (c : Nat) = 0 then 0 else ((a : Na... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_116 | 821b81daaca2673a | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 116 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 15 | [
{
"theorem_name": "mulDivDown_mul_le",
"depth": 1,
"n_commands": 0,
"n_lines": 7,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n by_cases hZero : (c : Nat) = 0\n · rw [mulDivDown_nat_eq a b c hMul]\n simp [hZero]\n · rw [mulDivDown_nat_eq a b c ... | [
{
"name": "mulDivDown_nat_eq",
"text": "/-- `mulDivDown` agrees with exact natural-number division when the numerator does not wrap. -/\ntheorem mulDivDown_nat_eq (a b c : Uint256) (hMul : (a : Nat) * (b : Nat) ≤ MAX_UINT256) :\n (mulDivDown a b c : Nat) =\n if (c : Nat) = 0 then 0 else ((a : Nat) *... | [
{
"name": "wMulDown_zero_right",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 4,
"n_lines": 6,
"n_chars": 174,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": false,
"max_nes... | 4 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -48,13 +48,38 @@
set_option maxRecDepth 100000
+/-- `mulDivDown` agrees with exact natural-number division when the numerator does not wrap. -/
+theorem mulDivDown_nat_eq (a b c : Uint256) (hMul : (a : Nat) * (b : Nat) ≤ MAX_UINT256) :
+ (mulDivDown a b c : Nat) =
+ if (c : Nat) = 0 then 0 else ((a : Na... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_117 | 429642c68c07267a | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 117 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 15 | [
{
"theorem_name": "mulDivDown_mul_le",
"depth": 1,
"n_commands": 0,
"n_lines": 7,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n by_cases hZero : (c : Nat) = 0\n · rw [mulDivDown_nat_eq a b c hMul]\n simp [hZero]\n · rw [mulDivDown_nat_eq a b c ... | [
{
"name": "mulDivDown_nat_eq",
"text": "/-- `mulDivDown` agrees with exact natural-number division when the numerator does not wrap. -/\ntheorem mulDivDown_nat_eq (a b c : Uint256) (hMul : (a : Nat) * (b : Nat) ≤ MAX_UINT256) :\n (mulDivDown a b c : Nat) =\n if (c : Nat) = 0 then 0 else ((a : Nat) *... | [
{
"name": "wMulDown_one_right",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 4,
"n_lines": 7,
"n_chars": 302,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,
"max_nesti... | 4 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -48,11 +48,41 @@
set_option maxRecDepth 100000
+/-- `mulDivDown` agrees with exact natural-number division when the numerator does not wrap. -/
+theorem mulDivDown_nat_eq (a b c : Uint256) (hMul : (a : Nat) * (b : Nat) ≤ MAX_UINT256) :
+ (mulDivDown a b c : Nat) =
+ if (c : Nat) = 0 then 0 else ((a : Na... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_118 | 3fe4db68f276e92e | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 118 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 15 | [
{
"theorem_name": "mulDivDown_mul_le",
"depth": 1,
"n_commands": 0,
"n_lines": 7,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n by_cases hZero : (c : Nat) = 0\n · rw [mulDivDown_nat_eq a b c hMul]\n simp [hZero]\n · rw [mulDivDown_nat_eq a b c ... | [
{
"name": "mulDivDown_nat_eq",
"text": "/-- `mulDivDown` agrees with exact natural-number division when the numerator does not wrap. -/\ntheorem mulDivDown_nat_eq (a b c : Uint256) (hMul : (a : Nat) * (b : Nat) ≤ MAX_UINT256) :\n (mulDivDown a b c : Nat) =\n if (c : Nat) = 0 then 0 else ((a : Nat) *... | [
{
"name": "wMulDown_one_left",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 4,
"n_lines": 7,
"n_chars": 299,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,
"max_nestin... | 4 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -48,11 +48,41 @@
set_option maxRecDepth 100000
+/-- `mulDivDown` agrees with exact natural-number division when the numerator does not wrap. -/
+theorem mulDivDown_nat_eq (a b c : Uint256) (hMul : (a : Nat) * (b : Nat) ≤ MAX_UINT256) :
+ (mulDivDown a b c : Nat) =
+ if (c : Nat) = 0 then 0 else ((a : Na... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
ablate_47fd08dea9e3_119 | 2522957c7a45cb97 | lean | lean | github.com/lfglabs-dev/verity | eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978 | Verity/Proofs/Stdlib/Math.lean | Math | 119 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 111 | 15 | [
{
"theorem_name": "mulDivDown_mul_le",
"depth": 1,
"n_commands": 0,
"n_lines": 7,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n by_cases hZero : (c : Nat) = 0\n · rw [mulDivDown_nat_eq a b c hMul]\n simp [hZero]\n · rw [mulDivDown_nat_eq a b c ... | [
{
"name": "mulDivDown_nat_eq",
"text": "/-- `mulDivDown` agrees with exact natural-number division when the numerator does not wrap. -/\ntheorem mulDivDown_nat_eq (a b c : Uint256) (hMul : (a : Nat) * (b : Nat) ≤ MAX_UINT256) :\n (mulDivDown a b c : Nat) =\n if (c : Nat) = 0 then 0 else ((a : Nat) *... | [
{
"name": "wMulDown_monotone_left",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 4,
"n_lines": 8,
"n_chars": 368,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,
"max_n... | 4 | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | /-
Correctness proofs for all safe arithmetic operations in the Math stdlib.
Covers safeAdd, safeSub, safeMul, and safeDiv: each operation returns
the correct result when within bounds and returns none otherwise.
-/
import Verity.Core
import Verity.Stdlib.Math
import Mathlib.Data.Complex.Exponential
import Math... | @@ -48,6 +48,29 @@
set_option maxRecDepth 100000
+/-- `mulDivDown` agrees with exact natural-number division when the numerator does not wrap. -/
+theorem mulDivDown_nat_eq (a b c : Uint256) (hMul : (a : Nat) * (b : Nat) ≤ MAX_UINT256) :
+ (mulDivDown a b c : Nat) =
+ if (c : Nat) = 0 then 0 else ((a : Nat... | {
"repo": "verity",
"git_repo": "github.com/lfglabs-dev/verity",
"revision": "eeb7a3abe85dd88cc8ee2ece5a77da9b2aba2978",
"lean_toolchain": "leanprover/lean4:v4.22.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemm... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.