Statement
This explanation was written alongside the formalization to describe the statement and its reasoning.
Lemma · Sharp bound for the original adjacent endpoint
Lean statement
Trellis authored these statements and proofs. Lean checks the formal proofs; the assumptions used by each proof are listed below.
import Tablet.P529_T1_LeftHistoryBoundary
import Tablet.P529_T1_RightHistoryBoundary
import Tablet.P826_T1_ExponentLowerBound
import Tablet.P798_T1_GridAlignment
import Tablet.P472_T1_DecimalValueBounds
import Tablet.P856_T1_CoefficientGridAlignment
open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
namespace dec2flt_model
-- [TABLET NODE: P529_T1_NormalizationBounds]
theorem P529_T1_NormalizationBounds (X Y : Real)
(d d0 d1 : num.imp.dec2flt.decimal_seq.DecimalSeq) (exp0 exp1 : Std.I32)
(hpointLo : -324 <= d.decimal_point.val)
(hpointHi : d.decimal_point.val < 310)
(hinput : d.num_digits.val <= 768 /\
(forall b, b ∈ d.digits.val.take d.num_digits.val -> b.val < 10) /\
(exists h tail,
(d.digits.val.take d.num_digits.val).map (fun b => b.val) = h :: tail /\
1 <= h /\ h < 10 /\ (h :: tail).length = d.num_digits.val))
(hloop0 : num.imp.dec2flt.slow.parse_long_mantissa_loop0
F64.Insts.Dec2flt_modelNumImpTraitsFloatU64
{ m := 0#u64, p_biased := 0#i32 }
d.num_digits d.decimal_point d.truncated d.digits 0#i32 none =
ok (d0.num_digits, d0.decimal_point, d0.truncated, d0.digits, exp0, none))
(hloop1 : num.imp.dec2flt.slow.parse_long_mantissa_loop1
F64.Insts.Dec2flt_modelNumImpTraitsFloatU64
{ m := 0#u64, p_biased := 2047#i32 }
d0.num_digits d0.decimal_point d0.truncated d0.digits exp0 none =
ok (d1.num_digits, d1.decimal_point, d1.truncated, d1.digits, exp1, none)) :
let V := fun a : num.imp.dec2flt.decimal_seq.DecimalSeq =>
((((a.digits.val.take a.num_digits.val).map (fun b => b.val)).foldl
(fun n z => 10 * n + z) 0 : Nat) : Real) *
(10 : Real) ^ (a.decimal_point.val - (a.num_digits.val : Int))
Y = V d + (10 : Real) ^ (d.decimal_point.val - 768) ->
(exists eta : Real, X = V d + eta /\ 0 <= eta /\
eta < (10 : Real) ^ (d.decimal_point.val - 768) /\
(d.truncated = true <-> 0 < eta)) ->
(10 : Real) ^ (-325 : Int) <= X /\ X < Y /\
Y / (2 : Real) ^ exp1.val <= 1 /\
-1079 <= exp1.val /\ exp1.val <= 1260 := by
Proof
Natural-language proof
The status above describes the Lean proof. Its explanatory prose may remain a sketch after that proof closes.
Explanatory prose status
Prose retained as authored. The explanatory prose is preserved as it stood when captured.
Proof
Lean proof
intro V hY herrors
obtain ⟨dw, ew, steps, h0w, hsteps, hewlo, hewhi, hXlo,
hplo, hphi, hcountw, hdigitsw, hshapeW, hlast, hpackage⟩ :=
P495_T1_SlowLoop0Execution X Y d hpointLo hpointHi hinput hY herrors
have htuple0 := Result.ok.inj (h0w.symm.trans hloop0)
simp only [Prod.mk.injEq] at htuple0
rcases htuple0 with ⟨hnum0, hp0, htr0, hdigits0, hexp0, hnone0⟩
have hdw : dw = d0 := by
cases dw
cases d0
simp_all
subst dw
subst ew
have hpack0 :
(exists eta0 u0 : Real,
X / (2 : Real) ^ exp0.val = V d0 + eta0 /\
Y / (2 : Real) ^ exp0.val = V d0 + u0 /\
0 <= eta0 /\ eta0 < u0 /\ (d0.truncated = true <-> 0 < eta0)) := by
simpa [V] using hpackage
obtain ⟨d1w, e1w, bound, h1w, hbound, hboundlo, hboundhi,
hp1, hnum1, hfirstLo, hfirstHi, hcount1, hdigits1,
hshapeExists, hpackage1⟩ :=
P529_T1_Loop1Execution X Y d0 exp0 hplo hphi hewlo
⟨hcountw, hdigitsw, hshapeW⟩ (by simpa [V] using hpack0)
have htuple1 := Result.ok.inj (h1w.symm.trans hloop1)
simp only [Prod.mk.injEq] at htuple1
rcases htuple1 with ⟨hnum1eq, hp1eq, htr1eq, hdigits1eq, hexp1eq, hnone1⟩
have hd1w : d1w = d1 := by
cases d1w
cases d1
simp_all
subst d1w
subst e1w
have hV1 : V d1 < 1 := by
rcases hshapeExists with ⟨z, zs, hxs, hz, hzlt, hlen⟩
have hshape := P472_T1_DecimalValueBounds
((d1.digits.val.take d1.num_digits.val).map (fun b => b.val))
z zs hxs (by omega)
(by
intro q hq
rcases List.mem_map.mp hq with ⟨b, hb, rfl⟩
exact hdigits1 b hb)
d1.decimal_point.val
have hlen' :
((d1.digits.val.take d1.num_digits.val).map (fun b => b.val)).length =
d1.num_digits.val := by
rw [hxs]
simpa using hlen
have hshapeUpper := hshape.2
rw [hlen'] at hshapeUpper
simpa [V, hp1] using hshapeUpper
have hleft := P529_T1_LeftHistoryBoundary X Y d0 d1 exp0 exp1
hplo hphi hewlo ⟨hcountw, hdigitsw, hshapeW⟩ hloop1
(by simpa [V] using hpackage)
have hcap0 : 0 <= exp1.val - exp0.val + 768 - d0.decimal_point.val := hleft.1
have hV0lt : V d0 < (2 : Real) ^ (exp1.val - exp0.val) := by
by_contra hn
have hge : (2 : Real) ^ (exp1.val - exp0.val) <= V d0 := le_of_not_gt hn
have hge1 := hleft.2.1 hge
linarith
have hright := P529_T1_RightHistoryBoundary X Y d d0 exp0
hpointLo hpointHi hinput hloop0 hY herrors
have hcap : 0 <= exp1.val + 768 - d.decimal_point.val :=
(hright.2 1 exp1 hcap0).1
have hVdlt : V d < (1 : Real) * (2 : Real) ^ exp1.val :=
by
simpa [V] using (hright.2 1 exp1 hcap0).2 (by simpa [V] using hV0lt)
obtain ⟨a, ha⟩ := P798_T1_GridAlignment d hinput.1
have hp768 : d.decimal_point.val <= 768 := by omega
obtain ⟨b, hb⟩ := P856_T1_CoefficientGridAlignment 1 exp1.val
d.decimal_point.val hp768 hcap
have hqpos : 0 < (10 : Real) ^ (d.decimal_point.val - 768) :=
zpow_pos (by norm_num) _
have hagrid : V d = (a : Real) * (10 : Real) ^ (d.decimal_point.val - 768) := by
simpa [V] using ha
have hbgrid : (2 : Real) ^ exp1.val = (b : Real) *
(10 : Real) ^ (d.decimal_point.val - 768) := by
simpa using hb
have hab : a < b := by
have hlt : (a : Real) * (10 : Real) ^ (d.decimal_point.val - 768) <
(b : Real) * (10 : Real) ^ (d.decimal_point.val - 768) := by
rw [← hagrid, ← hbgrid]
simpa using hVdlt
exact_mod_cast (lt_of_mul_lt_mul_right hlt (le_of_lt hqpos))
have ha1b : a + 1 <= b := by omega
have hYbound : Y / (2 : Real) ^ exp1.val <= 1 := by
have hYeq : Y = ((a + 1 : Nat) : Real) *
(10 : Real) ^ (d.decimal_point.val - 768) := by
rw [hY, hagrid]
push_cast
ring
have hle : Y <= (2 : Real) ^ exp1.val := by
rw [hYeq, hbgrid]
exact mul_le_mul_of_nonneg_right (by exact_mod_cast ha1b) (le_of_lt hqpos)
exact (div_le_iff₀ (zpow_pos (by norm_num) _)).2 (by simpa using hle)
have hXY : X < Y := by
rcases herrors with ⟨eta, hX, heta0, hetaLt, htr⟩
rw [hX, hY]
have hq : 0 < (10 : Real) ^ (d.decimal_point.val - 768) := hqpos
linarith
have hloexp := P826_T1_ExponentLowerBound X Y exp1.val hXlo hXY hYbound
have hhi : exp1.val <= 1260 := by omega
exact ⟨hXlo, hXY, hYbound, hloexp, hhi⟩
end dec2flt_model
Download Lean source · Download TeX source
Complete Lean module
import Tablet.P529_T1_LeftHistoryBoundary
import Tablet.P529_T1_RightHistoryBoundary
import Tablet.P826_T1_ExponentLowerBound
import Tablet.P798_T1_GridAlignment
import Tablet.P472_T1_DecimalValueBounds
import Tablet.P856_T1_CoefficientGridAlignment
open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
namespace dec2flt_model
-- [TABLET NODE: P529_T1_NormalizationBounds]
theorem P529_T1_NormalizationBounds (X Y : Real)
(d d0 d1 : num.imp.dec2flt.decimal_seq.DecimalSeq) (exp0 exp1 : Std.I32)
(hpointLo : -324 <= d.decimal_point.val)
(hpointHi : d.decimal_point.val < 310)
(hinput : d.num_digits.val <= 768 /\
(forall b, b ∈ d.digits.val.take d.num_digits.val -> b.val < 10) /\
(exists h tail,
(d.digits.val.take d.num_digits.val).map (fun b => b.val) = h :: tail /\
1 <= h /\ h < 10 /\ (h :: tail).length = d.num_digits.val))
(hloop0 : num.imp.dec2flt.slow.parse_long_mantissa_loop0
F64.Insts.Dec2flt_modelNumImpTraitsFloatU64
{ m := 0#u64, p_biased := 0#i32 }
d.num_digits d.decimal_point d.truncated d.digits 0#i32 none =
ok (d0.num_digits, d0.decimal_point, d0.truncated, d0.digits, exp0, none))
(hloop1 : num.imp.dec2flt.slow.parse_long_mantissa_loop1
F64.Insts.Dec2flt_modelNumImpTraitsFloatU64
{ m := 0#u64, p_biased := 2047#i32 }
d0.num_digits d0.decimal_point d0.truncated d0.digits exp0 none =
ok (d1.num_digits, d1.decimal_point, d1.truncated, d1.digits, exp1, none)) :
let V := fun a : num.imp.dec2flt.decimal_seq.DecimalSeq =>
((((a.digits.val.take a.num_digits.val).map (fun b => b.val)).foldl
(fun n z => 10 * n + z) 0 : Nat) : Real) *
(10 : Real) ^ (a.decimal_point.val - (a.num_digits.val : Int))
Y = V d + (10 : Real) ^ (d.decimal_point.val - 768) ->
(exists eta : Real, X = V d + eta /\ 0 <= eta /\
eta < (10 : Real) ^ (d.decimal_point.val - 768) /\
(d.truncated = true <-> 0 < eta)) ->
(10 : Real) ^ (-325 : Int) <= X /\ X < Y /\
Y / (2 : Real) ^ exp1.val <= 1 /\
-1079 <= exp1.val /\ exp1.val <= 1260 := by
-- BODY
intro V hY herrors
obtain ⟨dw, ew, steps, h0w, hsteps, hewlo, hewhi, hXlo,
hplo, hphi, hcountw, hdigitsw, hshapeW, hlast, hpackage⟩ :=
P495_T1_SlowLoop0Execution X Y d hpointLo hpointHi hinput hY herrors
have htuple0 := Result.ok.inj (h0w.symm.trans hloop0)
simp only [Prod.mk.injEq] at htuple0
rcases htuple0 with ⟨hnum0, hp0, htr0, hdigits0, hexp0, hnone0⟩
have hdw : dw = d0 := by
cases dw
cases d0
simp_all
subst dw
subst ew
have hpack0 :
(exists eta0 u0 : Real,
X / (2 : Real) ^ exp0.val = V d0 + eta0 /\
Y / (2 : Real) ^ exp0.val = V d0 + u0 /\
0 <= eta0 /\ eta0 < u0 /\ (d0.truncated = true <-> 0 < eta0)) := by
simpa [V] using hpackage
obtain ⟨d1w, e1w, bound, h1w, hbound, hboundlo, hboundhi,
hp1, hnum1, hfirstLo, hfirstHi, hcount1, hdigits1,
hshapeExists, hpackage1⟩ :=
P529_T1_Loop1Execution X Y d0 exp0 hplo hphi hewlo
⟨hcountw, hdigitsw, hshapeW⟩ (by simpa [V] using hpack0)
have htuple1 := Result.ok.inj (h1w.symm.trans hloop1)
simp only [Prod.mk.injEq] at htuple1
rcases htuple1 with ⟨hnum1eq, hp1eq, htr1eq, hdigits1eq, hexp1eq, hnone1⟩
have hd1w : d1w = d1 := by
cases d1w
cases d1
simp_all
subst d1w
subst e1w
have hV1 : V d1 < 1 := by
rcases hshapeExists with ⟨z, zs, hxs, hz, hzlt, hlen⟩
have hshape := P472_T1_DecimalValueBounds
((d1.digits.val.take d1.num_digits.val).map (fun b => b.val))
z zs hxs (by omega)
(by
intro q hq
rcases List.mem_map.mp hq with ⟨b, hb, rfl⟩
exact hdigits1 b hb)
d1.decimal_point.val
have hlen' :
((d1.digits.val.take d1.num_digits.val).map (fun b => b.val)).length =
d1.num_digits.val := by
rw [hxs]
simpa using hlen
have hshapeUpper := hshape.2
rw [hlen'] at hshapeUpper
simpa [V, hp1] using hshapeUpper
have hleft := P529_T1_LeftHistoryBoundary X Y d0 d1 exp0 exp1
hplo hphi hewlo ⟨hcountw, hdigitsw, hshapeW⟩ hloop1
(by simpa [V] using hpackage)
have hcap0 : 0 <= exp1.val - exp0.val + 768 - d0.decimal_point.val := hleft.1
have hV0lt : V d0 < (2 : Real) ^ (exp1.val - exp0.val) := by
by_contra hn
have hge : (2 : Real) ^ (exp1.val - exp0.val) <= V d0 := le_of_not_gt hn
have hge1 := hleft.2.1 hge
linarith
have hright := P529_T1_RightHistoryBoundary X Y d d0 exp0
hpointLo hpointHi hinput hloop0 hY herrors
have hcap : 0 <= exp1.val + 768 - d.decimal_point.val :=
(hright.2 1 exp1 hcap0).1
have hVdlt : V d < (1 : Real) * (2 : Real) ^ exp1.val :=
by
simpa [V] using (hright.2 1 exp1 hcap0).2 (by simpa [V] using hV0lt)
obtain ⟨a, ha⟩ := P798_T1_GridAlignment d hinput.1
have hp768 : d.decimal_point.val <= 768 := by omega
obtain ⟨b, hb⟩ := P856_T1_CoefficientGridAlignment 1 exp1.val
d.decimal_point.val hp768 hcap
have hqpos : 0 < (10 : Real) ^ (d.decimal_point.val - 768) :=
zpow_pos (by norm_num) _
have hagrid : V d = (a : Real) * (10 : Real) ^ (d.decimal_point.val - 768) := by
simpa [V] using ha
have hbgrid : (2 : Real) ^ exp1.val = (b : Real) *
(10 : Real) ^ (d.decimal_point.val - 768) := by
simpa using hb
have hab : a < b := by
have hlt : (a : Real) * (10 : Real) ^ (d.decimal_point.val - 768) <
(b : Real) * (10 : Real) ^ (d.decimal_point.val - 768) := by
rw [← hagrid, ← hbgrid]
simpa using hVdlt
exact_mod_cast (lt_of_mul_lt_mul_right hlt (le_of_lt hqpos))
have ha1b : a + 1 <= b := by omega
have hYbound : Y / (2 : Real) ^ exp1.val <= 1 := by
have hYeq : Y = ((a + 1 : Nat) : Real) *
(10 : Real) ^ (d.decimal_point.val - 768) := by
rw [hY, hagrid]
push_cast
ring
have hle : Y <= (2 : Real) ^ exp1.val := by
rw [hYeq, hbgrid]
exact mul_le_mul_of_nonneg_right (by exact_mod_cast ha1b) (le_of_lt hqpos)
exact (div_le_iff₀ (zpow_pos (by norm_num) _)).2 (by simpa using hle)
have hXY : X < Y := by
rcases herrors with ⟨eta, hX, heta0, hetaLt, htr⟩
rw [hX, hY]
have hq : 0 < (10 : Real) ^ (d.decimal_point.val - 768) := hqpos
linarith
have hloexp := P826_T1_ExponentLowerBound X Y exp1.val hXlo hXY hYbound
have hhi : exp1.val <= 1260 := by omega
exact ⟨hXlo, hXY, hYbound, hloexp, hhi⟩
end dec2flt_model
Proof structure
Follow the declared dependencies to read the supporting statements and proofs.
Uses
Inspect related source (152)
- Dec2flt_modelNumImpTraitsFloatU64 · traits.rs:309 Program Rust
- DecimalSeq · dec2flt/decimal_seq.rs:22 Program Rust
- MAX_DIGITS · dec2flt/decimal_seq.rs:64 Program Rust
More program dependencies (110)
- left_shift · dec2flt/decimal_seq.rs:130 Program Rust
- left_shift_loop0 · dec2flt/decimal_seq.rs:139 Program Rust
- body · dec2flt/decimal_seq.rs:139 Program Rust
- left_shift_loop1 · dec2flt/decimal_seq.rs:153 Program Rust
- body · dec2flt/decimal_seq.rs:153 Program Rust
- number_of_digits_decimal_left_shift · dec2flt/decimal_seq.rs:375 Program Rust
- number_of_digits_decimal_left_shift_loop · dec2flt/decimal_seq.rs:441 Program Rust
- body · dec2flt/decimal_seq.rs:441 Program Rust
- parse_long_mantissa · dec2flt/slow.rs:27 Program Rust
- MAX_SHIFT · dec2flt/slow.rs:28 Program Rust
- NUM_POWERS · dec2flt/slow.rs:29 Program Rust
- POWERS · dec2flt/slow.rs:30 Program Rust
- call · dec2flt/slow.rs:33 Program Rust
- parse_long_mantissa_loop0 · dec2flt/slow.rs:51 Program Rust
- body · dec2flt/slow.rs:51 Program Rust
- parse_long_mantissa_loop1 · dec2flt/slow.rs:69 Program Rust
- body · dec2flt/slow.rs:69 Program Rust
- parse_long_mantissa_loop2 · dec2flt/slow.rs:94 Program Rust
- body · dec2flt/slow.rs:94 Program Rust
- from_u64 · dec2flt/mod.rs:263 Program Rust
- BITS · traits.rs:319 Program Rust
- EXP_MASK · traits.rs:321 Program Rust
- INFINITY · traits.rs:312 Program Rust
- LARGEST_POWER_OF_TEN · traits.rs:327 Program Rust
- MAX_EXPONENT_ROUND_TO_EVEN · traits.rs:325 Program Rust
- MIN_EXPONENT_ROUND_TO_EVEN · traits.rs:324 Program Rust
- NAN · traits.rs:314 Program Rust
- NEG_INFINITY · traits.rs:313 Program Rust
- NEG_NAN · traits.rs:317 Program Rust
- SIG_MASK · traits.rs:322 Program Rust
- SIG_TOTAL_BITS · traits.rs:320 Program Rust
- SMALLEST_POWER_OF_TEN · traits.rs:328 Program Rust
- classify · traits.rs:334 Program Rust
- to_bits · traits.rs:330 Program Rust
- Dec2flt_modelNumImpTraitsInt · traits.rs:51 Program Rust
- FloatErrorKind · num/mod.rs:18 Program Rust
- ParseFloatError · num/mod.rs:13 Program Rust
- Dec2FltAssemblyTrace · dec2flt/mod.rs:329 Program Rust
- Dec2FltTrace · dec2flt/mod.rs:295 Program Rust
- Lemire · dec2flt/mod.rs:115 Program Rust
- BiasedFp · dec2flt/common.rs:56 Program Rust
- zero_pow2 · dec2flt/common.rs:66 Program Rust
- ByteSlice · dec2flt/common.rs:4 Program Rust
- Decimal · dec2flt/decimal.rs:32 Program Rust
- DECIMAL_POINT_RANGE · dec2flt/decimal_seq.rs:68 Program Rust
- default · dec2flt/decimal_seq.rs:34 Program Rust
- right_shift · dec2flt/decimal_seq.rs:176 Program Rust
- right_shift_loop0 · dec2flt/decimal_seq.rs:181 Program Rust
- body · dec2flt/decimal_seq.rs:181 Program Rust
- right_shift_loop0_loop0 · dec2flt/decimal_seq.rs:191 Program Rust
- body · dec2flt/decimal_seq.rs:191 Program Rust
- right_shift_loop1 · dec2flt/decimal_seq.rs:210 Program Rust
- body · dec2flt/decimal_seq.rs:210 Program Rust
- right_shift_loop2 · dec2flt/decimal_seq.rs:217 Program Rust
- body · dec2flt/decimal_seq.rs:217 Program Rust
- round · dec2flt/decimal_seq.rs:97 Program Rust
- round_loop · dec2flt/decimal_seq.rs:107 Program Rust
- body · dec2flt/decimal_seq.rs:107 Program Rust
- trim · dec2flt/decimal_seq.rs:83 Program Rust
- trim_loop · dec2flt/decimal_seq.rs:92 Program Rust
- body · dec2flt/decimal_seq.rs:92 Program Rust
- TABLE · dec2flt/decimal_seq.rs:377 Program Rust
- TABLE_POW5 · dec2flt/decimal_seq.rs:386 Program Rust
- parse_decimal_seq · dec2flt/decimal_seq.rs:288 Program Rust
- parse_decimal_seq_loop0 · dec2flt/decimal_seq.rs:296 Program Rust
- body · dec2flt/decimal_seq.rs:296 Program Rust
- parse_decimal_seq_loop1 · dec2flt/decimal_seq.rs:368 Program Rust
- body · dec2flt/decimal_seq.rs:368 Program Rust
- parse_decimal_seq_loop2 · dec2flt/decimal_seq.rs:309 Program Rust
- body · dec2flt/decimal_seq.rs:309 Program Rust
- parse_decimal_seq_loop3 · dec2flt/decimal_seq.rs:313 Program Rust
- body · dec2flt/decimal_seq.rs:313 Program Rust
- parse_decimal_seq_loop4 · dec2flt/decimal_seq.rs:368 Program Rust
- body · dec2flt/decimal_seq.rs:368 Program Rust
- parse_decimal_seq_loop5 · dec2flt/decimal_seq.rs:313 Program Rust
- body · dec2flt/decimal_seq.rs:313 Program Rust
- parse_decimal_seq_loop6 · dec2flt/decimal_seq.rs:368 Program Rust
- body · dec2flt/decimal_seq.rs:368 Program Rust
- parse_decimal_seq_loop7 · dec2flt/decimal_seq.rs:368 Program Rust
- body · dec2flt/decimal_seq.rs:368 Program Rust
- closure · dec2flt/slow.rs:33 Program Rust
- CastInto · traits.rs:18 Program Rust
- Float · traits.rs:74 Program Rust
- default · traits.rs:116 Program Rust
- default · traits.rs:104 Program Rust
- default · traits.rs:119 Program Rust
- default · traits.rs:110 Program Rust
- default · traits.rs:113 Program Rust
- default · traits.rs:101 Program Rust
- FloatExt · traits.rs:170 Program Rust
- Int · traits.rs:27 Program Rust
- read_u64 · dec2flt/common.rs:22 Program Rust
- write_u64 · dec2flt/common.rs:29 Program Rust
- Dec2flt_modelNumImpTraitsCastIntoI16 · traits.rs:45 Program Rust
- ONE · traits.rs:53 Program Rust
- ZERO · traits.rs:52 Program Rust
- is_8digits · dec2flt/common.rs:44 Program Rust
- MAX_DIGITS_WITHOUT_OVERFLOW · dec2flt/decimal_seq.rs:67 Program Rust
- count_trailing_zeros · dec2flt/decimal_seq.rs:236 Program Rust
- count_trailing_zeros_loop · dec2flt/decimal_seq.rs:240 Program Rust
- body · dec2flt/decimal_seq.rs:240 Program Rust
- final_decimal_point · dec2flt/decimal_seq.rs:269 Program Rust
- parse_digits_into_seq · dec2flt/decimal_seq.rs:257 Program Rust
- parse_digits_into_seq_loop · dec2flt/decimal_seq.rs:259 Program Rust
- body · dec2flt/decimal_seq.rs:259 Program Rust
- parse_scientific · dec2flt/parse.rs:121 Program Rust
- parse_scientific_loop · dec2flt/parse.rs:145 Program Rust
- body · dec2flt/parse.rs:145 Program Rust
- cast · traits.rs:46 Program Rust
- try_add_digit · dec2flt/decimal_seq.rs:74 Program Rust
Standard-library dependencies (39)
- clone · core/src/clone.rs:698 Rust library
- div · core/src/ops/arith.rs:515 Rust library
- mul · core/src/ops/arith.rs:350 Rust library
- neg · core/src/ops/arith.rs:719 Rust library
- bitand · core/src/ops/bit.rs:178 Rust library
- bitor · core/src/ops/bit.rs:282 Rust library
- shl · core/src/ops/bit.rs:489 Rust library
- shr · core/src/ops/bit.rs:612 Rust library
- EXPONENT_MASK · core/src/num/f64.rs:615 Rust library
- INFINITY · core/src/num/f64.rs:512 Rust library
- MANTISSA_DIGITS · core/src/num/f64.rs:412 Rust library
- MANTISSA_MASK · core/src/num/f64.rs:637 Rust library
- NAN · core/src/num/f64.rs:509 Rust library
- NEG_INFINITY · core/src/num/f64.rs:515 Rust library
- classify · core/src/num/f64.rs:782 Rust library
- from_bits · core/src/num/f64.rs:1269 Rust library
- to_bits · core/src/num/f64.rs:1223 Rust library
- is_ascii_digit · core/src/num/mod.rs:958 Rust library
- from_residual · core/src/option.rs:2793 Rust library
- branch · core/src/option.rs:2779 Rust library
- first · core/src/slice/mod.rs:155 Rust library
- split_first · core/src/slice/mod.rs:198 Rust library
- as_bytes · core/src/str/mod.rs:498 Rust library
- CoreMarkerCopy · core/src/marker.rs:57 Rust library
- CoreOpsArithDivF64F64 · core/src/ops/arith.rs:511 Rust library
- CoreOpsArithMulF64F64 · core/src/ops/arith.rs:344 Rust library
- CoreOpsArithNegF64 · core/src/ops/arith.rs:713 Rust library
- FpCategory · core/src/num/mod.rs:1522 Rust library
- Div · core/src/ops/arith.rs:460 Rust library
- Mul · core/src/ops/arith.rs:322 Rust library
- Neg · core/src/ops/arith.rs:690 Rust library
- BitOr · core/src/ops/bit.rs:254 Rust library
- Shl · core/src/ops/bit.rs:461 Rust library
- Shr · core/src/ops/bit.rs:584 Rust library
- CoreCloneClone · core/src/clone.rs:696 Rust library
- CoreOpsBitBitAndU64U64 · core/src/ops/bit.rs:174 Rust library
- CoreOpsBitBitOrU64U64 · core/src/ops/bit.rs:278 Rust library
- CoreOpsBitShlU32U64 · core/src/ops/bit.rs:483 Rust library
- CoreOpsBitShrU32U64 · core/src/ops/bit.rs:606 Rust library
Related source and models come from the extraction records and declared dependencies.
Proof assumptions and review
Lean checks the formal proof. Trellis also reviews how the statement corresponds to the intended requirement.
Transitive assumptions
- Classical.choice
- Dec2Flt.P340_T1_selected_target_numBits
- Quot.sound
- propext
This list combines the assumptions recorded for this declaration and its dependencies. It may include assumptions used by auxiliary declarations in those modules.
Helper theorems included
- Binary64Model
- Binary64ModelDefault
- DecimalDigitLexScale
- DecimalLeftShiftDigitGrowth
- DecimalLeftShiftFirstLoopSemantics
- DecimalLeftShiftLoop1Execution
All 149 entries
- Binary64Model
- Binary64ModelDefault
- DecimalDigitLexScale
- DecimalLeftShiftDigitGrowth
- DecimalLeftShiftFirstLoopSemantics
- DecimalLeftShiftLoop1Execution
- DecimalLeftShiftLoopLex
- DecimalLeftShiftSecondLoopSemantics
- DecimalLeftShiftTableCertificate
- DecimalRightShiftU64DyadicBridge
- DecimalSeqLeftShiftRecordSemantics
- DecimalSeqTrimSemantics
- F64
- F64 Insts CoreCloneClone
- F64 Insts CoreMarkerCopy
- F64 Insts CoreOpsArithDivF64F64
- F64 Insts CoreOpsArithMulF64F64
- F64 Insts CoreOpsArithNegF64
- F64 Insts Dec2flt modelNumImpTraitsFloatU64
- F64 Insts Dec2flt modelNumImpTraitsFloatU64 BITS
- F64 Insts Dec2flt modelNumImpTraitsFloatU64 EXP MASK
- F64 Insts Dec2flt modelNumImpTraitsFloatU64 INFINITY
- F64 Insts Dec2flt modelNumImpTraitsFloatU64 LARGEST POWER OF TEN
- F64 Insts Dec2flt modelNumImpTraitsFloatU64 MAX EXPONENT ROUND TO EVEN
- F64 Insts Dec2flt modelNumImpTraitsFloatU64 MIN EXPONENT ROUND TO EVEN
- F64 Insts Dec2flt modelNumImpTraitsFloatU64 NAN
- F64 Insts Dec2flt modelNumImpTraitsFloatU64 NEG INFINITY
- F64 Insts Dec2flt modelNumImpTraitsFloatU64 NEG NAN
- F64 Insts Dec2flt modelNumImpTraitsFloatU64 SIG MASK
- F64 Insts Dec2flt modelNumImpTraitsFloatU64 SIG TOTAL BITS
- F64 Insts Dec2flt modelNumImpTraitsFloatU64 SMALLEST POWER OF TEN
- F64 Insts Dec2flt modelNumImpTraitsFloatU64 classify
- F64 Insts Dec2flt modelNumImpTraitsFloatU64 to bits
- ModelF64Classify
- ModelF64Clone
- ModelF64Div
- ModelF64ExponentMask
- ModelF64FromBits
- ModelF64FromU64
- ModelF64Infinity
- ModelF64MantissaDigits
- ModelF64MantissaMask
- ModelF64Mul
- ModelF64Nan
- ModelF64Neg
- ModelF64NegInfinity
- ModelF64ToBits
- ModelOptionBranch
- ModelOptionFromResidual
- ModelSliceFirst
- ModelSliceSplitFirst
- ModelStrAsBytes
- ModelU64BitAnd
- ModelU64BitOr
- ModelU64Shl
- ModelU64Shr
- ModelU8IsAsciiDigit
- DecimalRightShiftFinalLoopSemantics
- DecimalRightShiftLoop0Execution
- DecimalRightShiftMainLoopSemantics
- DecimalRightShiftPrefixLoopSemantics
- DecimalSeqDyadicShiftSemantics
- DecimalSeqRightShiftRecordSemantics
- DecimalValueBounds
- LoopZeroRightShiftTransport
- RightLoopStep
- RightPrefixLengthBounds
- RightShiftCanonical
- SlowLoop0Execution
- LeftHistoryBoundary
- LeftLeadingProgress
- LeftLoopStep
- LeftShiftCertificate
- Loop1Execution
- NormalizationBounds
- RightBoundaryTransport
- RightHistoryBoundary
- GridAlignment
- GridBoundaryRetained
- LeftBoundaryTransport
- DecimalFoldBounds
- LeftShiftPointGrowth
- PointZeroGrowth
- SelectedLeftGrowth
- ExponentLowerBound
- PowerGridAlignment
- ResultLoopBackward
- LeftCoefficientTransport
- LeftHistoryInvariant
- LeftStepPotential
- CoefficientGridAlignment
- LeftLoopBudgetTransition
- PositiveScaleErrorTransport
- Preamble
- ResultLoopPartial
- SliceU8 Insts Dec2flt modelNumImpDec2fltCommonByteSlice read u64
- SliceU8 Insts Dec2flt modelNumImpDec2fltCommonByteSlice write u64
- SlowShiftSelectorCertificate
- U64 Insts CoreOpsBitBitAndU64U64
- U64 Insts CoreOpsBitBitOrU64U64
- U64 Insts CoreOpsBitShlU32U64
- U64 Insts CoreOpsBitShrU32U64
- U64 Insts Dec2flt modelNumImpTraitsCastIntoI16
- U64 Insts Dec2flt modelNumImpTraitsCastIntoI16 cast
- U64 Insts Dec2flt modelNumImpTraitsInt
- U64 Insts Dec2flt modelNumImpTraitsInt ONE
- U64 Insts Dec2flt modelNumImpTraitsInt ZERO
- core num FpCategory
- core ops arith Div
- core ops arith Mul
- core ops arith Neg
- core ops bit BitOr
- core ops bit Shl
- core ops bit Shr
- num imp dec2flt common BiasedFp
- num imp dec2flt common BiasedFp zero pow2
- num imp dec2flt common is 8digits
- num imp dec2flt decimal seq DecimalSeq
- num imp dec2flt decimal seq DecimalSeq DECIMAL POINT RANGE
- num imp dec2flt decimal seq DecimalSeq Insts CoreDefaultDefault default
- num imp dec2flt decimal seq DecimalSeq MAX DIGITS
- num imp dec2flt decimal seq DecimalSeq MAX DIGITS WITHOUT OVERFLOW
- num imp dec2flt decimal seq DecimalSeq left shift
- num imp dec2flt decimal seq DecimalSeq right shift
- num imp dec2flt decimal seq DecimalSeq round
- num imp dec2flt decimal seq DecimalSeq trim
- num imp dec2flt decimal seq DecimalSeq try add digit
- num imp dec2flt decimal seq count trailing zeros
- num imp dec2flt decimal seq final decimal point
- num imp dec2flt decimal seq number of digits decimal left shift
- num imp dec2flt decimal seq number of digits decimal left shift TABLE
- num imp dec2flt decimal seq number of digits decimal left shift TABLE POW5
- num imp dec2flt decimal seq parse decimal seq
- num imp dec2flt decimal seq parse digits into seq
- num imp dec2flt parse parse scientific
- num imp dec2flt slow parse long mantissa
- num imp dec2flt slow parse long mantissa MAX SHIFT
- num imp dec2flt slow parse long mantissa NUM POWERS
- num imp dec2flt slow parse long mantissa POWERS
- num imp dec2flt slow parse long mantissa closure
- num imp dec2flt slow parse long mantissa closure Insts CoreOpsFunctionFnTupleUsizeUsize call
- num imp traits CastInto
- num imp traits Float
- num imp traits Float EXP BIAS default
- num imp traits Float EXP BITS default
- num imp traits Float EXP MIN default
- num imp traits Float EXP SAT default
- num imp traits Float SIG BITS default
- num imp traits Int
Technical checking records
Local closure summary
{
"node": "P529_T1_NormalizationBounds",
"closure_version": "patch_c_v1",
"active_decl_hash": "a1dfd11c9fcf3f96bfaa33cdc3b382f0a5951f0d262e307671a524dd9b9fec97",
"active_statement_hash": "422a7b47ac04874eac215f8b41969dba5f62cfbd213a15cad06dbb430c2df320",
"kernel_axioms": [
"Classical.choice",
"Quot.sound",
"propext"
],
"toolchain_hash": "ce4c4e3d87434b9663f46de25ce34b48a0cf0d392e0a320a0787b4674a2d7b61",
"lean_executable_hash": "3e0d0d3d801675359f2d4cf9815bfdb417b20b92fdd9d48b3b14c95bbae28bbf",
"checker_script_hash": "c8e4a03273e23b9a8f2e141020652a4e0b7b0a8ab0883366ea9d031ca3f37aa1",
"approved_axioms_hash": "576e6bf9480cfd32f53c309c7ac8fb115c1ba6e413f299ed5ff9fa7c647e6769",
"axcheck_status": "Agreed",
"accepted_at_snapshot_id": "worker-result-local-closure-issuance-cycle-200",
"boundary_theorems": {},
"strict_theorem_deps": {
"P472_T1_DecimalValueBounds": "4b5c924b5d52bc9d",
"P495_T1_SlowLoop0Execution": "5a1e49d921a1825a",
"P529_T1_LeftHistoryBoundary": "81ad17a70873ae99",
"P529_T1_Loop1Execution": "da66766413255a0f",
"P529_T1_RightHistoryBoundary": "2f9292b355b28e68",
"P798_T1_GridAlignment": "f2e86c75264ff7d3",
"P826_T1_ExponentLowerBound": "5a0b94e823acb335",
"P856_T1_CoefficientGridAlignment": "811bf9ec1aa2ffd7"
},
"strict_definition_deps": {
"F64": "ec4e25fbaf4e11d4",
"F64_Insts_Dec2flt_modelNumImpTraitsFloatU64": "94095c9bf79da164",
"num_imp_dec2flt_common_BiasedFp": "63baac539d218a81",
"num_imp_dec2flt_decimal_seq_DecimalSeq": "59bf1ff9fe88fa8d",
"num_imp_dec2flt_slow_parse_long_mantissa": "a3ed147b34a97b11"
}
}Prose assessment
{
"label": "Recorded Sound: VerifierPass",
"assessment_status": "VerifierPass",
"fingerprint_relation": "matches current fingerprint",
"assessment_fingerprint": "sound-v2:e0a4064f7188523b2d6c28ff065a85d4e56b73f2fd8f08d57bd1c6446b0043b2",
"current_fingerprint": "sound-v2:e0a4064f7188523b2d6c28ff065a85d4e56b73f2fd8f08d57bd1c6446b0043b2",
"superseded_for_theorem_closure": false
}Review verdicts
{
"corr_status": "Pass",
"sound_status": "Pass",
"substantiveness_status": "Pass"
}