import Tablet.Assumptions import Tablet.DecimalGoalVocabularyDefault import Tablet.NumberHelperPartialAcceptanceSafeLength import Tablet.NumberHelperScientificExponentBounds import Tablet.SliceU8_Insts_Dec2flt_modelNumImpDec2fltCommonByteSlice_offset_from import Tablet.SliceU8_Insts_Dec2flt_modelNumImpDec2fltCommonByteSlice_read_u64 import Tablet.SourceValidByteSlice import Tablet.num_imp_dec2flt_common_is_8digits 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_8digits 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 open Aeneas Aeneas.Std Result ControlFlow Error set_option autoImplicit false namespace dec2flt_model -- [TABLET NODE: NumberHelperAcceptanceSafeLength] theorem NumberHelperAcceptanceSafeLength : forall (s : Slice Std.U8) (x : DecimalLexeme), SourceValidByteSlice s -> s.val != [] -> x.leadingSign = none -> DecimalGoalVocabularyDefault.validNumeric x -> DecimalGoalVocabularyDefault.bytes s = DecimalGoalVocabularyDefault.renderNumeric x -> s.val.length <= 9223372036854120458 -> exists d, num.imp.dec2flt.parse.parse_number s = ok (some d) := by -- BODY intro s x hsource hne hsign hvalid hbytes hlen obtain ⟨d, hd⟩ := NumberHelperPartialAcceptanceSafeLength s x hsource hne hsign hvalid hbytes hlen refine ⟨d, ?_⟩ simp [num.imp.dec2flt.parse.parse_number, hd] end dec2flt_model