Statement
This explanation was written alongside the formalization to describe the statement and its reasoning.
Theorem
inf, infinity, and nan keywords, and either separate sign argument, the specialized parse_inf_nan returns normally with None.Lean statement
Trellis authored these statements and proofs. Lean checks the formal proofs; the assumptions used by each proof are listed below.
import Tablet.DecimalGoalVocabularyDefault
import Tablet.SourceValidByteSlice
import Tablet.F64_Insts_Dec2flt_modelNumImpDec2fltLemireU64
import Tablet.F64_Insts_CoreOpsArithDivF64F64
import Tablet.F64_Insts_CoreOpsArithMulF64F64
import Tablet.F64_Insts_CoreOpsArithNegF64
import Tablet.F64_Insts_Dec2flt_modelNumImpTraitsFloatExtU64
import Tablet.F64_Insts_Dec2flt_modelNumImpTraitsFloatU64
import Tablet.ModelU64BitAnd
import Tablet.ModelU64BitOr
import Tablet.NumberHelperReadEightBytes
import Tablet.SliceU8_Insts_Dec2flt_modelNumImpDec2fltCommonByteSlice_read_u64
import Tablet.num_imp_dec2flt_dec2flt
import Tablet.num_imp_dec2flt_dec2flt_with_trace
import Tablet.num_imp_dec2flt_parse_parse_number
import Tablet.num_imp_dec2flt_parse_parse_inf_nan
import Tablet.num_imp_dec2flt_decimal_Decimal_try_fast_path
import Tablet.num_imp_dec2flt_lemire_compute_float
import Tablet.num_imp_dec2flt_slow_parse_long_mantissa
import Tablet.num_imp_dec2flt_biased_fp_to_float
open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
namespace dec2flt_model
-- [TABLET NODE: SpecialHelperRejection]
theorem SpecialHelperRejection :
∀ (s : Slice Std.U8) (negative : Bool),
SourceValidByteSlice s ->
(¬ DecimalGoalVocabularyDefault.specialLiteral (DecimalGoalVocabularyDefault.bytes s) none false) ->
(¬ DecimalGoalVocabularyDefault.specialLiteral (DecimalGoalVocabularyDefault.bytes s) none true) ->
num.imp.dec2flt.parse.parse_inf_nan
F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 s negative = ok none := by
Proof
Natural-language proof
The status above describes the Lean proof. Its explanatory prose may remain a sketch after that proof closes.
Explanatory prose status
Prose retained as authored. The explanatory prose is preserved as it stood when captured.
Proof
negative satisfying the three
hypotheses. Write L for the length of s and b_j for the unsigned
natural value of its byte at index j. The first hypothesis is exactly the
Rust-slice length condition of SourceValidByteSlice; no content or
UTF-8 condition is being used. The other hypotheses, after unfolding
DecimalGoalVocabularyDefault, say respectively that the complete
byte list is neither an ASCII-case variant of inf or
infinity, nor an ASCII-case variant of nan. Indeed, with
sign argument none, the sign-byte prefix is empty, so the body in
specialLiteral is the complete byte list.ok none; no index, cast,
shift, bit operation, floating-point constant, or negation is evaluated.self[..8] is in bounds because 8=L. The
destination array also has exactly eight entries, so
copy_from_slice has equal source and destination lengths and
succeeds. The final from_le_bytes therefore returns the word
0xdf, whose binary form has every bit set except the ASCII case bit
0x20. Hence byte b_j of r\mathbin{\&}M is
b_j\mathbin{\&}\mathtt{0xdf}. For any uppercase-letter byte u occurring
below, the equality
b_j\mathbin{\&}\mathtt{0xdf}=u holds exactly when b_j=u or
b_j=u+\mathtt{0x20}: equality fixes all seven retained bits, while the one
cleared bit may be zero or one. These are precisely the uppercase and
lowercase forms of that letter.some: its decimal
constant 6436850368004902473 is
0x5954494e49464e49, whose little-endian bytes are
49 4e 46 49 4e 49 54 59, namely INFINITY. Equality with
this masked word therefore says that the complete eight input bytes are,
position by position, uppercase or lowercase forms of infinity.
The body equal to the complete byte list then satisfies the eight-letter
alternative of specialLiteral with sign none and kind
false, contradicting the unsigned-infinity hypothesis. This match
branch is impossible. The branches for the two other displayed constants and
the default branch each return ok none directly, so every possible
eight-byte execution has the required result.u8 to u64 is therefore in range, succeeds, and
preserves its value exactly. These two extracted shifts are specifically
c <<< 16#i32 and b <<< 8#i32: their right operands are
signed i32 values, not unsigned u32 values. The Aeneas
UScalar-by-IScalar left-shift operation first checks that the
signed count is nonnegative, converts it to a natural number, and then checks
that number against the bit width of the unsigned left operand; on success it
returns the zero-filled 64-bit shift, and either failed check returns integer
overflow. Here the literal counts have signed values 16 and 8, so both
are nonnegative, their natural conversions remain 16 and 8, and both are
strictly below the u64 width 64. Thus both shifts succeed.49 4e 46, namely INF. Equality after masking says exactly
that the three input bytes are a case variant of inf; choosing the
complete byte list as the empty-prefix body establishes
specialLiteral (bytes s) none false, contradicting the first grammar
negation. Similarly,
5128526=\mathtt{0x4e414e} has little-endian bytes
4e 41 4e, namely NAN. Its match would establish
specialLiteral (bytes s) none true, contradicting the second grammar
negation. The remaining displayed constant
6436850368004902473 cannot equal this masked word because that word is below
2^{24}, and in any event its branch returns ok none; the default
branch also returns ok none. Thus every possible three-byte
execution returns ok none.negative argument, and the possible negation all
occur only after one of the successful word matches. The grammar-negation
hypotheses excluded every such match at lengths eight and three. Hence none
of that sign-dependent code is reached, for either Boolean value, and the
three exhaustive length cases prove the result.Lean proof
intro s negative hsource hnotInf hnotNan
unfold num.imp.dec2flt.parse.parse_inf_nan
simp only
by_cases h8 : Slice.len s = 8#usize
· simp only [h8, if_pos]
have hlen : 8 <= s.val.length := by
have hv := congrArg UScalar.val h8
simp [Slice.len] at hv
omega
obtain ⟨w, hw, hbytes⟩ := NumberHelperReadEightBytes s hlen
rw [hw]
simp only [lift]
by_cases hmatch :
(w &&& 16131858542891098079#u64) = 6436850368004902473#u64
· exfalso
apply hnotInf
dsimp [DecimalGoalVocabularyDefault]
refine ⟨s.val.map (fun b : Std.U8 => b.val), by simp, Or.inr ?_⟩
apply (List.forall₂_iff_get).2
constructor
· have hv := congrArg UScalar.val h8
simpa [Slice.len] using hv
· intro i hiSource hiTarget
have hi : i < 8 := by simpa using hiTarget
have hbyte := hbytes i hi
have hextract :
w.bv.extractLsb' (8 * i) 8 = (s.val[i]'(by omega)).bv := by
apply BitVec.eq_of_toNat_eq
have hpow : 2 ^ (8 * i) = 256 ^ i := by
calc
2 ^ (8 * i) = (2 ^ 8) ^ i := by rw [pow_mul]
_ = 256 ^ i := by norm_num
simpa [BitVec.extractLsb'_toNat, Nat.shiftRight_eq_div_pow,
hpow] using hbyte
have hmatchBv :
w.bv &&& (16131858542891098079#u64).bv =
(6436850368004902473#u64).bv := by
exact congrArg UScalar.bv hmatch
have caseI : ∀ x : BitVec 8,
x &&& 223#8 = 73#8 -> x.toNat = 105 ∨ x.toNat + 32 = 105 := by
decide +kernel
have caseN : ∀ x : BitVec 8,
x &&& 223#8 = 78#8 -> x.toNat = 110 ∨ x.toNat + 32 = 110 := by
decide +kernel
have caseF : ∀ x : BitVec 8,
x &&& 223#8 = 70#8 -> x.toNat = 102 ∨ x.toNat + 32 = 102 := by
decide +kernel
have caseT : ∀ x : BitVec 8,
x &&& 223#8 = 84#8 -> x.toNat = 116 ∨ x.toNat + 32 = 116 := by
decide +kernel
have caseY : ∀ x : BitVec 8,
x &&& 223#8 = 89#8 -> x.toNat = 121 ∨ x.toNat + 32 = 121 := by
decide +kernel
have hmasked :
(s.val[i]'(by omega)).bv &&&
(16131858542891098079#u64).bv.extractLsb' (8 * i) 8 =
(6436850368004902473#u64).bv.extractLsb' (8 * i) 8 := by
rw [← hextract, ← BitVec.extractLsb'_and]
exact congrArg (fun z : BitVec 64 => z.extractLsb' (8 * i) 8) hmatchBv
have hiCases :
i = 0 ∨ i = 1 ∨ i = 2 ∨ i = 3 ∨
i = 4 ∨ i = 5 ∨ i = 6 ∨ i = 7 := by omega
rcases hiCases with rfl | rfl | rfl | rfl | rfl | rfl | rfl | rfl
all_goals simp at hiSource hiTarget ⊢
· have hm : (s.val[0]'(by omega)).bv &&& 223#8 = 73#8 := by
norm_num at hmasked ⊢
exact hmasked
simpa using caseI _ hm
· have hm : (s.val[1]'(by omega)).bv &&& 223#8 = 78#8 := by
norm_num at hmasked ⊢
exact hmasked
simpa using caseN _ hm
· have hm : (s.val[2]'(by omega)).bv &&& 223#8 = 70#8 := by
norm_num at hmasked ⊢
exact hmasked
simpa using caseF _ hm
· have hm : (s.val[3]'(by omega)).bv &&& 223#8 = 73#8 := by
norm_num at hmasked ⊢
exact hmasked
simpa using caseI _ hm
· have hm : (s.val[4]'(by omega)).bv &&& 223#8 = 78#8 := by
norm_num at hmasked ⊢
exact hmasked
simpa using caseN _ hm
· have hm : (s.val[5]'(by omega)).bv &&& 223#8 = 73#8 := by
norm_num at hmasked ⊢
exact hmasked
simpa using caseI _ hm
· have hm : (s.val[6]'(by omega)).bv &&& 223#8 = 84#8 := by
norm_num at hmasked ⊢
exact hmasked
simpa using caseT _ hm
· have hm : (s.val[7]'(by omega)).bv &&& 223#8 = 89#8 := by
norm_num at hmasked ⊢
exact hmasked
simpa using caseY _ hm
· unfold num.imp.dec2flt.parse.parse_inf_nan.match_1
simp_all
intro _ heq
exfalso
apply hmatch
simpa using congrArg BitVec.toNat heq
· by_cases h3 : Slice.len s = 3#usize
· have hp :
num.imp.dec2flt.parse.parse_inf_nan
F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 s negative
⦃ o => o = none ⦄ := by
unfold num.imp.dec2flt.parse.parse_inf_nan
simp only
rw [if_neg h8, if_pos h3]
step
step
step
step
step
step
step
step
step
step
step
unfold num.imp.dec2flt.parse.parse_inf_nan.match_1
have hlen : s.val.length = 3 := by
have hv := congrArg UScalar.val h3
simpa [Slice.len] using hv
have haBv : a.bv = i2.bv.zeroExtend 64 := by
change a.bv = (UScalar.cast .U64 i2).bv
exact congrArg UScalar.bv a_post
have hbBv : b.bv = i3.bv.zeroExtend 64 := by
change b.bv = (UScalar.cast .U64 i3).bv
exact congrArg UScalar.bv b_post
have hcBv : c.bv = i4.bv.zeroExtend 64 := by
change c.bv = (UScalar.cast .U64 i4).bv
exact congrArg UScalar.bv c_post
have hregister1Bv :
register1.bv = register.bv &&& (16131858542891098079#64) := by
simpa using register1_post2
have caseA : ∀ x : BitVec 8,
x &&& 223#8 = 65#8 -> x.toNat = 97 ∨ x.toNat + 32 = 97 := by
decide +kernel
have caseF : ∀ x : BitVec 8,
x &&& 223#8 = 70#8 -> x.toNat = 102 ∨ x.toNat + 32 = 102 := by
decide +kernel
have caseI : ∀ x : BitVec 8,
x &&& 223#8 = 73#8 -> x.toNat = 105 ∨ x.toNat + 32 = 105 := by
decide +kernel
have caseN : ∀ x : BitVec 8,
x &&& 223#8 = 78#8 -> x.toNat = 110 ∨ x.toNat + 32 = 110 := by
decide +kernel
have makeSpecial (l0 l1 l2 : Nat)
(r0 : i2.bv.toNat = l0 ∨ i2.bv.toNat + 32 = l0)
(r1 : i3.bv.toNat = l1 ∨ i3.bv.toNat + 32 = l1)
(r2 : i4.bv.toNat = l2 ∨ i4.bv.toNat + 32 = l2) :
List.Forall₂ (fun actual lower =>
actual = lower ∨ actual + 32 = lower)
(DecimalGoalVocabularyDefault.bytes s) [l0, l1, l2] := by
apply (List.forall₂_iff_get).2
constructor
· simpa [DecimalGoalVocabularyDefault] using hlen
· intro i hiSource hiTarget
have hi : i < 3 := by simpa using hiTarget
have hiCases : i = 0 ∨ i = 1 ∨ i = 2 := by omega
rcases hiCases with rfl | rfl | rfl
· simpa [DecimalGoalVocabularyDefault, i2_post] using r0
· simpa [DecimalGoalVocabularyDefault, i3_post] using r1
· simpa [DecimalGoalVocabularyDefault, i4_post] using r2
have slices : ∀ q : BitVec 8,
(q.zeroExtend 64).extractLsb' 0 8 = q ∧
(q.zeroExtend 64).extractLsb' 8 8 = 0#8 ∧
(q.zeroExtend 64).extractLsb' 16 8 = 0#8 ∧
(q.zeroExtend 64 <<< 8).extractLsb' 0 8 = 0#8 ∧
(q.zeroExtend 64 <<< 8).extractLsb' 8 8 = q ∧
(q.zeroExtend 64 <<< 8).extractLsb' 16 8 = 0#8 ∧
(q.zeroExtend 64 <<< 16).extractLsb' 0 8 = 0#8 ∧
(q.zeroExtend 64 <<< 16).extractLsb' 8 8 = 0#8 ∧
(q.zeroExtend 64 <<< 16).extractLsb' 16 8 = q := by
decide +kernel
have decodeBytes : ∀ (x y z : BitVec 8) (word : BitVec 64),
((((z.zeroExtend 64 <<< 16) ||| (y.zeroExtend 64 <<< 8)) |||
x.zeroExtend 64) &&& (16131858542891098079#64)) =
word ->
x &&& 223#8 = word.extractLsb' 0 8 ∧
y &&& 223#8 = word.extractLsb' 8 8 ∧
z &&& 223#8 = word.extractLsb' 16 8 := by
intro x y z word hword
have h0 := congrArg (fun w : BitVec 64 => w.extractLsb' 0 8) hword
have h1 := congrArg (fun w : BitVec 64 => w.extractLsb' 8 8) hword
have h2 := congrArg (fun w : BitVec 64 => w.extractLsb' 16 8) hword
simp [BitVec.extractLsb'_and, BitVec.extractLsb'_or] at h0 h1 h2
obtain ⟨x0, x8, x16, _, _, _, _, _, _⟩ := slices x
obtain ⟨_, _, _, ys0, ys8, ys16, _, _, _⟩ := slices y
obtain ⟨_, _, _, _, _, _, zss0, zss8, zss16⟩ := slices z
simp only [x0, x8, x16, ys0, ys8, ys16, zss0, zss8, zss16,
BitVec.zero_or, BitVec.or_zero] at h0 h1 h2
exact ⟨h0, h1, h2⟩
have decodeInf : ∀ x y z : BitVec 8,
((((z.zeroExtend 64 <<< 16) ||| (y.zeroExtend 64 <<< 8)) |||
x.zeroExtend 64) &&& (16131858542891098079#64)) =
4607561#64 ->
x &&& 223#8 = 73#8 ∧ y &&& 223#8 = 78#8 ∧
z &&& 223#8 = 70#8 := by
intro x y z hword
simpa using decodeBytes x y z 4607561#64 hword
have decodeNan : ∀ x y z : BitVec 8,
((((z.zeroExtend 64 <<< 16) ||| (y.zeroExtend 64 <<< 8)) |||
x.zeroExtend 64) &&& (16131858542891098079#64)) =
5128526#64 ->
x &&& 223#8 = 78#8 ∧ y &&& 223#8 = 65#8 ∧
z &&& 223#8 = 78#8 := by
intro x y z hword
simpa using decodeBytes x y z 5128526#64 hword
by_cases hinf : register1.bv = 4607561#64
· exfalso
apply hnotInf
dsimp [DecimalGoalVocabularyDefault]
refine ⟨s.val.map (fun b : Std.U8 => b.val), by simp, Or.inl ?_⟩
have hassembled :
((((i4.bv.zeroExtend 64 <<< 16) |||
(i3.bv.zeroExtend 64 <<< 8)) ||| i2.bv.zeroExtend 64) &&&
(16131858542891098079#64)) = 4607561#64 := by
rw [← haBv, ← hbBv, ← hcBv, ← i5_post2, ← i6_post2,
← i7_post2, ← register_post2, ← hregister1Bv]
exact hinf
obtain ⟨hm0, hm1, hm2⟩ := decodeInf _ _ _ hassembled
exact makeSpecial 105 110 102
(caseI _ hm0) (caseN _ hm1) (caseF _ hm2)
· by_cases hinfinity : register1.bv = 6436850368004902473#64
· simp [hinfinity, Aeneas.Std.WP.spec,
Aeneas.Std.WP.theta, Aeneas.Std.WP.wp_return]
· by_cases hnan : register1.bv = 5128526#64
· exfalso
apply hnotNan
dsimp [DecimalGoalVocabularyDefault]
refine ⟨s.val.map (fun b : Std.U8 => b.val), by simp, ?_⟩
have hassembled :
((((i4.bv.zeroExtend 64 <<< 16) |||
(i3.bv.zeroExtend 64 <<< 8)) ||| i2.bv.zeroExtend 64) &&&
(16131858542891098079#64)) = 5128526#64 := by
rw [← haBv, ← hbBv, ← hcBv, ← i5_post2, ← i6_post2,
← i7_post2, ← register_post2, ← hregister1Bv]
exact hnan
obtain ⟨hm0, hm1, hm2⟩ := decodeNan _ _ _ hassembled
exact makeSpecial 110 97 110
(caseN _ hm0) (caseA _ hm1) (caseN _ hm2)
· simp [hinf, hinfinity, hnan, Aeneas.Std.WP.spec,
Aeneas.Std.WP.theta, Aeneas.Std.WP.wp_return]
obtain ⟨o, ho, rfl⟩ := Aeneas.Std.WP.spec_imp_exists hp
exact ho
· simp only [h8, h3, if_false, lift]
end dec2flt_model
Download Lean source · Download TeX source
Complete Lean module
import Tablet.DecimalGoalVocabularyDefault
import Tablet.SourceValidByteSlice
import Tablet.F64_Insts_Dec2flt_modelNumImpDec2fltLemireU64
import Tablet.F64_Insts_CoreOpsArithDivF64F64
import Tablet.F64_Insts_CoreOpsArithMulF64F64
import Tablet.F64_Insts_CoreOpsArithNegF64
import Tablet.F64_Insts_Dec2flt_modelNumImpTraitsFloatExtU64
import Tablet.F64_Insts_Dec2flt_modelNumImpTraitsFloatU64
import Tablet.ModelU64BitAnd
import Tablet.ModelU64BitOr
import Tablet.NumberHelperReadEightBytes
import Tablet.SliceU8_Insts_Dec2flt_modelNumImpDec2fltCommonByteSlice_read_u64
import Tablet.num_imp_dec2flt_dec2flt
import Tablet.num_imp_dec2flt_dec2flt_with_trace
import Tablet.num_imp_dec2flt_parse_parse_number
import Tablet.num_imp_dec2flt_parse_parse_inf_nan
import Tablet.num_imp_dec2flt_decimal_Decimal_try_fast_path
import Tablet.num_imp_dec2flt_lemire_compute_float
import Tablet.num_imp_dec2flt_slow_parse_long_mantissa
import Tablet.num_imp_dec2flt_biased_fp_to_float
open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
namespace dec2flt_model
-- [TABLET NODE: SpecialHelperRejection]
theorem SpecialHelperRejection :
∀ (s : Slice Std.U8) (negative : Bool),
SourceValidByteSlice s ->
(¬ DecimalGoalVocabularyDefault.specialLiteral (DecimalGoalVocabularyDefault.bytes s) none false) ->
(¬ DecimalGoalVocabularyDefault.specialLiteral (DecimalGoalVocabularyDefault.bytes s) none true) ->
num.imp.dec2flt.parse.parse_inf_nan
F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 s negative = ok none := by
-- BODY
intro s negative hsource hnotInf hnotNan
unfold num.imp.dec2flt.parse.parse_inf_nan
simp only
by_cases h8 : Slice.len s = 8#usize
· simp only [h8, if_pos]
have hlen : 8 <= s.val.length := by
have hv := congrArg UScalar.val h8
simp [Slice.len] at hv
omega
obtain ⟨w, hw, hbytes⟩ := NumberHelperReadEightBytes s hlen
rw [hw]
simp only [lift]
by_cases hmatch :
(w &&& 16131858542891098079#u64) = 6436850368004902473#u64
· exfalso
apply hnotInf
dsimp [DecimalGoalVocabularyDefault]
refine ⟨s.val.map (fun b : Std.U8 => b.val), by simp, Or.inr ?_⟩
apply (List.forall₂_iff_get).2
constructor
· have hv := congrArg UScalar.val h8
simpa [Slice.len] using hv
· intro i hiSource hiTarget
have hi : i < 8 := by simpa using hiTarget
have hbyte := hbytes i hi
have hextract :
w.bv.extractLsb' (8 * i) 8 = (s.val[i]'(by omega)).bv := by
apply BitVec.eq_of_toNat_eq
have hpow : 2 ^ (8 * i) = 256 ^ i := by
calc
2 ^ (8 * i) = (2 ^ 8) ^ i := by rw [pow_mul]
_ = 256 ^ i := by norm_num
simpa [BitVec.extractLsb'_toNat, Nat.shiftRight_eq_div_pow,
hpow] using hbyte
have hmatchBv :
w.bv &&& (16131858542891098079#u64).bv =
(6436850368004902473#u64).bv := by
exact congrArg UScalar.bv hmatch
have caseI : ∀ x : BitVec 8,
x &&& 223#8 = 73#8 -> x.toNat = 105 ∨ x.toNat + 32 = 105 := by
decide +kernel
have caseN : ∀ x : BitVec 8,
x &&& 223#8 = 78#8 -> x.toNat = 110 ∨ x.toNat + 32 = 110 := by
decide +kernel
have caseF : ∀ x : BitVec 8,
x &&& 223#8 = 70#8 -> x.toNat = 102 ∨ x.toNat + 32 = 102 := by
decide +kernel
have caseT : ∀ x : BitVec 8,
x &&& 223#8 = 84#8 -> x.toNat = 116 ∨ x.toNat + 32 = 116 := by
decide +kernel
have caseY : ∀ x : BitVec 8,
x &&& 223#8 = 89#8 -> x.toNat = 121 ∨ x.toNat + 32 = 121 := by
decide +kernel
have hmasked :
(s.val[i]'(by omega)).bv &&&
(16131858542891098079#u64).bv.extractLsb' (8 * i) 8 =
(6436850368004902473#u64).bv.extractLsb' (8 * i) 8 := by
rw [← hextract, ← BitVec.extractLsb'_and]
exact congrArg (fun z : BitVec 64 => z.extractLsb' (8 * i) 8) hmatchBv
have hiCases :
i = 0 ∨ i = 1 ∨ i = 2 ∨ i = 3 ∨
i = 4 ∨ i = 5 ∨ i = 6 ∨ i = 7 := by omega
rcases hiCases with rfl | rfl | rfl | rfl | rfl | rfl | rfl | rfl
all_goals simp at hiSource hiTarget ⊢
· have hm : (s.val[0]'(by omega)).bv &&& 223#8 = 73#8 := by
norm_num at hmasked ⊢
exact hmasked
simpa using caseI _ hm
· have hm : (s.val[1]'(by omega)).bv &&& 223#8 = 78#8 := by
norm_num at hmasked ⊢
exact hmasked
simpa using caseN _ hm
· have hm : (s.val[2]'(by omega)).bv &&& 223#8 = 70#8 := by
norm_num at hmasked ⊢
exact hmasked
simpa using caseF _ hm
· have hm : (s.val[3]'(by omega)).bv &&& 223#8 = 73#8 := by
norm_num at hmasked ⊢
exact hmasked
simpa using caseI _ hm
· have hm : (s.val[4]'(by omega)).bv &&& 223#8 = 78#8 := by
norm_num at hmasked ⊢
exact hmasked
simpa using caseN _ hm
· have hm : (s.val[5]'(by omega)).bv &&& 223#8 = 73#8 := by
norm_num at hmasked ⊢
exact hmasked
simpa using caseI _ hm
· have hm : (s.val[6]'(by omega)).bv &&& 223#8 = 84#8 := by
norm_num at hmasked ⊢
exact hmasked
simpa using caseT _ hm
· have hm : (s.val[7]'(by omega)).bv &&& 223#8 = 89#8 := by
norm_num at hmasked ⊢
exact hmasked
simpa using caseY _ hm
· unfold num.imp.dec2flt.parse.parse_inf_nan.match_1
simp_all
intro _ heq
exfalso
apply hmatch
simpa using congrArg BitVec.toNat heq
· by_cases h3 : Slice.len s = 3#usize
· have hp :
num.imp.dec2flt.parse.parse_inf_nan
F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 s negative
⦃ o => o = none ⦄ := by
unfold num.imp.dec2flt.parse.parse_inf_nan
simp only
rw [if_neg h8, if_pos h3]
step
step
step
step
step
step
step
step
step
step
step
unfold num.imp.dec2flt.parse.parse_inf_nan.match_1
have hlen : s.val.length = 3 := by
have hv := congrArg UScalar.val h3
simpa [Slice.len] using hv
have haBv : a.bv = i2.bv.zeroExtend 64 := by
change a.bv = (UScalar.cast .U64 i2).bv
exact congrArg UScalar.bv a_post
have hbBv : b.bv = i3.bv.zeroExtend 64 := by
change b.bv = (UScalar.cast .U64 i3).bv
exact congrArg UScalar.bv b_post
have hcBv : c.bv = i4.bv.zeroExtend 64 := by
change c.bv = (UScalar.cast .U64 i4).bv
exact congrArg UScalar.bv c_post
have hregister1Bv :
register1.bv = register.bv &&& (16131858542891098079#64) := by
simpa using register1_post2
have caseA : ∀ x : BitVec 8,
x &&& 223#8 = 65#8 -> x.toNat = 97 ∨ x.toNat + 32 = 97 := by
decide +kernel
have caseF : ∀ x : BitVec 8,
x &&& 223#8 = 70#8 -> x.toNat = 102 ∨ x.toNat + 32 = 102 := by
decide +kernel
have caseI : ∀ x : BitVec 8,
x &&& 223#8 = 73#8 -> x.toNat = 105 ∨ x.toNat + 32 = 105 := by
decide +kernel
have caseN : ∀ x : BitVec 8,
x &&& 223#8 = 78#8 -> x.toNat = 110 ∨ x.toNat + 32 = 110 := by
decide +kernel
have makeSpecial (l0 l1 l2 : Nat)
(r0 : i2.bv.toNat = l0 ∨ i2.bv.toNat + 32 = l0)
(r1 : i3.bv.toNat = l1 ∨ i3.bv.toNat + 32 = l1)
(r2 : i4.bv.toNat = l2 ∨ i4.bv.toNat + 32 = l2) :
List.Forall₂ (fun actual lower =>
actual = lower ∨ actual + 32 = lower)
(DecimalGoalVocabularyDefault.bytes s) [l0, l1, l2] := by
apply (List.forall₂_iff_get).2
constructor
· simpa [DecimalGoalVocabularyDefault] using hlen
· intro i hiSource hiTarget
have hi : i < 3 := by simpa using hiTarget
have hiCases : i = 0 ∨ i = 1 ∨ i = 2 := by omega
rcases hiCases with rfl | rfl | rfl
· simpa [DecimalGoalVocabularyDefault, i2_post] using r0
· simpa [DecimalGoalVocabularyDefault, i3_post] using r1
· simpa [DecimalGoalVocabularyDefault, i4_post] using r2
have slices : ∀ q : BitVec 8,
(q.zeroExtend 64).extractLsb' 0 8 = q ∧
(q.zeroExtend 64).extractLsb' 8 8 = 0#8 ∧
(q.zeroExtend 64).extractLsb' 16 8 = 0#8 ∧
(q.zeroExtend 64 <<< 8).extractLsb' 0 8 = 0#8 ∧
(q.zeroExtend 64 <<< 8).extractLsb' 8 8 = q ∧
(q.zeroExtend 64 <<< 8).extractLsb' 16 8 = 0#8 ∧
(q.zeroExtend 64 <<< 16).extractLsb' 0 8 = 0#8 ∧
(q.zeroExtend 64 <<< 16).extractLsb' 8 8 = 0#8 ∧
(q.zeroExtend 64 <<< 16).extractLsb' 16 8 = q := by
decide +kernel
have decodeBytes : ∀ (x y z : BitVec 8) (word : BitVec 64),
((((z.zeroExtend 64 <<< 16) ||| (y.zeroExtend 64 <<< 8)) |||
x.zeroExtend 64) &&& (16131858542891098079#64)) =
word ->
x &&& 223#8 = word.extractLsb' 0 8 ∧
y &&& 223#8 = word.extractLsb' 8 8 ∧
z &&& 223#8 = word.extractLsb' 16 8 := by
intro x y z word hword
have h0 := congrArg (fun w : BitVec 64 => w.extractLsb' 0 8) hword
have h1 := congrArg (fun w : BitVec 64 => w.extractLsb' 8 8) hword
have h2 := congrArg (fun w : BitVec 64 => w.extractLsb' 16 8) hword
simp [BitVec.extractLsb'_and, BitVec.extractLsb'_or] at h0 h1 h2
obtain ⟨x0, x8, x16, _, _, _, _, _, _⟩ := slices x
obtain ⟨_, _, _, ys0, ys8, ys16, _, _, _⟩ := slices y
obtain ⟨_, _, _, _, _, _, zss0, zss8, zss16⟩ := slices z
simp only [x0, x8, x16, ys0, ys8, ys16, zss0, zss8, zss16,
BitVec.zero_or, BitVec.or_zero] at h0 h1 h2
exact ⟨h0, h1, h2⟩
have decodeInf : ∀ x y z : BitVec 8,
((((z.zeroExtend 64 <<< 16) ||| (y.zeroExtend 64 <<< 8)) |||
x.zeroExtend 64) &&& (16131858542891098079#64)) =
4607561#64 ->
x &&& 223#8 = 73#8 ∧ y &&& 223#8 = 78#8 ∧
z &&& 223#8 = 70#8 := by
intro x y z hword
simpa using decodeBytes x y z 4607561#64 hword
have decodeNan : ∀ x y z : BitVec 8,
((((z.zeroExtend 64 <<< 16) ||| (y.zeroExtend 64 <<< 8)) |||
x.zeroExtend 64) &&& (16131858542891098079#64)) =
5128526#64 ->
x &&& 223#8 = 78#8 ∧ y &&& 223#8 = 65#8 ∧
z &&& 223#8 = 78#8 := by
intro x y z hword
simpa using decodeBytes x y z 5128526#64 hword
by_cases hinf : register1.bv = 4607561#64
· exfalso
apply hnotInf
dsimp [DecimalGoalVocabularyDefault]
refine ⟨s.val.map (fun b : Std.U8 => b.val), by simp, Or.inl ?_⟩
have hassembled :
((((i4.bv.zeroExtend 64 <<< 16) |||
(i3.bv.zeroExtend 64 <<< 8)) ||| i2.bv.zeroExtend 64) &&&
(16131858542891098079#64)) = 4607561#64 := by
rw [← haBv, ← hbBv, ← hcBv, ← i5_post2, ← i6_post2,
← i7_post2, ← register_post2, ← hregister1Bv]
exact hinf
obtain ⟨hm0, hm1, hm2⟩ := decodeInf _ _ _ hassembled
exact makeSpecial 105 110 102
(caseI _ hm0) (caseN _ hm1) (caseF _ hm2)
· by_cases hinfinity : register1.bv = 6436850368004902473#64
· simp [hinfinity, Aeneas.Std.WP.spec,
Aeneas.Std.WP.theta, Aeneas.Std.WP.wp_return]
· by_cases hnan : register1.bv = 5128526#64
· exfalso
apply hnotNan
dsimp [DecimalGoalVocabularyDefault]
refine ⟨s.val.map (fun b : Std.U8 => b.val), by simp, ?_⟩
have hassembled :
((((i4.bv.zeroExtend 64 <<< 16) |||
(i3.bv.zeroExtend 64 <<< 8)) ||| i2.bv.zeroExtend 64) &&&
(16131858542891098079#64)) = 5128526#64 := by
rw [← haBv, ← hbBv, ← hcBv, ← i5_post2, ← i6_post2,
← i7_post2, ← register_post2, ← hregister1Bv]
exact hnan
obtain ⟨hm0, hm1, hm2⟩ := decodeNan _ _ _ hassembled
exact makeSpecial 110 97 110
(caseN _ hm0) (caseA _ hm1) (caseN _ hm2)
· simp [hinf, hinfinity, hnan, Aeneas.Std.WP.spec,
Aeneas.Std.WP.theta, Aeneas.Std.WP.wp_return]
obtain ⟨o, ho, rfl⟩ := Aeneas.Std.WP.spec_imp_exists hp
exact ho
· simp only [h8, h3, if_false, lift]
end dec2flt_model
Proof structure
Follow the declared dependencies to read the supporting statements and proofs.
Uses
- DecimalGoalVocabularyDefault
- F64 Insts CoreOpsArithDivF64F64
- F64 Insts CoreOpsArithMulF64F64
- F64 Insts CoreOpsArithNegF64
- F64 Insts Dec2flt modelNumImpDec2fltLemireU64
- F64 Insts Dec2flt modelNumImpTraitsFloatExtU64
All 20 entries
- DecimalGoalVocabularyDefault
- F64 Insts CoreOpsArithDivF64F64
- F64 Insts CoreOpsArithMulF64F64
- F64 Insts CoreOpsArithNegF64
- F64 Insts Dec2flt modelNumImpDec2fltLemireU64
- F64 Insts Dec2flt modelNumImpTraitsFloatExtU64
- F64 Insts Dec2flt modelNumImpTraitsFloatU64
- ModelU64BitAnd
- ModelU64BitOr
- NumberHelperReadEightBytes
- SliceU8 Insts Dec2flt modelNumImpDec2fltCommonByteSlice read u64
- SourceValidByteSlice
- num imp dec2flt biased fp to float
- num imp dec2flt dec2flt
- num imp dec2flt dec2flt with trace
- num imp dec2flt decimal Decimal try fast path
- num imp dec2flt lemire compute float
- num imp dec2flt parse parse inf nan
- num imp dec2flt parse parse number
- num imp dec2flt slow parse long mantissa
Inspect related source (199)
More program dependencies (157)
- read_u64 · dec2flt/common.rs:22 Program Rust
- biased_fp_to_float · dec2flt/mod.rs:282 Program Rust
- 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:244 Program Rust
- parse_number · dec2flt/parse.rs:234 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
- 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
- Dec2flt_modelNumImpTraitsInt · traits.rs:51 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:56 Program Rust
- eq · dec2flt/common.rs:55 Program Rust
- zero_pow2 · dec2flt/common.rs:66 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:22 Program Rust
- DECIMAL_POINT_RANGE · dec2flt/decimal_seq.rs:68 Program Rust
- left_shift · dec2flt/decimal_seq.rs:130 Program Rust
- left_shift_loop0 · dec2flt/decimal_seq.rs:139 Program Rust
- body · dec2flt/decimal_seq.rs:139 Program Rust
- left_shift_loop1 · dec2flt/decimal_seq.rs:153 Program Rust
- body · dec2flt/decimal_seq.rs:153 Program Rust
- right_shift · dec2flt/decimal_seq.rs:176 Program Rust
- right_shift_loop0 · dec2flt/decimal_seq.rs:181 Program Rust
- body · dec2flt/decimal_seq.rs:181 Program Rust
- right_shift_loop0_loop0 · dec2flt/decimal_seq.rs:191 Program Rust
- body · dec2flt/decimal_seq.rs:191 Program Rust
- right_shift_loop1 · dec2flt/decimal_seq.rs:210 Program Rust
- body · dec2flt/decimal_seq.rs:210 Program Rust
- right_shift_loop2 · dec2flt/decimal_seq.rs:217 Program Rust
- body · dec2flt/decimal_seq.rs:217 Program Rust
- round · dec2flt/decimal_seq.rs:97 Program Rust
- round_loop · dec2flt/decimal_seq.rs:107 Program Rust
- body · dec2flt/decimal_seq.rs:107 Program Rust
- parse_decimal_seq · dec2flt/decimal_seq.rs:288 Program Rust
- parse_decimal_seq_loop0 · dec2flt/decimal_seq.rs:296 Program Rust
- body · dec2flt/decimal_seq.rs:296 Program Rust
- parse_decimal_seq_loop1 · dec2flt/decimal_seq.rs:368 Program Rust
- body · dec2flt/decimal_seq.rs:368 Program Rust
- parse_decimal_seq_loop2 · dec2flt/decimal_seq.rs:309 Program Rust
- body · dec2flt/decimal_seq.rs:309 Program Rust
- parse_decimal_seq_loop3 · dec2flt/decimal_seq.rs:313 Program Rust
- body · dec2flt/decimal_seq.rs:313 Program Rust
- parse_decimal_seq_loop4 · dec2flt/decimal_seq.rs:368 Program Rust
- body · dec2flt/decimal_seq.rs:368 Program Rust
- parse_decimal_seq_loop5 · dec2flt/decimal_seq.rs:313 Program Rust
- body · dec2flt/decimal_seq.rs:313 Program Rust
- parse_decimal_seq_loop6 · dec2flt/decimal_seq.rs:368 Program Rust
- body · dec2flt/decimal_seq.rs:368 Program Rust
- parse_decimal_seq_loop7 · dec2flt/decimal_seq.rs:368 Program Rust
- body · dec2flt/decimal_seq.rs:368 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:164 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
- 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
- FloatExt · traits.rs:170 Program Rust
- from_u64 · dec2flt/mod.rs:263 Program Rust
- offset_from · dec2flt/common.rs:34 Program Rust
- write_u64 · dec2flt/common.rs:29 Program Rust
- Dec2flt_modelNumImpTraitsCastIntoI16 · traits.rs:45 Program Rust
- ONE · traits.rs:53 Program Rust
- ZERO · traits.rs:52 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:44 Program Rust
- default · dec2flt/decimal_seq.rs:34 Program Rust
- MAX_DIGITS · dec2flt/decimal_seq.rs:64 Program Rust
- MAX_DIGITS_WITHOUT_OVERFLOW · dec2flt/decimal_seq.rs:67 Program Rust
- trim · dec2flt/decimal_seq.rs:83 Program Rust
- trim_loop · dec2flt/decimal_seq.rs:92 Program Rust
- body · dec2flt/decimal_seq.rs:92 Program Rust
- count_trailing_zeros · dec2flt/decimal_seq.rs:236 Program Rust
- count_trailing_zeros_loop · dec2flt/decimal_seq.rs:240 Program Rust
- body · dec2flt/decimal_seq.rs:240 Program Rust
- final_decimal_point · dec2flt/decimal_seq.rs:269 Program Rust
- number_of_digits_decimal_left_shift · dec2flt/decimal_seq.rs:375 Program Rust
- number_of_digits_decimal_left_shift_loop · dec2flt/decimal_seq.rs:441 Program Rust
- body · dec2flt/decimal_seq.rs:441 Program Rust
- parse_digits_into_seq · dec2flt/decimal_seq.rs:257 Program Rust
- parse_digits_into_seq_loop · dec2flt/decimal_seq.rs:259 Program Rust
- body · dec2flt/decimal_seq.rs:259 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:145 Program Rust
- body · dec2flt/parse.rs:145 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
- Int · traits.rs:27 Program Rust
- cast · traits.rs:46 Program Rust
- try_add_digit · dec2flt/decimal_seq.rs:74 Program Rust
- TABLE · dec2flt/decimal_seq.rs:377 Program Rust
- TABLE_POW5 · dec2flt/decimal_seq.rs:386 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
- 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)
- bitand · core/src/ops/bit.rs:178 Rust library
- bitor · core/src/ops/bit.rs:282 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
- 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
- CoreMarkerCopy · core/src/marker.rs:57 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
- 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
- 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
Related source and models come from the extraction records and declared dependencies.
Proof assumptions and review
Lean checks the formal proof. Trellis also reviews how the statement corresponds to the intended requirement.
Transitive assumptions
- Classical.choice
- Quot.sound
- propext
This list combines the assumptions recorded for this declaration and its dependencies. It may include assumptions used by auxiliary declarations in those modules.
Helper theorems included
All 82 entries
- Binary64Model
- Binary64ModelDefault
- DecimalGoalVocabulary
- DecimalGoalVocabularyDefault
- DecimalLexeme
- F64
- F64 Insts CoreCloneClone
- F64 Insts CoreMarkerCopy
- F64 Insts CoreOpsArithDivF64F64
- F64 Insts CoreOpsArithMulF64F64
- F64 Insts CoreOpsArithNegF64
- F64 Insts Dec2flt modelNumImpTraitsFloatU64
- F64 Insts Dec2flt modelNumImpTraitsFloatU64 BITS
- F64 Insts Dec2flt modelNumImpTraitsFloatU64 EXP MASK
- F64 Insts Dec2flt modelNumImpTraitsFloatU64 INFINITY
- F64 Insts Dec2flt modelNumImpTraitsFloatU64 LARGEST POWER OF TEN
- F64 Insts Dec2flt modelNumImpTraitsFloatU64 MAX EXPONENT ROUND TO EVEN
- F64 Insts Dec2flt modelNumImpTraitsFloatU64 MIN EXPONENT ROUND TO EVEN
- F64 Insts Dec2flt modelNumImpTraitsFloatU64 NAN
- F64 Insts Dec2flt modelNumImpTraitsFloatU64 NEG INFINITY
- F64 Insts Dec2flt modelNumImpTraitsFloatU64 NEG NAN
- F64 Insts Dec2flt modelNumImpTraitsFloatU64 SIG MASK
- F64 Insts Dec2flt modelNumImpTraitsFloatU64 SIG TOTAL BITS
- F64 Insts Dec2flt modelNumImpTraitsFloatU64 SMALLEST POWER OF TEN
- F64 Insts Dec2flt modelNumImpTraitsFloatU64 classify
- F64 Insts Dec2flt modelNumImpTraitsFloatU64 to bits
- ModelF64Classify
- ModelF64Clone
- ModelF64Div
- ModelF64ExponentMask
- ModelF64FromBits
- ModelF64FromU64
- ModelF64Infinity
- ModelF64MantissaDigits
- ModelF64MantissaMask
- ModelF64Mul
- ModelF64Nan
- ModelF64Neg
- ModelF64NegInfinity
- ModelF64ToBits
- ModelOptionBranch
- ModelOptionFromResidual
- ModelSliceFirst
- ModelSliceSplitFirst
- ModelStrAsBytes
- ModelU64BitAnd
- ModelU64BitOr
- ModelU64Shl
- ModelU64Shr
- ModelU8IsAsciiDigit
- NumberHelperReadEightBytes
- Preamble
- SliceU8 Insts Dec2flt modelNumImpDec2fltCommonByteSlice read u64
- SourceValidByteSlice
- SpecialHelperRejection
- U64 Insts CoreOpsBitBitAndU64U64
- U64 Insts CoreOpsBitBitOrU64U64
- U64 Insts CoreOpsBitShlU32U64
- U64 Insts CoreOpsBitShrU32U64
- U64 Insts Dec2flt modelNumImpTraitsCastIntoI16
- U64 Insts Dec2flt modelNumImpTraitsCastIntoI16 cast
- U64 Insts Dec2flt modelNumImpTraitsInt
- U64 Insts Dec2flt modelNumImpTraitsInt ONE
- U64 Insts Dec2flt modelNumImpTraitsInt ZERO
- core num FpCategory
- core ops arith Div
- core ops arith Mul
- core ops arith Neg
- core ops bit BitOr
- core ops bit Shl
- core ops bit Shr
- num imp dec2flt common BiasedFp
- num imp dec2flt decimal Decimal
- num imp dec2flt parse parse inf nan
- num imp traits CastInto
- num imp traits Float
- num imp traits Float EXP BIAS default
- num imp traits Float EXP BITS default
- num imp traits Float EXP MIN default
- num imp traits Float EXP SAT default
- num imp traits Float SIG BITS default
- num imp traits Int
Technical checking records
Local closure summary
{
"node": "SpecialHelperRejection",
"closure_version": "patch_c_v1",
"active_decl_hash": "634c275e53a57b0277fe0504f0ba890190ad2b2d196389b20999a0eda5da6d7f",
"active_statement_hash": "a68d1482ac66762b418de8666fefd0718f1065c435ede987c920ac1d4d740f37",
"kernel_axioms": [
"Classical.choice",
"Quot.sound",
"propext"
],
"toolchain_hash": "ce4c4e3d87434b9663f46de25ce34b48a0cf0d392e0a320a0787b4674a2d7b61",
"lean_executable_hash": "3e0d0d3d801675359f2d4cf9815bfdb417b20b92fdd9d48b3b14c95bbae28bbf",
"checker_script_hash": "c8e4a03273e23b9a8f2e141020652a4e0b7b0a8ab0883366ea9d031ca3f37aa1",
"approved_axioms_hash": "576e6bf9480cfd32f53c309c7ac8fb115c1ba6e413f299ed5ff9fa7c647e6769",
"axcheck_status": "Agreed",
"accepted_at_snapshot_id": "worker-result-local-closure-issuance-cycle-181",
"boundary_theorems": {},
"strict_theorem_deps": {
"DecimalGoalVocabularyDefault": "94cb4c406f8efb78",
"NumberHelperReadEightBytes": "134d29b1dd90f0d5",
"num_imp_dec2flt_parse_parse_inf_nan": "faf0081b4c91301b"
},
"strict_definition_deps": {
"DecimalGoalVocabulary": "0717fd246d7ea78a",
"DecimalGoalVocabularyDefault": "55eb6bce0e8a4131",
"DecimalLexeme": "c43614ff2149ecf2",
"F64": "ec4e25fbaf4e11d4",
"F64_Insts_Dec2flt_modelNumImpTraitsFloatU64": "94095c9bf79da164",
"F64_Insts_Dec2flt_modelNumImpTraitsFloatU64_INFINITY": "618a328783684238",
"F64_Insts_Dec2flt_modelNumImpTraitsFloatU64_NAN": "faf51f3aa8d94806",
"Preamble": "5575719dcb1443eb",
"SliceU8_Insts_Dec2flt_modelNumImpDec2fltCommonByteSlice_read_u64": "279b0c1cd8ec9e39",
"SourceValidByteSlice": "3dc42716a6378d26",
"core_ops_arith_Neg": "0ff07135a60bcbf9",
"num_imp_dec2flt_common_BiasedFp": "31d81cf1cf22709f",
"num_imp_dec2flt_decimal_Decimal": "4c41a56bf44cb31e",
"num_imp_dec2flt_parse_parse_inf_nan": "f0fbcb51738b1e4e",
"num_imp_traits_Float": "98c6948504393cdb"
}
}Prose assessment
{
"label": "Lean proof closed; predictive prose review no longer required",
"assessment_status": null,
"fingerprint_relation": "unknown",
"assessment_fingerprint": null,
"current_fingerprint": "sound-v2:0e44f4030f8413dcef58066736fadfe45e597d5c391bc69022f42d7dced13925",
"superseded_for_theorem_closure": false
}Review verdicts
{
"corr_status": "Pass",
"substantiveness_status": "Pass"
}