Component compliance
Disproveddec2fltComponent compliance. The actual source components satisfy the contracts
used in abstract composition, including preservation of the input's rounding
target. The dispatcher establishes the helper preconditions at their call
sites.
Later revision · decision
The second dispatch refutation uses the same empty package. Concrete numeric normal-return and record laws must use A, exact-target preservation must use B, and the actual slow helper must still meet its full unsigned diagnostic contract. The prior full-domain compliance approval/proof inventory cannot validate these changed source meanings and requirements.
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
- 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
- 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_partial_number · dec2flt/parse.rs:161 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
- offset_from · dec2flt/common.rs:30 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
- is_8digits · dec2flt/common.rs:40 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
- parse_many_digits · dec2flt/parse.rs:104 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
- 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
- parse_8digits · dec2flt/parse.rs:18 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
- MASK · dec2flt/parse.rs:19 Program Rust
- MUL1 · dec2flt/parse.rs:20 Program Rust
- MUL2 · dec2flt/parse.rs:21 Program Rust
Standard-library dependencies (39)
- 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
- first · core/src/slice/mod.rs:155 Rust library
- split_first · core/src/slice/mod.rs:198 Rust library
- as_bytes · core/src/str/mod.rs:498 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 DispatchComponentCompliance__Refutation : ¬ (∃ C : DispatchContracts,
(∀ (s : Slice Std.U8),
SourceValidByteSlice s ->
s.val ≠ [] ->
∃ out,
num.imp.dec2flt.parse.parse_number s = ok out ∧
C.parseNumber (DecimalGoalVocabularyDefault.bytes s) = out) ∧
(∀ (s : Slice Std.U8) negative,
SourceValidByteSlice s ->
∃ out,
num.imp.dec2flt.parse.parse_inf_nan
F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 s negative = ok out ∧
C.parseSpecial (DecimalGoalVocabularyDefault.bytes s) negative = out) ∧
(∀ d out,
num.imp.dec2flt.decimal.Decimal.try_fast_path
F64.Insts.Dec2flt_modelNumImpDec2fltLemireU64
F64.Insts.CoreOpsArithDivF64F64 F64.Insts.CoreOpsArithMulF64F64
F64.Insts.CoreOpsArithNegF64 d = ok out -> C.native d = out) ∧
(∀ q w fp,
num.imp.dec2flt.lemire.compute_float
F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 q w = ok fp ->
C.integer q w = fp) ∧
(∀ (body : Slice Std.U8) x,
SourceValidByteSlice body ->
x.leadingSign = none ->
DecimalGoalVocabularyDefault.validNumeric x ->
DecimalGoalVocabularyDefault.renderNumeric x =
DecimalGoalVocabularyDefault.bytes body ->
∃ fp,
num.imp.dec2flt.slow.parse_long_mantissa
F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 body = ok fp ∧
C.slow (DecimalGoalVocabularyDefault.bytes body) = fp) ∧
(∀ fp f,
num.imp.dec2flt.biased_fp_to_float
F64.Insts.Dec2flt_modelNumImpTraitsFloatExtU64 fp = ok f ->
C.assemble fp = f) ∧
(∀ magnitude result,
F64.Insts.CoreOpsArithNegF64.neg magnitude = ok result ->
C.applySign true magnitude = result) ∧
(∀ magnitude, C.applySign false magnitude = magnitude) ∧
(∀ a b equal,
num.imp.dec2flt.common.BiasedFp.Insts.CoreCmpPartialEqBiasedFp.eq
a b = ok equal -> C.samePair a b = equal) ∧
∀ (s : Str) r (tr : num.imp.dec2flt.Dec2FltTrace F64),
DecimalGoalVocabularyDefault.sourceString s ->
num.imp.dec2flt.dec2flt_with_trace
F64.Insts.Dec2flt_modelNumImpDec2fltLemireU64
F64.Insts.CoreOpsArithDivF64F64 F64.Insts.CoreOpsArithMulF64F64
F64.Insts.CoreOpsArithNegF64 s = ok (r, tr) ->
num.imp.dec2flt.dec2flt
F64.Insts.Dec2flt_modelNumImpDec2fltLemireU64
F64.Insts.CoreOpsArithDivF64F64 F64.Insts.CoreOpsArithMulF64F64
F64.Insts.CoreOpsArithNegF64 s = ok r ∧
match tr with
| num.imp.dec2flt.Dec2FltTrace.EmptyInput =>
DecimalGoalVocabularyDefault.bytes s = [] ∧
C.stripSign (DecimalGoalVocabularyDefault.bytes s) = none ∧
C.flow (DecimalGoalVocabularyDefault.bytes s) none ∧
∃ e, r = core.result.Result.Err e
| num.imp.dec2flt.Dec2FltTrace.SignOnly body negative =>
body.val = [] ∧
DecimalGoalVocabularyDefault.bytes s =
[if negative then 45 else 43] ∧
C.stripSign (DecimalGoalVocabularyDefault.bytes s) = none ∧
C.flow (DecimalGoalVocabularyDefault.bytes s) none ∧
∃ e, r = core.result.Result.Err e
| num.imp.dec2flt.Dec2FltTrace.Invalid body negative
parseNumber parseSpecial =>
∃ sign,
body.val ≠ [] ∧
SourceValidByteSlice body ∧
C.stripSign (DecimalGoalVocabularyDefault.bytes s) =
some (sign, DecimalGoalVocabularyDefault.bytes body) ∧
negative = decide (sign = some true) ∧
parseNumber = none ∧
C.parseNumber (DecimalGoalVocabularyDefault.bytes body) = none ∧
parseSpecial = none ∧
C.parseSpecial (DecimalGoalVocabularyDefault.bytes body) negative = none ∧
C.flow (DecimalGoalVocabularyDefault.bytes s) none ∧
∃ e, r = core.result.Result.Err e
| num.imp.dec2flt.Dec2FltTrace.Special body negative
parseNumber parseSpecial result =>
∃ sign,
body.val ≠ [] ∧
SourceValidByteSlice body ∧
C.stripSign (DecimalGoalVocabularyDefault.bytes s) =
some (sign, DecimalGoalVocabularyDefault.bytes body) ∧
negative = decide (sign = some true) ∧
parseNumber = none ∧
C.parseNumber (DecimalGoalVocabularyDefault.bytes body) = none ∧
parseSpecial = some result ∧
C.parseSpecial (DecimalGoalVocabularyDefault.bytes body) negative =
some result ∧
C.flow (DecimalGoalVocabularyDefault.bytes s) (some result) ∧
r = core.result.Result.Ok result
| num.imp.dec2flt.Dec2FltTrace.FastPath body negative parseNumber
fastInput fastResult result =>
∃ sign parsed,
body.val ≠ [] ∧
SourceValidByteSlice body ∧
C.stripSign (DecimalGoalVocabularyDefault.bytes s) =
some (sign, DecimalGoalVocabularyDefault.bytes body) ∧
negative = decide (sign = some true) ∧
parseNumber = some parsed ∧
C.parseNumber (DecimalGoalVocabularyDefault.bytes body) = some parsed ∧
fastInput = { parsed with negative := negative } ∧
C.native fastInput = fastResult ∧ fastResult = some result ∧
C.flow (DecimalGoalVocabularyDefault.bytes s) (some result) ∧
r = core.result.Result.Ok result
| num.imp.dec2flt.Dec2FltTrace.Assembled a =>
∃ sign parsed,
a.body.val ≠ [] ∧
SourceValidByteSlice a.body ∧
C.stripSign (DecimalGoalVocabularyDefault.bytes s) =
some (sign, DecimalGoalVocabularyDefault.bytes a.body) ∧
a.negative = decide (sign = some true) ∧
a.parse_number_result = some parsed ∧
C.parseNumber (DecimalGoalVocabularyDefault.bytes a.body) = some parsed ∧
a.fast_path_input = { parsed with negative := a.negative } ∧
a.fast_path_result = none ∧ C.native a.fast_path_input = none ∧
a.first_compute_exponent = parsed.exponent ∧
a.first_compute_mantissa = parsed.mantissa ∧
C.integer a.first_compute_exponent a.first_compute_mantissa =
a.first_compute_result ∧
parsed.mantissa.val < 10 ^ 19 ∧
parsed.mantissa.val + 1 < 2 ^ 64 ∧
a.second_compute_guard =
(parsed.many_digits &&
decide (0 <= a.first_compute_result.p_biased.val)) ∧
(a.second_compute_guard = true ->
∃ nextMantissa second,
a.second_compute_exponent = some parsed.exponent ∧
a.second_compute_mantissa = some nextMantissa ∧
C.incrementMantissa parsed.mantissa = some nextMantissa ∧
nextMantissa.val = parsed.mantissa.val + 1 ∧
a.second_compute_result = some second ∧
C.integer parsed.exponent nextMantissa = second ∧
a.second_equals_first =
some (C.samePair a.first_compute_result second) ∧
((C.samePair a.first_compute_result second = true ∧
a.forced_deferral = false ∧
a.post_comparison_pair = a.first_compute_result) ∨
(C.samePair a.first_compute_result second = false ∧
a.forced_deferral = true ∧
a.post_comparison_pair =
C.forceDefer a.first_compute_result ∧
a.post_comparison_pair.m = a.first_compute_result.m ∧
a.post_comparison_pair.p_biased.val = -1))) ∧
(a.second_compute_guard = false ->
a.second_compute_exponent = none ∧
a.second_compute_mantissa = none ∧
a.second_compute_result = none ∧
a.second_equals_first = none ∧
a.forced_deferral = false ∧
a.post_comparison_pair = a.first_compute_result) ∧
a.slow_path_guard =
decide (a.post_comparison_pair.p_biased.val < 0) ∧
(a.slow_path_guard = true ->
∃ replacement,
a.slow_path_result = some replacement ∧
C.slow (DecimalGoalVocabularyDefault.bytes a.body) = replacement ∧
a.selected_pair = replacement) ∧
(a.slow_path_guard = false ->
a.slow_path_result = none ∧
a.selected_pair = a.post_comparison_pair) ∧
C.assemble a.selected_pair = a.assembly_result ∧
DecimalGoalVocabularyDefault.assembledWord
a.selected_pair a.assembly_result ∧
a.assembled_word.val = a.assembly_result.val ∧
a.lexical_sign_applied = a.negative ∧
C.applySign a.negative a.assembly_result = a.result ∧
C.flow (DecimalGoalVocabularyDefault.bytes s) (some a.result) ∧
r = core.result.Result.Ok a.result) := byThe negation is proved, disproving the requirement.
Alternate registered target · outside this verdict
theorem DispatchComponentCompliance :
∃ C : DispatchContracts,
(∀ (s : Slice Std.U8),
SourceValidByteSlice s ->
s.val ≠ [] ->
∃ out,
num.imp.dec2flt.parse.parse_number s = ok out ∧
C.parseNumber (DecimalGoalVocabularyDefault.bytes s) = out) ∧
(∀ (s : Slice Std.U8) negative,
SourceValidByteSlice s ->
∃ out,
num.imp.dec2flt.parse.parse_inf_nan
F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 s negative = ok out ∧
C.parseSpecial (DecimalGoalVocabularyDefault.bytes s) negative = out) ∧
(∀ d out,
num.imp.dec2flt.decimal.Decimal.try_fast_path
F64.Insts.Dec2flt_modelNumImpDec2fltLemireU64
F64.Insts.CoreOpsArithDivF64F64 F64.Insts.CoreOpsArithMulF64F64
F64.Insts.CoreOpsArithNegF64 d = ok out -> C.native d = out) ∧
(∀ q w fp,
num.imp.dec2flt.lemire.compute_float
F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 q w = ok fp ->
C.integer q w = fp) ∧
(∀ (body : Slice Std.U8) x,
SourceValidByteSlice body ->
x.leadingSign = none ->
DecimalGoalVocabularyDefault.validNumeric x ->
DecimalGoalVocabularyDefault.renderNumeric x =
DecimalGoalVocabularyDefault.bytes body ->
∃ fp,
num.imp.dec2flt.slow.parse_long_mantissa
F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 body = ok fp ∧
C.slow (DecimalGoalVocabularyDefault.bytes body) = fp) ∧
(∀ fp f,
num.imp.dec2flt.biased_fp_to_float
F64.Insts.Dec2flt_modelNumImpTraitsFloatExtU64 fp = ok f ->
C.assemble fp = f) ∧
(∀ magnitude result,
F64.Insts.CoreOpsArithNegF64.neg magnitude = ok result ->
C.applySign true magnitude = result) ∧
(∀ magnitude, C.applySign false magnitude = magnitude) ∧
(∀ a b equal,
num.imp.dec2flt.common.BiasedFp.Insts.CoreCmpPartialEqBiasedFp.eq
a b = ok equal -> C.samePair a b = equal) ∧
∀ (s : Str) r (tr : num.imp.dec2flt.Dec2FltTrace F64),
DecimalGoalVocabularyDefault.sourceString s ->
num.imp.dec2flt.dec2flt_with_trace
F64.Insts.Dec2flt_modelNumImpDec2fltLemireU64
F64.Insts.CoreOpsArithDivF64F64 F64.Insts.CoreOpsArithMulF64F64
F64.Insts.CoreOpsArithNegF64 s = ok (r, tr) ->
num.imp.dec2flt.dec2flt
F64.Insts.Dec2flt_modelNumImpDec2fltLemireU64
F64.Insts.CoreOpsArithDivF64F64 F64.Insts.CoreOpsArithMulF64F64
F64.Insts.CoreOpsArithNegF64 s = ok r ∧
match tr with
| num.imp.dec2flt.Dec2FltTrace.EmptyInput =>
DecimalGoalVocabularyDefault.bytes s = [] ∧
C.stripSign (DecimalGoalVocabularyDefault.bytes s) = none ∧
C.flow (DecimalGoalVocabularyDefault.bytes s) none ∧
∃ e, r = core.result.Result.Err e
| num.imp.dec2flt.Dec2FltTrace.SignOnly body negative =>
body.val = [] ∧
DecimalGoalVocabularyDefault.bytes s =
[if negative then 45 else 43] ∧
C.stripSign (DecimalGoalVocabularyDefault.bytes s) = none ∧
C.flow (DecimalGoalVocabularyDefault.bytes s) none ∧
∃ e, r = core.result.Result.Err e
| num.imp.dec2flt.Dec2FltTrace.Invalid body negative
parseNumber parseSpecial =>
∃ sign,
body.val ≠ [] ∧
SourceValidByteSlice body ∧
C.stripSign (DecimalGoalVocabularyDefault.bytes s) =
some (sign, DecimalGoalVocabularyDefault.bytes body) ∧
negative = decide (sign = some true) ∧
parseNumber = none ∧
C.parseNumber (DecimalGoalVocabularyDefault.bytes body) = none ∧
parseSpecial = none ∧
C.parseSpecial (DecimalGoalVocabularyDefault.bytes body) negative = none ∧
C.flow (DecimalGoalVocabularyDefault.bytes s) none ∧
∃ e, r = core.result.Result.Err e
| num.imp.dec2flt.Dec2FltTrace.Special body negative
parseNumber parseSpecial result =>
∃ sign,
body.val ≠ [] ∧
SourceValidByteSlice body ∧
C.stripSign (DecimalGoalVocabularyDefault.bytes s) =
some (sign, DecimalGoalVocabularyDefault.bytes body) ∧
negative = decide (sign = some true) ∧
parseNumber = none ∧
C.parseNumber (DecimalGoalVocabularyDefault.bytes body) = none ∧
parseSpecial = some result ∧
C.parseSpecial (DecimalGoalVocabularyDefault.bytes body) negative =
some result ∧
C.flow (DecimalGoalVocabularyDefault.bytes s) (some result) ∧
r = core.result.Result.Ok result
| num.imp.dec2flt.Dec2FltTrace.FastPath body negative parseNumber
fastInput fastResult result =>
∃ sign parsed,
body.val ≠ [] ∧
SourceValidByteSlice body ∧
C.stripSign (DecimalGoalVocabularyDefault.bytes s) =
some (sign, DecimalGoalVocabularyDefault.bytes body) ∧
negative = decide (sign = some true) ∧
parseNumber = some parsed ∧
C.parseNumber (DecimalGoalVocabularyDefault.bytes body) = some parsed ∧
fastInput = { parsed with negative := negative } ∧
C.native fastInput = fastResult ∧ fastResult = some result ∧
C.flow (DecimalGoalVocabularyDefault.bytes s) (some result) ∧
r = core.result.Result.Ok result
| num.imp.dec2flt.Dec2FltTrace.Assembled a =>
∃ sign parsed,
a.body.val ≠ [] ∧
SourceValidByteSlice a.body ∧
C.stripSign (DecimalGoalVocabularyDefault.bytes s) =
some (sign, DecimalGoalVocabularyDefault.bytes a.body) ∧
a.negative = decide (sign = some true) ∧
a.parse_number_result = some parsed ∧
C.parseNumber (DecimalGoalVocabularyDefault.bytes a.body) = some parsed ∧
a.fast_path_input = { parsed with negative := a.negative } ∧
a.fast_path_result = none ∧ C.native a.fast_path_input = none ∧
a.first_compute_exponent = parsed.exponent ∧
a.first_compute_mantissa = parsed.mantissa ∧
C.integer a.first_compute_exponent a.first_compute_mantissa =
a.first_compute_result ∧
parsed.mantissa.val < 10 ^ 19 ∧
parsed.mantissa.val + 1 < 2 ^ 64 ∧
a.second_compute_guard =
(parsed.many_digits &&
decide (0 <= a.first_compute_result.p_biased.val)) ∧
(a.second_compute_guard = true ->
∃ nextMantissa second,
a.second_compute_exponent = some parsed.exponent ∧
a.second_compute_mantissa = some nextMantissa ∧
C.incrementMantissa parsed.mantissa = some nextMantissa ∧
nextMantissa.val = parsed.mantissa.val + 1 ∧
a.second_compute_result = some second ∧
C.integer parsed.exponent nextMantissa = second ∧
a.second_equals_first =
some (C.samePair a.first_compute_result second) ∧
((C.samePair a.first_compute_result second = true ∧
a.forced_deferral = false ∧
a.post_comparison_pair = a.first_compute_result) ∨
(C.samePair a.first_compute_result second = false ∧
a.forced_deferral = true ∧
a.post_comparison_pair =
C.forceDefer a.first_compute_result ∧
a.post_comparison_pair.m = a.first_compute_result.m ∧
a.post_comparison_pair.p_biased.val = -1))) ∧
(a.second_compute_guard = false ->
a.second_compute_exponent = none ∧
a.second_compute_mantissa = none ∧
a.second_compute_result = none ∧
a.second_equals_first = none ∧
a.forced_deferral = false ∧
a.post_comparison_pair = a.first_compute_result) ∧
a.slow_path_guard =
decide (a.post_comparison_pair.p_biased.val < 0) ∧
(a.slow_path_guard = true ->
∃ replacement,
a.slow_path_result = some replacement ∧
C.slow (DecimalGoalVocabularyDefault.bytes a.body) = replacement ∧
a.selected_pair = replacement) ∧
(a.slow_path_guard = false ->
a.slow_path_result = none ∧
a.selected_pair = a.post_comparison_pair) ∧
C.assemble a.selected_pair = a.assembly_result ∧
DecimalGoalVocabularyDefault.assembledWord
a.selected_pair a.assembly_result ∧
a.assembled_word.val = a.assembly_result.val ∧
a.lexical_sign_applied = a.negative ∧
C.applySign a.negative a.assembly_result = a.result ∧
C.flow (DecimalGoalVocabularyDefault.bytes s) (some a.result) ∧
r = core.result.Result.Ok a.result := byStatement registration
| Live polarity | disprove |
|---|---|
| Authority | recorded audit polarity |
| Registered target | authored:DispatchComponentCompliance__refutation |
| Closure nodes |
|
Counterexample argument as recorded · DispatchComponentCompliance__Refutation
Theorem
The following result is false:
There is one instance of the shared contracts in
DispatchContracts such that, on every nonempty source-valid Rust byte
slice, the extracted numeric parser returns normally and its result equals the
contract's numeric-parser result. On every source-valid Rust byte slice,
including the empty slice, and for either sign, the extracted special parser
returns normally and its result equals the contract's special-parser result.
On every source-valid slice carrying a valid unsigned numeric lexeme
whose rendering is exactly the slice bytes, the extracted slow component also
returns normally and its raw pair equals the contract's slow result. The
instance's native, integer, comparison, assembly, and sign operations agree
with every normal return of their corresponding extracted components. No
helper-slice clause adds a UTF-8 premise. The instance therefore
preserves each input's exact rounding target through the parsed-record equality
or many-digit endpoint interval, and it retains all source-valid input domains
and each component's normal-return-or-deferral distinction.
For every source-valid Rust string and every normal execution of the extracted
traced dispatcher, the public dispatcher has the trace's first result
projection and the same contract instance records the exact value flow. Empty
and sign-only inputs take their distinct error branches. Otherwise the trace
body is precisely the nonempty sign-stripped body, is a source-valid Rust byte
slice, and its Boolean sign is the stripped optional sign; numeric and special
parser results equal the corresponding contract results. Thus every traced
numeric call receives the already-established nonempty source-valid body,
while special-parser agreement itself remains quantified over all source-valid
slices. A native
return receives the parsed record with only its sign overwritten. On the
assembly path, native conversion returned
None; the first integer call
receives exactly the parsed exponent and mantissa and produces the recorded
first pair. The recorded second-call guard is exactly ``many digits and
nonnegative first biased exponent.'' When true, the parser's
\mathtt{mantissa}<10^{19} bound makes mantissa plus one safe in u64;
the second call receives that successor and the same exponent, and the trace
records its result and exact comparison with the first pair. Equality retains
the first pair, while inequality preserves its mantissa, sets its exponent to
-1, and records forced deferral. A false guard records no second operands or
result and retains the first pair.The slow-path guard is exactly negativity of the post-comparison exponent. A
true guard calls the slow component on the unchanged sign-stripped body and
selects its replacement pair; a false guard records no slow result and selects
the post-comparison pair. The selected pair, assembled word, assembly result,
whether the lexical sign is applied, and final result are all equal to their
successive contract values. Direct special and native returns select no raw
pair. Thus the source-string precondition on whole flow, the
nonempty source-valid-slice preconditions on numeric parsing, the all-slices
source-valid precondition on special parsing, the valid-rendering preconditions
on slow fallback, and every other helper precondition and intermediate
observation used by abstract composition are established at their actual call
sites.
Proof
Suppose, for contradiction, that the complete positive compliance claim in the
theorem statement holds. Its outermost quantifier supplies a witness
C:\texttt{DispatchContracts}; all the component-agreement and traced-flow
clauses following that witness are additional conjuncts and are not needed for
this contradiction. The witness C gives an inhabitant of
\operatorname{Nonempty}(\texttt{DispatchContracts}). However,
DispatchContractsUninhabited states that no dispatcher contract
package exists, equivalently that
\operatorname{Nonempty}(\texttt{DispatchContracts}) is false. Applying that
result to the inhabitant represented by C yields a contradiction. Hence the
assumed existential compliance claim is false, which is exactly the asserted
refutation.
Recorded replacement requirements
dispatch_component_compliance
dec2fltConditional component compliance. Let A = 3 EiB and B = ≈ 512 PiB. 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.