[sledge] Change: Strengthen Term invariant that exponents are integers

Summary:
Exponents in polynomials are represented by rationals for code reuse
purposes, but only integral exponents are supported. Strengthen the
invariant check to clarify this.

Reviewed By: ngorogiannis

Differential Revision: D22170517

fbshipit-source-id: 81ae38f4e
master
Josh Berdine 4 years ago committed by Facebook GitHub Bot
parent 6b44eaf2e6
commit c7556364b7

@ -253,7 +253,7 @@ let assert_monomial mono =
match mono with
| Mul args ->
Qset.iter args ~f:(fun factor exponent ->
assert (Q.is_real exponent) ;
assert (Z.equal (Q.den exponent) Z.one) ;
assert (Q.sign exponent > 0) ;
assert_indeterminate factor |> Fn.id )
| _ -> assert_indeterminate mono |> Fn.id

Loading…
Cancel
Save