ParserNumericSign

Lean checked

Statement

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

Theorem

For every source-valid numeric literal and every normally returned successful f64 result, that result is obtained by applying the literal's lexical sign to a nonnegative magnitude word, including zero and infinity magnitudes.

Lean statement

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

import Tablet.AssemblyCorrespondence
import Tablet.DecimalGoalVocabularyDefault
import Tablet.F64
import Tablet.F64_Insts_Dec2flt_modelNumImpDec2fltLemireU64
import Tablet.F64_Insts_CoreOpsArithDivF64F64
import Tablet.F64_Insts_CoreOpsArithMulF64F64
import Tablet.F64_Insts_CoreOpsArithNegF64
import Tablet.F64_Insts_Dec2flt_modelNumImpTraitsFloatExtU64
import Tablet.F64_Insts_Dec2flt_modelNumImpTraitsFloatU64
import Tablet.ModelF64Neg
import Tablet.ModelSliceFirst
import Tablet.ModelStrAsBytes
import Tablet.NativeCorrectOrDefer
import Tablet.ParserSelectedMagnitudeSign
import Tablet.SourceValidByteSlice
import Tablet.SpecialHelperRejection
import Tablet.num_imp_dec2flt_Dec2FltAssemblyTrace
import Tablet.num_imp_dec2flt_Dec2FltTrace
import Tablet.num_imp_dec2flt_dec2flt
import Tablet.num_imp_dec2flt_dec2flt_with_trace
import Tablet.num_imp_dec2flt_parse_parse_number
import Tablet.num_imp_dec2flt_parse_parse_inf_nan
import Tablet.num_imp_dec2flt_decimal_Decimal_try_fast_path
import Tablet.num_imp_dec2flt_lemire_compute_float
import Tablet.num_imp_dec2flt_slow_parse_long_mantissa
import Tablet.num_imp_dec2flt_biased_fp_to_float

open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false

namespace dec2flt_model

-- [TABLET NODE: ParserNumericSign]
theorem ParserNumericSign :
    ∀ (s : Str) (x : DecimalLexeme) (f : F64), DecimalGoalVocabularyDefault.sourceString s ->
      DecimalGoalVocabularyDefault.validNumeric x -> DecimalGoalVocabularyDefault.bytes s = DecimalGoalVocabularyDefault.renderNumeric x ->
      num.imp.dec2flt.dec2flt F64.Insts.Dec2flt_modelNumImpDec2fltLemireU64
        F64.Insts.CoreOpsArithDivF64F64 F64.Insts.CoreOpsArithMulF64F64
        F64.Insts.CoreOpsArithNegF64 s = ok (core.result.Result.Ok f) ->
      ∃ magnitude : F64, DecimalGoalVocabularyDefault.signedMagnitude (DecimalGoalVocabularyDefault.lexicalNegative x) magnitude f := 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

Fix s,x,f satisfying the four hypotheses. We first identify exactly the body and sign seen by the dispatcher. Unfold DecimalGoalVocabularyDefault. The validNumeric hypothesis says that every integer and fractional digit is below ten and that either the integer list is nonempty or the fraction is present with a nonempty digit list. Let B be renderNumeric x with its leading-sign contribution removed. Thus B is the concatenation of the integer digit bytes, the optional point and fractional digit bytes, and the optional exponent suffix. It is nonempty: if the integer list is nonempty its first byte is 48+d for some d<10, while if that list is empty, validity supplies a present nonempty fraction and B begins with the point byte 46. In particular, the first byte of B is in \{48,\ldots,57\} or is 46, and hence is neither sign byte 43 nor 45.
The rendering equation gives the following three exhaustive cases. If x.\mathit{leadingSign}=\mathsf{some}(\mathsf{true}), the complete byte list is 45::B; if it is \mathsf{some}(\mathsf{false}), that list is 43::B; and if it is none, the complete byte list is B. The sourceString hypothesis and ModelStrAsBytes say that the first bind in num imp dec2flt dec2flt with trace returns the identical complete ordered slice, and ModelSliceFirst returns its actual head. The extracted sign tests therefore remove exactly the initial 45 or 43 in the first two cases and remove nothing in the third. The range-from-one call is in bounds because the signed inputs are nonempty, and returns precisely their tail B; every branch consequently reaches the nonempty body B. Moreover its Boolean
\mathit{neg}:=(c=45)
is true exactly in the first rendering case. By the definition of lexicalNegative in DecimalGoalVocabularyDefault,
\mathit{neg}=\texttt{lexicalNegative x}. \tag{1}
The source length is at most 2^{63}-1 and B is either the complete list or its one-byte tail, so |B|\leq2^{63}-1. Hence the represented body slice satisfies SourceValidByteSlice. Its nonempty test returns false, so neither the EmptyInput nor SignOnly constructor listed by num imp dec2flt Dec2FltTrace can describe this execution.
We also need that this unsigned numeric rendering is not a special spelling. If the integer list is nonempty, the first byte of B is 48+d\in[48,57]; otherwise it is 46. On the other hand, unfolding specialLiteral in DecimalGoalVocabularyDefault, an unsigned infinity spelling has first byte 105 or 73 (lower- or uppercase ASCII i), and an unsigned NaN spelling has first byte 110 or 78 (lower- or uppercase ASCII n). This follows directly from the first pair in the asciiCaseEq relation: for lower byte 105 the actual byte is 105 or satisfies a+32=105, hence is 73, and similarly for lower byte 110. Neither possibility equals a digit byte or 46. Thus
\neg\texttt{specialLiteral}(B,\mathsf{none},\mathsf{false}),\qquad \neg\texttt{specialLiteral}(B,\mathsf{none},\mathsf{true}). \tag{2}
The first negation excludes both the three-byte inf and the eight-byte infinity alternatives; the second excludes nan. Together with the source-valid body just proved, (2) lets us apply SpecialHelperRejection for the separate Boolean argument \mathit{neg}. The concrete Lemire record F64 Insts Dec2flt modelNumImpDec2fltLemireU64 selects F64 Insts Dec2flt modelNumImpTraitsFloatExtU64, whose FloatInst field is exactly F64 Insts Dec2flt modelNumImpTraitsFloatU64; hence the helper call in the dispatcher is literally the one in the cited rejection theorem. We obtain
\texttt{parse\_inf\_nan}(B,\mathit{neg})=\texttt{ok none}. \tag{3}
Before splitting the numeric-helper result, connect the public hypothesis to an exact traced execution. Unfold num imp dec2flt dec2flt. It first binds the call to num imp dec2flt dec2flt with trace and then returns its first projection. Case analysis on that call shows that a failure would make the public call fail, while an ok (r,tr) return makes it ok r. Injectivity of ok, followed by injectivity of the successful core.result.Result.Ok constructor against the public hypothesis, therefore supplies a trace tr_0 with
\texttt{dec2flt\_with\_trace}(s) =\texttt{ok }(\texttt{Ok }f,tr_0). \tag{4}
All calls here and below carry exactly the four concrete Lemire, division, multiplication, and negation instances displayed in the theorem and in the two cited extracted definitions.
The bind of parse_number in the traced definition must return normally, since a failed bind would contradict (4). Suppose first that its option result were none. Equation (3) says that the following special-helper bind also returns none. The only remaining code in that branch binds the invalid-error constructor. If that bind fails, (4) is impossible; if it succeeds, the branch returns Err with an Invalid trace, contradicting the Ok f first component of (4) by constructor disjointness. Consequently the numeric helper returned some r for a record r. The dispatcher passes exactly
d:=\{r\text{ with }\mathit{negative}:=\mathit{neg}\} \tag{5}
to try_fast_path; in particular d.\mathit{negative}=\mathit{neg}. Its bind too must return normally.
First suppose this call returns some v. Apply NativeCorrectOrDefer to the exact record (5) and the equality try_fast_path(d) = ok (some v). Its none alternative contradicts constructor disjointness. The other alternative supplies v' and a magnitude m such that some v = some v' and signedMagnitude(d.negative,m,v'); option-constructor injectivity gives v=v'. The some branch of num imp dec2flt dec2flt with trace returns exactly Ok v with a FastPath constructor from num imp dec2flt Dec2FltTrace. Comparing this return with (4) gives f=v. Substituting this equality, (5), and (1) into the supplied signed-magnitude relation proves the conclusion with witness m. Notice that no acceptance theorem for the unrestricted numeric helper was used.
It remains to treat try_fast_path(d) = ok none. The remainder of the extracted definition computes its first raw pair, its optional second pair, any forced deferral, and the optional slow replacement. Every one of these operations is bound in the result monad. Thus any failed compute, checked increment, comparison, slow parse, cast, constant lookup, shift, OR, assembly, or final negation would propagate a failure and contradict (4). Following the successful binds leaves a selected pair p, an assembled U64 word w, and an assembly result a. The declaration schema num imp dec2flt Dec2FltAssemblyTrace and the record literal in num imp dec2flt dec2flt with trace give a record tr with
tr.\mathit{selected\_pair}=p,\quad tr.\mathit{assembled\_word}=w,\quad tr.\mathit{assembly\_result}=a, \tag{6}
and the returned trace is Assembled tr. The constructor schema num imp dec2flt Dec2FltTrace, disjointness from its other five constructors, and injectivity of Assembled identify this exact tr with tr_0 in (4). In the nonnegative branch the same record literal has tr.\mathit{negative}=\mathsf{false}, tr.\mathit{lexical\_sign\_applied}=\mathsf{false}, and tr.\mathit{result}=a=f; in the negative branch all three corresponding facts are true except that the last field is the successfully negated result f. Since the branch test is precisely c=45, (1) says these are exactly the two cases of lexicalNegative x.
Apply ParserSelectedMagnitudeSign to the source-string hypothesis and the exact equality (4) with its Assembled tr trace. With (6) it yields
\texttt{assembledWord}(p,w),\qquad w.\mathit{val}<2^{63}. \tag{7}
Next apply AssemblyCorrespondence to this same unrestricted pair p. It gives an F64 word a' such that
\texttt{biased\_fp\_to\_float}(p)=\texttt{ok }a',\qquad \texttt{assembledWord}(p,a'). \tag{8}
The assembly-result bind recorded in (6), as specified directly by num imp dec2flt dec2flt with trace, gives the same left side equal to ok a. Determinism of this definition and injectivity of ok therefore give a'=a.
For completeness, this also transfers the clear-sign bound without assuming that assembly has a second possible result. Unfolding assembledWord from DecimalGoalVocabularyDefault, its right side is the single raw word formula determined by p. The relations in (7) and (8) therefore give w.\mathit{val}=a.\mathit{val}. Since F64 identifies F64 with the same one-field 64-bit carrier as U64, carrier extensionality identifies w=a; in particular (7) gives
a.\mathit{val}<2^{63}. \tag{9}
Choose a as the required magnitude. If lexicalNegative x is false, the nonnegative record facts above give f=a. By (9), unfolding signedMagnitude in DecimalGoalVocabularyDefault asks for a.\mathit{val}<2^{63} and f.\mathit{val}=a.\mathit{val}+0, both of which hold. This case includes both an absent leading sign and a leading plus.
If lexicalNegative x is true, the last successful bind invokes the concrete negation record F64 Insts CoreOpsArithNegF64 on a. Its bound semantics ModelF64Neg toggles exactly bit 63. Bound (9) says that bit was clear, so its xor with 2^{63} is the disjoint-bit sum a.\mathit{val}+2^{63}, with every lower magnitude bit unchanged. The negative record field and (4) identify that returned word with f. Hence
f.\mathit{val}=a.\mathit{val}+2^{63},
which together with (9) is precisely signedMagnitude(true,a,f). The argument used only the clear sign-bit bound, so it includes magnitude zero and the positive-infinity magnitude as required.

Lean proof


  intro s x f hsource hvalid hbytes hpublic
  have bind_ok_inv : ∀ {α β : Type} (r : Result α) (g : α → Result β) y,
      Bind.bind r g = ok y → ∃ z, r = ok z ∧ g z = ok y := by
    intro α β r g y hr
    cases r with
    | fail err => simp [Bind.bind, Aeneas.Std.bind] at hr
    | div => simp [Bind.bind, Aeneas.Std.bind] at hr
    | ok z => exact ⟨z, rfl, hr⟩
  have numeric_head : ∀ (y : DecimalLexeme),
      y.leadingSign = none ->
      DecimalGoalVocabularyDefault.validNumeric y ->
      ∃ n rest, DecimalGoalVocabularyDefault.renderNumeric y = n :: rest ∧
        (n = 46 ∨ (48 ≤ n ∧ n ≤ 57)) := by
    intro y hsign hval
    rcases y with ⟨sign, ints, frac, exp⟩
    simp only at hsign
    subst sign
    dsimp only [DecimalGoalVocabularyDefault] at hval ⊢
    rcases hval with ⟨hints, hfrac, hnonempty, hexp⟩
    cases ints with
    | nil =>
        simp only [List.map_nil, List.nil_append] at hnonempty ⊢
        cases frac with
        | none => simp at hnonempty
        | some ds =>
            cases ds with
            | nil => simp at hnonempty
            | cons d ds => exact ⟨46, _, rfl, Or.inl rfl⟩
    | cons d ds =>
        have hd : d < 10 := hints d (by simp)
        exact ⟨48 + d, _, rfl, Or.inr (by omega)⟩
  have numeric_not_special : ∀ (y : DecimalLexeme) (nan : Bool),
      y.leadingSign = none ->
      DecimalGoalVocabularyDefault.validNumeric y ->
      ¬ DecimalGoalVocabularyDefault.specialLiteral
        (DecimalGoalVocabularyDefault.renderNumeric y) none nan := by
    intro y nan hsign hval hspecial
    obtain ⟨n, rest, hrender, hn⟩ := numeric_head y hsign hval
    rcases hspecial with ⟨body, hbody, hcase⟩
    change DecimalGoalVocabularyDefault.renderNumeric y = body at hbody
    rw [hrender] at hbody
    cases hbody
    dsimp only [DecimalGoalVocabularyDefault] at hcase
    cases nan with
    | false =>
        simp only [Bool.false_eq_true, if_false] at hcase
        rcases hcase with hcase | hcase
        · cases hcase
          rename_i hfirst _
          rcases hfirst with hfirst | hfirst <;> omega
        · cases hcase
          rename_i hfirst _
          rcases hfirst with hfirst | hfirst <;> omega
    | true =>
        simp only [if_true] at hcase
        cases hcase
        rename_i hfirst _
        rcases hfirst with hfirst | hfirst <;> omega
  let unsigned : DecimalLexeme := { x with leadingSign := none }
  have unsigned_sign : unsigned.leadingSign = none := rfl
  have unsigned_valid : DecimalGoalVocabularyDefault.validNumeric unsigned := by
    simpa [DecimalGoalVocabularyDefault, unsigned] using hvalid
  obtain ⟨head, rest, unsigned_render, head_range⟩ :=
    numeric_head unsigned unsigned_sign unsigned_valid
  unfold num.imp.dec2flt.dec2flt at hpublic
  obtain ⟨out, hout, hpublic⟩ := bind_ok_inv _ _ _ hpublic
  rcases out with ⟨publicResult, trace⟩
  cases hpublic
  have traced :
      num.imp.dec2flt.dec2flt_with_trace
        F64.Insts.Dec2flt_modelNumImpDec2fltLemireU64
        F64.Insts.CoreOpsArithDivF64F64 F64.Insts.CoreOpsArithMulF64F64
        F64.Insts.CoreOpsArithNegF64 s =
        ok (core.result.Result.Ok f, trace) := hout
  rcases s with ⟨source, source_bound⟩
  cases source with
  | nil =>
      dsimp only [DecimalGoalVocabularyDefault] at hbytes
      cases hs : x.leadingSign with
      | none =>
          have : DecimalGoalVocabularyDefault.renderNumeric x = [] := hbytes.symm
          obtain ⟨n, tail, hn, _⟩ := numeric_head x hs hvalid
          rw [hn] at this
          simp at this
      | some sign =>
          cases sign <;> simp [DecimalGoalVocabularyDefault, hs] at hbytes
  | cons first tail =>
      unfold num.imp.dec2flt.dec2flt_with_trace at traced
      obtain ⟨body, hbody, traced⟩ := bind_ok_inv _ _ _ traced
      have hbodyEq : body = (⟨first :: tail, source_bound⟩ : Slice Std.U8) := by
        simpa [core.str.Str.as_bytes, ModelStrAsBytes] using hbody.symm
      subst body
      obtain ⟨firstOption, hfirst, traced⟩ := bind_ok_inv _ _ _ traced
      have hfirstEq : firstOption = some first := by
        simpa [core.slice.Slice.first, ModelSliceFirst] using hfirst.symm
      subst firstOption
      obtain ⟨body1, hbody1, traced⟩ := bind_ok_inv _ _ _ traced
      have lexical :
          body1.val ≠ [] ∧ SourceValidByteSlice body1 ∧
          DecimalGoalVocabularyDefault.bytes body1 =
            DecimalGoalVocabularyDefault.renderNumeric unsigned ∧
          (decide (first = 45#u8) : Bool) =
            DecimalGoalVocabularyDefault.lexicalNegative x := by
        cases hsign : x.leadingSign with
        | none =>
            have full : first.val :: tail.map (fun b => b.val) = head :: rest := by
              calc
                first.val :: tail.map (fun b => b.val) =
                    DecimalGoalVocabularyDefault.renderNumeric x := hbytes
                _ = DecimalGoalVocabularyDefault.renderNumeric unsigned := by
                  simp [DecimalGoalVocabularyDefault, unsigned, hsign]
                _ = head :: rest := unsigned_render
            have firstVal : first.val = head := (List.cons.inj full).1
            have hminus : first ≠ 45#u8 := by
              intro heq
              subst first
              simp at firstVal
              rcases head_range with hr | hr <;> omega
            have hplus : first ≠ 43#u8 := by
              intro heq
              subst first
              simp at firstVal
              rcases head_range with hr | hr <;> omega
            simp only [hminus, hplus, if_false] at hbody1
            cases hbody1
            refine ⟨by simp, ?_, ?_, ?_⟩
            · exact hsource.1
            · simpa [DecimalGoalVocabularyDefault, unsigned, hsign] using hbytes
            · simp [DecimalGoalVocabularyDefault, hsign, hminus]
        | some sign =>
            cases sign with
            | false =>
                have full : first.val :: tail.map (fun b => b.val) =
                    43 :: DecimalGoalVocabularyDefault.renderNumeric unsigned := by
                  calc
                    first.val :: tail.map (fun b => b.val) =
                        DecimalGoalVocabularyDefault.renderNumeric x := hbytes
                    _ = 43 :: DecimalGoalVocabularyDefault.renderNumeric unsigned := by
                      simp [DecimalGoalVocabularyDefault, unsigned, hsign]
                have firstVal : first.val = 43 := (List.cons.inj full).1
                have firstEq : first = 43#u8 := UScalar.eq_of_val_eq firstVal
                have tailRender : tail.map (fun b => b.val) =
                    DecimalGoalVocabularyDefault.renderNumeric unsigned :=
                  (List.cons.inj full).2
                simp only [firstEq, reduceCtorEq, if_false, if_true] at hbody1
                simp [core.slice.index.SliceIndexRangeFromUsizeSlice.index,
                  Slice.drop] at hbody1
                cases hbody1
                refine ⟨?_, ?_, ?_, ?_⟩
                · intro hempty
                  have tailEmpty : tail = [] := by simpa using hempty
                  rw [tailEmpty] at tailRender
                  simp at tailRender
                  rw [unsigned_render] at tailRender
                  simp at tailRender
                · unfold SourceValidByteSlice
                  have hslen := hsource.1
                  simp at hslen ⊢
                  omega
                · exact tailRender
                · simp [DecimalGoalVocabularyDefault, hsign, firstEq]
            | true =>
                have full : first.val :: tail.map (fun b => b.val) =
                    45 :: DecimalGoalVocabularyDefault.renderNumeric unsigned := by
                  calc
                    first.val :: tail.map (fun b => b.val) =
                        DecimalGoalVocabularyDefault.renderNumeric x := hbytes
                    _ = 45 :: DecimalGoalVocabularyDefault.renderNumeric unsigned := by
                      simp [DecimalGoalVocabularyDefault, unsigned, hsign]
                have firstVal : first.val = 45 := (List.cons.inj full).1
                have firstEq : first = 45#u8 := UScalar.eq_of_val_eq firstVal
                have tailRender : tail.map (fun b => b.val) =
                    DecimalGoalVocabularyDefault.renderNumeric unsigned :=
                  (List.cons.inj full).2
                simp only [firstEq, if_true] at hbody1
                simp [core.slice.index.SliceIndexRangeFromUsizeSlice.index,
                  Slice.drop] at hbody1
                cases hbody1
                refine ⟨?_, ?_, ?_, ?_⟩
                · intro hempty
                  have tailEmpty : tail = [] := by simpa using hempty
                  rw [tailEmpty] at tailRender
                  simp at tailRender
                  rw [unsigned_render] at tailRender
                  simp at tailRender
                · unfold SourceValidByteSlice
                  have hslen := hsource.1
                  simp at hslen ⊢
                  omega
                · exact tailRender
                · simp [DecimalGoalVocabularyDefault, hsign, firstEq]
      rcases lexical with ⟨bodyNonempty, bodyValid, bodyRender, signEq⟩
      have noInf : ¬ DecimalGoalVocabularyDefault.specialLiteral
          (DecimalGoalVocabularyDefault.bytes body1) none false := by
        rw [bodyRender]
        exact numeric_not_special unsigned false unsigned_sign unsigned_valid
      have noNan : ¬ DecimalGoalVocabularyDefault.specialLiteral
          (DecimalGoalVocabularyDefault.bytes body1) none true := by
        rw [bodyRender]
        exact numeric_not_special unsigned true unsigned_sign unsigned_valid
      have specialReject :=
        SpecialHelperRejection body1 (decide (first = 45#u8))
          bodyValid noInf noNan
      obtain ⟨empty, hempty, traced⟩ := bind_ok_inv _ _ _ traced
      by_cases emptyTrue : empty = true
      · simp only [emptyTrue, if_true] at traced
        obtain ⟨pfe, hpfe, traced⟩ := bind_ok_inv _ _ _ traced
        cases traced
      · have emptyFalse : empty = false := Bool.eq_false_of_not_eq_true emptyTrue
        simp only [emptyFalse, if_false] at traced
        obtain ⟨parsed, hparsed, traced⟩ := bind_ok_inv _ _ _ traced
        cases parsed with
        | none =>
            obtain ⟨special, hspecial, traced⟩ := bind_ok_inv _ _ _ traced
            rw [specialReject] at hspecial
            cases hspecial
            obtain ⟨pfe, hpfe, traced⟩ := bind_ok_inv _ _ _ traced
            cases traced
        | some r =>
            obtain ⟨fast, hfast, traced⟩ := bind_ok_inv _ _ _ traced
            cases fast with
            | some value =>
                have hnative := NativeCorrectOrDefer
                  ({ r with negative := decide (first = 45#u8) })
                  (some value) hfast
                rcases hnative with hnone | ⟨value', magnitude, hvalue, _, _, hsigned⟩
                · simp at hnone
                · cases hvalue
                  cases traced
                  refine ⟨magnitude, ?_⟩
                  simpa [signEq] using hsigned
            | none =>
                obtain ⟨firstPair, hfirstPair, traced⟩ := bind_ok_inv _ _ _ traced
                obtain ⟨phase1, hphase1, traced⟩ := bind_ok_inv _ _ _ traced
                rcases phase1 with ⟨many1, many2, firstPair1, fp, guard⟩
                obtain ⟨phase2, hphase2, traced⟩ := bind_ok_inv _ _ _ traced
                rcases phase2 with
                  ⟨post, secondExp, secondMant, secondResult, secondEqual, forced⟩
                obtain ⟨phase3, hphase3, traced⟩ := bind_ok_inv _ _ _ traced
                rcases phase3 with ⟨selected, slowGuard, slowResult⟩
                obtain ⟨i, hi, traced⟩ := bind_ok_inv _ _ _ traced
                obtain ⟨i1, hi1, traced⟩ := bind_ok_inv _ _ _ traced
                obtain ⟨i2, hi2, traced⟩ := bind_ok_inv _ _ _ traced
                obtain ⟨word, hword, traced⟩ := bind_ok_inv _ _ _ traced
                obtain ⟨assembled, hassembled, traced⟩ := bind_ok_inv _ _ _ traced
                by_cases negative : first = 45#u8
                · simp only [negative, if_true] at traced
                  obtain ⟨result, hresult, traced⟩ := bind_ok_inv _ _ _ traced
                  cases traced
                  obtain ⟨wordSpec, wordBound⟩ :=
                    ParserSelectedMagnitudeSign
                      (⟨first :: tail, source_bound⟩ : Str) f _ hsource hout
                  change DecimalGoalVocabularyDefault.assembledWord selected word at wordSpec
                  change word.val < 2 ^ 63 at wordBound
                  obtain ⟨canonical, hcanonical, canonicalSpec⟩ :=
                    AssemblyCorrespondence selected
                  rw [hassembled] at hcanonical
                  cases hcanonical
                  have assembledVal : assembled.val = word.val := by
                    dsimp only [DecimalGoalVocabularyDefault] at wordSpec canonicalSpec
                    exact canonicalSpec.trans wordSpec.symm
                  have assembledBound : assembled.val < 2 ^ 63 := by omega
                  refine ⟨assembled, ?_⟩
                  rw [← signEq]
                  simp only [negative, decide_true]
                  change ModelF64Neg assembled = ok f at hresult
                  cases hresult
                  dsimp only [DecimalGoalVocabularyDefault]
                  refine ⟨assembledBound, ?_⟩
                  have hxor : assembled.val ^^^ (2 ^ 63) =
                      (2 ^ 63) ||| assembled.val := by
                    apply Nat.eq_of_testBit_eq
                    intro k
                    rw [Nat.testBit_xor, Nat.testBit_or, Nat.testBit_two_pow]
                    by_cases hk : k = 63
                    · subst k
                      rw [Nat.testBit_lt_two_pow assembledBound]
                      decide
                    · have hk' : 63 ≠ k := Ne.symm hk
                      simp [hk, hk']
                  have hor : (2 ^ 63) ||| assembled.val =
                      assembled.val + 2 ^ 63 := by
                    have h := Nat.two_pow_add_eq_or_of_lt assembledBound 1
                    simpa [Nat.add_comm] using h.symm
                  change (assembled.bv ^^^ BitVec.ofNat 64 (2 ^ 63)).toNat =
                    assembled.val + 2 ^ 63
                  rw [BitVec.toNat_xor, BitVec.toNat_ofNat]
                  norm_num
                  exact hxor.trans hor
                · simp only [negative, if_false] at traced
                  cases traced
                  obtain ⟨wordSpec, wordBound⟩ :=
                    ParserSelectedMagnitudeSign
                      (⟨first :: tail, source_bound⟩ : Str) f _ hsource hout
                  change DecimalGoalVocabularyDefault.assembledWord selected word at wordSpec
                  change word.val < 2 ^ 63 at wordBound
                  obtain ⟨canonical, hcanonical, canonicalSpec⟩ :=
                    AssemblyCorrespondence selected
                  rw [hassembled] at hcanonical
                  cases hcanonical
                  have assembledVal : f.val = word.val := by
                    dsimp only [DecimalGoalVocabularyDefault] at wordSpec canonicalSpec
                    exact canonicalSpec.trans wordSpec.symm
                  have assembledBound : f.val < 2 ^ 63 := by omega
                  refine ⟨f, ?_⟩
                  rw [← signEq]
                  simp only [negative, decide_false]
                  dsimp only [DecimalGoalVocabularyDefault]
                  exact ⟨assembledBound, by simp⟩

end dec2flt_model

Download Lean source · Download TeX source

Complete Lean module
import Tablet.AssemblyCorrespondence
import Tablet.DecimalGoalVocabularyDefault
import Tablet.F64
import Tablet.F64_Insts_Dec2flt_modelNumImpDec2fltLemireU64
import Tablet.F64_Insts_CoreOpsArithDivF64F64
import Tablet.F64_Insts_CoreOpsArithMulF64F64
import Tablet.F64_Insts_CoreOpsArithNegF64
import Tablet.F64_Insts_Dec2flt_modelNumImpTraitsFloatExtU64
import Tablet.F64_Insts_Dec2flt_modelNumImpTraitsFloatU64
import Tablet.ModelF64Neg
import Tablet.ModelSliceFirst
import Tablet.ModelStrAsBytes
import Tablet.NativeCorrectOrDefer
import Tablet.ParserSelectedMagnitudeSign
import Tablet.SourceValidByteSlice
import Tablet.SpecialHelperRejection
import Tablet.num_imp_dec2flt_Dec2FltAssemblyTrace
import Tablet.num_imp_dec2flt_Dec2FltTrace
import Tablet.num_imp_dec2flt_dec2flt
import Tablet.num_imp_dec2flt_dec2flt_with_trace
import Tablet.num_imp_dec2flt_parse_parse_number
import Tablet.num_imp_dec2flt_parse_parse_inf_nan
import Tablet.num_imp_dec2flt_decimal_Decimal_try_fast_path
import Tablet.num_imp_dec2flt_lemire_compute_float
import Tablet.num_imp_dec2flt_slow_parse_long_mantissa
import Tablet.num_imp_dec2flt_biased_fp_to_float

open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false

namespace dec2flt_model

-- [TABLET NODE: ParserNumericSign]
theorem ParserNumericSign :
    ∀ (s : Str) (x : DecimalLexeme) (f : F64), DecimalGoalVocabularyDefault.sourceString s ->
      DecimalGoalVocabularyDefault.validNumeric x -> DecimalGoalVocabularyDefault.bytes s = DecimalGoalVocabularyDefault.renderNumeric x ->
      num.imp.dec2flt.dec2flt F64.Insts.Dec2flt_modelNumImpDec2fltLemireU64
        F64.Insts.CoreOpsArithDivF64F64 F64.Insts.CoreOpsArithMulF64F64
        F64.Insts.CoreOpsArithNegF64 s = ok (core.result.Result.Ok f) ->
      ∃ magnitude : F64, DecimalGoalVocabularyDefault.signedMagnitude (DecimalGoalVocabularyDefault.lexicalNegative x) magnitude f := by
-- BODY
  intro s x f hsource hvalid hbytes hpublic
  have bind_ok_inv : ∀ {α β : Type} (r : Result α) (g : α → Result β) y,
      Bind.bind r g = ok y → ∃ z, r = ok z ∧ g z = ok y := by
    intro α β r g y hr
    cases r with
    | fail err => simp [Bind.bind, Aeneas.Std.bind] at hr
    | div => simp [Bind.bind, Aeneas.Std.bind] at hr
    | ok z => exact ⟨z, rfl, hr⟩
  have numeric_head : ∀ (y : DecimalLexeme),
      y.leadingSign = none ->
      DecimalGoalVocabularyDefault.validNumeric y ->
      ∃ n rest, DecimalGoalVocabularyDefault.renderNumeric y = n :: rest ∧
        (n = 46 ∨ (48 ≤ n ∧ n ≤ 57)) := by
    intro y hsign hval
    rcases y with ⟨sign, ints, frac, exp⟩
    simp only at hsign
    subst sign
    dsimp only [DecimalGoalVocabularyDefault] at hval ⊢
    rcases hval with ⟨hints, hfrac, hnonempty, hexp⟩
    cases ints with
    | nil =>
        simp only [List.map_nil, List.nil_append] at hnonempty ⊢
        cases frac with
        | none => simp at hnonempty
        | some ds =>
            cases ds with
            | nil => simp at hnonempty
            | cons d ds => exact ⟨46, _, rfl, Or.inl rfl⟩
    | cons d ds =>
        have hd : d < 10 := hints d (by simp)
        exact ⟨48 + d, _, rfl, Or.inr (by omega)⟩
  have numeric_not_special : ∀ (y : DecimalLexeme) (nan : Bool),
      y.leadingSign = none ->
      DecimalGoalVocabularyDefault.validNumeric y ->
      ¬ DecimalGoalVocabularyDefault.specialLiteral
        (DecimalGoalVocabularyDefault.renderNumeric y) none nan := by
    intro y nan hsign hval hspecial
    obtain ⟨n, rest, hrender, hn⟩ := numeric_head y hsign hval
    rcases hspecial with ⟨body, hbody, hcase⟩
    change DecimalGoalVocabularyDefault.renderNumeric y = body at hbody
    rw [hrender] at hbody
    cases hbody
    dsimp only [DecimalGoalVocabularyDefault] at hcase
    cases nan with
    | false =>
        simp only [Bool.false_eq_true, if_false] at hcase
        rcases hcase with hcase | hcase
        · cases hcase
          rename_i hfirst _
          rcases hfirst with hfirst | hfirst <;> omega
        · cases hcase
          rename_i hfirst _
          rcases hfirst with hfirst | hfirst <;> omega
    | true =>
        simp only [if_true] at hcase
        cases hcase
        rename_i hfirst _
        rcases hfirst with hfirst | hfirst <;> omega
  let unsigned : DecimalLexeme := { x with leadingSign := none }
  have unsigned_sign : unsigned.leadingSign = none := rfl
  have unsigned_valid : DecimalGoalVocabularyDefault.validNumeric unsigned := by
    simpa [DecimalGoalVocabularyDefault, unsigned] using hvalid
  obtain ⟨head, rest, unsigned_render, head_range⟩ :=
    numeric_head unsigned unsigned_sign unsigned_valid
  unfold num.imp.dec2flt.dec2flt at hpublic
  obtain ⟨out, hout, hpublic⟩ := bind_ok_inv _ _ _ hpublic
  rcases out with ⟨publicResult, trace⟩
  cases hpublic
  have traced :
      num.imp.dec2flt.dec2flt_with_trace
        F64.Insts.Dec2flt_modelNumImpDec2fltLemireU64
        F64.Insts.CoreOpsArithDivF64F64 F64.Insts.CoreOpsArithMulF64F64
        F64.Insts.CoreOpsArithNegF64 s =
        ok (core.result.Result.Ok f, trace) := hout
  rcases s with ⟨source, source_bound⟩
  cases source with
  | nil =>
      dsimp only [DecimalGoalVocabularyDefault] at hbytes
      cases hs : x.leadingSign with
      | none =>
          have : DecimalGoalVocabularyDefault.renderNumeric x = [] := hbytes.symm
          obtain ⟨n, tail, hn, _⟩ := numeric_head x hs hvalid
          rw [hn] at this
          simp at this
      | some sign =>
          cases sign <;> simp [DecimalGoalVocabularyDefault, hs] at hbytes
  | cons first tail =>
      unfold num.imp.dec2flt.dec2flt_with_trace at traced
      obtain ⟨body, hbody, traced⟩ := bind_ok_inv _ _ _ traced
      have hbodyEq : body = (⟨first :: tail, source_bound⟩ : Slice Std.U8) := by
        simpa [core.str.Str.as_bytes, ModelStrAsBytes] using hbody.symm
      subst body
      obtain ⟨firstOption, hfirst, traced⟩ := bind_ok_inv _ _ _ traced
      have hfirstEq : firstOption = some first := by
        simpa [core.slice.Slice.first, ModelSliceFirst] using hfirst.symm
      subst firstOption
      obtain ⟨body1, hbody1, traced⟩ := bind_ok_inv _ _ _ traced
      have lexical :
          body1.val ≠ [] ∧ SourceValidByteSlice body1 ∧
          DecimalGoalVocabularyDefault.bytes body1 =
            DecimalGoalVocabularyDefault.renderNumeric unsigned ∧
          (decide (first = 45#u8) : Bool) =
            DecimalGoalVocabularyDefault.lexicalNegative x := by
        cases hsign : x.leadingSign with
        | none =>
            have full : first.val :: tail.map (fun b => b.val) = head :: rest := by
              calc
                first.val :: tail.map (fun b => b.val) =
                    DecimalGoalVocabularyDefault.renderNumeric x := hbytes
                _ = DecimalGoalVocabularyDefault.renderNumeric unsigned := by
                  simp [DecimalGoalVocabularyDefault, unsigned, hsign]
                _ = head :: rest := unsigned_render
            have firstVal : first.val = head := (List.cons.inj full).1
            have hminus : first ≠ 45#u8 := by
              intro heq
              subst first
              simp at firstVal
              rcases head_range with hr | hr <;> omega
            have hplus : first ≠ 43#u8 := by
              intro heq
              subst first
              simp at firstVal
              rcases head_range with hr | hr <;> omega
            simp only [hminus, hplus, if_false] at hbody1
            cases hbody1
            refine ⟨by simp, ?_, ?_, ?_⟩
            · exact hsource.1
            · simpa [DecimalGoalVocabularyDefault, unsigned, hsign] using hbytes
            · simp [DecimalGoalVocabularyDefault, hsign, hminus]
        | some sign =>
            cases sign with
            | false =>
                have full : first.val :: tail.map (fun b => b.val) =
                    43 :: DecimalGoalVocabularyDefault.renderNumeric unsigned := by
                  calc
                    first.val :: tail.map (fun b => b.val) =
                        DecimalGoalVocabularyDefault.renderNumeric x := hbytes
                    _ = 43 :: DecimalGoalVocabularyDefault.renderNumeric unsigned := by
                      simp [DecimalGoalVocabularyDefault, unsigned, hsign]
                have firstVal : first.val = 43 := (List.cons.inj full).1
                have firstEq : first = 43#u8 := UScalar.eq_of_val_eq firstVal
                have tailRender : tail.map (fun b => b.val) =
                    DecimalGoalVocabularyDefault.renderNumeric unsigned :=
                  (List.cons.inj full).2
                simp only [firstEq, reduceCtorEq, if_false, if_true] at hbody1
                simp [core.slice.index.SliceIndexRangeFromUsizeSlice.index,
                  Slice.drop] at hbody1
                cases hbody1
                refine ⟨?_, ?_, ?_, ?_⟩
                · intro hempty
                  have tailEmpty : tail = [] := by simpa using hempty
                  rw [tailEmpty] at tailRender
                  simp at tailRender
                  rw [unsigned_render] at tailRender
                  simp at tailRender
                · unfold SourceValidByteSlice
                  have hslen := hsource.1
                  simp at hslen ⊢
                  omega
                · exact tailRender
                · simp [DecimalGoalVocabularyDefault, hsign, firstEq]
            | true =>
                have full : first.val :: tail.map (fun b => b.val) =
                    45 :: DecimalGoalVocabularyDefault.renderNumeric unsigned := by
                  calc
                    first.val :: tail.map (fun b => b.val) =
                        DecimalGoalVocabularyDefault.renderNumeric x := hbytes
                    _ = 45 :: DecimalGoalVocabularyDefault.renderNumeric unsigned := by
                      simp [DecimalGoalVocabularyDefault, unsigned, hsign]
                have firstVal : first.val = 45 := (List.cons.inj full).1
                have firstEq : first = 45#u8 := UScalar.eq_of_val_eq firstVal
                have tailRender : tail.map (fun b => b.val) =
                    DecimalGoalVocabularyDefault.renderNumeric unsigned :=
                  (List.cons.inj full).2
                simp only [firstEq, if_true] at hbody1
                simp [core.slice.index.SliceIndexRangeFromUsizeSlice.index,
                  Slice.drop] at hbody1
                cases hbody1
                refine ⟨?_, ?_, ?_, ?_⟩
                · intro hempty
                  have tailEmpty : tail = [] := by simpa using hempty
                  rw [tailEmpty] at tailRender
                  simp at tailRender
                  rw [unsigned_render] at tailRender
                  simp at tailRender
                · unfold SourceValidByteSlice
                  have hslen := hsource.1
                  simp at hslen ⊢
                  omega
                · exact tailRender
                · simp [DecimalGoalVocabularyDefault, hsign, firstEq]
      rcases lexical with ⟨bodyNonempty, bodyValid, bodyRender, signEq⟩
      have noInf : ¬ DecimalGoalVocabularyDefault.specialLiteral
          (DecimalGoalVocabularyDefault.bytes body1) none false := by
        rw [bodyRender]
        exact numeric_not_special unsigned false unsigned_sign unsigned_valid
      have noNan : ¬ DecimalGoalVocabularyDefault.specialLiteral
          (DecimalGoalVocabularyDefault.bytes body1) none true := by
        rw [bodyRender]
        exact numeric_not_special unsigned true unsigned_sign unsigned_valid
      have specialReject :=
        SpecialHelperRejection body1 (decide (first = 45#u8))
          bodyValid noInf noNan
      obtain ⟨empty, hempty, traced⟩ := bind_ok_inv _ _ _ traced
      by_cases emptyTrue : empty = true
      · simp only [emptyTrue, if_true] at traced
        obtain ⟨pfe, hpfe, traced⟩ := bind_ok_inv _ _ _ traced
        cases traced
      · have emptyFalse : empty = false := Bool.eq_false_of_not_eq_true emptyTrue
        simp only [emptyFalse, if_false] at traced
        obtain ⟨parsed, hparsed, traced⟩ := bind_ok_inv _ _ _ traced
        cases parsed with
        | none =>
            obtain ⟨special, hspecial, traced⟩ := bind_ok_inv _ _ _ traced
            rw [specialReject] at hspecial
            cases hspecial
            obtain ⟨pfe, hpfe, traced⟩ := bind_ok_inv _ _ _ traced
            cases traced
        | some r =>
            obtain ⟨fast, hfast, traced⟩ := bind_ok_inv _ _ _ traced
            cases fast with
            | some value =>
                have hnative := NativeCorrectOrDefer
                  ({ r with negative := decide (first = 45#u8) })
                  (some value) hfast
                rcases hnative with hnone | ⟨value', magnitude, hvalue, _, _, hsigned⟩
                · simp at hnone
                · cases hvalue
                  cases traced
                  refine ⟨magnitude, ?_⟩
                  simpa [signEq] using hsigned
            | none =>
                obtain ⟨firstPair, hfirstPair, traced⟩ := bind_ok_inv _ _ _ traced
                obtain ⟨phase1, hphase1, traced⟩ := bind_ok_inv _ _ _ traced
                rcases phase1 with ⟨many1, many2, firstPair1, fp, guard⟩
                obtain ⟨phase2, hphase2, traced⟩ := bind_ok_inv _ _ _ traced
                rcases phase2 with
                  ⟨post, secondExp, secondMant, secondResult, secondEqual, forced⟩
                obtain ⟨phase3, hphase3, traced⟩ := bind_ok_inv _ _ _ traced
                rcases phase3 with ⟨selected, slowGuard, slowResult⟩
                obtain ⟨i, hi, traced⟩ := bind_ok_inv _ _ _ traced
                obtain ⟨i1, hi1, traced⟩ := bind_ok_inv _ _ _ traced
                obtain ⟨i2, hi2, traced⟩ := bind_ok_inv _ _ _ traced
                obtain ⟨word, hword, traced⟩ := bind_ok_inv _ _ _ traced
                obtain ⟨assembled, hassembled, traced⟩ := bind_ok_inv _ _ _ traced
                by_cases negative : first = 45#u8
                · simp only [negative, if_true] at traced
                  obtain ⟨result, hresult, traced⟩ := bind_ok_inv _ _ _ traced
                  cases traced
                  obtain ⟨wordSpec, wordBound⟩ :=
                    ParserSelectedMagnitudeSign
                      (⟨first :: tail, source_bound⟩ : Str) f _ hsource hout
                  change DecimalGoalVocabularyDefault.assembledWord selected word at wordSpec
                  change word.val < 2 ^ 63 at wordBound
                  obtain ⟨canonical, hcanonical, canonicalSpec⟩ :=
                    AssemblyCorrespondence selected
                  rw [hassembled] at hcanonical
                  cases hcanonical
                  have assembledVal : assembled.val = word.val := by
                    dsimp only [DecimalGoalVocabularyDefault] at wordSpec canonicalSpec
                    exact canonicalSpec.trans wordSpec.symm
                  have assembledBound : assembled.val < 2 ^ 63 := by omega
                  refine ⟨assembled, ?_⟩
                  rw [← signEq]
                  simp only [negative, decide_true]
                  change ModelF64Neg assembled = ok f at hresult
                  cases hresult
                  dsimp only [DecimalGoalVocabularyDefault]
                  refine ⟨assembledBound, ?_⟩
                  have hxor : assembled.val ^^^ (2 ^ 63) =
                      (2 ^ 63) ||| assembled.val := by
                    apply Nat.eq_of_testBit_eq
                    intro k
                    rw [Nat.testBit_xor, Nat.testBit_or, Nat.testBit_two_pow]
                    by_cases hk : k = 63
                    · subst k
                      rw [Nat.testBit_lt_two_pow assembledBound]
                      decide
                    · have hk' : 63 ≠ k := Ne.symm hk
                      simp [hk, hk']
                  have hor : (2 ^ 63) ||| assembled.val =
                      assembled.val + 2 ^ 63 := by
                    have h := Nat.two_pow_add_eq_or_of_lt assembledBound 1
                    simpa [Nat.add_comm] using h.symm
                  change (assembled.bv ^^^ BitVec.ofNat 64 (2 ^ 63)).toNat =
                    assembled.val + 2 ^ 63
                  rw [BitVec.toNat_xor, BitVec.toNat_ofNat]
                  norm_num
                  exact hxor.trans hor
                · simp only [negative, if_false] at traced
                  cases traced
                  obtain ⟨wordSpec, wordBound⟩ :=
                    ParserSelectedMagnitudeSign
                      (⟨first :: tail, source_bound⟩ : Str) f _ hsource hout
                  change DecimalGoalVocabularyDefault.assembledWord selected word at wordSpec
                  change word.val < 2 ^ 63 at wordBound
                  obtain ⟨canonical, hcanonical, canonicalSpec⟩ :=
                    AssemblyCorrespondence selected
                  rw [hassembled] at hcanonical
                  cases hcanonical
                  have assembledVal : f.val = word.val := by
                    dsimp only [DecimalGoalVocabularyDefault] at wordSpec canonicalSpec
                    exact canonicalSpec.trans wordSpec.symm
                  have assembledBound : f.val < 2 ^ 63 := by omega
                  refine ⟨f, ?_⟩
                  rw [← signEq]
                  simp only [negative, decide_false]
                  dsimp only [DecimalGoalVocabularyDefault]
                  exact ⟨assembledBound, by simp⟩

end dec2flt_model

Proof structure

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

Explore this dependency tree

Inspect related source (201)
More program dependencies (159)
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 183 entries
Technical checking records
Local closure summary
{
  "node": "ParserNumericSign",
  "closure_version": "patch_c_v1",
  "active_decl_hash": "233cb88e7aad81fc48a47f4bc97b679536a3fab781f2cdbc3605160043fa3394",
  "active_statement_hash": "46f26e04cb84d054a6de5e92e87ec56e193ded13ba0c9d2932637ff683f0f382",
  "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-135",
  "boundary_theorems": {},
  "strict_theorem_deps": {
    "AssemblyCorrespondence": "87bf7c2abde897a2",
    "DecimalGoalVocabularyDefault": "94cb4c406f8efb78",
    "NativeCorrectOrDefer": "4eb7d1b8e4ed1a56",
    "ParserSelectedMagnitudeSign": "70c47baac228615a",
    "SpecialHelperRejection": "e1e229c5dd3ecf3c",
    "num_imp_dec2flt_dec2flt_with_trace": "d2b4145772dccc04",
    "num_imp_traits_Float_SIG_BITS_default": "9ab622d85ef04d94"
  },
  "strict_definition_deps": {
    "DecimalGoalVocabulary": "c08dd4b4aea4abb4",
    "DecimalGoalVocabularyDefault": "3016c00221d29252",
    "DecimalLexeme": "303e59678842cea4",
    "F64": "ec4e25fbaf4e11d4",
    "F64_Insts_CoreOpsArithDivF64F64": "dc44e13a99fc6bed",
    "F64_Insts_CoreOpsArithMulF64F64": "1ae1a9021a654abd",
    "F64_Insts_CoreOpsArithNegF64": "2d9be310c546ea2e",
    "F64_Insts_Dec2flt_modelNumImpDec2fltLemireU64": "30963b4ef656cc79",
    "F64_Insts_Dec2flt_modelNumImpTraitsFloatExtU64": "60afe26c6a80cf0f",
    "F64_Insts_Dec2flt_modelNumImpTraitsFloatU64": "94095c9bf79da164",
    "F64_Insts_Dec2flt_modelNumImpTraitsFloatU64_SIG_TOTAL_BITS": "887b52d84a3fc9c4",
    "ModelF64Neg": "78a021de99eb373b",
    "ModelSliceFirst": "a31394b3c1080f71",
    "Preamble": "86dc391ab250c79b",
    "SourceValidByteSlice": "3dc42716a6378d26",
    "core_ops_arith_Neg": "0ff07135a60bcbf9",
    "num_float_parse_ParseFloatError": "c43614ff2149ecf2",
    "num_imp_dec2flt_Dec2FltAssemblyTrace": "7bda5de02611ad76",
    "num_imp_dec2flt_Dec2FltTrace": "51a72ca46ca811cd",
    "num_imp_dec2flt_Lemire": "1923f90c53d323e6",
    "num_imp_dec2flt_biased_fp_to_float": "acdde060e8d35ca7",
    "num_imp_dec2flt_common_BiasedFp": "5c88d5d7976c5e8f",
    "num_imp_dec2flt_common_BiasedFp_Insts_CoreCmpPartialEqBiasedFp_eq": "fbbf553e3c502a05",
    "num_imp_dec2flt_dec2flt": "f9f7d93449a25efa",
    "num_imp_dec2flt_dec2flt_with_trace": "5665189e0304a27e",
    "num_imp_dec2flt_decimal_Decimal": "4c41a56bf44cb31e",
    "num_imp_dec2flt_decimal_Decimal_try_fast_path": "2e4888f65a06b49f",
    "num_imp_dec2flt_lemire_compute_float": "39d89e3f0a8a9d4c",
    "num_imp_dec2flt_parse_parse_inf_nan": "85655c19a8791b54",
    "num_imp_dec2flt_parse_parse_number": "f73f8bc11faa6db3",
    "num_imp_dec2flt_pfe_empty": "89046d1da5ac1ce2",
    "num_imp_dec2flt_pfe_invalid": "21db875427d92c6d",
    "num_imp_dec2flt_slow_parse_long_mantissa": "cd8af64c3688b60f",
    "num_imp_traits_Float": "02acccb9db3e30f2",
    "num_imp_traits_FloatExt": "f996e5400649797d"
  }
}
Prose assessment
{
  "label": "Recorded Sound: VerifierPass",
  "assessment_status": "VerifierPass",
  "fingerprint_relation": "matches current fingerprint",
  "assessment_fingerprint": "sound-v2:0eb236e214e54bfd6769416c3cf596ed78f62d98ddb871afe06a7d9de5463e62",
  "current_fingerprint": "sound-v2:0eb236e214e54bfd6769416c3cf596ed78f62d98ddb871afe06a7d9de5463e62",
  "superseded_for_theorem_closure": false
}
Review verdicts
{
  "corr_status": "Pass",
  "sound_status": "Pass",
  "substantiveness_status": "Pass"
}