def hbits
bend-collections-laws-math@1.0.0.0 · proofs/math/typed/f64bl.bend:32
import bend-collections-laws-math@1.0.0.0/proofs/math/typed/f64bl.bend as F64bl
import Base
import bend-collections-laws-math@1.0.0.0/spec/lib/common.bend as C
import bend-collections-laws-math@1.0.0.0/src/math/f64.bend as F
import bend-collections-laws-math@1.0.0.0/proofs/math/typed/w64add.bend as WA
32def hbits(+k: Nat, +n: Nat) -> {F.high_bits(k, n) == C.high(k, n) : Nat}:
33 match k:
34 case 0n:
35 {==}
36 case 1n+ +p:
37 Equal.trans(Nat, F.high_bits(p, Nat.div(n, 2n)), F.high_bits(p, C.half(n)), C.high(p, C.half(n)), Equal.cong(Nat, Nat, z => F.high_bits(p, z), Nat.div(n, 2n), C.half(n), Equal.sym(Nat, C.half(n), Nat.div(n, 2n), WA.half_div(n))), hbits(p, C.half(n)))