Full-significand diagnostic

Full-significand diagnostic

Proved
parse_long_mantissa
Full-significand diagnostic. For every unsigned numeric literal, a normal result is a pair whose assembled word is the nonnegative binary64 rounding of its accumulated-exponent value, retaining the full significand's contribution to rounding.

View proof and assumptions

Revision introducing this program version · decision
Keep the complete original requirement text and its full source-valid unsigned domain. SlowAccumulatedRounding__Refutation proves a normal zero for 2147483648 ones whose accumulated target is infinity, not merely a panic. Repair the final point using i64 count subtraction and final-only saturating exponent combination, while retaining the 768-digit buffer, trimming and discarded-nonzero information. Saturation beyond i64 is allowed only after the final cancellation and corresponds to an existing extreme slow guard. The common new exponent fold changes this source-defined diagnostic meaning and requires fresh Modeling and proof. Restricting this helper to publicly reachable calls, or excluding gigabyte inputs, is not authorized.
Supporting proofs
Inspect related source (198)
More program dependencies (156)
Standard-library dependencies (39)

Related source and models come from the extraction records and declared dependencies.

Lean statement and supporting proof

Proposition checked for this verdict

theorem P13_T1_SlowAccumulatedRounding :
    forall (s : Slice Std.U8) (x : DecimalLexeme) (fp : num.imp.dec2flt.common.BiasedFp),
      SourceValidByteSlice s -> x.leadingSign = none ->
      DecimalGoalVocabularyDefault.validNumeric x ->
      DecimalGoalVocabularyDefault.renderNumeric x = DecimalGoalVocabularyDefault.bytes s ->
      P9_T1_ActualDispatchOperations.slow s = ok fp ->
      exists magnitude : F64,
        DecimalGoalVocabularyDefault.assembledWord fp magnitude ∧
        DecimalGoalVocabularyDefault.roundsMagnitude
          (DecimalGoalVocabularyDefault.accumulatedMagnitude x) magnitude := by

The requirement is proved.

Alternate registered target · outside this verdict
theorem P13_T1_SlowAccumulatedRounding__Refutation : Not
  (∀ (s : Aeneas.Std.Slice.{0} Aeneas.Std.U8) (x : dec2flt_model.DecimalLexeme)
    (fp : dec2flt_model.num.imp.dec2flt.common.BiasedFp),
    dec2flt_model.SourceValidByteSlice s →
      @Eq.{1} (Option.{0} Bool) (dec2flt_model.DecimalLexeme.leadingSign x) (@Option.none.{0} Bool) →
        dec2flt_model.DecimalGoalVocabulary.validNumeric dec2flt_model.DecimalGoalVocabularyDefault x →
          @Eq.{1} (List.{0} Nat)
              (dec2flt_model.DecimalGoalVocabulary.renderNumeric dec2flt_model.DecimalGoalVocabularyDefault x)
              (dec2flt_model.DecimalGoalVocabulary.bytes dec2flt_model.DecimalGoalVocabularyDefault s) →
            @Eq.{1} (Aeneas.Std.Result.{0} dec2flt_model.num.imp.dec2flt.common.BiasedFp)
                (dec2flt_model.P9_T1_DispatchOperations.slow dec2flt_model.P9_T1_ActualDispatchOperations s)
                (@Aeneas.Std.Result.ok.{0} dec2flt_model.num.imp.dec2flt.common.BiasedFp fp) →
              @Exists.{1} dec2flt_model.F64 fun (magnitude : dec2flt_model.F64) =>
                And
                  (dec2flt_model.DecimalGoalVocabulary.assembledWord dec2flt_model.DecimalGoalVocabularyDefault fp
                    magnitude)
                  (dec2flt_model.DecimalGoalVocabulary.roundsMagnitude dec2flt_model.DecimalGoalVocabularyDefault
                    (dec2flt_model.DecimalGoalVocabulary.accumulatedMagnitude dec2flt_model.DecimalGoalVocabularyDefault
                      x)
                    magnitude)) := by
Statement registration
Live polarityprove
Authorityregistered Decide default: prove
Registered targetauthored:P13_T1_SlowAccumulatedRounding
Closure nodes
  • P13_T1_SlowAccumulatedRounding

Models and assumptions

Program assumptions and trust

These modeling choices occur in the declared dependencies of this requirement’s proofs.

All 34 entries