NaN acceptance

NaN acceptance

Proved
dec2flt
NaN acceptance. Every NaN literal returns Ok of a float satisfying is_nan().

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_ParserNanAcceptance :
    forall (s : Str) (sign : Option Bool),
      DecimalGoalVocabularyDefault.sourceString s ->
      DecimalGoalVocabularyDefault.specialLiteral
        (DecimalGoalVocabularyDefault.bytes s) sign true ->
      exists f : F64,
        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.isNan f := by

The requirement is proved.

Alternate registered target · outside this verdict
theorem P13_T1_ParserNanAcceptance__Refutation : Not
  (∀ (s : Aeneas.Std.Str) (sign : Option.{0} Bool),
    dec2flt_model.DecimalGoalVocabulary.sourceString dec2flt_model.DecimalGoalVocabularyDefault s →
      dec2flt_model.DecimalGoalVocabulary.specialLiteral dec2flt_model.DecimalGoalVocabularyDefault
          (dec2flt_model.DecimalGoalVocabulary.bytes dec2flt_model.DecimalGoalVocabularyDefault s) sign Bool.true →
        @Exists.{1} dec2flt_model.F64 fun (f : dec2flt_model.F64) =>
          And
            (@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)))
            (dec2flt_model.DecimalGoalVocabulary.isNan dec2flt_model.DecimalGoalVocabularyDefault f)) := by
Statement registration
Live polarityprove
Authorityregistered Decide default: prove
Registered targetauthored:P13_T1_ParserNanAcceptance
Closure nodes
  • P13_T1_ParserNanAcceptance

Models and assumptions

Program assumptions and trust

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

All 33 entries