Statement
This explanation was written alongside the formalization to describe the statement and its reasoning.
Lemma · Correlated leading-digit progress
Lean statement
Trellis authored these statements and proofs. Lean checks the formal proofs; the assumptions used by each proof are listed below.
import Tablet.DecimalSeqLeftShiftRecordSemantics
import Tablet.DecimalLeftShiftDigitGrowth
import Tablet.P472_T1_DecimalValueBounds
open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
namespace dec2flt_model
-- [TABLET NODE: P529_T1_LeftLeadingProgress]
theorem P529_T1_LeftLeadingProgress
(d d' : num.imp.dec2flt.decimal_seq.DecimalSeq) (shift : Std.Usize)
(z z' : Nat) (zs zs' : List Nat)
(hshift : shift.val <= 60)
(hcap : d.num_digits.val <= 768)
(hdigits : forall b, b ∈ d.digits.val.take d.num_digits.val -> b.val < 10)
(hdigits' : forall b, b ∈ d'.digits.val.take d'.num_digits.val -> b.val < 10)
(hshape : (d.digits.val.take d.num_digits.val).map (fun b => b.val) = z :: zs)
(hshape' : (d'.digits.val.take d'.num_digits.val).map (fun b => b.val) = z' :: zs')
(hlen : (z :: zs).length = d.num_digits.val)
(hlen' : (z' :: zs').length = d'.num_digits.val)
(hz : 1 <= z) (hz' : 1 <= z')
(hcall : num.imp.dec2flt.decimal_seq.DecimalSeq.left_shift d shift = ok d') :
(d.decimal_point.val = -1 -> d'.decimal_point.val = -1 ->
shift.val = 3 -> 7 <= z') /\
(d.decimal_point.val = 0 -> d'.decimal_point.val = 0 ->
((z = 1 /\ shift.val = 2) \/ (z = 2 /\ shift.val = 1)) -> 3 <= z') /\
(d.decimal_point.val = 0 -> d'.decimal_point.val = 0 ->
3 <= z -> shift.val = 1 -> 5 <= z') /\
(d.decimal_point.val = -1 -> d'.decimal_point.val = 0 ->
7 <= z -> shift.val = 3 -> 5 <= z') /\
(7 <= z ->
num.imp.dec2flt.decimal_seq.number_of_digits_decimal_left_shift
d 3#usize = ok 1#usize) := 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
let xs := (d.digits.val.take d.num_digits.val).map (fun b => b.val)
let xs' := (d'.digits.val.take d'.num_digits.val).map (fun b => b.val)
let F := fun ys : List Nat => ys.foldl (fun a b => 10 * a + b) 0
let V := fun (q : num.imp.dec2flt.decimal_seq.DecimalSeq) =>
let digits := (q.digits.val.take q.num_digits.val).map (fun b => b.val)
let integer := F digits
(integer : Real) * (10 : Real) ^ (q.decimal_point.val - (q.num_digits.val : Int))
have hxs : xs = z :: zs := by simpa [xs] using hshape
have hxs' : xs' = z' :: zs' := by simpa [xs'] using hshape'
have hdigitsF : forall b, b ∈ xs -> b < 10 := by
intro b hb
simp only [xs, List.mem_map] at hb
rcases hb with ⟨q, hq, rfl⟩
exact hdigits q hq
have hdigitsF' : forall b, b ∈ xs' -> b < 10 := by
intro b hb
simp only [xs', List.mem_map] at hb
rcases hb with ⟨q, hq, rfl⟩
exact hdigits' q hq
have foldFrom (ys : List Nat) (a : Nat) :
ys.foldl (fun n b => 10 * n + b) a = a * 10 ^ ys.length + F ys := by
induction ys generalizing a with
| nil => simp [F]
| cons b ys ih =>
simp only [List.foldl_cons, List.length_cons]
rw [ih, pow_succ]
change (10 * a + b) * 10 ^ ys.length + F ys =
a * (10 ^ ys.length * 10) + (b :: ys).foldl (fun n q => 10 * n + q) 0
simp only [List.foldl_cons]
rw [ih]
ring
have foldBound (ys : List Nat) (hd : forall b, b ∈ ys -> b < 10) :
F ys < 10 ^ ys.length := by
induction ys with
| nil => simp [F]
| cons b ys ih =>
have hb : b < 10 := hd b (by simp)
have htail : forall q, q ∈ ys -> q < 10 := by
intro q hq
exact hd q (by simp [hq])
have hi := ih htail
rw [show F (b :: ys) = b * 10 ^ ys.length + F ys by
simpa [F] using foldFrom ys b, List.length_cons, pow_succ]
have hm : b * 10 ^ ys.length <= 9 * 10 ^ ys.length :=
Nat.mul_le_mul_right _ (by omega)
calc
b * 10 ^ ys.length + F ys < b * 10 ^ ys.length + 10 ^ ys.length :=
Nat.add_lt_add_left hi _
_ <= 9 * 10 ^ ys.length + 10 ^ ys.length := Nat.add_le_add_right hm _
_ = 10 ^ (ys.length + 1) := by rw [pow_succ]; ring
have htail : F zs < 10 ^ zs.length := by
apply foldBound
intro b hb
have hb' : b ∈ xs := by simpa [hxs] using (Or.inr hb)
exact hdigitsF b hb'
have htail' : F zs' < 10 ^ zs'.length := by
apply foldBound
intro b hb
have hb' : b ∈ xs' := by simpa [hxs'] using (Or.inr hb)
exact hdigitsF' b hb'
have hfold : F xs = z * 10 ^ zs.length + F zs := by
rw [hxs]
simpa [F] using foldFrom zs z
have hfold' : F xs' = z' * 10 ^ zs'.length + F zs' := by
rw [hxs']
simpa [F] using foldFrom zs' z'
have hlenN : d.num_digits.val = zs.length + 1 := by
have := hlen
simp only [List.length_cons] at this
omega
have hlenN' : d'.num_digits.val = zs'.length + 1 := by
have := hlen'
simp only [List.length_cons] at this
omega
have hVd : V d = (F xs : Real) * (10 : Real) ^
(d.decimal_point.val - (d.num_digits.val : Int)) := by rfl
have hVd' : V d' = (F xs' : Real) * (10 : Real) ^
(d'.decimal_point.val - (d'.num_digits.val : Int)) := by rfl
have hpos : 0 < V d := by
rw [hVd, hfold]
have : 0 < (10 : Real) ^ zs.length := by positivity
have : 0 < (z : Real) * (10 : Real) ^ zs.length + (F zs : Real) := by
have hzR : (0 : Real) < z := by exact_mod_cast hz
positivity
have hp : 0 < (10 : Real) ^ (d.decimal_point.val - (d.num_digits.val : Int)) :=
zpow_pos (by norm_num) _
positivity
obtain ⟨rho, hrho0, hrho, hrecord, _⟩ :=
DecimalSeqLeftShiftRecordSemantics d d' shift hshift hpos hdigits hcall
have hVrel : V d' = (2 : Real) ^ shift.val * V d - rho := by
simpa [V] using hrecord
have hpowd : (10 : Real) ^ (d.decimal_point.val - 1) =
(10 : Real) ^ (zs.length : Int) *
(10 : Real) ^ (d.decimal_point.val - (d.num_digits.val : Int)) := by
rw [← zpow_add₀ (by norm_num : (10 : Real) ≠ 0)]
congr 1
rw [hlenN]
push_cast
omega
have hpowd' : (10 : Real) ^ (d'.decimal_point.val - 1) =
(10 : Real) ^ (zs'.length : Int) *
(10 : Real) ^ (d'.decimal_point.val - (d'.num_digits.val : Int)) := by
rw [← zpow_add₀ (by norm_num : (10 : Real) ≠ 0)]
congr 1
rw [hlenN']
push_cast
omega
have hposBounds : (z : Real) * (10 : Real) ^ (d.decimal_point.val - 1) <= V d ∧
V d < ((z + 1 : Nat) : Real) * (10 : Real) ^ (d.decimal_point.val - 1) := by
have hp : 0 < (10 : Real) ^ (d.decimal_point.val - (d.num_digits.val : Int)) :=
zpow_pos (by norm_num) _
have hnatlo : z * 10 ^ zs.length <= z * 10 ^ zs.length + F zs := by omega
have hnathi : z * 10 ^ zs.length + F zs < (z + 1) * 10 ^ zs.length := by
calc
z * 10 ^ zs.length + F zs < z * 10 ^ zs.length + 10 ^ zs.length :=
Nat.add_lt_add_left htail _
_ = (z + 1) * 10 ^ zs.length := by ring
have hloR : (z : Real) * (10 : Real) ^ zs.length <=
((z * 10 ^ zs.length + F zs : Nat) : Real) := by exact_mod_cast hnatlo
have hhiR : ((z * 10 ^ zs.length + F zs : Nat) : Real) <
(((z + 1) * 10 ^ zs.length : Nat) : Real) := by exact_mod_cast hnathi
constructor
· calc
(z : Real) * (10 : Real) ^ (d.decimal_point.val - 1) =
((z : Real) * (10 : Real) ^ zs.length) *
(10 : Real) ^ (d.decimal_point.val - (d.num_digits.val : Int)) := by
rw [hpowd, ← zpow_natCast (10 : Real) zs.length]; ring
_ <= ((z * 10 ^ zs.length + F zs : Nat) : Real) *
(10 : Real) ^ (d.decimal_point.val - (d.num_digits.val : Int)) :=
mul_le_mul_of_nonneg_right hloR (le_of_lt hp)
_ = V d := by rw [hVd, hfold]
· calc
V d = ((z * 10 ^ zs.length + F zs : Nat) : Real) *
(10 : Real) ^ (d.decimal_point.val - (d.num_digits.val : Int)) := by
rw [hVd, hfold]
_ < (((z + 1) * 10 ^ zs.length : Nat) : Real) *
(10 : Real) ^ (d.decimal_point.val - (d.num_digits.val : Int)) :=
mul_lt_mul_of_pos_right hhiR hp
_ = ((z + 1 : Nat) : Real) * (10 : Real) ^ (d.decimal_point.val - 1) := by
rw [hpowd]
have hc : (((z + 1) * 10 ^ zs.length : Nat) : Real) =
((z + 1 : Nat) : Real) * (10 : Real) ^ zs.length := by
norm_cast
rw [hc]
rw [← zpow_natCast (10 : Real) zs.length]
ring
have hposBounds' : (z' : Real) * (10 : Real) ^ (d'.decimal_point.val - 1) <= V d' ∧
V d' < ((z' + 1 : Nat) : Real) * (10 : Real) ^ (d'.decimal_point.val - 1) := by
have hp : 0 < (10 : Real) ^ (d'.decimal_point.val - (d'.num_digits.val : Int)) :=
zpow_pos (by norm_num) _
have hnatlo : z' * 10 ^ zs'.length <= z' * 10 ^ zs'.length + F zs' := by omega
have hnathi : z' * 10 ^ zs'.length + F zs' < (z' + 1) * 10 ^ zs'.length := by
calc
z' * 10 ^ zs'.length + F zs' < z' * 10 ^ zs'.length + 10 ^ zs'.length :=
Nat.add_lt_add_left htail' _
_ = (z' + 1) * 10 ^ zs'.length := by ring
have hloR : (z' : Real) * (10 : Real) ^ zs'.length <=
((z' * 10 ^ zs'.length + F zs' : Nat) : Real) := by exact_mod_cast hnatlo
have hhiR : ((z' * 10 ^ zs'.length + F zs' : Nat) : Real) <
(((z' + 1) * 10 ^ zs'.length : Nat) : Real) := by exact_mod_cast hnathi
constructor
· calc
(z' : Real) * (10 : Real) ^ (d'.decimal_point.val - 1) =
((z' : Real) * (10 : Real) ^ zs'.length) *
(10 : Real) ^ (d'.decimal_point.val - (d'.num_digits.val : Int)) := by
rw [hpowd', ← zpow_natCast (10 : Real) zs'.length]; ring
_ <= ((z' * 10 ^ zs'.length + F zs' : Nat) : Real) *
(10 : Real) ^ (d'.decimal_point.val - (d'.num_digits.val : Int)) :=
mul_le_mul_of_nonneg_right hloR (le_of_lt hp)
_ = V d' := by rw [hVd', hfold']
· calc
V d' = ((z' * 10 ^ zs'.length + F zs' : Nat) : Real) *
(10 : Real) ^ (d'.decimal_point.val - (d'.num_digits.val : Int)) := by
rw [hVd', hfold']
_ < (((z' + 1) * 10 ^ zs'.length : Nat) : Real) *
(10 : Real) ^ (d'.decimal_point.val - (d'.num_digits.val : Int)) :=
mul_lt_mul_of_pos_right hhiR hp
_ = ((z' + 1 : Nat) : Real) * (10 : Real) ^ (d'.decimal_point.val - 1) := by
rw [hpowd']
have hc : (((z' + 1) * 10 ^ zs'.length : Nat) : Real) =
((z' + 1 : Nat) : Real) * (10 : Real) ^ zs'.length := by
norm_cast
rw [hc]
rw [← zpow_natCast (10 : Real) zs'.length]
ring
refine ⟨?_, ?_, ?_, ?_, ?_⟩
· intro hp hp' hk
have hlow := hposBounds.1
rw [hp] at hlow
have hrel := hVrel
rw [hk] at hrel
norm_num at hlow hrel
have hloss : rho < (1 : Real) / 100 := by
rw [hp'] at hrho
have hpow : (10 : Real) ^ (-769 : Int) < (1 : Real) / 100 := by
calc
(10 : Real) ^ (-769 : Int) < (10 : Real) ^ (-2 : Int) :=
zpow_lt_zpow_right₀ (by norm_num) (by omega)
_ = (1 : Real) / 100 := by norm_num
exact lt_trans hrho hpow
have hzR : (1 : Real) <= z := by exact_mod_cast hz
have hlarge : (7 : Real) / 100 < V d' := by nlinarith
by_contra hn
have hzup : z' <= 6 := by omega
have hupper := hposBounds'.2
rw [hp'] at hupper
norm_num at hupper
have hzupR : (z' : Real) <= 6 := by exact_mod_cast hzup
have hupperSmall : V d' < (7 : Real) / 100 := by
nlinarith only [hupper, hzupR]
linarith only [hlarge, hupperSmall]
· intro hp hp' hcases
rcases hcases with ⟨hzcase, hk⟩ | ⟨hzcase, hk⟩
· have hlow := hposBounds.1
rw [hp] at hlow
rw [hzcase] at hlow
norm_num at hlow
have hrel := hVrel
rw [hk] at hrel
norm_num at hrel
have hloss : rho < (1 : Real) / 10 := by
rw [hp'] at hrho
have hpow : (10 : Real) ^ (-768 : Int) < (1 : Real) / 10 := by
calc
(10 : Real) ^ (-768 : Int) < (10 : Real) ^ (-1 : Int) :=
zpow_lt_zpow_right₀ (by norm_num) (by omega)
_ = (1 : Real) / 10 := by norm_num
exact lt_trans hrho hpow
have hlarge : (3 : Real) / 10 < V d' := by nlinarith
by_contra hn
have hzup : z' <= 2 := by omega
have hupper := hposBounds'.2
rw [hp'] at hupper
norm_num at hupper
have hzupR : (z' : Real) <= 2 := by exact_mod_cast hzup
have hupperSmall : V d' < (3 : Real) / 10 := by
nlinarith only [hupper, hzupR]
linarith only [hlarge, hupperSmall]
· have hlow := hposBounds.1
rw [hp] at hlow
rw [hzcase] at hlow
norm_num at hlow
have hrel := hVrel
rw [hk] at hrel
norm_num at hrel
have hloss : rho < (1 : Real) / 10 := by
rw [hp'] at hrho
have hpow : (10 : Real) ^ (-768 : Int) < (1 : Real) / 10 := by
calc
(10 : Real) ^ (-768 : Int) < (10 : Real) ^ (-1 : Int) :=
zpow_lt_zpow_right₀ (by norm_num) (by omega)
_ = (1 : Real) / 10 := by norm_num
exact lt_trans hrho hpow
have hlarge : (3 : Real) / 10 < V d' := by nlinarith
by_contra hn
have hzup : z' <= 2 := by omega
have hupper := hposBounds'.2
rw [hp'] at hupper
norm_num at hupper
have hzupR : (z' : Real) <= 2 := by exact_mod_cast hzup
have hupperSmall : V d' < (3 : Real) / 10 := by
nlinarith only [hupper, hzupR]
linarith only [hlarge, hupperSmall]
· intro hp hp' hzlo hk
have hlow := hposBounds.1
rw [hp] at hlow
norm_num at hlow
have hrel := hVrel
rw [hk] at hrel
norm_num at hrel
have hloss : rho < (1 : Real) / 10 := by
rw [hp'] at hrho
have hpow : (10 : Real) ^ (-768 : Int) < (1 : Real) / 10 := by
calc
(10 : Real) ^ (-768 : Int) < (10 : Real) ^ (-1 : Int) :=
zpow_lt_zpow_right₀ (by norm_num) (by omega)
_ = (1 : Real) / 10 := by norm_num
exact lt_trans hrho hpow
have hzloR : (3 : Real) <= z := by exact_mod_cast hzlo
have hlarge : (1 : Real) / 2 < V d' := by nlinarith
by_contra hn
have hzup : z' <= 4 := by omega
have hupper := hposBounds'.2
rw [hp'] at hupper
norm_num at hupper
have hzupR : (z' : Real) <= 4 := by exact_mod_cast hzup
have hupperSmall : V d' < (1 : Real) / 2 := by
nlinarith only [hupper, hzupR]
linarith only [hlarge, hupperSmall]
· intro hp hp' hzlo hk
have hlow := hposBounds.1
rw [hp] at hlow
norm_num at hlow
have hrel := hVrel
rw [hk] at hrel
norm_num at hrel
have hloss : rho < (1 : Real) / 100 := by
rw [hp'] at hrho
have hpow : (10 : Real) ^ (-768 : Int) < (1 : Real) / 100 := by
calc
(10 : Real) ^ (-768 : Int) < (10 : Real) ^ (-2 : Int) :=
zpow_lt_zpow_right₀ (by norm_num) (by omega)
_ = (1 : Real) / 100 := by norm_num
exact lt_trans hrho hpow
have hzloR : (7 : Real) <= z := by exact_mod_cast hzlo
have hlarge : (11 : Real) / 20 < V d' := by nlinarith
by_contra hn
have hzup : z' <= 4 := by omega
have hupper := hposBounds'.2
rw [hp'] at hupper
norm_num at hupper
have hzupR : (z' : Real) <= 4 := by exact_mod_cast hzup
have hupperSmall : V d' < (1 : Real) / 2 := by
nlinarith only [hupper, hzupR]
linarith only [hlarge, hupperSmall]
· intro hzlo
have hI : 10 ^ d.num_digits.val <= 8 * F xs := by
rw [hlenN, hfold]
have hp : 0 < 10 ^ zs.length := by positivity
have hmul : 7 * 10 ^ zs.length <= z * 10 ^ zs.length :=
Nat.mul_le_mul_right _ (by omega)
have hbase : 10 * 10 ^ zs.length <=
8 * (z * 10 ^ zs.length + F zs) := by
omega
simpa [pow_succ, Nat.mul_comm] using hbase
have hgrowth := DecimalLeftShiftDigitGrowth d (3#usize) 1
(by norm_num) (by norm_num) (by norm_num) hcap hdigits
rcases hgrowth with ⟨out, hout, houtval⟩
have houtval' : out.val =
if 10 ^ d.num_digits.val <= F xs * 2 ^ (3 : Nat) then 1 else 0 := by
simpa [xs, F] using houtval
have hthreshold : 10 ^ d.num_digits.val <= F xs * 2 ^ (3 : Nat) := by
norm_num at hI ⊢
omega
rw [if_pos hthreshold] at houtval'
have houtEq : out = 1#usize := UScalar.eq_of_val_eq (by simpa using houtval')
simpa [houtEq] using hout
end dec2flt_model
Download Lean source · Download TeX source
Complete Lean module
import Tablet.DecimalSeqLeftShiftRecordSemantics
import Tablet.DecimalLeftShiftDigitGrowth
import Tablet.P472_T1_DecimalValueBounds
open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
namespace dec2flt_model
-- [TABLET NODE: P529_T1_LeftLeadingProgress]
theorem P529_T1_LeftLeadingProgress
(d d' : num.imp.dec2flt.decimal_seq.DecimalSeq) (shift : Std.Usize)
(z z' : Nat) (zs zs' : List Nat)
(hshift : shift.val <= 60)
(hcap : d.num_digits.val <= 768)
(hdigits : forall b, b ∈ d.digits.val.take d.num_digits.val -> b.val < 10)
(hdigits' : forall b, b ∈ d'.digits.val.take d'.num_digits.val -> b.val < 10)
(hshape : (d.digits.val.take d.num_digits.val).map (fun b => b.val) = z :: zs)
(hshape' : (d'.digits.val.take d'.num_digits.val).map (fun b => b.val) = z' :: zs')
(hlen : (z :: zs).length = d.num_digits.val)
(hlen' : (z' :: zs').length = d'.num_digits.val)
(hz : 1 <= z) (hz' : 1 <= z')
(hcall : num.imp.dec2flt.decimal_seq.DecimalSeq.left_shift d shift = ok d') :
(d.decimal_point.val = -1 -> d'.decimal_point.val = -1 ->
shift.val = 3 -> 7 <= z') /\
(d.decimal_point.val = 0 -> d'.decimal_point.val = 0 ->
((z = 1 /\ shift.val = 2) \/ (z = 2 /\ shift.val = 1)) -> 3 <= z') /\
(d.decimal_point.val = 0 -> d'.decimal_point.val = 0 ->
3 <= z -> shift.val = 1 -> 5 <= z') /\
(d.decimal_point.val = -1 -> d'.decimal_point.val = 0 ->
7 <= z -> shift.val = 3 -> 5 <= z') /\
(7 <= z ->
num.imp.dec2flt.decimal_seq.number_of_digits_decimal_left_shift
d 3#usize = ok 1#usize) := by
-- BODY
let xs := (d.digits.val.take d.num_digits.val).map (fun b => b.val)
let xs' := (d'.digits.val.take d'.num_digits.val).map (fun b => b.val)
let F := fun ys : List Nat => ys.foldl (fun a b => 10 * a + b) 0
let V := fun (q : num.imp.dec2flt.decimal_seq.DecimalSeq) =>
let digits := (q.digits.val.take q.num_digits.val).map (fun b => b.val)
let integer := F digits
(integer : Real) * (10 : Real) ^ (q.decimal_point.val - (q.num_digits.val : Int))
have hxs : xs = z :: zs := by simpa [xs] using hshape
have hxs' : xs' = z' :: zs' := by simpa [xs'] using hshape'
have hdigitsF : forall b, b ∈ xs -> b < 10 := by
intro b hb
simp only [xs, List.mem_map] at hb
rcases hb with ⟨q, hq, rfl⟩
exact hdigits q hq
have hdigitsF' : forall b, b ∈ xs' -> b < 10 := by
intro b hb
simp only [xs', List.mem_map] at hb
rcases hb with ⟨q, hq, rfl⟩
exact hdigits' q hq
have foldFrom (ys : List Nat) (a : Nat) :
ys.foldl (fun n b => 10 * n + b) a = a * 10 ^ ys.length + F ys := by
induction ys generalizing a with
| nil => simp [F]
| cons b ys ih =>
simp only [List.foldl_cons, List.length_cons]
rw [ih, pow_succ]
change (10 * a + b) * 10 ^ ys.length + F ys =
a * (10 ^ ys.length * 10) + (b :: ys).foldl (fun n q => 10 * n + q) 0
simp only [List.foldl_cons]
rw [ih]
ring
have foldBound (ys : List Nat) (hd : forall b, b ∈ ys -> b < 10) :
F ys < 10 ^ ys.length := by
induction ys with
| nil => simp [F]
| cons b ys ih =>
have hb : b < 10 := hd b (by simp)
have htail : forall q, q ∈ ys -> q < 10 := by
intro q hq
exact hd q (by simp [hq])
have hi := ih htail
rw [show F (b :: ys) = b * 10 ^ ys.length + F ys by
simpa [F] using foldFrom ys b, List.length_cons, pow_succ]
have hm : b * 10 ^ ys.length <= 9 * 10 ^ ys.length :=
Nat.mul_le_mul_right _ (by omega)
calc
b * 10 ^ ys.length + F ys < b * 10 ^ ys.length + 10 ^ ys.length :=
Nat.add_lt_add_left hi _
_ <= 9 * 10 ^ ys.length + 10 ^ ys.length := Nat.add_le_add_right hm _
_ = 10 ^ (ys.length + 1) := by rw [pow_succ]; ring
have htail : F zs < 10 ^ zs.length := by
apply foldBound
intro b hb
have hb' : b ∈ xs := by simpa [hxs] using (Or.inr hb)
exact hdigitsF b hb'
have htail' : F zs' < 10 ^ zs'.length := by
apply foldBound
intro b hb
have hb' : b ∈ xs' := by simpa [hxs'] using (Or.inr hb)
exact hdigitsF' b hb'
have hfold : F xs = z * 10 ^ zs.length + F zs := by
rw [hxs]
simpa [F] using foldFrom zs z
have hfold' : F xs' = z' * 10 ^ zs'.length + F zs' := by
rw [hxs']
simpa [F] using foldFrom zs' z'
have hlenN : d.num_digits.val = zs.length + 1 := by
have := hlen
simp only [List.length_cons] at this
omega
have hlenN' : d'.num_digits.val = zs'.length + 1 := by
have := hlen'
simp only [List.length_cons] at this
omega
have hVd : V d = (F xs : Real) * (10 : Real) ^
(d.decimal_point.val - (d.num_digits.val : Int)) := by rfl
have hVd' : V d' = (F xs' : Real) * (10 : Real) ^
(d'.decimal_point.val - (d'.num_digits.val : Int)) := by rfl
have hpos : 0 < V d := by
rw [hVd, hfold]
have : 0 < (10 : Real) ^ zs.length := by positivity
have : 0 < (z : Real) * (10 : Real) ^ zs.length + (F zs : Real) := by
have hzR : (0 : Real) < z := by exact_mod_cast hz
positivity
have hp : 0 < (10 : Real) ^ (d.decimal_point.val - (d.num_digits.val : Int)) :=
zpow_pos (by norm_num) _
positivity
obtain ⟨rho, hrho0, hrho, hrecord, _⟩ :=
DecimalSeqLeftShiftRecordSemantics d d' shift hshift hpos hdigits hcall
have hVrel : V d' = (2 : Real) ^ shift.val * V d - rho := by
simpa [V] using hrecord
have hpowd : (10 : Real) ^ (d.decimal_point.val - 1) =
(10 : Real) ^ (zs.length : Int) *
(10 : Real) ^ (d.decimal_point.val - (d.num_digits.val : Int)) := by
rw [← zpow_add₀ (by norm_num : (10 : Real) ≠ 0)]
congr 1
rw [hlenN]
push_cast
omega
have hpowd' : (10 : Real) ^ (d'.decimal_point.val - 1) =
(10 : Real) ^ (zs'.length : Int) *
(10 : Real) ^ (d'.decimal_point.val - (d'.num_digits.val : Int)) := by
rw [← zpow_add₀ (by norm_num : (10 : Real) ≠ 0)]
congr 1
rw [hlenN']
push_cast
omega
have hposBounds : (z : Real) * (10 : Real) ^ (d.decimal_point.val - 1) <= V d ∧
V d < ((z + 1 : Nat) : Real) * (10 : Real) ^ (d.decimal_point.val - 1) := by
have hp : 0 < (10 : Real) ^ (d.decimal_point.val - (d.num_digits.val : Int)) :=
zpow_pos (by norm_num) _
have hnatlo : z * 10 ^ zs.length <= z * 10 ^ zs.length + F zs := by omega
have hnathi : z * 10 ^ zs.length + F zs < (z + 1) * 10 ^ zs.length := by
calc
z * 10 ^ zs.length + F zs < z * 10 ^ zs.length + 10 ^ zs.length :=
Nat.add_lt_add_left htail _
_ = (z + 1) * 10 ^ zs.length := by ring
have hloR : (z : Real) * (10 : Real) ^ zs.length <=
((z * 10 ^ zs.length + F zs : Nat) : Real) := by exact_mod_cast hnatlo
have hhiR : ((z * 10 ^ zs.length + F zs : Nat) : Real) <
(((z + 1) * 10 ^ zs.length : Nat) : Real) := by exact_mod_cast hnathi
constructor
· calc
(z : Real) * (10 : Real) ^ (d.decimal_point.val - 1) =
((z : Real) * (10 : Real) ^ zs.length) *
(10 : Real) ^ (d.decimal_point.val - (d.num_digits.val : Int)) := by
rw [hpowd, ← zpow_natCast (10 : Real) zs.length]; ring
_ <= ((z * 10 ^ zs.length + F zs : Nat) : Real) *
(10 : Real) ^ (d.decimal_point.val - (d.num_digits.val : Int)) :=
mul_le_mul_of_nonneg_right hloR (le_of_lt hp)
_ = V d := by rw [hVd, hfold]
· calc
V d = ((z * 10 ^ zs.length + F zs : Nat) : Real) *
(10 : Real) ^ (d.decimal_point.val - (d.num_digits.val : Int)) := by
rw [hVd, hfold]
_ < (((z + 1) * 10 ^ zs.length : Nat) : Real) *
(10 : Real) ^ (d.decimal_point.val - (d.num_digits.val : Int)) :=
mul_lt_mul_of_pos_right hhiR hp
_ = ((z + 1 : Nat) : Real) * (10 : Real) ^ (d.decimal_point.val - 1) := by
rw [hpowd]
have hc : (((z + 1) * 10 ^ zs.length : Nat) : Real) =
((z + 1 : Nat) : Real) * (10 : Real) ^ zs.length := by
norm_cast
rw [hc]
rw [← zpow_natCast (10 : Real) zs.length]
ring
have hposBounds' : (z' : Real) * (10 : Real) ^ (d'.decimal_point.val - 1) <= V d' ∧
V d' < ((z' + 1 : Nat) : Real) * (10 : Real) ^ (d'.decimal_point.val - 1) := by
have hp : 0 < (10 : Real) ^ (d'.decimal_point.val - (d'.num_digits.val : Int)) :=
zpow_pos (by norm_num) _
have hnatlo : z' * 10 ^ zs'.length <= z' * 10 ^ zs'.length + F zs' := by omega
have hnathi : z' * 10 ^ zs'.length + F zs' < (z' + 1) * 10 ^ zs'.length := by
calc
z' * 10 ^ zs'.length + F zs' < z' * 10 ^ zs'.length + 10 ^ zs'.length :=
Nat.add_lt_add_left htail' _
_ = (z' + 1) * 10 ^ zs'.length := by ring
have hloR : (z' : Real) * (10 : Real) ^ zs'.length <=
((z' * 10 ^ zs'.length + F zs' : Nat) : Real) := by exact_mod_cast hnatlo
have hhiR : ((z' * 10 ^ zs'.length + F zs' : Nat) : Real) <
(((z' + 1) * 10 ^ zs'.length : Nat) : Real) := by exact_mod_cast hnathi
constructor
· calc
(z' : Real) * (10 : Real) ^ (d'.decimal_point.val - 1) =
((z' : Real) * (10 : Real) ^ zs'.length) *
(10 : Real) ^ (d'.decimal_point.val - (d'.num_digits.val : Int)) := by
rw [hpowd', ← zpow_natCast (10 : Real) zs'.length]; ring
_ <= ((z' * 10 ^ zs'.length + F zs' : Nat) : Real) *
(10 : Real) ^ (d'.decimal_point.val - (d'.num_digits.val : Int)) :=
mul_le_mul_of_nonneg_right hloR (le_of_lt hp)
_ = V d' := by rw [hVd', hfold']
· calc
V d' = ((z' * 10 ^ zs'.length + F zs' : Nat) : Real) *
(10 : Real) ^ (d'.decimal_point.val - (d'.num_digits.val : Int)) := by
rw [hVd', hfold']
_ < (((z' + 1) * 10 ^ zs'.length : Nat) : Real) *
(10 : Real) ^ (d'.decimal_point.val - (d'.num_digits.val : Int)) :=
mul_lt_mul_of_pos_right hhiR hp
_ = ((z' + 1 : Nat) : Real) * (10 : Real) ^ (d'.decimal_point.val - 1) := by
rw [hpowd']
have hc : (((z' + 1) * 10 ^ zs'.length : Nat) : Real) =
((z' + 1 : Nat) : Real) * (10 : Real) ^ zs'.length := by
norm_cast
rw [hc]
rw [← zpow_natCast (10 : Real) zs'.length]
ring
refine ⟨?_, ?_, ?_, ?_, ?_⟩
· intro hp hp' hk
have hlow := hposBounds.1
rw [hp] at hlow
have hrel := hVrel
rw [hk] at hrel
norm_num at hlow hrel
have hloss : rho < (1 : Real) / 100 := by
rw [hp'] at hrho
have hpow : (10 : Real) ^ (-769 : Int) < (1 : Real) / 100 := by
calc
(10 : Real) ^ (-769 : Int) < (10 : Real) ^ (-2 : Int) :=
zpow_lt_zpow_right₀ (by norm_num) (by omega)
_ = (1 : Real) / 100 := by norm_num
exact lt_trans hrho hpow
have hzR : (1 : Real) <= z := by exact_mod_cast hz
have hlarge : (7 : Real) / 100 < V d' := by nlinarith
by_contra hn
have hzup : z' <= 6 := by omega
have hupper := hposBounds'.2
rw [hp'] at hupper
norm_num at hupper
have hzupR : (z' : Real) <= 6 := by exact_mod_cast hzup
have hupperSmall : V d' < (7 : Real) / 100 := by
nlinarith only [hupper, hzupR]
linarith only [hlarge, hupperSmall]
· intro hp hp' hcases
rcases hcases with ⟨hzcase, hk⟩ | ⟨hzcase, hk⟩
· have hlow := hposBounds.1
rw [hp] at hlow
rw [hzcase] at hlow
norm_num at hlow
have hrel := hVrel
rw [hk] at hrel
norm_num at hrel
have hloss : rho < (1 : Real) / 10 := by
rw [hp'] at hrho
have hpow : (10 : Real) ^ (-768 : Int) < (1 : Real) / 10 := by
calc
(10 : Real) ^ (-768 : Int) < (10 : Real) ^ (-1 : Int) :=
zpow_lt_zpow_right₀ (by norm_num) (by omega)
_ = (1 : Real) / 10 := by norm_num
exact lt_trans hrho hpow
have hlarge : (3 : Real) / 10 < V d' := by nlinarith
by_contra hn
have hzup : z' <= 2 := by omega
have hupper := hposBounds'.2
rw [hp'] at hupper
norm_num at hupper
have hzupR : (z' : Real) <= 2 := by exact_mod_cast hzup
have hupperSmall : V d' < (3 : Real) / 10 := by
nlinarith only [hupper, hzupR]
linarith only [hlarge, hupperSmall]
· have hlow := hposBounds.1
rw [hp] at hlow
rw [hzcase] at hlow
norm_num at hlow
have hrel := hVrel
rw [hk] at hrel
norm_num at hrel
have hloss : rho < (1 : Real) / 10 := by
rw [hp'] at hrho
have hpow : (10 : Real) ^ (-768 : Int) < (1 : Real) / 10 := by
calc
(10 : Real) ^ (-768 : Int) < (10 : Real) ^ (-1 : Int) :=
zpow_lt_zpow_right₀ (by norm_num) (by omega)
_ = (1 : Real) / 10 := by norm_num
exact lt_trans hrho hpow
have hlarge : (3 : Real) / 10 < V d' := by nlinarith
by_contra hn
have hzup : z' <= 2 := by omega
have hupper := hposBounds'.2
rw [hp'] at hupper
norm_num at hupper
have hzupR : (z' : Real) <= 2 := by exact_mod_cast hzup
have hupperSmall : V d' < (3 : Real) / 10 := by
nlinarith only [hupper, hzupR]
linarith only [hlarge, hupperSmall]
· intro hp hp' hzlo hk
have hlow := hposBounds.1
rw [hp] at hlow
norm_num at hlow
have hrel := hVrel
rw [hk] at hrel
norm_num at hrel
have hloss : rho < (1 : Real) / 10 := by
rw [hp'] at hrho
have hpow : (10 : Real) ^ (-768 : Int) < (1 : Real) / 10 := by
calc
(10 : Real) ^ (-768 : Int) < (10 : Real) ^ (-1 : Int) :=
zpow_lt_zpow_right₀ (by norm_num) (by omega)
_ = (1 : Real) / 10 := by norm_num
exact lt_trans hrho hpow
have hzloR : (3 : Real) <= z := by exact_mod_cast hzlo
have hlarge : (1 : Real) / 2 < V d' := by nlinarith
by_contra hn
have hzup : z' <= 4 := by omega
have hupper := hposBounds'.2
rw [hp'] at hupper
norm_num at hupper
have hzupR : (z' : Real) <= 4 := by exact_mod_cast hzup
have hupperSmall : V d' < (1 : Real) / 2 := by
nlinarith only [hupper, hzupR]
linarith only [hlarge, hupperSmall]
· intro hp hp' hzlo hk
have hlow := hposBounds.1
rw [hp] at hlow
norm_num at hlow
have hrel := hVrel
rw [hk] at hrel
norm_num at hrel
have hloss : rho < (1 : Real) / 100 := by
rw [hp'] at hrho
have hpow : (10 : Real) ^ (-768 : Int) < (1 : Real) / 100 := by
calc
(10 : Real) ^ (-768 : Int) < (10 : Real) ^ (-2 : Int) :=
zpow_lt_zpow_right₀ (by norm_num) (by omega)
_ = (1 : Real) / 100 := by norm_num
exact lt_trans hrho hpow
have hzloR : (7 : Real) <= z := by exact_mod_cast hzlo
have hlarge : (11 : Real) / 20 < V d' := by nlinarith
by_contra hn
have hzup : z' <= 4 := by omega
have hupper := hposBounds'.2
rw [hp'] at hupper
norm_num at hupper
have hzupR : (z' : Real) <= 4 := by exact_mod_cast hzup
have hupperSmall : V d' < (1 : Real) / 2 := by
nlinarith only [hupper, hzupR]
linarith only [hlarge, hupperSmall]
· intro hzlo
have hI : 10 ^ d.num_digits.val <= 8 * F xs := by
rw [hlenN, hfold]
have hp : 0 < 10 ^ zs.length := by positivity
have hmul : 7 * 10 ^ zs.length <= z * 10 ^ zs.length :=
Nat.mul_le_mul_right _ (by omega)
have hbase : 10 * 10 ^ zs.length <=
8 * (z * 10 ^ zs.length + F zs) := by
omega
simpa [pow_succ, Nat.mul_comm] using hbase
have hgrowth := DecimalLeftShiftDigitGrowth d (3#usize) 1
(by norm_num) (by norm_num) (by norm_num) hcap hdigits
rcases hgrowth with ⟨out, hout, houtval⟩
have houtval' : out.val =
if 10 ^ d.num_digits.val <= F xs * 2 ^ (3 : Nat) then 1 else 0 := by
simpa [xs, F] using houtval
have hthreshold : 10 ^ d.num_digits.val <= F xs * 2 ^ (3 : Nat) := by
norm_num at hI ⊢
omega
rw [if_pos hthreshold] at houtval'
have houtEq : out = 1#usize := UScalar.eq_of_val_eq (by simpa using houtval')
simpa [houtEq] using hout
end dec2flt_model
Proof structure
Follow the declared dependencies to read the supporting statements and proofs.
Used by
Inspect related source (117)
- DecimalSeq · dec2flt/decimal_seq.rs:22 Program Rust
- MAX_DIGITS · dec2flt/decimal_seq.rs:64 Program Rust
- left_shift · dec2flt/decimal_seq.rs:130 Program Rust
More program dependencies (84)
- 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
- 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
- from_u64 · dec2flt/mod.rs:263 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
- ByteSlice · dec2flt/common.rs:4 Program Rust
- Decimal · dec2flt/decimal.rs:32 Program Rust
- parse_long_mantissa · dec2flt/slow.rs:27 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
- CastInto · traits.rs:18 Program Rust
- Float · traits.rs:74 Program Rust
- FloatExt · traits.rs:170 Program Rust
- Int · traits.rs:27 Program Rust
- zero_pow2 · dec2flt/common.rs:66 Program Rust
- DECIMAL_POINT_RANGE · dec2flt/decimal_seq.rs:68 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
- 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
- MAX_SHIFT · dec2flt/slow.rs:28 Program Rust
- call · dec2flt/slow.rs:33 Program Rust
- read_u64 · dec2flt/common.rs:22 Program Rust
- write_u64 · dec2flt/common.rs:29 Program Rust
- is_8digits · dec2flt/common.rs:44 Program Rust
- default · dec2flt/decimal_seq.rs:34 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
- NUM_POWERS · dec2flt/slow.rs:29 Program Rust
- POWERS · dec2flt/slow.rs:30 Program Rust
- closure · dec2flt/slow.rs:33 Program Rust
- try_add_digit · dec2flt/decimal_seq.rs:74 Program Rust
Standard-library dependencies (30)
- 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
- 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
- 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
- DecimalDigitLexScale
- DecimalLeftShiftDigitGrowth
- DecimalLeftShiftFirstLoopSemantics
- DecimalLeftShiftLoopLex
- DecimalLeftShiftSecondLoopSemantics
- DecimalLeftShiftTableCertificate
All 17 entries
- DecimalDigitLexScale
- DecimalLeftShiftDigitGrowth
- DecimalLeftShiftFirstLoopSemantics
- DecimalLeftShiftLoopLex
- DecimalLeftShiftSecondLoopSemantics
- DecimalLeftShiftTableCertificate
- DecimalSeqLeftShiftRecordSemantics
- DecimalSeqTrimSemantics
- LeftLeadingProgress
- ResultLoopPartial
- num imp dec2flt decimal seq DecimalSeq
- num imp dec2flt decimal seq DecimalSeq MAX DIGITS
- num imp dec2flt decimal seq DecimalSeq left shift
- num imp dec2flt decimal seq DecimalSeq trim
- 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
Technical checking records
Local closure summary
{
"node": "P529_T1_LeftLeadingProgress",
"closure_version": "patch_c_v1",
"active_decl_hash": "ec026ed1597b02baa7c0449a68af1777601266d4e9e739e920bc4aadb2fb4e25",
"active_statement_hash": "d79e4a959b1fe281600fbfef0e333caf005d97138a291a2ca73db9abc005b6bd",
"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-181",
"boundary_theorems": {},
"strict_theorem_deps": {
"DecimalLeftShiftDigitGrowth": "6dcf8858df4713eb",
"DecimalSeqLeftShiftRecordSemantics": "abe9f51b6cd0693a"
},
"strict_definition_deps": {
"num_imp_dec2flt_decimal_seq_DecimalSeq": "b0286c42454b158d",
"num_imp_dec2flt_decimal_seq_DecimalSeq_left_shift": "fd298e37d5ae4f86",
"num_imp_dec2flt_decimal_seq_number_of_digits_decimal_left_shift": "b3efbd0e6b3fe061"
}
}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:0cc48f200f429a3aec6c1dfb61876d1a2f0a1530f5e217f7966da60e30b3b2ef",
"superseded_for_theorem_closure": false
}Review verdicts
{
"corr_status": "Pass",
"substantiveness_status": "Pass"
}