DecimalSeqBulkLoopExact

Lean checked

Statement

This explanation was written alongside the formalization to describe the statement and its reasoning.

Helper · Exact maximal eight-byte bulk scan

Let a slice render a decimal digit list D followed either by no residual bytes or by an uppercase or lowercase exponent marker and a residual suffix. Assume every member of D is below ten and that the initial index plus the lengths of D and the residual is Usize-representable. The extracted bulk loop returns after consuming some k\le|D| with 8\mid k. Its residual slice renders 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
\operatorname{take}(i,a)\mathbin{++}W\mathbin{++} \operatorname{drop}(i+k,a).

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

Induct over the extracted loop in num imp dec2flt decimal seq parse decimal seq, decreasing the residual slice length. Maintain the claimed state with the amount k already consumed and an exact written list W. It holds initially with k=0 and W=[].
If at least eight digits remain and the array guard is true, map equality identifies the first eight residual bytes as ASCII digits. Apply DecimalSeqBulkStepExact. The new source is dropped by eight, the index advances by eight, and its exact eight-byte block appends to W. The take-add and drop-add identities give the digit prefix for k+8; explicit list take/drop reassociation gives the parent-array formula with suffix drop (i+k+8) a. The source length decreases by eight. If the guard is false, the body returns the invariant state unchanged.
If fewer than eight digits remain and the whole slice has fewer than eight bytes, the body stops immediately. If the slice still has eight bytes, the residual cannot be empty; its first nondigit is the exponent marker. When the array guard holds, DecimalSeqBulkMixedStop proves from that actual mixed block that 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.

Explore this dependency tree

Inspect related source (77)
More program dependencies (44)
Standard-library dependencies (30)

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

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
All 21 entries
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"
}