Invalid rejection
Disprovedparse_numberInvalid rejection. Every nonempty byte slice that is not an unsigned
numeric literal returns
None.Also proved for this program
Conditional theorem provedThe input byte slice has length at most ≈ 8 EiB.
The conditional theorem establishes the requirement within this domain. The unrestricted requirement keeps its own verdict above.
Read the conditional proof and assumptionsThe accepted source arithmetic and bounded support establish this sharp uniform rejection boundary. The common invalid witness fails at the immediately following length 9223372036854120460, while realizing any such excluded witness requires one contiguous Rust byte-slice allocation of about 9.22 decimal exabytes (roughly 8 EiB), an exotic or possibly nonexistent hardware object rather than a present-day constructible counterexample.
Conditional theorem
theorem TrellisConditional_c0b964755dfba82a : ∀ (s : Aeneas.Std.Slice.{0} Aeneas.Std.U8),
@LE.le.{0} Nat instLENat
(@List.length.{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))
(@OfNat.ofNat.{0} Nat (nat_lit 9223372036854120459) (instOfNatNat (nat_lit 9223372036854120459))) →
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) →
Not
(@Exists.{1} dec2flt_model.DecimalLexeme fun (x : dec2flt_model.DecimalLexeme) =>
And (@Eq.{1} (Option.{0} Bool) (dec2flt_model.DecimalLexeme.leadingSign x) (@Option.none.{0} Bool))
(And (dec2flt_model.DecimalGoalVocabulary.validNumeric dec2flt_model.DecimalGoalVocabularyDefault x)
(@Eq.{1} (List.{0} Nat)
(dec2flt_model.DecimalGoalVocabulary.bytes dec2flt_model.DecimalGoalVocabularyDefault s)
(dec2flt_model.DecimalGoalVocabulary.renderNumeric dec2flt_model.DecimalGoalVocabularyDefault
x)))) →
@Eq.{1} (Aeneas.Std.Result.{0} (Option.{0} dec2flt_model.num.imp.dec2flt.decimal.Decimal))
(dec2flt_model.num.imp.dec2flt.parse.parse_number s)
(@Aeneas.Std.Result.ok.{0} (Option.{0} dec2flt_model.num.imp.dec2flt.decimal.Decimal)
(@Option.none.{0} dec2flt_model.num.imp.dec2flt.decimal.Decimal)) := byTrellisConditional c0b964755dfba82aThe condition has an instance
theorem TrellisConditional_c0b964755dfba82a__ConditionInhabited : @Exists.{1} (Aeneas.Std.Slice.{0} Aeneas.Std.U8) fun (s : Aeneas.Std.Slice.{0} Aeneas.Std.U8) =>
@LE.le.{0} Nat instLENat
(@List.length.{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))
(@OfNat.ofNat.{0} Nat (nat_lit 9223372036854120459) (instOfNatNat (nat_lit 9223372036854120459))) := byTrellisConditional c0b964755dfba82a ConditionInhabitedThe cited counterexample is excluded
theorem TrellisConditional_c0b964755dfba82a__CounterexampleExcluded : Not
(@LE.le.{0} Nat instLENat
(@List.length.{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)
(@Classical.choose.{1} (Aeneas.Std.Slice.{0} Aeneas.Std.U8)
(fun (x : Aeneas.Std.Slice.{0} Aeneas.Std.U8) =>
And
(@Eq.{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)
x)
(@HAppend.hAppend.{0, 0, 0} (List.{0} (Aeneas.Std.UScalar Aeneas.Std.UScalarTy.U8))
(List.{0} (Aeneas.Std.UScalar Aeneas.Std.UScalarTy.U8))
(List.{0} (Aeneas.Std.UScalar Aeneas.Std.UScalarTy.U8))
(@instHAppendOfAppend.{0} (List.{0} (Aeneas.Std.UScalar Aeneas.Std.UScalarTy.U8))
(@List.instAppend.{0} (Aeneas.Std.UScalar Aeneas.Std.UScalarTy.U8)))
(@HAppend.hAppend.{0, 0, 0} (List.{0} (Aeneas.Std.UScalar Aeneas.Std.UScalarTy.U8))
(List.{0} (Aeneas.Std.UScalar Aeneas.Std.UScalarTy.U8))
(List.{0} (Aeneas.Std.UScalar Aeneas.Std.UScalarTy.U8))
(@instHAppendOfAppend.{0} (List.{0} (Aeneas.Std.UScalar Aeneas.Std.UScalarTy.U8))
(@List.instAppend.{0} (Aeneas.Std.UScalar Aeneas.Std.UScalarTy.U8)))
(@List.cons.{0} (Aeneas.Std.UScalar Aeneas.Std.UScalarTy.U8)
(Aeneas.Std.U8.ofNat (@OfNat.ofNat.{0} Nat (nat_lit 46) (instOfNatNat (nat_lit 46)))
(@of_decide_eq_true
(@LE.le.{0} Nat instLENat (@OfNat.ofNat.{0} Nat (nat_lit 46) (instOfNatNat (nat_lit 46)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8))
(Nat.decLe (@OfNat.ofNat.{0} Nat (nat_lit 46) (instOfNatNat (nat_lit 46)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8))
(@id.{0}
(@Eq.{1} Bool
(@Decidable.decide
(@LE.le.{0} Nat instLENat
(@OfNat.ofNat.{0} Nat (nat_lit 46) (instOfNatNat (nat_lit 46)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8))
(Nat.decLe (@OfNat.ofNat.{0} Nat (nat_lit 46) (instOfNatNat (nat_lit 46)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8)))
Bool.true)
(@Eq.refl.{1} Bool Bool.true))))
(@List.nil.{0} (Aeneas.Std.UScalar Aeneas.Std.UScalarTy.U8)))
(@List.replicate.{0} (Aeneas.Std.UScalar Aeneas.Std.UScalarTy.U8)
(@OfNat.ofNat.{0} Nat (nat_lit 9223372036854120450) (instOfNatNat (nat_lit 9223372036854120450)))
(Aeneas.Std.U8.ofNat (@OfNat.ofNat.{0} Nat (nat_lit 49) (instOfNatNat (nat_lit 49)))
(@of_decide_eq_true
(@LE.le.{0} Nat instLENat (@OfNat.ofNat.{0} Nat (nat_lit 49) (instOfNatNat (nat_lit 49)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8))
(Nat.decLe (@OfNat.ofNat.{0} Nat (nat_lit 49) (instOfNatNat (nat_lit 49)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8))
(@id.{0}
(@Eq.{1} Bool
(@Decidable.decide
(@LE.le.{0} Nat instLENat
(@OfNat.ofNat.{0} Nat (nat_lit 49) (instOfNatNat (nat_lit 49)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8))
(Nat.decLe (@OfNat.ofNat.{0} Nat (nat_lit 49) (instOfNatNat (nat_lit 49)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8)))
Bool.true)
(@Eq.refl.{1} Bool Bool.true))))))
(@List.cons.{0} (Aeneas.Std.UScalar Aeneas.Std.UScalarTy.U8)
(Aeneas.Std.U8.ofNat (@OfNat.ofNat.{0} Nat (nat_lit 101) (instOfNatNat (nat_lit 101)))
(@of_decide_eq_true
(@LE.le.{0} Nat instLENat (@OfNat.ofNat.{0} Nat (nat_lit 101) (instOfNatNat (nat_lit 101)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8))
(Nat.decLe (@OfNat.ofNat.{0} Nat (nat_lit 101) (instOfNatNat (nat_lit 101)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8))
(@id.{0}
(@Eq.{1} Bool
(@Decidable.decide
(@LE.le.{0} Nat instLENat
(@OfNat.ofNat.{0} Nat (nat_lit 101) (instOfNatNat (nat_lit 101)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8))
(Nat.decLe (@OfNat.ofNat.{0} Nat (nat_lit 101) (instOfNatNat (nat_lit 101)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8)))
Bool.true)
(@Eq.refl.{1} Bool Bool.true))))
(@List.cons.{0} (Aeneas.Std.UScalar Aeneas.Std.UScalarTy.U8)
(Aeneas.Std.U8.ofNat (@OfNat.ofNat.{0} Nat (nat_lit 45) (instOfNatNat (nat_lit 45)))
(@of_decide_eq_true
(@LE.le.{0} Nat instLENat (@OfNat.ofNat.{0} Nat (nat_lit 45) (instOfNatNat (nat_lit 45)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8))
(Nat.decLe (@OfNat.ofNat.{0} Nat (nat_lit 45) (instOfNatNat (nat_lit 45)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8))
(@id.{0}
(@Eq.{1} Bool
(@Decidable.decide
(@LE.le.{0} Nat instLENat
(@OfNat.ofNat.{0} Nat (nat_lit 45) (instOfNatNat (nat_lit 45)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8))
(Nat.decLe (@OfNat.ofNat.{0} Nat (nat_lit 45) (instOfNatNat (nat_lit 45)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8)))
Bool.true)
(@Eq.refl.{1} Bool Bool.true))))
(@List.cons.{0} (Aeneas.Std.UScalar Aeneas.Std.UScalarTy.U8)
(Aeneas.Std.U8.ofNat (@OfNat.ofNat.{0} Nat (nat_lit 54) (instOfNatNat (nat_lit 54)))
(@of_decide_eq_true
(@LE.le.{0} Nat instLENat (@OfNat.ofNat.{0} Nat (nat_lit 54) (instOfNatNat (nat_lit 54)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8))
(Nat.decLe (@OfNat.ofNat.{0} Nat (nat_lit 54) (instOfNatNat (nat_lit 54)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8))
(@id.{0}
(@Eq.{1} Bool
(@Decidable.decide
(@LE.le.{0} Nat instLENat
(@OfNat.ofNat.{0} Nat (nat_lit 54) (instOfNatNat (nat_lit 54)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8))
(Nat.decLe (@OfNat.ofNat.{0} Nat (nat_lit 54) (instOfNatNat (nat_lit 54)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8)))
Bool.true)
(@Eq.refl.{1} Bool Bool.true))))
(@List.cons.{0} (Aeneas.Std.UScalar Aeneas.Std.UScalarTy.U8)
(Aeneas.Std.U8.ofNat (@OfNat.ofNat.{0} Nat (nat_lit 53) (instOfNatNat (nat_lit 53)))
(@of_decide_eq_true
(@LE.le.{0} Nat instLENat (@OfNat.ofNat.{0} Nat (nat_lit 53) (instOfNatNat (nat_lit 53)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8))
(Nat.decLe (@OfNat.ofNat.{0} Nat (nat_lit 53) (instOfNatNat (nat_lit 53)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8))
(@id.{0}
(@Eq.{1} Bool
(@Decidable.decide
(@LE.le.{0} Nat instLENat
(@OfNat.ofNat.{0} Nat (nat_lit 53) (instOfNatNat (nat_lit 53)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8))
(Nat.decLe (@OfNat.ofNat.{0} Nat (nat_lit 53) (instOfNatNat (nat_lit 53)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8)))
Bool.true)
(@Eq.refl.{1} Bool Bool.true))))
(@List.cons.{0} (Aeneas.Std.UScalar Aeneas.Std.UScalarTy.U8)
(Aeneas.Std.U8.ofNat (@OfNat.ofNat.{0} Nat (nat_lit 53) (instOfNatNat (nat_lit 53)))
(@of_decide_eq_true
(@LE.le.{0} Nat instLENat
(@OfNat.ofNat.{0} Nat (nat_lit 53) (instOfNatNat (nat_lit 53)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8))
(Nat.decLe (@OfNat.ofNat.{0} Nat (nat_lit 53) (instOfNatNat (nat_lit 53)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8))
(@id.{0}
(@Eq.{1} Bool
(@Decidable.decide
(@LE.le.{0} Nat instLENat
(@OfNat.ofNat.{0} Nat (nat_lit 53) (instOfNatNat (nat_lit 53)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8))
(Nat.decLe (@OfNat.ofNat.{0} Nat (nat_lit 53) (instOfNatNat (nat_lit 53)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8)))
Bool.true)
(@Eq.refl.{1} Bool Bool.true))))
(@List.cons.{0} (Aeneas.Std.UScalar Aeneas.Std.UScalarTy.U8)
(Aeneas.Std.U8.ofNat (@OfNat.ofNat.{0} Nat (nat_lit 51) (instOfNatNat (nat_lit 51)))
(@of_decide_eq_true
(@LE.le.{0} Nat instLENat
(@OfNat.ofNat.{0} Nat (nat_lit 51) (instOfNatNat (nat_lit 51)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8))
(Nat.decLe (@OfNat.ofNat.{0} Nat (nat_lit 51) (instOfNatNat (nat_lit 51)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8))
(@id.{0}
(@Eq.{1} Bool
(@Decidable.decide
(@LE.le.{0} Nat instLENat
(@OfNat.ofNat.{0} Nat (nat_lit 51) (instOfNatNat (nat_lit 51)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8))
(Nat.decLe (@OfNat.ofNat.{0} Nat (nat_lit 51) (instOfNatNat (nat_lit 51)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8)))
Bool.true)
(@Eq.refl.{1} Bool Bool.true))))
(@List.cons.{0} (Aeneas.Std.UScalar Aeneas.Std.UScalarTy.U8)
(Aeneas.Std.U8.ofNat (@OfNat.ofNat.{0} Nat (nat_lit 53) (instOfNatNat (nat_lit 53)))
(@of_decide_eq_true
(@LE.le.{0} Nat instLENat
(@OfNat.ofNat.{0} Nat (nat_lit 53) (instOfNatNat (nat_lit 53)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8))
(Nat.decLe (@OfNat.ofNat.{0} Nat (nat_lit 53) (instOfNatNat (nat_lit 53)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8))
(@id.{0}
(@Eq.{1} Bool
(@Decidable.decide
(@LE.le.{0} Nat instLENat
(@OfNat.ofNat.{0} Nat (nat_lit 53) (instOfNatNat (nat_lit 53)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8))
(Nat.decLe (@OfNat.ofNat.{0} Nat (nat_lit 53) (instOfNatNat (nat_lit 53)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8)))
Bool.true)
(@Eq.refl.{1} Bool Bool.true))))
(@List.cons.{0} (Aeneas.Std.UScalar Aeneas.Std.UScalarTy.U8)
(Aeneas.Std.U8.ofNat (@OfNat.ofNat.{0} Nat (nat_lit 57) (instOfNatNat (nat_lit 57)))
(@of_decide_eq_true
(@LE.le.{0} Nat instLENat
(@OfNat.ofNat.{0} Nat (nat_lit 57) (instOfNatNat (nat_lit 57)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8))
(Nat.decLe (@OfNat.ofNat.{0} Nat (nat_lit 57) (instOfNatNat (nat_lit 57)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8))
(@id.{0}
(@Eq.{1} Bool
(@Decidable.decide
(@LE.le.{0} Nat instLENat
(@OfNat.ofNat.{0} Nat (nat_lit 57) (instOfNatNat (nat_lit 57)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8))
(Nat.decLe (@OfNat.ofNat.{0} Nat (nat_lit 57) (instOfNatNat (nat_lit 57)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8)))
Bool.true)
(@Eq.refl.{1} Bool Bool.true))))
(@List.cons.{0} (Aeneas.Std.UScalar Aeneas.Std.UScalarTy.U8)
(Aeneas.Std.U8.ofNat
(@OfNat.ofNat.{0} Nat (nat_lit 120) (instOfNatNat (nat_lit 120)))
(@of_decide_eq_true
(@LE.le.{0} Nat instLENat
(@OfNat.ofNat.{0} Nat (nat_lit 120) (instOfNatNat (nat_lit 120)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8))
(Nat.decLe (@OfNat.ofNat.{0} Nat (nat_lit 120) (instOfNatNat (nat_lit 120)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8))
(@id.{0}
(@Eq.{1} Bool
(@Decidable.decide
(@LE.le.{0} Nat instLENat
(@OfNat.ofNat.{0} Nat (nat_lit 120) (instOfNatNat (nat_lit 120)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8))
(Nat.decLe
(@OfNat.ofNat.{0} Nat (nat_lit 120) (instOfNatNat (nat_lit 120)))
(Aeneas.Std.UScalar.cMax Aeneas.Std.UScalarTy.U8)))
Bool.true)
(@Eq.refl.{1} Bool Bool.true))))
(@List.nil.{0} (Aeneas.Std.UScalar Aeneas.Std.UScalarTy.U8)))))))))))))
(And
(@Eq.{1} Nat
(@List.length.{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)
x))
(@OfNat.ofNat.{0} Nat (nat_lit 9223372036854120460) (instOfNatNat (nat_lit 9223372036854120460))))
(And (dec2flt_model.SourceValidByteSlice x)
(And (dec2flt_model.DecimalGoalVocabulary.sourceString dec2flt_model.DecimalGoalVocabularyDefault x)
(And
(@Eq.{1} Bool
(@bne.{0} (List.{0} Aeneas.Std.U8)
(@List.instBEq.{0} Aeneas.Std.U8 (@Aeneas.Std.instBEqUScalar_1 Aeneas.Std.UScalarTy.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)
x)
(@List.nil.{0} Aeneas.Std.U8))
Bool.true)
(And
(Not
(@Exists.{1} dec2flt_model.DecimalLexeme fun (x_1 : dec2flt_model.DecimalLexeme) =>
And
(dec2flt_model.DecimalGoalVocabulary.validNumeric
dec2flt_model.DecimalGoalVocabularyDefault x_1)
(@Eq.{1} (List.{0} Nat)
(dec2flt_model.DecimalGoalVocabulary.renderNumeric
dec2flt_model.DecimalGoalVocabularyDefault x_1)
(dec2flt_model.DecimalGoalVocabulary.bytes dec2flt_model.DecimalGoalVocabularyDefault
x))))
(And
(Not
(@Exists.{1} (Option.{0} Bool) fun (sign : Option.{0} Bool) =>
@Exists.{1} Bool fun (nan : Bool) =>
dec2flt_model.DecimalGoalVocabulary.specialLiteral
dec2flt_model.DecimalGoalVocabularyDefault
(dec2flt_model.DecimalGoalVocabulary.bytes dec2flt_model.DecimalGoalVocabularyDefault
x)
sign nan))
(And
(dec2flt_model.DecimalGoalVocabulary.classifies dec2flt_model.DecimalGoalVocabularyDefault
(dec2flt_model.DecimalGoalVocabulary.bytes dec2flt_model.DecimalGoalVocabularyDefault x)
(@Option.none.{0}
(Sum.{0, 0} dec2flt_model.DecimalLexeme (Prod.{0, 0} (Option.{0} Bool) Bool))))
(And
(@Eq.{1}
(Aeneas.Std.Result.{0} (Option.{0} dec2flt_model.num.imp.dec2flt.decimal.Decimal))
(dec2flt_model.num.imp.dec2flt.parse.parse_number x)
(@Aeneas.Std.Result.fail.{0} (Option.{0} dec2flt_model.num.imp.dec2flt.decimal.Decimal)
Aeneas.Std.Error.integerOverflow))
(@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 x)
(@Aeneas.Std.Result.fail.{0}
(Aeneas.Std.core.result.Result.{0, 0} dec2flt_model.F64
dec2flt_model.num.float_parse.ParseFloatError)
Aeneas.Std.Error.integerOverflow)))))))))))
dec2flt_model.InvalidOverflowBoundaryWitness)))
(@OfNat.ofNat.{0} Nat (nat_lit 9223372036854120459) (instOfNatNat (nat_lit 9223372036854120459)))) := byTrellisConditional c0b964755dfba82a CounterexampleExcludedLater revision · decision
NumberHelperRejection__Refutation uses the same arithmetic failure with a trailing x; it does not exhibit a successful acceptance of invalid syntax. The A condition permits keeping the existing order. All exponent digits must still be scanned after saturation and whole-input rejection must remain effective inside the domain, including non-UTF8 helper slices.
Definitions quoted from revised requirements
Conditional abstract composition
dec2fltConditional abstract composition. Let A = 3458764513820540928 bytes and B = 576460752303421440 bytes. The lexical and conversion component contracts admit implementations, with numeric lexical acceptance, rejection and record representation required for nonempty source-valid byte slices of length at most A, and preservation of the ordinary mathematical exact rounding target required for numeric inputs of length at most B. Special parsing, native correctness-or-defer, integer correctness-or-defer, unrestricted assembly, and the full-significand accumulated-exponent slow diagnostic retain their existing domains; the slow diagnostic applies to every source-valid unsigned numeric literal, without an A or B restriction. For any components satisfying these contracts, the dispatcher's normal results on Rust strings of byte length at most A satisfy classification, accumulated-exponent rounding and lexical sign requirements. On numeric strings of byte length at most B they additionally satisfy ordinary mathematical exact rounding. These conclusions include the native shortcut, integer tier, many-digit endpoint decision, fallback, sign handling and final assembly. Contract inhabitability and the existence of an abstract normal output for every Rust string of byte length at most A must be established, not inferred from an implication over an empty contract package.
Conditional component compliance
dec2fltConditional component compliance. Let A = 3458764513820540928 bytes and B = 576460752303421440 bytes. The actual source components satisfy the contracts used in conditional abstract composition. In particular, the numeric lexical component returns normally and satisfies acceptance, rejection and record representation on every nonempty source-valid byte slice of length at most A; it preserves the input's ordinary mathematical exact rounding target on numeric slices of length at most B. The source components for special parsing, native conversion, integer conversion and unrestricted assembly retain their existing full-domain obligations. The actual slow component satisfies the full-significand accumulated-exponent diagnostic on every source-valid unsigned numeric literal, without a length restriction. For every Rust string of byte length at most A, the concrete dispatcher agrees with the abstract component operations at its calls and establishes their helper preconditions. On numeric strings of byte length at most B, this agreement additionally preserves the exact rounding target throughout dispatch. These obligations include native shortcut, integer tier, many-digit decision, fallback, sign handling and assembly, and require a genuinely inhabited compatible component package.
Supporting proofs
Inspect related source (201)
- Dec2flt_modelNumImpDec2fltLemireU64 · dec2flt/mod.rs:217 Program Rust
- Dec2flt_modelNumImpTraitsFloatExtU64 · traits.rs:339 Program Rust
- biased_fp_to_float · dec2flt/mod.rs:282 Program Rust
More program dependencies (159)
- dec2flt · dec2flt/mod.rs:508 Program Rust
- dec2flt_with_trace · dec2flt/mod.rs:355 Program Rust
- try_fast_path · dec2flt/decimal.rs:59 Program Rust
- compute_float · dec2flt/lemire.rs:26 Program Rust
- parse_inf_nan · dec2flt/parse.rs:241 Program Rust
- parse_number · dec2flt/parse.rs:231 Program Rust
- parse_long_mantissa · dec2flt/slow.rs:27 Program Rust
- parse_long_mantissa_loop0 · dec2flt/slow.rs:51 Program Rust
- body · dec2flt/slow.rs:51 Program Rust
- parse_long_mantissa_loop1 · dec2flt/slow.rs:69 Program Rust
- body · dec2flt/slow.rs:69 Program Rust
- parse_long_mantissa_loop2 · dec2flt/slow.rs:94 Program Rust
- body · dec2flt/slow.rs:94 Program Rust
- MAX_EXPONENT_DISGUISED_FAST_PATH · dec2flt/mod.rs:220 Program Rust
- MAX_EXPONENT_FAST_PATH · dec2flt/mod.rs:219 Program Rust
- pow10_fast_path · dec2flt/mod.rs:222 Program Rust
- from_u64_bits · traits.rs:341 Program Rust
- integer_decode · traits.rs:348 Program Rust
- Dec2flt_modelNumImpTraitsFloatU64 · traits.rs:309 Program Rust
- offset_from · dec2flt/common.rs:30 Program Rust
- read_u64 · dec2flt/common.rs:18 Program Rust
- ParseFloatError · num/mod.rs:13 Program Rust
- Dec2FltTrace · dec2flt/mod.rs:295 Program Rust
- Lemire · dec2flt/mod.rs:115 Program Rust
- default · dec2flt/mod.rs:128 Program Rust
- default · dec2flt/mod.rs:121 Program Rust
- BiasedFp · dec2flt/common.rs:52 Program Rust
- eq · dec2flt/common.rs:51 Program Rust
- zero_pow2 · dec2flt/common.rs:62 Program Rust
- is_8digits · dec2flt/common.rs:40 Program Rust
- Decimal · dec2flt/decimal.rs:32 Program Rust
- can_use_fast_path · dec2flt/decimal.rs:42 Program Rust
- INT_POW10 · dec2flt/decimal.rs:8 Program Rust
- DecimalSeq · dec2flt/decimal_seq.rs:21 Program Rust
- DECIMAL_POINT_RANGE · dec2flt/decimal_seq.rs:67 Program Rust
- left_shift · dec2flt/decimal_seq.rs:129 Program Rust
- left_shift_loop0 · dec2flt/decimal_seq.rs:138 Program Rust
- body · dec2flt/decimal_seq.rs:138 Program Rust
- left_shift_loop1 · dec2flt/decimal_seq.rs:152 Program Rust
- body · dec2flt/decimal_seq.rs:152 Program Rust
- right_shift · dec2flt/decimal_seq.rs:175 Program Rust
- right_shift_loop0 · dec2flt/decimal_seq.rs:180 Program Rust
- body · dec2flt/decimal_seq.rs:180 Program Rust
- right_shift_loop0_loop0 · dec2flt/decimal_seq.rs:190 Program Rust
- body · dec2flt/decimal_seq.rs:190 Program Rust
- right_shift_loop1 · dec2flt/decimal_seq.rs:209 Program Rust
- body · dec2flt/decimal_seq.rs:209 Program Rust
- right_shift_loop2 · dec2flt/decimal_seq.rs:216 Program Rust
- body · dec2flt/decimal_seq.rs:216 Program Rust
- round · dec2flt/decimal_seq.rs:96 Program Rust
- round_loop · dec2flt/decimal_seq.rs:106 Program Rust
- body · dec2flt/decimal_seq.rs:106 Program Rust
- parse_decimal_seq · dec2flt/decimal_seq.rs:283 Program Rust
- parse_decimal_seq_loop0 · dec2flt/decimal_seq.rs:290 Program Rust
- body · dec2flt/decimal_seq.rs:290 Program Rust
- parse_decimal_seq_loop1 · dec2flt/decimal_seq.rs:361 Program Rust
- body · dec2flt/decimal_seq.rs:361 Program Rust
- parse_decimal_seq_loop2 · dec2flt/decimal_seq.rs:303 Program Rust
- body · dec2flt/decimal_seq.rs:303 Program Rust
- parse_decimal_seq_loop3 · dec2flt/decimal_seq.rs:307 Program Rust
- body · dec2flt/decimal_seq.rs:307 Program Rust
- parse_decimal_seq_loop4 · dec2flt/decimal_seq.rs:361 Program Rust
- body · dec2flt/decimal_seq.rs:361 Program Rust
- parse_decimal_seq_loop5 · dec2flt/decimal_seq.rs:307 Program Rust
- body · dec2flt/decimal_seq.rs:307 Program Rust
- parse_decimal_seq_loop6 · dec2flt/decimal_seq.rs:361 Program Rust
- body · dec2flt/decimal_seq.rs:361 Program Rust
- parse_decimal_seq_loop7 · dec2flt/decimal_seq.rs:361 Program Rust
- body · dec2flt/decimal_seq.rs:361 Program Rust
- set_precision · dec2flt/fpu.rs:99 Program Rust
- compute_product_approx · dec2flt/lemire.rs:134 Program Rust
- power · dec2flt/lemire.rs:121 Program Rust
- parse_8digits · dec2flt/parse.rs:18 Program Rust
- parse_partial_number · dec2flt/parse.rs:161 Program Rust
- parse_scientific · dec2flt/parse.rs:121 Program Rust
- parse_scientific_loop · dec2flt/parse.rs:142 Program Rust
- body · dec2flt/parse.rs:142 Program Rust
- try_parse_digits · dec2flt/parse.rs:30 Program Rust
- try_parse_digits_loop0 · dec2flt/parse.rs:33 Program Rust
- body · dec2flt/parse.rs:33 Program Rust
- try_parse_digits_loop1 · dec2flt/parse.rs:50 Program Rust
- body · dec2flt/parse.rs:50 Program Rust
- pfe_empty · dec2flt/mod.rs:270 Program Rust
- pfe_invalid · dec2flt/mod.rs:277 Program Rust
- MAX_SHIFT · dec2flt/slow.rs:28 Program Rust
- call · dec2flt/slow.rs:33 Program Rust
- Float · traits.rs:74 Program Rust
- FloatExt · traits.rs:170 Program Rust
- from_u64 · dec2flt/mod.rs:263 Program Rust
- BITS · traits.rs:319 Program Rust
- EXP_MASK · traits.rs:321 Program Rust
- INFINITY · traits.rs:312 Program Rust
- LARGEST_POWER_OF_TEN · traits.rs:327 Program Rust
- MAX_EXPONENT_ROUND_TO_EVEN · traits.rs:325 Program Rust
- MIN_EXPONENT_ROUND_TO_EVEN · traits.rs:324 Program Rust
- NAN · traits.rs:314 Program Rust
- NEG_INFINITY · traits.rs:313 Program Rust
- NEG_NAN · traits.rs:317 Program Rust
- SIG_MASK · traits.rs:322 Program Rust
- SIG_TOTAL_BITS · traits.rs:320 Program Rust
- SMALLEST_POWER_OF_TEN · traits.rs:328 Program Rust
- classify · traits.rs:334 Program Rust
- to_bits · traits.rs:330 Program Rust
- write_u64 · dec2flt/common.rs:25 Program Rust
- Dec2flt_modelNumImpTraitsInt · traits.rs:51 Program Rust
- FloatErrorKind · num/mod.rs:18 Program Rust
- Dec2FltAssemblyTrace · dec2flt/mod.rs:329 Program Rust
- ByteSlice · dec2flt/common.rs:4 Program Rust
- default · dec2flt/decimal_seq.rs:33 Program Rust
- MAX_DIGITS · dec2flt/decimal_seq.rs:63 Program Rust
- MAX_DIGITS_WITHOUT_OVERFLOW · dec2flt/decimal_seq.rs:66 Program Rust
- trim · dec2flt/decimal_seq.rs:82 Program Rust
- trim_loop · dec2flt/decimal_seq.rs:91 Program Rust
- body · dec2flt/decimal_seq.rs:91 Program Rust
- count_trailing_zeros · dec2flt/decimal_seq.rs:235 Program Rust
- count_trailing_zeros_loop · dec2flt/decimal_seq.rs:239 Program Rust
- body · dec2flt/decimal_seq.rs:239 Program Rust
- number_of_digits_decimal_left_shift · dec2flt/decimal_seq.rs:368 Program Rust
- number_of_digits_decimal_left_shift_loop · dec2flt/decimal_seq.rs:434 Program Rust
- body · dec2flt/decimal_seq.rs:434 Program Rust
- parse_decimal_exponent · dec2flt/decimal_seq.rs:269 Program Rust
- parse_decimal_exponent_loop · dec2flt/decimal_seq.rs:272 Program Rust
- body · dec2flt/decimal_seq.rs:272 Program Rust
- parse_digits_into_seq · dec2flt/decimal_seq.rs:256 Program Rust
- parse_digits_into_seq_loop · dec2flt/decimal_seq.rs:258 Program Rust
- body · dec2flt/decimal_seq.rs:258 Program Rust
- full_multiplication · dec2flt/lemire.rs:126 Program Rust
- adjust_many_digit_count · dec2flt/parse.rs:86 Program Rust
- adjust_many_digit_count_loop · dec2flt/parse.rs:89 Program Rust
- body · dec2flt/parse.rs:89 Program Rust
- MASK · dec2flt/parse.rs:19 Program Rust
- MUL1 · dec2flt/parse.rs:20 Program Rust
- MUL2 · dec2flt/parse.rs:21 Program Rust
- parse_many_digits · dec2flt/parse.rs:104 Program Rust
- NUM_POWERS · dec2flt/slow.rs:29 Program Rust
- POWERS · dec2flt/slow.rs:30 Program Rust
- closure · dec2flt/slow.rs:33 Program Rust
- LARGEST_POWER_OF_FIVE · dec2flt/table.rs:10 Program Rust
- POWER_OF_FIVE_128 · dec2flt/table.rs:19 Program Rust
- SMALLEST_POWER_OF_FIVE · dec2flt/table.rs:9 Program Rust
- CastInto · traits.rs:18 Program Rust
- default · traits.rs:116 Program Rust
- default · traits.rs:104 Program Rust
- default · traits.rs:119 Program Rust
- default · traits.rs:110 Program Rust
- default · traits.rs:113 Program Rust
- default · traits.rs:101 Program Rust
- Int · traits.rs:27 Program Rust
- Dec2flt_modelNumImpTraitsCastIntoI16 · traits.rs:45 Program Rust
- ONE · traits.rs:53 Program Rust
- ZERO · traits.rs:52 Program Rust
- try_add_digit · dec2flt/decimal_seq.rs:73 Program Rust
- TABLE · dec2flt/decimal_seq.rs:370 Program Rust
- TABLE_POW5 · dec2flt/decimal_seq.rs:379 Program Rust
- MIN_19DIGIT_INT · dec2flt/parse.rs:8 Program Rust
- try_parse_19digits · dec2flt/parse.rs:61 Program Rust
- try_parse_19digits_loop · dec2flt/parse.rs:64 Program Rust
- body · dec2flt/parse.rs:64 Program Rust
- cast · traits.rs:46 Program Rust
Standard-library dependencies (39)
- first · core/src/slice/mod.rs:155 Rust library
- as_bytes · core/src/str/mod.rs:498 Rust library
- clone · core/src/clone.rs:698 Rust library
- div · core/src/ops/arith.rs:515 Rust library
- mul · core/src/ops/arith.rs:350 Rust library
- neg · core/src/ops/arith.rs:719 Rust library
- bitand · core/src/ops/bit.rs:178 Rust library
- bitor · core/src/ops/bit.rs:282 Rust library
- shl · core/src/ops/bit.rs:489 Rust library
- shr · core/src/ops/bit.rs:612 Rust library
- EXPONENT_MASK · core/src/num/f64.rs:615 Rust library
- INFINITY · core/src/num/f64.rs:512 Rust library
- MANTISSA_DIGITS · core/src/num/f64.rs:412 Rust library
- MANTISSA_MASK · core/src/num/f64.rs:637 Rust library
- NAN · core/src/num/f64.rs:509 Rust library
- NEG_INFINITY · core/src/num/f64.rs:515 Rust library
- classify · core/src/num/f64.rs:782 Rust library
- from_bits · core/src/num/f64.rs:1269 Rust library
- to_bits · core/src/num/f64.rs:1223 Rust library
- is_ascii_digit · core/src/num/mod.rs:958 Rust library
- from_residual · core/src/option.rs:2793 Rust library
- branch · core/src/option.rs:2779 Rust library
- split_first · core/src/slice/mod.rs:198 Rust library
- CoreOpsArithDivF64F64 · core/src/ops/arith.rs:511 Rust library
- CoreOpsArithMulF64F64 · core/src/ops/arith.rs:344 Rust library
- CoreOpsArithNegF64 · core/src/ops/arith.rs:713 Rust library
- Div · core/src/ops/arith.rs:460 Rust library
- Mul · core/src/ops/arith.rs:322 Rust library
- Neg · core/src/ops/arith.rs:690 Rust library
- CoreMarkerCopy · core/src/marker.rs:57 Rust library
- FpCategory · core/src/num/mod.rs:1522 Rust library
- BitOr · core/src/ops/bit.rs:254 Rust library
- Shl · core/src/ops/bit.rs:461 Rust library
- Shr · core/src/ops/bit.rs:584 Rust library
- CoreCloneClone · core/src/clone.rs:696 Rust library
- CoreOpsBitBitAndU64U64 · core/src/ops/bit.rs:174 Rust library
- CoreOpsBitBitOrU64U64 · core/src/ops/bit.rs:278 Rust library
- CoreOpsBitShlU32U64 · core/src/ops/bit.rs:483 Rust library
- CoreOpsBitShrU32U64 · core/src/ops/bit.rs:606 Rust library
Related source and models come from the extraction records and declared dependencies.
Lean statement and supporting proof
Proposition checked for this verdict
theorem NumberHelperRejection__Refutation : Not
(∀ (s : Aeneas.Std.Slice.{0} Aeneas.Std.U8),
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) →
Not
(@Exists.{1} dec2flt_model.DecimalLexeme fun (x : dec2flt_model.DecimalLexeme) =>
And (@Eq.{1} (Option.{0} Bool) (dec2flt_model.DecimalLexeme.leadingSign x) (@Option.none.{0} Bool))
(And (dec2flt_model.DecimalGoalVocabulary.validNumeric dec2flt_model.DecimalGoalVocabularyDefault x)
(@Eq.{1} (List.{0} Nat)
(dec2flt_model.DecimalGoalVocabulary.bytes dec2flt_model.DecimalGoalVocabularyDefault s)
(dec2flt_model.DecimalGoalVocabulary.renderNumeric dec2flt_model.DecimalGoalVocabularyDefault
x)))) →
@Eq.{1} (Aeneas.Std.Result.{0} (Option.{0} dec2flt_model.num.imp.dec2flt.decimal.Decimal))
(dec2flt_model.num.imp.dec2flt.parse.parse_number s)
(@Aeneas.Std.Result.ok.{0} (Option.{0} dec2flt_model.num.imp.dec2flt.decimal.Decimal)
(@Option.none.{0} dec2flt_model.num.imp.dec2flt.decimal.Decimal))) := byThe negation is proved, disproving the requirement.
Alternate registered target · outside this verdict
theorem NumberHelperRejection :
∀ s : Slice Std.U8, SourceValidByteSlice s -> s.val ≠ [] ->
(¬ ∃ x : DecimalLexeme, x.leadingSign = none ∧ DecimalGoalVocabularyDefault.validNumeric x ∧
DecimalGoalVocabularyDefault.bytes s = DecimalGoalVocabularyDefault.renderNumeric x) ->
num.imp.dec2flt.parse.parse_number s = ok none := byStatement registration
| Live polarity | disprove |
|---|---|
| Authority | recorded audit polarity |
| Registered target | authored:NumberHelperRejection__refutation |
| Closure nodes |
|
Counterexample argument as recorded · NumberHelperRejection__Refutation
Theorem
The following result is false:
For every nonempty Rust byte slice that is not an unsigned numeric literal,
parse_number returns normally with None.Proof
Use the source-valid slice s supplied by
InvalidOverflowBoundaryWitness. Its byte list is
[46]\mathbin{++}\operatorname{replicate}(9223372036854120450,49)
\mathbin{++}[101,45,54,53,53,51,53,57,120].
The cited statement says that this slice is nonempty and that there is no
valid numeric lexeme, with any leading sign, whose numeric rendering equals
the bytes of s. In particular, there cannot be a valid numeric lexeme with
no leading sign whose rendering is the bytes of s: if the target's
unsigned-grammar existential supplied such a lexeme with the equality written
as ``bytes equals rendering'', symmetry of equality would give precisely the
rendering-equals-bytes witness excluded by the cited statement. Thus s
satisfies the target's unsigned-grammar exclusion premise. The cited Boolean
nonemptiness assertion is equivalent to the propositional inequality between
the byte list and the empty list, so it also supplies the target's nonempty
premise.Suppose the displayed universal assertion were true and specialize it to
this s. Source validity, propositional nonemptiness, and the unsigned
exclusion just established would force
parse_number(s) = ok None. But
InvalidOverflowBoundaryWitness states instead that
parse_number(s) = fail integerOverflow. Rewriting the forced
equality by this witnessed parse result equates the distinct fail
and ok constructors of the Aeneas Result type, an
impossibility. Hence the universal assertion is false.Recorded replacement requirements
number_helper_rejection
parse_numberConditional invalid rejection. Every nonempty source-valid byte slice of length at most 3 EiB that is not an unsigned numeric literal returns normally with
None, including executions with integer overflow checks enabled. The entire byte slice must be checked against the unsigned numeric grammar, including malformed exponent digits and trailing characters after exponent accumulation has stopped.