Reference · Signed rationals
rainbow.math.rational.signed.convex-combination
Two-point convex combination of signed rationals stays within [min, max] -- the signed lift of nnrat/convex-at-most-max / convex-at-least-min, and a foundation brick for convex optimization over signed rationals (connects to the KKT / Lagrangian lane). signed/convex-at-most-max : (w0 + w1 ~ 1) -> (from-nnrat w0)*v0 + (from-nnrat w1)*v1 <= max v0 v1 signed/convex-at-least-min : (w0 + w1 ~ 1) -> min v0 v1 <= (from-nnrat w0)*v0 + (from-nnrat w1)*v1 Weights are nonnegative (nnrat, injected by from-nnrat). Each w_i*v_i is bounded by w_i*max (multiply-left-monotone, weight >= 0, v_i <= max), the two sum, and the weight sum collapses (w0+w1)*max ~ 1*max ~ max via distributivity + from-nnrat-add + (w0+w1~1). Does NOT route through the magnitude/reciprocal modulus, so it is free of that reduction wall. Axiom-free; additive; does not touch the LP checker.
signed/convex-at-most-max
signed/convex-at-most-max : (w0 w1 : ℚ≥0) (v0 v1 : ℚ) (hw : w0 + w1 = 1) → signed/from-nnrat w0 · v0 + signed/from-nnrat w1 · v1 ≤ signed/max v0 v1
+ = signed/add1 = nnrat/one= = nnrat/equivalent: equality of rational values· = signed/multiplyℚ = signed/SignedRationalℚ≥0 = nnrat/NonnegativeRational≤ = signed/at-most
signed/convex-at-least-min
signed/convex-at-least-min : (w0 w1 : ℚ≥0) (v0 v1 : ℚ) (hw : w0 + w1 = 1) → signed/min v0 v1 ≤ signed/from-nnrat w0 · v0 + signed/from-nnrat w1 · v1
+ = signed/add1 = nnrat/one= = nnrat/equivalent: equality of rational values· = signed/multiplyℚ = signed/SignedRationalℚ≥0 = nnrat/NonnegativeRational≤ = signed/at-most