proofs/math/random/proof_float.bend

bend-collections-laws-math@1.0.0.0 · 21 lines · 2 definitions

1import Base
2import bend-collections-laws-math@1.0.0.0/spec/lib/common.bend as C
3import bend-collections-laws-math@1.0.0.0/src/math/u64.bend as W
4import bend-collections-laws-math@1.0.0.0/spec/math/w64.bend as SW
5import bend-collections-laws-math@1.0.0.0/spec/math/random.bend as SRM
6import bend-collections-laws-math@1.0.0.0/proofs/math/random/float.bend as FL
7import bend-collections-laws-math@1.0.0.0/spec/math/f64.bend as SF
8
9# Entry point: `bend proofs/math/random/proof_float.bend` checks the Float64
10# clauses of spec/math/random.bend, under the clause's name, for every input
11# (and every source, relation and element type where the clause is a
12# template). No holes, no axioms. The other clauses are checked by
13# proofs/math/random/proof.bend, proofs/math/random/proof_draws.bend,
14# proofs/math/random/proof_pcg.bend, so each root only re-checks the lemma
15# files it needs.
16
17def Float64.value(+x: W.U64, +n: Nat, +hn: {C.low(53n, SW.value(x)) == n : Nat}, +xv: Nat, +hx: {Nat.sub(SF.zb(), 53n) == xv : Nat}) -> SRM.Float64.value(x, n, hn, xv, hx):
18  FL.value(x, n, hn, xv, hx)
19
20def Float64.lt_one(+x: W.U64) -> SRM.Float64.lt_one(x):
21  FL.lt_one(x)