Skip to main content

Module monotonic_product

Module monotonic_product 

Source

Re-exportsยง

use super::*; ๐Ÿ”’

Structsยง

OrderFacts ๐Ÿ”’

Enumsยง

Rounding ๐Ÿ”’
Rounding of x * y / d over the integers, where every rounding of x * y / 0 is zero as in the EVM. Floor <= Ceil.

Functionsยง

chained_less_or_equal ๐Ÿ”’
Returns whether left <= right follows directly or through one asserted ordering.
collect_order_facts ๐Ÿ”’
disequality ๐Ÿ”’
Returns the operands of a disequality, which antisymmetry contradicts.
expr_less_or_equal ๐Ÿ”’
Returns whether the known unsigned order and no-overflow bounds imply left <= right.
has_remainder ๐Ÿ”’
Returns whether the facts assert mulmod(x, y, d) != 0, or false when they assert it is zero.
increment_operand ๐Ÿ”’
Returns q for q + 1.
is_mul_high_of ๐Ÿ”’
is_quotient_product ๐Ÿ”’
Returns whether a * b is q * d for a quotient q of x * y / d, where (x, y) are the factors of the other product.
is_wide_term ๐Ÿ”’
less_or_equal_comparison ๐Ÿ”’
Returns the unsigned weak ordering asserted by this constraint.
mul_operands ๐Ÿ”’
nonzero_expr ๐Ÿ”’
order_facts ๐Ÿ”’
product_less_or_equal_known ๐Ÿ”’
product_less_or_equal_known_ordered ๐Ÿ”’
product_less_than_known ๐Ÿ”’
product_less_than_known_ordered ๐Ÿ”’
product_less_than_negation ๐Ÿ”’
product_monotonic_unsat_normalized ๐Ÿ”’
Returns whether normalized monotonic product facts make constraints unsatisfiable.
product_quotient_fits ๐Ÿ”’
Returns whether the facts assert mul_high(x, y) < d, so x * y / d fits a word.
quotient_fits ๐Ÿ”’
Returns whether a quotient is known not to be truncated to a word.
quotient_lower_bound ๐Ÿ”’
Returns a rounded quotient that expr is at least.
quotient_operands ๐Ÿ”’
Returns (x, y, d) when expr is floor(x * y / d) truncated to a word, or zero for d == 0.
quotient_upper_bound ๐Ÿ”’
Returns a rounded quotient that expr is at most.
remove_implied_monotonic_constraints ๐Ÿ”’
Removes hard-arithmetic comparisons implied by the remaining path constraints.
reversed_strict_comparison ๐Ÿ”’
Returns a strict comparison that contradicts right <= left.
rounded_quotients_ordered ๐Ÿ”’
Returns whether round(a * b / d) <= round'(a' * b' / d), which holds for the same divisor once round <= round' and a * b <= a' * b'.
same_factors ๐Ÿ”’
Returns whether {a, b} and {x, y} are the same factors in either order.
successor_below_exact_quotient ๐Ÿ”’
Returns whether quotient + 1 <= MAX, because it is at most ceil(x * y / d) for a product that d divides with a quotient that fits a word.
successor_upper_bound ๐Ÿ”’
Returns ceil(x * y / d) when the quotient q of x * y / d has a nonzero remainder, so that q + 1 <= floor(x * y / d) + 1 == ceil(x * y / d) over the integers.
wide_product_less_or_equal ๐Ÿ”’
Returns whether left_a * left_b <= right_a * right_b over the unbounded integers.
wide_term_below ๐Ÿ”’
Returns whether a high word or quotient large is below lower because it is at most a term whose range ends below lower.
wide_term_lower_bound ๐Ÿ”’
Returns a high word or quotient and the lower bound this constraint asserts for it.

Type Aliasesยง

LessOrEqualFacts ๐Ÿ”’
LessThanFacts ๐Ÿ”’
PositiveFacts ๐Ÿ”’
RoundedQuotient ๐Ÿ”’
(x, y, d, rounding) for the rounded quotient rounding(x * y / d).
ZeroFacts ๐Ÿ”’