Statement
This explanation was written alongside the formalization to describe the statement and its reasoning.
Helper · Reachable loop-2 state and final 53-bit shift
Lean statement
Trellis authored these statements and proofs. Lean checks the formal proofs; the assumptions used by each proof are listed below.
import Tablet.ParserSlowLoop2
import Tablet.P856_T1_RightPrefixReadBound
import Tablet.DecimalRightShiftLoop0Execution
import Tablet.DecimalLeftShiftLoop1Execution
import Tablet.DecimalSeqLeftShiftCanonical
import Tablet.DecimalLeftShiftDigitGrowth
import Tablet.P804_T1_LeftShiftPointGrowth
import Tablet.ParserExponentConstants
open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
namespace dec2flt_model
-- [TABLET NODE: P856_T1_FinalLeftShiftExecution]
theorem P856_T1_FinalLeftShiftExecution
(A B : Real)
(d1 d2 : num.imp.dec2flt.decimal_seq.DecimalSeq)
(exp1 expStart exp2 : Std.I32)
(hexpLower : -1079 <= exp1.val)
(hpoint1 : d1.decimal_point.val = 0)
(hnum1 : d1.num_digits.val != 0)
(hlead1 : 5 <= d1.digits.val[0].val)
(hinput :
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 z zs, digits1 = z :: zs /\ 1 <= z /\ z < 10 /\
digits1.length = d1.num_digits.val) /\
(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)))
(hsub : exp1 - 1#i32 = ok expStart)
(hloop :
num.imp.dec2flt.slow.parse_long_mantissa_loop2
F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 d1 expStart =
ok (d2, exp2)) :
exists d3 : num.imp.dec2flt.decimal_seq.DecimalSeq,
-17 <= d2.decimal_point.val /\ d2.decimal_point.val <= 0 /\
((d2 = d1 /\ exp2.val + 1 = exp1.val) \/
(exists shift : Std.Usize,
shift.val <= 58 /\
num.imp.dec2flt.decimal_seq.DecimalSeq.right_shift d1 shift = ok d2 /\
exp2.val + 1 = exp1.val + (shift.val : Int))) /\
num.imp.dec2flt.decimal_seq.DecimalSeq.left_shift d2 53#usize = ok d3 /\
(let digits3 :=
(d3.digits.val.take d3.num_digits.val).map (fun z => z.val)
let integer3 : Nat := digits3.foldl (fun n digit => 10 * n + digit) 0
let value3 : Real := integer3 * (10 : Real) ^
(d3.decimal_point.val - (d3.num_digits.val : Int))
d3.num_digits.val <= 768 /\
(forall z, z ∈ d3.digits.val.take d3.num_digits.val -> z.val < 10) /\
(exists z zs, digits3 = z :: zs /\ 1 <= z /\ z < 10 /\
digits3.length = d3.num_digits.val /\ digits3.getLast? != some 0) /\
(exists eta3 u3 : Real,
A / (2 : Real) ^ (exp2.val - 52) = value3 + eta3 /\
B / (2 : Real) ^ (exp2.val - 52) = value3 + u3 /\
0 <= eta3 /\ eta3 < u3 /\
(d3.truncated = true <-> 0 < eta3)) /\
d3.decimal_point.val < 19) := 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
dsimp only at hinput
rcases hinput with ⟨hcap1, hdigit1, hpositive1, hend1⟩
have hspec := ParserSlowLoop2 A B d1 exp1 hexpLower hpoint1 hnum1 hlead1
⟨hcap1, hdigit1, hend1⟩
dsimp only at hspec
rcases hspec with ⟨es, q2, e2, total, hsubS, hloopS, htotal,
hes, he2, htotalEq, hpoint2Lo, hnum2, hshape2⟩
have hesEq : es = expStart := Result.ok.inj (hsubS.symm.trans hsub)
subst es
have houtEq := Result.ok.inj (hloopS.symm.trans hloop)
have hq2 : q2 = d2 := congrArg Prod.fst houtEq
have he2Eq : e2 = exp2 := congrArg Prod.snd houtEq
subst q2
subst e2
rcases hshape2 with ⟨hcap2, hdigit2, hpositive2, hend2⟩
have hstartVal : expStart.val = exp1.val - 1 := by
have hs := IScalar.sub_equiv exp1 1#i32
rw [hsub] at hs
simpa using hs.2.1
have hpoint2 : (-17 <= d2.decimal_point.val /\
d2.decimal_point.val <= 0) /\
((d2 = d1 /\ exp2.val + 1 = exp1.val) \/
(exists shift : Std.Usize,
shift.val <= 58 /\
num.imp.dec2flt.decimal_seq.DecimalSeq.right_shift d1 shift = ok d2 /\
exp2.val + 1 = exp1.val + (shift.val : Int))) := by
rcases ParserExponentConstants with
⟨hbits, htotalBits, hsig, hexpbits, hexpsat, hinf, hbias, hmin,
hsmall, hlarge, hroundmin, hroundmax⟩
by_cases hstartHigh : -1022 <= expStart.val
· 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]
have hnot : ¬ ((-1022)#i32 : Std.I32) > expStart := by
change ¬ (-1022 : Int) > expStart.val
omega
simp [hnot]
have hconstructed :
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]
have heq := Result.ok.inj (hconstructed.symm.trans hloop)
have hd : d1 = d2 := congrArg Prod.fst heq
have he : expStart = exp2 := congrArg Prod.snd heq
constructor
· rw [← hd, hpoint1]
omega
· left
exact ⟨hd.symm, by rw [← he]; omega⟩
· 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 ⟨z1, zs1, hshape1, hz1Lo, hz1Hi, hlen1⟩ :
exists z zs,
(d1.digits.val.take d1.num_digits.val).map (fun q => q.val) =
z :: zs /\ 1 <= z /\ z < 10 /\
((d1.digits.val.take d1.num_digits.val).map
(fun q => q.val)).length = d1.num_digits.val := hpositive1
have hlen1' : (z1 :: zs1).length = d1.num_digits.val := by
rw [← hshape1]
exact hlen1
have hpositive1Exec :
exists z zs,
(d1.digits.val.take d1.num_digits.val).map (fun a => a.val) =
z :: zs /\ 1 <= z /\ z < 10 /\
(z :: zs).length = d1.num_digits.val :=
⟨z1, zs1, hshape1, hz1Lo, hz1Hi, hlen1'⟩
have hleadEq : d1.digits.val[0].val = z1 := by
have hnumPos : 0 < d1.num_digits.val := by
rw [← hlen1, hshape1]
simp
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? hshape1
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 [List.getElem?_map, htake] at hhead
simpa using Option.some.inj hhead
have hz1Five : 5 <= z1 := by omega
obtain ⟨read, acc, q2, hpref, hreadLo, hreadHi, haccLo, haccHi,
hprosLo, hprosHi, hright, hq2point, hq2nonzero⟩ :=
DecimalRightShiftLoop0Execution d1 shift (by omega) (by omega)
(by omega) ⟨hcap1, hdigit1, hpositive1Exec⟩
have hread18 := P856_T1_RightPrefixReadBound d1 shift read acc
hshift58 hcap1 hdigit1 z1 zs1 hshape1 hz1Five
hlen1' hpref
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 ⟨eout, 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 heout : eout.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 (q2, eout)) := 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 hbodyDone :
num.imp.dec2flt.slow.parse_long_mantissa_loop2.body
F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 q2 eout =
ok (done (q2, eout)) := by
unfold num.imp.dec2flt.slow.parse_long_mantissa_loop2.body
rw [hmin]
simp only [bind_tc_ok]
have hnot : ¬ ((-1022)#i32 : Std.I32) > eout := by
change ¬ (-1022 : Int) > eout.val
omega
simp [hnot]
have hconstructed :
num.imp.dec2flt.slow.parse_long_mantissa_loop2
F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 d1 expStart =
ok (q2, eout) := 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 heq := Result.ok.inj (hconstructed.symm.trans hloop)
have hd : q2 = d2 := congrArg Prod.fst heq
have he : eout = exp2 := congrArg Prod.snd heq
have hp : d2.decimal_point.val =
d1.decimal_point.val - (read.val : Int) + 1 := by
rw [← hd, hq2point]
rw [hpoint1] at hp
constructor
· omega
· right
refine ⟨shift, hshift58, ?_, ?_⟩
· rw [← hd]
exact hright
· omega
obtain ⟨z2, zs2, hshape2', hz2Lo, hz2Hi, hlen2⟩ := hpositive2
have hpositive2Exec :
exists z zs,
(d2.digits.val.take d2.num_digits.val).map (fun a => a.val) = z :: zs /\
1 <= z /\ z < 10 /\ (z :: zs).length = d2.num_digits.val := by
exact ⟨z2, zs2, hshape2', hz2Lo, hz2Hi, by rw [← hshape2']; exact hlen2⟩
obtain ⟨d3, q, hleft, hq19, hpoint3Eq, hpoint3Lo, hpoint3Hi, hnum3⟩ :=
DecimalLeftShiftLoop1Execution d2 53#usize (by norm_num) (by omega)
hpoint2.1.2 ⟨hcap2, hdigit2, hpositive2Exec⟩
obtain ⟨growth, hgrowth, hgrowthVal⟩ :=
DecimalLeftShiftDigitGrowth d2 53#usize 16 (by norm_num) (by norm_num)
(by norm_num) hcap2 hdigit2
have hgrowth16 : growth.val <= 16 := by
rw [hgrowthVal]
split <;> omega
have hpoint3 : d3.decimal_point.val =
d2.decimal_point.val + (growth.val : Int) :=
P804_T1_LeftShiftPointGrowth d2 d3 53#usize growth hnum2 hgrowth
(by omega) hleft
have hcanonical := DecimalSeqLeftShiftCanonical d2 d3 53#usize
(A / (2 : Real) ^ (exp2.val + 1))
(B / (2 : Real) ^ (exp2.val + 1))
⟨hcap2, hdigit2,
Or.inr ⟨z2, zs2, hshape2', hz2Lo, hz2Hi, hlen2⟩⟩
hend2 (by norm_num) hleft
dsimp only at hcanonical
rcases hcanonical with ⟨hcap3, hdigit3, hshape3, hend3, q3, hq3,
hpoint3Canon⟩
rcases hshape3 with hzero3 | hpositive3
· exfalso
have hn : d3.num_digits.val ≠ 0 := by
simpa [bne_iff_ne] using hnum3
exact hn hzero3.1
· rcases hend3 with ⟨eta3, u3, hA3, hB3, heta3, heta3u3, hsticky3⟩
have hscaleA :
(2 : Real) ^ (53 : Nat) *
(A / (2 : Real) ^ (exp2.val + 1)) =
A / (2 : Real) ^ (exp2.val - 52) := by
rw [show exp2.val + 1 = (exp2.val - 52) + 53 by omega]
rw [zpow_add₀ (by norm_num : (2 : Real) ≠ 0)]
norm_num only [zpow_natCast]
field_simp
have hscaleB :
(2 : Real) ^ (53 : Nat) *
(B / (2 : Real) ^ (exp2.val + 1)) =
B / (2 : Real) ^ (exp2.val - 52) := by
rw [show exp2.val + 1 = (exp2.val - 52) + 53 by omega]
rw [zpow_add₀ (by norm_num : (2 : Real) ≠ 0)]
norm_num only [zpow_natCast]
field_simp
refine ⟨d3, hpoint2.1.1, hpoint2.1.2, hpoint2.2, hleft, ?_⟩
dsimp only
refine ⟨hcap3, hdigit3, hpositive3,
⟨eta3, u3, ?_, ?_, heta3, heta3u3, hsticky3⟩, ?_⟩
· rw [← hscaleA]
exact hA3
· rw [← hscaleB]
exact hB3
· rw [hpoint3]
omega
end dec2flt_model
Download Lean source · Download TeX source
Complete Lean module
import Tablet.ParserSlowLoop2
import Tablet.P856_T1_RightPrefixReadBound
import Tablet.DecimalRightShiftLoop0Execution
import Tablet.DecimalLeftShiftLoop1Execution
import Tablet.DecimalSeqLeftShiftCanonical
import Tablet.DecimalLeftShiftDigitGrowth
import Tablet.P804_T1_LeftShiftPointGrowth
import Tablet.ParserExponentConstants
open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
namespace dec2flt_model
-- [TABLET NODE: P856_T1_FinalLeftShiftExecution]
theorem P856_T1_FinalLeftShiftExecution
(A B : Real)
(d1 d2 : num.imp.dec2flt.decimal_seq.DecimalSeq)
(exp1 expStart exp2 : Std.I32)
(hexpLower : -1079 <= exp1.val)
(hpoint1 : d1.decimal_point.val = 0)
(hnum1 : d1.num_digits.val != 0)
(hlead1 : 5 <= d1.digits.val[0].val)
(hinput :
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 z zs, digits1 = z :: zs /\ 1 <= z /\ z < 10 /\
digits1.length = d1.num_digits.val) /\
(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)))
(hsub : exp1 - 1#i32 = ok expStart)
(hloop :
num.imp.dec2flt.slow.parse_long_mantissa_loop2
F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 d1 expStart =
ok (d2, exp2)) :
exists d3 : num.imp.dec2flt.decimal_seq.DecimalSeq,
-17 <= d2.decimal_point.val /\ d2.decimal_point.val <= 0 /\
((d2 = d1 /\ exp2.val + 1 = exp1.val) \/
(exists shift : Std.Usize,
shift.val <= 58 /\
num.imp.dec2flt.decimal_seq.DecimalSeq.right_shift d1 shift = ok d2 /\
exp2.val + 1 = exp1.val + (shift.val : Int))) /\
num.imp.dec2flt.decimal_seq.DecimalSeq.left_shift d2 53#usize = ok d3 /\
(let digits3 :=
(d3.digits.val.take d3.num_digits.val).map (fun z => z.val)
let integer3 : Nat := digits3.foldl (fun n digit => 10 * n + digit) 0
let value3 : Real := integer3 * (10 : Real) ^
(d3.decimal_point.val - (d3.num_digits.val : Int))
d3.num_digits.val <= 768 /\
(forall z, z ∈ d3.digits.val.take d3.num_digits.val -> z.val < 10) /\
(exists z zs, digits3 = z :: zs /\ 1 <= z /\ z < 10 /\
digits3.length = d3.num_digits.val /\ digits3.getLast? != some 0) /\
(exists eta3 u3 : Real,
A / (2 : Real) ^ (exp2.val - 52) = value3 + eta3 /\
B / (2 : Real) ^ (exp2.val - 52) = value3 + u3 /\
0 <= eta3 /\ eta3 < u3 /\
(d3.truncated = true <-> 0 < eta3)) /\
d3.decimal_point.val < 19) := by
-- BODY
dsimp only at hinput
rcases hinput with ⟨hcap1, hdigit1, hpositive1, hend1⟩
have hspec := ParserSlowLoop2 A B d1 exp1 hexpLower hpoint1 hnum1 hlead1
⟨hcap1, hdigit1, hend1⟩
dsimp only at hspec
rcases hspec with ⟨es, q2, e2, total, hsubS, hloopS, htotal,
hes, he2, htotalEq, hpoint2Lo, hnum2, hshape2⟩
have hesEq : es = expStart := Result.ok.inj (hsubS.symm.trans hsub)
subst es
have houtEq := Result.ok.inj (hloopS.symm.trans hloop)
have hq2 : q2 = d2 := congrArg Prod.fst houtEq
have he2Eq : e2 = exp2 := congrArg Prod.snd houtEq
subst q2
subst e2
rcases hshape2 with ⟨hcap2, hdigit2, hpositive2, hend2⟩
have hstartVal : expStart.val = exp1.val - 1 := by
have hs := IScalar.sub_equiv exp1 1#i32
rw [hsub] at hs
simpa using hs.2.1
have hpoint2 : (-17 <= d2.decimal_point.val /\
d2.decimal_point.val <= 0) /\
((d2 = d1 /\ exp2.val + 1 = exp1.val) \/
(exists shift : Std.Usize,
shift.val <= 58 /\
num.imp.dec2flt.decimal_seq.DecimalSeq.right_shift d1 shift = ok d2 /\
exp2.val + 1 = exp1.val + (shift.val : Int))) := by
rcases ParserExponentConstants with
⟨hbits, htotalBits, hsig, hexpbits, hexpsat, hinf, hbias, hmin,
hsmall, hlarge, hroundmin, hroundmax⟩
by_cases hstartHigh : -1022 <= expStart.val
· 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]
have hnot : ¬ ((-1022)#i32 : Std.I32) > expStart := by
change ¬ (-1022 : Int) > expStart.val
omega
simp [hnot]
have hconstructed :
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]
have heq := Result.ok.inj (hconstructed.symm.trans hloop)
have hd : d1 = d2 := congrArg Prod.fst heq
have he : expStart = exp2 := congrArg Prod.snd heq
constructor
· rw [← hd, hpoint1]
omega
· left
exact ⟨hd.symm, by rw [← he]; omega⟩
· 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 ⟨z1, zs1, hshape1, hz1Lo, hz1Hi, hlen1⟩ :
exists z zs,
(d1.digits.val.take d1.num_digits.val).map (fun q => q.val) =
z :: zs /\ 1 <= z /\ z < 10 /\
((d1.digits.val.take d1.num_digits.val).map
(fun q => q.val)).length = d1.num_digits.val := hpositive1
have hlen1' : (z1 :: zs1).length = d1.num_digits.val := by
rw [← hshape1]
exact hlen1
have hpositive1Exec :
exists z zs,
(d1.digits.val.take d1.num_digits.val).map (fun a => a.val) =
z :: zs /\ 1 <= z /\ z < 10 /\
(z :: zs).length = d1.num_digits.val :=
⟨z1, zs1, hshape1, hz1Lo, hz1Hi, hlen1'⟩
have hleadEq : d1.digits.val[0].val = z1 := by
have hnumPos : 0 < d1.num_digits.val := by
rw [← hlen1, hshape1]
simp
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? hshape1
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 [List.getElem?_map, htake] at hhead
simpa using Option.some.inj hhead
have hz1Five : 5 <= z1 := by omega
obtain ⟨read, acc, q2, hpref, hreadLo, hreadHi, haccLo, haccHi,
hprosLo, hprosHi, hright, hq2point, hq2nonzero⟩ :=
DecimalRightShiftLoop0Execution d1 shift (by omega) (by omega)
(by omega) ⟨hcap1, hdigit1, hpositive1Exec⟩
have hread18 := P856_T1_RightPrefixReadBound d1 shift read acc
hshift58 hcap1 hdigit1 z1 zs1 hshape1 hz1Five
hlen1' hpref
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 ⟨eout, 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 heout : eout.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 (q2, eout)) := 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 hbodyDone :
num.imp.dec2flt.slow.parse_long_mantissa_loop2.body
F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 q2 eout =
ok (done (q2, eout)) := by
unfold num.imp.dec2flt.slow.parse_long_mantissa_loop2.body
rw [hmin]
simp only [bind_tc_ok]
have hnot : ¬ ((-1022)#i32 : Std.I32) > eout := by
change ¬ (-1022 : Int) > eout.val
omega
simp [hnot]
have hconstructed :
num.imp.dec2flt.slow.parse_long_mantissa_loop2
F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 d1 expStart =
ok (q2, eout) := 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 heq := Result.ok.inj (hconstructed.symm.trans hloop)
have hd : q2 = d2 := congrArg Prod.fst heq
have he : eout = exp2 := congrArg Prod.snd heq
have hp : d2.decimal_point.val =
d1.decimal_point.val - (read.val : Int) + 1 := by
rw [← hd, hq2point]
rw [hpoint1] at hp
constructor
· omega
· right
refine ⟨shift, hshift58, ?_, ?_⟩
· rw [← hd]
exact hright
· omega
obtain ⟨z2, zs2, hshape2', hz2Lo, hz2Hi, hlen2⟩ := hpositive2
have hpositive2Exec :
exists z zs,
(d2.digits.val.take d2.num_digits.val).map (fun a => a.val) = z :: zs /\
1 <= z /\ z < 10 /\ (z :: zs).length = d2.num_digits.val := by
exact ⟨z2, zs2, hshape2', hz2Lo, hz2Hi, by rw [← hshape2']; exact hlen2⟩
obtain ⟨d3, q, hleft, hq19, hpoint3Eq, hpoint3Lo, hpoint3Hi, hnum3⟩ :=
DecimalLeftShiftLoop1Execution d2 53#usize (by norm_num) (by omega)
hpoint2.1.2 ⟨hcap2, hdigit2, hpositive2Exec⟩
obtain ⟨growth, hgrowth, hgrowthVal⟩ :=
DecimalLeftShiftDigitGrowth d2 53#usize 16 (by norm_num) (by norm_num)
(by norm_num) hcap2 hdigit2
have hgrowth16 : growth.val <= 16 := by
rw [hgrowthVal]
split <;> omega
have hpoint3 : d3.decimal_point.val =
d2.decimal_point.val + (growth.val : Int) :=
P804_T1_LeftShiftPointGrowth d2 d3 53#usize growth hnum2 hgrowth
(by omega) hleft
have hcanonical := DecimalSeqLeftShiftCanonical d2 d3 53#usize
(A / (2 : Real) ^ (exp2.val + 1))
(B / (2 : Real) ^ (exp2.val + 1))
⟨hcap2, hdigit2,
Or.inr ⟨z2, zs2, hshape2', hz2Lo, hz2Hi, hlen2⟩⟩
hend2 (by norm_num) hleft
dsimp only at hcanonical
rcases hcanonical with ⟨hcap3, hdigit3, hshape3, hend3, q3, hq3,
hpoint3Canon⟩
rcases hshape3 with hzero3 | hpositive3
· exfalso
have hn : d3.num_digits.val ≠ 0 := by
simpa [bne_iff_ne] using hnum3
exact hn hzero3.1
· rcases hend3 with ⟨eta3, u3, hA3, hB3, heta3, heta3u3, hsticky3⟩
have hscaleA :
(2 : Real) ^ (53 : Nat) *
(A / (2 : Real) ^ (exp2.val + 1)) =
A / (2 : Real) ^ (exp2.val - 52) := by
rw [show exp2.val + 1 = (exp2.val - 52) + 53 by omega]
rw [zpow_add₀ (by norm_num : (2 : Real) ≠ 0)]
norm_num only [zpow_natCast]
field_simp
have hscaleB :
(2 : Real) ^ (53 : Nat) *
(B / (2 : Real) ^ (exp2.val + 1)) =
B / (2 : Real) ^ (exp2.val - 52) := by
rw [show exp2.val + 1 = (exp2.val - 52) + 53 by omega]
rw [zpow_add₀ (by norm_num : (2 : Real) ≠ 0)]
norm_num only [zpow_natCast]
field_simp
refine ⟨d3, hpoint2.1.1, hpoint2.1.2, hpoint2.2, hleft, ?_⟩
dsimp only
refine ⟨hcap3, hdigit3, hpositive3,
⟨eta3, u3, ?_, ?_, heta3, heta3u3, hsticky3⟩, ?_⟩
· rw [← hscaleA]
exact hA3
· rw [← hscaleB]
exact hB3
· rw [hpoint3]
omega
end dec2flt_model
Proof structure
Follow the declared dependencies to read the supporting statements and proofs.
Uses
Used by
Inspect related source (201)
- Dec2flt_modelNumImpTraitsFloatU64 · traits.rs:309 Program Rust
- BITS · traits.rs:319 Program Rust
- LARGEST_POWER_OF_TEN · traits.rs:327 Program Rust
More program dependencies (159)
- 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
- 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
- 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_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
- 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
- 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
- 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
- Dec2flt_modelNumImpTraitsInt · traits.rs:51 Program Rust
- BiasedFp · dec2flt/common.rs:52 Program Rust
- zero_pow2 · dec2flt/common.rs:62 Program Rust
- default · dec2flt/decimal_seq.rs:33 Program Rust
- MAX_DIGITS · dec2flt/decimal_seq.rs:63 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
- 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
- TABLE · dec2flt/decimal_seq.rs:370 Program Rust
- TABLE_POW5 · dec2flt/decimal_seq.rs:379 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
- from_u64 · dec2flt/mod.rs:263 Program Rust
- read_u64 · dec2flt/common.rs:18 Program Rust
- write_u64 · dec2flt/common.rs:25 Program Rust
- Dec2flt_modelNumImpTraitsCastIntoI16 · traits.rs:45 Program Rust
- ONE · traits.rs:53 Program Rust
- ZERO · traits.rs:52 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
- MAX_DIGITS_WITHOUT_OVERFLOW · dec2flt/decimal_seq.rs:66 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
- 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
- cast · traits.rs:46 Program Rust
- try_add_digit · dec2flt/decimal_seq.rs:73 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
- 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
- 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
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
- DecimalLeftShiftLoop1Execution
All 127 entries
- Binary64Model
- Binary64ModelDefault
- DecimalDigitLexScale
- DecimalLeftShiftDigitGrowth
- DecimalLeftShiftFirstLoopSemantics
- DecimalLeftShiftLoop1Execution
- DecimalLeftShiftLoopLex
- DecimalLeftShiftSecondLoopSemantics
- DecimalLeftShiftTableCertificate
- DecimalRightShiftFinalLoopSemantics
- DecimalRightShiftLoop0Execution
- DecimalRightShiftMainLoopSemantics
- DecimalRightShiftPrefixLoopSemantics
- DecimalRightShiftU64DyadicBridge
- DecimalSeqDyadicShiftSemantics
- DecimalSeqLeftShiftCanonical
- 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
- DecimalFoldBounds
- LeftShiftPointGrowth
- FinalLeftShiftExecution
- RightPrefixReadBound
- 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": "P856_T1_FinalLeftShiftExecution",
"closure_version": "patch_c_v1",
"active_decl_hash": "af415feda5c17555d84f1d3086be679e552749c5710beb65fe461ac8843eced5",
"active_statement_hash": "321c0a659a6a0155d8870693b86c24cd2080fa3b096310446d50e47229f6fa4c",
"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-199",
"boundary_theorems": {},
"strict_theorem_deps": {
"DecimalLeftShiftDigitGrowth": "6dcf8858df4713eb",
"DecimalLeftShiftLoop1Execution": "c945a26c8d67077b",
"DecimalRightShiftLoop0Execution": "e27252660de78d95",
"DecimalSeqLeftShiftCanonical": "bcdb7c96b3a59e9d",
"P804_T1_LeftShiftPointGrowth": "6a9a6c7c27a2ac4e",
"P856_T1_RightPrefixReadBound": "ce3631cbe954c768",
"ParserExponentConstants": "e2a30a7b0c5e9c91",
"ParserSlowLoop2": "988df2b319919687",
"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": "92d5f91a5a106668",
"num_imp_dec2flt_decimal_seq_DecimalSeq_left_shift": "fd298e37d5ae4f86",
"num_imp_dec2flt_decimal_seq_DecimalSeq_right_shift": "4db7c37f5da1c6e0",
"num_imp_dec2flt_decimal_seq_number_of_digits_decimal_left_shift": "b3efbd0e6b3fe061",
"num_imp_dec2flt_slow_parse_long_mantissa": "f4b1825aa46c08b9",
"num_imp_dec2flt_slow_parse_long_mantissa_MAX_SHIFT": "32f403f33bee78a7",
"num_imp_traits_Float": "996e90a556298539"
}
}Prose assessment
{
"label": "Lean proof closed; predictive prose review no longer required",
"assessment_status": null,
"fingerprint_relation": "unknown",
"assessment_fingerprint": null,
"current_fingerprint": "sound-v2:a7b5a860a1939c7ac8e503dc44cb4124c2ccb6df29dcede5b3d822ca6b16b806",
"superseded_for_theorem_closure": false
}Review verdicts
{
"corr_status": "Pass",
"substantiveness_status": "Pass"
}