Exact fixed points without positivity: signed candidates certified by zero-freeness on the closed unit polydisc

Open
#559 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
backend, testing

Research direction

Start with loops/rules/exact_fixed_point.py and the existing distribution/pgf/rules/unit_polydisc.py criterion; then inspect the rule layer dependency in #552 and the prodigy/language fragment APIs. Implementing this spans a new exact three-valued obligation, ReDiP membership checks, a signed rule, strategy integration, tests on both engines, benchmarks, and documentation. Done means all listed soundness conditions hold and the benchmark and golden comparisons show no weaker results.

Written by the indexing model from the issue text.

Description

area: analysis area: engines enhancement priority: high topic: loop strategies

Problem

The exact fixed-point rule (loops/rules/exact_fixed_point.py, strategies evt_invariant and evt_synthesis) accepts a
rational candidate I = N/D only if its coefficients are proven non-negative (the nonneg chain with the positivity
rule) and its mass is finite. Non-negativity of a rational power series subsumes the Positivity Problem for linear
recurrences, so the chain is necessarily incomplete: many correct candidates stay unknown, and some loops have no
non-negative rational fixed point at all.

Proposal

Yang, Ma, Yin, Chen, Exact Inference Without Positivity: Certifying Signed Fixed Points for Probabilistic Loops,
arXiv:2612.02006 (Dec 2026), give a rule that needs no positivity:

  • Theorem 14: if the reduced denominator D has no zero on the closed unit polydisc, then I has absolutely
    summable coefficients (I ∈ ℓ¹).
  • Theorem 16: if I ∈ ℓ¹ and Ψ_g(I) = I in the signed extension of the occupation-measure semantics, then the loop
    is PAST on g and [¬φ]·I is the exact posterior. Under UAST, I is the occupation measure.
  • Theorem 18 (relative completeness): every non-negative rational fixed point in ℓ¹ passes the test, so the rule
    subsumes the positivity-based rule.

Their evaluation reports 44/50 benchmarks certified, against 18/50 for the positivity check taken from Prodigy.

Fit in the rule layer (#552)
  • New obligation in_l1 in prodigy/distribution (one three-valued chain, next to nonneg), deciding
    zero-freeness of D on the closed unit polydisc. Exact over ℚ, in this order:

    1. quick rejection at boundary points;
    2. factorisation (factor by factor);
    3. substitution of indeterminates that occur only with exponents divisible by r;
    4. coefficient dominance;
    5. Schur–Cohn for univariate factors.

    Anything left is Undecided. A real-algebraic decision procedure is optional; the paper reports it was never needed.
    Natural home: distribution/pgf/rules/unit_polydisc.py. Its existing criterion is different: convergence on the
    open polydisc for non-negative series (#276).

  • Rule: a signed variant of exact_fixed_point with the obligations in_l1(I) and equal(I, Ψ(I)). Guarantee:
    the exit part is exact, with PAST as evidence. evt_synthesis tries it when nonneg stays undecided, instead of
    blocking the candidate. Candidate sources are unchanged.

Soundness conditions (must be stated in the rule's docstring and enforced)
  1. The signed semantics of the body. Theorem 21 proves that the closed-form transformations compute the signed
    transformer only for loop-free ReDiP bodies: rectangular guards (and Boolean combinations of them), iid with a
    rational PGF, decrement, and constant and linear assignments. Prodigy's language is larger. Membership is a
    question about the program, so it is answered in prodigy/language, not by a syntax walk in analysis:
    • the language package offers fragment membership, fragments.REDIP with a check that returns the first
      construct outside the fragment and its position;
    • the rule asks it for the loop and its body, and its docstring cites Theorem 21 for that fragment;
    • runtime properties stay in the rule: an approximated body (scope.kind) and observe before the loop.
      Nested loops are outside the fragment unless they are flattened first, as in the paper.
  2. Refutation. A zero on the closed polydisc refutes I ∈ ℓ¹ only for one variable (Prop. 23). For several
    variables the test is only sufficient (example (1−X)^8(1−Y)^8/(2−X−Y)). The chain may answer "refuted" only in
    the univariate case, and then with the zero as witness.
  3. Order of the checks. Condition (1) must be proven before Ψ(I) is evaluated, because Ψ is only well defined on ℓ¹.

Done when

  • in_l1 is one chain in prodigy/distribution with the five steps above, three-valued, exact, and
    engine-independent: case analysis in shared code, CAS operations as hooks. Tests cover generic members of each
    step's class, both engines.
  • prodigy/language answers "is this program (part) in ReDiP?" with the first offending construct. The ReDiP
    fragment is defined there once, including the derived constructs of Chen et al. 2022b, App. A.
  • The signed rule is in loops/rules/, with theorem and side conditions in its docstring. It asks the language
    package for fragment membership and does no syntax walk of its own. It returns RuleResult(Guarantee, Evidence), and evt_invariant and evt_synthesis use it after
    nonneg.
  • Tests on classes:
    • candidates with negative coefficients that the rule proves (geometric walks, coupon collector);
    • a loop without a non-negative rational fixed point (the SampleMatching class);
    • candidates the rule must not accept: a denominator zero on the polydisc; a body outside the allowlist; a
      multivariate case that stays undecided.
  • Every benchmark of the paper's Table 3 that exists in pgfexamples/ is listed with its result before and
    after. No result may become weaker.
  • The documentation is updated: loop-rules.md (the obligation and the rule), the strategy texts, and a citation
    of the paper.
  • The golden comparison against main on both engines shows every result that became stronger, listed one by one.

Depends on: rule PR 2 of #552 (the rule layer). Independent of rule PR 3 (LP).

Dominant language
Python
Stars
6
Forks
2
Avg merge
1h 52m
Merged PRs (30d)
187

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from LKlinke/Prodigy

All issues in LKlinke/Prodigy

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.