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_af10f733b0b6_23 | be64241ffa54c6f3 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/Core/RoundOp.lean | RoundOp | 23 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 11 | [
{
"theorem_name": "roundup_strict_monotone",
"depth": 1,
"n_commands": 0,
"n_lines": 57,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intros\n let rnd : ℝ → ℤ := (⌈.⌉)\n have : rnd (0:ℝ) = 0 := by simp [rnd]\n rcases lt_or_ge (x:ℝ) 0 with hltx|... | [
{
"name": "round_fp_ne0_simp",
"text": "lemma round_fp_ne0_simp (rnd : ℤ → ℝ → ℤ) (x : ℝ) (hne : ¬x = 0) :\n @round_fp format rnd x = @round_fp_ne0 format rnd x := by\n simp [round_fp]\n intro; exfalso; apply hne; assumption\n\n",
"fan_in": 11,
"n_lines": 6,
"n_chars": 199,
"n_subproofs":... | [
{
"name": "rna_round_rne",
"fan_in": 0,
"n_deps_direct": 3,
"n_deps_transitive": 11,
"n_lines": 57,
"n_chars": 1460,
"n_subproofs": 4,
"n_tactics": 62,
"cyclomatic": 5,
"n_automation": 27,
"n_rewrites": 12,
"n_structural": 9,
"automation_only": false,
"max_nes... | 11 | import Flops.Core.Defs
import Flops.Core.Rounding
/-
this file defines rounding as a function
that takes a real value and returns a floating point, depending on the specific rounding mode
the rounding mode again is also a function that rounds the significand to integer
it satisfies a type class [ValidRound], which sho... | import Flops.Core.Defs
import Flops.Core.Rounding
/-
this file defines rounding as a function
that takes a real value and returns a floating point, depending on the specific rounding mode
the rounding mode again is also a function that rounds the significand to integer
it satisfies a type class [ValidRound], which sho... | @@ -181,6 +181,11 @@
if x = 0 then ⟨0, -format.dexp⟩ else
@round_fp_ne0 format rnd x
+lemma round_fp_ne0_simp (rnd : ℤ → ℝ → ℤ) (x : ℝ) (hne : ¬x = 0) :
+ @round_fp format rnd x = @round_fp_ne0 format rnd x := by
+ simp [round_fp]
+ intro; exfalso; apply hne; assumption
+
lemma valid_round_fp_bounded [h : F... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_af10f733b0b6_24 | c3fa7532d115218e | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/Core/RoundOp.lean | RoundOp | 24 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 11 | [
{
"theorem_name": "roundup_strict_monotone",
"depth": 1,
"n_commands": 0,
"n_lines": 57,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intros\n let rnd : ℝ → ℤ := (⌈.⌉)\n have : rnd (0:ℝ) = 0 := by simp [rnd]\n rcases lt_or_ge (x:ℝ) 0 with hltx|... | [
{
"name": "round_fp_ne0_simp",
"text": "lemma round_fp_ne0_simp (rnd : ℤ → ℝ → ℤ) (x : ℝ) (hne : ¬x = 0) :\n @round_fp format rnd x = @round_fp_ne0 format rnd x := by\n simp [round_fp]\n intro; exfalso; apply hne; assumption\n\n",
"fan_in": 11,
"n_lines": 6,
"n_chars": 199,
"n_subproofs":... | [
{
"name": "roundzero_roundzero",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 14,
"n_lines": 48,
"n_chars": 1281,
"n_subproofs": 2,
"n_tactics": 53,
"cyclomatic": 17,
"n_automation": 20,
"n_rewrites": 3,
"n_structural": 9,
"automation_only": false,
"m... | 14 | import Flops.Core.Defs
import Flops.Core.Rounding
/-
this file defines rounding as a function
that takes a real value and returns a floating point, depending on the specific rounding mode
the rounding mode again is also a function that rounds the significand to integer
it satisfies a type class [ValidRound], which sho... | import Flops.Core.Defs
import Flops.Core.Rounding
/-
this file defines rounding as a function
that takes a real value and returns a floating point, depending on the specific rounding mode
the rounding mode again is also a function that rounds the significand to integer
it satisfies a type class [ValidRound], which sho... | @@ -181,6 +181,11 @@
if x = 0 then ⟨0, -format.dexp⟩ else
@round_fp_ne0 format rnd x
+lemma round_fp_ne0_simp (rnd : ℤ → ℝ → ℤ) (x : ℝ) (hne : ¬x = 0) :
+ @round_fp format rnd x = @round_fp_ne0 format rnd x := by
+ simp [round_fp]
+ intro; exfalso; apply hne; assumption
+
lemma valid_round_fp_bounded [h : F... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_8c245264429b_0 | 407e025c79517eb9 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/Rounding.lean | Rounding | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 5 | 2 | [
{
"theorem_name": "round_to_precision_exists_bounded",
"depth": 1,
"n_commands": 0,
"n_lines": 7,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": "\n by\n simp [round_to_precision_eq]\n simp [round_to_fp_eq]\n exists @round_to_fp f rnd x; simp\n apply ca... | [
{
"name": "round_to_fp_eq",
"text": "lemma round_to_fp_eq (x : ℝ) (rnd : RoundingMode) :\n @round_to_precision_generic f x rnd = @round_to_fp f rnd x := by\n simp [round_to_precision_generic, round_to_fp]\n split <;> try simp\n\n",
"fan_in": 2,
"n_lines": 6,
"n_chars": 192,
"n_subproofs":... | [
{
"name": "round_to_precision_exists_bounded",
"fan_in": 0,
"n_deps_direct": 3,
"n_deps_transitive": 3,
"n_lines": 10,
"n_chars": 329,
"n_subproofs": 0,
"n_tactics": 7,
"cyclomatic": 1,
"n_automation": 3,
"n_rewrites": 0,
"n_structural": 3,
"automation_only": fals... | 3 | import Flops.Core.RoundOp
import Flops.Core.Sterbenz
import Flops.P3109.Defs
import Flops.P3109.MinMax
import Flops.P3109.RoundingAux
import Mathlib.Data.Real.Sign
import Mathlib.Order.BoundedOrder.Basic
inductive RoundingMode where
|RD|RU|RZ|RNE|RNA|RTO
|StochasticA (N:ℕ) (R:ℕ) (h : 0 ≤ R ∧ R < 2^N)
|Stochasti... | import Flops.Core.RoundOp
import Flops.Core.Sterbenz
import Flops.P3109.Defs
import Flops.P3109.MinMax
import Flops.P3109.RoundingAux
import Mathlib.Data.Real.Sign
import Mathlib.Order.BoundedOrder.Basic
inductive RoundingMode where
|RD|RU|RZ|RNE|RNA|RTO
|StochasticA (N:ℕ) (R:ℕ) (h : 0 ≤ R ∧ R < 2^N)
|Stochasti... | @@ -101,6 +101,11 @@
|.StochasticC N R h => @round_fp format (stochastic (.C N R h)) x
-- commuting between round_fp and round_to_fp
+lemma round_to_fp_eq (x : ℝ) (rnd : RoundingMode) :
+ @round_to_precision_generic f x rnd = @round_to_fp f rnd x := by
+ simp [round_to_precision_generic, round_to_fp]
+ split <... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_8c245264429b_1 | dd5a79e9f60673c6 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/Rounding.lean | Rounding | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 5 | 2 | [
{
"theorem_name": "encode_fnum_eq",
"depth": 1,
"n_commands": 0,
"n_lines": 15,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n unfold encode;\n split;\n · cases ‹Sum.inl ( r : EReal ) = Sum.inl none›;\n · cases ‹Sum.inl ( r : EReal ) = Sum.inl ( s... | [
{
"name": "value_set_significand_int",
"text": "lemma value_set_significand_int (v : ℝ) (h : Sum.inl (v : EReal) ∈ value_set f) (hv : v ≠ 0) :\n let E := max (Int.log 2 |v|) (1-f.bias) - ↑f.P + 1\n ∃ m : ℤ, (m : ℝ) = v * 2^(-E) := by\n obtain ⟨m, e, hm⟩ : ∃ m e : ℤ, (m : ℝ) * 2^e = v ∧ @canonical_p31... | [
{
"name": "encode_fnum_eq",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 19,
"n_chars": 723,
"n_subproofs": 1,
"n_tactics": 31,
"cyclomatic": 7,
"n_automation": 5,
"n_rewrites": 1,
"n_structural": 5,
"automation_only": false,
"max_nestin... | 1 | import Flops.Core.RoundOp
import Flops.Core.Sterbenz
import Flops.P3109.Defs
import Flops.P3109.MinMax
import Flops.P3109.RoundingAux
import Mathlib.Data.Real.Sign
import Mathlib.Order.BoundedOrder.Basic
inductive RoundingMode where
|RD|RU|RZ|RNE|RNA|RTO
|StochasticA (N:ℕ) (R:ℕ) (h : 0 ≤ R ∧ R < 2^N)
|Stochasti... | import Flops.Core.RoundOp
import Flops.Core.Sterbenz
import Flops.P3109.Defs
import Flops.P3109.MinMax
import Flops.P3109.RoundingAux
import Mathlib.Data.Real.Sign
import Mathlib.Order.BoundedOrder.Basic
inductive RoundingMode where
|RD|RU|RZ|RNE|RNA|RTO
|StochasticA (N:ℕ) (R:ℕ) (h : 0 ≤ R ∧ R < 2^N)
|Stochasti... | @@ -581,6 +581,26 @@
/-
When v is in the value set and v ≠ 0, v * 2^(-E) is an integer.
-/
+lemma value_set_significand_int (v : ℝ) (h : Sum.inl (v : EReal) ∈ value_set f) (hv : v ≠ 0) :
+ let E := max (Int.log 2 |v|) (1-f.bias) - ↑f.P + 1
+ ∃ m : ℤ, (m : ℝ) = v * 2^(-E) := by
+ obtain ⟨m, e, hm⟩ : ∃ m e : ℤ,... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_8c245264429b_2 | 70a086bd968b5dec | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/Rounding.lean | Rounding | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 5 | 2 | [
{
"theorem_name": "encode_fnum_eq",
"depth": 1,
"n_commands": 0,
"n_lines": 15,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n unfold encode;\n split;\n · cases ‹Sum.inl ( r : EReal ) = Sum.inl none›;\n · cases ‹Sum.inl ( r : EReal ) = Sum.inl ( s... | [
{
"name": "value_set_significand_int",
"text": "lemma value_set_significand_int (v : ℝ) (h : Sum.inl (v : EReal) ∈ value_set f) (hv : v ≠ 0) :\n let E := max (Int.log 2 |v|) (1-f.bias) - ↑f.P + 1\n ∃ m : ℤ, (m : ℝ) = v * 2^(-E) := by\n obtain ⟨m, e, hm⟩ : ∃ m e : ℤ, (m : ℝ) * 2^e = v ∧ @canonical_p31... | [
{
"name": "encode_real_to_ereal_eq",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 15,
"n_chars": 751,
"n_subproofs": 3,
"n_tactics": 19,
"cyclomatic": 1,
"n_automation": 4,
"n_rewrites": 4,
"n_structural": 2,
"automation_only": false,
"m... | 1 | import Flops.Core.RoundOp
import Flops.Core.Sterbenz
import Flops.P3109.Defs
import Flops.P3109.MinMax
import Flops.P3109.RoundingAux
import Mathlib.Data.Real.Sign
import Mathlib.Order.BoundedOrder.Basic
inductive RoundingMode where
|RD|RU|RZ|RNE|RNA|RTO
|StochasticA (N:ℕ) (R:ℕ) (h : 0 ≤ R ∧ R < 2^N)
|Stochasti... | import Flops.Core.RoundOp
import Flops.Core.Sterbenz
import Flops.P3109.Defs
import Flops.P3109.MinMax
import Flops.P3109.RoundingAux
import Mathlib.Data.Real.Sign
import Mathlib.Order.BoundedOrder.Basic
inductive RoundingMode where
|RD|RU|RZ|RNE|RNA|RTO
|StochasticA (N:ℕ) (R:ℕ) (h : 0 ≤ R ∧ R < 2^N)
|Stochasti... | @@ -581,6 +581,26 @@
/-
When v is in the value set and v ≠ 0, v * 2^(-E) is an integer.
-/
+lemma value_set_significand_int (v : ℝ) (h : Sum.inl (v : EReal) ∈ value_set f) (hv : v ≠ 0) :
+ let E := max (Int.log 2 |v|) (1-f.bias) - ↑f.P + 1
+ ∃ m : ℤ, (m : ℝ) = v * 2^(-E) := by
+ obtain ⟨m, e, hm⟩ : ∃ m e : ℤ,... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_8c245264429b_3 | abef282e9635118e | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/Rounding.lean | Rounding | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 5 | 2 | [
{
"theorem_name": "round_to_precision_exists_bounded",
"depth": 1,
"n_commands": 0,
"n_lines": 7,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": "\n by\n simp [round_to_precision_eq]\n simp [round_to_fp_eq]\n exists @round_to_fp f rnd x; simp\n apply ca... | [
{
"name": "round_to_fp_eq",
"text": "lemma round_to_fp_eq (x : ℝ) (rnd : RoundingMode) :\n @round_to_precision_generic f x rnd = @round_to_fp f rnd x := by\n simp [round_to_precision_generic, round_to_fp]\n split <;> try simp\n\n",
"fan_in": 2,
"n_lines": 6,
"n_chars": 192,
"n_subproofs":... | [
{
"name": "canonical_in_range_after_round_sat",
"fan_in": 0,
"n_deps_direct": 4,
"n_deps_transitive": 4,
"n_lines": 47,
"n_chars": 1834,
"n_subproofs": 5,
"n_tactics": 41,
"cyclomatic": 4,
"n_automation": 19,
"n_rewrites": 2,
"n_structural": 9,
"automation_only": ... | 4 | import Flops.Core.RoundOp
import Flops.Core.Sterbenz
import Flops.P3109.Defs
import Flops.P3109.MinMax
import Flops.P3109.RoundingAux
import Mathlib.Data.Real.Sign
import Mathlib.Order.BoundedOrder.Basic
inductive RoundingMode where
|RD|RU|RZ|RNE|RNA|RTO
|StochasticA (N:ℕ) (R:ℕ) (h : 0 ≤ R ∧ R < 2^N)
|Stochasti... | import Flops.Core.RoundOp
import Flops.Core.Sterbenz
import Flops.P3109.Defs
import Flops.P3109.MinMax
import Flops.P3109.RoundingAux
import Mathlib.Data.Real.Sign
import Mathlib.Order.BoundedOrder.Basic
inductive RoundingMode where
|RD|RU|RZ|RNE|RNA|RTO
|StochasticA (N:ℕ) (R:ℕ) (h : 0 ≤ R ∧ R < 2^N)
|Stochasti... | @@ -101,6 +101,11 @@
|.StochasticC N R h => @round_fp format (stochastic (.C N R h)) x
-- commuting between round_fp and round_to_fp
+lemma round_to_fp_eq (x : ℝ) (rnd : RoundingMode) :
+ @round_to_precision_generic f x rnd = @round_to_fp f rnd x := by
+ simp [round_to_precision_generic, round_to_fp]
+ split <... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_f73d6dd212a9_0 | 9bd81655415594f2 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/Core/Order.lean | Order | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 1 | 1 | [
{
"theorem_name": "exp_le_of_real_le_pos",
"depth": 1,
"n_commands": 0,
"n_lines": 7,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intros\n apply exp_le_of_real_le\n assumption\n assumption\n rewrite (occs := .pos [2]) [abs_of_pos (by assumptio... | [
{
"name": "exp_le_of_real_le",
"text": "lemma exp_le_of_real_le {a b : float 2} {f : Format} :\n @canonical 2 f a →\n @canonical 2 f b →\n |(a:ℝ)| ≤ |(b:ℝ)| →\n a.exp ≤ b.exp := by\n intro ha hb hle\n by_contra hlt; simp at hlt\n revert hle; simp [to_real]\n rewrite (occs := .pos [2]) [abs_of_pos (b... | [
{
"name": "exp_le_of_real_le_pos",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 13,
"n_chars": 307,
"n_subproofs": 0,
"n_tactics": 7,
"cyclomatic": 1,
"n_automation": 4,
"n_rewrites": 1,
"n_structural": 2,
"automation_only": false,
"max_... | 1 | import Flops.Core.Defs
import Flops.Core.RoundOp
lemma exp_le_of_real_le_pos {a b : float 2} {f : Format} :
@canonical 2 f a →
@canonical 2 f b →
|(a:ℝ)| ≤ (b:ℝ) →
(0:ℝ) < b →
a.exp ≤ b.exp := sorry
| import Flops.Core.Defs
import Flops.Core.RoundOp
lemma exp_le_of_real_le {a b : float 2} {f : Format} :
@canonical 2 f a →
@canonical 2 f b →
|(a:ℝ)| ≤ |(b:ℝ)| →
a.exp ≤ b.exp := by
intro ha hb hle
by_contra hlt; simp at hlt
revert hle; simp [to_real]
rewrite (occs := .pos [2]) [abs_of_pos (by apply zp... | @@ -1,10 +1,47 @@
import Flops.Core.Defs
import Flops.Core.RoundOp
+lemma exp_le_of_real_le {a b : float 2} {f : Format} :
+ @canonical 2 f a →
+ @canonical 2 f b →
+ |(a:ℝ)| ≤ |(b:ℝ)| →
+ a.exp ≤ b.exp := by
+ intro ha hb hle
+ by_contra hlt; simp at hlt
+ revert hle; simp [to_real]
+ rewrite (occs := .pos... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_26cb964982de_0 | 0d44fde86f5405e3 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/Bijection.lean | Bijection | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 15 | 2 | [
{
"theorem_name": "normal_encode_in_bound'",
"depth": 1,
"n_commands": 0,
"n_lines": 5,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": "\n fun hle hlt hemin hemax => normal_encode_bound_gen hle hlt hemin hemax\n (by have ⟨_, h2, h3⟩ := f.h_P; simp only [... | [
{
"name": "normal_encode_bound_gen",
"text": "private lemma normal_encode_bound_gen {m e : ℤ} {bound : ℕ}\n (hle : 2^(f.P-1) ≤ m) (hlt : m < 2^f.P)\n (hemin : f.emin_lsb ≤ e) (hemax : e ≤ f.emax_lsb)\n (hbound : f.P - 1 + f.W ≤ bound) :\n (m-2^(f.P-1)).toNat + (e+f.P-1+f.bias).toNat*2^(f.P-1) < 2^bound ... | [
{
"name": "normal_encode_in_bound'",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 9,
"n_chars": 410,
"n_subproofs": 3,
"n_tactics": 10,
"cyclomatic": 2,
"n_automation": 5,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": false,
"ma... | 1 | import Flops.P3109.Defs
import Flops.P3109.Emax
import Mathlib.Tactic.Contrapose
set_option maxHeartbeats 500000
variable {f : p3109_format}
namespace p3109_format
namespace p3109
/-
strategy: after we prove that n_to_p3109 is a bijection
enumerate 2^K with different format
generate corresponding p3109, output to a ... | import Flops.P3109.Defs
import Flops.P3109.Emax
import Mathlib.Tactic.Contrapose
set_option maxHeartbeats 500000
variable {f : p3109_format}
namespace p3109_format
namespace p3109
/-
strategy: after we prove that n_to_p3109 is a bijection
enumerate 2^K with different format
generate corresponding p3109, output to a ... | @@ -335,9 +335,33 @@
simp [this]; exact isLt)
(by assumption) (by assumption) (by assumption) (by assumption) (by assumption)
+private lemma normal_encode_bound_gen {m e : ℤ} {bound : ℕ}
+ (hle : 2^(f.P-1) ≤ m) (hlt : m < 2^f.P)
+ (hemin : f.emin_lsb ≤ e) (hemax : e ≤ f.emax_lsb)
+ (hbound : f.P - 1 ... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_26cb964982de_1 | 537d02f3c4eb7218 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/Bijection.lean | Bijection | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 15 | 2 | [
{
"theorem_name": "normal_encode_in_bound'",
"depth": 1,
"n_commands": 0,
"n_lines": 5,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": "\n fun hle hlt hemin hemax => normal_encode_bound_gen hle hlt hemin hemax\n (by have ⟨_, h2, h3⟩ := f.h_P; simp only [... | [
{
"name": "normal_encode_bound_gen",
"text": "private lemma normal_encode_bound_gen {m e : ℤ} {bound : ℕ}\n (hle : 2^(f.P-1) ≤ m) (hlt : m < 2^f.P)\n (hemin : f.emin_lsb ≤ e) (hemax : e ≤ f.emax_lsb)\n (hbound : f.P - 1 + f.W ≤ bound) :\n (m-2^(f.P-1)).toNat + (e+f.P-1+f.bias).toNat*2^(f.P-1) < 2^bound ... | [
{
"name": "normal_signed_encode_in_bound'",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 7,
"n_chars": 375,
"n_subproofs": 2,
"n_tactics": 5,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": false,
... | 1 | import Flops.P3109.Defs
import Flops.P3109.Emax
import Mathlib.Tactic.Contrapose
set_option maxHeartbeats 500000
variable {f : p3109_format}
namespace p3109_format
namespace p3109
/-
strategy: after we prove that n_to_p3109 is a bijection
enumerate 2^K with different format
generate corresponding p3109, output to a ... | import Flops.P3109.Defs
import Flops.P3109.Emax
import Mathlib.Tactic.Contrapose
set_option maxHeartbeats 500000
variable {f : p3109_format}
namespace p3109_format
namespace p3109
/-
strategy: after we prove that n_to_p3109 is a bijection
enumerate 2^K with different format
generate corresponding p3109, output to a ... | @@ -335,9 +335,31 @@
simp [this]; exact isLt)
(by assumption) (by assumption) (by assumption) (by assumption) (by assumption)
+private lemma normal_encode_bound_gen {m e : ℤ} {bound : ℕ}
+ (hle : 2^(f.P-1) ≤ m) (hlt : m < 2^f.P)
+ (hemin : f.emin_lsb ≤ e) (hemax : e ≤ f.emax_lsb)
+ (hbound : f.P - 1 ... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_26cb964982de_2 | ab1efd8db10d5394 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/Bijection.lean | Bijection | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 15 | 2 | [
{
"theorem_name": "normal_encode_in_bound",
"depth": 1,
"n_commands": 0,
"n_lines": 3,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro hm hn; obtain ⟨h1, h2, h3, h4⟩ := normal_p3109_to_bounds hm hn\n exact normal_encode_in_bound' h1 h2 h3 h4",
... | [
{
"name": "normal_p3109_to_bounds",
"text": "private lemma normal_p3109_to_bounds {m e : ℤ} (hm : 0 ≤ m) (hn : @normal_p3109 f ⟨m, e⟩) :\n 2^(f.P-1) ≤ m ∧ m < 2^f.P ∧ f.emin_lsb ≤ e ∧ e ≤ f.emax_lsb := by\n rcases hn with ⟨⟨hmlt, he1⟩, hmle, he2, _⟩\n simp at *; simp [to_format] at he1\n simp [vnum, to_... | [
{
"name": "normal_encode_in_bound",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 3,
"n_lines": 7,
"n_chars": 279,
"n_subproofs": 1,
"n_tactics": 4,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 3,
"automation_only": false,
"max_... | 3 | import Flops.P3109.Defs
import Flops.P3109.Emax
import Mathlib.Tactic.Contrapose
set_option maxHeartbeats 500000
variable {f : p3109_format}
namespace p3109_format
namespace p3109
/-
strategy: after we prove that n_to_p3109 is a bijection
enumerate 2^K with different format
generate corresponding p3109, output to a ... | import Flops.P3109.Defs
import Flops.P3109.Emax
import Mathlib.Tactic.Contrapose
set_option maxHeartbeats 500000
variable {f : p3109_format}
namespace p3109_format
namespace p3109
/-
strategy: after we prove that n_to_p3109 is a bijection
enumerate 2^K with different format
generate corresponding p3109, output to a ... | @@ -363,9 +363,24 @@
· have := h2 hs; simp; omega
· have := h3 hs; simp; omega)
+private lemma normal_p3109_to_bounds {m e : ℤ} (hm : 0 ≤ m) (hn : @normal_p3109 f ⟨m, e⟩) :
+ 2^(f.P-1) ≤ m ∧ m < 2^f.P ∧ f.emin_lsb ≤ e ∧ e ≤ f.emax_lsb := by
+ rcases hn with ⟨⟨hmlt, he1⟩, hmle, he2, _⟩
+ simp at *... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_26cb964982de_3 | bf1d46b32029c93b | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/Bijection.lean | Bijection | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 15 | 2 | [
{
"theorem_name": "subnormal_encode_in_bound",
"depth": 1,
"n_commands": 0,
"n_lines": 9,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rintro hm ⟨_, _, hlt⟩; zify; simp\n simp [vnum, to_format, abs_mul] at hlt\n rw [abs_of_nonneg hm, two_mul_pow_... | [
{
"name": "two_mul_pow_lt",
"text": "lemma two_mul_pow_lt {m : ℤ} :\n 2 * m < 2^f.P ↔ m < 2^(f.P-1) := by\n have _ := f.h_P\n rewrite (occs := .pos [1]) [<-Nat.sub_add_cancel (n := f.P) (m := 1) (by omega)]\n simp [pow_add, mul_two, two_mul]\n omega\n\n",
"fan_in": 2,
"n_lines": 8,
"n_chars... | [
{
"name": "subnormal_encode_in_bound",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 12,
"n_chars": 431,
"n_subproofs": 3,
"n_tactics": 15,
"cyclomatic": 3,
"n_automation": 5,
"n_rewrites": 3,
"n_structural": 3,
"automation_only": false,
... | 1 | import Flops.P3109.Defs
import Flops.P3109.Emax
import Mathlib.Tactic.Contrapose
set_option maxHeartbeats 500000
variable {f : p3109_format}
namespace p3109_format
namespace p3109
/-
strategy: after we prove that n_to_p3109 is a bijection
enumerate 2^K with different format
generate corresponding p3109, output to a ... | import Flops.P3109.Defs
import Flops.P3109.Emax
import Mathlib.Tactic.Contrapose
set_option maxHeartbeats 500000
variable {f : p3109_format}
lemma two_mul_pow_lt {m : ℤ} :
2 * m < 2^f.P ↔ m < 2^(f.P-1) := by
have _ := f.h_P
rewrite (occs := .pos [1]) [<-Nat.sub_add_cancel (n := f.P) (m := 1) (by omega)]
simp... | @@ -6,6 +6,13 @@
variable {f : p3109_format}
+lemma two_mul_pow_lt {m : ℤ} :
+ 2 * m < 2^f.P ↔ m < 2^(f.P-1) := by
+ have _ := f.h_P
+ rewrite (occs := .pos [1]) [<-Nat.sub_add_cancel (n := f.P) (m := 1) (by omega)]
+ simp [pow_add, mul_two, two_mul]
+ omega
+
namespace p3109_format
namespace p3109
/-
@@ -... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_26cb964982de_4 | 1c66becfcaf59d44 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/Bijection.lean | Bijection | 4 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 15 | 2 | [
{
"theorem_name": "subnormal_encode_in_bound",
"depth": 1,
"n_commands": 0,
"n_lines": 9,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rintro hm ⟨_, _, hlt⟩; zify; simp\n simp [vnum, to_format, abs_mul] at hlt\n rw [abs_of_nonneg hm, two_mul_pow_... | [
{
"name": "two_mul_pow_lt",
"text": "lemma two_mul_pow_lt {m : ℤ} :\n 2 * m < 2^f.P ↔ m < 2^(f.P-1) := by\n have _ := f.h_P\n rewrite (occs := .pos [1]) [<-Nat.sub_add_cancel (n := f.P) (m := 1) (by omega)]\n simp [pow_add, mul_two, two_mul]\n omega\n\n",
"fan_in": 2,
"n_lines": 8,
"n_chars... | [
{
"name": "subnormal_signed_encode_in_bound",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 10,
"n_chars": 413,
"n_subproofs": 2,
"n_tactics": 12,
"cyclomatic": 2,
"n_automation": 4,
"n_rewrites": 3,
"n_structural": 2,
"automation_only": fals... | 1 | import Flops.P3109.Defs
import Flops.P3109.Emax
import Mathlib.Tactic.Contrapose
set_option maxHeartbeats 500000
variable {f : p3109_format}
namespace p3109_format
namespace p3109
/-
strategy: after we prove that n_to_p3109 is a bijection
enumerate 2^K with different format
generate corresponding p3109, output to a ... | import Flops.P3109.Defs
import Flops.P3109.Emax
import Mathlib.Tactic.Contrapose
set_option maxHeartbeats 500000
variable {f : p3109_format}
lemma two_mul_pow_lt {m : ℤ} :
2 * m < 2^f.P ↔ m < 2^(f.P-1) := by
have _ := f.h_P
rewrite (occs := .pos [1]) [<-Nat.sub_add_cancel (n := f.P) (m := 1) (by omega)]
simp... | @@ -6,6 +6,13 @@
variable {f : p3109_format}
+lemma two_mul_pow_lt {m : ℤ} :
+ 2 * m < 2^f.P ↔ m < 2^(f.P-1) := by
+ have _ := f.h_P
+ rewrite (occs := .pos [1]) [<-Nat.sub_add_cancel (n := f.P) (m := 1) (by omega)]
+ simp [pow_add, mul_two, two_mul]
+ omega
+
namespace p3109_format
namespace p3109
/-
@@ -... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_26cb964982de_5 | 3d6da54c92a47ec2 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/Bijection.lean | Bijection | 5 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 15 | 2 | [
{
"theorem_name": "normal_encode_in_bound",
"depth": 1,
"n_commands": 0,
"n_lines": 3,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro hm hn; obtain ⟨h1, h2, h3, h4⟩ := normal_p3109_to_bounds hm hn\n exact normal_encode_in_bound' h1 h2 h3 h4",
... | [
{
"name": "normal_p3109_to_bounds",
"text": "private lemma normal_p3109_to_bounds {m e : ℤ} (hm : 0 ≤ m) (hn : @normal_p3109 f ⟨m, e⟩) :\n 2^(f.P-1) ≤ m ∧ m < 2^f.P ∧ f.emin_lsb ≤ e ∧ e ≤ f.emax_lsb := by\n rcases hn with ⟨⟨hmlt, he1⟩, hmle, he2, _⟩\n simp at *; simp [to_format] at he1\n simp [vnum, to_... | [
{
"name": "normal_signed_encode_in_bound",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 3,
"n_lines": 7,
"n_chars": 321,
"n_subproofs": 1,
"n_tactics": 4,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 3,
"automation_only": false,
... | 3 | import Flops.P3109.Defs
import Flops.P3109.Emax
import Mathlib.Tactic.Contrapose
set_option maxHeartbeats 500000
variable {f : p3109_format}
namespace p3109_format
namespace p3109
/-
strategy: after we prove that n_to_p3109 is a bijection
enumerate 2^K with different format
generate corresponding p3109, output to a ... | import Flops.P3109.Defs
import Flops.P3109.Emax
import Mathlib.Tactic.Contrapose
set_option maxHeartbeats 500000
variable {f : p3109_format}
namespace p3109_format
namespace p3109
/-
strategy: after we prove that n_to_p3109 is a bijection
enumerate 2^K with different format
generate corresponding p3109, output to a ... | @@ -361,9 +361,24 @@
fun hs hle hlt hemin hemax => normal_encode_bound_gen hle hlt hemin hemax
(by have ⟨_, h2, _⟩ := f.h_P; simp only [W, hs]; have := h2 hs; omega)
+private lemma normal_p3109_to_bounds {m e : ℤ} (hm : 0 ≤ m) (hn : @normal_p3109 f ⟨m, e⟩) :
+ 2^(f.P-1) ≤ m ∧ m < 2^f.P ∧ f.emin_lsb ≤ e ∧ e ≤... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_26cb964982de_6 | c68174d5cc1b55b5 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/Bijection.lean | Bijection | 6 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 15 | 2 | [
{
"theorem_name": "normal_encode_in_bound",
"depth": 1,
"n_commands": 0,
"n_lines": 3,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro hm hn; obtain ⟨h1, h2, h3, h4⟩ := normal_p3109_to_bounds hm hn\n exact normal_encode_in_bound' h1 h2 h3 h4",
... | [
{
"name": "normal_p3109_to_bounds",
"text": "private lemma normal_p3109_to_bounds {m e : ℤ} (hm : 0 ≤ m) (hn : @normal_p3109 f ⟨m, e⟩) :\n 2^(f.P-1) ≤ m ∧ m < 2^f.P ∧ f.emin_lsb ≤ e ∧ e ≤ f.emax_lsb := by\n rcases hn with ⟨⟨hmlt, he1⟩, hmle, he2, _⟩\n simp at *; simp [to_format] at he1\n simp [vnum, to_... | [
{
"name": "normal_pos_surj",
"fan_in": 1,
"n_deps_direct": 5,
"n_deps_transitive": 6,
"n_lines": 402,
"n_chars": 13550,
"n_subproofs": 85,
"n_tactics": 462,
"cyclomatic": 31,
"n_automation": 286,
"n_rewrites": 96,
"n_structural": 42,
"automation_only": false,
... | 5 | import Flops.P3109.Defs
import Flops.P3109.Emax
import Mathlib.Tactic.Contrapose
set_option maxHeartbeats 500000
variable {f : p3109_format}
lemma le_two_mul_pow {m : ℤ} :
2^f.P ≤ 2 * m ↔ 2^(f.P-1) ≤ m := by
have _ := f.h_P
rewrite (occs := .pos [1]) [<-Nat.sub_add_cancel (n := f.P) (m := 1) (by omega)]
simp... | import Flops.P3109.Defs
import Flops.P3109.Emax
import Mathlib.Tactic.Contrapose
set_option maxHeartbeats 500000
variable {f : p3109_format}
lemma le_two_mul_pow {m : ℤ} :
2^f.P ≤ 2 * m ↔ 2^(f.P-1) ≤ m := by
have _ := f.h_P
rewrite (occs := .pos [1]) [<-Nat.sub_add_cancel (n := f.P) (m := 1) (by omega)]
simp... | @@ -383,9 +383,24 @@
· have := h2 hs; simp; omega
· have := h3 hs; simp; omega)
+private lemma normal_p3109_to_bounds {m e : ℤ} (hm : 0 ≤ m) (hn : @normal_p3109 f ⟨m, e⟩) :
+ 2^(f.P-1) ≤ m ∧ m < 2^f.P ∧ f.emin_lsb ≤ e ∧ e ≤ f.emax_lsb := by
+ rcases hn with ⟨⟨hmlt, he1⟩, hmle, he2, _⟩
+ simp at *... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_26cb964982de_7 | 85ce6f71abbe1dc7 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/Bijection.lean | Bijection | 7 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 15 | 2 | [
{
"theorem_name": "subnormal_encode_in_bound",
"depth": 1,
"n_commands": 0,
"n_lines": 9,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rintro hm ⟨_, _, hlt⟩; zify; simp\n simp [vnum, to_format, abs_mul] at hlt\n rw [abs_of_nonneg hm, two_mul_pow_... | [
{
"name": "two_mul_pow_lt",
"text": "lemma two_mul_pow_lt {m : ℤ} :\n 2 * m < 2^f.P ↔ m < 2^(f.P-1) := by\n have _ := f.h_P\n rewrite (occs := .pos [1]) [<-Nat.sub_add_cancel (n := f.P) (m := 1) (by omega)]\n simp [pow_add, mul_two, two_mul]\n omega\n\n",
"fan_in": 2,
"n_lines": 8,
"n_chars... | [
{
"name": "subnormal_pos_surj",
"fan_in": 1,
"n_deps_direct": 3,
"n_deps_transitive": 2,
"n_lines": 49,
"n_chars": 2818,
"n_subproofs": 6,
"n_tactics": 107,
"cyclomatic": 23,
"n_automation": 57,
"n_rewrites": 12,
"n_structural": 16,
"automation_only": false,
"... | 1 | import Flops.P3109.Defs
import Flops.P3109.Emax
import Mathlib.Tactic.Contrapose
set_option maxHeartbeats 500000
variable {f : p3109_format}
namespace p3109_format
namespace p3109
/-
strategy: after we prove that n_to_p3109 is a bijection
enumerate 2^K with different format
generate corresponding p3109, output to a ... | import Flops.P3109.Defs
import Flops.P3109.Emax
import Mathlib.Tactic.Contrapose
set_option maxHeartbeats 500000
variable {f : p3109_format}
lemma two_mul_pow_lt {m : ℤ} :
2 * m < 2^f.P ↔ m < 2^(f.P-1) := by
have _ := f.h_P
rewrite (occs := .pos [1]) [<-Nat.sub_add_cancel (n := f.P) (m := 1) (by omega)]
simp... | @@ -6,6 +6,13 @@
variable {f : p3109_format}
+lemma two_mul_pow_lt {m : ℤ} :
+ 2 * m < 2^f.P ↔ m < 2^(f.P-1) := by
+ have _ := f.h_P
+ rewrite (occs := .pos [1]) [<-Nat.sub_add_cancel (n := f.P) (m := 1) (by omega)]
+ simp [pow_add, mul_two, two_mul]
+ omega
+
namespace p3109_format
namespace p3109
/-
@@ -... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_26cb964982de_8 | 3aa036d281dc7ae2 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/Bijection.lean | Bijection | 8 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 15 | 1 | [
{
"theorem_name": "finite_surj_pos",
"depth": 1,
"n_commands": 0,
"n_lines": 19,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n cases x <;> simp [is_finite]\n have hk := f.h_K\n have hp := f.h_P\n simp [fnum]\n expose_names\n rcases h\n intro h... | [
{
"name": "normal_pos_surj",
"text": "theorem normal_pos_surj {m e : ℤ} (hs : f.s = .unsigned → 0 ≤ m) (hn : @normal_p3109 f ⟨m, e⟩) (h : 0 ≤ m) :\n @n_to_p3109 f ⟨(m-2^(f.P-1)).toNat + (e+f.P-1+f.bias).toNat*2^(f.P-1), by\n apply normal_encode_in_bound h hn\n ⟩ =\n .p3109_finite m e hs (Or.inl hn) ... | [
{
"name": "finite_surj_pos",
"fan_in": 1,
"n_deps_direct": 4,
"n_deps_transitive": 10,
"n_lines": 24,
"n_chars": 590,
"n_subproofs": 2,
"n_tactics": 21,
"cyclomatic": 4,
"n_automation": 7,
"n_rewrites": 0,
"n_structural": 10,
"automation_only": false,
"max_nes... | 8 | import Flops.P3109.Defs
import Flops.P3109.Emax
import Mathlib.Tactic.Contrapose
set_option maxHeartbeats 500000
variable {f : p3109_format}
lemma le_two_mul_pow {m : ℤ} :
2^f.P ≤ 2 * m ↔ 2^(f.P-1) ≤ m := by
have _ := f.h_P
rewrite (occs := .pos [1]) [<-Nat.sub_add_cancel (n := f.P) (m := 1) (by omega)]
simp... | import Flops.P3109.Defs
import Flops.P3109.Emax
import Mathlib.Tactic.Contrapose
set_option maxHeartbeats 500000
variable {f : p3109_format}
lemma le_two_mul_pow {m : ℤ} :
2^f.P ≤ 2 * m ↔ 2^(f.P-1) ≤ m := by
have _ := f.h_P
rewrite (occs := .pos [1]) [<-Nat.sub_add_cancel (n := f.P) (m := 1) (by omega)]
simp... | @@ -420,6 +420,407 @@
· have := h2 hs; omega
· have := h3 hs; omega
+theorem normal_pos_surj {m e : ℤ} (hs : f.s = .unsigned → 0 ≤ m) (hn : @normal_p3109 f ⟨m, e⟩) (h : 0 ≤ m) :
+ @n_to_p3109 f ⟨(m-2^(f.P-1)).toNat + (e+f.P-1+f.bias).toNat*2^(f.P-1), by
+ apply normal_encode_in_bound h hn
+ ⟩ =
+ .p3109... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_26cb964982de_9 | 42d681459621099d | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/Bijection.lean | Bijection | 9 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 15 | 1 | [
{
"theorem_name": "finite_surj_pos",
"depth": 1,
"n_commands": 0,
"n_lines": 19,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n cases x <;> simp [is_finite]\n have hk := f.h_K\n have hp := f.h_P\n simp [fnum]\n expose_names\n rcases h\n intro h... | [
{
"name": "subnormal_pos_surj",
"text": "theorem subnormal_pos_surj {m e : ℤ} (hs : f.s = .unsigned → 0 ≤ m) (hsub : @subnormal 2 f.to_format ⟨m, e⟩) (hle : 0 ≤ m) :\n @n_to_p3109 f ⟨m.toNat, by exact subnormal_encode_in_bound hle hsub⟩ = .p3109_finite m e hs (Or.inr hsub) := by\n cases hsub;\n unfold n_... | [
{
"name": "finite_surj",
"fan_in": 1,
"n_deps_direct": 3,
"n_deps_transitive": 13,
"n_lines": 48,
"n_chars": 2370,
"n_subproofs": 6,
"n_tactics": 87,
"cyclomatic": 18,
"n_automation": 25,
"n_rewrites": 5,
"n_structural": 24,
"automation_only": false,
"max_nest... | 11 | import Flops.P3109.Defs
import Flops.P3109.Emax
import Mathlib.Tactic.Contrapose
set_option maxHeartbeats 500000
variable {f : p3109_format}
lemma le_two_mul_pow {m : ℤ} :
2^f.P ≤ 2 * m ↔ 2^(f.P-1) ≤ m := by
have _ := f.h_P
rewrite (occs := .pos [1]) [<-Nat.sub_add_cancel (n := f.P) (m := 1) (by omega)]
simp... | import Flops.P3109.Defs
import Flops.P3109.Emax
import Mathlib.Tactic.Contrapose
set_option maxHeartbeats 500000
variable {f : p3109_format}
lemma le_two_mul_pow {m : ℤ} :
2^f.P ≤ 2 * m ↔ 2^(f.P-1) ≤ m := by
have _ := f.h_P
rewrite (occs := .pos [1]) [<-Nat.sub_add_cancel (n := f.P) (m := 1) (by omega)]
simp... | @@ -836,10 +836,76 @@
rw [Int.mul_add_ediv_right _ _ (by simp), hmeq]
omega
+theorem subnormal_pos_surj {m e : ℤ} (hs : f.s = .unsigned → 0 ≤ m) (hsub : @subnormal 2 f.to_format ⟨m, e⟩) (hle : 0 ≤ m) :
+ @n_to_p3109 f ⟨m.toNat, by exact subnormal_encode_in_bound hle hsub⟩ = .p3109_finite m e hs (Or.inr hsub) :... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_26cb964982de_10 | 3f5f97a37267936b | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/Bijection.lean | Bijection | 10 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 15 | 1 | [
{
"theorem_name": "finite_surj",
"depth": 1,
"n_commands": 0,
"n_lines": 44,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro hx_finite;\n by_cases h : f.s = .signed;\n · by_cases h_nonneg : 0 ≤ x.fnum;\n · exact finite_surj_pos hx_finite h_... | [
{
"name": "finite_surj_pos",
"text": "theorem finite_surj_pos {x : p3109 f} :\n x.is_finite →\n 0 ≤ x.fnum →\n ∃(n : Fin (2^f.K)), @n_to_p3109 f n = x := by\n cases x <;> simp [is_finite]\n have hk := f.h_K\n have hp := f.h_P\n simp [fnum]\n expose_names\n rcases h\n intro h\n -- normal\n exists... | [
{
"name": "bi_surj",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 14,
"n_lines": 35,
"n_chars": 1715,
"n_subproofs": 1,
"n_tactics": 66,
"cyclomatic": 12,
"n_automation": 31,
"n_rewrites": 4,
"n_structural": 17,
"automation_only": false,
"max_nesting"... | 12 | import Flops.P3109.Defs
import Flops.P3109.Emax
import Mathlib.Tactic.Contrapose
set_option maxHeartbeats 500000
variable {f : p3109_format}
lemma le_two_mul_pow {m : ℤ} :
2^f.P ≤ 2 * m ↔ 2^(f.P-1) ≤ m := by
have _ := f.h_P
rewrite (occs := .pos [1]) [<-Nat.sub_add_cancel (n := f.P) (m := 1) (by omega)]
simp... | import Flops.P3109.Defs
import Flops.P3109.Emax
import Mathlib.Tactic.Contrapose
set_option maxHeartbeats 500000
variable {f : p3109_format}
lemma le_two_mul_pow {m : ℤ} :
2^f.P ≤ 2 * m ↔ 2^(f.P-1) ≤ m := by
have _ := f.h_P
rewrite (occs := .pos [1]) [<-Nat.sub_add_cancel (n := f.P) (m := 1) (by omega)]
simp... | @@ -884,13 +884,79 @@
· rw [ max_eq_left hle ] at *;
exact False.elim <| ‹¬m / 2 ^ ( f.P - 1 ) = 0› <| Int.ediv_eq_zero_of_lt ( by linarith ) <| by linarith;
+theorem finite_surj_pos {x : p3109 f} :
+ x.is_finite →
+ 0 ≤ x.fnum →
+ ∃(n : Fin (2^f.K)), @n_to_p3109 f n = x := by
+ cases x <;> simp [is_f... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_26cb964982de_11 | 95d84d0198da21e1 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/Bijection.lean | Bijection | 11 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 15 | 1 | [
{
"theorem_name": "finite_surj",
"depth": 1,
"n_commands": 0,
"n_lines": 44,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro hx_finite;\n by_cases h : f.s = .signed;\n · by_cases h_nonneg : 0 ≤ x.fnum;\n · exact finite_surj_pos hx_finite h_... | [
{
"name": "opp_opp_id",
"text": "lemma opp_opp_id {x : p3109 f} (hs : f.s = .signed) :\n opp (opp x hs) hs = x := by\n cases x <;> simp [opp]\n\n",
"fan_in": 1,
"n_lines": 5,
"n_chars": 110,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 3,
"n_automation": 1,
"n_rewrites":... | [
{
"name": "bi",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 16,
"n_lines": 3,
"n_chars": 74,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": false,
"max_nesting": 1
}
] | 14 | import Flops.P3109.Defs
import Flops.P3109.Emax
import Mathlib.Tactic.Contrapose
set_option maxHeartbeats 500000
variable {f : p3109_format}
lemma le_two_mul_pow {m : ℤ} :
2^f.P ≤ 2 * m ↔ 2^(f.P-1) ≤ m := by
have _ := f.h_P
rewrite (occs := .pos [1]) [<-Nat.sub_add_cancel (n := f.P) (m := 1) (by omega)]
simp... | import Flops.P3109.Defs
import Flops.P3109.Emax
import Mathlib.Tactic.Contrapose
set_option maxHeartbeats 500000
variable {f : p3109_format}
lemma le_two_mul_pow {m : ℤ} :
2^f.P ≤ 2 * m ↔ 2^(f.P-1) ≤ m := by
have _ := f.h_P
rewrite (occs := .pos [1]) [<-Nat.sub_add_cancel (n := f.P) (m := 1) (by omega)]
simp... | @@ -907,6 +907,10 @@
apply subnormal_pos_surj
assumption; assumption
+lemma opp_opp_id {x : p3109 f} (hs : f.s = .signed) :
+ opp (opp x hs) hs = x := by
+ cases x <;> simp [opp]
+
theorem finite_surj {x : p3109 f} :
x.is_finite →
∃(n : Fin (2^f.K)), @n_to_p3109 f n = x := by
@@ -936,7 +940,19 @@
... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_8b40c180b77c_0 | f7ccfcb737a98dd5 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/Defs.lean | Defs | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 1 | 1 | [
{
"theorem_name": "canonical_p3109_negate",
"depth": 1,
"n_commands": 0,
"n_lines": 12,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro can\n rcases can with _|⟨_, _, hlt⟩\n left; apply normal_p3109_negate; assumption\n simp at hlt\n right\n... | [
{
"name": "normal_p3109_negate",
"text": "lemma normal_p3109_negate {x : float 2} :\n @normal_p3109 f x →\n @normal_p3109 f (fopp x) := by\n simp [fopp]\n intro ⟨_, hle, _, _⟩\n simp at hle\n constructor\n apply bounded_negate; assumption\n simp\n constructor; assumption\n constructor; assumption\... | [
{
"name": "canonical_p3109_negate",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 16,
"n_chars": 352,
"n_subproofs": 0,
"n_tactics": 18,
"cyclomatic": 4,
"n_automation": 7,
"n_rewrites": 0,
"n_structural": 6,
"automation_only": false,
"ma... | 1 | import Flops.Core.Defs
import Flops.Core.RoundOp
import Mathlib.Data.EReal.Basic
import Mathlib.Data.EReal.Operations
import Init.Data.ToString.Basic
inductive Signedness where
| signed | unsigned
deriving Repr, BEq, DecidableEq
inductive Domain where
| finite | extended
deriving Repr, BEq, DecidableEq
struc... | import Flops.Core.Defs
import Flops.Core.RoundOp
import Mathlib.Data.EReal.Basic
import Mathlib.Data.EReal.Operations
import Init.Data.ToString.Basic
inductive Signedness where
| signed | unsigned
deriving Repr, BEq, DecidableEq
inductive Domain where
| finite | extended
deriving Repr, BEq, DecidableEq
struc... | @@ -143,12 +143,36 @@
|_ => |x.fnum| < @vnum 2 f.to_format - 2
)
+lemma normal_p3109_negate {x : float 2} :
+ @normal_p3109 f x →
+ @normal_p3109 f (fopp x) := by
+ simp [fopp]
+ intro ⟨_, hle, _, _⟩
+ simp at hle
+ constructor
+ apply bounded_negate; assumption
+ simp
+ constructor; assumption
+ co... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_a73fe620ef7a_0 | 60bd78e23bf150a5 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/Core/Fast2Sum.lean | Fast2Sum | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 15 | 3 | [
{
"theorem_name": "helper",
"depth": 1,
"n_commands": 0,
"n_lines": 11,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have h_mem : s ∈ ({rndup (m * β ^ s.exp), rnddown (m * β ^ s.exp)} : Multiset (float β)) → s = rndup (m * β ^ s.exp) ∨ s = rnddow... | [
{
"name": "helper_roundup_m",
"text": "lemma helper_roundup_m (m : ℝ) (s : float β) :\n s = rndup (m * β ^ s.exp) →\n s.fnum = ⌈m⌉ := by\n set r := m * β ^ s.exp with Hr\n intro Hs\n have Hrndup : @roundup β format (r : ℝ) s := by\n rw [Hs, Hr]\n apply roundup_axiom\n let Hforall := Hrndup.2.2\n... | [
{
"name": "helper",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 15,
"n_chars": 547,
"n_subproofs": 2,
"n_tactics": 18,
"cyclomatic": 1,
"n_automation": 3,
"n_rewrites": 0,
"n_structural": 6,
"automation_only": false,
"max_nesting": 6
... | 2 | import Flops.Core.Defs
import Flops.Core.Rounding
import Mathlib
variable {format : Format}
variable {β : ℕ} (hβ : β > 1)
include hβ
variable
(rndup : ℝ → float β)
(rnddown : ℝ → float β)
variable
(roundup_axiom : ∀ x : ℝ, @roundup _ format x (rndup x))
(rounddown_axiom : ∀ x : ℝ, @rounddown _ format x (rnd... | import Flops.Core.Defs
import Flops.Core.Rounding
import Mathlib
variable {format : Format}
variable {β : ℕ} (hβ : β > 1)
include hβ
variable
(rndup : ℝ → float β)
(rnddown : ℝ → float β)
variable
(roundup_axiom : ∀ x : ℝ, @roundup _ format x (rndup x))
(rounddown_axiom : ∀ x : ℝ, @rounddown _ format x (rnd... | @@ -16,6 +16,153 @@
(rounddown_axiom : ∀ x : ℝ, @rounddown _ format x (rnddown x))
include roundup_axiom rounddown_axiom
+lemma helper_roundup_m (m : ℝ) (s : float β) :
+ s = rndup (m * β ^ s.exp) →
+ s.fnum = ⌈m⌉ := by
+ set r := m * β ^ s.exp with Hr
+ intro Hs
+ have Hrndup : @roundup β format (r : ℝ) s :... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_a73fe620ef7a_1 | ceed73b24faf126e | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/Core/Fast2Sum.lean | Fast2Sum | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 15 | 3 | [
{
"theorem_name": "helper",
"depth": 1,
"n_commands": 0,
"n_lines": 11,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have h_mem : s ∈ ({rndup (m * β ^ s.exp), rnddown (m * β ^ s.exp)} : Multiset (float β)) → s = rndup (m * β ^ s.exp) ∨ s = rnddow... | [
{
"name": "helper_roundup_m",
"text": "lemma helper_roundup_m (m : ℝ) (s : float β) :\n s = rndup (m * β ^ s.exp) →\n s.fnum = ⌈m⌉ := by\n set r := m * β ^ s.exp with Hr\n intro Hs\n have Hrndup : @roundup β format (r : ℝ) s := by\n rw [Hs, Hr]\n apply roundup_axiom\n let Hforall := Hrndup.2.2\n... | [
{
"name": "lemma24",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 3,
"n_lines": 23,
"n_chars": 1739,
"n_subproofs": 4,
"n_tactics": 28,
"cyclomatic": 1,
"n_automation": 11,
"n_rewrites": 6,
"n_structural": 4,
"automation_only": false,
"max_nesting": 8... | 3 | import Flops.Core.Defs
import Flops.Core.Rounding
import Mathlib
variable {format : Format}
variable {β : ℕ} (hβ : β > 1)
include hβ
variable
(rndup : ℝ → float β)
(rnddown : ℝ → float β)
variable
(roundup_axiom : ∀ x : ℝ, @roundup _ format x (rndup x))
(rounddown_axiom : ∀ x : ℝ, @rounddown _ format x (rnd... | import Flops.Core.Defs
import Flops.Core.Rounding
import Mathlib
variable {format : Format}
variable {β : ℕ} (hβ : β > 1)
include hβ
variable
(rndup : ℝ → float β)
(rnddown : ℝ → float β)
variable
(roundup_axiom : ∀ x : ℝ, @roundup _ format x (rndup x))
(rounddown_axiom : ∀ x : ℝ, @rounddown _ format x (rnd... | @@ -16,6 +16,153 @@
(rounddown_axiom : ∀ x : ℝ, @rounddown _ format x (rnddown x))
include roundup_axiom rounddown_axiom
+lemma helper_roundup_m (m : ℝ) (s : float β) :
+ s = rndup (m * β ^ s.exp) →
+ s.fnum = ⌈m⌉ := by
+ set r := m * β ^ s.exp with Hr
+ intro Hs
+ have Hrndup : @roundup β format (r : ℝ) s :... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_a73fe620ef7a_2 | af41e9d8bfb31edb | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/Core/Fast2Sum.lean | Fast2Sum | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 15 | 1 | [
{
"theorem_name": "sum_floor_bounded",
"depth": 1,
"n_commands": 0,
"n_lines": 10,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n unfold bounded_float;\n intro hβ' hf hg hfg\n have h_mantissa : |((f : ℝ) + g) / ((β : ℝ) ^ (f.exp + 1))| ≤ @vnu... | [
{
"name": "sum_mantissa_bound",
"text": "lemma sum_mantissa_bound (f g : float β) :\n β = 2 →\n @bounded_float _ format f → @bounded_float _ format g →\n f.exp ≥ g.exp →\n |((f : ℝ) + g) / ((β : ℝ) ^ (f.exp + 1))| ≤ @vnum β format - 1 := by\n intro hβ hf hg hfg\n have h_triangle : |(f : ℝ) + g| ≤ ... | [
{
"name": "sum_floor_bounded",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 16,
"n_chars": 752,
"n_subproofs": 1,
"n_tactics": 17,
"cyclomatic": 2,
"n_automation": 2,
"n_rewrites": 1,
"n_structural": 5,
"automation_only": false,
"max_nes... | 1 | import Flops.Core.Defs
import Flops.Core.Rounding
import Mathlib
variable {format : Format}
variable {β : ℕ} (hβ : β > 1)
include hβ
variable
(rndup : ℝ → float β)
(rnddown : ℝ → float β)
variable
(roundup_axiom : ∀ x : ℝ, @roundup _ format x (rndup x))
(rounddown_axiom : ∀ x : ℝ, @rounddown _ format x (rnd... | import Flops.Core.Defs
import Flops.Core.Rounding
import Mathlib
variable {format : Format}
variable {β : ℕ} (hβ : β > 1)
include hβ
variable
(rndup : ℝ → float β)
(rnddown : ℝ → float β)
variable
(roundup_axiom : ∀ x : ℝ, @roundup _ format x (rndup x))
(rounddown_axiom : ∀ x : ℝ, @rounddown _ format x (rnd... | @@ -16,6 +16,24 @@
(rounddown_axiom : ∀ x : ℝ, @rounddown _ format x (rnddown x))
include roundup_axiom rounddown_axiom
+lemma sum_mantissa_bound (f g : float β) :
+ β = 2 →
+ @bounded_float _ format f → @bounded_float _ format g →
+ f.exp ≥ g.exp →
+ |((f : ℝ) + g) / ((β : ℝ) ^ (f.exp + 1))| ≤ @vnum β format... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_a73fe620ef7a_4 | f3727bf16e7df7b7 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/Core/Fast2Sum.lean | Fast2Sum | 4 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 15 | 3 | [
{
"theorem_name": "helper",
"depth": 1,
"n_commands": 0,
"n_lines": 11,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have h_mem : s ∈ ({rndup (m * β ^ s.exp), rnddown (m * β ^ s.exp)} : Multiset (float β)) → s = rndup (m * β ^ s.exp) ∨ s = rnddow... | [
{
"name": "helper_rounddown_m",
"text": "lemma helper_rounddown_m (m : ℝ) (s : float β) :\n s = rnddown (m * β ^ s.exp) →\n s.fnum = ⌊m⌋ := by\n intro Hs\n set r := m * β ^ s.exp with Hr\n\n have Hrnddown : @rounddown β format (r : ℝ) s := by\n rw [Hs, Hr]\n apply rounddown_axiom\n let Hforall :... | [
{
"name": "lemma25_case1",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 4,
"n_lines": 13,
"n_chars": 453,
"n_subproofs": 1,
"n_tactics": 7,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 0,
"n_structural": 2,
"automation_only": false,
"max_nesting"... | 4 | import Flops.Core.Defs
import Flops.Core.Rounding
import Mathlib
variable {format : Format}
variable {β : ℕ} (hβ : β > 1)
include hβ
variable
(rndup : ℝ → float β)
(rnddown : ℝ → float β)
variable
(roundup_axiom : ∀ x : ℝ, @roundup _ format x (rndup x))
(rounddown_axiom : ∀ x : ℝ, @rounddown _ format x (rnd... | import Flops.Core.Defs
import Flops.Core.Rounding
import Mathlib
variable {format : Format}
variable {β : ℕ} (hβ : β > 1)
include hβ
variable
(rndup : ℝ → float β)
(rnddown : ℝ → float β)
variable
(roundup_axiom : ∀ x : ℝ, @roundup _ format x (rndup x))
(rounddown_axiom : ∀ x : ℝ, @rounddown _ format x (rnd... | @@ -163,6 +163,100 @@
apply βexppos hβ
omega
+lemma helper_rounddown_m (m : ℝ) (s : float β) :
+ s = rnddown (m * β ^ s.exp) →
+ s.fnum = ⌊m⌋ := by
+ intro Hs
+ set r := m * β ^ s.exp with Hr
+
+ have Hrnddown : @rounddown β format (r : ℝ) s := by
+ rw [Hs, Hr]
+ apply rounddown_axiom
+ let Hf... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_a73fe620ef7a_5 | 13c010c9f3c16a0a | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/Core/Fast2Sum.lean | Fast2Sum | 5 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 15 | 3 | [
{
"theorem_name": "helper",
"depth": 1,
"n_commands": 0,
"n_lines": 11,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have h_mem : s ∈ ({rndup (m * β ^ s.exp), rnddown (m * β ^ s.exp)} : Multiset (float β)) → s = rndup (m * β ^ s.exp) ∨ s = rnddow... | [
{
"name": "helper_roundup_m",
"text": "lemma helper_roundup_m (m : ℝ) (s : float β) :\n s = rndup (m * β ^ s.exp) →\n s.fnum = ⌈m⌉ := by\n set r := m * β ^ s.exp with Hr\n intro Hs\n have Hrndup : @roundup β format (r : ℝ) s := by\n rw [Hs, Hr]\n apply roundup_axiom\n let Hforall := Hrndup.2.2\n... | [
{
"name": "lemma25_case2a",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 87,
"n_chars": 7509,
"n_subproofs": 11,
"n_tactics": 160,
"cyclomatic": 15,
"n_automation": 67,
"n_rewrites": 37,
"n_structural": 17,
"automation_only": false,
"max... | 2 | import Flops.Core.Defs
import Flops.Core.Rounding
import Mathlib
variable {format : Format}
variable {β : ℕ} (hβ : β > 1)
include hβ
variable
(rndup : ℝ → float β)
(rnddown : ℝ → float β)
variable
(roundup_axiom : ∀ x : ℝ, @roundup _ format x (rndup x))
(rounddown_axiom : ∀ x : ℝ, @rounddown _ format x (rnd... | import Flops.Core.Defs
import Flops.Core.Rounding
import Mathlib
variable {format : Format}
variable {β : ℕ} (hβ : β > 1)
include hβ
variable
(rndup : ℝ → float β)
(rnddown : ℝ → float β)
variable
(roundup_axiom : ∀ x : ℝ, @roundup _ format x (rndup x))
(rounddown_axiom : ∀ x : ℝ, @rounddown _ format x (rnd... | @@ -16,6 +16,153 @@
(rounddown_axiom : ∀ x : ℝ, @rounddown _ format x (rnddown x))
include roundup_axiom rounddown_axiom
+lemma helper_roundup_m (m : ℝ) (s : float β) :
+ s = rndup (m * β ^ s.exp) →
+ s.fnum = ⌈m⌉ := by
+ set r := m * β ^ s.exp with Hr
+ intro Hs
+ have Hrndup : @roundup β format (r : ℝ) s :... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_a73fe620ef7a_6 | 46510e64cd035881 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/Core/Fast2Sum.lean | Fast2Sum | 6 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 15 | 3 | [
{
"theorem_name": "helper",
"depth": 1,
"n_commands": 0,
"n_lines": 11,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have h_mem : s ∈ ({rndup (m * β ^ s.exp), rnddown (m * β ^ s.exp)} : Multiset (float β)) → s = rndup (m * β ^ s.exp) ∨ s = rnddow... | [
{
"name": "helper_roundup_m",
"text": "lemma helper_roundup_m (m : ℝ) (s : float β) :\n s = rndup (m * β ^ s.exp) →\n s.fnum = ⌈m⌉ := by\n set r := m * β ^ s.exp with Hr\n intro Hs\n have Hrndup : @roundup β format (r : ℝ) s := by\n rw [Hs, Hr]\n apply roundup_axiom\n let Hforall := Hrndup.2.2\n... | [
{
"name": "case2b_mantissa_bound_up",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 31,
"n_chars": 1586,
"n_subproofs": 4,
"n_tactics": 37,
"cyclomatic": 3,
"n_automation": 9,
"n_rewrites": 9,
"n_structural": 5,
"automation_only": false,
... | 2 | import Flops.Core.Defs
import Flops.Core.Rounding
import Mathlib
variable {format : Format}
variable {β : ℕ} (hβ : β > 1)
include hβ
variable
(rndup : ℝ → float β)
(rnddown : ℝ → float β)
variable
(roundup_axiom : ∀ x : ℝ, @roundup _ format x (rndup x))
(rounddown_axiom : ∀ x : ℝ, @rounddown _ format x (rnd... | import Flops.Core.Defs
import Flops.Core.Rounding
import Mathlib
variable {format : Format}
variable {β : ℕ} (hβ : β > 1)
include hβ
variable
(rndup : ℝ → float β)
(rnddown : ℝ → float β)
variable
(roundup_axiom : ∀ x : ℝ, @roundup _ format x (rndup x))
(rounddown_axiom : ∀ x : ℝ, @rounddown _ format x (rnd... | @@ -16,6 +16,153 @@
(rounddown_axiom : ∀ x : ℝ, @rounddown _ format x (rnddown x))
include roundup_axiom rounddown_axiom
+lemma helper_roundup_m (m : ℝ) (s : float β) :
+ s = rndup (m * β ^ s.exp) →
+ s.fnum = ⌈m⌉ := by
+ set r := m * β ^ s.exp with Hr
+ intro Hs
+ have Hrndup : @roundup β format (r : ℝ) s :... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_a73fe620ef7a_7 | 5b1866d796f8e911 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/Core/Fast2Sum.lean | Fast2Sum | 7 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 15 | 3 | [
{
"theorem_name": "helper",
"depth": 1,
"n_commands": 0,
"n_lines": 11,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have h_mem : s ∈ ({rndup (m * β ^ s.exp), rnddown (m * β ^ s.exp)} : Multiset (float β)) → s = rndup (m * β ^ s.exp) ∨ s = rnddow... | [
{
"name": "helper_rounddown_m",
"text": "lemma helper_rounddown_m (m : ℝ) (s : float β) :\n s = rnddown (m * β ^ s.exp) →\n s.fnum = ⌊m⌋ := by\n intro Hs\n set r := m * β ^ s.exp with Hr\n\n have Hrnddown : @rounddown β format (r : ℝ) s := by\n rw [Hs, Hr]\n apply rounddown_axiom\n let Hforall :... | [
{
"name": "case2b_mantissa_bound_down",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 30,
"n_chars": 1642,
"n_subproofs": 4,
"n_tactics": 39,
"cyclomatic": 3,
"n_automation": 11,
"n_rewrites": 8,
"n_structural": 5,
"automation_only": false,
... | 2 | import Flops.Core.Defs
import Flops.Core.Rounding
import Mathlib
variable {format : Format}
variable {β : ℕ} (hβ : β > 1)
include hβ
variable
(rndup : ℝ → float β)
(rnddown : ℝ → float β)
variable
(roundup_axiom : ∀ x : ℝ, @roundup _ format x (rndup x))
(rounddown_axiom : ∀ x : ℝ, @rounddown _ format x (rnd... | import Flops.Core.Defs
import Flops.Core.Rounding
import Mathlib
variable {format : Format}
variable {β : ℕ} (hβ : β > 1)
include hβ
variable
(rndup : ℝ → float β)
(rnddown : ℝ → float β)
variable
(roundup_axiom : ∀ x : ℝ, @roundup _ format x (rndup x))
(rounddown_axiom : ∀ x : ℝ, @rounddown _ format x (rnd... | @@ -16,6 +16,100 @@
(rounddown_axiom : ∀ x : ℝ, @rounddown _ format x (rnddown x))
include roundup_axiom rounddown_axiom
+lemma helper_rounddown_m (m : ℝ) (s : float β) :
+ s = rnddown (m * β ^ s.exp) →
+ s.fnum = ⌊m⌋ := by
+ intro Hs
+ set r := m * β ^ s.exp with Hr
+
+ have Hrnddown : @rounddown β format (... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_965d02e52373_0 | bc7f980f122f89a7 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/Core/Fast2SumOp.lean | Fast2SumOp | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 4 | 1 | [
{
"theorem_name": "fast2sum_s_no_overflow_z_no_overflow",
"depth": 1,
"n_commands": 0,
"n_lines": 24,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intros\n rcases le_or_gt (a:ℝ) 0 with hle|hlt\n have := @fast2sum_s_no_overflow_z_no_overflow_aux f... | [
{
"name": "fast2sum_s_no_overflow_z_no_overflow_aux",
"text": "lemma fast2sum_s_no_overflow_z_no_overflow_aux (a b : float 2) (emax : ℤ)\n [ValidRound rnd1] [ValidRound rnd2] :\n -- important condition for non-overflow properties to hold\n 3 ≤ format.precision →\n 0 ≤ (a : ℝ) →\n -format.dexp ≤ emax →\... | [
{
"name": "fast2sum_s_no_overflow_z_no_overflow",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 39,
"n_chars": 1251,
"n_subproofs": 1,
"n_tactics": 34,
"cyclomatic": 4,
"n_automation": 22,
"n_rewrites": 3,
"n_structural": 6,
"automation_only"... | 1 | import Flops.Core.RoundOp
import Flops.Core.Fast2Sum
import Flops.Core.RoundingError
import Flops.Core.Sterbenz
import Mathlib
variable {format : Format}
noncomputable def fast2sum_op (a b : float 2)
(rnd1 rnd2 rnd3 : ℤ → ℝ → ℤ) :=
let s := @round_fp format rnd1 (a + b);
let z := @round_fp format rnd2 (s - a : ... | import Flops.Core.RoundOp
import Flops.Core.Fast2Sum
import Flops.Core.RoundingError
import Flops.Core.Sterbenz
import Mathlib
variable {format : Format}
noncomputable def fast2sum_op (a b : float 2)
(rnd1 rnd2 rnd3 : ℤ → ℝ → ℤ) :=
let s := @round_fp format rnd1 (a + b);
let z := @round_fp format rnd2 (s - a : ... | @@ -13,6 +13,38 @@
let t := @round_fp format rnd3 (b - z : ℝ);
(s, t)
+lemma fast2sum_s_no_overflow_z_no_overflow_aux (a b : float 2) (emax : ℤ)
+ [ValidRound rnd1] [ValidRound rnd2] :
+ -- important condition for non-overflow properties to hold
+ 3 ≤ format.precision →
+ 0 ≤ (a : ℝ) →
+ -format.dexp ≤ ema... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_965d02e52373_1 | 9e94a68f73092c1f | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/Core/Fast2SumOp.lean | Fast2SumOp | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 4 | 1 | [
{
"theorem_name": "fast2sum_rne_t_exact",
"depth": 1,
"n_commands": 0,
"n_lines": 55,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro ha hb hle\n simp [fast2sum_op]\n set s := @round_fp format (round_choice_abs (@to_even' format)) (a + b) with... | [
{
"name": "rnd_multiple",
"text": "lemma rnd_multiple [Faithful rnd] (f : float 2) :\n -format.dexp ≤ f.exp →\n let r := @round_fp format rnd f;\n ∃(m : ℤ), r = (m:ℝ) * 2^f.exp := by\n intro hemin\n simp\n have precpos := format.precpos\n have divide : 2 ∣ (@vnum 2 format : ℤ) := by\n simp [vnum]\... | [
{
"name": "fast2sum_rne_t_exact",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 65,
"n_chars": 2450,
"n_subproofs": 12,
"n_tactics": 60,
"cyclomatic": 2,
"n_automation": 22,
"n_rewrites": 16,
"n_structural": 4,
"automation_only": false,
"... | 2 | import Flops.Core.RoundOp
import Flops.Core.Fast2Sum
import Flops.Core.RoundingError
import Flops.Core.Sterbenz
import Mathlib
variable {format : Format}
noncomputable def fast2sum_op (a b : float 2)
(rnd1 rnd2 rnd3 : ℤ → ℝ → ℤ) :=
let s := @round_fp format rnd1 (a + b);
let z := @round_fp format rnd2 (s - a : ... | import Flops.Core.RoundOp
import Flops.Core.Fast2Sum
import Flops.Core.RoundingError
import Flops.Core.Sterbenz
import Mathlib
variable {format : Format}
noncomputable def fast2sum_op (a b : float 2)
(rnd1 rnd2 rnd3 : ℤ → ℝ → ℤ) :=
let s := @round_fp format rnd1 (a + b);
let z := @round_fp format rnd2 (s - a : ... | @@ -31,13 +31,141 @@
have := @round_fp_bounded_self;
grind +splitIndPred
+lemma rnd_multiple [Faithful rnd] (f : float 2) :
+ -format.dexp ≤ f.exp →
+ let r := @round_fp format rnd f;
+ ∃(m : ℤ), r = (m:ℝ) * 2^f.exp := by
+ intro hemin
+ simp
+ have precpos := format.precpos
+ have divide : 2 ∣ (@vnu... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_965d02e52373_2 | adcc351ead803f5a | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/Core/Fast2SumOp.lean | Fast2SumOp | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 4 | 1 | [
{
"theorem_name": "fast2sum_z_exact'",
"depth": 1,
"n_commands": 0,
"n_lines": 16,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro _ _ _;\n intro ha hb hab\n by_cases hba : a.exp < b.exp;\n · -- By multiple_of_ulp_bounded_of_lt, a' :=... | [
{
"name": "multiple_of_ulp_bounded_of_lt",
"text": "lemma multiple_of_ulp_bounded_of_lt {format : Format} (a b : float 2) (m : ℤ)\n (ha : @canonical 2 format a)\n (hb : @canonical 2 format b)\n (heq : (a:ℝ) = m * @ulp format b hb)\n (hlt : a.exp < b.exp) :\n @bounded_float 2 format ⟨m, b.exp⟩ := by\n ... | [
{
"name": "fast2sum_z_exact'",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 25,
"n_chars": 953,
"n_subproofs": 3,
"n_tactics": 24,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 0,
"n_structural": 7,
"automation_only": false,
"max_nes... | 2 | import Flops.Core.RoundOp
import Flops.Core.Fast2Sum
import Flops.Core.RoundingError
import Flops.Core.Sterbenz
import Mathlib
variable {format : Format}
noncomputable def fast2sum_op (a b : float 2)
(rnd1 rnd2 rnd3 : ℤ → ℝ → ℤ) :=
let s := @round_fp format rnd1 (a + b);
let z := @round_fp format rnd2 (s - a : ... | import Flops.Core.RoundOp
import Flops.Core.Fast2Sum
import Flops.Core.RoundingError
import Flops.Core.Sterbenz
import Mathlib
variable {format : Format}
noncomputable def fast2sum_op (a b : float 2)
(rnd1 rnd2 rnd3 : ℤ → ℝ → ℤ) :=
let s := @round_fp format rnd1 (a + b);
let z := @round_fp format rnd2 (s - a : ... | @@ -31,6 +31,26 @@
have := @round_fp_bounded_self;
grind +splitIndPred
+lemma multiple_of_ulp_bounded_of_lt {format : Format} (a b : float 2) (m : ℤ)
+ (ha : @canonical 2 format a)
+ (hb : @canonical 2 format b)
+ (heq : (a:ℝ) = m * @ulp format b hb)
+ (hlt : a.exp < b.exp) :
+ @bounded_float 2 format ... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_693b9b93503b_0 | 6411d0cac43e6be7 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/StochasticProperties.lean | StochasticProperties | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 1 | [
{
"theorem_name": "stochastic_A_roundup_count",
"depth": 1,
"n_commands": 0,
"n_lines": 4,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n convert roundup_count_nat N _ _;\n · norm_num [ ← Int.ofNat_le, Int.toNat_of_nonneg ( Int.floor_nonneg.... | [
{
"name": "roundup_count_nat",
"text": "lemma roundup_count_nat (N : ℕ) (k : ℕ) (hk : k < 2 ^ N) :\n ((Icc 1 (2 ^ N - 1)).filter (fun R => 2 ^ N ≤ k + R)).card = k := by\n rw [ Finset.card_eq_of_bijective ];\n use fun i hi => 2 ^ N - k + i;\n · simp +zetaDelta at *;\n exact fun a ha... | [
{
"name": "stochastic_A_roundup_count",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 14,
"n_chars": 859,
"n_subproofs": 0,
"n_tactics": 8,
"cyclomatic": 1,
"n_automation": 4,
"n_rewrites": 1,
"n_structural": 1,
"automation_only": false,
... | 1 | import Mathlib
import Flops.Core.RoundOp
import Flops.P3109.Defs
import Flops.P3109.Rounding
/-!
# Properties of P3109 Stochastic Rounding
Properties of stochastic rounding modes A, B, and C from the P3109 standard,
## Main results
### Integer preservation
* `stochastic_A_integer`, `stochastic_B_integer`, `stochast... | import Mathlib
import Flops.Core.RoundOp
import Flops.P3109.Defs
import Flops.P3109.Rounding
/-!
# Properties of P3109 Stochastic Rounding
Properties of stochastic rounding modes A, B, and C from the P3109 standard,
## Main results
### Integer preservation
* `stochastic_A_integer`, `stochastic_B_integer`, `stochast... | @@ -56,10 +56,25 @@
This follows because `Int.fract |↑m| = 0` for integers, making the round-up
condition `0 + R ≥ 2^N` always false (since `R < 2^N`).
-/
+lemma roundup_count_nat (N : ℕ) (k : ℕ) (hk : k < 2 ^ N) :
+ ((Icc 1 (2 ^ N - 1)).filter (fun R => 2 ^ N ≤ k + R)).card = k := by
+ rw [ Finset.c... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_693b9b93503b_1 | be92a54f5ea9adb2 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/StochasticProperties.lean | StochasticProperties | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 1 | [
{
"theorem_name": "stochastic_A_sum",
"depth": 1,
"n_commands": 0,
"n_lines": 8,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n -- The sum of if-then-else expressions can be split into a constant part and a counting part.\n have h_split : (∑... | [
{
"name": "stochastic_A_roundup_count",
"text": "lemma stochastic_A_roundup_count (N : ℕ) (_hN : 0 < N) (η : ℝ) (hη0 : 0 ≤ η) (hη1 : η < 1) :\n ((Icc 1 (2 ^ N - 1)).filter\n (fun R : ℕ => decide ((2 : ℤ) ^ N ≤ ⌊η * (2 : ℝ) ^ N⌋ + (R : ℤ)))).card\n = (⌊η * (2 : ℝ) ^ N⌋).toNat := by\n convert ... | [
{
"name": "stochastic_A_sum",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 2,
"n_lines": 24,
"n_chars": 1600,
"n_subproofs": 2,
"n_tactics": 11,
"cyclomatic": 2,
"n_automation": 6,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": false,
"max_nes... | 2 | import Mathlib
import Flops.Core.RoundOp
import Flops.P3109.Defs
import Flops.P3109.Rounding
/-!
# Properties of P3109 Stochastic Rounding
Properties of stochastic rounding modes A, B, and C from the P3109 standard,
## Main results
### Integer preservation
* `stochastic_A_integer`, `stochastic_B_integer`, `stochast... | import Mathlib
import Flops.Core.RoundOp
import Flops.P3109.Defs
import Flops.P3109.Rounding
/-!
# Properties of P3109 Stochastic Rounding
Properties of stochastic rounding modes A, B, and C from the P3109 standard,
## Main results
### Integer preservation
* `stochastic_A_integer`, `stochastic_B_integer`, `stochast... | @@ -68,6 +68,19 @@
/-
The floor of η·2^N is non-negative and less than 2^N when 0 ≤ η < 1.
-/
+lemma stochastic_A_roundup_count (N : ℕ) (_hN : 0 < N) (η : ℝ) (hη0 : 0 ≤ η) (hη1 : η < 1) :
+ ((Icc 1 (2 ^ N - 1)).filter
+ (fun R : ℕ => decide ((2 : ℤ) ^ N ≤ ⌊η * (2 : ℝ) ^ N⌋ + (R : ℤ)))).card
+ = (⌊η * (2 :... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_693b9b93503b_2 | 99b27011e53cf960 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/StochasticProperties.lean | StochasticProperties | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 1 | [
{
"theorem_name": "stochastic_A_exact_bias",
"depth": 1,
"n_commands": 0,
"n_lines": 4,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rw [ gauss_sum_real ] ; ring ; norm_num [ pow_succ' ];\n norm_num [ sq, pow_mul' ] ; ring;\n norm_num [ pow_mul',... | [
{
"name": "gauss_sum_real",
"text": "lemma gauss_sum_real (M : ℕ) :\n (∑ k ∈ Finset.range M, (k : ℝ)) = (M : ℝ) * ((M : ℝ) - 1) / 2 := by\n induction M with\n | zero => simp\n | succ n ih => simp [Finset.sum_range_succ]; linarith\n\n/-\nThe exact bias of Mode A stochastic rounding (SRFF), averaged uni... | [
{
"name": "stochastic_A_exact_bias",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 15,
"n_chars": 568,
"n_subproofs": 0,
"n_tactics": 9,
"cyclomatic": 1,
"n_automation": 5,
"n_rewrites": 1,
"n_structural": 0,
"automation_only": false,
"ma... | 1 | import Mathlib
import Flops.Core.RoundOp
import Flops.P3109.Defs
import Flops.P3109.Rounding
/-!
# Properties of P3109 Stochastic Rounding
Properties of stochastic rounding modes A, B, and C from the P3109 standard,
## Main results
### Integer preservation
* `stochastic_A_integer`, `stochastic_B_integer`, `stochast... | import Mathlib
import Flops.Core.RoundOp
import Flops.P3109.Defs
import Flops.P3109.Rounding
/-!
# Properties of P3109 Stochastic Rounding
Properties of stochastic rounding modes A, B, and C from the P3109 standard,
## Main results
### Integer preservation
* `stochastic_A_integer`, `stochastic_B_integer`, `stochast... | @@ -56,9 +56,31 @@
This follows because `Int.fract |↑m| = 0` for integers, making the round-up
condition `0 + R ≥ 2^N` always false (since `R < 2^N`).
-/
+lemma gauss_sum_real (M : ℕ) :
+ (∑ k ∈ Finset.range M, (k : ℝ)) = (M : ℝ) * ((M : ℝ) - 1) / 2 := by
+ induction M with
+ | zero => simp
+ | succ n ... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_693b9b93503b_3 | bce44acac3014c4e | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/StochasticProperties.lean | StochasticProperties | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 3 | [
{
"theorem_name": "srf_roundup_count",
"depth": 1,
"n_commands": 0,
"n_lines": 8,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n norm_num [ add_comm, Finset.card_image_of_injective, Function.Injective, Finset.filter_image ];\n convert roundup_count_... | [
{
"name": "roundup_count_full_range",
"text": "lemma roundup_count_full_range (N : ℕ) (k : ℕ) (hk : k < 2 ^ N) :\n ((Finset.range (2 ^ N)).filter (fun R => 2 ^ N ≤ k + R)).card = k := by\n have hIfull : {R ∈ Finset.range (2 ^ N) | 2 ^ N ≤ k + R} = Finset.Ico (2 ^ N - k) (2 ^ N) := by\n grind +qlia;\n... | [
{
"name": "srf_roundup_count",
"fan_in": 3,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 17,
"n_chars": 721,
"n_subproofs": 0,
"n_tactics": 24,
"cyclomatic": 5,
"n_automation": 7,
"n_rewrites": 5,
"n_structural": 4,
"automation_only": false,
"max_nes... | 1 | import Mathlib
import Flops.Core.RoundOp
import Flops.P3109.Defs
import Flops.P3109.Rounding
/-!
# Properties of P3109 Stochastic Rounding
Properties of stochastic rounding modes A, B, and C from the P3109 standard,
## Main results
### Integer preservation
* `stochastic_A_integer`, `stochastic_B_integer`, `stochast... | import Mathlib
import Flops.Core.RoundOp
import Flops.P3109.Defs
import Flops.P3109.Rounding
/-!
# Properties of P3109 Stochastic Rounding
Properties of stochastic rounding modes A, B, and C from the P3109 standard,
## Main results
### Integer preservation
* `stochastic_A_integer`, `stochastic_B_integer`, `stochast... | @@ -56,10 +56,27 @@
This follows because `Int.fract |↑m| = 0` for integers, making the round-up
condition `0 + R ≥ 2^N` always false (since `R < 2^N`).
-/
+lemma roundup_count_full_range (N : ℕ) (k : ℕ) (hk : k < 2 ^ N) :
+ ((Finset.range (2 ^ N)).filter (fun R => 2 ^ N ≤ k + R)).card = k := by
+ have hI... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_693b9b93503b_4 | 5df409f31b4f5ba5 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/StochasticProperties.lean | StochasticProperties | 4 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 3 | [
{
"theorem_name": "srf_pointwise_unbiased",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n convert congr_arg ( fun x : ℕ => ( x : ℝ ) / 2 ^ N ) ( srf_roundup_count ( N := N ) ( k := k ) hk ) using 1",
"n... | [
{
"name": "srf_roundup_count",
"text": "lemma srf_roundup_count (N : ℕ) (k : ℕ) (hk : k < 2 ^ N) :\n ((Finset.range (2 ^ N)).filter\n (fun R => (2 : ℝ) ^ N ≤ (k : ℝ) + ((R : ℝ) + 0.5))).card\n = k := by\n norm_num [ add_comm, Finset.card_image_of_injective, Function.Injective, Finset.filter_imag... | [
{
"name": "srf_pointwise_unbiased",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 2,
"n_lines": 16,
"n_chars": 736,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": false,
"max... | 2 | import Mathlib
import Flops.Core.RoundOp
import Flops.P3109.Defs
import Flops.P3109.Rounding
/-!
# Properties of P3109 Stochastic Rounding
Properties of stochastic rounding modes A, B, and C from the P3109 standard,
## Main results
### Integer preservation
* `stochastic_A_integer`, `stochastic_B_integer`, `stochast... | import Mathlib
import Flops.Core.RoundOp
import Flops.P3109.Defs
import Flops.P3109.Rounding
/-!
# Properties of P3109 Stochastic Rounding
Properties of stochastic rounding modes A, B, and C from the P3109 standard,
## Main results
### Integer preservation
* `stochastic_A_integer`, `stochastic_B_integer`, `stochast... | @@ -66,12 +66,29 @@
Pointwise exact bias: for η ∈ [0, 1), the bias ⌊η·2^N⌋/2^N − η is non-positive.
This follows from ⌊x⌋ ≤ x.
-/
+lemma srf_roundup_count (N : ℕ) (k : ℕ) (hk : k < 2 ^ N) :
+ ((Finset.range (2 ^ N)).filter
+ (fun R => (2 : ℝ) ^ N ≤ (k : ℝ) + ((R : ℝ) + 0.5))).card
+ = k := by
+ norm_... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_693b9b93503b_5 | 1abd6ead380ba0a1 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/StochasticProperties.lean | StochasticProperties | 5 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 3 | [
{
"theorem_name": "srf_pointwise_unbiased",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n convert congr_arg ( fun x : ℕ => ( x : ℝ ) / 2 ^ N ) ( srf_roundup_count ( N := N ) ( k := k ) hk ) using 1",
"n... | [
{
"name": "srf_roundup_count",
"text": "lemma srf_roundup_count (N : ℕ) (k : ℕ) (hk : k < 2 ^ N) :\n ((Finset.range (2 ^ N)).filter\n (fun R => (2 : ℝ) ^ N ≤ (k : ℝ) + ((R : ℝ) + 0.5))).card\n = k := by\n norm_num [ add_comm, Finset.card_image_of_injective, Function.Injective, Finset.filter_imag... | [
{
"name": "srf_exact_bias",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 2,
"n_lines": 29,
"n_chars": 2144,
"n_subproofs": 1,
"n_tactics": 44,
"cyclomatic": 10,
"n_automation": 17,
"n_rewrites": 14,
"n_structural": 9,
"automation_only": false,
"max_ne... | 2 | import Mathlib
import Flops.Core.RoundOp
import Flops.P3109.Defs
import Flops.P3109.Rounding
/-!
# Properties of P3109 Stochastic Rounding
Properties of stochastic rounding modes A, B, and C from the P3109 standard,
## Main results
### Integer preservation
* `stochastic_A_integer`, `stochastic_B_integer`, `stochast... | import Mathlib
import Flops.Core.RoundOp
import Flops.P3109.Defs
import Flops.P3109.Rounding
/-!
# Properties of P3109 Stochastic Rounding
Properties of stochastic rounding modes A, B, and C from the P3109 standard,
## Main results
### Integer preservation
* `stochastic_A_integer`, `stochastic_B_integer`, `stochast... | @@ -66,6 +66,22 @@
Pointwise exact bias: for η ∈ [0, 1), the bias ⌊η·2^N⌋/2^N − η is non-positive.
This follows from ⌊x⌋ ≤ x.
-/
+lemma srf_roundup_count (N : ℕ) (k : ℕ) (hk : k < 2 ^ N) :
+ ((Finset.range (2 ^ N)).filter
+ (fun R => (2 : ℝ) ^ N ≤ (k : ℝ) + ((R : ℝ) + 0.5))).card
+ = k := by
+ norm_n... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_693b9b93503b_6 | 236fbd3a57e0b0e7 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/StochasticProperties.lean | StochasticProperties | 6 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 3 | [
{
"theorem_name": "srf_pointwise_unbiased",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n convert congr_arg ( fun x : ℕ => ( x : ℝ ) / 2 ^ N ) ( srf_roundup_count ( N := N ) ( k := k ) hk ) using 1",
"n... | [
{
"name": "srf_roundup_count",
"text": "lemma srf_roundup_count (N : ℕ) (k : ℕ) (hk : k < 2 ^ N) :\n ((Finset.range (2 ^ N)).filter\n (fun R => (2 : ℝ) ^ N ≤ (k : ℝ) + ((R : ℝ) + 0.5))).card\n = k := by\n norm_num [ add_comm, Finset.card_image_of_injective, Function.Injective, Finset.filter_imag... | [
{
"name": "srf_second_moment",
"fan_in": 2,
"n_deps_direct": 1,
"n_deps_transitive": 2,
"n_lines": 26,
"n_chars": 1610,
"n_subproofs": 1,
"n_tactics": 31,
"cyclomatic": 5,
"n_automation": 8,
"n_rewrites": 10,
"n_structural": 6,
"automation_only": false,
"max_n... | 2 | import Mathlib
import Flops.Core.RoundOp
import Flops.P3109.Defs
import Flops.P3109.Rounding
/-!
# Properties of P3109 Stochastic Rounding
Properties of stochastic rounding modes A, B, and C from the P3109 standard,
## Main results
### Integer preservation
* `stochastic_A_integer`, `stochastic_B_integer`, `stochast... | import Mathlib
import Flops.Core.RoundOp
import Flops.P3109.Defs
import Flops.P3109.Rounding
/-!
# Properties of P3109 Stochastic Rounding
Properties of stochastic rounding modes A, B, and C from the P3109 standard,
## Main results
### Integer preservation
* `stochastic_A_integer`, `stochastic_B_integer`, `stochast... | @@ -66,6 +66,22 @@
Pointwise exact bias: for η ∈ [0, 1), the bias ⌊η·2^N⌋/2^N − η is non-positive.
This follows from ⌊x⌋ ≤ x.
-/
+lemma srf_roundup_count (N : ℕ) (k : ℕ) (hk : k < 2 ^ N) :
+ ((Finset.range (2 ^ N)).filter
+ (fun R => (2 : ℝ) ^ N ≤ (k : ℝ) + ((R : ℝ) + 0.5))).card
+ = k := by
+ norm_n... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_693b9b93503b_7 | 0cc59f88629b7bbe | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/StochasticProperties.lean | StochasticProperties | 7 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 2 | [
{
"theorem_name": "srf_summation_rms_bound",
"depth": 1,
"n_commands": 0,
"n_lines": 21,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n apply Real.sqrt_le_sqrt;\n apply variance_sum_bound n N err;\n · intro i\n have := srf_pointwise_unbiased N h... | [
{
"name": "srf_second_moment",
"text": "lemma srf_second_moment (N : ℕ) (hN : 0 < N)\n (k : ℕ) (hk : k < 2 ^ N) :\n (1 / (2 : ℝ) ^ N) *\n ((Finset.range (2 ^ N)).sum\n (fun R => if (2 : ℝ) ^ N ≤ (k : ℝ) + ((R : ℝ) + 0.5)\n then (1 - (k : ℝ) / (2 : ℝ) ^ N) ^ 2\n ... | [
{
"name": "srf_summation_rms_bound",
"fan_in": 1,
"n_deps_direct": 3,
"n_deps_transitive": 5,
"n_lines": 36,
"n_chars": 1989,
"n_subproofs": 2,
"n_tactics": 39,
"cyclomatic": 3,
"n_automation": 14,
"n_rewrites": 8,
"n_structural": 7,
"automation_only": false,
... | 5 | import Mathlib
import Flops.Core.RoundOp
import Flops.P3109.Defs
import Flops.P3109.Rounding
/-!
# Properties of P3109 Stochastic Rounding
Properties of stochastic rounding modes A, B, and C from the P3109 standard,
## Main results
### Integer preservation
* `stochastic_A_integer`, `stochastic_B_integer`, `stochast... | import Mathlib
import Flops.Core.RoundOp
import Flops.P3109.Defs
import Flops.P3109.Rounding
/-!
# Properties of P3109 Stochastic Rounding
Properties of stochastic rounding modes A, B, and C from the P3109 standard,
## Main results
### Integer preservation
* `stochastic_A_integer`, `stochastic_B_integer`, `stochast... | @@ -97,6 +97,31 @@
which telescope to 0. The original roadmap formulation
`∑(2^N − k) / (2^N)^2 − 1/2 = 0` was incorrect (it equals 1/2^{N+1}).
-/
+lemma srf_second_moment (N : ℕ) (hN : 0 < N)
+ (k : ℕ) (hk : k < 2 ^ N) :
+ (1 / (2 : ℝ) ^ N) *
+ ((Finset.range (2 ^ N)).sum
+ (fun R => if (2 : ℝ) ^ ... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_693b9b93503b_8 | b8a43780c14bb743 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/StochasticProperties.lean | StochasticProperties | 8 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 2 | [
{
"theorem_name": "srf_summation_rms_bound",
"depth": 1,
"n_commands": 0,
"n_lines": 21,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n apply Real.sqrt_le_sqrt;\n apply variance_sum_bound n N err;\n · intro i\n have := srf_pointwise_unbiased N h... | [
{
"name": "srf_second_moment",
"text": "lemma srf_second_moment (N : ℕ) (hN : 0 < N)\n (k : ℕ) (hk : k < 2 ^ N) :\n (1 / (2 : ℝ) ^ N) *\n ((Finset.range (2 ^ N)).sum\n (fun R => if (2 : ℝ) ^ N ≤ (k : ℝ) + ((R : ℝ) + 0.5)\n then (1 - (k : ℝ) / (2 : ℝ) ^ N) ^ 2\n ... | [
{
"name": "srf_summation_sqrt_n",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 6,
"n_lines": 16,
"n_chars": 656,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,
"max_ne... | 6 | import Mathlib
import Flops.Core.RoundOp
import Flops.P3109.Defs
import Flops.P3109.Rounding
/-!
# Properties of P3109 Stochastic Rounding
Properties of stochastic rounding modes A, B, and C from the P3109 standard,
## Main results
### Integer preservation
* `stochastic_A_integer`, `stochastic_B_integer`, `stochast... | import Mathlib
import Flops.Core.RoundOp
import Flops.P3109.Defs
import Flops.P3109.Rounding
/-!
# Properties of P3109 Stochastic Rounding
Properties of stochastic rounding modes A, B, and C from the P3109 standard,
## Main results
### Integer preservation
* `stochastic_A_integer`, `stochastic_B_integer`, `stochast... | @@ -97,6 +97,31 @@
which telescope to 0. The original roadmap formulation
`∑(2^N − k) / (2^N)^2 − 1/2 = 0` was incorrect (it equals 1/2^{N+1}).
-/
+lemma srf_second_moment (N : ℕ) (hN : 0 < N)
+ (k : ℕ) (hk : k < 2 ^ N) :
+ (1 / (2 : ℝ) ^ N) *
+ ((Finset.range (2 ^ N)).sum
+ (fun R => if (2 : ℝ) ^ ... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_693b9b93503b_9 | 28710f7e57bdde6e | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/StochasticProperties.lean | StochasticProperties | 9 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 3 | [
{
"theorem_name": "srf_roundup_count",
"depth": 1,
"n_commands": 0,
"n_lines": 8,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n norm_num [ add_comm, Finset.card_image_of_injective, Function.Injective, Finset.filter_image ];\n convert roundup_count_... | [
{
"name": "roundup_count_full_range",
"text": "lemma roundup_count_full_range (N : ℕ) (k : ℕ) (hk : k < 2 ^ N) :\n ((Finset.range (2 ^ N)).filter (fun R => 2 ^ N ≤ k + R)).card = k := by\n have hIfull : {R ∈ Finset.range (2 ^ N) | 2 ^ N ≤ k + R} = Finset.Ico (2 ^ N - k) (2 ^ N) := by\n grind +qlia;\n... | [
{
"name": "srff_unbiased_at_multiples",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 12,
"n_chars": 377,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 1,
"n_structural": 0,
"automation_only": false,
... | 1 | import Mathlib
import Flops.Core.RoundOp
import Flops.P3109.Defs
import Flops.P3109.Rounding
/-!
# Properties of P3109 Stochastic Rounding
Properties of stochastic rounding modes A, B, and C from the P3109 standard,
## Main results
### Integer preservation
* `stochastic_A_integer`, `stochastic_B_integer`, `stochast... | import Mathlib
import Flops.Core.RoundOp
import Flops.P3109.Defs
import Flops.P3109.Rounding
/-!
# Properties of P3109 Stochastic Rounding
Properties of stochastic rounding modes A, B, and C from the P3109 standard,
## Main results
### Integer preservation
* `stochastic_A_integer`, `stochastic_B_integer`, `stochast... | @@ -56,6 +56,16 @@
This follows because `Int.fract |↑m| = 0` for integers, making the round-up
condition `0 + R ≥ 2^N` always false (since `R < 2^N`).
-/
+lemma roundup_count_full_range (N : ℕ) (k : ℕ) (hk : k < 2 ^ N) :
+ ((Finset.range (2 ^ N)).filter (fun R => 2 ^ N ≤ k + R)).card = k := by
+ have hIf... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_693b9b93503b_10 | 6fae17e75633a8db | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/StochasticProperties.lean | StochasticProperties | 10 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 3 | [
{
"theorem_name": "srf_roundup_count",
"depth": 1,
"n_commands": 0,
"n_lines": 8,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n norm_num [ add_comm, Finset.card_image_of_injective, Function.Injective, Finset.filter_image ];\n convert roundup_count_... | [
{
"name": "roundup_count_full_range",
"text": "lemma roundup_count_full_range (N : ℕ) (k : ℕ) (hk : k < 2 ^ N) :\n ((Finset.range (2 ^ N)).filter (fun R => 2 ^ N ≤ k + R)).card = k := by\n have hIfull : {R ∈ Finset.range (2 ^ N) | 2 ^ N ≤ k + R} = Finset.Ico (2 ^ N - k) (2 ^ N) := by\n grind +qlia;\n... | [
{
"name": "src_roundup_count",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 12,
"n_chars": 406,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": false,
"max_nest... | 1 | import Mathlib
import Flops.Core.RoundOp
import Flops.P3109.Defs
import Flops.P3109.Rounding
/-!
# Properties of P3109 Stochastic Rounding
Properties of stochastic rounding modes A, B, and C from the P3109 standard,
## Main results
### Integer preservation
* `stochastic_A_integer`, `stochastic_B_integer`, `stochast... | import Mathlib
import Flops.Core.RoundOp
import Flops.P3109.Defs
import Flops.P3109.Rounding
/-!
# Properties of P3109 Stochastic Rounding
Properties of stochastic rounding modes A, B, and C from the P3109 standard,
## Main results
### Integer preservation
* `stochastic_A_integer`, `stochastic_B_integer`, `stochast... | @@ -56,6 +56,16 @@
This follows because `Int.fract |↑m| = 0` for integers, making the round-up
condition `0 + R ≥ 2^N` always false (since `R < 2^N`).
-/
+lemma roundup_count_full_range (N : ℕ) (k : ℕ) (hk : k < 2 ^ N) :
+ ((Finset.range (2 ^ N)).filter (fun R => 2 ^ N ≤ k + R)).card = k := by
+ have hIf... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_693b9b93503b_13 | c0311a5abcb23244 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/StochasticProperties.lean | StochasticProperties | 13 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 3 | [
{
"theorem_name": "srf_pointwise_unbiased",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n convert congr_arg ( fun x : ℕ => ( x : ℝ ) / 2 ^ N ) ( srf_roundup_count ( N := N ) ( k := k ) hk ) using 1",
"n... | [
{
"name": "srf_roundup_count",
"text": "lemma srf_roundup_count (N : ℕ) (k : ℕ) (hk : k < 2 ^ N) :\n ((Finset.range (2 ^ N)).filter\n (fun R => (2 : ℝ) ^ N ≤ (k : ℝ) + ((R : ℝ) + 0.5))).card\n = k := by\n norm_num [ add_comm, Finset.card_image_of_injective, Function.Injective, Finset.filter_imag... | [
{
"name": "src_second_moment",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 3,
"n_lines": 18,
"n_chars": 821,
"n_subproofs": 0,
"n_tactics": 18,
"cyclomatic": 5,
"n_automation": 6,
"n_rewrites": 5,
"n_structural": 0,
"automation_only": false,
"max_nes... | 3 | import Mathlib
import Flops.Core.RoundOp
import Flops.P3109.Defs
import Flops.P3109.Rounding
/-!
# Properties of P3109 Stochastic Rounding
Properties of stochastic rounding modes A, B, and C from the P3109 standard,
## Main results
### Integer preservation
* `stochastic_A_integer`, `stochastic_B_integer`, `stochast... | import Mathlib
import Flops.Core.RoundOp
import Flops.P3109.Defs
import Flops.P3109.Rounding
/-!
# Properties of P3109 Stochastic Rounding
Properties of stochastic rounding modes A, B, and C from the P3109 standard,
## Main results
### Integer preservation
* `stochastic_A_integer`, `stochastic_B_integer`, `stochast... | @@ -66,6 +66,22 @@
Pointwise exact bias: for η ∈ [0, 1), the bias ⌊η·2^N⌋/2^N − η is non-positive.
This follows from ⌊x⌋ ≤ x.
-/
+lemma srf_roundup_count (N : ℕ) (k : ℕ) (hk : k < 2 ^ N) :
+ ((Finset.range (2 ^ N)).filter
+ (fun R => (2 : ℝ) ^ N ≤ (k : ℝ) + ((R : ℝ) + 0.5))).card
+ = k := by
+ norm_n... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_693b9b93503b_14 | 77716a64342d2947 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/StochasticProperties.lean | StochasticProperties | 14 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 2 | [
{
"theorem_name": "srf_summation_rms_bound",
"depth": 1,
"n_commands": 0,
"n_lines": 21,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n apply Real.sqrt_le_sqrt;\n apply variance_sum_bound n N err;\n · intro i\n have := srf_pointwise_unbiased N h... | [
{
"name": "variance_sum_bound",
"text": "lemma variance_sum_bound (n : ℕ) (N : ℕ)\n (err : Fin n → ℕ → ℝ)\n (h_mean : ∀ i, (∑ R ∈ Finset.range (2 ^ N), err i R) = 0)\n (h_var : ∀ i, (∑ R ∈ Finset.range (2 ^ N), (err i R) ^ 2)\n / (2 : ℝ) ^ N ≤ 1 / 4) :\n (∑ Rs ∈ Finset.univ (α := Fi... | [
{
"name": "src_summation_sqrt_n",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 5,
"n_lines": 31,
"n_chars": 1678,
"n_subproofs": 3,
"n_tactics": 35,
"cyclomatic": 2,
"n_automation": 12,
"n_rewrites": 3,
"n_structural": 5,
"automation_only": false,
"ma... | 5 | import Mathlib
import Flops.Core.RoundOp
import Flops.P3109.Defs
import Flops.P3109.Rounding
/-!
# Properties of P3109 Stochastic Rounding
Properties of stochastic rounding modes A, B, and C from the P3109 standard,
## Main results
### Integer preservation
* `stochastic_A_integer`, `stochastic_B_integer`, `stochast... | import Mathlib
import Flops.Core.RoundOp
import Flops.P3109.Defs
import Flops.P3109.Rounding
/-!
# Properties of P3109 Stochastic Rounding
Properties of stochastic rounding modes A, B, and C from the P3109 standard,
## Main results
### Integer preservation
* `stochastic_A_integer`, `stochastic_B_integer`, `stochast... | @@ -131,6 +131,41 @@
Expand (∑ᵢ εᵢ)² = ∑ᵢ εᵢ² + ∑_{i≠j} εᵢεⱼ. The cross terms vanish by
`product_sum_factors` + `h_mean`. The diagonal terms are bounded by n/4.
-/
+lemma variance_sum_bound (n : ℕ) (N : ℕ)
+ (err : Fin n → ℕ → ℝ)
+ (h_mean : ∀ i, (∑ R ∈ Finset.range (2 ^ N), err i R) = 0)
+ (h_var : ∀ i, (∑... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_2a1561655d64_0 | 20bbb15a44b4c837 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/MinMax.lean | MinMax | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 7 | 11 | [
{
"theorem_name": "max_m_nonneg",
"depth": 1,
"n_commands": 0,
"n_lines": 17,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have := @max_is_finite f\n revert this\n rcases heq : @max_finite f with _|_|⟨m, e, _, _⟩ <;> simp [is_finite]\n simp [max... | [
{
"name": "max_is_finite",
"text": "lemma max_is_finite :\n (@max_finite f).is_finite := by\n simp [max_finite]\n split; simp [is_finite]\n simp [is_finite]\n\n",
"fan_in": 11,
"n_lines": 7,
"n_chars": 122,
"n_subproofs": 0,
"n_tactics": 5,
"cyclomatic": 2,
"n_automation": 3,... | [
{
"name": "max_m_nonneg",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 20,
"n_chars": 501,
"n_subproofs": 4,
"n_tactics": 23,
"cyclomatic": 7,
"n_automation": 12,
"n_rewrites": 2,
"n_structural": 1,
"automation_only": false,
"max_nesting... | 1 | import Flops.P3109.Defs
variable {f : p3109_format}
namespace p3109_format
namespace p3109
noncomputable def max_fp :=
(@max_finite f).to_float
lemma max_m_nonneg :
0 ≤ (@max_finite f).fnum := sorry
noncomputable def min_fp :=
(@min_finite f).to_float
| import Flops.P3109.Defs
variable {f : p3109_format}
namespace p3109_format
namespace p3109
noncomputable def max_fp :=
(@max_finite f).to_float
lemma max_is_finite :
(@max_finite f).is_finite := by
simp [max_finite]
split; simp [is_finite]
simp [is_finite]
lemma max_m_nonneg :
0 ≤ (@max_finite f).fnum :... | @@ -7,8 +7,30 @@
noncomputable def max_fp :=
(@max_finite f).to_float
+lemma max_is_finite :
+ (@max_finite f).is_finite := by
+ simp [max_finite]
+ split; simp [is_finite]
+ simp [is_finite]
+
lemma max_m_nonneg :
- 0 ≤ (@max_finite f).fnum := sorry
+ 0 ≤ (@max_finite f).fnum := by
+ have := @max_is_fini... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_2a1561655d64_1 | ef3e7020a325918d | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/MinMax.lean | MinMax | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 7 | 11 | [
{
"theorem_name": "max_m_nonneg",
"depth": 1,
"n_commands": 0,
"n_lines": 17,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have := @max_is_finite f\n revert this\n rcases heq : @max_finite f with _|_|⟨m, e, _, _⟩ <;> simp [is_finite]\n simp [max... | [
{
"name": "max_is_finite",
"text": "lemma max_is_finite :\n (@max_finite f).is_finite := by\n simp [max_finite]\n split; simp [is_finite]\n simp [is_finite]\n\n",
"fan_in": 11,
"n_lines": 7,
"n_chars": 122,
"n_subproofs": 0,
"n_tactics": 5,
"cyclomatic": 2,
"n_automation": 3,... | [
{
"name": "max_exp_emax",
"fan_in": 3,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 12,
"n_chars": 277,
"n_subproofs": 1,
"n_tactics": 12,
"cyclomatic": 4,
"n_automation": 7,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": false,
"max_nesting"... | 1 | import Flops.P3109.Defs
variable {f : p3109_format}
namespace p3109_format
namespace p3109
noncomputable def max_fp :=
(@max_finite f).to_float
lemma max_exp_emax :
(@max_finite f).exp = f.emax_lsb := sorry
noncomputable def min_fp :=
(@min_finite f).to_float
| import Flops.P3109.Defs
variable {f : p3109_format}
namespace p3109_format
namespace p3109
noncomputable def max_fp :=
(@max_finite f).to_float
lemma max_is_finite :
(@max_finite f).is_finite := by
simp [max_finite]
split; simp [is_finite]
simp [is_finite]
lemma max_exp_emax :
(@max_finite f).exp = f.em... | @@ -7,8 +7,22 @@
noncomputable def max_fp :=
(@max_finite f).to_float
+lemma max_is_finite :
+ (@max_finite f).is_finite := by
+ simp [max_finite]
+ split; simp [is_finite]
+ simp [is_finite]
+
lemma max_exp_emax :
- (@max_finite f).exp = f.emax_lsb := sorry
+ (@max_finite f).exp = f.emax_lsb := by
+ have... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_2a1561655d64_2 | 18af3cecc0c2b5e1 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/MinMax.lean | MinMax | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 7 | 11 | [
{
"theorem_name": "max_m_nonneg",
"depth": 1,
"n_commands": 0,
"n_lines": 17,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have := @max_is_finite f\n revert this\n rcases heq : @max_finite f with _|_|⟨m, e, _, _⟩ <;> simp [is_finite]\n simp [max... | [
{
"name": "max_is_finite",
"text": "lemma max_is_finite :\n (@max_finite f).is_finite := by\n simp [max_finite]\n split; simp [is_finite]\n simp [is_finite]\n\n",
"fan_in": 11,
"n_lines": 7,
"n_chars": 122,
"n_subproofs": 0,
"n_tactics": 5,
"cyclomatic": 2,
"n_automation": 3,... | [
{
"name": "max_fp_exp_emax",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 15,
"n_chars": 436,
"n_subproofs": 1,
"n_tactics": 13,
"cyclomatic": 4,
"n_automation": 8,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": false,
"max_nesti... | 1 | import Flops.P3109.Defs
variable {f : p3109_format}
namespace p3109_format
namespace p3109
noncomputable def max_fp :=
(@max_finite f).to_float
lemma max_fp_exp_emax :
(@max_fp f).exp = f.emax_lsb := sorry
-- another sanity check that max_finite is indeed the maximum
-- first compare exponents then the signific... | import Flops.P3109.Defs
variable {f : p3109_format}
namespace p3109_format
namespace p3109
noncomputable def max_fp :=
(@max_finite f).to_float
lemma max_is_finite :
(@max_finite f).is_finite := by
simp [max_finite]
split; simp [is_finite]
simp [is_finite]
lemma max_fp_exp_emax :
(@max_fp f).exp = f.ema... | @@ -7,8 +7,23 @@
noncomputable def max_fp :=
(@max_finite f).to_float
+lemma max_is_finite :
+ (@max_finite f).is_finite := by
+ simp [max_finite]
+ split; simp [is_finite]
+ simp [is_finite]
+
lemma max_fp_exp_emax :
- (@max_fp f).exp = f.emax_lsb := sorry
+ (@max_fp f).exp = f.emax_lsb := by
+ simp [max... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_2a1561655d64_3 | f25e903481cd3375 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/MinMax.lean | MinMax | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 7 | 11 | [
{
"theorem_name": "max_m_nonneg",
"depth": 1,
"n_commands": 0,
"n_lines": 17,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have := @max_is_finite f\n revert this\n rcases heq : @max_finite f with _|_|⟨m, e, _, _⟩ <;> simp [is_finite]\n simp [max... | [
{
"name": "max_is_finite",
"text": "lemma max_is_finite :\n (@max_finite f).is_finite := by\n simp [max_finite]\n split; simp [is_finite]\n simp [is_finite]\n\n",
"fan_in": 11,
"n_lines": 7,
"n_chars": 122,
"n_subproofs": 0,
"n_tactics": 5,
"cyclomatic": 2,
"n_automation": 3,... | [
{
"name": "all_le_max_finite",
"fan_in": 1,
"n_deps_direct": 4,
"n_deps_transitive": 4,
"n_lines": 135,
"n_chars": 3513,
"n_subproofs": 17,
"n_tactics": 156,
"cyclomatic": 14,
"n_automation": 82,
"n_rewrites": 25,
"n_structural": 18,
"automation_only": false,
... | 4 | import Flops.P3109.Defs
variable {f : p3109_format}
namespace p3109_format
namespace p3109
lemma exp_lt_real_lt (x y : p3109 f) :
x.is_finite →
y.is_finite →
x.exp < y.exp →
|(x : ℝ)| < |(y:ℝ)| := by
rcases x with _|_|⟨mx, ex, hmx, hcanx⟩ <;>
rcases y with _|_|⟨my, ey, hmy, hcany⟩ <;> simp [is_finite]
... | import Flops.P3109.Defs
variable {f : p3109_format}
namespace p3109_format
namespace p3109
lemma exp_lt_real_lt (x y : p3109 f) :
x.is_finite →
y.is_finite →
x.exp < y.exp →
|(x : ℝ)| < |(y:ℝ)| := by
rcases x with _|_|⟨mx, ex, hmx, hcanx⟩ <;>
rcases y with _|_|⟨my, ey, hmy, hcany⟩ <;> simp [is_finite]
... | @@ -45,16 +45,176 @@
noncomputable def max_fp :=
(@max_finite f).to_float
+lemma max_is_finite :
+ (@max_finite f).is_finite := by
+ simp [max_finite]
+ split; simp [is_finite]
+ simp [is_finite]
+
lemma max_m_nonneg :
- 0 ≤ (@max_finite f).fnum := sorry
+ 0 ≤ (@max_finite f).fnum := by
+ have := @max_is_... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_2a1561655d64_4 | ae87f52cfb8f8382 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/MinMax.lean | MinMax | 4 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 7 | 11 | [
{
"theorem_name": "max_m_nonneg",
"depth": 1,
"n_commands": 0,
"n_lines": 17,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have := @max_is_finite f\n revert this\n rcases heq : @max_finite f with _|_|⟨m, e, _, _⟩ <;> simp [is_finite]\n simp [max... | [
{
"name": "max_is_finite",
"text": "lemma max_is_finite :\n (@max_finite f).is_finite := by\n simp [max_finite]\n split; simp [is_finite]\n simp [is_finite]\n\n",
"fan_in": 11,
"n_lines": 7,
"n_chars": 122,
"n_subproofs": 0,
"n_tactics": 5,
"cyclomatic": 2,
"n_automation": 3,... | [
{
"name": "min_is_finite",
"fan_in": 4,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 11,
"n_chars": 192,
"n_subproofs": 1,
"n_tactics": 9,
"cyclomatic": 4,
"n_automation": 4,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": false,
"max_nesting"... | 1 | import Flops.P3109.Defs
variable {f : p3109_format}
namespace p3109_format
namespace p3109
noncomputable def max_fp :=
(@max_finite f).to_float
lemma min_is_finite :
(@min_finite f).is_finite := sorry
noncomputable def min_fp :=
(@min_finite f).to_float
| import Flops.P3109.Defs
variable {f : p3109_format}
namespace p3109_format
namespace p3109
noncomputable def max_fp :=
(@max_finite f).to_float
lemma max_is_finite :
(@max_finite f).is_finite := by
simp [max_finite]
split; simp [is_finite]
simp [is_finite]
lemma min_is_finite :
(@min_finite f).is_finite... | @@ -7,8 +7,21 @@
noncomputable def max_fp :=
(@max_finite f).to_float
+lemma max_is_finite :
+ (@max_finite f).is_finite := by
+ simp [max_finite]
+ split; simp [is_finite]
+ simp [is_finite]
+
lemma min_is_finite :
- (@min_finite f).is_finite := sorry
+ (@min_finite f).is_finite := by
+ simp [min_finite]... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_2a1561655d64_5 | 53bfb8f5374a8d0c | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/MinMax.lean | MinMax | 5 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 7 | 11 | [
{
"theorem_name": "max_m_nonneg",
"depth": 1,
"n_commands": 0,
"n_lines": 17,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have := @max_is_finite f\n revert this\n rcases heq : @max_finite f with _|_|⟨m, e, _, _⟩ <;> simp [is_finite]\n simp [max... | [
{
"name": "max_is_finite",
"text": "lemma max_is_finite :\n (@max_finite f).is_finite := by\n simp [max_finite]\n split; simp [is_finite]\n simp [is_finite]\n\n",
"fan_in": 11,
"n_lines": 7,
"n_chars": 122,
"n_subproofs": 0,
"n_tactics": 5,
"cyclomatic": 2,
"n_automation": 3,... | [
{
"name": "min_exp_emin_or_emax",
"fan_in": 1,
"n_deps_direct": 3,
"n_deps_transitive": 3,
"n_lines": 26,
"n_chars": 657,
"n_subproofs": 3,
"n_tactics": 24,
"cyclomatic": 9,
"n_automation": 10,
"n_rewrites": 0,
"n_structural": 2,
"automation_only": false,
"max... | 3 | import Flops.P3109.Defs
variable {f : p3109_format}
namespace p3109_format
namespace p3109
noncomputable def max_fp :=
(@max_finite f).to_float
lemma max_exp_emax :
(@max_finite f).exp = f.emax_lsb := sorry
lemma min_is_finite :
(@min_finite f).is_finite := sorry
lemma min_exp_emin_or_emax :
match f.s with... | import Flops.P3109.Defs
variable {f : p3109_format}
namespace p3109_format
namespace p3109
noncomputable def max_fp :=
(@max_finite f).to_float
lemma max_is_finite :
(@max_finite f).is_finite := by
simp [max_finite]
split; simp [is_finite]
simp [is_finite]
lemma max_exp_emax :
(@max_finite f).exp = f.em... | @@ -7,16 +7,56 @@
noncomputable def max_fp :=
(@max_finite f).to_float
+lemma max_is_finite :
+ (@max_finite f).is_finite := by
+ simp [max_finite]
+ split; simp [is_finite]
+ simp [is_finite]
+
lemma max_exp_emax :
- (@max_finite f).exp = f.emax_lsb := sorry
+ (@max_finite f).exp = f.emax_lsb := by
+ hav... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_2a1561655d64_6 | 72eb376e9eab80e3 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/MinMax.lean | MinMax | 6 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 7 | 11 | [
{
"theorem_name": "max_m_nonneg",
"depth": 1,
"n_commands": 0,
"n_lines": 17,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have := @max_is_finite f\n revert this\n rcases heq : @max_finite f with _|_|⟨m, e, _, _⟩ <;> simp [is_finite]\n simp [max... | [
{
"name": "max_is_finite",
"text": "lemma max_is_finite :\n (@max_finite f).is_finite := by\n simp [max_finite]\n split; simp [is_finite]\n simp [is_finite]\n\n",
"fan_in": 11,
"n_lines": 7,
"n_chars": 122,
"n_subproofs": 0,
"n_tactics": 5,
"cyclomatic": 2,
"n_automation": 3,... | [
{
"name": "min_finite_le_all",
"fan_in": 0,
"n_deps_direct": 5,
"n_deps_transitive": 7,
"n_lines": 63,
"n_chars": 1484,
"n_subproofs": 7,
"n_tactics": 69,
"cyclomatic": 19,
"n_automation": 28,
"n_rewrites": 1,
"n_structural": 17,
"automation_only": false,
"max... | 7 | import Flops.P3109.Defs
variable {f : p3109_format}
namespace p3109_format
namespace p3109
lemma exp_lt_real_lt (x y : p3109 f) :
x.is_finite →
y.is_finite →
x.exp < y.exp →
|(x : ℝ)| < |(y:ℝ)| := by
rcases x with _|_|⟨mx, ex, hmx, hcanx⟩ <;>
rcases y with _|_|⟨my, ey, hmy, hcany⟩ <;> simp [is_finite]
... | import Flops.P3109.Defs
variable {f : p3109_format}
namespace p3109_format
namespace p3109
lemma exp_lt_real_lt (x y : p3109 f) :
x.is_finite →
y.is_finite →
x.exp < y.exp →
|(x : ℝ)| < |(y:ℝ)| := by
rcases x with _|_|⟨mx, ex, hmx, hcanx⟩ <;>
rcases y with _|_|⟨my, ey, hmy, hcany⟩ <;> simp [is_finite]
... | @@ -45,29 +45,273 @@
noncomputable def max_fp :=
(@max_finite f).to_float
+lemma max_is_finite :
+ (@max_finite f).is_finite := by
+ simp [max_finite]
+ split; simp [is_finite]
+ simp [is_finite]
+
lemma max_m_nonneg :
- 0 ≤ (@max_finite f).fnum := sorry
+ 0 ≤ (@max_finite f).fnum := by
+ have := @max_is_... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_2a1561655d64_7 | 0bdea9d1f1e4a9ea | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/MinMax.lean | MinMax | 7 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 7 | 11 | [
{
"theorem_name": "max_m_nonneg",
"depth": 1,
"n_commands": 0,
"n_lines": 17,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have := @max_is_finite f\n revert this\n rcases heq : @max_finite f with _|_|⟨m, e, _, _⟩ <;> simp [is_finite]\n simp [max... | [
{
"name": "max_is_finite",
"text": "lemma max_is_finite :\n (@max_finite f).is_finite := by\n simp [max_finite]\n split; simp [is_finite]\n simp [is_finite]\n\n",
"fan_in": 11,
"n_lines": 7,
"n_chars": 122,
"n_subproofs": 0,
"n_tactics": 5,
"cyclomatic": 2,
"n_automation": 3,... | [
{
"name": "min_m_0_or_neg_max_m",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 16,
"n_chars": 347,
"n_subproofs": 1,
"n_tactics": 13,
"cyclomatic": 5,
"n_automation": 5,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": false,
"max_... | 1 | import Flops.P3109.Defs
variable {f : p3109_format}
namespace p3109_format
namespace p3109
noncomputable def max_fp :=
(@max_finite f).to_float
lemma min_m_0_or_neg_max_m :
match f.s with
|.unsigned => (@min_finite f).fnum = 0
|.signed => (@min_finite f).fnum = -(@max_finite f).fnum := sorry
noncomputable d... | import Flops.P3109.Defs
variable {f : p3109_format}
namespace p3109_format
namespace p3109
noncomputable def max_fp :=
(@max_finite f).to_float
lemma max_is_finite :
(@max_finite f).is_finite := by
simp [max_finite]
split; simp [is_finite]
simp [is_finite]
lemma min_m_0_or_neg_max_m :
match f.s with
|... | @@ -7,10 +7,26 @@
noncomputable def max_fp :=
(@max_finite f).to_float
+lemma max_is_finite :
+ (@max_finite f).is_finite := by
+ simp [max_finite]
+ split; simp [is_finite]
+ simp [is_finite]
+
lemma min_m_0_or_neg_max_m :
match f.s with
|.unsigned => (@min_finite f).fnum = 0
- |.signed => (@min_fini... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_2a1561655d64_8 | 02a3dc6cd5aad6f3 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/MinMax.lean | MinMax | 8 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 7 | 11 | [
{
"theorem_name": "max_m_nonneg",
"depth": 1,
"n_commands": 0,
"n_lines": 17,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have := @max_is_finite f\n revert this\n rcases heq : @max_finite f with _|_|⟨m, e, _, _⟩ <;> simp [is_finite]\n simp [max... | [
{
"name": "max_is_finite",
"text": "lemma max_is_finite :\n (@max_finite f).is_finite := by\n simp [max_finite]\n split; simp [is_finite]\n simp [is_finite]\n\n",
"fan_in": 11,
"n_lines": 7,
"n_chars": 122,
"n_subproofs": 0,
"n_tactics": 5,
"cyclomatic": 2,
"n_automation": 3,... | [
{
"name": "min_0_or_neg_max",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 10,
"n_chars": 234,
"n_subproofs": 1,
"n_tactics": 8,
"cyclomatic": 3,
"n_automation": 3,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": false,
"max_nesti... | 1 | import Flops.P3109.Defs
variable {f : p3109_format}
namespace p3109_format
namespace p3109
noncomputable def max_fp :=
(@max_finite f).to_float
lemma min_0_or_neg_max (heq : f.s = .signed) :
(@min_finite f :ℝ) = -(@max_finite f) := sorry
noncomputable def min_fp :=
(@min_finite f).to_float
| import Flops.P3109.Defs
variable {f : p3109_format}
namespace p3109_format
namespace p3109
noncomputable def max_fp :=
(@max_finite f).to_float
lemma max_is_finite :
(@max_finite f).is_finite := by
simp [max_finite]
split; simp [is_finite]
simp [is_finite]
lemma min_0_or_neg_max (heq : f.s = .signed) :
... | @@ -7,8 +7,20 @@
noncomputable def max_fp :=
(@max_finite f).to_float
+lemma max_is_finite :
+ (@max_finite f).is_finite := by
+ simp [max_finite]
+ split; simp [is_finite]
+ simp [is_finite]
+
lemma min_0_or_neg_max (heq : f.s = .signed) :
- (@min_finite f :ℝ) = -(@max_finite f) := sorry
+ (@min_finite f ... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_2a1561655d64_9 | 7a813ce74f23c935 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/MinMax.lean | MinMax | 9 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 7 | 11 | [
{
"theorem_name": "max_m_nonneg",
"depth": 1,
"n_commands": 0,
"n_lines": 17,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have := @max_is_finite f\n revert this\n rcases heq : @max_finite f with _|_|⟨m, e, _, _⟩ <;> simp [is_finite]\n simp [max... | [
{
"name": "max_is_finite",
"text": "lemma max_is_finite :\n (@max_finite f).is_finite := by\n simp [max_finite]\n split; simp [is_finite]\n simp [is_finite]\n\n",
"fan_in": 11,
"n_lines": 7,
"n_chars": 122,
"n_subproofs": 0,
"n_tactics": 5,
"cyclomatic": 2,
"n_automation": 3,... | [
{
"name": "min_fp_bounded",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 2,
"n_lines": 11,
"n_chars": 259,
"n_subproofs": 1,
"n_tactics": 9,
"cyclomatic": 3,
"n_automation": 3,
"n_rewrites": 0,
"n_structural": 3,
"automation_only": false,
"max_nesting... | 2 | import Flops.P3109.Defs
variable {f : p3109_format}
namespace p3109_format
namespace p3109
noncomputable def max_fp :=
(@max_finite f).to_float
lemma min_is_finite :
(@min_finite f).is_finite := sorry
noncomputable def min_fp :=
(@min_finite f).to_float
lemma min_fp_bounded :
@bounded_float 2 f.to_format (... | import Flops.P3109.Defs
variable {f : p3109_format}
namespace p3109_format
namespace p3109
noncomputable def max_fp :=
(@max_finite f).to_float
lemma max_is_finite :
(@max_finite f).is_finite := by
simp [max_finite]
split; simp [is_finite]
simp [is_finite]
lemma min_is_finite :
(@min_finite f).is_finite... | @@ -7,8 +7,21 @@
noncomputable def max_fp :=
(@max_finite f).to_float
+lemma max_is_finite :
+ (@max_finite f).is_finite := by
+ simp [max_finite]
+ split; simp [is_finite]
+ simp [is_finite]
+
lemma min_is_finite :
- (@min_finite f).is_finite := sorry
+ (@min_finite f).is_finite := by
+ simp [min_finite]... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_2a1561655d64_10 | 8dd1438f0efb4d7e | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/MinMax.lean | MinMax | 10 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 7 | 11 | [
{
"theorem_name": "max_m_nonneg",
"depth": 1,
"n_commands": 0,
"n_lines": 17,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have := @max_is_finite f\n revert this\n rcases heq : @max_finite f with _|_|⟨m, e, _, _⟩ <;> simp [is_finite]\n simp [max... | [
{
"name": "max_is_finite",
"text": "lemma max_is_finite :\n (@max_finite f).is_finite := by\n simp [max_finite]\n split; simp [is_finite]\n simp [is_finite]\n\n",
"fan_in": 11,
"n_lines": 7,
"n_chars": 122,
"n_subproofs": 0,
"n_tactics": 5,
"cyclomatic": 2,
"n_automation": 3,... | [
{
"name": "max_fp_canonical",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 10,
"n_chars": 231,
"n_subproofs": 1,
"n_tactics": 8,
"cyclomatic": 3,
"n_automation": 3,
"n_rewrites": 0,
"n_structural": 2,
"automation_only": false,
"max_nesti... | 1 | import Flops.P3109.Defs
variable {f : p3109_format}
namespace p3109_format
namespace p3109
noncomputable def max_fp :=
(@max_finite f).to_float
noncomputable def min_fp :=
(@min_finite f).to_float
lemma max_fp_canonical :
@canonical 2 f.to_format (@max_fp f) := sorry
| import Flops.P3109.Defs
variable {f : p3109_format}
namespace p3109_format
namespace p3109
noncomputable def max_fp :=
(@max_finite f).to_float
lemma max_is_finite :
(@max_finite f).is_finite := by
simp [max_finite]
split; simp [is_finite]
simp [is_finite]
noncomputable def min_fp :=
(@min_finite f).to_... | @@ -7,10 +7,22 @@
noncomputable def max_fp :=
(@max_finite f).to_float
+lemma max_is_finite :
+ (@max_finite f).is_finite := by
+ simp [max_finite]
+ split; simp [is_finite]
+ simp [is_finite]
+
noncomputable def min_fp :=
(@min_finite f).to_float
lemma max_fp_canonical :
- @canonical 2 f.to_format (@... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_2a1561655d64_11 | 04c91e64062498c8 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/MinMax.lean | MinMax | 11 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 7 | 11 | [
{
"theorem_name": "max_m_nonneg",
"depth": 1,
"n_commands": 0,
"n_lines": 17,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have := @max_is_finite f\n revert this\n rcases heq : @max_finite f with _|_|⟨m, e, _, _⟩ <;> simp [is_finite]\n simp [max... | [
{
"name": "max_is_finite",
"text": "lemma max_is_finite :\n (@max_finite f).is_finite := by\n simp [max_finite]\n split; simp [is_finite]\n simp [is_finite]\n\n",
"fan_in": 11,
"n_lines": 7,
"n_chars": 122,
"n_subproofs": 0,
"n_tactics": 5,
"cyclomatic": 2,
"n_automation": 3,... | [
{
"name": "min_fp_canonical",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 2,
"n_lines": 10,
"n_chars": 231,
"n_subproofs": 1,
"n_tactics": 8,
"cyclomatic": 3,
"n_automation": 3,
"n_rewrites": 0,
"n_structural": 2,
"automation_only": false,
"max_nesti... | 2 | import Flops.P3109.Defs
variable {f : p3109_format}
namespace p3109_format
namespace p3109
noncomputable def max_fp :=
(@max_finite f).to_float
lemma min_is_finite :
(@min_finite f).is_finite := sorry
noncomputable def min_fp :=
(@min_finite f).to_float
lemma min_fp_canonical :
@canonical 2 f.to_format (@m... | import Flops.P3109.Defs
variable {f : p3109_format}
namespace p3109_format
namespace p3109
noncomputable def max_fp :=
(@max_finite f).to_float
lemma max_is_finite :
(@max_finite f).is_finite := by
simp [max_finite]
split; simp [is_finite]
simp [is_finite]
lemma min_is_finite :
(@min_finite f).is_finite... | @@ -7,8 +7,21 @@
noncomputable def max_fp :=
(@max_finite f).to_float
+lemma max_is_finite :
+ (@max_finite f).is_finite := by
+ simp [max_finite]
+ split; simp [is_finite]
+ simp [is_finite]
+
lemma min_is_finite :
- (@min_finite f).is_finite := sorry
+ (@min_finite f).is_finite := by
+ simp [min_finite]... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_2a1561655d64_12 | 1deef86975ab9747 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/MinMax.lean | MinMax | 12 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 7 | 11 | [
{
"theorem_name": "max_m_nonneg",
"depth": 1,
"n_commands": 0,
"n_lines": 17,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have := @max_is_finite f\n revert this\n rcases heq : @max_finite f with _|_|⟨m, e, _, _⟩ <;> simp [is_finite]\n simp [max... | [
{
"name": "max_is_finite",
"text": "lemma max_is_finite :\n (@max_finite f).is_finite := by\n simp [max_finite]\n split; simp [is_finite]\n simp [is_finite]\n\n",
"fan_in": 11,
"n_lines": 7,
"n_chars": 122,
"n_subproofs": 0,
"n_tactics": 5,
"cyclomatic": 2,
"n_automation": 3,... | [
{
"name": "max_fp_bounded",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 11,
"n_chars": 259,
"n_subproofs": 1,
"n_tactics": 9,
"cyclomatic": 3,
"n_automation": 3,
"n_rewrites": 0,
"n_structural": 3,
"automation_only": false,
"max_nesting... | 1 | import Flops.P3109.Defs
variable {f : p3109_format}
namespace p3109_format
namespace p3109
noncomputable def max_fp :=
(@max_finite f).to_float
noncomputable def min_fp :=
(@min_finite f).to_float
lemma max_fp_bounded :
@bounded_float 2 f.to_format (@max_fp f) := sorry
| import Flops.P3109.Defs
variable {f : p3109_format}
namespace p3109_format
namespace p3109
noncomputable def max_fp :=
(@max_finite f).to_float
lemma max_is_finite :
(@max_finite f).is_finite := by
simp [max_finite]
split; simp [is_finite]
simp [is_finite]
noncomputable def min_fp :=
(@min_finite f).to_... | @@ -7,10 +7,23 @@
noncomputable def max_fp :=
(@max_finite f).to_float
+lemma max_is_finite :
+ (@max_finite f).is_finite := by
+ simp [max_finite]
+ split; simp [is_finite]
+ simp [is_finite]
+
noncomputable def min_fp :=
(@min_finite f).to_float
lemma max_fp_bounded :
- @bounded_float 2 f.to_format ... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_4aff2ef4381d_2 | b7451e8ae6d2d208 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/Projection.lean | Projection | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 5 | 3 | [
{
"theorem_name": "encode_eq_to_p3109",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n exact @finite_encode_self f (to_p3109 v hcan hle) (by simp [to_p3109, is_finite]) hvs",
"n_chars": 91,
"n_subpro... | [
{
"name": "finite_encode_self",
"text": "lemma finite_encode_self {x : p3109 f} :\n x.is_finite →\n (h : Sum.inl (x:EReal) ∈ value_set f) →\n @encode f (Sum.inl x) h = x := by\n rcases heq:x <;> simp [is_finite]\n simp [value_set]\n intro x h\n expose_names\n simp [to_ereal]\n norm_cast\n simp_rw ... | [
{
"name": "encode_eq_to_p3109",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 8,
"n_chars": 377,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": false,
"max_nest... | 1 | import Flops.P3109.Rounding
variable {f : p3109_format}
variable (domain_sat_consistent : ∀ (sat : SaturationMode), f.d = .finite → ¬sat = .SatFinite → False)
include domain_sat_consistent
set_option maxHeartbeats 500000
namespace p3109_format
namespace p3109
noncomputable def project (x : EReal) (rnd : RoundingMod... | import Flops.P3109.Rounding
variable {f : p3109_format}
variable (domain_sat_consistent : ∀ (sat : SaturationMode), f.d = .finite → ¬sat = .SatFinite → False)
include domain_sat_consistent
set_option maxHeartbeats 500000
namespace p3109_format
namespace p3109
noncomputable def project (x : EReal) (rnd : RoundingMod... | @@ -16,10 +16,67 @@
e
omit domain_sat_consistent in
+lemma finite_encode_self {x : p3109 f} :
+ x.is_finite →
+ (h : Sum.inl (x:EReal) ∈ value_set f) →
+ @encode f (Sum.inl x) h = x := by
+ rcases heq:x <;> simp [is_finite]
+ simp [value_set]
+ intro x h
+ expose_names
+ simp [to_ereal]
+ norm_cast
+ si... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_a587299285c5_0 | 5c1d986f87552799 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/RoundingProjection.lean | RoundingProjection | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 16 | 1 | [
{
"theorem_name": "saturate_round_RD_le",
"depth": 1,
"n_commands": 0,
"n_lines": 21,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hrd_le : @round_to_precision_real f x .RD ≤ x := by\n simp [round_to_precision_eq, round_to_precision_generic... | [
{
"name": "saturate_overflow_RD",
"text": "/-- When the rounded value > max_finite, saturate with RD clips to max_finite\n (never produces ⊤). -/\nlemma saturate_overflow_RD (v : ℝ) (sat : SaturationMode)\n (hv : @max_finite f < (v : EReal)) :\n @saturate f v sat .RD = @max_finite f := by\n unfold sat... | [
{
"name": "saturate_round_RD_le",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 26,
"n_chars": 1555,
"n_subproofs": 5,
"n_tactics": 26,
"cyclomatic": 1,
"n_automation": 3,
"n_rewrites": 9,
"n_structural": 9,
"automation_only": false,
"max... | 1 | /-
Lifting rounding mode properties to `project` for all extended real values.
This file proves that the mode-specific correctness properties of
`round_to_precision` (RD, RU, RZ, RNE, RNA) extend to the full `project`
function, which includes saturation and encoding.
## Main results
### Properties of `ro... | /-
Lifting rounding mode properties to `project` for all extended real values.
This file proves that the mode-specific correctness properties of
`round_to_precision` (RD, RU, RZ, RNE, RNA) extend to the full `project`
function, which includes saturation and encoding.
## Main results
### Properties of `ro... | @@ -43,6 +43,28 @@
/-! ### Properties of `round_to_precision` for all EReal -/
+/-- When the rounded value > max_finite, saturate with RD clips to max_finite
+ (never produces ⊤). -/
+lemma saturate_overflow_RD (v : ℝ) (sat : SaturationMode)
+ (hv : @max_finite f < (v : EReal)) :
+ @saturate f v sat .RD = @max_... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_a587299285c5_1 | c3c8846bf35204f2 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/RoundingProjection.lean | RoundingProjection | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 16 | 1 | [
{
"theorem_name": "saturate_round_RU_ge",
"depth": 1,
"n_commands": 0,
"n_lines": 21,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hru_ge : x ≤ @round_to_precision_real f x .RU := by\n simp [round_to_precision_eq, round_to_precision_generic... | [
{
"name": "saturate_underflow_RU",
"text": "/-- When the rounded value < min_finite, saturate with RU clips to min_finite\n (never produces ⊥). -/\nlemma saturate_underflow_RU (v : ℝ) (sat : SaturationMode)\n (hv : (v : EReal) < @min_finite f) :\n @saturate f v sat .RU = @min_finite f := by\n contrapo... | [
{
"name": "saturate_round_RU_ge",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 29,
"n_chars": 1606,
"n_subproofs": 5,
"n_tactics": 26,
"cyclomatic": 1,
"n_automation": 3,
"n_rewrites": 9,
"n_structural": 9,
"automation_only": false,
"max... | 1 | /-
Lifting rounding mode properties to `project` for all extended real values.
This file proves that the mode-specific correctness properties of
`round_to_precision` (RD, RU, RZ, RNE, RNA) extend to the full `project`
function, which includes saturation and encoding.
## Main results
### Properties of `ro... | /-
Lifting rounding mode properties to `project` for all extended real values.
This file proves that the mode-specific correctness properties of
`round_to_precision` (RD, RU, RZ, RNE, RNA) extend to the full `project`
function, which includes saturation and encoding.
## Main results
### Properties of `ro... | @@ -43,6 +43,20 @@
/-! ### Properties of `round_to_precision` for all EReal -/
+/-- When the rounded value < min_finite, saturate with RU clips to min_finite
+ (never produces ⊥). -/
+lemma saturate_underflow_RU (v : ℝ) (sat : SaturationMode)
+ (hv : (v : EReal) < @min_finite f) :
+ @saturate f v sat .RU = @min... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_a587299285c5_2 | ef57d988574e3839 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/RoundingProjection.lean | RoundingProjection | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 16 | 1 | [
{
"theorem_name": "saturate_round_RZ_le_of_nonneg",
"depth": 1,
"n_commands": 0,
"n_lines": 33,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n -- By definition of saturation, we know that if the round result is within the bounds, then the saturat... | [
{
"name": "round_to_precision_RZ_le_of_nonneg",
"text": "/-- RZ rounds toward zero for nonnegative inputs. -/\nlemma round_to_precision_RZ_le_of_nonneg (x : EReal) :\n 0 ≤ x → @round_to_precision f x .RZ ≤ x := by\n cases x with\n | bot => simp\n | top => simp [round_to_precision]\n | coe r =>\n int... | [
{
"name": "saturate_round_RZ_le_of_nonneg",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 40,
"n_chars": 2546,
"n_subproofs": 4,
"n_tactics": 66,
"cyclomatic": 8,
"n_automation": 21,
"n_rewrites": 4,
"n_structural": 10,
"automation_only": fal... | 2 | /-
Lifting rounding mode properties to `project` for all extended real values.
This file proves that the mode-specific correctness properties of
`round_to_precision` (RD, RU, RZ, RNE, RNA) extend to the full `project`
function, which includes saturation and encoding.
## Main results
### Properties of `ro... | /-
Lifting rounding mode properties to `project` for all extended real values.
This file proves that the mode-specific correctness properties of
`round_to_precision` (RD, RU, RZ, RNE, RNA) extend to the full `project`
function, which includes saturation and encoding.
## Main results
### Properties of `ro... | @@ -43,6 +43,21 @@
/-! ### Properties of `round_to_precision` for all EReal -/
+/-- RZ rounds toward zero for nonnegative inputs. -/
+lemma round_to_precision_RZ_le_of_nonneg (x : EReal) :
+ 0 ≤ x → @round_to_precision f x .RZ ≤ x := by
+ cases x with
+ | bot => simp
+ | top => simp [round_to_precision]
+ | c... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_a587299285c5_4 | 8e1f0494429277d9 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/RoundingProjection.lean | RoundingProjection | 4 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 16 | 1 | [
{
"theorem_name": "project_ereal_eq_saturate",
"depth": 1,
"n_commands": 0,
"n_lines": 3,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [project]\n exact encode_to_ereal _ _",
"n_chars": 53,
"n_subproofs": 0,
"n_tactics": 3,
... | [
{
"name": "encode_to_ereal",
"text": "lemma encode_to_ereal (v : EReal) (h : Sum.inl v ∈ value_set f) :\n (@encode f (Sum.inl v) h : EReal) = v := by\n rcases v with ( _ | _ | v );\n · obtain ⟨ x, hx ⟩ := h;\n cases x <;> tauto;\n · tauto;\n · by_cases hv : v = 0\n · sub... | [
{
"name": "project_ereal_eq_saturate",
"fan_in": 5,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 8,
"n_chars": 342,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": false,
"m... | 1 | /-
Lifting rounding mode properties to `project` for all extended real values.
This file proves that the mode-specific correctness properties of
`round_to_precision` (RD, RU, RZ, RNE, RNA) extend to the full `project`
function, which includes saturation and encoding.
## Main results
### Properties of `ro... | /-
Lifting rounding mode properties to `project` for all extended real values.
This file proves that the mode-specific correctness properties of
`round_to_precision` (RD, RU, RZ, RNE, RNA) extend to the full `project`
function, which includes saturation and encoding.
## Main results
### Properties of `ro... | @@ -43,13 +43,29 @@
/-! ### Properties of `round_to_precision` for all EReal -/
+lemma encode_to_ereal (v : EReal) (h : Sum.inl v ∈ value_set f) :
+ (@encode f (Sum.inl v) h : EReal) = v := by
+ rcases v with ( _ | _ | v );
+ · obtain ⟨ x, hx ⟩ := h;
+ cases x <;> tauto;
+ · tauto;
+ ... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_a587299285c5_5 | 5790d21a271abfd0 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/RoundingProjection.lean | RoundingProjection | 5 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 16 | 1 | [
{
"theorem_name": "saturate_round_RD_le",
"depth": 1,
"n_commands": 0,
"n_lines": 21,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hrd_le : @round_to_precision_real f x .RD ≤ x := by\n simp [round_to_precision_eq, round_to_precision_generic... | [
{
"name": "saturate_overflow_RD",
"text": "/-- When the rounded value > max_finite, saturate with RD clips to max_finite\n (never produces ⊤). -/\nlemma saturate_overflow_RD (v : ℝ) (sat : SaturationMode)\n (hv : @max_finite f < (v : EReal)) :\n @saturate f v sat .RD = @max_finite f := by\n unfold sat... | [
{
"name": "project_RD_le",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 4,
"n_lines": 8,
"n_chars": 288,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 1,
"n_structural": 1,
"automation_only": false,
"max_nesting":... | 4 | /-
Lifting rounding mode properties to `project` for all extended real values.
This file proves that the mode-specific correctness properties of
`round_to_precision` (RD, RU, RZ, RNE, RNA) extend to the full `project`
function, which includes saturation and encoding.
## Main results
### Properties of `ro... | /-
Lifting rounding mode properties to `project` for all extended real values.
This file proves that the mode-specific correctness properties of
`round_to_precision` (RD, RU, RZ, RNE, RNA) extend to the full `project`
function, which includes saturation and encoding.
## Main results
### Properties of `ro... | @@ -43,6 +43,28 @@
/-! ### Properties of `round_to_precision` for all EReal -/
+/-- When the rounded value > max_finite, saturate with RD clips to max_finite
+ (never produces ⊤). -/
+lemma saturate_overflow_RD (v : ℝ) (sat : SaturationMode)
+ (hv : @max_finite f < (v : EReal)) :
+ @saturate f v sat .RD = @max_... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_a587299285c5_6 | 9184044054826241 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/RoundingProjection.lean | RoundingProjection | 6 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 16 | 1 | [
{
"theorem_name": "saturate_round_RU_ge",
"depth": 1,
"n_commands": 0,
"n_lines": 21,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hru_ge : x ≤ @round_to_precision_real f x .RU := by\n simp [round_to_precision_eq, round_to_precision_generic... | [
{
"name": "saturate_underflow_RU",
"text": "/-- When the rounded value < min_finite, saturate with RU clips to min_finite\n (never produces ⊥). -/\nlemma saturate_underflow_RU (v : ℝ) (sat : SaturationMode)\n (hv : (v : EReal) < @min_finite f) :\n @saturate f v sat .RU = @min_finite f := by\n contrapo... | [
{
"name": "project_RU_ge",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 4,
"n_lines": 8,
"n_chars": 288,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 1,
"n_structural": 1,
"automation_only": false,
"max_nesting":... | 4 | /-
Lifting rounding mode properties to `project` for all extended real values.
This file proves that the mode-specific correctness properties of
`round_to_precision` (RD, RU, RZ, RNE, RNA) extend to the full `project`
function, which includes saturation and encoding.
## Main results
### Properties of `ro... | /-
Lifting rounding mode properties to `project` for all extended real values.
This file proves that the mode-specific correctness properties of
`round_to_precision` (RD, RU, RZ, RNE, RNA) extend to the full `project`
function, which includes saturation and encoding.
## Main results
### Properties of `ro... | @@ -43,6 +43,20 @@
/-! ### Properties of `round_to_precision` for all EReal -/
+/-- When the rounded value < min_finite, saturate with RU clips to min_finite
+ (never produces ⊥). -/
+lemma saturate_underflow_RU (v : ℝ) (sat : SaturationMode)
+ (hv : (v : EReal) < @min_finite f) :
+ @saturate f v sat .RU = @min... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_a587299285c5_7 | 9463a497134f50c1 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/RoundingProjection.lean | RoundingProjection | 7 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 16 | 1 | [
{
"theorem_name": "saturate_round_RZ_le_of_nonneg",
"depth": 1,
"n_commands": 0,
"n_lines": 33,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n -- By definition of saturation, we know that if the round result is within the bounds, then the saturat... | [
{
"name": "round_to_precision_RZ_le_of_nonneg",
"text": "/-- RZ rounds toward zero for nonnegative inputs. -/\nlemma round_to_precision_RZ_le_of_nonneg (x : EReal) :\n 0 ≤ x → @round_to_precision f x .RZ ≤ x := by\n cases x with\n | bot => simp\n | top => simp [round_to_precision]\n | coe r =>\n int... | [
{
"name": "project_RZ_le_of_nonneg",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 5,
"n_lines": 7,
"n_chars": 275,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 1,
"n_structural": 1,
"automation_only": false,
"max... | 5 | /-
Lifting rounding mode properties to `project` for all extended real values.
This file proves that the mode-specific correctness properties of
`round_to_precision` (RD, RU, RZ, RNE, RNA) extend to the full `project`
function, which includes saturation and encoding.
## Main results
### Properties of `ro... | /-
Lifting rounding mode properties to `project` for all extended real values.
This file proves that the mode-specific correctness properties of
`round_to_precision` (RD, RU, RZ, RNE, RNA) extend to the full `project`
function, which includes saturation and encoding.
## Main results
### Properties of `ro... | @@ -43,6 +43,21 @@
/-! ### Properties of `round_to_precision` for all EReal -/
+/-- RZ rounds toward zero for nonnegative inputs. -/
+lemma round_to_precision_RZ_le_of_nonneg (x : EReal) :
+ 0 ≤ x → @round_to_precision f x .RZ ≤ x := by
+ cases x with
+ | bot => simp
+ | top => simp [round_to_precision]
+ | c... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_a587299285c5_9 | 83f89175177d75e5 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/RoundingProjection.lean | RoundingProjection | 9 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 16 | 1 | [
{
"theorem_name": "project_ereal_eq_saturate",
"depth": 1,
"n_commands": 0,
"n_lines": 3,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [project]\n exact encode_to_ereal _ _",
"n_chars": 53,
"n_subproofs": 0,
"n_tactics": 3,
... | [
{
"name": "encode_to_ereal",
"text": "lemma encode_to_ereal (v : EReal) (h : Sum.inl v ∈ value_set f) :\n (@encode f (Sum.inl v) h : EReal) = v := by\n rcases v with ( _ | _ | v );\n · obtain ⟨ x, hx ⟩ := h;\n cases x <;> tauto;\n · tauto;\n · by_cases hv : v = 0\n · sub... | [
{
"name": "project_finite_underflow_real",
"fan_in": 2,
"n_deps_direct": 1,
"n_deps_transitive": 2,
"n_lines": 33,
"n_chars": 2009,
"n_subproofs": 9,
"n_tactics": 41,
"cyclomatic": 6,
"n_automation": 8,
"n_rewrites": 4,
"n_structural": 8,
"automation_only": false,... | 2 | /-
Lifting rounding mode properties to `project` for all extended real values.
This file proves that the mode-specific correctness properties of
`round_to_precision` (RD, RU, RZ, RNE, RNA) extend to the full `project`
function, which includes saturation and encoding.
## Main results
### Properties of `ro... | /-
Lifting rounding mode properties to `project` for all extended real values.
This file proves that the mode-specific correctness properties of
`round_to_precision` (RD, RU, RZ, RNE, RNA) extend to the full `project`
function, which includes saturation and encoding.
## Main results
### Properties of `ro... | @@ -43,13 +43,29 @@
/-! ### Properties of `round_to_precision` for all EReal -/
+lemma encode_to_ereal (v : EReal) (h : Sum.inl v ∈ value_set f) :
+ (@encode f (Sum.inl v) h : EReal) = v := by
+ rcases v with ( _ | _ | v );
+ · obtain ⟨ x, hx ⟩ := h;
+ cases x <;> tauto;
+ · tauto;
+ ... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_a587299285c5_10 | 8937d087d537d473 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/RoundingProjection.lean | RoundingProjection | 10 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 16 | 1 | [
{
"theorem_name": "project_RNE_nearest_finite",
"depth": 1,
"n_commands": 0,
"n_lines": 18,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro p hp g hg\n by_cases hle_max : x ≤ @max_finite f\n · by_cases hge_min : @min_finite f ≤ x\n · rw [pr... | [
{
"name": "round_to_precision_RNE_nearest",
"text": "/-- RNE is nearest for real inputs: among all bounded floats, `round_to_fp .RNE x`\n minimizes the distance to `x`. -/\nlemma round_to_precision_RNE_nearest (x : ℝ) :\n @nearest 2 f.to_format x (@round_to_fp f .RNE x) := by\n simp [round_to_fp]\n exac... | [
{
"name": "project_RNE_nearest_finite",
"fan_in": 0,
"n_deps_direct": 4,
"n_deps_transitive": 6,
"n_lines": 33,
"n_chars": 1781,
"n_subproofs": 4,
"n_tactics": 21,
"cyclomatic": 3,
"n_automation": 7,
"n_rewrites": 5,
"n_structural": 3,
"automation_only": false,
... | 6 | /-
Lifting rounding mode properties to `project` for all extended real values.
This file proves that the mode-specific correctness properties of
`round_to_precision` (RD, RU, RZ, RNE, RNA) extend to the full `project`
function, which includes saturation and encoding.
## Main results
### Properties of `ro... | /-
Lifting rounding mode properties to `project` for all extended real values.
This file proves that the mode-specific correctness properties of
`round_to_precision` (RD, RU, RZ, RNE, RNA) extend to the full `project`
function, which includes saturation and encoding.
## Main results
### Properties of `ro... | @@ -43,6 +43,13 @@
/-! ### Properties of `round_to_precision` for all EReal -/
+/-- RNE is nearest for real inputs: among all bounded floats, `round_to_fp .RNE x`
+ minimizes the distance to `x`. -/
+lemma round_to_precision_RNE_nearest (x : ℝ) :
+ @nearest 2 f.to_format x (@round_to_fp f .RNE x) := by
+ simp [... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_a587299285c5_11 | d60d55abd8734031 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/RoundingProjection.lean | RoundingProjection | 11 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 16 | 1 | [
{
"theorem_name": "project_RNA_nearest_finite",
"depth": 1,
"n_commands": 0,
"n_lines": 18,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro p hp g hg\n by_cases hle_max : x ≤ @max_finite f\n · by_cases hge_min : @min_finite f ≤ x\n · rw [pr... | [
{
"name": "round_to_precision_RNA_nearest",
"text": "/-- RNA is nearest for real inputs: among all bounded floats, `round_to_fp .RNA x`\n minimizes the distance to `x`. -/\nlemma round_to_precision_RNA_nearest (x : ℝ) :\n @nearest 2 f.to_format x (@round_to_fp f .RNA x) := by\n simp [round_to_fp, rna_flo... | [
{
"name": "project_RNA_nearest_finite",
"fan_in": 0,
"n_deps_direct": 4,
"n_deps_transitive": 6,
"n_lines": 27,
"n_chars": 1422,
"n_subproofs": 4,
"n_tactics": 21,
"cyclomatic": 3,
"n_automation": 7,
"n_rewrites": 5,
"n_structural": 3,
"automation_only": false,
... | 6 | /-
Lifting rounding mode properties to `project` for all extended real values.
This file proves that the mode-specific correctness properties of
`round_to_precision` (RD, RU, RZ, RNE, RNA) extend to the full `project`
function, which includes saturation and encoding.
## Main results
### Properties of `ro... | /-
Lifting rounding mode properties to `project` for all extended real values.
This file proves that the mode-specific correctness properties of
`round_to_precision` (RD, RU, RZ, RNE, RNA) extend to the full `project`
function, which includes saturation and encoding.
## Main results
### Properties of `ro... | @@ -43,6 +43,15 @@
/-! ### Properties of `round_to_precision` for all EReal -/
+/-- RNA is nearest for real inputs: among all bounded floats, `round_to_fp .RNA x`
+ minimizes the distance to `x`. -/
+lemma round_to_precision_RNA_nearest (x : ℝ) :
+ @nearest 2 f.to_format x (@round_to_fp f .RNA x) := by
+ simp [... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_9213f5332421_0 | faa026b579714a25 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/Fast2SumAux.lean | Fast2SumAux | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 12 | 2 | [
{
"theorem_name": "fast2sum_nonneg_case",
"depth": 1,
"n_commands": 0,
"n_lines": 18,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro hs ha ha' hab h;\n refine' abs_sub_le_iff.mpr ⟨ _, _ ⟩;\n · refine' le_trans ( sub_le_sub_right ( weakl... | [
{
"name": "p3109_abs_le_max_finite",
"text": "lemma p3109_abs_le_max_finite (a : float 2) :\n f.s = .signed →\n @canonical_p3109 f a →\n |(a : ℝ)| ≤ @max_finite f := by\n cases a;\n rename_i m e;\n intro hs hcan\n have h_finite : p3109.p3109_finite m e (by\n aesop) hcan ∈ {x : p3109 f | x.... | [
{
"name": "fast2sum_nonneg_case",
"fan_in": 2,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 30,
"n_chars": 1077,
"n_subproofs": 0,
"n_tactics": 34,
"cyclomatic": 1,
"n_automation": 6,
"n_rewrites": 1,
"n_structural": 7,
"automation_only": false,
"max... | 1 | import Flops.Core.Fast2SumOp
import Flops.P3109.Rounding
import Flops.P3109.RoundingError
set_option maxHeartbeats 500000
-- kinda ugly, but it works
namespace p3109_format
namespace p3109
/-
Helper: |a| ≤ max_finite for canonical_p3109 values in signed format
-/
lemma fast2sum_nonneg_case [Faithful rnd] (a b : floa... | import Flops.Core.Fast2SumOp
import Flops.P3109.Rounding
import Flops.P3109.RoundingError
set_option maxHeartbeats 500000
-- kinda ugly, but it works
namespace p3109_format
namespace p3109
/-
Helper: |a| ≤ max_finite for canonical_p3109 values in signed format
-/
lemma p3109_abs_le_max_finite (a : float 2) :
f.s =... | @@ -11,6 +11,28 @@
/-
Helper: |a| ≤ max_finite for canonical_p3109 values in signed format
-/
+lemma p3109_abs_le_max_finite (a : float 2) :
+ f.s = .signed →
+ @canonical_p3109 f a →
+ |(a : ℝ)| ≤ @max_finite f := by
+ cases a;
+ rename_i m e;
+ intro hs hcan
+ have h_finite : p3109.p3109_finite m e ... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_9213f5332421_1 | 9fd607ea88dee22e | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/Fast2SumAux.lean | Fast2SumAux | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 12 | 2 | [
{
"theorem_name": "fast2sum_nonneg_case",
"depth": 1,
"n_commands": 0,
"n_lines": 18,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro hs ha ha' hab h;\n refine' abs_sub_le_iff.mpr ⟨ _, _ ⟩;\n · refine' le_trans ( sub_le_sub_right ( weakl... | [
{
"name": "p3109_abs_le_max_finite",
"text": "lemma p3109_abs_le_max_finite (a : float 2) :\n f.s = .signed →\n @canonical_p3109 f a →\n |(a : ℝ)| ≤ @max_finite f := by\n cases a;\n rename_i m e;\n intro hs hcan\n have h_finite : p3109.p3109_finite m e (by\n aesop) hcan ∈ {x : p3109 f | x.... | [
{
"name": "fast2sum_neg_same_exp",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 31,
"n_chars": 1861,
"n_subproofs": 6,
"n_tactics": 41,
"cyclomatic": 7,
"n_automation": 19,
"n_rewrites": 4,
"n_structural": 10,
"automation_only": false,
"... | 1 | import Flops.Core.Fast2SumOp
import Flops.P3109.Rounding
import Flops.P3109.RoundingError
set_option maxHeartbeats 500000
-- kinda ugly, but it works
namespace p3109_format
namespace p3109
/-
Helper: |a| ≤ max_finite for canonical_p3109 values in signed format
-/
lemma fast2sum_neg_same_exp [Faithful rnd] (a b : flo... | import Flops.Core.Fast2SumOp
import Flops.P3109.Rounding
import Flops.P3109.RoundingError
set_option maxHeartbeats 500000
-- kinda ugly, but it works
namespace p3109_format
namespace p3109
/-
Helper: |a| ≤ max_finite for canonical_p3109 values in signed format
-/
lemma p3109_abs_le_max_finite (a : float 2) :
f.s =... | @@ -11,6 +11,28 @@
/-
Helper: |a| ≤ max_finite for canonical_p3109 values in signed format
-/
+lemma p3109_abs_le_max_finite (a : float 2) :
+ f.s = .signed →
+ @canonical_p3109 f a →
+ |(a : ℝ)| ≤ @max_finite f := by
+ cases a;
+ rename_i m e;
+ intro hs hcan
+ have h_finite : p3109.p3109_finite m e ... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_9213f5332421_5 | 28c975a1e41570c7 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/Fast2SumAux.lean | Fast2SumAux | 5 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 12 | 1 | [
{
"theorem_name": "fast2sum_p3109_overflow_immune_p1",
"depth": 1,
"n_commands": 0,
"n_lines": 15,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp\n intro hp hs ha hb hexp hno\n rcases le_or_gt (a:ℝ) 0 with hle|hlt\n have := @fast2sum_p1_immun... | [
{
"name": "fast2sum_p1_immune_aux",
"text": "lemma fast2sum_p1_immune_aux [Faithful rnd] (a b : float 2) :\n f.P = 1 →\n f.s = .signed →\n @canonical_p3109 f a →\n @canonical_p3109 f b →\n 0 ≤ (a:ℝ) →\n b.exp ≤ a.exp →\n let s := @round_fp f.to_format rnd (a + b);\n |(a+b:ℝ)| ≤ @max_finite f →\n |(... | [
{
"name": "fast2sum_p3109_overflow_immune_p1",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 26,
"n_chars": 864,
"n_subproofs": 2,
"n_tactics": 21,
"cyclomatic": 2,
"n_automation": 9,
"n_rewrites": 3,
"n_structural": 5,
"automation_only": fal... | 1 | import Flops.Core.Fast2SumOp
import Flops.P3109.Rounding
import Flops.P3109.RoundingError
set_option maxHeartbeats 500000
-- kinda ugly, but it works
namespace p3109_format
namespace p3109
/-
Helper: |a| ≤ max_finite for canonical_p3109 values in signed format
-/
lemma fast2sum_p3109_overflow_immune_p1 [Faithful rnd... | import Flops.Core.Fast2SumOp
import Flops.P3109.Rounding
import Flops.P3109.RoundingError
set_option maxHeartbeats 500000
-- kinda ugly, but it works
namespace p3109_format
namespace p3109
/-
Helper: |a| ≤ max_finite for canonical_p3109 values in signed format
-/
lemma fast2sum_p1_immune_aux [Faithful rnd] (a b : fl... | @@ -11,6 +11,96 @@
/-
Helper: |a| ≤ max_finite for canonical_p3109 values in signed format
-/
+lemma fast2sum_p1_immune_aux [Faithful rnd] (a b : float 2) :
+ f.P = 1 →
+ f.s = .signed →
+ @canonical_p3109 f a →
+ @canonical_p3109 f b →
+ 0 ≤ (a:ℝ) →
+ b.exp ≤ a.exp →
+ let s := @round_fp f.to_format rnd (a +... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_9213f5332421_6 | 339fb9efe9ad0650 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/Fast2SumAux.lean | Fast2SumAux | 6 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 12 | 1 | [
{
"theorem_name": "fast2sum_p3109_overflow_immune_p1",
"depth": 1,
"n_commands": 0,
"n_lines": 15,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp\n intro hp hs ha hb hexp hno\n rcases le_or_gt (a:ℝ) 0 with hle|hlt\n have := @fast2sum_p1_immun... | [
{
"name": "fast2sum_p1_immune_aux",
"text": "lemma fast2sum_p1_immune_aux [Faithful rnd] (a b : float 2) :\n f.P = 1 →\n f.s = .signed →\n @canonical_p3109 f a →\n @canonical_p3109 f b →\n 0 ≤ (a:ℝ) →\n b.exp ≤ a.exp →\n let s := @round_fp f.to_format rnd (a + b);\n |(a+b:ℝ)| ≤ @max_finite f →\n |(... | [
{
"name": "fast2sum_p3109_s_no_overflow_z_no_overflow_p1",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 2,
"n_lines": 18,
"n_chars": 584,
"n_subproofs": 0,
"n_tactics": 7,
"cyclomatic": 3,
"n_automation": 2,
"n_rewrites": 0,
"n_structural": 2,
"automation... | 2 | import Flops.Core.Fast2SumOp
import Flops.P3109.Rounding
import Flops.P3109.RoundingError
set_option maxHeartbeats 500000
-- kinda ugly, but it works
namespace p3109_format
namespace p3109
/-
Helper: |a| ≤ max_finite for canonical_p3109 values in signed format
-/
lemma fast2sum_p3109_overflow_immune_p1 [Faithful rnd... | import Flops.Core.Fast2SumOp
import Flops.P3109.Rounding
import Flops.P3109.RoundingError
set_option maxHeartbeats 500000
-- kinda ugly, but it works
namespace p3109_format
namespace p3109
/-
Helper: |a| ≤ max_finite for canonical_p3109 values in signed format
-/
lemma fast2sum_p1_immune_aux [Faithful rnd] (a b : fl... | @@ -11,6 +11,96 @@
/-
Helper: |a| ≤ max_finite for canonical_p3109 values in signed format
-/
+lemma fast2sum_p1_immune_aux [Faithful rnd] (a b : float 2) :
+ f.P = 1 →
+ f.s = .signed →
+ @canonical_p3109 f a →
+ @canonical_p3109 f b →
+ 0 ≤ (a:ℝ) →
+ b.exp ≤ a.exp →
+ let s := @round_fp f.to_format rnd (a +... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_9213f5332421_7 | 2174f27024b585c0 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/Fast2SumAux.lean | Fast2SumAux | 7 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 12 | 2 | [
{
"theorem_name": "fast2sum_nonneg_case",
"depth": 1,
"n_commands": 0,
"n_lines": 18,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro hs ha ha' hab h;\n refine' abs_sub_le_iff.mpr ⟨ _, _ ⟩;\n · refine' le_trans ( sub_le_sub_right ( weakl... | [
{
"name": "p3109_abs_le_max_finite",
"text": "lemma p3109_abs_le_max_finite (a : float 2) :\n f.s = .signed →\n @canonical_p3109 f a →\n |(a : ℝ)| ≤ @max_finite f := by\n cases a;\n rename_i m e;\n intro hs hcan\n have h_finite : p3109.p3109_finite m e (by\n aesop) hcan ∈ {x : p3109 f | x.... | [
{
"name": "fast2sum_p2_immune_aux",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 3,
"n_lines": 49,
"n_chars": 2724,
"n_subproofs": 9,
"n_tactics": 72,
"cyclomatic": 10,
"n_automation": 28,
"n_rewrites": 4,
"n_structural": 16,
"automation_only": false,
... | 3 | import Flops.Core.Fast2SumOp
import Flops.P3109.Rounding
import Flops.P3109.RoundingError
set_option maxHeartbeats 500000
-- kinda ugly, but it works
namespace p3109_format
namespace p3109
/-
Helper: |a| ≤ max_finite for canonical_p3109 values in signed format
-/
lemma fast2sum_nonneg_case [Faithful rnd] (a b : floa... | import Flops.Core.Fast2SumOp
import Flops.P3109.Rounding
import Flops.P3109.RoundingError
set_option maxHeartbeats 500000
-- kinda ugly, but it works
namespace p3109_format
namespace p3109
/-
Helper: |a| ≤ max_finite for canonical_p3109 values in signed format
-/
lemma p3109_abs_le_max_finite (a : float 2) :
f.s =... | @@ -11,6 +11,28 @@
/-
Helper: |a| ≤ max_finite for canonical_p3109 values in signed format
-/
+lemma p3109_abs_le_max_finite (a : float 2) :
+ f.s = .signed →
+ @canonical_p3109 f a →
+ |(a : ℝ)| ≤ @max_finite f := by
+ cases a;
+ rename_i m e;
+ intro hs hcan
+ have h_finite : p3109.p3109_finite m e ... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_9213f5332421_8 | 00f2dfc2861a6da9 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/Fast2SumAux.lean | Fast2SumAux | 8 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 12 | 2 | [
{
"theorem_name": "fast2sum_nonneg_case",
"depth": 1,
"n_commands": 0,
"n_lines": 18,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro hs ha ha' hab h;\n refine' abs_sub_le_iff.mpr ⟨ _, _ ⟩;\n · refine' le_trans ( sub_le_sub_right ( weakl... | [
{
"name": "p3109_abs_le_max_finite",
"text": "lemma p3109_abs_le_max_finite (a : float 2) :\n f.s = .signed →\n @canonical_p3109 f a →\n |(a : ℝ)| ≤ @max_finite f := by\n cases a;\n rename_i m e;\n intro hs hcan\n have h_finite : p3109.p3109_finite m e (by\n aesop) hcan ∈ {x : p3109 f | x.... | [
{
"name": "fast2sum_p3109_overflow_immune_p2",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 4,
"n_lines": 26,
"n_chars": 864,
"n_subproofs": 2,
"n_tactics": 21,
"cyclomatic": 2,
"n_automation": 9,
"n_rewrites": 3,
"n_structural": 5,
"automation_only": fal... | 4 | import Flops.Core.Fast2SumOp
import Flops.P3109.Rounding
import Flops.P3109.RoundingError
set_option maxHeartbeats 500000
-- kinda ugly, but it works
namespace p3109_format
namespace p3109
/-
Helper: |a| ≤ max_finite for canonical_p3109 values in signed format
-/
lemma fast2sum_nonneg_case [Faithful rnd] (a b : floa... | import Flops.Core.Fast2SumOp
import Flops.P3109.Rounding
import Flops.P3109.RoundingError
set_option maxHeartbeats 500000
-- kinda ugly, but it works
namespace p3109_format
namespace p3109
/-
Helper: |a| ≤ max_finite for canonical_p3109 values in signed format
-/
lemma p3109_abs_le_max_finite (a : float 2) :
f.s =... | @@ -11,6 +11,28 @@
/-
Helper: |a| ≤ max_finite for canonical_p3109 values in signed format
-/
+lemma p3109_abs_le_max_finite (a : float 2) :
+ f.s = .signed →
+ @canonical_p3109 f a →
+ |(a : ℝ)| ≤ @max_finite f := by
+ cases a;
+ rename_i m e;
+ intro hs hcan
+ have h_finite : p3109.p3109_finite m e ... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_9213f5332421_9 | aa83af961a017498 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/Fast2SumAux.lean | Fast2SumAux | 9 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 12 | 2 | [
{
"theorem_name": "fast2sum_nonneg_case",
"depth": 1,
"n_commands": 0,
"n_lines": 18,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro hs ha ha' hab h;\n refine' abs_sub_le_iff.mpr ⟨ _, _ ⟩;\n · refine' le_trans ( sub_le_sub_right ( weakl... | [
{
"name": "p3109_abs_le_max_finite",
"text": "lemma p3109_abs_le_max_finite (a : float 2) :\n f.s = .signed →\n @canonical_p3109 f a →\n |(a : ℝ)| ≤ @max_finite f := by\n cases a;\n rename_i m e;\n intro hs hcan\n have h_finite : p3109.p3109_finite m e (by\n aesop) hcan ∈ {x : p3109 f | x.... | [
{
"name": "fast2sum_p3109_s_no_overflow_z_no_overflow_p2",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 5,
"n_lines": 18,
"n_chars": 542,
"n_subproofs": 0,
"n_tactics": 7,
"cyclomatic": 3,
"n_automation": 2,
"n_rewrites": 0,
"n_structural": 2,
"automation... | 5 | import Flops.Core.Fast2SumOp
import Flops.P3109.Rounding
import Flops.P3109.RoundingError
set_option maxHeartbeats 500000
-- kinda ugly, but it works
namespace p3109_format
namespace p3109
/-
Helper: |a| ≤ max_finite for canonical_p3109 values in signed format
-/
lemma fast2sum_nonneg_case [Faithful rnd] (a b : floa... | import Flops.Core.Fast2SumOp
import Flops.P3109.Rounding
import Flops.P3109.RoundingError
set_option maxHeartbeats 500000
-- kinda ugly, but it works
namespace p3109_format
namespace p3109
/-
Helper: |a| ≤ max_finite for canonical_p3109 values in signed format
-/
lemma p3109_abs_le_max_finite (a : float 2) :
f.s =... | @@ -11,6 +11,28 @@
/-
Helper: |a| ≤ max_finite for canonical_p3109 values in signed format
-/
+lemma p3109_abs_le_max_finite (a : float 2) :
+ f.s = .signed →
+ @canonical_p3109 f a →
+ |(a : ℝ)| ≤ @max_finite f := by
+ cases a;
+ rename_i m e;
+ intro hs hcan
+ have h_finite : p3109.p3109_finite m e ... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_9213f5332421_10 | a66379e1a4a49385 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/Fast2SumAux.lean | Fast2SumAux | 10 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 12 | 2 | [
{
"theorem_name": "fast2sum_nonneg_case",
"depth": 1,
"n_commands": 0,
"n_lines": 18,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro hs ha ha' hab h;\n refine' abs_sub_le_iff.mpr ⟨ _, _ ⟩;\n · refine' le_trans ( sub_le_sub_right ( weakl... | [
{
"name": "p3109_abs_le_max_finite",
"text": "lemma p3109_abs_le_max_finite (a : float 2) :\n f.s = .signed →\n @canonical_p3109 f a →\n |(a : ℝ)| ≤ @max_finite f := by\n cases a;\n rename_i m e;\n intro hs hcan\n have h_finite : p3109.p3109_finite m e (by\n aesop) hcan ∈ {x : p3109 f | x.... | [
{
"name": "fast2sum_immune_to_overflow",
"fan_in": 0,
"n_deps_direct": 3,
"n_deps_transitive": 12,
"n_lines": 17,
"n_chars": 638,
"n_subproofs": 1,
"n_tactics": 9,
"cyclomatic": 3,
"n_automation": 4,
"n_rewrites": 0,
"n_structural": 6,
"automation_only": false,
... | 12 | import Flops.Core.Fast2SumOp
import Flops.P3109.Rounding
import Flops.P3109.RoundingError
set_option maxHeartbeats 500000
-- kinda ugly, but it works
namespace p3109_format
namespace p3109
/-
Helper: |a| ≤ max_finite for canonical_p3109 values in signed format
-/
lemma fast2sum_nonneg_case [Faithful rnd] (a b : floa... | import Flops.Core.Fast2SumOp
import Flops.P3109.Rounding
import Flops.P3109.RoundingError
set_option maxHeartbeats 500000
-- kinda ugly, but it works
namespace p3109_format
namespace p3109
/-
Helper: |a| ≤ max_finite for canonical_p3109 values in signed format
-/
lemma p3109_abs_le_max_finite (a : float 2) :
f.s =... | @@ -11,6 +11,28 @@
/-
Helper: |a| ≤ max_finite for canonical_p3109 values in signed format
-/
+lemma p3109_abs_le_max_finite (a : float 2) :
+ f.s = .signed →
+ @canonical_p3109 f a →
+ |(a : ℝ)| ≤ @max_finite f := by
+ cases a;
+ rename_i m e;
+ intro hs hcan
+ have h_finite : p3109.p3109_finite m e ... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_7c0063d53411_0 | b724ea1342f75676 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/RoundingAux.lean | RoundingAux | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 1 | 8 | [
{
"theorem_name": "roundup_mantissa_simp",
"depth": 1,
"n_commands": 0,
"n_lines": 42,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro hx\n have := @fexp_eq f _ hx\n simp at this\n rw [this]\n simp [scaled_mantissa]\n\n rcases lt_or_gt_of_n... | [
{
"name": "fexp_eq",
"text": "lemma fexp_eq (x : ℝ) :\n ¬x = 0 →\n let e1 := max (Int.log 2 |x|) (1-f.bias) - f.P + 1;\n let e2 := @fexp_real' f.to_format x;\n e1 = e2 := by\n intro hx\n simp [fexp_real', p3109_format.to_format, p3109_format.emin_lsb, p3109_format.emin, p3109_format.bias]\n omega\n\n... | [
{
"name": "roundup_mantissa_simp",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 51,
"n_chars": 1242,
"n_subproofs": 3,
"n_tactics": 46,
"cyclomatic": 4,
"n_automation": 16,
"n_rewrites": 11,
"n_structural": 3,
"automation_only": false,
"... | 1 | import Flops.Core.RoundOp
import Flops.Core.Sterbenz
import Flops.P3109.Defs
import Flops.P3109.MinMax
import Mathlib.Data.Real.Sign
import Mathlib.Order.BoundedOrder.Basic
variable {f : p3109_format}
lemma roundup_mantissa_simp (x : ℝ) :
¬x = 0 →
let E := max (Int.log 2 |x|) (1-f.bias) - f.P + 1;
let S := |x|... | import Flops.Core.RoundOp
import Flops.Core.Sterbenz
import Flops.P3109.Defs
import Flops.P3109.MinMax
import Mathlib.Data.Real.Sign
import Mathlib.Order.BoundedOrder.Basic
variable {f : p3109_format}
lemma fexp_eq (x : ℝ) :
¬x = 0 →
let e1 := max (Int.log 2 |x|) (1-f.bias) - f.P + 1;
let e2 := @fexp_real' f.t... | @@ -8,6 +8,16 @@
variable {f : p3109_format}
+lemma fexp_eq (x : ℝ) :
+ ¬x = 0 →
+ let e1 := max (Int.log 2 |x|) (1-f.bias) - f.P + 1;
+ let e2 := @fexp_real' f.to_format x;
+ e1 = e2 := by
+ intro hx
+ simp [fexp_real', p3109_format.to_format, p3109_format.emin_lsb, p3109_format.emin, p3109_format.bias]
+ ... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_7c0063d53411_1 | babb21ab70d96abd | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/RoundingAux.lean | RoundingAux | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 1 | 8 | [
{
"theorem_name": "roundup_mantissa_simp",
"depth": 1,
"n_commands": 0,
"n_lines": 42,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro hx\n have := @fexp_eq f _ hx\n simp at this\n rw [this]\n simp [scaled_mantissa]\n\n rcases lt_or_gt_of_n... | [
{
"name": "fexp_eq",
"text": "lemma fexp_eq (x : ℝ) :\n ¬x = 0 →\n let e1 := max (Int.log 2 |x|) (1-f.bias) - f.P + 1;\n let e2 := @fexp_real' f.to_format x;\n e1 = e2 := by\n intro hx\n simp [fexp_real', p3109_format.to_format, p3109_format.emin_lsb, p3109_format.emin, p3109_format.bias]\n omega\n\n... | [
{
"name": "rounddown_mantissa_simp",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 48,
"n_chars": 1298,
"n_subproofs": 7,
"n_tactics": 44,
"cyclomatic": 3,
"n_automation": 17,
"n_rewrites": 12,
"n_structural": 3,
"automation_only": false,
... | 1 | import Flops.Core.RoundOp
import Flops.Core.Sterbenz
import Flops.P3109.Defs
import Flops.P3109.MinMax
import Mathlib.Data.Real.Sign
import Mathlib.Order.BoundedOrder.Basic
variable {f : p3109_format}
lemma rounddown_mantissa_simp (x : ℝ) :
¬x = 0 →
let E := max (Int.log 2 |x|) (1-f.bias) - f.P + 1;
let S := |... | import Flops.Core.RoundOp
import Flops.Core.Sterbenz
import Flops.P3109.Defs
import Flops.P3109.MinMax
import Mathlib.Data.Real.Sign
import Mathlib.Order.BoundedOrder.Basic
variable {f : p3109_format}
lemma fexp_eq (x : ℝ) :
¬x = 0 →
let e1 := max (Int.log 2 |x|) (1-f.bias) - f.P + 1;
let e2 := @fexp_real' f.t... | @@ -8,6 +8,16 @@
variable {f : p3109_format}
+lemma fexp_eq (x : ℝ) :
+ ¬x = 0 →
+ let e1 := max (Int.log 2 |x|) (1-f.bias) - f.P + 1;
+ let e2 := @fexp_real' f.to_format x;
+ e1 = e2 := by
+ intro hx
+ simp [fexp_real', p3109_format.to_format, p3109_format.emin_lsb, p3109_format.emin, p3109_format.bias]
+ ... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_7c0063d53411_2 | 12bd2216ab73ca04 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/RoundingAux.lean | RoundingAux | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 1 | 8 | [
{
"theorem_name": "roundup_mantissa_simp",
"depth": 1,
"n_commands": 0,
"n_lines": 42,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro hx\n have := @fexp_eq f _ hx\n simp at this\n rw [this]\n simp [scaled_mantissa]\n\n rcases lt_or_gt_of_n... | [
{
"name": "fexp_eq",
"text": "lemma fexp_eq (x : ℝ) :\n ¬x = 0 →\n let e1 := max (Int.log 2 |x|) (1-f.bias) - f.P + 1;\n let e2 := @fexp_real' f.to_format x;\n e1 = e2 := by\n intro hx\n simp [fexp_real', p3109_format.to_format, p3109_format.emin_lsb, p3109_format.emin, p3109_format.bias]\n omega\n\n... | [
{
"name": "rto_mantissa_simp",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 79,
"n_chars": 2214,
"n_subproofs": 10,
"n_tactics": 90,
"cyclomatic": 9,
"n_automation": 38,
"n_rewrites": 21,
"n_structural": 13,
"automation_only": false,
"ma... | 1 | import Flops.Core.RoundOp
import Flops.Core.Sterbenz
import Flops.P3109.Defs
import Flops.P3109.MinMax
import Mathlib.Data.Real.Sign
import Mathlib.Order.BoundedOrder.Basic
variable {f : p3109_format}
lemma rto_mantissa_simp (x : ℝ) :
¬x = 0 →
let E := max (Int.log 2 |x|) (1-f.bias) - f.P + 1;
let S := |x| * 2... | import Flops.Core.RoundOp
import Flops.Core.Sterbenz
import Flops.P3109.Defs
import Flops.P3109.MinMax
import Mathlib.Data.Real.Sign
import Mathlib.Order.BoundedOrder.Basic
variable {f : p3109_format}
lemma fexp_eq (x : ℝ) :
¬x = 0 →
let e1 := max (Int.log 2 |x|) (1-f.bias) - f.P + 1;
let e2 := @fexp_real' f.t... | @@ -8,6 +8,16 @@
variable {f : p3109_format}
+lemma fexp_eq (x : ℝ) :
+ ¬x = 0 →
+ let e1 := max (Int.log 2 |x|) (1-f.bias) - f.P + 1;
+ let e2 := @fexp_real' f.to_format x;
+ e1 = e2 := by
+ intro hx
+ simp [fexp_real', p3109_format.to_format, p3109_format.emin_lsb, p3109_format.emin, p3109_format.bias]
+ ... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_7c0063d53411_3 | 1e004026f8cce915 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/RoundingAux.lean | RoundingAux | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 1 | 8 | [
{
"theorem_name": "roundup_mantissa_simp",
"depth": 1,
"n_commands": 0,
"n_lines": 42,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro hx\n have := @fexp_eq f _ hx\n simp at this\n rw [this]\n simp [scaled_mantissa]\n\n rcases lt_or_gt_of_n... | [
{
"name": "fexp_eq",
"text": "lemma fexp_eq (x : ℝ) :\n ¬x = 0 →\n let e1 := max (Int.log 2 |x|) (1-f.bias) - f.P + 1;\n let e2 := @fexp_real' f.to_format x;\n e1 = e2 := by\n intro hx\n simp [fexp_real', p3109_format.to_format, p3109_format.emin_lsb, p3109_format.emin, p3109_format.bias]\n omega\n\n... | [
{
"name": "sa_mantissa_simp",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 46,
"n_chars": 1294,
"n_subproofs": 4,
"n_tactics": 43,
"cyclomatic": 2,
"n_automation": 20,
"n_rewrites": 8,
"n_structural": 5,
"automation_only": false,
"max_ne... | 1 | import Flops.Core.RoundOp
import Flops.Core.Sterbenz
import Flops.P3109.Defs
import Flops.P3109.MinMax
import Mathlib.Data.Real.Sign
import Mathlib.Order.BoundedOrder.Basic
variable {f : p3109_format}
lemma sa_mantissa_simp (N:ℕ) (R:ℕ) (h : 0 ≤ R ∧ R < 2^N) (x : ℝ) :
¬x = 0 →
let E := max (Int.log 2 |x|) (1-f.bi... | import Flops.Core.RoundOp
import Flops.Core.Sterbenz
import Flops.P3109.Defs
import Flops.P3109.MinMax
import Mathlib.Data.Real.Sign
import Mathlib.Order.BoundedOrder.Basic
variable {f : p3109_format}
lemma fexp_eq (x : ℝ) :
¬x = 0 →
let e1 := max (Int.log 2 |x|) (1-f.bias) - f.P + 1;
let e2 := @fexp_real' f.t... | @@ -8,6 +8,16 @@
variable {f : p3109_format}
+lemma fexp_eq (x : ℝ) :
+ ¬x = 0 →
+ let e1 := max (Int.log 2 |x|) (1-f.bias) - f.P + 1;
+ let e2 := @fexp_real' f.to_format x;
+ e1 = e2 := by
+ intro hx
+ simp [fexp_real', p3109_format.to_format, p3109_format.emin_lsb, p3109_format.emin, p3109_format.bias]
+ ... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_7c0063d53411_4 | 25ac349f4a9d1960 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/RoundingAux.lean | RoundingAux | 4 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 1 | 8 | [
{
"theorem_name": "roundup_mantissa_simp",
"depth": 1,
"n_commands": 0,
"n_lines": 42,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro hx\n have := @fexp_eq f _ hx\n simp at this\n rw [this]\n simp [scaled_mantissa]\n\n rcases lt_or_gt_of_n... | [
{
"name": "fexp_eq",
"text": "lemma fexp_eq (x : ℝ) :\n ¬x = 0 →\n let e1 := max (Int.log 2 |x|) (1-f.bias) - f.P + 1;\n let e2 := @fexp_real' f.to_format x;\n e1 = e2 := by\n intro hx\n simp [fexp_real', p3109_format.to_format, p3109_format.emin_lsb, p3109_format.emin, p3109_format.bias]\n omega\n\n... | [
{
"name": "sb_mantissa_simp",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 45,
"n_chars": 1305,
"n_subproofs": 4,
"n_tactics": 43,
"cyclomatic": 2,
"n_automation": 20,
"n_rewrites": 8,
"n_structural": 5,
"automation_only": false,
"max_ne... | 1 | import Flops.Core.RoundOp
import Flops.Core.Sterbenz
import Flops.P3109.Defs
import Flops.P3109.MinMax
import Mathlib.Data.Real.Sign
import Mathlib.Order.BoundedOrder.Basic
variable {f : p3109_format}
lemma sb_mantissa_simp (N:ℕ) (R:ℕ) (h : 0 ≤ R ∧ R < 2^N) (x : ℝ) :
¬x = 0 →
let E := max (Int.log 2 |x|) (1-f.bi... | import Flops.Core.RoundOp
import Flops.Core.Sterbenz
import Flops.P3109.Defs
import Flops.P3109.MinMax
import Mathlib.Data.Real.Sign
import Mathlib.Order.BoundedOrder.Basic
variable {f : p3109_format}
lemma fexp_eq (x : ℝ) :
¬x = 0 →
let e1 := max (Int.log 2 |x|) (1-f.bias) - f.P + 1;
let e2 := @fexp_real' f.t... | @@ -8,6 +8,16 @@
variable {f : p3109_format}
+lemma fexp_eq (x : ℝ) :
+ ¬x = 0 →
+ let e1 := max (Int.log 2 |x|) (1-f.bias) - f.P + 1;
+ let e2 := @fexp_real' f.to_format x;
+ e1 = e2 := by
+ intro hx
+ simp [fexp_real', p3109_format.to_format, p3109_format.emin_lsb, p3109_format.emin, p3109_format.bias]
+ ... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_7c0063d53411_5 | bb4d6020fb71c04c | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/RoundingAux.lean | RoundingAux | 5 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 1 | 8 | [
{
"theorem_name": "roundup_mantissa_simp",
"depth": 1,
"n_commands": 0,
"n_lines": 42,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro hx\n have := @fexp_eq f _ hx\n simp at this\n rw [this]\n simp [scaled_mantissa]\n\n rcases lt_or_gt_of_n... | [
{
"name": "fexp_eq",
"text": "lemma fexp_eq (x : ℝ) :\n ¬x = 0 →\n let e1 := max (Int.log 2 |x|) (1-f.bias) - f.P + 1;\n let e2 := @fexp_real' f.to_format x;\n e1 = e2 := by\n intro hx\n simp [fexp_real', p3109_format.to_format, p3109_format.emin_lsb, p3109_format.emin, p3109_format.bias]\n omega\n\n... | [
{
"name": "sc_mantissa_simp",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 47,
"n_chars": 1470,
"n_subproofs": 4,
"n_tactics": 47,
"cyclomatic": 4,
"n_automation": 22,
"n_rewrites": 8,
"n_structural": 5,
"automation_only": false,
"max_ne... | 1 | import Flops.Core.RoundOp
import Flops.Core.Sterbenz
import Flops.P3109.Defs
import Flops.P3109.MinMax
import Mathlib.Data.Real.Sign
import Mathlib.Order.BoundedOrder.Basic
variable {f : p3109_format}
lemma sc_mantissa_simp (N:ℕ) (R:ℕ) (h : 0 ≤ R ∧ R < 2^N) (x : ℝ) :
¬x = 0 →
let E := max (Int.log 2 |x|) (1-f.bi... | import Flops.Core.RoundOp
import Flops.Core.Sterbenz
import Flops.P3109.Defs
import Flops.P3109.MinMax
import Mathlib.Data.Real.Sign
import Mathlib.Order.BoundedOrder.Basic
variable {f : p3109_format}
lemma fexp_eq (x : ℝ) :
¬x = 0 →
let e1 := max (Int.log 2 |x|) (1-f.bias) - f.P + 1;
let e2 := @fexp_real' f.t... | @@ -8,6 +8,16 @@
variable {f : p3109_format}
+lemma fexp_eq (x : ℝ) :
+ ¬x = 0 →
+ let e1 := max (Int.log 2 |x|) (1-f.bias) - f.P + 1;
+ let e2 := @fexp_real' f.to_format x;
+ e1 = e2 := by
+ intro hx
+ simp [fexp_real', p3109_format.to_format, p3109_format.emin_lsb, p3109_format.emin, p3109_format.bias]
+ ... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_7c0063d53411_6 | ccc5ca11664c6f25 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/RoundingAux.lean | RoundingAux | 6 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 1 | 8 | [
{
"theorem_name": "roundup_mantissa_simp",
"depth": 1,
"n_commands": 0,
"n_lines": 42,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro hx\n have := @fexp_eq f _ hx\n simp at this\n rw [this]\n simp [scaled_mantissa]\n\n rcases lt_or_gt_of_n... | [
{
"name": "fexp_eq",
"text": "lemma fexp_eq (x : ℝ) :\n ¬x = 0 →\n let e1 := max (Int.log 2 |x|) (1-f.bias) - f.P + 1;\n let e2 := @fexp_real' f.to_format x;\n e1 = e2 := by\n intro hx\n simp [fexp_real', p3109_format.to_format, p3109_format.emin_lsb, p3109_format.emin, p3109_format.bias]\n omega\n\n... | [
{
"name": "rne_mantissa_simp",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 120,
"n_chars": 3310,
"n_subproofs": 9,
"n_tactics": 137,
"cyclomatic": 15,
"n_automation": 56,
"n_rewrites": 31,
"n_structural": 21,
"automation_only": false,
"... | 1 | import Flops.Core.RoundOp
import Flops.Core.Sterbenz
import Flops.P3109.Defs
import Flops.P3109.MinMax
import Mathlib.Data.Real.Sign
import Mathlib.Order.BoundedOrder.Basic
variable {f : p3109_format}
lemma rne_mantissa_simp (x : ℝ) :
¬x = 0 →
let E := max (Int.log 2 |x|) (1-f.bias) - f.P + 1;
let S := |x| * 2... | import Flops.Core.RoundOp
import Flops.Core.Sterbenz
import Flops.P3109.Defs
import Flops.P3109.MinMax
import Mathlib.Data.Real.Sign
import Mathlib.Order.BoundedOrder.Basic
variable {f : p3109_format}
lemma fexp_eq (x : ℝ) :
¬x = 0 →
let e1 := max (Int.log 2 |x|) (1-f.bias) - f.P + 1;
let e2 := @fexp_real' f.t... | @@ -8,6 +8,16 @@
variable {f : p3109_format}
+lemma fexp_eq (x : ℝ) :
+ ¬x = 0 →
+ let e1 := max (Int.log 2 |x|) (1-f.bias) - f.P + 1;
+ let e2 := @fexp_real' f.to_format x;
+ e1 = e2 := by
+ intro hx
+ simp [fexp_real', p3109_format.to_format, p3109_format.emin_lsb, p3109_format.emin, p3109_format.bias]
+ ... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_7c0063d53411_7 | 261f7d67095a48c6 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/RoundingAux.lean | RoundingAux | 7 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 1 | 8 | [
{
"theorem_name": "roundup_mantissa_simp",
"depth": 1,
"n_commands": 0,
"n_lines": 42,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro hx\n have := @fexp_eq f _ hx\n simp at this\n rw [this]\n simp [scaled_mantissa]\n\n rcases lt_or_gt_of_n... | [
{
"name": "fexp_eq",
"text": "lemma fexp_eq (x : ℝ) :\n ¬x = 0 →\n let e1 := max (Int.log 2 |x|) (1-f.bias) - f.P + 1;\n let e2 := @fexp_real' f.to_format x;\n e1 = e2 := by\n intro hx\n simp [fexp_real', p3109_format.to_format, p3109_format.emin_lsb, p3109_format.emin, p3109_format.bias]\n omega\n\n... | [
{
"name": "rna_mant_simp",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 111,
"n_chars": 2871,
"n_subproofs": 14,
"n_tactics": 123,
"cyclomatic": 13,
"n_automation": 59,
"n_rewrites": 25,
"n_structural": 11,
"automation_only": false,
"max... | 1 | import Flops.Core.RoundOp
import Flops.Core.Sterbenz
import Flops.P3109.Defs
import Flops.P3109.MinMax
import Mathlib.Data.Real.Sign
import Mathlib.Order.BoundedOrder.Basic
variable {f : p3109_format}
lemma rna_mant_simp (x : ℝ) :
¬x = 0 →
let E := max (Int.log 2 |x|) (1-f.bias) - f.P + 1;
let S := |x| * 2^(-E... | import Flops.Core.RoundOp
import Flops.Core.Sterbenz
import Flops.P3109.Defs
import Flops.P3109.MinMax
import Mathlib.Data.Real.Sign
import Mathlib.Order.BoundedOrder.Basic
variable {f : p3109_format}
lemma fexp_eq (x : ℝ) :
¬x = 0 →
let e1 := max (Int.log 2 |x|) (1-f.bias) - f.P + 1;
let e2 := @fexp_real' f.t... | @@ -8,6 +8,16 @@
variable {f : p3109_format}
+lemma fexp_eq (x : ℝ) :
+ ¬x = 0 →
+ let e1 := max (Int.log 2 |x|) (1-f.bias) - f.P + 1;
+ let e2 := @fexp_real' f.to_format x;
+ e1 = e2 := by
+ intro hx
+ simp [fexp_real', p3109_format.to_format, p3109_format.emin_lsb, p3109_format.emin, p3109_format.bias]
+ ... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_8a836ce3452a_0 | d6a0b007f96c051c | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/RoundingError.lean | RoundingError | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 1 | 1 | [
{
"theorem_name": "epsilon_p3109_lt_ulp",
"depth": 1,
"n_commands": 0,
"n_lines": 4,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n exists (@round_to_fp f rnd r - r)\n simp\n rw [abs_sub_comm]; apply rounding_error_p3109_lt_ulp",
"n_chars": 101... | [
{
"name": "rounding_error_p3109_lt_ulp",
"text": "lemma rounding_error_p3109_lt_ulp (r : ℝ) (rnd : RoundingMode) :\n |r - @round_to_fp f rnd r| < @ulp f.to_format (@round_to_fp f rnd r) (@round_to_fp_canonical f rnd r)\n := by\n simp [round_to_fp]\n split\n repeat apply rounding_error_lt_ulp\n\n",
... | [
{
"name": "epsilon_p3109_lt_ulp",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 6,
"n_chars": 287,
"n_subproofs": 0,
"n_tactics": 5,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 1,
"n_structural": 2,
"automation_only": false,
"max_ne... | 1 | import Flops.P3109.Rounding
import Flops.Core.RoundingError
lemma epsilon_p3109_lt_ulp (r : ℝ) (rnd : RoundingMode) :
∃ε, @round_to_fp f rnd r = r + ε ∧ |ε| < @ulp f.to_format (@round_to_fp f rnd r) (@round_to_fp_canonical f rnd r) := sorry
| import Flops.P3109.Rounding
import Flops.Core.RoundingError
lemma rounding_error_p3109_lt_ulp (r : ℝ) (rnd : RoundingMode) :
|r - @round_to_fp f rnd r| < @ulp f.to_format (@round_to_fp f rnd r) (@round_to_fp_canonical f rnd r)
:= by
simp [round_to_fp]
split
repeat apply rounding_error_lt_ulp
lemma epsilon_... | @@ -1,6 +1,16 @@
import Flops.P3109.Rounding
import Flops.Core.RoundingError
+lemma rounding_error_p3109_lt_ulp (r : ℝ) (rnd : RoundingMode) :
+ |r - @round_to_fp f rnd r| < @ulp f.to_format (@round_to_fp f rnd r) (@round_to_fp_canonical f rnd r)
+ := by
+ simp [round_to_fp]
+ split
+ repeat apply rounding_er... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_35a2b09e06c9_0 | f9ad336dac03b2db | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/Fast2SumSat.lean | Fast2SumSat | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 10 | 1 | [
{
"theorem_name": "max_sub_a_fnum_lt_vnum",
"depth": 1,
"n_commands": 0,
"n_lines": 30,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro ha hb;\n obtain ⟨c, hc⟩ : ∃ c : float 2, c = ⟨(@max_fp f).fnum * 2^(f.emax_lsb - a.exp).toNat - a.fnum, ... | [
{
"name": "a_le_max_of_canonical",
"text": "lemma a_le_max_of_canonical {f : p3109_format} (a : float 2) :\n @canonical_p3109 f a →\n 0 < (a:ℝ) →\n (a:ℝ) ≤ @max_finite f := by\n intro hcan hpos\n have h_p3109 : ∃ x : p3109 f, x.is_finite ∧ (x : ℝ) = a.fnum * 2^a.exp := by\n constructor;\n ... | [
{
"name": "max_sub_a_fnum_lt_vnum",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 39,
"n_chars": 1646,
"n_subproofs": 5,
"n_tactics": 58,
"cyclomatic": 5,
"n_automation": 15,
"n_rewrites": 7,
"n_structural": 9,
"automation_only": false,
"... | 1 | import Flops.P3109.Defs
import Flops.P3109.MinMax
import Flops.P3109.Rounding
namespace p3109_format
namespace p3109
/-
Helper: a ≤ max_finite for canonical_p3109 values with a > 0
-/
lemma max_sub_a_fnum_lt_vnum {f : p3109_format} (a b : float 2) :
@canonical_p3109 f a →
@canonical_p3109 f b →
b.exp ≤ a.exp →
... | import Flops.P3109.Defs
import Flops.P3109.MinMax
import Flops.P3109.Rounding
namespace p3109_format
namespace p3109
/-
Helper: a ≤ max_finite for canonical_p3109 values with a > 0
-/
lemma a_le_max_of_canonical {f : p3109_format} (a : float 2) :
@canonical_p3109 f a →
0 < (a:ℝ) →
(a:ℝ) ≤ @max_finite f := by
... | @@ -8,6 +8,29 @@
/-
Helper: a ≤ max_finite for canonical_p3109 values with a > 0
-/
+lemma a_le_max_of_canonical {f : p3109_format} (a : float 2) :
+ @canonical_p3109 f a →
+ 0 < (a:ℝ) →
+ (a:ℝ) ≤ @max_finite f := by
+ intro hcan hpos
+ have h_p3109 : ∃ x : p3109 f, x.is_finite ∧ (x : ℝ) = a.fnum * 2^a.exp ... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_35a2b09e06c9_2 | 08a8555fca404d57 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/Fast2SumSat.lean | Fast2SumSat | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 10 | 1 | [
{
"theorem_name": "max_sub_a_bounded",
"depth": 1,
"n_commands": 0,
"n_lines": 7,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro ha hb hle hpos hovf\n simp\n constructor\n · rw [abs_of_nonneg (by exact_mod_cast max_sub_a_fnum_nonneg a ha hpo... | [
{
"name": "max_sub_a_fnum_nonneg",
"text": "lemma max_sub_a_fnum_nonneg {f : p3109_format} (a : float 2) :\n @canonical_p3109 f a →\n 0 < (a:ℝ) →\n 0 ≤ (@max_fp f).fnum * (2:ℤ)^(f.emax_lsb - a.exp).toNat - a.fnum := by\n intro ha hpos\n have h_le_max : (a : ℝ) ≤ @max_finite f := by\n exact?;\n... | [
{
"name": "fast2sum_sat_z_exact'",
"fan_in": 3,
"n_deps_direct": 2,
"n_deps_transitive": 5,
"n_lines": 17,
"n_chars": 574,
"n_subproofs": 2,
"n_tactics": 8,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 1,
"n_structural": 2,
"automation_only": false,
"max_... | 5 | import Flops.P3109.Defs
import Flops.P3109.MinMax
import Flops.P3109.Rounding
namespace p3109_format
namespace p3109
/-
Helper: a ≤ max_finite for canonical_p3109 values with a > 0
-/
lemma a_le_max_of_canonical {f : p3109_format} (a : float 2) :
@canonical_p3109 f a →
0 < (a:ℝ) →
(a:ℝ) ≤ @max_finite f := by
... | import Flops.P3109.Defs
import Flops.P3109.MinMax
import Flops.P3109.Rounding
namespace p3109_format
namespace p3109
/-
Helper: a ≤ max_finite for canonical_p3109 values with a > 0
-/
lemma a_le_max_of_canonical {f : p3109_format} (a : float 2) :
@canonical_p3109 f a →
0 < (a:ℝ) →
(a:ℝ) ≤ @max_finite f := by
... | @@ -31,6 +31,25 @@
/-
Helper: M ≥ 0 (max_finite - a ≥ 0)
-/
+lemma max_sub_a_fnum_nonneg {f : p3109_format} (a : float 2) :
+ @canonical_p3109 f a →
+ 0 < (a:ℝ) →
+ 0 ≤ (@max_fp f).fnum * (2:ℤ)^(f.emax_lsb - a.exp).toNat - a.fnum := by
+ intro ha hpos
+ have h_le_max : (a : ℝ) ≤ @max_finite f := by
+ e... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_35a2b09e06c9_3 | f8a6927ff72c75e3 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/Fast2SumSat.lean | Fast2SumSat | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 10 | 1 | [
{
"theorem_name": "max_sub_a_bounded",
"depth": 1,
"n_commands": 0,
"n_lines": 7,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro ha hb hle hpos hovf\n simp\n constructor\n · rw [abs_of_nonneg (by exact_mod_cast max_sub_a_fnum_nonneg a ha hpo... | [
{
"name": "max_sub_a_fnum_lt_vnum",
"text": "lemma max_sub_a_fnum_lt_vnum {f : p3109_format} (a b : float 2) :\n @canonical_p3109 f a →\n @canonical_p3109 f b →\n b.exp ≤ a.exp →\n 0 < (a:ℝ) →\n @max_finite f < (a + b:ℝ) →\n (@max_fp f).fnum * (2:ℤ)^(f.emax_lsb - a.exp).toNat - a.fnum < @vnum 2 f.to_f... | [
{
"name": "fast2sum_sat_min_z_exact'",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 6,
"n_lines": 24,
"n_chars": 848,
"n_subproofs": 1,
"n_tactics": 17,
"cyclomatic": 1,
"n_automation": 8,
"n_rewrites": 3,
"n_structural": 4,
"automation_only": false,
... | 6 | import Flops.P3109.Defs
import Flops.P3109.MinMax
import Flops.P3109.Rounding
namespace p3109_format
namespace p3109
/-
Helper: a ≤ max_finite for canonical_p3109 values with a > 0
-/
lemma a_le_max_of_canonical {f : p3109_format} (a : float 2) :
@canonical_p3109 f a →
0 < (a:ℝ) →
(a:ℝ) ≤ @max_finite f := by
... | import Flops.P3109.Defs
import Flops.P3109.MinMax
import Flops.P3109.Rounding
namespace p3109_format
namespace p3109
/-
Helper: a ≤ max_finite for canonical_p3109 values with a > 0
-/
lemma a_le_max_of_canonical {f : p3109_format} (a : float 2) :
@canonical_p3109 f a →
0 < (a:ℝ) →
(a:ℝ) ≤ @max_finite f := by
... | @@ -50,6 +50,44 @@
/-
Helper: M < vnum (from max_finite - a < b and b bounded)
-/
+lemma max_sub_a_fnum_lt_vnum {f : p3109_format} (a b : float 2) :
+ @canonical_p3109 f a →
+ @canonical_p3109 f b →
+ b.exp ≤ a.exp →
+ 0 < (a:ℝ) →
+ @max_finite f < (a + b:ℝ) →
+ (@max_fp f).fnum * (2:ℤ)^(f.emax_lsb - a.exp).to... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_35a2b09e06c9_4 | dd7e8f2dc900b565 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/Fast2SumSat.lean | Fast2SumSat | 4 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 10 | 1 | [
{
"theorem_name": "max_sub_a_bounded",
"depth": 1,
"n_commands": 0,
"n_lines": 7,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro ha hb hle hpos hovf\n simp\n constructor\n · rw [abs_of_nonneg (by exact_mod_cast max_sub_a_fnum_nonneg a ha hpo... | [
{
"name": "max_sub_a_fnum_lt_vnum",
"text": "lemma max_sub_a_fnum_lt_vnum {f : p3109_format} (a b : float 2) :\n @canonical_p3109 f a →\n @canonical_p3109 f b →\n b.exp ≤ a.exp →\n 0 < (a:ℝ) →\n @max_finite f < (a + b:ℝ) →\n (@max_fp f).fnum * (2:ℤ)^(f.emax_lsb - a.exp).toNat - a.fnum < @vnum 2 f.to_f... | [
{
"name": "fast2sum_sat_error_bounded'",
"fan_in": 2,
"n_deps_direct": 1,
"n_deps_transitive": 6,
"n_lines": 74,
"n_chars": 2961,
"n_subproofs": 11,
"n_tactics": 79,
"cyclomatic": 3,
"n_automation": 34,
"n_rewrites": 26,
"n_structural": 14,
"automation_only": fals... | 6 | import Flops.P3109.Defs
import Flops.P3109.MinMax
import Flops.P3109.Rounding
namespace p3109_format
namespace p3109
/-
Helper: a ≤ max_finite for canonical_p3109 values with a > 0
-/
lemma a_le_max_of_canonical {f : p3109_format} (a : float 2) :
@canonical_p3109 f a →
0 < (a:ℝ) →
(a:ℝ) ≤ @max_finite f := by
... | import Flops.P3109.Defs
import Flops.P3109.MinMax
import Flops.P3109.Rounding
namespace p3109_format
namespace p3109
/-
Helper: a ≤ max_finite for canonical_p3109 values with a > 0
-/
lemma a_le_max_of_canonical {f : p3109_format} (a : float 2) :
@canonical_p3109 f a →
0 < (a:ℝ) →
(a:ℝ) ≤ @max_finite f := by
... | @@ -50,6 +50,44 @@
/-
Helper: M < vnum (from max_finite - a < b and b bounded)
-/
+lemma max_sub_a_fnum_lt_vnum {f : p3109_format} (a b : float 2) :
+ @canonical_p3109 f a →
+ @canonical_p3109 f b →
+ b.exp ≤ a.exp →
+ 0 < (a:ℝ) →
+ @max_finite f < (a + b:ℝ) →
+ (@max_fp f).fnum * (2:ℤ)^(f.emax_lsb - a.exp).to... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_35a2b09e06c9_5 | e7c9d7577e8bf2c4 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/Fast2SumSat.lean | Fast2SumSat | 5 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 10 | 1 | [
{
"theorem_name": "max_sub_a_bounded",
"depth": 1,
"n_commands": 0,
"n_lines": 7,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro ha hb hle hpos hovf\n simp\n constructor\n · rw [abs_of_nonneg (by exact_mod_cast max_sub_a_fnum_nonneg a ha hpo... | [
{
"name": "max_sub_a_fnum_lt_vnum",
"text": "lemma max_sub_a_fnum_lt_vnum {f : p3109_format} (a b : float 2) :\n @canonical_p3109 f a →\n @canonical_p3109 f b →\n b.exp ≤ a.exp →\n 0 < (a:ℝ) →\n @max_finite f < (a + b:ℝ) →\n (@max_fp f).fnum * (2:ℤ)^(f.emax_lsb - a.exp).toNat - a.fnum < @vnum 2 f.to_f... | [
{
"name": "fast2sum_sat_min_error_bounded'",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 7,
"n_lines": 25,
"n_chars": 892,
"n_subproofs": 1,
"n_tactics": 17,
"cyclomatic": 1,
"n_automation": 8,
"n_rewrites": 3,
"n_structural": 4,
"automation_only": false... | 7 | import Flops.P3109.Defs
import Flops.P3109.MinMax
import Flops.P3109.Rounding
namespace p3109_format
namespace p3109
/-
Helper: a ≤ max_finite for canonical_p3109 values with a > 0
-/
lemma a_le_max_of_canonical {f : p3109_format} (a : float 2) :
@canonical_p3109 f a →
0 < (a:ℝ) →
(a:ℝ) ≤ @max_finite f := by
... | import Flops.P3109.Defs
import Flops.P3109.MinMax
import Flops.P3109.Rounding
namespace p3109_format
namespace p3109
/-
Helper: a ≤ max_finite for canonical_p3109 values with a > 0
-/
lemma a_le_max_of_canonical {f : p3109_format} (a : float 2) :
@canonical_p3109 f a →
0 < (a:ℝ) →
(a:ℝ) ≤ @max_finite f := by
... | @@ -50,6 +50,44 @@
/-
Helper: M < vnum (from max_finite - a < b and b bounded)
-/
+lemma max_sub_a_fnum_lt_vnum {f : p3109_format} (a b : float 2) :
+ @canonical_p3109 f a →
+ @canonical_p3109 f b →
+ b.exp ≤ a.exp →
+ 0 < (a:ℝ) →
+ @max_finite f < (a + b:ℝ) →
+ (@max_fp f).fnum * (2:ℤ)^(f.emax_lsb - a.exp).to... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_35a2b09e06c9_6 | 6ab9dd3394fc1031 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/Fast2SumSat.lean | Fast2SumSat | 6 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 10 | 1 | [
{
"theorem_name": "max_sub_a_bounded",
"depth": 1,
"n_commands": 0,
"n_lines": 7,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro ha hb hle hpos hovf\n simp\n constructor\n · rw [abs_of_nonneg (by exact_mod_cast max_sub_a_fnum_nonneg a ha hpo... | [
{
"name": "max_sub_a_fnum_lt_vnum",
"text": "lemma max_sub_a_fnum_lt_vnum {f : p3109_format} (a b : float 2) :\n @canonical_p3109 f a →\n @canonical_p3109 f b →\n b.exp ≤ a.exp →\n 0 < (a:ℝ) →\n @max_finite f < (a + b:ℝ) →\n (@max_fp f).fnum * (2:ℤ)^(f.emax_lsb - a.exp).toNat - a.fnum < @vnum 2 f.to_f... | [
{
"name": "fast2sum_sat_z_exact",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 7,
"n_lines": 19,
"n_chars": 572,
"n_subproofs": 1,
"n_tactics": 10,
"cyclomatic": 3,
"n_automation": 5,
"n_rewrites": 1,
"n_structural": 1,
"automation_only": false,
"max_... | 7 | import Flops.P3109.Defs
import Flops.P3109.MinMax
import Flops.P3109.Rounding
namespace p3109_format
namespace p3109
/-
Helper: a ≤ max_finite for canonical_p3109 values with a > 0
-/
lemma a_le_max_of_canonical {f : p3109_format} (a : float 2) :
@canonical_p3109 f a →
0 < (a:ℝ) →
(a:ℝ) ≤ @max_finite f := by
... | import Flops.P3109.Defs
import Flops.P3109.MinMax
import Flops.P3109.Rounding
namespace p3109_format
namespace p3109
/-
Helper: a ≤ max_finite for canonical_p3109 values with a > 0
-/
lemma a_le_max_of_canonical {f : p3109_format} (a : float 2) :
@canonical_p3109 f a →
0 < (a:ℝ) →
(a:ℝ) ≤ @max_finite f := by
... | @@ -50,6 +50,44 @@
/-
Helper: M < vnum (from max_finite - a < b and b bounded)
-/
+lemma max_sub_a_fnum_lt_vnum {f : p3109_format} (a b : float 2) :
+ @canonical_p3109 f a →
+ @canonical_p3109 f b →
+ b.exp ≤ a.exp →
+ 0 < (a:ℝ) →
+ @max_finite f < (a + b:ℝ) →
+ (@max_fp f).fnum * (2:ℤ)^(f.emax_lsb - a.exp).to... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_35a2b09e06c9_7 | 5fcd85c79ca50116 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/Fast2SumSat.lean | Fast2SumSat | 7 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 10 | 1 | [
{
"theorem_name": "max_sub_a_bounded",
"depth": 1,
"n_commands": 0,
"n_lines": 7,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro ha hb hle hpos hovf\n simp\n constructor\n · rw [abs_of_nonneg (by exact_mod_cast max_sub_a_fnum_nonneg a ha hpo... | [
{
"name": "max_sub_a_fnum_lt_vnum",
"text": "lemma max_sub_a_fnum_lt_vnum {f : p3109_format} (a b : float 2) :\n @canonical_p3109 f a →\n @canonical_p3109 f b →\n b.exp ≤ a.exp →\n 0 < (a:ℝ) →\n @max_finite f < (a + b:ℝ) →\n (@max_fp f).fnum * (2:ℤ)^(f.emax_lsb - a.exp).toNat - a.fnum < @vnum 2 f.to_f... | [
{
"name": "fast2sum_sat_min_z_exact",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 8,
"n_lines": 20,
"n_chars": 607,
"n_subproofs": 1,
"n_tactics": 10,
"cyclomatic": 3,
"n_automation": 5,
"n_rewrites": 1,
"n_structural": 1,
"automation_only": false,
"... | 8 | import Flops.P3109.Defs
import Flops.P3109.MinMax
import Flops.P3109.Rounding
namespace p3109_format
namespace p3109
/-
Helper: a ≤ max_finite for canonical_p3109 values with a > 0
-/
lemma a_le_max_of_canonical {f : p3109_format} (a : float 2) :
@canonical_p3109 f a →
0 < (a:ℝ) →
(a:ℝ) ≤ @max_finite f := by
... | import Flops.P3109.Defs
import Flops.P3109.MinMax
import Flops.P3109.Rounding
namespace p3109_format
namespace p3109
/-
Helper: a ≤ max_finite for canonical_p3109 values with a > 0
-/
lemma a_le_max_of_canonical {f : p3109_format} (a : float 2) :
@canonical_p3109 f a →
0 < (a:ℝ) →
(a:ℝ) ≤ @max_finite f := by
... | @@ -50,6 +50,44 @@
/-
Helper: M < vnum (from max_finite - a < b and b bounded)
-/
+lemma max_sub_a_fnum_lt_vnum {f : p3109_format} (a b : float 2) :
+ @canonical_p3109 f a →
+ @canonical_p3109 f b →
+ b.exp ≤ a.exp →
+ 0 < (a:ℝ) →
+ @max_finite f < (a + b:ℝ) →
+ (@max_fp f).fnum * (2:ℤ)^(f.emax_lsb - a.exp).to... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_35a2b09e06c9_8 | ea14682dda424e33 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/P3109/Fast2SumSat.lean | Fast2SumSat | 8 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 10 | 1 | [
{
"theorem_name": "fast2sum_sat_z_exact'",
"depth": 1,
"n_commands": 0,
"n_lines": 8,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro ha hb hle hpos hovf\n simp\n have hbnd := max_sub_a_bounded a b ha hb hle hpos hovf\n have heq := max_sub_a_... | [
{
"name": "max_sub_a_bounded",
"text": "lemma max_sub_a_bounded {f : p3109_format} (a b : float 2) :\n @canonical_p3109 f a →\n @canonical_p3109 f b →\n b.exp ≤ a.exp →\n 0 < (a:ℝ) →\n @max_finite f < (a + b:ℝ) →\n let c : float 2 := ⟨(@max_fp f).fnum * 2^(f.emax_lsb - a.exp).toNat - a.fnum, a.exp⟩;\n... | [
{
"name": "fast2sum_sat_error_bounded",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 8,
"n_lines": 21,
"n_chars": 585,
"n_subproofs": 1,
"n_tactics": 14,
"cyclomatic": 5,
"n_automation": 5,
"n_rewrites": 1,
"n_structural": 1,
"automation_only": false,
... | 8 | import Flops.P3109.Defs
import Flops.P3109.MinMax
import Flops.P3109.Rounding
namespace p3109_format
namespace p3109
/-
Helper: a ≤ max_finite for canonical_p3109 values with a > 0
-/
lemma a_le_max_of_canonical {f : p3109_format} (a : float 2) :
@canonical_p3109 f a →
0 < (a:ℝ) →
(a:ℝ) ≤ @max_finite f := by
... | import Flops.P3109.Defs
import Flops.P3109.MinMax
import Flops.P3109.Rounding
namespace p3109_format
namespace p3109
/-
Helper: a ≤ max_finite for canonical_p3109 values with a > 0
-/
lemma a_le_max_of_canonical {f : p3109_format} (a : float 2) :
@canonical_p3109 f a →
0 < (a:ℝ) →
(a:ℝ) ≤ @max_finite f := by
... | @@ -88,6 +88,24 @@
· grind
-- Helper: max_finite - a is representable as a bounded float
+lemma max_sub_a_bounded {f : p3109_format} (a b : float 2) :
+ @canonical_p3109 f a →
+ @canonical_p3109 f b →
+ b.exp ≤ a.exp →
+ 0 < (a:ℝ) →
+ @max_finite f < (a + b:ℝ) →
+ let c : float 2 := ⟨(@max_fp f).fnum * 2^... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_9fb3e40392d3_0 | ad02a1aecc665305 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/Core/Rounding.lean | Rounding | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 7 | 5 | [
{
"theorem_name": "log_mul'",
"depth": 1,
"n_commands": 0,
"n_lines": 14,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro Hm\n rcases lt_or_eq_of_le (abs_nonneg m) with _ | Heq\n apply log_mul\n assumption\n exfalso\n apply Hm\n rcases abs... | [
{
"name": "log_mul",
"text": "lemma log_mul (e : ℤ) :\n m > 0 →\n Int.log 2 (m * (2 : ℝ) ^ e) = Int.log 2 (m : ℝ) + e := by\n intro H\n symm\n rw [log_eq_of_bound (m * (2 : ℝ) ^ e) (Int.log 2 (m : ℝ) + e)]\n refine mul_pos ?_ ?_\n assumption\n apply zpow_pos\n simp\n simp [zpow_add₀]\n refine mul... | [
{
"name": "log_mul'",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 16,
"n_chars": 360,
"n_subproofs": 0,
"n_tactics": 14,
"cyclomatic": 3,
"n_automation": 6,
"n_rewrites": 1,
"n_structural": 5,
"automation_only": false,
"max_nesting": 2
... | 1 | import Flops.Core.Defs
import Mathlib.Data.Int.Log
import Mathlib.Data.Real.Archimedean
/-
This file defines rounding as a relation (proposition)
between the real value to round, and the rounded floating point value
For rounding as a function
rnd : ℝ → float, see Flops.RoundOp
-/
variable {β : ℕ} {format : Format}
... | import Flops.Core.Defs
import Mathlib.Data.Int.Log
import Mathlib.Data.Real.Archimedean
/-
This file defines rounding as a relation (proposition)
between the real value to round, and the rounded floating point value
For rounding as a function
rnd : ℝ → float, see Flops.RoundOp
-/
variable {β : ℕ} {format : Format}
... | @@ -109,8 +109,45 @@
simp
-- helper
-lemma log_mul' (e : ℤ) : ¬m = 0 → Int.log 2 (|m| * (2 : ℝ) ^ e) = Int.log 2 (|m| : ℝ) + e := sorry
+lemma log_mul (e : ℤ) :
+ m > 0 →
+ Int.log 2 (m * (2 : ℝ) ^ e) = Int.log 2 (m : ℝ) + e := by
+ intro H
+ symm
+ rw [log_eq_of_bound (m * (2 : ℝ) ^ e) (Int.log 2 (m : ℝ) + ... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_9fb3e40392d3_1 | 57ff26b1e20cc2a4 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/Core/Rounding.lean | Rounding | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 7 | 5 | [
{
"theorem_name": "log_mul'",
"depth": 1,
"n_commands": 0,
"n_lines": 14,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro Hm\n rcases lt_or_eq_of_le (abs_nonneg m) with _ | Heq\n apply log_mul\n assumption\n exfalso\n apply Hm\n rcases abs... | [
{
"name": "log_mul",
"text": "lemma log_mul (e : ℤ) :\n m > 0 →\n Int.log 2 (m * (2 : ℝ) ^ e) = Int.log 2 (m : ℝ) + e := by\n intro H\n symm\n rw [log_eq_of_bound (m * (2 : ℝ) ^ e) (Int.log 2 (m : ℝ) + e)]\n refine mul_pos ?_ ?_\n assumption\n apply zpow_pos\n simp\n simp [zpow_add₀]\n refine mul... | [
{
"name": "temp",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 11,
"n_chars": 176,
"n_subproofs": 0,
"n_tactics": 9,
"cyclomatic": 3,
"n_automation": 4,
"n_rewrites": 1,
"n_structural": 3,
"automation_only": false,
"max_nesting": 2
}
] | 1 | import Flops.Core.Defs
import Mathlib.Data.Int.Log
import Mathlib.Data.Real.Archimedean
/-
This file defines rounding as a relation (proposition)
between the real value to round, and the rounded floating point value
For rounding as a function
rnd : ℝ → float, see Flops.RoundOp
-/
variable {β : ℕ} {format : Format}
... | import Flops.Core.Defs
import Mathlib.Data.Int.Log
import Mathlib.Data.Real.Archimedean
/-
This file defines rounding as a relation (proposition)
between the real value to round, and the rounded floating point value
For rounding as a function
rnd : ℝ → float, see Flops.RoundOp
-/
variable {β : ℕ} {format : Format}
... | @@ -109,8 +109,40 @@
simp
-- helper
-lemma temp (m e : ℤ) : m > 0 → digits m + e = Int.log 2 (m * 2^e : ℝ) + 1 := sorry
+lemma log_mul (e : ℤ) :
+ m > 0 →
+ Int.log 2 (m * (2 : ℝ) ^ e) = Int.log 2 (m : ℝ) + e := by
+ intro H
+ symm
+ rw [log_eq_of_bound (m * (2 : ℝ) ^ e) (Int.log 2 (m : ℝ) + e)]
+ refine mu... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_9fb3e40392d3_2 | 9190f8f0e885948c | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/Core/Rounding.lean | Rounding | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 7 | 5 | [
{
"theorem_name": "temp'",
"depth": 1,
"n_commands": 0,
"n_lines": 6,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro Hm\n push_cast\n rw [log_mul', digits_abs', add_assoc, add_comm 1, <-add_assoc]\n simp [Int.log]\n assumption",
"n_char... | [
{
"name": "digits_abs'",
"text": "lemma digits_abs' : digits m = Int.log 2 (|m| : ℝ) + 1 := by\n cases m <;> simp [digits]\n rw [abs_of_neg]\n simp [Int.log]\n norm_cast\n rw [Nat.floor_natCast]\n linarith\n\n",
"fan_in": 5,
"n_lines": 9,
"n_chars": 175,
"n_subproofs": 0,
"n_tactic... | [
{
"name": "temp'",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 3,
"n_lines": 10,
"n_chars": 264,
"n_subproofs": 0,
"n_tactics": 6,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 2,
"n_structural": 1,
"automation_only": false,
"max_nesting": 2
}
... | 3 | import Flops.Core.Defs
import Mathlib.Data.Int.Log
import Mathlib.Data.Real.Archimedean
/-
This file defines rounding as a relation (proposition)
between the real value to round, and the rounded floating point value
For rounding as a function
rnd : ℝ → float, see Flops.RoundOp
-/
variable {β : ℕ} {format : Format}
... | import Flops.Core.Defs
import Mathlib.Data.Int.Log
import Mathlib.Data.Real.Archimedean
/-
This file defines rounding as a relation (proposition)
between the real value to round, and the rounded floating point value
For rounding as a function
rnd : ℝ → float, see Flops.RoundOp
-/
variable {β : ℕ} {format : Format}
... | @@ -148,8 +148,21 @@
assumption
assumption
-lemma temp' (m e : ℤ) : ¬m = 0 → digits m + e = Int.log 2 (|m| * 2^e : ℝ) + 1 := sorry
+lemma digits_abs' : digits m = Int.log 2 (|m| : ℝ) + 1 := by
+ cases m <;> simp [digits]
+ rw [abs_of_neg]
+ simp [Int.log]
+ norm_cast
+ rw [Nat.floor_natCast]
+ linarith
... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_9fb3e40392d3_3 | ba0542bb7950b554 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/Core/Rounding.lean | Rounding | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 7 | 5 | [
{
"theorem_name": "temp'",
"depth": 1,
"n_commands": 0,
"n_lines": 6,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro Hm\n push_cast\n rw [log_mul', digits_abs', add_assoc, add_comm 1, <-add_assoc]\n simp [Int.log]\n assumption",
"n_char... | [
{
"name": "digits_abs'",
"text": "lemma digits_abs' : digits m = Int.log 2 (|m| : ℝ) + 1 := by\n cases m <;> simp [digits]\n rw [abs_of_neg]\n simp [Int.log]\n norm_cast\n rw [Nat.floor_natCast]\n linarith\n\n",
"fan_in": 5,
"n_lines": 9,
"n_chars": 175,
"n_subproofs": 0,
"n_tactic... | [
{
"name": "flt_equivalent",
"fan_in": 2,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 80,
"n_chars": 1631,
"n_subproofs": 6,
"n_tactics": 76,
"cyclomatic": 2,
"n_automation": 31,
"n_rewrites": 19,
"n_structural": 13,
"automation_only": false,
"max_ne... | 2 | import Flops.Core.Defs
import Mathlib.Data.Int.Log
import Mathlib.Data.Real.Archimedean
/-
This file defines rounding as a relation (proposition)
between the real value to round, and the rounded floating point value
For rounding as a function
rnd : ℝ → float, see Flops.RoundOp
-/
variable {β : ℕ} {format : Format}
... | import Flops.Core.Defs
import Mathlib.Data.Int.Log
import Mathlib.Data.Real.Archimedean
/-
This file defines rounding as a relation (proposition)
between the real value to round, and the rounded floating point value
For rounding as a function
rnd : ℝ → float, see Flops.RoundOp
-/
variable {β : ℕ} {format : Format}
... | @@ -133,13 +133,94 @@
apply Int.lt_zpow_succ_log_self
repeat simp
+lemma digits_abs' : digits m = Int.log 2 (|m| : ℝ) + 1 := by
+ cases m <;> simp [digits]
+ rw [abs_of_neg]
+ simp [Int.log]
+ norm_cast
+ rw [Nat.floor_natCast]
+ linarith
+
def fexp (m e : ℤ) := max (digits m + e - format.precision) (-fo... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_9fb3e40392d3_4 | 60de004da2eaae22 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/Core/Rounding.lean | Rounding | 4 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 7 | 5 | [
{
"theorem_name": "temp'",
"depth": 1,
"n_commands": 0,
"n_lines": 6,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro Hm\n push_cast\n rw [log_mul', digits_abs', add_assoc, add_comm 1, <-add_assoc]\n simp [Int.log]\n assumption",
"n_char... | [
{
"name": "digits_abs'",
"text": "lemma digits_abs' : digits m = Int.log 2 (|m| : ℝ) + 1 := by\n cases m <;> simp [digits]\n rw [abs_of_neg]\n simp [Int.log]\n norm_cast\n rw [Nat.floor_natCast]\n linarith\n\n",
"fan_in": 5,
"n_lines": 9,
"n_chars": 175,
"n_subproofs": 0,
"n_tactic... | [
{
"name": "flt_equivalent'",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 3,
"n_lines": 63,
"n_chars": 1935,
"n_subproofs": 3,
"n_tactics": 77,
"cyclomatic": 6,
"n_automation": 29,
"n_rewrites": 28,
"n_structural": 13,
"automation_only": false,
"max_n... | 3 | import Flops.Core.Defs
import Mathlib.Data.Int.Log
import Mathlib.Data.Real.Archimedean
/-
This file defines rounding as a relation (proposition)
between the real value to round, and the rounded floating point value
For rounding as a function
rnd : ℝ → float, see Flops.RoundOp
-/
variable {β : ℕ} {format : Format}
... | import Flops.Core.Defs
import Mathlib.Data.Int.Log
import Mathlib.Data.Real.Archimedean
/-
This file defines rounding as a relation (proposition)
between the real value to round, and the rounded floating point value
For rounding as a function
rnd : ℝ → float, see Flops.RoundOp
-/
variable {β : ℕ} {format : Format}
... | @@ -133,18 +133,155 @@
apply Int.lt_zpow_succ_log_self
repeat simp
+lemma digits_abs' : digits m = Int.log 2 (|m| : ℝ) + 1 := by
+ cases m <;> simp [digits]
+ rw [abs_of_neg]
+ simp [Int.log]
+ norm_cast
+ rw [Nat.floor_natCast]
+ linarith
+
def fexp (m e : ℤ) := max (digits m + e - format.precision) (-f... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_9fb3e40392d3_5 | 879b53f657fced54 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/Core/Rounding.lean | Rounding | 5 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 7 | 5 | [
{
"theorem_name": "temp'",
"depth": 1,
"n_commands": 0,
"n_lines": 6,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro Hm\n push_cast\n rw [log_mul', digits_abs', add_assoc, add_comm 1, <-add_assoc]\n simp [Int.log]\n assumption",
"n_char... | [
{
"name": "digits_abs'",
"text": "lemma digits_abs' : digits m = Int.log 2 (|m| : ℝ) + 1 := by\n cases m <;> simp [digits]\n rw [abs_of_neg]\n simp [Int.log]\n norm_cast\n rw [Nat.floor_natCast]\n linarith\n\n",
"fan_in": 5,
"n_lines": 9,
"n_chars": 175,
"n_subproofs": 0,
"n_tactic... | [
{
"name": "canonicalize_correct",
"fan_in": 0,
"n_deps_direct": 3,
"n_deps_transitive": 3,
"n_lines": 87,
"n_chars": 2182,
"n_subproofs": 9,
"n_tactics": 76,
"cyclomatic": 5,
"n_automation": 33,
"n_rewrites": 16,
"n_structural": 12,
"automation_only": false,
"... | 3 | import Flops.Core.Defs
import Mathlib.Data.Int.Log
import Mathlib.Data.Real.Archimedean
/-
This file defines rounding as a relation (proposition)
between the real value to round, and the rounded floating point value
For rounding as a function
rnd : ℝ → float, see Flops.RoundOp
-/
variable {β : ℕ} {format : Format}
... | import Flops.Core.Defs
import Mathlib.Data.Int.Log
import Mathlib.Data.Real.Archimedean
/-
This file defines rounding as a relation (proposition)
between the real value to round, and the rounded floating point value
For rounding as a function
rnd : ℝ → float, see Flops.RoundOp
-/
variable {β : ℕ} {format : Format}
... | @@ -133,13 +133,94 @@
apply Int.lt_zpow_succ_log_self
repeat simp
+lemma digits_abs' : digits m = Int.log 2 (|m| : ℝ) + 1 := by
+ cases m <;> simp [digits]
+ rw [abs_of_neg]
+ simp [Int.log]
+ norm_cast
+ rw [Nat.floor_natCast]
+ linarith
+
def fexp (m e : ℤ) := max (digits m + e - format.precision) (-fo... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_9fb3e40392d3_6 | a9c6e750181eb9a0 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/Core/Rounding.lean | Rounding | 6 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 7 | 5 | [
{
"theorem_name": "temp'",
"depth": 1,
"n_commands": 0,
"n_lines": 6,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro Hm\n push_cast\n rw [log_mul', digits_abs', add_assoc, add_comm 1, <-add_assoc]\n simp [Int.log]\n assumption",
"n_char... | [
{
"name": "digits_abs'",
"text": "lemma digits_abs' : digits m = Int.log 2 (|m| : ℝ) + 1 := by\n cases m <;> simp [digits]\n rw [abs_of_neg]\n simp [Int.log]\n norm_cast\n rw [Nat.floor_natCast]\n linarith\n\n",
"fan_in": 5,
"n_lines": 9,
"n_chars": 175,
"n_subproofs": 0,
"n_tactic... | [
{
"name": "canonicalize_correct'",
"fan_in": 1,
"n_deps_direct": 3,
"n_deps_transitive": 4,
"n_lines": 87,
"n_chars": 2270,
"n_subproofs": 9,
"n_tactics": 75,
"cyclomatic": 7,
"n_automation": 33,
"n_rewrites": 21,
"n_structural": 7,
"automation_only": false,
"... | 4 | import Flops.Core.Defs
import Mathlib.Data.Int.Log
import Mathlib.Data.Real.Archimedean
/-
This file defines rounding as a relation (proposition)
between the real value to round, and the rounded floating point value
For rounding as a function
rnd : ℝ → float, see Flops.RoundOp
-/
variable {β : ℕ} {format : Format}
... | import Flops.Core.Defs
import Mathlib.Data.Int.Log
import Mathlib.Data.Real.Archimedean
/-
This file defines rounding as a relation (proposition)
between the real value to round, and the rounded floating point value
For rounding as a function
rnd : ℝ → float, see Flops.RoundOp
-/
variable {β : ℕ} {format : Format}
... | @@ -133,18 +133,155 @@
apply Int.lt_zpow_succ_log_self
repeat simp
+lemma digits_abs' : digits m = Int.log 2 (|m| : ℝ) + 1 := by
+ cases m <;> simp [digits]
+ rw [abs_of_neg]
+ simp [Int.log]
+ norm_cast
+ rw [Nat.floor_natCast]
+ linarith
+
def fexp (m e : ℤ) := max (digits m + e - format.precision) (-f... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
ablate_9fb3e40392d3_7 | 34b1ff6509b2cbc5 | lean | lean | github.com/rutgers-apl/FLoPS | 95081ac643663da507115abe23ebd5701433587f | Flops/Core/Rounding.lean | Rounding | 7 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 7 | 5 | [
{
"theorem_name": "temp'",
"depth": 1,
"n_commands": 0,
"n_lines": 6,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro Hm\n push_cast\n rw [log_mul', digits_abs', add_assoc, add_comm 1, <-add_assoc]\n simp [Int.log]\n assumption",
"n_char... | [
{
"name": "digits_abs'",
"text": "lemma digits_abs' : digits m = Int.log 2 (|m| : ℝ) + 1 := by\n cases m <;> simp [digits]\n rw [abs_of_neg]\n simp [Int.log]\n norm_cast\n rw [Nat.floor_natCast]\n linarith\n\n",
"fan_in": 5,
"n_lines": 9,
"n_chars": 175,
"n_subproofs": 0,
"n_tactic... | [
{
"name": "canonicalize_correct_all",
"fan_in": 2,
"n_deps_direct": 1,
"n_deps_transitive": 5,
"n_lines": 23,
"n_chars": 638,
"n_subproofs": 2,
"n_tactics": 21,
"cyclomatic": 2,
"n_automation": 11,
"n_rewrites": 1,
"n_structural": 6,
"automation_only": false,
... | 5 | import Flops.Core.Defs
import Mathlib.Data.Int.Log
import Mathlib.Data.Real.Archimedean
/-
This file defines rounding as a relation (proposition)
between the real value to round, and the rounded floating point value
For rounding as a function
rnd : ℝ → float, see Flops.RoundOp
-/
variable {β : ℕ} {format : Format}
... | import Flops.Core.Defs
import Mathlib.Data.Int.Log
import Mathlib.Data.Real.Archimedean
/-
This file defines rounding as a relation (proposition)
between the real value to round, and the rounded floating point value
For rounding as a function
rnd : ℝ → float, see Flops.RoundOp
-/
variable {β : ℕ} {format : Format}
... | @@ -133,18 +133,155 @@
apply Int.lt_zpow_succ_log_self
repeat simp
+lemma digits_abs' : digits m = Int.log 2 (|m| : ℝ) + 1 := by
+ cases m <;> simp [digits]
+ rw [abs_of_neg]
+ simp [Int.log]
+ norm_cast
+ rw [Nat.floor_natCast]
+ linarith
+
def fexp (m e : ℤ) := max (digits m + e - format.precision) (-f... | {
"repo": "FLoPS",
"git_repo": "github.com/rutgers-apl/FLoPS",
"revision": "95081ac643663da507115abe23ebd5701433587f",
"lean_toolchain": "leanprover/lean4:v4.28.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lemmas... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.