Statement
This explanation was written alongside the formalization to describe the statement and its reasoning.
Helper · Exact maximal eight-byte bulk scan
drop k D followed by the original residual, its
index is the initial index plus k, and there is a k-byte list W whose
values are take k D such that the returned parent array is
Lean statement
Trellis authored these statements and proofs. Lean checks the formal proofs; the assumptions used by each proof are listed below.
import Tablet.DecimalSeqBulkMixedStop
import Tablet.DecimalSeqBulkStepExact
open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
namespace dec2flt_model
-- [TABLET NODE: DecimalSeqBulkLoopExact]
theorem DecimalSeqBulkLoopExact (s : Slice Std.U8) (i : Std.Usize)
(a : Array Std.U8 768#usize) (digits tail : List Nat)
(hs : s.val.map (fun b => b.val) =
digits.map (fun z => 48 + z) ++ tail)
(hdigits : forall z, z ∈ digits -> z < 10)
(htail : tail = [] \/ exists marker rest,
tail = marker :: rest /\ (marker = 69 \/ marker = 101))
(hbound : i.val + digits.length + tail.length <= UScalar.max .Usize) :
exists (k : Nat) (rest : Slice Std.U8) (i' : Std.Usize)
(a' : Array Std.U8 768#usize) (written : List Std.U8),
num.imp.dec2flt.decimal_seq.parse_decimal_seq_loop3 s i a =
ok (rest, i', a') /\
k <= digits.length /\ k % 8 = 0 /\
rest.val.map (fun b => b.val) =
(digits.drop k).map (fun z => 48 + z) ++ tail /\
i'.val = i.val + k /\ written.length = k /\
written.map (fun b => b.val) = digits.take k /\
a'.val = a.val.take i.val ++ written ++ a.val.drop (i.val + k) := 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
drop (i+k+8) a. The source length decreases by eight. If the
guard is false, the body returns the invariant state unchanged.is_8digits=false, so the body stops without
consumption. If the guard fails it likewise stops directly. These cases
exhaust the body. The total Usize bound justifies every checked +8, and the
guard i+k+8<768 justifies every parent-array composition. Well-founded loop
induction therefore returns a state satisfying the exact invariant asserted.Lean proof
let Inv := fun p : Slice Std.U8 × Std.Usize × Array Std.U8 768#usize =>
exists (k : Nat) (written : List Std.U8),
k <= digits.length /\ k % 8 = 0 /\
p.1.val.map (fun b => b.val) =
(digits.drop k).map (fun z => 48 + z) ++ tail /\
p.2.1.val = i.val + k /\ written.length = k /\
written.map (fun b => b.val) = digits.take k /\
p.2.2.val = a.val.take i.val ++ written ++ a.val.drop (i.val + k)
have hloop : Aeneas.Std.WP.spec
(num.imp.dec2flt.decimal_seq.parse_decimal_seq_loop3 s i a) Inv := by
unfold num.imp.dec2flt.decimal_seq.parse_decimal_seq_loop3
apply Aeneas.Std.loop.spec_decr_nat
(fun p : Slice Std.U8 × Std.Usize × Array Std.U8 768#usize =>
p.1.val.length)
Inv Inv
(fun p => num.imp.dec2flt.decimal_seq.parse_decimal_seq_loop3.body
p.1 p.2.1 p.2.2) (s, i, a)
· intro p hp
rcases p with ⟨u, j, arr⟩
rcases hp with ⟨k, prior, hk, hkmod, hu, hj, hpriorLen,
hpriorVals, harr⟩
simp only [Prod.fst, Prod.snd] at hu hj harr ⊢
have hulen : u.val.length = (digits.length - k) + tail.length := by
have := congrArg List.length hu
simp at this
omega
by_cases hremain : 8 <= digits.length - k
· by_cases hguard : j.val + 8 < 768
· have hu8 : 8 <= u.val.length := by omega
have htakeVals : (u.val.take 8).map (fun b => b.val) =
((digits.drop k).take 8).map (fun z => 48 + z) := by
have ht := congrArg (List.take 8) hu
simpa [List.map_take, List.take_append, hremain] using ht
have hfirst : forall (q : Nat) (hq : q < 8),
48 <= (u.val[q]'(by omega)).val /\
(u.val[q]'(by omega)).val <= 57 := by
intro q hq
have hbmem : u.val[q]'(by omega) ∈ u.val.take 8 := by
rw [List.mem_take_iff_getElem]
exact ⟨q, by simp; omega, rfl⟩
have hvmem : (u.val[q]'(by omega)).val ∈
(u.val.take 8).map (fun b => b.val) :=
List.mem_map.mpr ⟨_, hbmem, rfl⟩
rw [htakeVals] at hvmem
rcases List.mem_map.mp hvmem with ⟨z, hz, hzval⟩
have hzdrop : z ∈ digits.drop k := List.mem_of_mem_take hz
have hzdigits : z ∈ digits := List.mem_of_mem_drop hzdrop
have hz' := hdigits z hzdigits
omega
obtain ⟨u', j', arr', block, hbody, hu', hj', hblockLen,
hblockVals, harr'⟩ :=
DecimalSeqBulkStepExact u j arr hu8 hguard hfirst
rw [hbody]
simp only [WP.spec_ok]
refine ⟨?_, ?_⟩
· refine ⟨k + 8, prior ++ block, ?_, ?_, ?_, ?_, ?_, ?_, ?_⟩
· omega
· omega
· rw [hu']
have hdrop := congrArg (List.drop 8) hu
rw [List.map_drop] at hdrop
have hmaplen : 8 <=
((digits.map (fun z => 48 + z)).drop k).length := by
simp
exact hremain
rw [List.drop_append_of_le_length hmaplen] at hdrop
simpa [List.drop_drop, Nat.add_comm, Nat.add_left_comm,
Nat.add_assoc] using hdrop
· rw [hj', hj]
omega
· simp [hpriorLen, hblockLen]
· rw [List.map_append, hpriorVals, hblockVals]
have hblockDigits :
(u.val.take 8).map (fun b => b.val - 48) =
(digits.drop k).take 8 := by
calc
(u.val.take 8).map (fun b => b.val - 48) =
((u.val.take 8).map (fun b => b.val)).map
(fun z => z - 48) := by
rw [List.map_map]
rfl
_ = (((digits.drop k).take 8).map
(fun z => 48 + z)).map (fun z => z - 48) := by
rw [htakeVals]
_ = (digits.drop k).take 8 := by
rw [List.map_map]
calc
List.map ((fun z => z - 48) ∘ fun z => 48 + z)
((digits.drop k).take 8) =
List.map id ((digits.drop k).take 8) := by
apply List.map_congr_left
intro z hz
have hzdrop : z ∈ digits.drop k :=
List.mem_of_mem_take hz
have hz' := hdigits z (List.mem_of_mem_drop hzdrop)
simp only [Function.comp_apply, id_eq]
omega
_ = (digits.drop k).take 8 := List.map_id _
rw [hblockDigits, ← List.take_add]
· rw [harr']
have hkarr : i.val + k <= arr.val.length := by
rw [arr.property]
change i.val + k <= 768
rw [← hj]
omega
have hi768 : i.val <= 768 := by
rw [arr.property] at hkarr
omega
have hik : i.val + k = j.val := hj.symm
have hsum : i.val + k + 8 <= a.val.length := by
rw [a.property]
change i.val + k + 8 <= 768
rw [hik]
omega
have hprefixLen :
(a.val.take i.val ++ prior).length = i.val + k := by
simp [hi768, hpriorLen]
have harrAssoc : arr.val =
(a.val.take i.val ++ prior) ++ a.val.drop (i.val + k) := by
simpa [List.append_assoc] using harr
rw [harrAssoc, ← hik]
have htakePrefix :
((a.val.take i.val ++ prior) ++
a.val.drop (i.val + k)).take (i.val + k) =
a.val.take i.val ++ prior := by
rw [List.take_append_of_le_length]
· simp [hprefixLen]
· omega
have hdropSuffix :
((a.val.take i.val ++ prior) ++
a.val.drop (i.val + k)).drop (i.val + k + 8) =
a.val.drop (i.val + k + 8) := by
rw [List.drop_append, hprefixLen]
simp [List.drop_drop, Nat.add_assoc, hi768, hpriorLen]
rw [htakePrefix, hdropSuffix]
simp [Nat.add_assoc, List.append_assoc]
· rw [hu']
simp [hulen]
omega
· obtain ⟨j8, hj8, hj8val⟩ := Aeneas.Std.WP.spec_imp_exists
(UScalar.add_spec (x := j) (y := 8#usize) (by
have hk8 : k + 8 <= digits.length := by omega
change j.val + 8 <= UScalar.max .Usize
rw [hj]
omega))
unfold num.imp.dec2flt.decimal_seq.parse_decimal_seq_loop3.body
have hu8 : 8 <= u.val.length := by omega
simp [hu8, hj8, hj8val,
num.imp.dec2flt.decimal_seq.DecimalSeq.MAX_DIGITS.eq_def,
hguard, WP.spec_ok]
exact ⟨k, prior, hk, hkmod, hu, hj, hpriorLen,
hpriorVals, harr⟩
· by_cases hu8 : 8 <= u.val.length
· obtain ⟨j8, hj8, hj8val⟩ := Aeneas.Std.WP.spec_imp_exists
(UScalar.add_spec (x := j) (y := 8#usize) (by
have hju : j.val + u.val.length <=
UScalar.max .Usize := by
rw [hj, hulen]
omega
change j.val + 8 <= UScalar.max .Usize
omega))
change j8.val = j.val + 8 at hj8val
by_cases hguard : j.val + 8 < 768
· rcases htail with hnil | ⟨marker, suffix, htailEq, hmarker⟩
· rw [hnil] at hulen
simp at hulen
omega
· have hmixed : u.val.map (fun b => b.val) =
(digits.drop k).map (fun z => 48 + z) ++ marker :: suffix := by
simpa [htailEq] using hu
have hdone := DecimalSeqBulkMixedStop u j arr (digits.drop k)
marker suffix hmixed
(fun z hz => hdigits z (List.mem_of_mem_drop hz))
(by simp; omega) hu8 hmarker hguard
rw [hdone]
simp [WP.spec_ok]
exact ⟨k, prior, hk, hkmod, hu, hj, hpriorLen,
hpriorVals, harr⟩
· unfold num.imp.dec2flt.decimal_seq.parse_decimal_seq_loop3.body
simp [hu8, hj8, hj8val,
num.imp.dec2flt.decimal_seq.DecimalSeq.MAX_DIGITS.eq_def,
hguard, WP.spec_ok]
exact ⟨k, prior, hk, hkmod, hu, hj, hpriorLen,
hpriorVals, harr⟩
· unfold num.imp.dec2flt.decimal_seq.parse_decimal_seq_loop3.body
simp [hu8, WP.spec_ok]
exact ⟨k, prior, hk, hkmod, hu, hj, hpriorLen,
hpriorVals, harr⟩
· refine ⟨0, [], by simp, by simp, ?_, by simp, by simp, by simp, ?_⟩
· simpa using hs
· simp
obtain ⟨p, hp, k, written, hk, hkmod, hrest, hi', hwrittenLen,
hwrittenVals, ha'⟩ := Aeneas.Std.WP.spec_imp_exists hloop
rcases p with ⟨rest, i', a'⟩
exact ⟨k, rest, i', a', written, hp, hk, hkmod, hrest, hi',
hwrittenLen, hwrittenVals, ha'⟩
end dec2flt_model
Download Lean source · Download TeX source
Complete Lean module
import Tablet.DecimalSeqBulkMixedStop
import Tablet.DecimalSeqBulkStepExact
open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
namespace dec2flt_model
-- [TABLET NODE: DecimalSeqBulkLoopExact]
theorem DecimalSeqBulkLoopExact (s : Slice Std.U8) (i : Std.Usize)
(a : Array Std.U8 768#usize) (digits tail : List Nat)
(hs : s.val.map (fun b => b.val) =
digits.map (fun z => 48 + z) ++ tail)
(hdigits : forall z, z ∈ digits -> z < 10)
(htail : tail = [] \/ exists marker rest,
tail = marker :: rest /\ (marker = 69 \/ marker = 101))
(hbound : i.val + digits.length + tail.length <= UScalar.max .Usize) :
exists (k : Nat) (rest : Slice Std.U8) (i' : Std.Usize)
(a' : Array Std.U8 768#usize) (written : List Std.U8),
num.imp.dec2flt.decimal_seq.parse_decimal_seq_loop3 s i a =
ok (rest, i', a') /\
k <= digits.length /\ k % 8 = 0 /\
rest.val.map (fun b => b.val) =
(digits.drop k).map (fun z => 48 + z) ++ tail /\
i'.val = i.val + k /\ written.length = k /\
written.map (fun b => b.val) = digits.take k /\
a'.val = a.val.take i.val ++ written ++ a.val.drop (i.val + k) := by
-- BODY
let Inv := fun p : Slice Std.U8 × Std.Usize × Array Std.U8 768#usize =>
exists (k : Nat) (written : List Std.U8),
k <= digits.length /\ k % 8 = 0 /\
p.1.val.map (fun b => b.val) =
(digits.drop k).map (fun z => 48 + z) ++ tail /\
p.2.1.val = i.val + k /\ written.length = k /\
written.map (fun b => b.val) = digits.take k /\
p.2.2.val = a.val.take i.val ++ written ++ a.val.drop (i.val + k)
have hloop : Aeneas.Std.WP.spec
(num.imp.dec2flt.decimal_seq.parse_decimal_seq_loop3 s i a) Inv := by
unfold num.imp.dec2flt.decimal_seq.parse_decimal_seq_loop3
apply Aeneas.Std.loop.spec_decr_nat
(fun p : Slice Std.U8 × Std.Usize × Array Std.U8 768#usize =>
p.1.val.length)
Inv Inv
(fun p => num.imp.dec2flt.decimal_seq.parse_decimal_seq_loop3.body
p.1 p.2.1 p.2.2) (s, i, a)
· intro p hp
rcases p with ⟨u, j, arr⟩
rcases hp with ⟨k, prior, hk, hkmod, hu, hj, hpriorLen,
hpriorVals, harr⟩
simp only [Prod.fst, Prod.snd] at hu hj harr ⊢
have hulen : u.val.length = (digits.length - k) + tail.length := by
have := congrArg List.length hu
simp at this
omega
by_cases hremain : 8 <= digits.length - k
· by_cases hguard : j.val + 8 < 768
· have hu8 : 8 <= u.val.length := by omega
have htakeVals : (u.val.take 8).map (fun b => b.val) =
((digits.drop k).take 8).map (fun z => 48 + z) := by
have ht := congrArg (List.take 8) hu
simpa [List.map_take, List.take_append, hremain] using ht
have hfirst : forall (q : Nat) (hq : q < 8),
48 <= (u.val[q]'(by omega)).val /\
(u.val[q]'(by omega)).val <= 57 := by
intro q hq
have hbmem : u.val[q]'(by omega) ∈ u.val.take 8 := by
rw [List.mem_take_iff_getElem]
exact ⟨q, by simp; omega, rfl⟩
have hvmem : (u.val[q]'(by omega)).val ∈
(u.val.take 8).map (fun b => b.val) :=
List.mem_map.mpr ⟨_, hbmem, rfl⟩
rw [htakeVals] at hvmem
rcases List.mem_map.mp hvmem with ⟨z, hz, hzval⟩
have hzdrop : z ∈ digits.drop k := List.mem_of_mem_take hz
have hzdigits : z ∈ digits := List.mem_of_mem_drop hzdrop
have hz' := hdigits z hzdigits
omega
obtain ⟨u', j', arr', block, hbody, hu', hj', hblockLen,
hblockVals, harr'⟩ :=
DecimalSeqBulkStepExact u j arr hu8 hguard hfirst
rw [hbody]
simp only [WP.spec_ok]
refine ⟨?_, ?_⟩
· refine ⟨k + 8, prior ++ block, ?_, ?_, ?_, ?_, ?_, ?_, ?_⟩
· omega
· omega
· rw [hu']
have hdrop := congrArg (List.drop 8) hu
rw [List.map_drop] at hdrop
have hmaplen : 8 <=
((digits.map (fun z => 48 + z)).drop k).length := by
simp
exact hremain
rw [List.drop_append_of_le_length hmaplen] at hdrop
simpa [List.drop_drop, Nat.add_comm, Nat.add_left_comm,
Nat.add_assoc] using hdrop
· rw [hj', hj]
omega
· simp [hpriorLen, hblockLen]
· rw [List.map_append, hpriorVals, hblockVals]
have hblockDigits :
(u.val.take 8).map (fun b => b.val - 48) =
(digits.drop k).take 8 := by
calc
(u.val.take 8).map (fun b => b.val - 48) =
((u.val.take 8).map (fun b => b.val)).map
(fun z => z - 48) := by
rw [List.map_map]
rfl
_ = (((digits.drop k).take 8).map
(fun z => 48 + z)).map (fun z => z - 48) := by
rw [htakeVals]
_ = (digits.drop k).take 8 := by
rw [List.map_map]
calc
List.map ((fun z => z - 48) ∘ fun z => 48 + z)
((digits.drop k).take 8) =
List.map id ((digits.drop k).take 8) := by
apply List.map_congr_left
intro z hz
have hzdrop : z ∈ digits.drop k :=
List.mem_of_mem_take hz
have hz' := hdigits z (List.mem_of_mem_drop hzdrop)
simp only [Function.comp_apply, id_eq]
omega
_ = (digits.drop k).take 8 := List.map_id _
rw [hblockDigits, ← List.take_add]
· rw [harr']
have hkarr : i.val + k <= arr.val.length := by
rw [arr.property]
change i.val + k <= 768
rw [← hj]
omega
have hi768 : i.val <= 768 := by
rw [arr.property] at hkarr
omega
have hik : i.val + k = j.val := hj.symm
have hsum : i.val + k + 8 <= a.val.length := by
rw [a.property]
change i.val + k + 8 <= 768
rw [hik]
omega
have hprefixLen :
(a.val.take i.val ++ prior).length = i.val + k := by
simp [hi768, hpriorLen]
have harrAssoc : arr.val =
(a.val.take i.val ++ prior) ++ a.val.drop (i.val + k) := by
simpa [List.append_assoc] using harr
rw [harrAssoc, ← hik]
have htakePrefix :
((a.val.take i.val ++ prior) ++
a.val.drop (i.val + k)).take (i.val + k) =
a.val.take i.val ++ prior := by
rw [List.take_append_of_le_length]
· simp [hprefixLen]
· omega
have hdropSuffix :
((a.val.take i.val ++ prior) ++
a.val.drop (i.val + k)).drop (i.val + k + 8) =
a.val.drop (i.val + k + 8) := by
rw [List.drop_append, hprefixLen]
simp [List.drop_drop, Nat.add_assoc, hi768, hpriorLen]
rw [htakePrefix, hdropSuffix]
simp [Nat.add_assoc, List.append_assoc]
· rw [hu']
simp [hulen]
omega
· obtain ⟨j8, hj8, hj8val⟩ := Aeneas.Std.WP.spec_imp_exists
(UScalar.add_spec (x := j) (y := 8#usize) (by
have hk8 : k + 8 <= digits.length := by omega
change j.val + 8 <= UScalar.max .Usize
rw [hj]
omega))
unfold num.imp.dec2flt.decimal_seq.parse_decimal_seq_loop3.body
have hu8 : 8 <= u.val.length := by omega
simp [hu8, hj8, hj8val,
num.imp.dec2flt.decimal_seq.DecimalSeq.MAX_DIGITS.eq_def,
hguard, WP.spec_ok]
exact ⟨k, prior, hk, hkmod, hu, hj, hpriorLen,
hpriorVals, harr⟩
· by_cases hu8 : 8 <= u.val.length
· obtain ⟨j8, hj8, hj8val⟩ := Aeneas.Std.WP.spec_imp_exists
(UScalar.add_spec (x := j) (y := 8#usize) (by
have hju : j.val + u.val.length <=
UScalar.max .Usize := by
rw [hj, hulen]
omega
change j.val + 8 <= UScalar.max .Usize
omega))
change j8.val = j.val + 8 at hj8val
by_cases hguard : j.val + 8 < 768
· rcases htail with hnil | ⟨marker, suffix, htailEq, hmarker⟩
· rw [hnil] at hulen
simp at hulen
omega
· have hmixed : u.val.map (fun b => b.val) =
(digits.drop k).map (fun z => 48 + z) ++ marker :: suffix := by
simpa [htailEq] using hu
have hdone := DecimalSeqBulkMixedStop u j arr (digits.drop k)
marker suffix hmixed
(fun z hz => hdigits z (List.mem_of_mem_drop hz))
(by simp; omega) hu8 hmarker hguard
rw [hdone]
simp [WP.spec_ok]
exact ⟨k, prior, hk, hkmod, hu, hj, hpriorLen,
hpriorVals, harr⟩
· unfold num.imp.dec2flt.decimal_seq.parse_decimal_seq_loop3.body
simp [hu8, hj8, hj8val,
num.imp.dec2flt.decimal_seq.DecimalSeq.MAX_DIGITS.eq_def,
hguard, WP.spec_ok]
exact ⟨k, prior, hk, hkmod, hu, hj, hpriorLen,
hpriorVals, harr⟩
· unfold num.imp.dec2flt.decimal_seq.parse_decimal_seq_loop3.body
simp [hu8, WP.spec_ok]
exact ⟨k, prior, hk, hkmod, hu, hj, hpriorLen,
hpriorVals, harr⟩
· refine ⟨0, [], by simp, by simp, ?_, by simp, by simp, by simp, ?_⟩
· simpa using hs
· simp
obtain ⟨p, hp, k, written, hk, hkmod, hrest, hi', hwrittenLen,
hwrittenVals, ha'⟩ := Aeneas.Std.WP.spec_imp_exists hloop
rcases p with ⟨rest, i', a'⟩
exact ⟨k, rest, i', a', written, hp, hk, hkmod, hrest, hi',
hwrittenLen, hwrittenVals, ha'⟩
end dec2flt_model
Proof structure
Follow the declared dependencies to read the supporting statements and proofs.
Inspect related source (77)
- 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
More program dependencies (44)
- 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
- read_u64 · dec2flt/common.rs:18 Program Rust
- write_u64 · dec2flt/common.rs:25 Program Rust
- is_8digits · dec2flt/common.rs:40 Program Rust
- DecimalSeq · dec2flt/decimal_seq.rs:21 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
- 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
- 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:52 Program Rust
- ByteSlice · dec2flt/common.rs:4 Program Rust
- Decimal · dec2flt/decimal.rs:32 Program Rust
- try_add_digit · dec2flt/decimal_seq.rs:73 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
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
- 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
- DecimalSeqBulkLaneSubtraction
- DecimalSeqBulkLoopExact
- DecimalSeqBulkMixedStop
- DecimalSeqBulkStepExact
- DecimalSeqLittleEndianLane
- DecimalSeqWriteU64Exact
All 21 entries
- DecimalSeqBulkLaneSubtraction
- DecimalSeqBulkLoopExact
- DecimalSeqBulkMixedStop
- DecimalSeqBulkStepExact
- DecimalSeqLittleEndianLane
- DecimalSeqWriteU64Exact
- NumberHelperEightDigitWord
- NumberHelperEightDigitWordAccepted
- NumberHelperReadEightBytes
- SliceU8 Insts Dec2flt modelNumImpDec2fltCommonByteSlice read u64
- SliceU8 Insts Dec2flt modelNumImpDec2fltCommonByteSlice write u64
- num imp dec2flt common is 8digits
- num imp dec2flt decimal seq DecimalSeq
- 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 try add digit
- num imp dec2flt decimal seq count trailing zeros
- 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
Technical checking records
Local closure summary
{
"node": "DecimalSeqBulkLoopExact",
"closure_version": "patch_c_v1",
"active_decl_hash": "ef0cb94bafb7d55b18b56eb6767097d64e94e14290bc6a90323b32eb1205cdb0",
"active_statement_hash": "30af9b8b1d7b111ab796f58f243c935f1001cdefc4d66878573e3e447be30acd",
"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": "worker-result-local-closure-issuance-cycle-167",
"boundary_theorems": {},
"strict_theorem_deps": {
"DecimalSeqBulkMixedStop": "5df744c061bc543f",
"DecimalSeqBulkStepExact": "0002562057446604",
"num_imp_dec2flt_decimal_seq_DecimalSeq_MAX_DIGITS": "0eb6fb2627d0ff5c",
"num_imp_dec2flt_decimal_seq_parse_decimal_seq": "effb8a26907859a5"
},
"strict_definition_deps": {
"SliceU8_Insts_Dec2flt_modelNumImpDec2fltCommonByteSlice_read_u64": "279b0c1cd8ec9e39",
"SliceU8_Insts_Dec2flt_modelNumImpDec2fltCommonByteSlice_write_u64": "7bfa0dbe8c4d23de",
"num_imp_dec2flt_common_is_8digits": "53e9de5212d69bf5",
"num_imp_dec2flt_decimal_seq_DecimalSeq_MAX_DIGITS": "39f6cb231ef80388",
"num_imp_dec2flt_decimal_seq_parse_decimal_seq": "da95d2d9e37f0c9d"
}
}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:dd7715e4a66c86bc084bfd45ae5849f999b58da478468e12a549a09f4a038b82",
"superseded_for_theorem_closure": false
}Review verdicts
{
"corr_status": "Pass",
"substantiveness_status": "Pass"
}