Statement
This explanation was written alongside the formalization to describe the statement and its reasoning.
Lemma · Slow subnormal adjustment with fixed endpoints
Lean statement
Trellis authored these statements and proofs. Lean checks the formal proofs; the assumptions used by each proof are listed below.
import Tablet.DecimalSeqRightShiftCanonical
import Tablet.DecimalRightShiftLoop0Execution
import Tablet.ParserSlowLoop1
import Tablet.ParserExponentConstants
import Tablet.num_imp_dec2flt_slow_parse_long_mantissa
import Tablet.num_imp_dec2flt_slow_parse_long_mantissa_MAX_SHIFT
open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
namespace dec2flt_model
-- [TABLET NODE: ParserSlowLoop2]
theorem ParserSlowLoop2 :
forall (A B : Real) (d1 : num.imp.dec2flt.decimal_seq.DecimalSeq)
(exp1 : Std.I32),
-1079 <= exp1.val -> d1.decimal_point.val = 0 ->
d1.num_digits.val != 0 -> 5 <= d1.digits.val[0].val ->
let digits1 :=
(d1.digits.val.take d1.num_digits.val).map (fun z => z.val)
let integer1 : Nat := digits1.foldl (fun n digit => 10 * n + digit) 0
let value1 : Real := integer1 * (10 : Real) ^
(d1.decimal_point.val - (d1.num_digits.val : Int))
d1.num_digits.val <= 768 /\
(forall z, z ∈ d1.digits.val.take d1.num_digits.val -> z.val < 10) /\
(exists eta1 u1 : Real,
A / (2 : Real) ^ exp1.val = value1 + eta1 /\
B / (2 : Real) ^ exp1.val = value1 + u1 /\
0 <= eta1 /\ eta1 < u1 /\
(d1.truncated = true <-> 0 < eta1)) ->
exists (expStart : Std.I32)
(d2 : num.imp.dec2flt.decimal_seq.DecimalSeq)
(exp2 : Std.I32) (totalShift : Nat),
exp1 - 1#i32 = ok expStart /\
num.imp.dec2flt.slow.parse_long_mantissa_loop2
F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 d1 expStart =
ok (d2, exp2) /\
totalShift <= 58 /\
expStart.val = exp1.val - 1 /\
exp2.val = max expStart.val (-1022) /\
totalShift = (exp2.val - expStart.val).toNat /\
-2047 <= d2.decimal_point.val /\ d2.num_digits.val != 0 /\
let digits2 :=
(d2.digits.val.take d2.num_digits.val).map (fun z => z.val)
let integer2 : Nat := digits2.foldl (fun n digit => 10 * n + digit) 0
let value2 : Real := integer2 * (10 : Real) ^
(d2.decimal_point.val - (d2.num_digits.val : Int))
d2.num_digits.val <= 768 /\
(forall z, z ∈ d2.digits.val.take d2.num_digits.val -> z.val < 10) /\
(exists z zs, digits2 = z :: zs /\ 1 <= z /\ z < 10 /\
digits2.length = d2.num_digits.val) /\
exists eta2 u2 : Real,
A / (2 : Real) ^ (exp2.val + 1) = value2 + eta2 /\
B / (2 : Real) ^ (exp2.val + 1) = value2 + u2 /\
0 <= eta2 /\ eta2 < u2 /\
(d2.truncated = true <-> 0 < eta2) := 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.
Earlier prose review
An earlier review questioned the prose argument. Lean subsequently checked the formal proof. Review of the statement’s intended meaning is a separate judgment.
Proof
Lean proof
dsimp only
intro A B d1 exp1 hexpLower hpoint hnumne hlead hinput
rcases hinput with ⟨hcap, hdigit, eta1, u1, hA, hB, heta0, hetau,
hsticky⟩
let Digits := fun d : num.imp.dec2flt.decimal_seq.DecimalSeq =>
(d.digits.val.take d.num_digits.val).map (fun z => z.val)
have hnumne' : d1.num_digits.val ≠ 0 := by
simpa [bne_iff_ne] using hnumne
have hlen : (Digits d1).length = d1.num_digits.val := by
simp only [Digits, List.length_map, List.length_take]
rw [d1.digits.property]
change min d1.num_digits.val 768 = d1.num_digits.val
exact Nat.min_eq_left hcap
have hlistne : Digits d1 ≠ [] := by
intro hnil
rw [hnil] at hlen
simp at hlen
omega
obtain ⟨z, zs, hshape⟩ := List.exists_cons_of_ne_nil hlistne
have hnumPos : 0 < d1.num_digits.val := by omega
have hindexBound : (0 : Nat) < d1.digits.val.length := by
rw [d1.digits.property]
norm_num
have hget : d1.digits.val[0]? = some d1.digits.val[0] :=
getElem?_eq_some_iff.mpr ⟨hindexBound, rfl⟩
have hhead := congrArg List.head? hshape
rw [List.head?_eq_getElem?] at hhead
have htake : (d1.digits.val.take d1.num_digits.val)[0]? =
some d1.digits.val[0] := by
rw [List.getElem?_take, if_pos hnumPos]
exact hget
simp only [Digits, List.getElem?_map, htake] at hhead
have hleadEq : d1.digits.val[0].val = z := by
simpa using Option.some.inj hhead
have hdigitNat : forall q, q ∈ Digits d1 -> q < 10 := by
intro q hq
simp only [Digits, List.mem_map] at hq
rcases hq with ⟨a, ha, rfl⟩
exact hdigit a ha
have hzLo : 1 <= z := by omega
have hzHi : z < 10 := hdigitNat z (by rw [hshape]; simp)
have hlenCons : (z :: zs).length = d1.num_digits.val := by
rw [← hshape]
exact hlen
have hshapeInput :
d1.num_digits.val <= 768 /\
(forall q, q ∈ d1.digits.val.take d1.num_digits.val -> q.val < 10) /\
(exists z zs, Digits d1 = z :: zs /\ 1 <= z /\ z < 10 /\
(Digits d1).length = d1.num_digits.val) := by
exact ⟨hcap, hdigit, z, zs, hshape, hzLo, hzHi, hlen⟩
obtain ⟨expStart, hsub, hsubSpec⟩ := Aeneas.Std.WP.spec_imp_exists
(IScalar.sub_spec (x := exp1) (y := 1#i32) (by
rw [IScalar.min_I32_eq]
norm_num
omega) (by
rw [IScalar.max_I32_eq]
norm_num
have := exp1.bv.isLt
scalar_tac))
have hstartVal : expStart.val = exp1.val - 1 := by
simpa using hsubSpec
rcases ParserExponentConstants with
⟨hbits, htotal, hsig, hexpbits, hexpsat, hinf, hbias, hmin,
hsmall, hlarge, hroundmin, hroundmax⟩
by_cases hstartHigh : -1022 <= expStart.val
· have hnotGt : ¬ ((-1022)#i32 : Std.I32) > expStart := by
change ¬ (-1022 : Int) > expStart.val
omega
have hbody :
num.imp.dec2flt.slow.parse_long_mantissa_loop2.body
F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 d1 expStart =
ok (done (d1, expStart)) := by
unfold num.imp.dec2flt.slow.parse_long_mantissa_loop2.body
rw [hmin]
simp only [bind_tc_ok]
by_cases hgt : ((-1022)#i32 : Std.I32) > expStart
· change expStart.val < -1022 at hgt
omega
· simp only [hgt, if_false]
have hloop :
num.imp.dec2flt.slow.parse_long_mantissa_loop2
F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 d1 expStart =
ok (d1, expStart) := by
unfold num.imp.dec2flt.slow.parse_long_mantissa_loop2
rw [Aeneas.Std.loop.eq_1]
simpa only [hbody]
refine ⟨expStart, d1, expStart, 0, hsub, hloop, by omega, hstartVal,
?_, by simp, by omega, by simpa [bne_iff_ne] using hnumne', ?_⟩
· simp [max_eq_left hstartHigh]
· dsimp only
refine ⟨hcap, hdigit, ⟨z, zs, hshape, hzLo, hzHi, hlen⟩,
eta1, u1, ?_, ?_, heta0, hetau, hsticky⟩
· simpa [show expStart.val + 1 = exp1.val by omega] using hA
· simpa [show expStart.val + 1 = exp1.val by omega] using hB
· have hstartLow : expStart.val < -1022 := by omega
obtain ⟨diff, hdiff, hdiffSpec⟩ := Aeneas.Std.WP.spec_imp_exists
(IScalar.sub_spec (x := ((-1022)#i32 : Std.I32)) (y := expStart) (by
rw [IScalar.min_I32_eq]
norm_num
omega) (by
rw [IScalar.max_I32_eq]
norm_num
omega))
have hdiffVal : diff.val = -1022 - expStart.val := by
simpa using hdiffSpec
have hgapLo : 1 <= diff.val := by omega
have hgapHi : diff.val <= 58 := by omega
obtain ⟨shift, hshiftCast, hshiftSpec⟩ := Aeneas.Std.WP.spec_imp_exists
(IScalar.hcast_inBounds_spec .Usize diff (by
rw [hdiffVal]
constructor <;> scalar_tac))
have hshiftVal : (shift.val : Int) = diff.val := by
simpa using hshiftSpec
have hshift58 : shift.val <= 58 := by omega
obtain ⟨read, acc, d2, hpref, hreadLo, hreadHi, haccLo, haccHi,
hprosLo, hprosHi, hright, hd2point, hd2nonzero⟩ :=
DecimalRightShiftLoop0Execution d1 shift (by omega) (by omega) (by omega)
⟨hcap, hdigit, z, zs, by simpa [Digits] using hshape, hzLo, hzHi,
hlenCons⟩
let shiftI : Std.I32 := UScalar.hcast .I32 shift
have hshiftIVal : shiftI.val = (shift.val : Int) := by
have hs := UScalar.hcast_inBounds_spec .I32 shift (by
rw [IScalar.max_I32_eq]
omega)
simpa [shiftI, lift, WP.spec_ok] using hs
obtain ⟨exp2, hadd, haddSpec⟩ := Aeneas.Std.WP.spec_imp_exists
(IScalar.add_spec (x := expStart) (y := shiftI) (by
rw [hshiftIVal, IScalar.min_I32_eq]
omega) (by
rw [hshiftIVal, IScalar.max_I32_eq]
omega))
have hexp2Val : exp2.val = -1022 := by
rw [haddSpec, hshiftIVal, hshiftVal, hdiffVal]
omega
have hmaxShift :
num.imp.dec2flt.slow.parse_long_mantissa.MAX_SHIFT = 60#usize := by
rw [num.imp.dec2flt.slow.parse_long_mantissa.MAX_SHIFT.eq_def]
have hnotCap : ¬ shift >
num.imp.dec2flt.slow.parse_long_mantissa.MAX_SHIFT := by
rw [hmaxShift]
change ¬ shift.val > 60
omega
have hbodyCont :
num.imp.dec2flt.slow.parse_long_mantissa_loop2.body
F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 d1 expStart =
ok (cont (d2, exp2)) := by
unfold num.imp.dec2flt.slow.parse_long_mantissa_loop2.body
rw [hmin]
have hgt : ((-1022)#i32 : Std.I32) > expStart := by
change (-1022 : Int) > expStart.val
omega
simp only [bind_tc_ok, hgt, if_true, hdiff]
rw [hshiftCast]
simp only [bind_tc_ok, hnotCap, if_false, hright, lift]
rw [show UScalar.hcast .I32 shift = shiftI by rfl]
simp only [bind_tc_ok, hadd]
have hnotGt2 : ¬ ((-1022)#i32 : Std.I32) > exp2 := by
change ¬ (-1022 : Int) > exp2.val
omega
have hbodyDone :
num.imp.dec2flt.slow.parse_long_mantissa_loop2.body
F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 d2 exp2 =
ok (done (d2, exp2)) := by
unfold num.imp.dec2flt.slow.parse_long_mantissa_loop2.body
rw [hmin]
simp only [bind_tc_ok]
by_cases hgt : ((-1022)#i32 : Std.I32) > exp2
· change exp2.val < -1022 at hgt
omega
· simp only [hgt, if_false]
have hloop :
num.imp.dec2flt.slow.parse_long_mantissa_loop2
F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 d1 expStart =
ok (d2, exp2) := by
unfold num.imp.dec2flt.slow.parse_long_mantissa_loop2
rw [Aeneas.Std.loop.eq_1]
simp only [hbodyCont, bind_tc_ok]
rw [Aeneas.Std.loop.eq_1]
simpa only [hbodyDone]
have hcanonical := DecimalSeqRightShiftCanonical d1 d2 shift
(A / (2 : Real) ^ exp1.val) (B / (2 : Real) ^ exp1.val)
⟨hcap, hdigit, z, zs, by simpa [Digits] using hshape, hzLo, hzHi,
by simpa [Digits] using hlen⟩
⟨eta1, u1, hA, hB, heta0, hetau, hsticky⟩
(by omega) hright hd2nonzero
dsimp only at hcanonical
rcases hcanonical with ⟨hcap2, hdigit2, hshapePack, hendPack, hpoint2⟩
rcases hshapePack with ⟨z2, zs2, hshape2, hz2Lo, hz2Hi, hlen2, hlast2⟩
rcases hendPack with ⟨eta2, u2, hA2, hB2, heta2, heta2u2, hsticky2⟩
have hscaleA :
(A / (2 : Real) ^ exp1.val) / (2 : Real) ^ shift.val =
A / (2 : Real) ^ (exp2.val + 1) := by
have heq : exp2.val + 1 = exp1.val + (shift.val : Int) := by omega
rw [heq, zpow_add₀ (by norm_num : (2 : Real) ≠ 0)]
norm_num only [zpow_natCast]
rw [div_div]
have hscaleB :
(B / (2 : Real) ^ exp1.val) / (2 : Real) ^ shift.val =
B / (2 : Real) ^ (exp2.val + 1) := by
have heq : exp2.val + 1 = exp1.val + (shift.val : Int) := by omega
rw [heq, zpow_add₀ (by norm_num : (2 : Real) ≠ 0)]
norm_num only [zpow_natCast]
rw [div_div]
refine ⟨expStart, d2, exp2, shift.val, hsub, hloop, hshift58,
hstartVal, ?_, ?_, hpoint2, by simpa [bne_iff_ne] using hd2nonzero, ?_⟩
· rw [hexp2Val, max_eq_right (by omega)]
· rw [hexp2Val]
omega
· dsimp only
refine ⟨hcap2, hdigit2, ⟨z2, zs2, hshape2, hz2Lo, hz2Hi, hlen2⟩,
eta2, u2, ?_, ?_, heta2, heta2u2, hsticky2⟩
· rw [← hscaleA]
exact hA2
· rw [← hscaleB]
exact hB2
end dec2flt_model
Download Lean source · Download TeX source
Complete Lean module
import Tablet.DecimalSeqRightShiftCanonical
import Tablet.DecimalRightShiftLoop0Execution
import Tablet.ParserSlowLoop1
import Tablet.ParserExponentConstants
import Tablet.num_imp_dec2flt_slow_parse_long_mantissa
import Tablet.num_imp_dec2flt_slow_parse_long_mantissa_MAX_SHIFT
open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
namespace dec2flt_model
-- [TABLET NODE: ParserSlowLoop2]
theorem ParserSlowLoop2 :
forall (A B : Real) (d1 : num.imp.dec2flt.decimal_seq.DecimalSeq)
(exp1 : Std.I32),
-1079 <= exp1.val -> d1.decimal_point.val = 0 ->
d1.num_digits.val != 0 -> 5 <= d1.digits.val[0].val ->
let digits1 :=
(d1.digits.val.take d1.num_digits.val).map (fun z => z.val)
let integer1 : Nat := digits1.foldl (fun n digit => 10 * n + digit) 0
let value1 : Real := integer1 * (10 : Real) ^
(d1.decimal_point.val - (d1.num_digits.val : Int))
d1.num_digits.val <= 768 /\
(forall z, z ∈ d1.digits.val.take d1.num_digits.val -> z.val < 10) /\
(exists eta1 u1 : Real,
A / (2 : Real) ^ exp1.val = value1 + eta1 /\
B / (2 : Real) ^ exp1.val = value1 + u1 /\
0 <= eta1 /\ eta1 < u1 /\
(d1.truncated = true <-> 0 < eta1)) ->
exists (expStart : Std.I32)
(d2 : num.imp.dec2flt.decimal_seq.DecimalSeq)
(exp2 : Std.I32) (totalShift : Nat),
exp1 - 1#i32 = ok expStart /\
num.imp.dec2flt.slow.parse_long_mantissa_loop2
F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 d1 expStart =
ok (d2, exp2) /\
totalShift <= 58 /\
expStart.val = exp1.val - 1 /\
exp2.val = max expStart.val (-1022) /\
totalShift = (exp2.val - expStart.val).toNat /\
-2047 <= d2.decimal_point.val /\ d2.num_digits.val != 0 /\
let digits2 :=
(d2.digits.val.take d2.num_digits.val).map (fun z => z.val)
let integer2 : Nat := digits2.foldl (fun n digit => 10 * n + digit) 0
let value2 : Real := integer2 * (10 : Real) ^
(d2.decimal_point.val - (d2.num_digits.val : Int))
d2.num_digits.val <= 768 /\
(forall z, z ∈ d2.digits.val.take d2.num_digits.val -> z.val < 10) /\
(exists z zs, digits2 = z :: zs /\ 1 <= z /\ z < 10 /\
digits2.length = d2.num_digits.val) /\
exists eta2 u2 : Real,
A / (2 : Real) ^ (exp2.val + 1) = value2 + eta2 /\
B / (2 : Real) ^ (exp2.val + 1) = value2 + u2 /\
0 <= eta2 /\ eta2 < u2 /\
(d2.truncated = true <-> 0 < eta2) := by
-- BODY
dsimp only
intro A B d1 exp1 hexpLower hpoint hnumne hlead hinput
rcases hinput with ⟨hcap, hdigit, eta1, u1, hA, hB, heta0, hetau,
hsticky⟩
let Digits := fun d : num.imp.dec2flt.decimal_seq.DecimalSeq =>
(d.digits.val.take d.num_digits.val).map (fun z => z.val)
have hnumne' : d1.num_digits.val ≠ 0 := by
simpa [bne_iff_ne] using hnumne
have hlen : (Digits d1).length = d1.num_digits.val := by
simp only [Digits, List.length_map, List.length_take]
rw [d1.digits.property]
change min d1.num_digits.val 768 = d1.num_digits.val
exact Nat.min_eq_left hcap
have hlistne : Digits d1 ≠ [] := by
intro hnil
rw [hnil] at hlen
simp at hlen
omega
obtain ⟨z, zs, hshape⟩ := List.exists_cons_of_ne_nil hlistne
have hnumPos : 0 < d1.num_digits.val := by omega
have hindexBound : (0 : Nat) < d1.digits.val.length := by
rw [d1.digits.property]
norm_num
have hget : d1.digits.val[0]? = some d1.digits.val[0] :=
getElem?_eq_some_iff.mpr ⟨hindexBound, rfl⟩
have hhead := congrArg List.head? hshape
rw [List.head?_eq_getElem?] at hhead
have htake : (d1.digits.val.take d1.num_digits.val)[0]? =
some d1.digits.val[0] := by
rw [List.getElem?_take, if_pos hnumPos]
exact hget
simp only [Digits, List.getElem?_map, htake] at hhead
have hleadEq : d1.digits.val[0].val = z := by
simpa using Option.some.inj hhead
have hdigitNat : forall q, q ∈ Digits d1 -> q < 10 := by
intro q hq
simp only [Digits, List.mem_map] at hq
rcases hq with ⟨a, ha, rfl⟩
exact hdigit a ha
have hzLo : 1 <= z := by omega
have hzHi : z < 10 := hdigitNat z (by rw [hshape]; simp)
have hlenCons : (z :: zs).length = d1.num_digits.val := by
rw [← hshape]
exact hlen
have hshapeInput :
d1.num_digits.val <= 768 /\
(forall q, q ∈ d1.digits.val.take d1.num_digits.val -> q.val < 10) /\
(exists z zs, Digits d1 = z :: zs /\ 1 <= z /\ z < 10 /\
(Digits d1).length = d1.num_digits.val) := by
exact ⟨hcap, hdigit, z, zs, hshape, hzLo, hzHi, hlen⟩
obtain ⟨expStart, hsub, hsubSpec⟩ := Aeneas.Std.WP.spec_imp_exists
(IScalar.sub_spec (x := exp1) (y := 1#i32) (by
rw [IScalar.min_I32_eq]
norm_num
omega) (by
rw [IScalar.max_I32_eq]
norm_num
have := exp1.bv.isLt
scalar_tac))
have hstartVal : expStart.val = exp1.val - 1 := by
simpa using hsubSpec
rcases ParserExponentConstants with
⟨hbits, htotal, hsig, hexpbits, hexpsat, hinf, hbias, hmin,
hsmall, hlarge, hroundmin, hroundmax⟩
by_cases hstartHigh : -1022 <= expStart.val
· have hnotGt : ¬ ((-1022)#i32 : Std.I32) > expStart := by
change ¬ (-1022 : Int) > expStart.val
omega
have hbody :
num.imp.dec2flt.slow.parse_long_mantissa_loop2.body
F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 d1 expStart =
ok (done (d1, expStart)) := by
unfold num.imp.dec2flt.slow.parse_long_mantissa_loop2.body
rw [hmin]
simp only [bind_tc_ok]
by_cases hgt : ((-1022)#i32 : Std.I32) > expStart
· change expStart.val < -1022 at hgt
omega
· simp only [hgt, if_false]
have hloop :
num.imp.dec2flt.slow.parse_long_mantissa_loop2
F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 d1 expStart =
ok (d1, expStart) := by
unfold num.imp.dec2flt.slow.parse_long_mantissa_loop2
rw [Aeneas.Std.loop.eq_1]
simpa only [hbody]
refine ⟨expStart, d1, expStart, 0, hsub, hloop, by omega, hstartVal,
?_, by simp, by omega, by simpa [bne_iff_ne] using hnumne', ?_⟩
· simp [max_eq_left hstartHigh]
· dsimp only
refine ⟨hcap, hdigit, ⟨z, zs, hshape, hzLo, hzHi, hlen⟩,
eta1, u1, ?_, ?_, heta0, hetau, hsticky⟩
· simpa [show expStart.val + 1 = exp1.val by omega] using hA
· simpa [show expStart.val + 1 = exp1.val by omega] using hB
· have hstartLow : expStart.val < -1022 := by omega
obtain ⟨diff, hdiff, hdiffSpec⟩ := Aeneas.Std.WP.spec_imp_exists
(IScalar.sub_spec (x := ((-1022)#i32 : Std.I32)) (y := expStart) (by
rw [IScalar.min_I32_eq]
norm_num
omega) (by
rw [IScalar.max_I32_eq]
norm_num
omega))
have hdiffVal : diff.val = -1022 - expStart.val := by
simpa using hdiffSpec
have hgapLo : 1 <= diff.val := by omega
have hgapHi : diff.val <= 58 := by omega
obtain ⟨shift, hshiftCast, hshiftSpec⟩ := Aeneas.Std.WP.spec_imp_exists
(IScalar.hcast_inBounds_spec .Usize diff (by
rw [hdiffVal]
constructor <;> scalar_tac))
have hshiftVal : (shift.val : Int) = diff.val := by
simpa using hshiftSpec
have hshift58 : shift.val <= 58 := by omega
obtain ⟨read, acc, d2, hpref, hreadLo, hreadHi, haccLo, haccHi,
hprosLo, hprosHi, hright, hd2point, hd2nonzero⟩ :=
DecimalRightShiftLoop0Execution d1 shift (by omega) (by omega) (by omega)
⟨hcap, hdigit, z, zs, by simpa [Digits] using hshape, hzLo, hzHi,
hlenCons⟩
let shiftI : Std.I32 := UScalar.hcast .I32 shift
have hshiftIVal : shiftI.val = (shift.val : Int) := by
have hs := UScalar.hcast_inBounds_spec .I32 shift (by
rw [IScalar.max_I32_eq]
omega)
simpa [shiftI, lift, WP.spec_ok] using hs
obtain ⟨exp2, hadd, haddSpec⟩ := Aeneas.Std.WP.spec_imp_exists
(IScalar.add_spec (x := expStart) (y := shiftI) (by
rw [hshiftIVal, IScalar.min_I32_eq]
omega) (by
rw [hshiftIVal, IScalar.max_I32_eq]
omega))
have hexp2Val : exp2.val = -1022 := by
rw [haddSpec, hshiftIVal, hshiftVal, hdiffVal]
omega
have hmaxShift :
num.imp.dec2flt.slow.parse_long_mantissa.MAX_SHIFT = 60#usize := by
rw [num.imp.dec2flt.slow.parse_long_mantissa.MAX_SHIFT.eq_def]
have hnotCap : ¬ shift >
num.imp.dec2flt.slow.parse_long_mantissa.MAX_SHIFT := by
rw [hmaxShift]
change ¬ shift.val > 60
omega
have hbodyCont :
num.imp.dec2flt.slow.parse_long_mantissa_loop2.body
F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 d1 expStart =
ok (cont (d2, exp2)) := by
unfold num.imp.dec2flt.slow.parse_long_mantissa_loop2.body
rw [hmin]
have hgt : ((-1022)#i32 : Std.I32) > expStart := by
change (-1022 : Int) > expStart.val
omega
simp only [bind_tc_ok, hgt, if_true, hdiff]
rw [hshiftCast]
simp only [bind_tc_ok, hnotCap, if_false, hright, lift]
rw [show UScalar.hcast .I32 shift = shiftI by rfl]
simp only [bind_tc_ok, hadd]
have hnotGt2 : ¬ ((-1022)#i32 : Std.I32) > exp2 := by
change ¬ (-1022 : Int) > exp2.val
omega
have hbodyDone :
num.imp.dec2flt.slow.parse_long_mantissa_loop2.body
F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 d2 exp2 =
ok (done (d2, exp2)) := by
unfold num.imp.dec2flt.slow.parse_long_mantissa_loop2.body
rw [hmin]
simp only [bind_tc_ok]
by_cases hgt : ((-1022)#i32 : Std.I32) > exp2
· change exp2.val < -1022 at hgt
omega
· simp only [hgt, if_false]
have hloop :
num.imp.dec2flt.slow.parse_long_mantissa_loop2
F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 d1 expStart =
ok (d2, exp2) := by
unfold num.imp.dec2flt.slow.parse_long_mantissa_loop2
rw [Aeneas.Std.loop.eq_1]
simp only [hbodyCont, bind_tc_ok]
rw [Aeneas.Std.loop.eq_1]
simpa only [hbodyDone]
have hcanonical := DecimalSeqRightShiftCanonical d1 d2 shift
(A / (2 : Real) ^ exp1.val) (B / (2 : Real) ^ exp1.val)
⟨hcap, hdigit, z, zs, by simpa [Digits] using hshape, hzLo, hzHi,
by simpa [Digits] using hlen⟩
⟨eta1, u1, hA, hB, heta0, hetau, hsticky⟩
(by omega) hright hd2nonzero
dsimp only at hcanonical
rcases hcanonical with ⟨hcap2, hdigit2, hshapePack, hendPack, hpoint2⟩
rcases hshapePack with ⟨z2, zs2, hshape2, hz2Lo, hz2Hi, hlen2, hlast2⟩
rcases hendPack with ⟨eta2, u2, hA2, hB2, heta2, heta2u2, hsticky2⟩
have hscaleA :
(A / (2 : Real) ^ exp1.val) / (2 : Real) ^ shift.val =
A / (2 : Real) ^ (exp2.val + 1) := by
have heq : exp2.val + 1 = exp1.val + (shift.val : Int) := by omega
rw [heq, zpow_add₀ (by norm_num : (2 : Real) ≠ 0)]
norm_num only [zpow_natCast]
rw [div_div]
have hscaleB :
(B / (2 : Real) ^ exp1.val) / (2 : Real) ^ shift.val =
B / (2 : Real) ^ (exp2.val + 1) := by
have heq : exp2.val + 1 = exp1.val + (shift.val : Int) := by omega
rw [heq, zpow_add₀ (by norm_num : (2 : Real) ≠ 0)]
norm_num only [zpow_natCast]
rw [div_div]
refine ⟨expStart, d2, exp2, shift.val, hsub, hloop, hshift58,
hstartVal, ?_, ?_, hpoint2, by simpa [bne_iff_ne] using hd2nonzero, ?_⟩
· rw [hexp2Val, max_eq_right (by omega)]
· rw [hexp2Val]
omega
· dsimp only
refine ⟨hcap2, hdigit2, ⟨z2, zs2, hshape2, hz2Lo, hz2Hi, hlen2⟩,
eta2, u2, ?_, ?_, heta2, heta2u2, hsticky2⟩
· rw [← hscaleA]
exact hA2
· rw [← hscaleB]
exact hB2
end dec2flt_model
Proof structure
Follow the declared dependencies to read the supporting statements and proofs.
Uses
Inspect related source (201)
- parse_long_mantissa · dec2flt/slow.rs:27 Program Rust
- MAX_SHIFT · dec2flt/slow.rs:28 Program Rust
- parse_long_mantissa_loop0 · dec2flt/slow.rs:51 Program Rust
More program dependencies (159)
- 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
- Dec2flt_modelNumImpTraitsFloatU64 · traits.rs:309 Program Rust
- BITS · traits.rs:319 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
- SIG_TOTAL_BITS · traits.rs:320 Program Rust
- SMALLEST_POWER_OF_TEN · traits.rs:328 Program Rust
- BiasedFp · dec2flt/common.rs:52 Program Rust
- zero_pow2 · dec2flt/common.rs:62 Program Rust
- DecimalSeq · dec2flt/decimal_seq.rs:21 Program Rust
- DECIMAL_POINT_RANGE · dec2flt/decimal_seq.rs:67 Program Rust
- left_shift · dec2flt/decimal_seq.rs:129 Program Rust
- left_shift_loop0 · dec2flt/decimal_seq.rs:138 Program Rust
- body · dec2flt/decimal_seq.rs:138 Program Rust
- left_shift_loop1 · dec2flt/decimal_seq.rs:152 Program Rust
- body · dec2flt/decimal_seq.rs:152 Program Rust
- right_shift · dec2flt/decimal_seq.rs:175 Program Rust
- right_shift_loop0 · dec2flt/decimal_seq.rs:180 Program Rust
- body · dec2flt/decimal_seq.rs:180 Program Rust
- right_shift_loop0_loop0 · dec2flt/decimal_seq.rs:190 Program Rust
- body · dec2flt/decimal_seq.rs:190 Program Rust
- right_shift_loop1 · dec2flt/decimal_seq.rs:209 Program Rust
- body · dec2flt/decimal_seq.rs:209 Program Rust
- right_shift_loop2 · dec2flt/decimal_seq.rs:216 Program Rust
- body · dec2flt/decimal_seq.rs:216 Program Rust
- round · dec2flt/decimal_seq.rs:96 Program Rust
- round_loop · dec2flt/decimal_seq.rs:106 Program Rust
- body · dec2flt/decimal_seq.rs:106 Program Rust
- parse_decimal_seq · dec2flt/decimal_seq.rs:283 Program Rust
- parse_decimal_seq_loop0 · dec2flt/decimal_seq.rs:290 Program Rust
- body · dec2flt/decimal_seq.rs:290 Program Rust
- parse_decimal_seq_loop1 · dec2flt/decimal_seq.rs:361 Program Rust
- body · dec2flt/decimal_seq.rs:361 Program Rust
- parse_decimal_seq_loop2 · dec2flt/decimal_seq.rs:303 Program Rust
- body · dec2flt/decimal_seq.rs:303 Program Rust
- parse_decimal_seq_loop3 · dec2flt/decimal_seq.rs:307 Program Rust
- body · dec2flt/decimal_seq.rs:307 Program Rust
- parse_decimal_seq_loop4 · dec2flt/decimal_seq.rs:361 Program Rust
- body · dec2flt/decimal_seq.rs:361 Program Rust
- parse_decimal_seq_loop5 · dec2flt/decimal_seq.rs:307 Program Rust
- body · dec2flt/decimal_seq.rs:307 Program Rust
- parse_decimal_seq_loop6 · dec2flt/decimal_seq.rs:361 Program Rust
- body · dec2flt/decimal_seq.rs:361 Program Rust
- parse_decimal_seq_loop7 · dec2flt/decimal_seq.rs:361 Program Rust
- body · dec2flt/decimal_seq.rs:361 Program Rust
- call · dec2flt/slow.rs:33 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
- from_u64 · dec2flt/mod.rs:263 Program Rust
- EXP_MASK · traits.rs:321 Program Rust
- INFINITY · traits.rs:312 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
- classify · traits.rs:334 Program Rust
- to_bits · traits.rs:330 Program Rust
- read_u64 · dec2flt/common.rs:18 Program Rust
- write_u64 · dec2flt/common.rs:25 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
- ByteSlice · dec2flt/common.rs:4 Program Rust
- is_8digits · dec2flt/common.rs:40 Program Rust
- Decimal · dec2flt/decimal.rs:32 Program Rust
- default · dec2flt/decimal_seq.rs:33 Program Rust
- MAX_DIGITS · dec2flt/decimal_seq.rs:63 Program Rust
- MAX_DIGITS_WITHOUT_OVERFLOW · dec2flt/decimal_seq.rs:66 Program Rust
- trim · dec2flt/decimal_seq.rs:82 Program Rust
- trim_loop · dec2flt/decimal_seq.rs:91 Program Rust
- body · dec2flt/decimal_seq.rs:91 Program Rust
- count_trailing_zeros · dec2flt/decimal_seq.rs:235 Program Rust
- count_trailing_zeros_loop · dec2flt/decimal_seq.rs:239 Program Rust
- body · dec2flt/decimal_seq.rs:239 Program Rust
- number_of_digits_decimal_left_shift · dec2flt/decimal_seq.rs:368 Program Rust
- number_of_digits_decimal_left_shift_loop · dec2flt/decimal_seq.rs:434 Program Rust
- body · dec2flt/decimal_seq.rs:434 Program Rust
- parse_decimal_exponent · dec2flt/decimal_seq.rs:269 Program Rust
- parse_decimal_exponent_loop · dec2flt/decimal_seq.rs:272 Program Rust
- body · dec2flt/decimal_seq.rs:272 Program Rust
- parse_digits_into_seq · dec2flt/decimal_seq.rs:256 Program Rust
- parse_digits_into_seq_loop · dec2flt/decimal_seq.rs:258 Program Rust
- body · dec2flt/decimal_seq.rs:258 Program Rust
- NUM_POWERS · dec2flt/slow.rs:29 Program Rust
- POWERS · dec2flt/slow.rs:30 Program Rust
- closure · dec2flt/slow.rs:33 Program Rust
- CastInto · traits.rs:18 Program Rust
- FloatExt · traits.rs:170 Program Rust
- Int · traits.rs:27 Program Rust
- Dec2flt_modelNumImpTraitsCastIntoI16 · traits.rs:45 Program Rust
- ONE · traits.rs:53 Program Rust
- ZERO · traits.rs:52 Program Rust
- try_add_digit · dec2flt/decimal_seq.rs:73 Program Rust
- TABLE · dec2flt/decimal_seq.rs:370 Program Rust
- TABLE_POW5 · dec2flt/decimal_seq.rs:379 Program Rust
- cast · traits.rs:46 Program Rust
- biased_fp_to_float · dec2flt/mod.rs:282 Program Rust
- dec2flt_with_trace · dec2flt/mod.rs:355 Program Rust
- compute_float · dec2flt/lemire.rs:26 Program Rust
- MIN_19DIGIT_INT · dec2flt/parse.rs:8 Program Rust
- adjust_many_digit_count · dec2flt/parse.rs:86 Program Rust
- adjust_many_digit_count_loop · dec2flt/parse.rs:89 Program Rust
- body · dec2flt/parse.rs:89 Program Rust
- parse_many_digits · dec2flt/parse.rs:104 Program Rust
- parse_number · dec2flt/parse.rs:231 Program Rust
- parse_partial_number · dec2flt/parse.rs:161 Program Rust
- parse_scientific · dec2flt/parse.rs:121 Program Rust
- parse_scientific_loop · dec2flt/parse.rs:142 Program Rust
- body · dec2flt/parse.rs:142 Program Rust
- try_parse_19digits · dec2flt/parse.rs:61 Program Rust
- try_parse_19digits_loop · dec2flt/parse.rs:64 Program Rust
- body · dec2flt/parse.rs:64 Program Rust
- try_parse_digits · dec2flt/parse.rs:30 Program Rust
- try_parse_digits_loop0 · dec2flt/parse.rs:33 Program Rust
- body · dec2flt/parse.rs:33 Program Rust
- try_parse_digits_loop1 · dec2flt/parse.rs:50 Program Rust
- body · dec2flt/parse.rs:50 Program Rust
- Dec2flt_modelNumImpDec2fltLemireU64 · dec2flt/mod.rs:217 Program Rust
- Dec2flt_modelNumImpTraitsFloatExtU64 · traits.rs:339 Program Rust
- from_u64_bits · traits.rs:341 Program Rust
- offset_from · dec2flt/common.rs:30 Program Rust
- eq · dec2flt/common.rs:51 Program Rust
- dec2flt · dec2flt/mod.rs:508 Program Rust
- try_fast_path · dec2flt/decimal.rs:59 Program Rust
- compute_product_approx · dec2flt/lemire.rs:134 Program Rust
- power · dec2flt/lemire.rs:121 Program Rust
- parse_8digits · dec2flt/parse.rs:18 Program Rust
- MASK · dec2flt/parse.rs:19 Program Rust
- MUL1 · dec2flt/parse.rs:20 Program Rust
- MUL2 · dec2flt/parse.rs:21 Program Rust
- parse_inf_nan · dec2flt/parse.rs:241 Program Rust
- pfe_empty · dec2flt/mod.rs:270 Program Rust
- pfe_invalid · dec2flt/mod.rs:277 Program Rust
- MAX_EXPONENT_DISGUISED_FAST_PATH · dec2flt/mod.rs:220 Program Rust
- MAX_EXPONENT_FAST_PATH · dec2flt/mod.rs:219 Program Rust
- pow10_fast_path · dec2flt/mod.rs:222 Program Rust
- integer_decode · traits.rs:348 Program Rust
- default · dec2flt/mod.rs:128 Program Rust
- default · dec2flt/mod.rs:121 Program Rust
- can_use_fast_path · dec2flt/decimal.rs:42 Program Rust
- INT_POW10 · dec2flt/decimal.rs:8 Program Rust
- set_precision · dec2flt/fpu.rs:99 Program Rust
- full_multiplication · dec2flt/lemire.rs:126 Program Rust
- LARGEST_POWER_OF_FIVE · dec2flt/table.rs:10 Program Rust
- POWER_OF_FIVE_128 · dec2flt/table.rs:19 Program Rust
- SMALLEST_POWER_OF_FIVE · dec2flt/table.rs:9 Program Rust
Standard-library dependencies (39)
- MANTISSA_DIGITS · core/src/num/f64.rs:412 Rust library
- 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_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.configured_x86_64_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
- DecimalLeftShiftLoopLex
All 121 entries
- Binary64Model
- Binary64ModelDefault
- DecimalDigitLexScale
- DecimalLeftShiftDigitGrowth
- DecimalLeftShiftFirstLoopSemantics
- DecimalLeftShiftLoopLex
- DecimalLeftShiftSecondLoopSemantics
- DecimalLeftShiftTableCertificate
- DecimalRightShiftFinalLoopSemantics
- DecimalRightShiftLoop0Execution
- DecimalRightShiftMainLoopSemantics
- DecimalRightShiftPrefixLoopSemantics
- DecimalRightShiftU64DyadicBridge
- DecimalSeqDyadicShiftSemantics
- DecimalSeqLeftShiftRecordSemantics
- DecimalSeqRightShiftCanonical
- DecimalSeqRightShiftRecordSemantics
- 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
- ParserExponentConstants
- ParserSlowLoop2
- 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 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 exponent
- num imp dec2flt decimal seq parse decimal seq
- num imp dec2flt decimal seq parse digits into seq
- 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": "ParserSlowLoop2",
"closure_version": "patch_c_v1",
"active_decl_hash": "55f09187d5c002cdb01291831f813b99a4458ec62ca8086938a09f009022c17b",
"active_statement_hash": "f3d880b4b019e998f0405c57f89b4fe246df7cb8b941378260bc09058bdbd23a",
"kernel_axioms": [
"Classical.choice",
"Quot.sound",
"propext"
],
"toolchain_hash": "ce4c4e3d87434b9663f46de25ce34b48a0cf0d392e0a320a0787b4674a2d7b61",
"lean_executable_hash": "3e0d0d3d801675359f2d4cf9815bfdb417b20b92fdd9d48b3b14c95bbae28bbf",
"checker_script_hash": "c8e4a03273e23b9a8f2e141020652a4e0b7b0a8ab0883366ea9d031ca3f37aa1",
"approved_axioms_hash": "ab64d13f256386ee0e494a5abcc6a5db49512cf3d90bbdfcabd6327793a31f95",
"axcheck_status": "Agreed",
"accepted_at_snapshot_id": "revalidate-cycle-192",
"boundary_theorems": {},
"strict_theorem_deps": {
"DecimalRightShiftLoop0Execution": "e27252660de78d95",
"DecimalSeqRightShiftCanonical": "fc2c059f527d234a",
"ParserExponentConstants": "e2a30a7b0c5e9c91",
"SlowShiftSelectorCertificate": "78f0b22ceeb544a4",
"num_imp_dec2flt_slow_parse_long_mantissa_MAX_SHIFT": "a858290d96a26cbd"
},
"strict_definition_deps": {
"F64": "ec4e25fbaf4e11d4",
"F64_Insts_Dec2flt_modelNumImpTraitsFloatU64": "94095c9bf79da164",
"num_imp_dec2flt_decimal_seq_DecimalSeq": "13e3cec939d02f51",
"num_imp_dec2flt_decimal_seq_DecimalSeq_right_shift": "1aaf1bb11c0b6a49",
"num_imp_dec2flt_slow_parse_long_mantissa": "6301f3828274183b",
"num_imp_dec2flt_slow_parse_long_mantissa_MAX_SHIFT": "32f403f33bee78a7",
"num_imp_traits_Float": "996e90a556298539"
}
}Prose assessment
{
"label": "Sound flag superseded by recorded Lean closure",
"assessment_status": "VerifierFail",
"fingerprint_relation": "differs from current fingerprint",
"assessment_fingerprint": "sound-v2:5ade3d5fe52e4595917b01abf93699e2bc1e22e403912af7c8a7ef3721137bf3",
"current_fingerprint": "sound-v2:b5a486f4a7c5ad912bd66ef4d27eae481f1ff76a15722e075c3924fcd87bc5cd",
"superseded_for_theorem_closure": true
}Review verdicts
{
"corr_status": "Pass",
"sound_status": "Fail",
"substantiveness_status": "Pass"
}