NatExtrema.below_minimum: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/proofs/nat_extrema.bend as NatExtrema Lines 111-119 of stelliferous@0.0.2.0/proofs/nat_extrema.bend: https://jend.leeeet.dev/read.txt?path=stelliferous@0.0.2.0/proofs/nat_extrema.bend&start_line=111&end_line=119 import Base # A lane belongs to a clipped count exactly when it belongs to both bounds. def below_minimum(+value: Nat,+left: Nat,+right: Nat) -> {Nat.is_lt(value,Nat.min(left,right)) == Nat.is_lt(value,left) && Nat.is_lt(value,right) : Bool}: match value left right: case value 0n right: {==} case value 1n+left 0n: below_zero_right(Nat.is_lt(value,1n+left)) case 0n 1n+left 1n+right: {==} case 1n+value 1n+left 1n+right: below_minimum(value,left,right) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.min https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/proofs/nat_extrema.bend&name=below_zero_right