Hol State At
hol_state_atReplays a theorem's tactics up to a given file position and returns the resulting HOL4 proof goals. Use it to inspect what remains to be proved at any step in a Script file.
Instructions
Get proof state at a file position.
Replays tactics from theorem start up to (but not including) the tactic at the given position, then shows current goals. Auto-enters theorem if needed.
By default only the top goal is shown (with total count). Set all_goals=True to see every goal on the stack.
If replay fails before reaching the requested position, the default behavior is to refuse to show goals (they would be from the wrong proof state). Set show_partial=True to see the best-effort goals anyway.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"line": "<line>"
},
"name": "hol_state_at"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| col | No | 1-indexed column number (default 1) | |
| file | No | Path to .sml file (auto-inits cursor if no cursor exists) | |
| line | Yes | 1-indexed line number (position in the proof) | |
| session | No | Session name (default: "default") | default |
| workdir | No | Working directory for HOL (used with file) | |
| all_goals | No | If True, show all goals; otherwise only the top goal (default: False) | |
| max_output | No | Max bytes of output (default 1000) | |
| show_partial | No | If True, show best-effort goals even when replay fails before reaching the requested position (default: False) | |
| context_after | No | On PROOF BROKEN, number of source lines after the failure to include in the step plan context (default: 0, off). Both default to 0 (only failing step shown); pass e.g. 3 for surrounding context. | |
| context_before | No | On PROOF BROKEN, number of source lines before the failure to include in the step plan context (default: 0, off). The failing step is always shown; this adds steps whose source positions fall within the line range. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |