def min_eq_l
bend-collections-laws-math@1.0.0.0 · proofs/math/natural/misc.bend:67
import bend-collections-laws-math@1.0.0.0/proofs/math/natural/misc.bend as Misc
import Base
import bend-collections-laws-math@1.0.0.0/proofs/lib/nat.bend as N
import bend-collections-laws-math@1.0.0.0/proofs/lib/logic.bend as L
67def min_eq_l(+y: Nat, +hi: Nat, +h: {Nat.is_le(y, hi) == True{} : Bool}) -> {Nat.min(y, hi) == y : Nat}:
68 match y hi:
69 case 0n h0:
70 {==}
71 case 1n+yp 0n:
72 Empty.absurd({Nat.min(1n+yp, 0n) == 1n+yp : Nat}, L.false_true(h))
73 case 1n+ +yp 1n+ +hp:
74 N.succ_cong(Nat.min(yp, hp), yp, min_eq_l(yp, hp, h))