import Tablet.DecimalGoalVocabularyDefault import Tablet.SourceValidByteSlice 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.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: NumberHelperAccumulatedValue] theorem NumberHelperAccumulatedValue : ∀ (s : Slice Std.U8) (x : DecimalLexeme) d, SourceValidByteSlice s -> s.val ≠ [] -> x.leadingSign = none -> DecimalGoalVocabularyDefault.validNumeric x -> DecimalGoalVocabularyDefault.bytes s = DecimalGoalVocabularyDefault.renderNumeric x -> num.imp.dec2flt.parse.parse_number s = ok (some d) -> (d.many_digits = false ∧ DecimalGoalVocabularyDefault.decimalMagnitude d = DecimalGoalVocabularyDefault.accumulatedMagnitude x) ∨ (d.many_digits = true ∧ DecimalGoalVocabularyDefault.decimalMagnitude d <= DecimalGoalVocabularyDefault.accumulatedMagnitude x ∧ DecimalGoalVocabularyDefault.accumulatedMagnitude x < ((d.mantissa.val + 1 : Nat) : Real) * (10 : Real) ^ d.exponent.val) := by -- BODY sorry end dec2flt_model