P804_T1_RightLoopStep

Lean checked

Statement

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

Helper · Quantitative step of slow normalization loop zero

Let the retained digits of d form a list of length d.\mathit{num\_digits}, all below ten, with positive leading digit, and with d.\mathit{num\_digits}\leq768. Write I for their base-ten fold and
V=I10^{p-d.\mathit{num\_digits}}, \qquad p=d.\mathit{decimal\_point}.
Suppose 1\leq p<310, 0\leq e\leq1260, and there are real numbers \eta,u such that
X=V+\eta,\qquad Y=V+u,\qquad 0\leq\eta<u,\qquad (d.\mathit{truncated}=\mathsf{true}\iff0<\eta). \tag{E}
Then there are a selected shift k, returned record d', exponent e', and prefix witnesses such that one iteration of the first extracted slow-loop body returns the normal continuation (d',e',\mathsf{none}), the extracted right-shift call by k returns d', k\leq60, and e'=e+k.
The output retained digits again have length d'.\mathit{num\_digits}, are all below ten, begin positively, and number at most 768. If I' is their base-ten fold and
V'=I'10^{p'-d'.\mathit{num\_digits}}, \qquad p'=d'.\mathit{decimal\_point},
then there are real numbers \eta',u' satisfying the corresponding continuation endpoint equations
X/2^k=V'+\eta',\qquad Y/2^k=V'+u',\qquad 0\leq\eta'<u',\qquad (d'.\mathit{truncated}=\mathsf{true}\iff0<\eta'). \tag{E'}
Quantitatively, if p\geq19, then p'=p-18 or p'=p-19; if p\leq18, then p'=0 or p'=1. In the only possible stall p=p'=1, the leading digit of d' is exactly one; conversely, if the input at point one already has leading digit one, then the successor point is zero.

Lean statement

Trellis authored these statements and proofs. Lean checks the formal proofs; the assumptions used by each proof are listed below.

import Tablet.DecimalSeqRightShiftCanonical
import Tablet.DecimalSeqRightShiftRecordSemantics
import Tablet.DecimalRightShiftLoop0Execution
import Tablet.DecimalRightShiftPrefixLoopSemantics
import Tablet.F64_Insts_Dec2flt_modelNumImpTraitsFloatU64
import Tablet.P804_T1_DecimalValueBounds
import Tablet.P804_T1_RightPrefixLengthBounds
import Tablet.SlowShiftSelectorCertificate
import Tablet.num_imp_dec2flt_decimal_seq_DecimalSeq_DECIMAL_POINT_RANGE
import Tablet.num_imp_dec2flt_slow_parse_long_mantissa

open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false

namespace dec2flt_model

-- [TABLET NODE: P804_T1_RightLoopStep]
theorem P804_T1_RightLoopStep
    (X Y : Real) (d : num.imp.dec2flt.decimal_seq.DecimalSeq)
    (exp : Std.I32)
    (hpointLo : 1 <= d.decimal_point.val)
    (hpointHi : d.decimal_point.val < 310)
    (hexpLo : 0 <= exp.val) (hexpHi : exp.val <= 1260)
    (hinput :
      let digits :=
        (d.digits.val.take d.num_digits.val).map (fun q => q.val)
      d.num_digits.val <= 768 /\
      (forall q, q ∈ d.digits.val.take d.num_digits.val -> q.val < 10) /\
      (exists z zs, digits = z :: zs /\ 1 <= z /\ z < 10 /\
        digits.length = d.num_digits.val))
    (hend :
      let digits :=
        (d.digits.val.take d.num_digits.val).map (fun q => q.val)
      let I : Nat := digits.foldl (fun n q => 10 * n + q) 0
      let V : Real := I * (10 : Real) ^
        (d.decimal_point.val - (d.num_digits.val : Int))
      exists eta u : Real, X = V + eta /\ Y = V + u /\
        0 <= eta /\ eta < u /\ (d.truncated = true <-> 0 < eta)) :
    exists (d' : num.imp.dec2flt.decimal_seq.DecimalSeq)
      (shift : Std.Usize) (exp' : Std.I32) (read : Std.Usize)
      (acc : Std.U64),
      num.imp.dec2flt.slow.parse_long_mantissa_loop0.body
        F64.Insts.Dec2flt_modelNumImpTraitsFloatU64
        { m := 0#u64, p_biased := 0#i32 }
        d.num_digits d.decimal_point d.truncated d.digits exp none =
          ok (cont (d'.num_digits, d'.decimal_point, d'.truncated,
            d'.digits, exp', none)) /\
      num.imp.dec2flt.decimal_seq.DecimalSeq.right_shift d shift = ok d' /\
      shift.val <= 60 /\
      exp'.val = exp.val + (shift.val : Int) /\
      (19 <= d.decimal_point.val ->
        d'.decimal_point.val = d.decimal_point.val - 18 \/
        d'.decimal_point.val = d.decimal_point.val - 19) /\
      (d.decimal_point.val <= 18 ->
        d'.decimal_point.val = 0 \/ d'.decimal_point.val = 1) /\
      (let digits' :=
        (d'.digits.val.take d'.num_digits.val).map (fun q => q.val)
       let I' : Nat := digits'.foldl (fun n q => 10 * n + q) 0
       let V' : Real := I' * (10 : Real) ^
         (d'.decimal_point.val - (d'.num_digits.val : Int))
       d'.num_digits.val <= 768 /\
       (forall q, q ∈ d'.digits.val.take d'.num_digits.val -> q.val < 10) /\
       (exists z zs, digits' = z :: zs /\ 1 <= z /\ z < 10 /\
         digits'.length = d'.num_digits.val) /\
       (exists eta' u' : Real,
         X / (2 : Real) ^ shift.val = V' + eta' /\
         Y / (2 : Real) ^ shift.val = V' + u' /\
         0 <= eta' /\ eta' < u' /\
         (d'.truncated = true <-> 0 < eta'))) /\
      (d.decimal_point.val = 1 -> d'.decimal_point.val = 1 ->
        exists zs,
          (d'.digits.val.take d'.num_digits.val).map (fun q => q.val) =
            1 :: zs) /\
      (d.decimal_point.val = 1 ->
        (exists zs,
          (d.digits.val.take d.num_digits.val).map (fun q => q.val) =
            1 :: zs) -> d'.decimal_point.val = 0) := 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

Cast the positive I32 point to Usize. The cast is exact because 1\leq p<310. Apply SlowShiftSelectorCertificate; this fixes the literal selected k, proves its extracted closure-call equation, and gives k\leq60 together with the small-table and fallback power brackets. Apply DecimalRightShiftLoop0Execution. It constructs the complete right-shift call and exposes its prefix-loop cursor r, accumulator C, and point equation
p'=p-r+1. \tag{1}
It also proves the output nonempty and p'\geq-2047.
By RightPrefixLengthBounds,
10^{r-1}\leq C<10^r. \tag{2}
The execution certificate additionally gives 2^k\leq C<10\,2^k. On the fallback branch, 10^{18}<2^{60}<10^{19}; comparison with (2) forces r\in\{19,20\}. Equation (1) therefore gives the two asserted decreases. For 1\leq p\leq18, the selector bracket is 2^k\leq10^p<2^{k+1}. Since 10^p=10\,10^{p-1} and 2^{k+1}=2\,2^k, it implies 10^{p-1}<2^k. Combining these inequalities with (2) forces r\in\{p,p+1\}, so (1) gives p'\in\{1,0\}.
It remains to analyze a stall. Apply DecimalValueBounds to the input and output records. At p=1 the input retained value is less than ten. In the stalled branch the selector has k=3. The exact value clause of DecimalSeqRightShiftRecordSemantics gives
V(d')=V(d)/8-\rho,\qquad \rho\geq0.
Hence V(d')<10/8<2. At p'=1, the output magnitude lower bound is its leading digit itself. That digit is a positive natural below two, so it is exactly one. This proves the one-stall clause.
For the converse, suppose the input point and leading digit are both one and assume a stall. Equation (1) then forces r=1. The retained count is positive, so the within-prefix alternative of DecimalRightShiftPrefixLoopSemantics applies, and its exact fold equation makes C the one-digit fold, namely C=1. But the point-one selector chooses k=3, while the same prefix-loop statement requires 2^3\leq C. This contradiction rules out the stall, leaving p'=0.
Apply DecimalSeqRightShiftCanonical to the successful shift. Its conclusion supplies all output digit, shape, sticky, and endpoint clauses. The extracted reset threshold is -2047 by num imp dec2flt decimal seq DecimalSeq DECIMAL POINT RANGE; the execution bound p'\geq-2047 therefore makes the reset comparison false. The Usize-to-I32 cast of k is exact. Before the update, 0\leq e\leq1260, so e+k is within I32 and the checked addition returns with mathematical value e+k. Substituting the cast, selector, shift, threshold, and addition equations into the unfolded loop body gives exactly the normal continuation asserted in the statement.

Lean proof


  dsimp only at hinput hend
  rcases hinput with ⟨hcap, hdigit, z, zs, hshape, hzLo, hzHi, hlen⟩
  have hlenCons : (z :: zs).length = d.num_digits.val := by
    rw [← hshape]
    exact hlen
  let n : Std.Usize := IScalar.hcast .Usize d.decimal_point
  have hnVal' : (n.val : Int) = d.decimal_point.val := by
    have hs := IScalar.hcast_inBounds_spec .Usize d.decimal_point (by
      scalar_tac)
    simpa [n, lift, WP.spec_ok] using hs
  let shift : Std.Usize := match n.val with
    | 0 => 0#usize | 1 => 3#usize | 2 => 6#usize | 3 => 9#usize
    | 4 => 13#usize | 5 => 16#usize | 6 => 19#usize | 7 => 23#usize
    | 8 => 26#usize | 9 => 29#usize | 10 => 33#usize | 11 => 36#usize
    | 12 => 39#usize | 13 => 43#usize | 14 => 46#usize | 15 => 49#usize
    | 16 => 53#usize | 17 => 56#usize | 18 => 59#usize | _ => 60#usize
  have hsel := SlowShiftSelectorCertificate
    F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 n
  change
    num.imp.dec2flt.slow.parse_long_mantissa.closure.Insts.CoreOpsFunctionFnTupleUsizeUsize.call
      F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 () n = ok shift /\
    shift.val <= 60 /\
    (n.val = 0 -> shift.val = 0) /\
    (1 <= n.val -> n.val <= 18 ->
      2 ^ shift.val <= 10 ^ n.val /\ 10 ^ n.val < 2 ^ (shift.val + 1)) /\
    (19 <= n.val -> shift.val = 60 /\
      10 ^ 18 < 2 ^ 60 /\ 2 ^ 60 < 10 ^ 19) at hsel
  rcases hsel with ⟨hselector, hshift, hzero, hsmall, hlarge⟩
  obtain ⟨read, acc, d', hpref, hreadLo, hreadHi, haccLo, haccHi,
      hprosLo, hprosHi, hright, hpoint, hnonzero⟩ :=
    DecimalRightShiftLoop0Execution d shift hshift (by omega) hpointHi
      ⟨hcap, hdigit, z, zs, hshape, hzLo, hzHi, hlenCons⟩
  have hprefix := P804_T1_RightPrefixLengthBounds d d shift read acc false
    hshift hcap hdigit z zs hshape hzLo hlenCons hpref
  have hprogressLarge : 19 <= d.decimal_point.val ->
      d'.decimal_point.val = d.decimal_point.val - 18 \/
      d'.decimal_point.val = d.decimal_point.val - 19 := by
    intro hp
    have hn19 : 19 <= n.val := by omega
    obtain ⟨hk, hp18, hp19⟩ := hlarge hn19
    have hr : read.val = 19 \/ read.val = 20 := by
      rw [hk] at haccLo haccHi
      norm_num at hp18 hp19 haccLo haccHi
      rcases hprefix with ⟨hrlo, hrhi⟩
      by_contra hnot
      have hc : read.val <= 18 \/ 21 <= read.val := by omega
      rcases hc with hc | hc
      · have hpwr : 10 ^ read.val <= 10 ^ 18 :=
          Nat.pow_le_pow_right (by omega) (by omega)
        omega
      · have hpwr : 10 ^ 20 <= 10 ^ (read.val - 1) :=
          Nat.pow_le_pow_right (by omega) (by omega)
        omega
    rw [hpoint]
    rcases hr with hr | hr <;> omega
  have hprogressSmall : d.decimal_point.val <= 18 ->
      d'.decimal_point.val = 0 \/ d'.decimal_point.val = 1 := by
    intro hp
    have hn1 : 1 <= n.val := by omega
    have hn18 : n.val <= 18 := by omega
    obtain ⟨hpowLo, hpowHi⟩ := hsmall hn1 hn18
    have hten : 10 ^ (n.val - 1) < 2 ^ shift.val := by
      have hpowTen : 10 ^ n.val = 10 ^ (n.val - 1) * 10 := by
        calc
          10 ^ n.val = 10 ^ ((n.val - 1) + 1) := by congr 1 <;> omega
          _ = 10 ^ (n.val - 1) * 10 := by rw [pow_succ]
      have hpowTwo : 2 ^ (shift.val + 1) = 2 ^ shift.val * 2 := by
        rw [pow_succ]
      rw [hpowTen] at hpowHi
      rw [hpowTwo] at hpowHi
      nlinarith [pow_pos (by omega : 0 < 10) (n.val - 1)]
    have hr : read.val = n.val \/ read.val = n.val + 1 := by
      rcases hprefix with ⟨hrlo, hrhi⟩
      by_contra hnot
      have hc : read.val < n.val \/ n.val + 1 < read.val := by omega
      rcases hc with hc | hc
      · have hpwr : 10 ^ read.val <= 10 ^ (n.val - 1) :=
          Nat.pow_le_pow_right (by omega) (by omega)
        omega
      · have hpwr : 10 ^ (n.val + 1) <= 10 ^ read.val :=
          Nat.pow_le_pow_right (by omega) (by omega)
        have hpwr' : 10 ^ (n.val + 1) <= 10 ^ (read.val - 1) :=
          Nat.pow_le_pow_right (by omega) (by omega)
        have haccUpper : acc.val < 10 ^ (n.val + 1) := by
          calc
            acc.val < 10 * 2 ^ shift.val := haccHi
            _ <= 10 * 10 ^ n.val := Nat.mul_le_mul_left 10 hpowLo
            _ = 10 ^ (n.val + 1) := by rw [pow_succ]; ring
        omega
    rw [hpoint]
    rcases hr with hr | hr <;> omega
  have hcanon := DecimalSeqRightShiftCanonical d d' shift X Y
    ⟨hcap, hdigit, z, zs, hshape, hzLo, hzHi, hlen⟩ hend hshift hright hnonzero
  dsimp only at hcanon
  rcases hcanon with ⟨hcap', hdigit', hshape', hend', hpointLower⟩
  rcases hshape' with ⟨z', zs', hshape', hz'Lo, hz'Hi, hlen', hlast'⟩
  have hstall : d.decimal_point.val = 1 -> d'.decimal_point.val = 1 ->
      exists tail,
        (d'.digits.val.take d'.num_digits.val).map (fun q => q.val) =
          1 :: tail := by
    intro hp hp'
    have hinBounds := P804_T1_DecimalValueBounds
      ((d.digits.val.take d.num_digits.val).map (fun q => q.val))
      z zs hshape hzLo (by
        intro q hq
        simp only [List.mem_map] at hq
        rcases hq with ⟨u, hu, rfl⟩
        exact hdigit u hu) d.decimal_point.val
    have houtBounds := P804_T1_DecimalValueBounds
      ((d'.digits.val.take d'.num_digits.val).map (fun q => q.val))
      z' zs' hshape' hz'Lo (by
        intro q hq
        simp only [List.mem_map] at hq
        rcases hq with ⟨u, hu, rfl⟩
        exact hdigit' u hu) d'.decimal_point.val
    dsimp only at hinBounds houtBounds
    rw [hlen] at hinBounds
    rw [hlen'] at houtBounds
    have hinLower :
        (z : Real) * (10 : Real) ^ (d.decimal_point.val - 1) <=
          (((d.digits.val.take d.num_digits.val).map (fun q => q.val)).foldl
            (fun a q => 10 * a + q) 0 : Nat) * (10 : Real) ^
              (d.decimal_point.val - (d.num_digits.val : Int)) := by
      exact hinBounds.1
    have hvaluePos : 0 <
        (((d.digits.val.take d.num_digits.val).map (fun q => q.val)).foldl
          (fun a q => 10 * a + q) 0 : Nat) * (10 : Real) ^
            (d.decimal_point.val - (d.num_digits.val : Int)) := by
      have hzpos : (0 : Real) < z := by exact_mod_cast (by omega : 0 < z)
      have hpw : 0 < (10 : Real) ^ (d.decimal_point.val - 1) :=
        zpow_pos (by norm_num) _
      exact lt_of_lt_of_le (mul_pos hzpos hpw) hinLower
    have hrecord := DecimalSeqRightShiftRecordSemantics d d' shift hshift
      hvaluePos
      hdigit hright
    rcases hrecord with hreset | ⟨rho, hrho0, hrhoCut, hvalue, hsticky⟩
    · omega
    · have hk : shift.val = 3 := by
        have hn : n.val = 1 := by omega
        simp [shift, hn]
      have hvin :
          (((d.digits.val.take d.num_digits.val).map (fun q => q.val)).foldl
              (fun a q => 10 * a + q) 0 : Nat) *
              (10 : Real) ^
                (d.decimal_point.val - (d.num_digits.val : Int)) < 10 := by
        simpa [hp] using hinBounds.2
      have hvoutlt :
          (((d'.digits.val.take d'.num_digits.val).map (fun q => q.val)).foldl
              (fun a q => 10 * a + q) 0 : Nat) *
              (10 : Real) ^
                (d'.decimal_point.val - (d'.num_digits.val : Int)) < 2 := by
        change
          (((d'.digits.val.take d'.num_digits.val).map (fun q => q.val)).foldl
              (fun a q => 10 * a + q) 0 : Nat) * (10 : Real) ^
                (d'.decimal_point.val - (d'.num_digits.val : Int)) =
            (((d.digits.val.take d.num_digits.val).map (fun q => q.val)).foldl
                (fun a q => 10 * a + q) 0 : Nat) * (10 : Real) ^
                  (d.decimal_point.val - (d.num_digits.val : Int)) /
                (2 : Real) ^ shift.val - rho at hvalue
        calc
          (((d'.digits.val.take d'.num_digits.val).map (fun q => q.val)).foldl
              (fun a q => 10 * a + q) 0 : Nat) * (10 : Real) ^
                (d'.decimal_point.val - (d'.num_digits.val : Int)) =
              (((d.digits.val.take d.num_digits.val).map (fun q => q.val)).foldl
                (fun a q => 10 * a + q) 0 : Nat) * (10 : Real) ^
                  (d.decimal_point.val - (d.num_digits.val : Int)) /
                (2 : Real) ^ shift.val - rho := hvalue
          _ <= (((d.digits.val.take d.num_digits.val).map (fun q => q.val)).foldl
                (fun a q => 10 * a + q) 0 : Nat) * (10 : Real) ^
                  (d.decimal_point.val - (d.num_digits.val : Int)) / 8 := by
              rw [hk]
              norm_num
              linarith
          _ < 2 := by nlinarith
      have hz'lt : (z' : Real) < 2 := by
        have hlo : (z' : Real) * (10 : Real) ^
              (d'.decimal_point.val - 1) <=
            (((d'.digits.val.take d'.num_digits.val).map
              (fun q => q.val)).foldl (fun a q => 10 * a + q) 0 : Nat) *
              (10 : Real) ^
                (d'.decimal_point.val - (d'.num_digits.val : Int)) := by
          exact houtBounds.1
        norm_num [hp'] at hlo
        have hvoutlt' :
            (((d'.digits.val.map (fun q => q.val)).take d'.num_digits.val).foldl
                (fun a q => 10 * a + q) 0 : Nat) * (10 : Real) ^
                  (1 - (d'.num_digits.val : Int)) < 2 := by
          simpa [List.map_take, hp'] using hvoutlt
        exact lt_of_le_of_lt hlo hvoutlt'
      have hz'eq : z' = 1 := by
        have hz'ltNat : z' < 2 := by exact_mod_cast hz'lt
        omega
      exact ⟨zs', by simpa [hz'eq] using hshape'⟩
  have hnoStallOne : d.decimal_point.val = 1 ->
      (exists tail,
        (d.digits.val.take d.num_digits.val).map (fun q => q.val) =
          1 :: tail) -> d'.decimal_point.val = 0 := by
    intro hp hhead
    rcases hprogressSmall (by omega) with hp0 | hp1
    · exact hp0
    · exfalso
      have hreadOne : read.val = 1 := by
        rw [hpoint] at hp1
        omega
      rcases hhead with ⟨tail, hhead⟩
      have hzOne : z = 1 := by
        rw [hshape] at hhead
        exact List.cons.inj hhead |>.1
      have hnOne : n.val = 1 := by omega
      have hk : shift.val = 3 := by simp [shift, hnOne]
      have hprefSem := DecimalRightShiftPrefixLoopSemantics
        d d shift read acc false hshift (by
          have hb := P804_T1_DecimalFoldBounds
            ((d.digits.val.take d.num_digits.val).map (fun q => q.val))
            (by
              intro q hq
              simp only [List.mem_map] at hq
              rcases hq with ⟨u, hu, rfl⟩
              exact hdigit u hu)
            z zs hshape hzLo
          have hpw : 0 < 10 ^
              (((d.digits.val.take d.num_digits.val).map
                (fun q => q.val)).length - 1) := by positivity
          omega) hdigit hpref
      dsimp only at hprefSem
      rcases hprefSem with ⟨_, _, _, _, _, hphase⟩
      rcases hphase with hwithin | hextend
      · rcases hwithin with ⟨_, _, hacc⟩
        have hfoldOne :
            ((d.digits.val.map (fun q => q.val)).take read.val).foldl
              (fun a q => 10 * a + q) 0 = 1 := by
          rw [hreadOne]
          have hfull :
              (d.digits.val.map (fun q => q.val)).take d.num_digits.val =
                z :: zs := by
            simpa [List.map_take] using hshape
          have hnpos : 1 <= d.num_digits.val := by
            rw [← hlenCons]
            simp
          have hone :
              (d.digits.val.map (fun q => q.val)).take 1 = [z] := by
            have ht :
                ((d.digits.val.map (fun q => q.val)).take
                  d.num_digits.val).take 1 = [z] := by simp [hfull]
            simpa [List.take_take, Nat.min_eq_left hnpos] using ht
          rw [hone, hzOne]
          decide
        rw [hacc, hfoldOne, hk] at haccLo
        norm_num at haccLo
      · rcases hextend with ⟨hnread, _, _, _⟩
        have hnpos : 1 <= d.num_digits.val := by
          rw [← hlenCons]
          simp
        omega
  have hnegRange :
      (-. num.imp.dec2flt.decimal_seq.DecimalSeq.DECIMAL_POINT_RANGE) =
        ok ((-2047)#i32) := by
    unfold num.imp.dec2flt.decimal_seq.DecimalSeq.DECIMAL_POINT_RANGE
    change IScalar.neg (2047#i32 : Std.I32) = _
    unfold IScalar.neg IScalar.tryMk IScalar.tryMkOpt
    norm_num [IScalar.check_bounds, IScalarTy.numBits]
  have hshiftCast : (UScalar.hcast .I32 shift).val = (shift.val : Int) := by
    have hs := UScalar.hcast_inBounds_spec .I32 shift (by
      rw [IScalar.max_I32_eq]
      omega)
    simpa [lift, WP.spec_ok] using hs
  let shiftI : Std.I32 := UScalar.hcast .I32 shift
  have hshiftIVal : shiftI.val = (shift.val : Int) := by
    simpa [shiftI] using hshiftCast
  have haddBounds : IScalar.min .I32 <= exp.val + shiftI.val /\
      exp.val + shiftI.val <= IScalar.max .I32 := by
    rw [hshiftIVal]
    constructor
    · rw [IScalar.min_I32_eq]
      omega
    · rw [IScalar.max_I32_eq]
      omega
  obtain ⟨exp', hexpAdd, hexpVal⟩ := Aeneas.Std.WP.spec_imp_exists
    (IScalar.add_spec haddBounds.1 haddBounds.2)
  have hexpVal' : exp'.val = exp.val + (shift.val : Int) := by
    rw [hexpVal, hshiftCast]
  refine ⟨d', shift, exp', read, acc, ?_, hright, hshift, hexpVal',
    hprogressLarge, hprogressSmall, ?_, hstall, hnoStallOne⟩
  · unfold num.imp.dec2flt.slow.parse_long_mantissa_loop0.body
    have hpgt : d.decimal_point > 0#i32 := by
      change d.decimal_point.val > 0
      omega
    simp only [hpgt, if_true, core.option.Option.is_none, lift]
    rw [show IScalar.hcast .Usize d.decimal_point = n by rfl]
    simp only [bind_tc_ok, hselector, hright, hnegRange]
    have hnotReset : ¬ d'.decimal_point < (-2047)#i32 := by
      change ¬ d'.decimal_point.val < -2047
      rw [hpoint]
      omega
    simp only [hnotReset, if_false]
    rw [show UScalar.hcast .I32 shift = shiftI by rfl]
    simp only [bind_tc_ok, hexpAdd]
    simp
  · exact ⟨hcap', hdigit', ⟨z', zs', hshape', hz'Lo, hz'Hi, hlen'⟩, hend'⟩

end dec2flt_model

Download Lean source · Download TeX source

Complete Lean module
import Tablet.DecimalSeqRightShiftCanonical
import Tablet.DecimalSeqRightShiftRecordSemantics
import Tablet.DecimalRightShiftLoop0Execution
import Tablet.DecimalRightShiftPrefixLoopSemantics
import Tablet.F64_Insts_Dec2flt_modelNumImpTraitsFloatU64
import Tablet.P804_T1_DecimalValueBounds
import Tablet.P804_T1_RightPrefixLengthBounds
import Tablet.SlowShiftSelectorCertificate
import Tablet.num_imp_dec2flt_decimal_seq_DecimalSeq_DECIMAL_POINT_RANGE
import Tablet.num_imp_dec2flt_slow_parse_long_mantissa

open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false

namespace dec2flt_model

-- [TABLET NODE: P804_T1_RightLoopStep]
theorem P804_T1_RightLoopStep
    (X Y : Real) (d : num.imp.dec2flt.decimal_seq.DecimalSeq)
    (exp : Std.I32)
    (hpointLo : 1 <= d.decimal_point.val)
    (hpointHi : d.decimal_point.val < 310)
    (hexpLo : 0 <= exp.val) (hexpHi : exp.val <= 1260)
    (hinput :
      let digits :=
        (d.digits.val.take d.num_digits.val).map (fun q => q.val)
      d.num_digits.val <= 768 /\
      (forall q, q ∈ d.digits.val.take d.num_digits.val -> q.val < 10) /\
      (exists z zs, digits = z :: zs /\ 1 <= z /\ z < 10 /\
        digits.length = d.num_digits.val))
    (hend :
      let digits :=
        (d.digits.val.take d.num_digits.val).map (fun q => q.val)
      let I : Nat := digits.foldl (fun n q => 10 * n + q) 0
      let V : Real := I * (10 : Real) ^
        (d.decimal_point.val - (d.num_digits.val : Int))
      exists eta u : Real, X = V + eta /\ Y = V + u /\
        0 <= eta /\ eta < u /\ (d.truncated = true <-> 0 < eta)) :
    exists (d' : num.imp.dec2flt.decimal_seq.DecimalSeq)
      (shift : Std.Usize) (exp' : Std.I32) (read : Std.Usize)
      (acc : Std.U64),
      num.imp.dec2flt.slow.parse_long_mantissa_loop0.body
        F64.Insts.Dec2flt_modelNumImpTraitsFloatU64
        { m := 0#u64, p_biased := 0#i32 }
        d.num_digits d.decimal_point d.truncated d.digits exp none =
          ok (cont (d'.num_digits, d'.decimal_point, d'.truncated,
            d'.digits, exp', none)) /\
      num.imp.dec2flt.decimal_seq.DecimalSeq.right_shift d shift = ok d' /\
      shift.val <= 60 /\
      exp'.val = exp.val + (shift.val : Int) /\
      (19 <= d.decimal_point.val ->
        d'.decimal_point.val = d.decimal_point.val - 18 \/
        d'.decimal_point.val = d.decimal_point.val - 19) /\
      (d.decimal_point.val <= 18 ->
        d'.decimal_point.val = 0 \/ d'.decimal_point.val = 1) /\
      (let digits' :=
        (d'.digits.val.take d'.num_digits.val).map (fun q => q.val)
       let I' : Nat := digits'.foldl (fun n q => 10 * n + q) 0
       let V' : Real := I' * (10 : Real) ^
         (d'.decimal_point.val - (d'.num_digits.val : Int))
       d'.num_digits.val <= 768 /\
       (forall q, q ∈ d'.digits.val.take d'.num_digits.val -> q.val < 10) /\
       (exists z zs, digits' = z :: zs /\ 1 <= z /\ z < 10 /\
         digits'.length = d'.num_digits.val) /\
       (exists eta' u' : Real,
         X / (2 : Real) ^ shift.val = V' + eta' /\
         Y / (2 : Real) ^ shift.val = V' + u' /\
         0 <= eta' /\ eta' < u' /\
         (d'.truncated = true <-> 0 < eta'))) /\
      (d.decimal_point.val = 1 -> d'.decimal_point.val = 1 ->
        exists zs,
          (d'.digits.val.take d'.num_digits.val).map (fun q => q.val) =
            1 :: zs) /\
      (d.decimal_point.val = 1 ->
        (exists zs,
          (d.digits.val.take d.num_digits.val).map (fun q => q.val) =
            1 :: zs) -> d'.decimal_point.val = 0) := by
-- BODY
  dsimp only at hinput hend
  rcases hinput with ⟨hcap, hdigit, z, zs, hshape, hzLo, hzHi, hlen⟩
  have hlenCons : (z :: zs).length = d.num_digits.val := by
    rw [← hshape]
    exact hlen
  let n : Std.Usize := IScalar.hcast .Usize d.decimal_point
  have hnVal' : (n.val : Int) = d.decimal_point.val := by
    have hs := IScalar.hcast_inBounds_spec .Usize d.decimal_point (by
      scalar_tac)
    simpa [n, lift, WP.spec_ok] using hs
  let shift : Std.Usize := match n.val with
    | 0 => 0#usize | 1 => 3#usize | 2 => 6#usize | 3 => 9#usize
    | 4 => 13#usize | 5 => 16#usize | 6 => 19#usize | 7 => 23#usize
    | 8 => 26#usize | 9 => 29#usize | 10 => 33#usize | 11 => 36#usize
    | 12 => 39#usize | 13 => 43#usize | 14 => 46#usize | 15 => 49#usize
    | 16 => 53#usize | 17 => 56#usize | 18 => 59#usize | _ => 60#usize
  have hsel := SlowShiftSelectorCertificate
    F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 n
  change
    num.imp.dec2flt.slow.parse_long_mantissa.closure.Insts.CoreOpsFunctionFnTupleUsizeUsize.call
      F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 () n = ok shift /\
    shift.val <= 60 /\
    (n.val = 0 -> shift.val = 0) /\
    (1 <= n.val -> n.val <= 18 ->
      2 ^ shift.val <= 10 ^ n.val /\ 10 ^ n.val < 2 ^ (shift.val + 1)) /\
    (19 <= n.val -> shift.val = 60 /\
      10 ^ 18 < 2 ^ 60 /\ 2 ^ 60 < 10 ^ 19) at hsel
  rcases hsel with ⟨hselector, hshift, hzero, hsmall, hlarge⟩
  obtain ⟨read, acc, d', hpref, hreadLo, hreadHi, haccLo, haccHi,
      hprosLo, hprosHi, hright, hpoint, hnonzero⟩ :=
    DecimalRightShiftLoop0Execution d shift hshift (by omega) hpointHi
      ⟨hcap, hdigit, z, zs, hshape, hzLo, hzHi, hlenCons⟩
  have hprefix := P804_T1_RightPrefixLengthBounds d d shift read acc false
    hshift hcap hdigit z zs hshape hzLo hlenCons hpref
  have hprogressLarge : 19 <= d.decimal_point.val ->
      d'.decimal_point.val = d.decimal_point.val - 18 \/
      d'.decimal_point.val = d.decimal_point.val - 19 := by
    intro hp
    have hn19 : 19 <= n.val := by omega
    obtain ⟨hk, hp18, hp19⟩ := hlarge hn19
    have hr : read.val = 19 \/ read.val = 20 := by
      rw [hk] at haccLo haccHi
      norm_num at hp18 hp19 haccLo haccHi
      rcases hprefix with ⟨hrlo, hrhi⟩
      by_contra hnot
      have hc : read.val <= 18 \/ 21 <= read.val := by omega
      rcases hc with hc | hc
      · have hpwr : 10 ^ read.val <= 10 ^ 18 :=
          Nat.pow_le_pow_right (by omega) (by omega)
        omega
      · have hpwr : 10 ^ 20 <= 10 ^ (read.val - 1) :=
          Nat.pow_le_pow_right (by omega) (by omega)
        omega
    rw [hpoint]
    rcases hr with hr | hr <;> omega
  have hprogressSmall : d.decimal_point.val <= 18 ->
      d'.decimal_point.val = 0 \/ d'.decimal_point.val = 1 := by
    intro hp
    have hn1 : 1 <= n.val := by omega
    have hn18 : n.val <= 18 := by omega
    obtain ⟨hpowLo, hpowHi⟩ := hsmall hn1 hn18
    have hten : 10 ^ (n.val - 1) < 2 ^ shift.val := by
      have hpowTen : 10 ^ n.val = 10 ^ (n.val - 1) * 10 := by
        calc
          10 ^ n.val = 10 ^ ((n.val - 1) + 1) := by congr 1 <;> omega
          _ = 10 ^ (n.val - 1) * 10 := by rw [pow_succ]
      have hpowTwo : 2 ^ (shift.val + 1) = 2 ^ shift.val * 2 := by
        rw [pow_succ]
      rw [hpowTen] at hpowHi
      rw [hpowTwo] at hpowHi
      nlinarith [pow_pos (by omega : 0 < 10) (n.val - 1)]
    have hr : read.val = n.val \/ read.val = n.val + 1 := by
      rcases hprefix with ⟨hrlo, hrhi⟩
      by_contra hnot
      have hc : read.val < n.val \/ n.val + 1 < read.val := by omega
      rcases hc with hc | hc
      · have hpwr : 10 ^ read.val <= 10 ^ (n.val - 1) :=
          Nat.pow_le_pow_right (by omega) (by omega)
        omega
      · have hpwr : 10 ^ (n.val + 1) <= 10 ^ read.val :=
          Nat.pow_le_pow_right (by omega) (by omega)
        have hpwr' : 10 ^ (n.val + 1) <= 10 ^ (read.val - 1) :=
          Nat.pow_le_pow_right (by omega) (by omega)
        have haccUpper : acc.val < 10 ^ (n.val + 1) := by
          calc
            acc.val < 10 * 2 ^ shift.val := haccHi
            _ <= 10 * 10 ^ n.val := Nat.mul_le_mul_left 10 hpowLo
            _ = 10 ^ (n.val + 1) := by rw [pow_succ]; ring
        omega
    rw [hpoint]
    rcases hr with hr | hr <;> omega
  have hcanon := DecimalSeqRightShiftCanonical d d' shift X Y
    ⟨hcap, hdigit, z, zs, hshape, hzLo, hzHi, hlen⟩ hend hshift hright hnonzero
  dsimp only at hcanon
  rcases hcanon with ⟨hcap', hdigit', hshape', hend', hpointLower⟩
  rcases hshape' with ⟨z', zs', hshape', hz'Lo, hz'Hi, hlen', hlast'⟩
  have hstall : d.decimal_point.val = 1 -> d'.decimal_point.val = 1 ->
      exists tail,
        (d'.digits.val.take d'.num_digits.val).map (fun q => q.val) =
          1 :: tail := by
    intro hp hp'
    have hinBounds := P804_T1_DecimalValueBounds
      ((d.digits.val.take d.num_digits.val).map (fun q => q.val))
      z zs hshape hzLo (by
        intro q hq
        simp only [List.mem_map] at hq
        rcases hq with ⟨u, hu, rfl⟩
        exact hdigit u hu) d.decimal_point.val
    have houtBounds := P804_T1_DecimalValueBounds
      ((d'.digits.val.take d'.num_digits.val).map (fun q => q.val))
      z' zs' hshape' hz'Lo (by
        intro q hq
        simp only [List.mem_map] at hq
        rcases hq with ⟨u, hu, rfl⟩
        exact hdigit' u hu) d'.decimal_point.val
    dsimp only at hinBounds houtBounds
    rw [hlen] at hinBounds
    rw [hlen'] at houtBounds
    have hinLower :
        (z : Real) * (10 : Real) ^ (d.decimal_point.val - 1) <=
          (((d.digits.val.take d.num_digits.val).map (fun q => q.val)).foldl
            (fun a q => 10 * a + q) 0 : Nat) * (10 : Real) ^
              (d.decimal_point.val - (d.num_digits.val : Int)) := by
      exact hinBounds.1
    have hvaluePos : 0 <
        (((d.digits.val.take d.num_digits.val).map (fun q => q.val)).foldl
          (fun a q => 10 * a + q) 0 : Nat) * (10 : Real) ^
            (d.decimal_point.val - (d.num_digits.val : Int)) := by
      have hzpos : (0 : Real) < z := by exact_mod_cast (by omega : 0 < z)
      have hpw : 0 < (10 : Real) ^ (d.decimal_point.val - 1) :=
        zpow_pos (by norm_num) _
      exact lt_of_lt_of_le (mul_pos hzpos hpw) hinLower
    have hrecord := DecimalSeqRightShiftRecordSemantics d d' shift hshift
      hvaluePos
      hdigit hright
    rcases hrecord with hreset | ⟨rho, hrho0, hrhoCut, hvalue, hsticky⟩
    · omega
    · have hk : shift.val = 3 := by
        have hn : n.val = 1 := by omega
        simp [shift, hn]
      have hvin :
          (((d.digits.val.take d.num_digits.val).map (fun q => q.val)).foldl
              (fun a q => 10 * a + q) 0 : Nat) *
              (10 : Real) ^
                (d.decimal_point.val - (d.num_digits.val : Int)) < 10 := by
        simpa [hp] using hinBounds.2
      have hvoutlt :
          (((d'.digits.val.take d'.num_digits.val).map (fun q => q.val)).foldl
              (fun a q => 10 * a + q) 0 : Nat) *
              (10 : Real) ^
                (d'.decimal_point.val - (d'.num_digits.val : Int)) < 2 := by
        change
          (((d'.digits.val.take d'.num_digits.val).map (fun q => q.val)).foldl
              (fun a q => 10 * a + q) 0 : Nat) * (10 : Real) ^
                (d'.decimal_point.val - (d'.num_digits.val : Int)) =
            (((d.digits.val.take d.num_digits.val).map (fun q => q.val)).foldl
                (fun a q => 10 * a + q) 0 : Nat) * (10 : Real) ^
                  (d.decimal_point.val - (d.num_digits.val : Int)) /
                (2 : Real) ^ shift.val - rho at hvalue
        calc
          (((d'.digits.val.take d'.num_digits.val).map (fun q => q.val)).foldl
              (fun a q => 10 * a + q) 0 : Nat) * (10 : Real) ^
                (d'.decimal_point.val - (d'.num_digits.val : Int)) =
              (((d.digits.val.take d.num_digits.val).map (fun q => q.val)).foldl
                (fun a q => 10 * a + q) 0 : Nat) * (10 : Real) ^
                  (d.decimal_point.val - (d.num_digits.val : Int)) /
                (2 : Real) ^ shift.val - rho := hvalue
          _ <= (((d.digits.val.take d.num_digits.val).map (fun q => q.val)).foldl
                (fun a q => 10 * a + q) 0 : Nat) * (10 : Real) ^
                  (d.decimal_point.val - (d.num_digits.val : Int)) / 8 := by
              rw [hk]
              norm_num
              linarith
          _ < 2 := by nlinarith
      have hz'lt : (z' : Real) < 2 := by
        have hlo : (z' : Real) * (10 : Real) ^
              (d'.decimal_point.val - 1) <=
            (((d'.digits.val.take d'.num_digits.val).map
              (fun q => q.val)).foldl (fun a q => 10 * a + q) 0 : Nat) *
              (10 : Real) ^
                (d'.decimal_point.val - (d'.num_digits.val : Int)) := by
          exact houtBounds.1
        norm_num [hp'] at hlo
        have hvoutlt' :
            (((d'.digits.val.map (fun q => q.val)).take d'.num_digits.val).foldl
                (fun a q => 10 * a + q) 0 : Nat) * (10 : Real) ^
                  (1 - (d'.num_digits.val : Int)) < 2 := by
          simpa [List.map_take, hp'] using hvoutlt
        exact lt_of_le_of_lt hlo hvoutlt'
      have hz'eq : z' = 1 := by
        have hz'ltNat : z' < 2 := by exact_mod_cast hz'lt
        omega
      exact ⟨zs', by simpa [hz'eq] using hshape'⟩
  have hnoStallOne : d.decimal_point.val = 1 ->
      (exists tail,
        (d.digits.val.take d.num_digits.val).map (fun q => q.val) =
          1 :: tail) -> d'.decimal_point.val = 0 := by
    intro hp hhead
    rcases hprogressSmall (by omega) with hp0 | hp1
    · exact hp0
    · exfalso
      have hreadOne : read.val = 1 := by
        rw [hpoint] at hp1
        omega
      rcases hhead with ⟨tail, hhead⟩
      have hzOne : z = 1 := by
        rw [hshape] at hhead
        exact List.cons.inj hhead |>.1
      have hnOne : n.val = 1 := by omega
      have hk : shift.val = 3 := by simp [shift, hnOne]
      have hprefSem := DecimalRightShiftPrefixLoopSemantics
        d d shift read acc false hshift (by
          have hb := P804_T1_DecimalFoldBounds
            ((d.digits.val.take d.num_digits.val).map (fun q => q.val))
            (by
              intro q hq
              simp only [List.mem_map] at hq
              rcases hq with ⟨u, hu, rfl⟩
              exact hdigit u hu)
            z zs hshape hzLo
          have hpw : 0 < 10 ^
              (((d.digits.val.take d.num_digits.val).map
                (fun q => q.val)).length - 1) := by positivity
          omega) hdigit hpref
      dsimp only at hprefSem
      rcases hprefSem with ⟨_, _, _, _, _, hphase⟩
      rcases hphase with hwithin | hextend
      · rcases hwithin with ⟨_, _, hacc⟩
        have hfoldOne :
            ((d.digits.val.map (fun q => q.val)).take read.val).foldl
              (fun a q => 10 * a + q) 0 = 1 := by
          rw [hreadOne]
          have hfull :
              (d.digits.val.map (fun q => q.val)).take d.num_digits.val =
                z :: zs := by
            simpa [List.map_take] using hshape
          have hnpos : 1 <= d.num_digits.val := by
            rw [← hlenCons]
            simp
          have hone :
              (d.digits.val.map (fun q => q.val)).take 1 = [z] := by
            have ht :
                ((d.digits.val.map (fun q => q.val)).take
                  d.num_digits.val).take 1 = [z] := by simp [hfull]
            simpa [List.take_take, Nat.min_eq_left hnpos] using ht
          rw [hone, hzOne]
          decide
        rw [hacc, hfoldOne, hk] at haccLo
        norm_num at haccLo
      · rcases hextend with ⟨hnread, _, _, _⟩
        have hnpos : 1 <= d.num_digits.val := by
          rw [← hlenCons]
          simp
        omega
  have hnegRange :
      (-. num.imp.dec2flt.decimal_seq.DecimalSeq.DECIMAL_POINT_RANGE) =
        ok ((-2047)#i32) := by
    unfold num.imp.dec2flt.decimal_seq.DecimalSeq.DECIMAL_POINT_RANGE
    change IScalar.neg (2047#i32 : Std.I32) = _
    unfold IScalar.neg IScalar.tryMk IScalar.tryMkOpt
    norm_num [IScalar.check_bounds, IScalarTy.numBits]
  have hshiftCast : (UScalar.hcast .I32 shift).val = (shift.val : Int) := by
    have hs := UScalar.hcast_inBounds_spec .I32 shift (by
      rw [IScalar.max_I32_eq]
      omega)
    simpa [lift, WP.spec_ok] using hs
  let shiftI : Std.I32 := UScalar.hcast .I32 shift
  have hshiftIVal : shiftI.val = (shift.val : Int) := by
    simpa [shiftI] using hshiftCast
  have haddBounds : IScalar.min .I32 <= exp.val + shiftI.val /\
      exp.val + shiftI.val <= IScalar.max .I32 := by
    rw [hshiftIVal]
    constructor
    · rw [IScalar.min_I32_eq]
      omega
    · rw [IScalar.max_I32_eq]
      omega
  obtain ⟨exp', hexpAdd, hexpVal⟩ := Aeneas.Std.WP.spec_imp_exists
    (IScalar.add_spec haddBounds.1 haddBounds.2)
  have hexpVal' : exp'.val = exp.val + (shift.val : Int) := by
    rw [hexpVal, hshiftCast]
  refine ⟨d', shift, exp', read, acc, ?_, hright, hshift, hexpVal',
    hprogressLarge, hprogressSmall, ?_, hstall, hnoStallOne⟩
  · unfold num.imp.dec2flt.slow.parse_long_mantissa_loop0.body
    have hpgt : d.decimal_point > 0#i32 := by
      change d.decimal_point.val > 0
      omega
    simp only [hpgt, if_true, core.option.Option.is_none, lift]
    rw [show IScalar.hcast .Usize d.decimal_point = n by rfl]
    simp only [bind_tc_ok, hselector, hright, hnegRange]
    have hnotReset : ¬ d'.decimal_point < (-2047)#i32 := by
      change ¬ d'.decimal_point.val < -2047
      rw [hpoint]
      omega
    simp only [hnotReset, if_false]
    rw [show UScalar.hcast .I32 shift = shiftI by rfl]
    simp only [bind_tc_ok, hexpAdd]
    simp
  · exact ⟨hcap', hdigit', ⟨z', zs', hshape', hz'Lo, hz'Hi, hlen'⟩, hend'⟩

end dec2flt_model

Proof structure

Follow the declared dependencies to read the supporting statements and proofs.

Explore this dependency tree

Inspect related source (151)
More program dependencies (109)
Standard-library dependencies (39)

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 123 entries
Technical checking records
Local closure summary
{
  "node": "P804_T1_RightLoopStep",
  "closure_version": "patch_c_v1",
  "active_decl_hash": "47bfd015dda28b90c87c084af763ebd7f9f7c90a3bb6cfcb535aeb7de2dc78df",
  "active_statement_hash": "fcbf826adab21518281538c29388a61a0b13d67aa67aeb6671f6c7ea4f058555",
  "kernel_axioms": [
    "Classical.choice",
    "Quot.sound",
    "propext"
  ],
  "toolchain_hash": "ce4c4e3d87434b9663f46de25ce34b48a0cf0d392e0a320a0787b4674a2d7b61",
  "lean_executable_hash": "3e0d0d3d801675359f2d4cf9815bfdb417b20b92fdd9d48b3b14c95bbae28bbf",
  "checker_script_hash": "c8e4a03273e23b9a8f2e141020652a4e0b7b0a8ab0883366ea9d031ca3f37aa1",
  "approved_axioms_hash": "ab64d13f256386ee0e494a5abcc6a5db49512cf3d90bbdfcabd6327793a31f95",
  "axcheck_status": "Agreed",
  "accepted_at_snapshot_id": "revalidate-cycle-192",
  "boundary_theorems": {},
  "strict_theorem_deps": {
    "DecimalRightShiftLoop0Execution": "e27252660de78d95",
    "DecimalRightShiftPrefixLoopSemantics": "0d5cb25f18eedbfb",
    "DecimalSeqRightShiftCanonical": "fc2c059f527d234a",
    "DecimalSeqRightShiftRecordSemantics": "81ed2135baca7c94",
    "P804_T1_DecimalFoldBounds": "9af7ca1186664411",
    "P804_T1_DecimalValueBounds": "4b5c924b5d52bc9d",
    "P804_T1_RightPrefixLengthBounds": "1ef34b1c9650b938",
    "SlowShiftSelectorCertificate": "963b7a2e670856e8",
    "num_imp_dec2flt_decimal_seq_DecimalSeq_DECIMAL_POINT_RANGE": "01b84a7a35e5bcf4",
    "num_imp_dec2flt_slow_parse_long_mantissa": "0eb6fb2627d0ff5c"
  },
  "strict_definition_deps": {
    "F64": "ec4e25fbaf4e11d4",
    "F64_Insts_Dec2flt_modelNumImpTraitsFloatU64": "94095c9bf79da164",
    "SlowShiftSelectorCertificate": "7ebc2b39d69850c4",
    "num_imp_dec2flt_common_BiasedFp": "c43614ff2149ecf2",
    "num_imp_dec2flt_decimal_seq_DecimalSeq": "b0286c42454b158d",
    "num_imp_dec2flt_decimal_seq_DecimalSeq_DECIMAL_POINT_RANGE": "0cc5155758bc976a",
    "num_imp_dec2flt_decimal_seq_DecimalSeq_right_shift": "1aaf1bb11c0b6a49",
    "num_imp_dec2flt_slow_parse_long_mantissa": "0ce7bdcf55d68c29",
    "num_imp_dec2flt_slow_parse_long_mantissa_closure_Insts_CoreOpsFunctionFnTupleUsizeUsize_call": "7df8a2c8e3717790"
  }
}
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:472d9733668452d122d00eb300957106513fdeb186e3e82026198b51a9363673",
  "superseded_for_theorem_closure": false
}
Review verdicts
{
  "corr_status": "Pass",
  "substantiveness_status": "Pass"
}