Record bounds

Record bounds

Proved
parse_number
Record bounds. For every nonempty byte slice, any returned record has negative = false and mantissa < 10^19.

View proof and assumptions

Supporting proofs
Inspect related source (198)
More program dependencies (156)
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_NumberHelperRecordBounds :
    forall (s : Slice Std.U8) (d : num.imp.dec2flt.decimal.Decimal),
      SourceValidByteSlice s -> s.val ≠ [] ->
      P9_T1_ActualDispatchOperations.parseNumber s = ok (some d) ->
      d.negative = false ∧ d.mantissa.val < 10 ^ 19 := by

The requirement is proved.

Alternate registered target · outside this verdict
theorem P13_T1_NumberHelperRecordBounds__Refutation : Not
  (∀ (s : Aeneas.Std.Slice.{0} Aeneas.Std.U8) (d : dec2flt_model.num.imp.dec2flt.decimal.Decimal),
    dec2flt_model.SourceValidByteSlice s →
      @Ne.{1} (List.{0} Aeneas.Std.U8)
          (@Subtype.val.{1} (List.{0} Aeneas.Std.U8)
            (fun (l : List.{0} Aeneas.Std.U8) =>
              @LE.le.{0} Nat instLENat (@List.length.{0} Aeneas.Std.U8 l) Aeneas.Std.Usize.max)
            s)
          (@List.nil.{0} Aeneas.Std.U8) →
        @Eq.{1} (Aeneas.Std.Result.{0} (Option.{0} dec2flt_model.num.imp.dec2flt.decimal.Decimal))
            (dec2flt_model.P9_T1_DispatchOperations.parseNumber dec2flt_model.P9_T1_ActualDispatchOperations s)
            (@Aeneas.Std.Result.ok.{0} (Option.{0} dec2flt_model.num.imp.dec2flt.decimal.Decimal)
              (@Option.some.{0} dec2flt_model.num.imp.dec2flt.decimal.Decimal d)) →
          And (@Eq.{1} Bool (dec2flt_model.num.imp.dec2flt.decimal.Decimal.negative d) Bool.false)
            (@LT.lt.{0} Nat instLTNat
              (@Aeneas.Std.UScalar.val Aeneas.Std.UScalarTy.U64
                (dec2flt_model.num.imp.dec2flt.decimal.Decimal.mantissa d))
              (@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 10) (instOfNatNat (nat_lit 10)))
                (@OfNat.ofNat.{0} Nat (nat_lit 19) (instOfNatNat (nat_lit 19)))))) := by
Statement registration
Live polarityprove
Authorityregistered Decide default: prove
Registered targetauthored:P13_T1_NumberHelperRecordBounds
Closure nodes
  • P13_T1_NumberHelperRecordBounds

Models and assumptions

Program assumptions and trust

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

All 34 entries