Documentation

CslibFrontier.Foundations.Data.Rat.ClearDenom

Clearing rational denominators #

Rat.clearDenom_entry computes the integer obtained by scaling a rational by a multiple of its denominator. It is shared by rational matrix and integer-programming reductions.

theorem Rat.clearDenom_entry {q : ℚ} {d : ℕ} (hdvd : q.den ∣ d) :
↑d * q = ↑(q.num * ↑(d / q.den))

Clearing a single rational denominator by multiplying with a multiple d of q.den.