lean-crush

4.8. Diagnostics🔗

🔗option
crush.trace.script

Default value: false

Log the full generated SMT-LIB script as an info message.

For normal development, prefer crush.save when the script is large. The trace option is convenient for short queries and editor diagnostics.

🔗option
crush.profile

Default value: false

Log a per-phase wall-clock breakdown of the tactic (collect, normalize, monomorphize, instantiate, translate, solve, reconstruct) as an info message, to find where time goes.

Profiling distinguishes time spent in Lean-side preprocessing and translation from solver and reconstruction time. It should be the first diagnostic enabled for a scalability problem.

🔗option
crush.profile.machine

Default value: false

When crush.profile is enabled, also print one machine-readable TSV record containing the declaration, goal hash, outcome, reconstruction status, and nanoseconds spent in each phase. Intended for benchmark tooling.

crush.profile.machine is intended for benchmark tooling. It has an effect only when crush.profile is enabled and adds one tab-separated CRUSH_PROFILE record per tactic invocation. The record includes the outcome, replay status, nanosecond phase timings, and certificate-size metrics for successful Alethe replay. Interactive users normally need only the human-readable crush.profile report.

Lean trace classes provide more focused details:

set_option trace.crush true
set_option trace.crush.mono true
set_option trace.crush.inst true
set_option trace.crush.script true
set_option trace.crush.result true
set_option trace.crush.reconstruct true
set_option trace.crush.replay true

Trace classes are separate from crush.trace.script. The option emits the script as an info message, while trace.crush.script uses Lean's trace mechanism and can be filtered with other traces. trace.crush reports hypotheses omitted after a translation failure. trace.crush.replay reports attempts, selected methods, and decode/dispatch timings by Alethe rule. It also prints the decoded inputs for steps taking at least 100 ms. Anchor timings are inclusive and overlap their nested steps.