TacticActionIR
TacticActionIR is a wonton-soup typed step-summary between raw tactic strings and downstream proof analysis.
Why It Exists
ProofGraphIR was already normalizing graph families and role profiles, but it still treated tactic semantics as something inferred from edge labels after the fact. TacticActionIR exists so the search and assembly artifacts retain a typed account of what one proof step did.
Schema
Each action records:
action_kind: what produced the step (tactic_step,term_constructor,proof_rule,other)operator_kind: assistant-agnostic operator family (apply,bind,branch,rewrite, …)motif_kind: higher-level structural motif (motif:bind_open,motif:term_apply, …)effect_flags: small explicit effect vocabulary such asopens_binder,branches_goals,rewrites_target,discharges_goalbranch_arity: how many child goals or structural children the action yieldscontinuation_kind:solve,chain,branch,structural, orrefinegoal_coupling:none,independent,coupled, orunknowntactic_depends_on/depends_on_count: explicit proof-hypothesis dependency summary when the producer can expose itproof_step_count: how many underlying Lean proof-tree steps were summarized into the action
ProofGraphIR now derives these action-level aggregate profiles:
action_kind_profileeffect_profilecontinuation_profilecoupling_profile
These are intrinsic graph summaries. Run-relative rank features remain outside the IR.
Stance
TacticActionIRis a producer-side observational contract.- It is meant to preserve step semantics that would otherwise be lost in tactic strings or bare graph edges.
- It does not claim lawful composition, round-trippable execution, or a full tactic language.
- Stronger algebraic or compositional claims belong to the separate research agenda in Lean Tactic Representation, not to this dossier doc.
Visual Cases
Semantics
- Search traces group outgoing edges by expansion order so one tactic application becomes one action, not one action per child goal.
- Terminal search steps become explicit
solveactions viaterminal_tactic. - Proof-term DAGs and external proof graphs currently map one edge to one action.
- Goal coupling now uses explicit branch partitioning from Lean preview traces when available.
- Lean step summaries now also expose lightweight proof-tree dependency data (
tacticDependsOn,spawnedGoals,proofStepCount) without waiting for offline parsing. - Multi-branch search steps still fall back to
unknownonly when the source trace does not expose enough structure.
Ontology v1
| source role | operator_kind | motif_kind | default effect flags |
|---|---|---|---|
fam:intro |
bind |
motif:bind_open |
opens_binder |
fam:apply |
apply |
motif:apply_step |
instantiates_goal |
fam:split / fam:cases |
branch |
motif:branch_split |
branches_goals |
fam:rewrite / fam:simplify |
rewrite |
motif:rewrite_step |
rewrites_target, normalizes_goal |
fam:closer / fam:contradiction |
close |
motif:close_goal |
discharges_goal |
fn / arg |
apply |
motif:term_apply |
builds_term |
binder_type / body |
bind |
motif:term_bind |
builds_term |
value |
value |
motif:term_value |
builds_term |
Preview-derived metadata can add explicit flags on top of this table:
branches_goalscloses_goalsopens_goalsrefines_termcompletes_termcouples_goalssplits_independent_goalsspawns_goalsuses_hypotheses
Example Search-Trace Action
{
"tactic": "constructor",
"edge_role": "fam:split",
"action_kind": "tactic_step",
"branch_arity": 2,
"branch_count": 2,
"branch_goal_counts": [1, 1],
"goal_coupling": "independent",
"shared_mvar_count": 0,
"tactic_depends_on": ["hp", "hq"],
"depends_on_count": 2,
"proof_step_count": 1,
"continuation_kind": "branch",
"effect_flags": [
"branches_goals",
"closes_goals",
"opens_goals",
"splits_independent_goals",
"uses_hypotheses"
]
}Artifact Boundary
The typed action summary now lands in two places:
- search-graph edge and terminal-node metadata, so search artifacts retain the step structure
- assembly-trace
actionMetadata, so the same action survives after solution extraction
The shared vocabulary now lives in dossiers/wonton-soup/prover/tactic_ir.py, with graph-level aggregation in dossiers/wonton-soup/analysis/proof_graph_ir.py.
Scoring Contract
These action-layer profiles are now part of graph comparison, not just documentation:
action_kind_profileeffect_profilecontinuation_profilecoupling_profile
Same-kind alignment uses them alongside edge-role, operator, motif, and shape channels. Cross-kind alignment uses them alongside rank-normalized structure so the comparison has a typed proof-process signal even when raw graph families differ.
Producer Data Sources
The main upstream sources in the repo are:
dossiers/wonton-soup/prover/adapters/lean.pyTacticPreviewcarriesbranches,partial_term_before,partial_term_after,completed_proof_term,goals_before, andgoals_after.dossiers/wonton-soup/prover/assembly.pyAssemblySteprecords partial-term transitions plusgoals_closedandgoals_opened.dossiers/wonton-soup/libs/leantree/leantree/repl_adapter/data.pyexposesspawned_goals,mctx_before,mctx_after, andtactic_depends_on.
Those artifacts are the right source of truth for replacing heuristic unknown coupling and coarse continuation buckets with explicit proof-process structure.
Inspection
For theorem-level debugging, use:
uv run python wonton.py inspect-proof-ir \
--run-dir <run_dir> \
--theorem <theorem_name> \
--graph-source wild_type_graphAdd --compare-theorem and --compare-run-dir to get a direct pair-distance breakdown, or --lexical-ablation graph_only to inspect the graph/action signal without lexical channels.
Boundary
TacticActionIR and ProofGraphIR are related, but they are not the same layer. A simple test is:
- if the concept describes one proof step or a family of steps, it belongs here
- if the concept describes how whole graphs are normalized and compared across assistants, it belongs with
ProofGraphIR
The addendum remains the home of the research question about richer tactic representation, but this step-level representation belongs with the dossier that consumes it.