lean-crush

4.5. Monomorphization🔗

🔗option
crush.mono.fuel

Default value: 512

Maximum number of monomorphization instances generated before giving up.

🔗option
crush.mono.rounds

Default value: 8

Maximum saturation rounds for the monomorphization E-matching loop.

Monomorphization specializes polymorphic facts at concrete types found in the query. fuel bounds the total number of generated type instances, while rounds bounds how many times newly discovered types can trigger another saturation pass. If either bound is hit, lean-crush warns because the resulting fact set may be incomplete. Raise the bound only when the warning names monomorphization and the missing instance is relevant to the goal. Setting either bound to 0 disables monomorphization.

🔗option
crush.mono.certify

Default value: false

Type-check each generated monomorphization instance (its proof term must have its proposition) and drop any that fail. Off by default: under the reconstruct policy the kernel re-checks the proof during replay anyway, so this only adds value under trust/reconstructOrTrust, where it turns the pass's soundness from argued into checked at each call.

Certification is most useful under a trusting policy when auditing generated specializations. Reconstruction already asks Lean's kernel to check the final proof.