def CheckedShr.value
import bend-collections-laws-math@1.0.0.0/spec/math/fixed.bend as Fixedimport Base
import bend-collections-laws-math@1.0.0.0/spec/lib/common.bend as C
107def CheckedShr.value(~T: Data, ~val: T -> Nat, ~f: @+x: T -> @+y: U32 -> Maybe<&2, T>, +w: Nat, +a: T, +s: U32) -> Type:
108 {mval(~T, ~val, f(a, s)) == keep(Nat.is_lt(U32.to_nat(s), w), C.high(U32.to_nat(s), val(a))) : Maybe<&2, Nat>}