Documentation

CslibFrontier.Tactic.Synthesis

Finding available circuit wires #

synthesis_available proves membership and inclusion of wire families by following unions, indexed bundles, and local availability hypotheses. It also finds the wires retained by a Synthesis.Builder. Semantic rewrites and bounds on indices remain ordinary local lemmas. The tactic never adds a gate or invokes a synthesis theorem.

It first tries synthesis_union, which matches syntactic members of a union A₀ ∪ T₁ ∪ ⋯ ∪ Tₖ at reducible transparency. This is the shape that a chain of Synthesis.extend steps produces. Only if that fails does it run the general search, which compares wire functions at default transparency. On wire families of equal width, such as the bits of BitVec words, those comparisons unfold the word operations before they fail. On a fifteen-step chain they exhaust the default heartbeat budget.

Main definitions #

Close X ⊆ A₀ ∪ T₁ ∪ ⋯ ∪ Tₖ when X is syntactically A₀ or some Tᵢ, or is contained in one of them by a local hypothesis, and close f ∈ A₀ ∪ T₁ ∪ ⋯ ∪ Tₖ from a local hypothesis f ∈ A₀ or f ∈ Tᵢ. Matching is at reducible transparency and never looks inside a wire family. Each step uses refine, which unifies the goal before recursing, so the search ends after one step per union in the goal and fails quickly on any other goal.

The recursive search behind synthesis_available. Its failures are discarded by the alternatives that call it, so only synthesis_available reports one.

Find already available wires, without synthesizing new functions. Tries the syntactic synthesis_union first, then the general search.

Append a synthesis rule to the named builder, solving its available-wire premises.