Numeric sign

Numeric sign

Proved
dec2flt
Numeric sign. Every successful numeric result has the literal's lexical sign, including results that underflow to zero or overflow to infinity.

View proof and assumptions

Supporting proofs
Inspect related source (199)
More program dependencies (157)
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_ParserNumericSign :
    forall (s : Str) (x : DecimalLexeme) (f : F64),
      DecimalGoalVocabularyDefault.sourceString s ->
      DecimalGoalVocabularyDefault.validNumeric x ->
      DecimalGoalVocabularyDefault.renderNumeric x = DecimalGoalVocabularyDefault.bytes s ->
      num.imp.dec2flt.dec2flt F64.Insts.Dec2flt_modelNumImpDec2fltLemireU64
        F64.Insts.CoreOpsArithDivF64F64 F64.Insts.CoreOpsArithMulF64F64
        F64.Insts.CoreOpsArithNegF64 s = ok (core.result.Result.Ok f) ->
      (DecimalGoalVocabularyDefault.isNegative f ↔
        DecimalGoalVocabularyDefault.lexicalNegative x = true) := by

The requirement is proved.

Alternate registered target · outside this verdict
theorem P13_T1_ParserNumericSign__Refutation : Not
  (∀ (s : Aeneas.Std.Str) (x : dec2flt_model.DecimalLexeme) (f : dec2flt_model.F64),
    dec2flt_model.DecimalGoalVocabulary.sourceString dec2flt_model.DecimalGoalVocabularyDefault s →
      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}
                (Aeneas.Std.core.result.Result.{0, 0} dec2flt_model.F64 dec2flt_model.num.float_parse.ParseFloatError))
              (@dec2flt_model.num.imp.dec2flt.dec2flt dec2flt_model.F64 Aeneas.Std.U64
                dec2flt_model.F64.Insts.Dec2flt_modelNumImpDec2fltLemireU64
                dec2flt_model.F64.Insts.CoreOpsArithDivF64F64 dec2flt_model.F64.Insts.CoreOpsArithMulF64F64
                dec2flt_model.F64.Insts.CoreOpsArithNegF64 s)
              (@Aeneas.Std.Result.ok.{0}
                (Aeneas.Std.core.result.Result.{0, 0} dec2flt_model.F64 dec2flt_model.num.float_parse.ParseFloatError)
                (@Aeneas.Std.core.result.Result.Ok.{0, 0} dec2flt_model.F64
                  dec2flt_model.num.float_parse.ParseFloatError f)) →
            Iff (dec2flt_model.DecimalGoalVocabulary.isNegative dec2flt_model.DecimalGoalVocabularyDefault f)
              (@Eq.{1} Bool
                (dec2flt_model.DecimalGoalVocabulary.lexicalNegative dec2flt_model.DecimalGoalVocabularyDefault x)
                Bool.true)) := by
Statement registration
Live polarityprove
Authorityregistered Decide default: prove
Registered targetauthored:P13_T1_ParserNumericSign
Closure nodes
  • P13_T1_ParserNumericSign

Models and assumptions

Program assumptions and trust

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

All 34 entries