prodigy.analysis.evtinvariants.heuristics.positivity.iterate_terms

class IterateTermsHeuristic(dist_fact, iterations=10, sub_heuristic=None, *variables)[source]

Bases: PositivityHeuristic

This heuristic generates the first _iterations_ terms (default: 10) and checks whether there is a negative coefficient, hence witnessing negativity of the formal power series. For the term generation, the heuristics it relies on the distribution functionality to generate terms.

..returns:
  • False: The given distribution is not non-negative (i.e., there is at least one negative coefficient)

  • None: The first _iterations_ may coefficients were >= 0.

Parameters: