The configuration for grind.
Passed to grind using, for example, the grind (config := { matchEqs := true }) syntax.
- trace : Bool
If
traceistrue,grindrecords used E-matching theorems and case-splits. - lax : Bool
If
laxistrue,grindwill silently ignore any parameters referring to non-existent theorems or for which no patterns can be generated. - suggestions : Bool
If
suggestionsistrue,grindwill invoke the currently configured library suggestion engine on the current goal, and add attempt to use the resulting suggestions as additional parameters to thegrindtactic. - splits : Nat
Maximum number of case-splits in a proof search branch. It does not include splits performed during normalization.
- ematch : Nat
Maximum number of E-matching (aka heuristic theorem instantiation) rounds before each case split.
- gen : Nat
Maximum term generation. The input goal terms have generation 0. When we instantiate a theorem using a term from generation
n, the new terms have generationn+1. Thus, this parameter limits the length of an instantiation chain. - instances : Nat
Maximum number of theorem instances generated using E-matching in a proof search tree branch.
- matchEqs : Bool
If
matchEqsistrue,grindusesmatch-equations as E-matching theorems. - splitMatch : Bool
If
splitMatchistrue,grindperforms case-splitting onmatch-expressions during the search. - splitIte : Bool
If
splitIteistrue,grindperforms case-splitting onif-then-elseexpressions during the search. - splitIndPred : Bool
If
splitIndPredistrue,grindperforms case-splitting on inductive predicates. Otherwise, it performs case-splitting only on types marked with[grind cases]attribute. - splitImp : Bool
If
splitImpistrue, then given an implicationp → qor(h : p) → q h,grindsplits onpif the implication is true. Otherwise, it will split only ifpis an arithmetic predicate. - canonHeartbeats : Nat
Maximum number of heartbeats (in thousands) the canonicalizer can spend per definitional equality test.
- ext : Bool
If
extistrue,grinduses extensionality theorems that have been marked with[grind ext]. - extAll : Bool
If
extAllistrue,grinduses any extensionality theorems available in the environment. - etaStruct : Bool
If
etaStructistrue, then for each termt : Ssuch thatSis a structure, and is tagged with[grind ext],grindadds the equationt = ⟨t.1, ..., t.n⟩which holds by reflexivity. Moreover, the extensionality theorem forSis not used. - funext : Bool
If
funextistrue,grindcreates new opportunities for applying function extensionality by case-splitting on equalities between lambda expressions. - lookahead : Bool
TODO
- verbose : Bool
If
verboseisfalse, additional diagnostics information is not collected. - clean : Bool
If
cleanistrue,grindusesexpose_namesand only generates accessible names. - qlia : Bool
If
qliaistrue,grindmay generate counterexamples for integer constraints using rational numbers, and ignoring divisibility constraints. This approach is cheaper but incomplete. - mbtc : Bool
If
mbtcistrue,grindwill use model-based theory combination for creating new case splits. See paper "Model-based Theory Combination" for details. - zetaDelta : Bool
When set to
true(default:true), local definitions are unfolded during normalization and internalization. In other words, given a local context with an entryx : t := e, the free variablexis reduced toe. Note that this behavior is also available insimp, but there its default isfalsebecausesimpis not always used as a terminal tactic, and it important to preserve the abstractions introduced by users. Additionally, ingrindwe observed thatzetaDeltais particularly important when combined with function induction. In such scenarios, the same let-expressions can be introduced by function induction and also by unfolding the corresponding definition. We want to avoid a situation in whichzetaDeltais not applied to let-declarations introduced by function induction whilezetaunfolds the definition, causing a mismatch. Finally, note that congruence closure is less effective on terms containing many binders such aslambdaandletexpressions. - zeta : Bool
When
true(default:true), performs zeta reduction of let expressions during normalization. That is,let x := v; e[x]reduces toe[v]. See alsozetaDelta. - ring : Bool
When
true(default:true), uses procedure for handling equalities over commutative rings. This solver also support commutative semirings, fields, and normalizer non-commutative rings and semirings. - ringSteps : Nat
Maximum number of steps performed by the
ringsolver. A step is counted whenever one polynomial is used to simplify another. For example, givenx^2 + 1andx^2 * y^3 + x * y, the first can be used to simplify the second to-1 * y^3 + x * y. - linarith : Bool
When
true(default:true), uses procedure for handling linear arithmetic forIntModule, andCommRing. - lia : Bool
- ac : Bool
When
true(default:true), uses procedure for handling associative (and commutative) operators. - acSteps : Nat
Maximum number of steps performed by the
acsolver. A step is counted whenever one AC equation is used to simplify another. For example, givenma x z = wandmax x (max y z) = x, the first can be used to simplify the second tomax w y = x. - exp : Nat
Maximum exponent eagerly evaluated while computing bounds for
ToIntand the characteristic of a ring. - abstractProof : Bool
When
true(default:true), automatically creates an auxiliary theorem to store the proof. - inj : Bool
When
true(default:true), enables the procedure for handling injective functions. In this mode,grindtakes into account theorems such as:@[grind inj] theorem double_inj : Function.Injective double - order : Bool
When
true(default:true), enables the procedure for handling orders that implement at leastStd.IsPreorder - min : Nat
Minimum number of instantiations to trigger summary report in
#grind_lint. Remark: this option is only relevant for the#grind_lintcommand. - detailed : Nat
Minimum number of instantiations to trigger detailed report in
#grind_lint. Remark: this option is only relevant for the#grind_lintcommand. - useSorry : Bool
When
trace := true, usessorryto close unsolved branches.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
- Lean.Grind.instBEqConfig.beq x✝¹ x✝ = false
Instances For
Equations
A minimal configuration, with ematching and splitting disabled, and all solver modules turned off.
grind will not do anything in this configuration,
which can be used a starting point for minimal configurations.
Instances For
A grind configuration that only uses cutsat and splitting.
Note: cutsat benefits from some amount of instantiation, e.g. Nat.max_def.
We don't currently have a mechanism to enable only a small set of lemmas.