def min_agrees
bend-collections-laws-crypto@1.0.0.0 · proofs/math/typed/u32.bend:94
import bend-collections-laws-crypto@1.0.0.0/proofs/math/typed/u32.bend as U32
import Base
import bend-collections-laws-crypto@1.0.0.0/spec/math/generic.bend as SG
import bend-collections-laws-crypto@1.0.0.0/src/math/generic.bend as G
import bend-collections-laws-crypto@1.0.0.0/src/math/instances.bend as I
import bend-collections-laws-crypto@1.0.0.0/proofs/lib/u32.bend as U
94def min_agrees(+a: U32, +b: U32) -> SG.Min.agrees(~U32, ~I.u32_op, ~I.u32_is, ~SG.u32_val, ~SG.u32_of, a, b):
95 %Equal.sym(Bool, U32.is_lt(b, a), Nat.is_lt(U32.to_nat(b), U32.to_nat(a)), U.is_lt_nat(b, a)) : {G.pick(U32, _, b, a) == U32.from_nat(Nat.min(U32.to_nat(a), U32.to_nat(b))) : U32}
96 min_c(a, b, Nat.is_lt(U32.to_nat(b), U32.to_nat(a)), {==})