Verify a rational primal-dual certificate
verify_certificate.RdChecks simplex and dual feasibility and evaluates the exact integer numerators and denominators of a residual sandwich.
Arguments
- M
Numeric binary matrix.
- target_num
Integer target numerators, one per row.
- target_den
Positive common integer target denominator.
- weight_num
Nonnegative integer weights; their sum is the denominator.
- dual_num
Signed integer dual numerators, one per row.
- dual_den
Positive common integer dual denominator.
Details
All intermediate integer operations are conservatively bounded below 2^50 so binary64 arithmetic can represent them exactly. Unsupported large inputs are rejected. The certificate is for the specified rational targets, not an unknown unrounded version. Exact comparisons of rational bounds should use cross multiplication only when products stay in range.