Signed zero

Signed zero

Proved
dec2flt
Signed zero. On acceptance, a numeric literal denoting zero returns zero with its lexical sign.

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_ParserSignedZero :
    forall (s : Str) (x : DecimalLexeme) (f : F64),
      DecimalGoalVocabularyDefault.sourceString s ->
      DecimalGoalVocabularyDefault.validNumeric x ->
      DecimalGoalVocabularyDefault.renderNumeric x = DecimalGoalVocabularyDefault.bytes s ->
      DecimalGoalVocabularyDefault.exactMagnitude x = 0 ->
      num.imp.dec2flt.dec2flt F64.Insts.Dec2flt_modelNumImpDec2fltLemireU64
        F64.Insts.CoreOpsArithDivF64F64 F64.Insts.CoreOpsArithMulF64F64
        F64.Insts.CoreOpsArithNegF64 s = ok (core.result.Result.Ok f) ->
      f.val = if DecimalGoalVocabularyDefault.lexicalNegative x then 2 ^ 63 else 0 := by

The requirement is proved.

Alternate registered target · outside this verdict
theorem P13_T1_ParserSignedZero__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} Real (dec2flt_model.DecimalGoalVocabulary.exactMagnitude dec2flt_model.DecimalGoalVocabularyDefault x)
              (@OfNat.ofNat.{0} Real (nat_lit 0) (@Zero.toOfNat0.{0} Real Real.instZero)) →
            @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)) →
              @Eq.{1} Nat (@Aeneas.Std.UScalar.val Aeneas.Std.UScalarTy.U64 f)
                (@ite.{1} Nat
                  (@Eq.{1} Bool
                    (dec2flt_model.DecimalGoalVocabulary.lexicalNegative dec2flt_model.DecimalGoalVocabularyDefault x)
                    Bool.true)
                  (instDecidableEqBool
                    (dec2flt_model.DecimalGoalVocabulary.lexicalNegative dec2flt_model.DecimalGoalVocabularyDefault x)
                    Bool.true)
                  (@HPow.hPow.{0, 0, 0} Nat Nat Nat (@instHPow.{0, 0} Nat Nat (@Monoid.toPow.{0} Nat Nat.instMonoid))
                    (@OfNat.ofNat.{0} Nat (nat_lit 2) (instOfNatNat (nat_lit 2)))
                    (@OfNat.ofNat.{0} Nat (nat_lit 63) (instOfNatNat (nat_lit 63))))
                  (@OfNat.ofNat.{0} Nat (nat_lit 0) (instOfNatNat (nat_lit 0))))) := by
Statement registration
Live polarityprove
Authorityregistered Decide default: prove
Registered targetauthored:P13_T1_ParserSignedZero
Closure nodes
  • P13_T1_ParserSignedZero

Models and assumptions

Program assumptions and trust

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

All 34 entries