ParserSlowInitialCanonicality

Lean checked

Statement

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

Lemma · Initial canonical slow decimal state

Under the source-valid numeric, successful assembled-trace, and true slow-guard hypotheses, there is a decimal sequence d returned by parsing the trace body; the extracted slow call returns the selected pair and that pair assembles to the trace word. If D is the retained digit list, I its base-ten fold, R=I10^{p-n}, u=10^{p-768}, and A=\operatorname{accumulatedMagnitude}(x), then A\ge0, n\le768, and every retained cell is below ten. Moreover either n=0, D=[], sticky is false, and A=0, or D=z::Z with 1\le z<10 and |D|=n. Finally there is \eta with
A=R+\eta,\quad0\le\eta<u,\quad (d.\mathit{truncated}=\mathrm{true}\iff0<\eta), \quad -655701\le p\le655686.
These alternatives and equations are exactly those in the Lean statement.

Lean statement

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

import Tablet.ParserSlowReachableDecimalSeq
import Tablet.DecimalSeqReconstruction
import Tablet.num_imp_dec2flt_decimal_seq_parse_decimal_seq

open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false

namespace dec2flt_model

-- [TABLET NODE: ParserSlowInitialCanonicality]
theorem ParserSlowInitialCanonicality :
    forall (s : Str) (x : DecimalLexeme) (f : F64)
      (tr : num.imp.dec2flt.Dec2FltAssemblyTrace F64),
      DecimalGoalVocabularyDefault.sourceString s ->
      DecimalGoalVocabularyDefault.validNumeric x ->
      DecimalGoalVocabularyDefault.bytes s =
        DecimalGoalVocabularyDefault.renderNumeric x ->
      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,
            num.imp.dec2flt.Dec2FltTrace.Assembled tr) ->
      tr.slow_path_guard = true ->
      exists d : num.imp.dec2flt.decimal_seq.DecimalSeq,
        num.imp.dec2flt.decimal_seq.parse_decimal_seq tr.body = ok d /\
        num.imp.dec2flt.slow.parse_long_mantissa
          F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 tr.body =
            ok tr.selected_pair /\
        DecimalGoalVocabularyDefault.assembledWord
          tr.selected_pair tr.assembly_result /\
        0 <= DecimalGoalVocabularyDefault.accumulatedMagnitude x /\
        let retainedDigits :=
          (d.digits.val.take d.num_digits.val).map (fun z => z.val)
        let retainedInteger : Nat :=
          retainedDigits.foldl (fun n digit => 10 * n + digit) 0
        let retainedValue : Real :=
          retainedInteger * (10 : Real) ^
            (d.decimal_point.val - (d.num_digits.val : Int))
        let cutoff : Real :=
          (10 : Real) ^ (d.decimal_point.val - (768 : Int))
        d.num_digits.val <= 768 /\
        (forall z, z ∈ d.digits.val.take d.num_digits.val -> z.val < 10) /\
        ((d.num_digits.val = 0 /\ retainedDigits = [] /\
            d.truncated = false /\
            DecimalGoalVocabularyDefault.accumulatedMagnitude x = 0) \/
          (exists z zs, retainedDigits = z :: zs /\ 1 <= z /\ z < 10 /\
            retainedDigits.length = d.num_digits.val)) /\
        exists eta : Real,
          DecimalGoalVocabularyDefault.accumulatedMagnitude x =
              retainedValue + eta /\
          0 <= eta /\ eta < cutoff /\
          (d.truncated = true <-> 0 < eta) /\
          -655701 <= d.decimal_point.val /\
          d.decimal_point.val <= 655686 := 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

Apply ParserSlowReachableDecimalSeq. It gives the same d, both monadic return equations, the assembly relation, n\le768, the cell bound, the displayed error representation, and the point interval. Since I is a fold of natural digits, I\ge0; since every real integral power of ten is positive, R\ge0. Thus A=R+\eta\ge0.
It remains to establish the canonical shape, which is deliberately not hidden inside that cited theorem. Unfold the returned parse using num imp dec2flt decimal seq parse decimal seq and use the exact reconstruction statement DecimalSeqReconstruction. The latter identifies D with the first n=\min(N,768) cells of the source significand after deleting its leading and trailing zero runs, and says that sticky is true exactly when N>768.
If n=0, then N=0: if N>0, its minimum with 768 would be positive. Consequently the reconstructed word and hence D are empty, and N>768 is false, so sticky is false. The base-ten fold is I=0, hence R=0. The sticky/error equivalence supplied by ParserSlowReachableDecimalSeq now says 0<\eta is false. Together with 0\le\eta this gives \eta=0, and A=R+\eta=0. Notice that no claim is made that the stored decimal point is zero; an explicit exponent may have changed it before the zero short-circuit.
If n\ne0, then N>0. Deleting the leading zero run makes the first member of the reconstructed nonempty word nonzero. Source numeric validity, already one of the hypotheses of ParserSlowReachableDecimalSeq, bounds every source digit by nine. Hence its head z satisfies 1\le z<10. Since n\le N, taking n entries has length n; transporting this equality across the reconstruction equation gives D=z::Z and |D|=n. The two cases are exhaustive, and adjoining the facts supplied in the first paragraph proves every conjunct of the stated package.

Lean proof


  intro s x f tr hsource hvalid hbytes htrace hslowGuard
  obtain ⟨d, hparseSeq, hslowResult, hassembledWord, hcountBound,
    hdigitBound, eta, hmagnitude, hetaNonnegative, hetaCutoff,
    hetaSticky, hpointLower, hpointUpper⟩ :=
    ParserSlowReachableDecimalSeq s x f tr hsource hvalid hbytes htrace
      hslowGuard
  have hshape := ParserNumericTraceShape s x f
    (num.imp.dec2flt.Dec2FltTrace.Assembled tr)
    hsource hvalid hbytes htrace
  rcases hshape with hfast | hassembled
  · rcases hfast with
      ⟨body, negative, parsed, fastInput, fastResult, hconstructor, _⟩
    cases hconstructor
  · rcases hassembled with
      ⟨assemblyTrace, parsed, hconstructor, hbodyNonempty, hbodySource,
        hbodyRender, hsignTrace, hparsedField, hparseNumber⟩
    have htraceEq : assemblyTrace = tr := by
      exact num.imp.dec2flt.Dec2FltTrace.Assembled.inj hconstructor.symm
    subst assemblyTrace
    let unsigned : DecimalLexeme := { x with leadingSign := none }
    have hunsignedSign : unsigned.leadingSign = none := rfl
    have hunsignedValid :
        DecimalGoalVocabularyDefault.validNumeric unsigned := by
      simpa [unsigned, DecimalGoalVocabularyDefault] using hvalid
    have hunsignedRender :
        DecimalGoalVocabularyDefault.bytes tr.body =
          DecimalGoalVocabularyDefault.renderNumeric unsigned := by
      simpa [unsigned] using hbodyRender
    have hreconstruction := DecimalSeqReconstruction tr.body unsigned d
      hbodySource hunsignedSign hunsignedValid hunsignedRender hparseSeq
    let significand := unsigned.integerDigits ++
      match unsigned.fractionDigits with | none => [] | some ds => ds
    let significant := significand.dropWhile (fun digit => digit == 0)
    let trimmed :=
      (significant.reverse.dropWhile (fun digit => digit == 0)).reverse
    change d.num_digits.val = min trimmed.length 768 /\
      (d.digits.val.take d.num_digits.val).map (fun z => z.val) =
        trimmed.take d.num_digits.val /\
      (d.truncated = true <-> 768 < trimmed.length) at hreconstruction
    rcases hreconstruction with ⟨hdigitCount, hstoredPrefix, htruncated⟩
    let retainedDigits :=
      (d.digits.val.take d.num_digits.val).map (fun z => z.val)
    have hretainedEq : retainedDigits = trimmed.take d.num_digits.val :=
      hstoredPrefix
    have hsourceDigits : ∀ digit, digit ∈ significand -> digit < 10 := by
      intro digit hdigit
      rcases hunsignedValid with ⟨hinteger, hfraction, hnonempty, hexponent⟩
      simp only [significand, List.mem_append] at hdigit
      rcases hdigit with hdigit | hdigit
      · exact hinteger digit hdigit
      · cases hfrac : unsigned.fractionDigits with
        | none => simp [hfrac] at hdigit
        | some ds =>
            have hdigits : ∀ q, q ∈ ds -> q < 10 := by
              simpa [hfrac] using hfraction
            exact hdigits digit (by simpa [hfrac] using hdigit)
    refine ⟨d, hparseSeq, hslowResult, hassembledWord, ?_⟩
    constructor
    · rw [hmagnitude]
      apply add_nonneg
      · apply mul_nonneg
        · exact_mod_cast (Nat.zero_le
            (List.foldl (fun n digit => 10 * n + digit) 0
              ((d.digits.val.take d.num_digits.val).map (fun z => z.val))))
        · exact zpow_nonneg (by norm_num) _
      · exact hetaNonnegative
    · dsimp only
      refine ⟨hcountBound, hdigitBound, ?_, ?_⟩
      by_cases hn : d.num_digits.val = 0
      · have hmin : min trimmed.length 768 = 0 := by omega
        have htrimLen : trimmed.length = 0 := by
          by_cases hle : trimmed.length ≤ 768
          · rw [Nat.min_eq_left hle] at hmin
            exact hmin
          · rw [Nat.min_eq_right (by omega)] at hmin
            omega
        have htrim : trimmed = [] :=
          List.eq_nil_of_length_eq_zero htrimLen
        have hretainedNil : retainedDigits = [] := by
          rw [hretainedEq, htrim]
          simp
        have htruncFalse : d.truncated = false := by
          have hnot : ¬ d.truncated = true := by
            intro ht
            have hlong : 768 < trimmed.length := htruncated.mp ht
            omega
          exact Bool.eq_false_of_not_eq_true hnot
        have hetaZero : eta = 0 := by
          apply le_antisymm
          · by_contra hpos
            have : 0 < eta := lt_of_not_ge hpos
            have hbad : false = true := htruncFalse ▸ hetaSticky.mpr this
            cases hbad
          · exact hetaNonnegative
        left
        refine ⟨hn, hretainedNil, htruncFalse, ?_⟩
        calc
          DecimalGoalVocabularyDefault.accumulatedMagnitude x =
              (let retainedDigits :=
                (d.digits.val.take d.num_digits.val).map (fun z => z.val)
               let retainedInteger : Nat :=
                retainedDigits.foldl (fun n digit => 10 * n + digit) 0
               retainedInteger * (10 : Real) ^
                 (d.decimal_point.val - (d.num_digits.val : Int))) + eta :=
              hmagnitude
          _ = 0 := by simp [retainedDigits, hretainedNil, hetaZero, hn]
      · have hnpos : 0 < d.num_digits.val := by omega
        have hminPos : 0 < min trimmed.length 768 := by omega
        have htrimPos : 0 < trimmed.length := by
          by_contra hnot
          have hz : trimmed.length = 0 := by omega
          simp [hz] at hminPos
        have hdecomp := DecimalDigitTrimDecomposition significand
        dsimp only at hdecomp
        rcases hdecomp with
          ⟨lead, trail, hlead, htrail, hsplit, htrimSplit, hsigStop,
            htrimStop⟩
        change significant = trimmed ++ List.replicate trail 0 at htrimSplit
        have hsigSuffix : significant <:+ significand := by
          exact List.dropWhile_suffix _
        have htrimNe : trimmed ≠ [] := by
          intro hz
          have : trimmed.length = 0 := by simp [hz]
          omega
        obtain ⟨z, zs, htrim⟩ := List.exists_cons_of_ne_nil htrimNe
        have hzlt : z < 10 := hsourceDigits z (hsigSuffix.mem (by
          rw [htrimSplit, htrim]
          exact List.mem_append_left _ (by simp)))
        have hsigNe : significant ≠ [] := by
          intro hz
          have hpair := htrimSplit.symm
          simp [hz] at hpair
          exact htrimNe hpair.1
        have hhead : significant.head? = some z := by
          rw [htrimSplit, htrim]
          simp
        have hzpos : 0 < z := by
          rcases hsigStop with hnil | hstop
          · exact False.elim (hsigNe hnil)
          · have hne : some z ≠ some 0 := by
              rw [← hhead]
              exact hstop
            have : z ≠ 0 := by
              intro hz
              apply hne
              simp [hz]
            omega
        right
        have hretainedCons : ∃ ws, retainedDigits = z :: ws := by
          refine ⟨(trimmed.take d.num_digits.val).tail, ?_⟩
          rw [hretainedEq, htrim]
          simp [hnpos]
        obtain ⟨ws, hws⟩ := hretainedCons
        have hretainedLen : retainedDigits.length = d.num_digits.val := by
          rw [hretainedEq, List.length_take]
          have hntrim : d.num_digits.val ≤ trimmed.length := by
            rw [hdigitCount]
            exact Nat.min_le_left _ _
          simp [hntrim]
        refine ⟨z, ws, hws, by omega, hzlt, ?_⟩
        · change retainedDigits.length = d.num_digits.val
          exact hretainedLen
      exact ⟨eta, hmagnitude, hetaNonnegative, hetaCutoff, hetaSticky,
        hpointLower, hpointUpper⟩

end dec2flt_model

Download Lean source · Download TeX source

Complete Lean module
import Tablet.ParserSlowReachableDecimalSeq
import Tablet.DecimalSeqReconstruction
import Tablet.num_imp_dec2flt_decimal_seq_parse_decimal_seq

open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false

namespace dec2flt_model

-- [TABLET NODE: ParserSlowInitialCanonicality]
theorem ParserSlowInitialCanonicality :
    forall (s : Str) (x : DecimalLexeme) (f : F64)
      (tr : num.imp.dec2flt.Dec2FltAssemblyTrace F64),
      DecimalGoalVocabularyDefault.sourceString s ->
      DecimalGoalVocabularyDefault.validNumeric x ->
      DecimalGoalVocabularyDefault.bytes s =
        DecimalGoalVocabularyDefault.renderNumeric x ->
      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,
            num.imp.dec2flt.Dec2FltTrace.Assembled tr) ->
      tr.slow_path_guard = true ->
      exists d : num.imp.dec2flt.decimal_seq.DecimalSeq,
        num.imp.dec2flt.decimal_seq.parse_decimal_seq tr.body = ok d /\
        num.imp.dec2flt.slow.parse_long_mantissa
          F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 tr.body =
            ok tr.selected_pair /\
        DecimalGoalVocabularyDefault.assembledWord
          tr.selected_pair tr.assembly_result /\
        0 <= DecimalGoalVocabularyDefault.accumulatedMagnitude x /\
        let retainedDigits :=
          (d.digits.val.take d.num_digits.val).map (fun z => z.val)
        let retainedInteger : Nat :=
          retainedDigits.foldl (fun n digit => 10 * n + digit) 0
        let retainedValue : Real :=
          retainedInteger * (10 : Real) ^
            (d.decimal_point.val - (d.num_digits.val : Int))
        let cutoff : Real :=
          (10 : Real) ^ (d.decimal_point.val - (768 : Int))
        d.num_digits.val <= 768 /\
        (forall z, z ∈ d.digits.val.take d.num_digits.val -> z.val < 10) /\
        ((d.num_digits.val = 0 /\ retainedDigits = [] /\
            d.truncated = false /\
            DecimalGoalVocabularyDefault.accumulatedMagnitude x = 0) \/
          (exists z zs, retainedDigits = z :: zs /\ 1 <= z /\ z < 10 /\
            retainedDigits.length = d.num_digits.val)) /\
        exists eta : Real,
          DecimalGoalVocabularyDefault.accumulatedMagnitude x =
              retainedValue + eta /\
          0 <= eta /\ eta < cutoff /\
          (d.truncated = true <-> 0 < eta) /\
          -655701 <= d.decimal_point.val /\
          d.decimal_point.val <= 655686 := by
-- BODY
  intro s x f tr hsource hvalid hbytes htrace hslowGuard
  obtain ⟨d, hparseSeq, hslowResult, hassembledWord, hcountBound,
    hdigitBound, eta, hmagnitude, hetaNonnegative, hetaCutoff,
    hetaSticky, hpointLower, hpointUpper⟩ :=
    ParserSlowReachableDecimalSeq s x f tr hsource hvalid hbytes htrace
      hslowGuard
  have hshape := ParserNumericTraceShape s x f
    (num.imp.dec2flt.Dec2FltTrace.Assembled tr)
    hsource hvalid hbytes htrace
  rcases hshape with hfast | hassembled
  · rcases hfast with
      ⟨body, negative, parsed, fastInput, fastResult, hconstructor, _⟩
    cases hconstructor
  · rcases hassembled with
      ⟨assemblyTrace, parsed, hconstructor, hbodyNonempty, hbodySource,
        hbodyRender, hsignTrace, hparsedField, hparseNumber⟩
    have htraceEq : assemblyTrace = tr := by
      exact num.imp.dec2flt.Dec2FltTrace.Assembled.inj hconstructor.symm
    subst assemblyTrace
    let unsigned : DecimalLexeme := { x with leadingSign := none }
    have hunsignedSign : unsigned.leadingSign = none := rfl
    have hunsignedValid :
        DecimalGoalVocabularyDefault.validNumeric unsigned := by
      simpa [unsigned, DecimalGoalVocabularyDefault] using hvalid
    have hunsignedRender :
        DecimalGoalVocabularyDefault.bytes tr.body =
          DecimalGoalVocabularyDefault.renderNumeric unsigned := by
      simpa [unsigned] using hbodyRender
    have hreconstruction := DecimalSeqReconstruction tr.body unsigned d
      hbodySource hunsignedSign hunsignedValid hunsignedRender hparseSeq
    let significand := unsigned.integerDigits ++
      match unsigned.fractionDigits with | none => [] | some ds => ds
    let significant := significand.dropWhile (fun digit => digit == 0)
    let trimmed :=
      (significant.reverse.dropWhile (fun digit => digit == 0)).reverse
    change d.num_digits.val = min trimmed.length 768 /\
      (d.digits.val.take d.num_digits.val).map (fun z => z.val) =
        trimmed.take d.num_digits.val /\
      (d.truncated = true <-> 768 < trimmed.length) at hreconstruction
    rcases hreconstruction with ⟨hdigitCount, hstoredPrefix, htruncated⟩
    let retainedDigits :=
      (d.digits.val.take d.num_digits.val).map (fun z => z.val)
    have hretainedEq : retainedDigits = trimmed.take d.num_digits.val :=
      hstoredPrefix
    have hsourceDigits : ∀ digit, digit ∈ significand -> digit < 10 := by
      intro digit hdigit
      rcases hunsignedValid with ⟨hinteger, hfraction, hnonempty, hexponent⟩
      simp only [significand, List.mem_append] at hdigit
      rcases hdigit with hdigit | hdigit
      · exact hinteger digit hdigit
      · cases hfrac : unsigned.fractionDigits with
        | none => simp [hfrac] at hdigit
        | some ds =>
            have hdigits : ∀ q, q ∈ ds -> q < 10 := by
              simpa [hfrac] using hfraction
            exact hdigits digit (by simpa [hfrac] using hdigit)
    refine ⟨d, hparseSeq, hslowResult, hassembledWord, ?_⟩
    constructor
    · rw [hmagnitude]
      apply add_nonneg
      · apply mul_nonneg
        · exact_mod_cast (Nat.zero_le
            (List.foldl (fun n digit => 10 * n + digit) 0
              ((d.digits.val.take d.num_digits.val).map (fun z => z.val))))
        · exact zpow_nonneg (by norm_num) _
      · exact hetaNonnegative
    · dsimp only
      refine ⟨hcountBound, hdigitBound, ?_, ?_⟩
      by_cases hn : d.num_digits.val = 0
      · have hmin : min trimmed.length 768 = 0 := by omega
        have htrimLen : trimmed.length = 0 := by
          by_cases hle : trimmed.length ≤ 768
          · rw [Nat.min_eq_left hle] at hmin
            exact hmin
          · rw [Nat.min_eq_right (by omega)] at hmin
            omega
        have htrim : trimmed = [] :=
          List.eq_nil_of_length_eq_zero htrimLen
        have hretainedNil : retainedDigits = [] := by
          rw [hretainedEq, htrim]
          simp
        have htruncFalse : d.truncated = false := by
          have hnot : ¬ d.truncated = true := by
            intro ht
            have hlong : 768 < trimmed.length := htruncated.mp ht
            omega
          exact Bool.eq_false_of_not_eq_true hnot
        have hetaZero : eta = 0 := by
          apply le_antisymm
          · by_contra hpos
            have : 0 < eta := lt_of_not_ge hpos
            have hbad : false = true := htruncFalse ▸ hetaSticky.mpr this
            cases hbad
          · exact hetaNonnegative
        left
        refine ⟨hn, hretainedNil, htruncFalse, ?_⟩
        calc
          DecimalGoalVocabularyDefault.accumulatedMagnitude x =
              (let retainedDigits :=
                (d.digits.val.take d.num_digits.val).map (fun z => z.val)
               let retainedInteger : Nat :=
                retainedDigits.foldl (fun n digit => 10 * n + digit) 0
               retainedInteger * (10 : Real) ^
                 (d.decimal_point.val - (d.num_digits.val : Int))) + eta :=
              hmagnitude
          _ = 0 := by simp [retainedDigits, hretainedNil, hetaZero, hn]
      · have hnpos : 0 < d.num_digits.val := by omega
        have hminPos : 0 < min trimmed.length 768 := by omega
        have htrimPos : 0 < trimmed.length := by
          by_contra hnot
          have hz : trimmed.length = 0 := by omega
          simp [hz] at hminPos
        have hdecomp := DecimalDigitTrimDecomposition significand
        dsimp only at hdecomp
        rcases hdecomp with
          ⟨lead, trail, hlead, htrail, hsplit, htrimSplit, hsigStop,
            htrimStop⟩
        change significant = trimmed ++ List.replicate trail 0 at htrimSplit
        have hsigSuffix : significant <:+ significand := by
          exact List.dropWhile_suffix _
        have htrimNe : trimmed ≠ [] := by
          intro hz
          have : trimmed.length = 0 := by simp [hz]
          omega
        obtain ⟨z, zs, htrim⟩ := List.exists_cons_of_ne_nil htrimNe
        have hzlt : z < 10 := hsourceDigits z (hsigSuffix.mem (by
          rw [htrimSplit, htrim]
          exact List.mem_append_left _ (by simp)))
        have hsigNe : significant ≠ [] := by
          intro hz
          have hpair := htrimSplit.symm
          simp [hz] at hpair
          exact htrimNe hpair.1
        have hhead : significant.head? = some z := by
          rw [htrimSplit, htrim]
          simp
        have hzpos : 0 < z := by
          rcases hsigStop with hnil | hstop
          · exact False.elim (hsigNe hnil)
          · have hne : some z ≠ some 0 := by
              rw [← hhead]
              exact hstop
            have : z ≠ 0 := by
              intro hz
              apply hne
              simp [hz]
            omega
        right
        have hretainedCons : ∃ ws, retainedDigits = z :: ws := by
          refine ⟨(trimmed.take d.num_digits.val).tail, ?_⟩
          rw [hretainedEq, htrim]
          simp [hnpos]
        obtain ⟨ws, hws⟩ := hretainedCons
        have hretainedLen : retainedDigits.length = d.num_digits.val := by
          rw [hretainedEq, List.length_take]
          have hntrim : d.num_digits.val ≤ trimmed.length := by
            rw [hdigitCount]
            exact Nat.min_le_left _ _
          simp [hntrim]
        refine ⟨z, ws, hws, by omega, hzlt, ?_⟩
        · change retainedDigits.length = d.num_digits.val
          exact hretainedLen
      exact ⟨eta, hmagnitude, hetaNonnegative, hetaCutoff, hetaSticky,
        hpointLower, hpointUpper⟩

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 213 entries
Technical checking records
Local closure summary
{
  "node": "ParserSlowInitialCanonicality",
  "closure_version": "patch_c_v1",
  "active_decl_hash": "3609f3b21910766799e84363f957ca497ea6842a13333243d8018c4859f35467",
  "active_statement_hash": "500c661d3f1c761f4c82afc6293c3971d87e9850cc166c53f8b48fb7f87d0a90",
  "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": "sidecar-sc-20261005-024220-8791e0-ParserSlowInitialCanonicality-cycle-175",
  "boundary_theorems": {},
  "strict_theorem_deps": {
    "AssemblyCorrespondence": "87bf7c2abde897a2",
    "DecimalDigitTrimDecomposition": "74d5424585de54f0",
    "DecimalGoalVocabularyDefault": "2bbf2be48b5a4a4b",
    "DecimalSeqReconstruction": "5a7bf4bd4284fc62",
    "ParserNumericTraceShape": "5cc80ccbad3dbbfc",
    "ParserSlowReachableDecimalSeq": "3594e3f7b19754da",
    "num_imp_dec2flt_Dec2FltTrace": "850871d9c1a12b39"
  },
  "strict_definition_deps": {
    "DecimalGoalVocabulary": "986725aca5ee5702",
    "DecimalGoalVocabularyDefault": "b9386c8d0fd53e6e",
    "DecimalLexeme": "250be645520aec86",
    "DecimalSeqReconstruction": "55eb6bce0e8a4131",
    "F64": "ec4e25fbaf4e11d4",
    "F64_Insts_CoreOpsArithDivF64F64": "dc44e13a99fc6bed",
    "F64_Insts_CoreOpsArithMulF64F64": "1ae1a9021a654abd",
    "F64_Insts_CoreOpsArithNegF64": "2d9be310c546ea2e",
    "F64_Insts_Dec2flt_modelNumImpDec2fltLemireU64": "30963b4ef656cc79",
    "F64_Insts_Dec2flt_modelNumImpTraitsFloatU64": "94095c9bf79da164",
    "SourceValidByteSlice": "3dc42716a6378d26",
    "num_float_parse_ParseFloatError": "c43614ff2149ecf2",
    "num_imp_dec2flt_Dec2FltAssemblyTrace": "2a4d2e4074960bd4",
    "num_imp_dec2flt_Dec2FltTrace": "8fa376ebb5c489ee",
    "num_imp_dec2flt_common_BiasedFp": "c43614ff2149ecf2",
    "num_imp_dec2flt_dec2flt_with_trace": "ebe6a57c6dce0df6",
    "num_imp_dec2flt_decimal_Decimal": "63fd2f021dd0ef41",
    "num_imp_dec2flt_decimal_seq_DecimalSeq": "c43614ff2149ecf2",
    "num_imp_dec2flt_decimal_seq_parse_decimal_seq": "244cf8318357caab",
    "num_imp_dec2flt_parse_parse_number": "f73f8bc11faa6db3",
    "num_imp_dec2flt_slow_parse_long_mantissa": "cd8af64c3688b60f"
  }
}
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:cb0c8e264798922f713189c423826ce7a1e5bce2dbcddb202783dac230654a73",
  "superseded_for_theorem_closure": false
}
Review verdicts
{
  "corr_status": "Pass",
  "substantiveness_status": "Pass"
}