Bounds, quotients and remainders by fixed literals #
Formulas comparing with a fixed numeral and taking quotient and remainder by a fixed literal
divisor, built from the native addition formula and scaleEq. As with natEq, the literal need
not be an element of the universe: ltNat L k x holds exactly when the value of x is below
k, and the quotient and remainder formulas use only witnesses bounded by their dividend, so they
have exact natural-number semantics in every canonical universe.
Main definitions #
Cslib.Logic.FO.Ordered.ltNat: comparison with a fixed numeral.Cslib.Logic.FO.Ordered.scaleAddEq: the equationd * x + y = zfor a literald.Cslib.Logic.FO.Ordered.divNatEq,Cslib.Logic.FO.Ordered.modNatEq: quotient and remainder by a fixed positive literal.
Main results #
Cslib.Logic.FO.Ordered.realize_ltNat,Cslib.Logic.FO.Ordered.realize_scaleAddEq,Cslib.Logic.FO.Ordered.realize_divNatEq,Cslib.Logic.FO.Ordered.realize_modNatEq: exact natural-number semantics.
The value is below a fixed numeral, which need not be an element of the universe.
Instances For
The equation d * x + y = z for a fixed literal d.
Instances For
y is the quotient of x by the fixed literal d.
Instances For
y is the remainder of x by the fixed literal d.
Instances For
scaleAddEq L d x y z holds exactly when d * x + y = z.
divNatEq L d x y holds exactly when y = x / d, for a positive literal d.
modNatEq L d x y holds exactly when y = x % d, for a positive literal d.