ParserSlowReachableDecimalSeq

Lean checked

Statement

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

Lemma · Reachable slow parsing and initial decimal sequence

Let a source-valid string s render a valid numeric lexeme x, and suppose the traced dispatcher succeeds with an assembled trace t whose slow-path guard is true. Then there is a decimal sequence d such that parsing t.\mathit{body} returns d, slow parsing that body returns t.\mathit{selected\_pair}, and the trace's assembly result is the assembled word of that pair.
Write n=d.\mathit{num\_digits}, let I be the base-ten fold of the first n stored digit cells, and put
R=I10^{d.\mathit{decimal\_point}-n},\qquad u=10^{d.\mathit{decimal\_point}-768}.
Then n\le768, every one of those cells is a decimal digit, and there is a real \eta such that, for A=\operatorname{accumulatedMagnitude}(x),
A=R+\eta,\quad 0\le\eta<u,\quad (d.\mathit{truncated}=\mathrm{true}\iff0<\eta), \quad -655701\le d.\mathit{decimal\_point}\le655686.
These are exactly the equations and conjunctions 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.AssemblyCorrespondence
import Tablet.DecimalSeqPointAgreement
import Tablet.DecimalSeqReconstruction
import Tablet.DecimalSeqRetainedValue
import Tablet.DecimalGoalVocabularyDefault
import Tablet.NumberHelperAccumulatedValue
import Tablet.ParserAssemblyResidue
import Tablet.ParserExponentConstants
import Tablet.ParserNumberScanAccounting
import Tablet.ParserNumericTraceShape
import Tablet.ParserSlowControlFlow
import Tablet.SourceValidByteSlice
import Tablet.ModelU64BitOr
import Tablet.ModelU64Shl
import Tablet.num_imp_dec2flt_biased_fp_to_float
import Tablet.num_imp_dec2flt_dec2flt_with_trace
import Tablet.num_imp_dec2flt_decimal_seq_DecimalSeq
import Tablet.num_imp_dec2flt_decimal_seq_DecimalSeq_try_add_digit
import Tablet.num_imp_dec2flt_decimal_seq_count_trailing_zeros
import Tablet.num_imp_dec2flt_decimal_seq_parse_decimal_seq
import Tablet.num_imp_dec2flt_lemire_compute_float
import Tablet.num_imp_dec2flt_parse_MIN_19DIGIT_INT
import Tablet.num_imp_dec2flt_parse_adjust_many_digit_count
import Tablet.num_imp_dec2flt_parse_parse_many_digits
import Tablet.num_imp_dec2flt_parse_parse_number
import Tablet.num_imp_dec2flt_parse_parse_partial_number
import Tablet.num_imp_dec2flt_parse_parse_scientific
import Tablet.num_imp_dec2flt_parse_try_parse_19digits
import Tablet.num_imp_dec2flt_parse_try_parse_digits
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: ParserSlowReachableDecimalSeq]
theorem ParserSlowReachableDecimalSeq :
    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 /\
        d.num_digits.val <= 768 /\
        (forall z, z ∈ d.digits.val.take d.num_digits.val -> z.val < 10) /\
        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))
        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.

Earlier prose review

An earlier review questioned the prose argument. Lean subsequently checked the formal proof. Review of the statement’s intended meaning is a separate judgment.

Proof

Apply ParserNumericTraceShape to the dispatcher equation. Its fast alternative is impossible because the supplied trace constructor is Assembled. Constructor injectivity in the assembled alternative therefore supplies a parsed record r and the following facts about b=t.\mathit{body}: it is nonempty and source-valid, it renders the lexeme x_0 obtained from x by clearing only leadingSign, and
\texttt{parse\_number($b$)=ok (some $r$)}. \tag{1}
Validity is unchanged by clearing the sign, and unfolding DecimalGoalVocabularyDefault shows that accumulated magnitude also ignores this field, so \operatorname{accumulatedMagnitude}(x_0)=A.
Invoke ParserNumberScanAccounting on (1). In its notation, P is the point position after the complete significand's leading zero run, h is the number of significant positions retained by the ordinary scan or retry, and E is the independently accumulated signed scientific exponent. Its statement gives
r.\mathit{exponent}=P-h+E,\quad 0\le h\le19, \quad -655359\le E\le655359, \tag{2}
and also says that a true many-digit flag makes the mantissa positive.
Pass that positivity implication to ParserSlowControlFlow, together with the successful dispatcher, true guard, and (1). It yields
-342\le r.\mathit{exponent}\le308, \tag{3}
and a sequence d satisfying both
\texttt{parse\_decimal\_seq($b$)=ok $d$},\qquad \texttt{parse\_long\_mantissa($b$)=ok $t.selected\_pair$}. \tag{4}
Integer arithmetic on (2)--(3) gives
-342\le P+E=r.\mathit{exponent}+h\le327 \tag{5}
and, using the two bounds on E,
-655701\le P\le655686. \tag{6}
Apply DecimalSeqReconstruction to the first equation in (4). Let C' and N be its fully reconstructed digit word and length after leading and trailing zero deletion. The child statement gives
n=\min(N,768), \tag{7}
identifies the first n array values exactly with C'.take n, and gives
d.\mathit{truncated}=\mathrm{true}\iff N>768. \tag{8}
The independently proved DecimalSeqPointAgreement, applied to the same parse equation and the bounds (5), gives
d.\mathit{decimal\_point}=P+E. \tag{9}
Now apply DecimalSeqRetainedValue to (7), the exact stored-prefix identity, (8), and (9). Its conclusion is exactly the remaining numerical package: n\le768; every retained array cell is below ten; and there is a real \eta such that
A=I10^{d.\mathit{decimal\_point}-n}+\eta, \quad 0\le\eta<10^{d.\mathit{decimal\_point}-768}, \quad(d.\mathit{truncated}=\mathrm{true}\iff0<\eta). \tag{10}
Here its accumulated magnitude is initially written for x_0, but the sign-insensitivity equality established above changes it to A without altering any other term. Equation (9) and the stronger interval (5) imply the requested wider decimal-point interval.
Finally ParserAssemblyResidue, applied to the original dispatcher equation, states directly that assembledWord(t.selected\_pair, t.assembly\_result). Choose the sequence d from (4) and the error \eta from (10). Equations (4), the assembly statement, and every clause of (10), together with the point bounds from (5), are precisely the existential and conjunctions of the lemma.

Lean proof


  intro 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, _hsign, _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
    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
    let leadingZeros := significand.length - significant.length
    let P : Int := (unsigned.integerDigits.length : Int) - leadingZeros
    let h : Int := (min significant.length 19 : Nat)
    let E : Int :=
      DecimalGoalVocabularyDefault.accumulatedExplicitExponent unsigned

    have hscan := ParserNumberScanAccounting tr.body unsigned parsed
      hbodySource hbodyNonempty hunsignedSign hunsignedValid
      hunsignedRender hparseNumber
    change parsed.exponent.val = P - h + E /\
      0 <= h /\ h <= 19 /\ -655359 <= E /\ E <= 655359 /\
      (parsed.many_digits = true -> 0 < parsed.mantissa.val) at hscan
    rcases hscan with
      ⟨hre, hhLower, hhUpper, hELower, hEUpper, hmanyPositive⟩
    obtain ⟨hrLower, hrUpper, d, hparseSeq, hslowResult⟩ :=
      ParserSlowControlFlow s f tr parsed hsource htrace hslowGuard
        hparseNumber hmanyPositive
    have hpointSumLower : -342 <= P + E := by omega
    have hpointSumUpper : P + E <= 327 := by omega
    have hPLower : -655701 <= P := by omega
    have hPUpper : P <= 655686 := by omega

    have hreconstruction := DecimalSeqReconstruction tr.body unsigned d
      hbodySource hunsignedSign hunsignedValid hunsignedRender hparseSeq
    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⟩

    have hpoint := DecimalSeqPointAgreement tr.body unsigned d
      hbodySource hunsignedSign hunsignedValid hunsignedRender hparseSeq
    change -342 <= P + E -> P + E <= 327 ->
      d.decimal_point.val = P + E at hpoint
    specialize hpoint hpointSumLower hpointSumUpper

    have hretained := DecimalSeqRetainedValue unsigned d
      hunsignedSign hunsignedValid
    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) ->
      d.decimal_point.val = P + E ->
      d.num_digits.val <= 768 /\
        (forall z, z ∈ d.digits.val.take d.num_digits.val -> z.val < 10) /\
        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))
        exists eta : Real,
          DecimalGoalVocabularyDefault.accumulatedMagnitude unsigned =
              retainedValue + eta /\
          0 <= eta /\ eta < cutoff /\
          (d.truncated = true <-> 0 < eta) at hretained
    obtain ⟨hcountBound, hdigitBound, eta, hmagnitudeUnsigned,
      hetaNonnegative, hetaCutoff, hetaSticky⟩ :=
      hretained hdigitCount hstoredPrefix htruncated hpoint
    have hmagnitude :
        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 := by
      simpa [unsigned, DecimalGoalVocabularyDefault] using hmagnitudeUnsigned
    have hassembledWord := ParserAssemblyResidue s f tr hsource htrace
    refine ⟨d, hparseSeq, hslowResult, hassembledWord,
      hcountBound, hdigitBound, ?_⟩
    refine ⟨eta, hmagnitude, hetaNonnegative, hetaCutoff, hetaSticky, ?_, ?_⟩
    · omega
    · omega

end dec2flt_model

Download Lean source · Download TeX source

Complete Lean module
import Tablet.AssemblyCorrespondence
import Tablet.DecimalSeqPointAgreement
import Tablet.DecimalSeqReconstruction
import Tablet.DecimalSeqRetainedValue
import Tablet.DecimalGoalVocabularyDefault
import Tablet.NumberHelperAccumulatedValue
import Tablet.ParserAssemblyResidue
import Tablet.ParserExponentConstants
import Tablet.ParserNumberScanAccounting
import Tablet.ParserNumericTraceShape
import Tablet.ParserSlowControlFlow
import Tablet.SourceValidByteSlice
import Tablet.ModelU64BitOr
import Tablet.ModelU64Shl
import Tablet.num_imp_dec2flt_biased_fp_to_float
import Tablet.num_imp_dec2flt_dec2flt_with_trace
import Tablet.num_imp_dec2flt_decimal_seq_DecimalSeq
import Tablet.num_imp_dec2flt_decimal_seq_DecimalSeq_try_add_digit
import Tablet.num_imp_dec2flt_decimal_seq_count_trailing_zeros
import Tablet.num_imp_dec2flt_decimal_seq_parse_decimal_seq
import Tablet.num_imp_dec2flt_lemire_compute_float
import Tablet.num_imp_dec2flt_parse_MIN_19DIGIT_INT
import Tablet.num_imp_dec2flt_parse_adjust_many_digit_count
import Tablet.num_imp_dec2flt_parse_parse_many_digits
import Tablet.num_imp_dec2flt_parse_parse_number
import Tablet.num_imp_dec2flt_parse_parse_partial_number
import Tablet.num_imp_dec2flt_parse_parse_scientific
import Tablet.num_imp_dec2flt_parse_try_parse_19digits
import Tablet.num_imp_dec2flt_parse_try_parse_digits
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: ParserSlowReachableDecimalSeq]
theorem ParserSlowReachableDecimalSeq :
    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 /\
        d.num_digits.val <= 768 /\
        (forall z, z ∈ d.digits.val.take d.num_digits.val -> z.val < 10) /\
        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))
        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
  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, _hsign, _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
    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
    let leadingZeros := significand.length - significant.length
    let P : Int := (unsigned.integerDigits.length : Int) - leadingZeros
    let h : Int := (min significant.length 19 : Nat)
    let E : Int :=
      DecimalGoalVocabularyDefault.accumulatedExplicitExponent unsigned

    have hscan := ParserNumberScanAccounting tr.body unsigned parsed
      hbodySource hbodyNonempty hunsignedSign hunsignedValid
      hunsignedRender hparseNumber
    change parsed.exponent.val = P - h + E /\
      0 <= h /\ h <= 19 /\ -655359 <= E /\ E <= 655359 /\
      (parsed.many_digits = true -> 0 < parsed.mantissa.val) at hscan
    rcases hscan with
      ⟨hre, hhLower, hhUpper, hELower, hEUpper, hmanyPositive⟩
    obtain ⟨hrLower, hrUpper, d, hparseSeq, hslowResult⟩ :=
      ParserSlowControlFlow s f tr parsed hsource htrace hslowGuard
        hparseNumber hmanyPositive
    have hpointSumLower : -342 <= P + E := by omega
    have hpointSumUpper : P + E <= 327 := by omega
    have hPLower : -655701 <= P := by omega
    have hPUpper : P <= 655686 := by omega

    have hreconstruction := DecimalSeqReconstruction tr.body unsigned d
      hbodySource hunsignedSign hunsignedValid hunsignedRender hparseSeq
    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⟩

    have hpoint := DecimalSeqPointAgreement tr.body unsigned d
      hbodySource hunsignedSign hunsignedValid hunsignedRender hparseSeq
    change -342 <= P + E -> P + E <= 327 ->
      d.decimal_point.val = P + E at hpoint
    specialize hpoint hpointSumLower hpointSumUpper

    have hretained := DecimalSeqRetainedValue unsigned d
      hunsignedSign hunsignedValid
    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) ->
      d.decimal_point.val = P + E ->
      d.num_digits.val <= 768 /\
        (forall z, z ∈ d.digits.val.take d.num_digits.val -> z.val < 10) /\
        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))
        exists eta : Real,
          DecimalGoalVocabularyDefault.accumulatedMagnitude unsigned =
              retainedValue + eta /\
          0 <= eta /\ eta < cutoff /\
          (d.truncated = true <-> 0 < eta) at hretained
    obtain ⟨hcountBound, hdigitBound, eta, hmagnitudeUnsigned,
      hetaNonnegative, hetaCutoff, hetaSticky⟩ :=
      hretained hdigitCount hstoredPrefix htruncated hpoint
    have hmagnitude :
        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 := by
      simpa [unsigned, DecimalGoalVocabularyDefault] using hmagnitudeUnsigned
    have hassembledWord := ParserAssemblyResidue s f tr hsource htrace
    refine ⟨d, hparseSeq, hslowResult, hassembledWord,
      hcountBound, hdigitBound, ?_⟩
    refine ⟨eta, hmagnitude, hetaNonnegative, hetaCutoff, hetaSticky, ?_, ?_⟩
    · omega
    · omega

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 212 entries
Technical checking records
Local closure summary
{
  "node": "ParserSlowReachableDecimalSeq",
  "closure_version": "patch_c_v1",
  "active_decl_hash": "015feb216454ac35dc04fd42051da74ebecf2ebe63f5733a85574edbf21c2ee2",
  "active_statement_hash": "899433769f024c9fd3195f7ca1e66919f45168d133376159e046436444bafd03",
  "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-171",
  "boundary_theorems": {},
  "strict_theorem_deps": {
    "AssemblyCorrespondence": "87bf7c2abde897a2",
    "DecimalGoalVocabularyDefault": "2bbf2be48b5a4a4b",
    "DecimalSeqPointAgreement": "6850deede1158d0e",
    "DecimalSeqReconstruction": "5a7bf4bd4284fc62",
    "DecimalSeqRetainedValue": "05913e15e9364215",
    "ParserAssemblyResidue": "eefc6b3ce984345f",
    "ParserNumberScanAccounting": "26b2d95a990d8906",
    "ParserNumericTraceShape": "5cc80ccbad3dbbfc",
    "ParserSlowControlFlow": "82f0a592f0d4c9ec",
    "num_imp_dec2flt_Dec2FltTrace": "850871d9c1a12b39"
  },
  "strict_definition_deps": {
    "DecimalGoalVocabulary": "986725aca5ee5702",
    "DecimalGoalVocabularyDefault": "f230c9551c8d76e0",
    "DecimalLexeme": "bf0c609978369054",
    "DecimalSeqPointAgreement": "55eb6bce0e8a4131",
    "DecimalSeqReconstruction": "55eb6bce0e8a4131",
    "DecimalSeqRetainedValue": "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",
    "ParserNumberScanAccounting": "55eb6bce0e8a4131",
    "SourceValidByteSlice": "3dc42716a6378d26",
    "num_float_parse_ParseFloatError": "c43614ff2149ecf2",
    "num_imp_dec2flt_Dec2FltAssemblyTrace": "f2e3172d150bce83",
    "num_imp_dec2flt_Dec2FltTrace": "27322b4608129f59",
    "num_imp_dec2flt_common_BiasedFp": "5c88d5d7976c5e8f",
    "num_imp_dec2flt_dec2flt_with_trace": "ebe6a57c6dce0df6",
    "num_imp_dec2flt_decimal_Decimal": "63fd2f021dd0ef41",
    "num_imp_dec2flt_decimal_seq_DecimalSeq": "59bf1ff9fe88fa8d",
    "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": "Sound flag superseded by recorded Lean closure",
  "assessment_status": "ReviewerPinnedFail",
  "fingerprint_relation": "differs from current fingerprint",
  "assessment_fingerprint": "sound-v2:3b06737b4cf80e7b24b40c14f7f293533b54a52267c6eecf95cfc41e03904edf",
  "current_fingerprint": "sound-v2:e9550e3b03bfeee87e0322e94f37ea6f6cc9894d715a1cda893f2b14a68e7fd4",
  "superseded_for_theorem_closure": true
}
Review verdicts
{
  "corr_status": "Pass",
  "sound_status": "Fail",
  "substantiveness_status": "Pass"
}