Which constants should be unfolded?
- all : TransparencyMode
Unfolds all constants, even those tagged as
@[irreducible]. - default : TransparencyMode
Unfolds all constants except those tagged as
@[irreducible]. - reducible : TransparencyMode
Unfolds only constants tagged with the
@[reducible]attribute. - instances : TransparencyMode
Unfolds reducible constants and constants tagged with the
@[instance]attribute.
Instances For
Which structure types should eta be used with?
- all : EtaStructMode
Enable eta for structure and classes.
- notClasses : EtaStructMode
Enable eta only for structures that are not classes.
- none : EtaStructMode
Disable eta for structures and classes.
Instances For
The configuration for dsimp.
Passed to dsimp using, for example, the dsimp (config := {zeta := false}) syntax.
Implementation note: this structure is only used for processing the (config := ...) syntax, and it is not used internally.
It is immediately converted to Lean.Meta.Simp.Config by Lean.Elab.Tactic.elabSimpConfig.
- zeta : Bool
- beta : Bool
When
true(default:true), performs beta reduction of applications offunexpressions. That is,(fun x => e[x]) vreduces toe[v]. - eta : Bool
TODO (currently unimplemented). When
true(default:true), performs eta reduction forfunexpressions. That is,(fun x => f x)reduces tof. - etaStruct : EtaStructMode
Configures how to determine definitional equality between two structure instances. See documentation for
Lean.Meta.EtaStructMode. - iota : Bool
When
true(default:true), reducesmatchexpressions applied to constructors. - proj : Bool
When
true(default:true), reduces projections of structure constructors. - decide : Bool
- autoUnfold : Bool
When
true(default:false), unfolds definitions. This can be enabled using thesimp!syntax. - failIfUnchanged : Bool
If
failIfUnchangedistrue(default:true), then calls tosimp,dsimp, orsimp_allwill fail if they do not make progress. - unfoldPartialApp : Bool
If
unfoldPartialAppistrue(default:false), then calls tosimp,dsimp, orsimp_allwill unfold even partial applications offwhen we requestfto be unfolded. - zetaDelta : Bool
When
true(default:false), local definitions are unfolded. That is, given a local context containingx : t := e, then the free variablexreduces toe. Otherwise,xmust be provided as asimpargument. - index : Bool
When
index(default :true) isfalse,simpwill only use the root symbol to find candidatesimptheorems. It approximates Lean 3simpbehavior. - zetaUnused : Bool
When
true(default :true), thensimpwill remove unusedletandhaveexpressions:let x := v; esimplifies toewhenxdoes not occur ine. - zetaHave : Bool
When
false(default:true), then disables zeta reduction ofhaveexpressions. Ifzetaisfalse, then this option has no effect. Unusedhaves are still removed ifzetaorzetaUnusedare true.
Instances For
The configuration for simp.
Passed to simp using, for example, the simp (config := {contextual := true}) syntax.
See also Lean.Meta.Simp.neutralConfig and Lean.Meta.DSimp.Config.
- maxSteps : Nat
The maximum number of subexpressions to visit when performing simplification. The default is 100000.
- maxDischargeDepth : Nat
When simp discharges side conditions for conditional lemmas, it can recursively apply simplification. The
maxDischargeDepth(default: 2) is the maximum recursion depth when recursively applying simplification to side conditions. - contextual : Bool
When
contextualis true (default:false) and simplification encounters an implicationp → qit includespas an additional simp lemma when simplifyingq. - memoize : Bool
When true (default:
true) then the simplifier caches the result of simplifying each subexpression, if possible. - singlePass : Bool
When
singlePassistrue(default:false), the simplifier runs through a single round of simplification, which consists of running pre-methods, recursing using congruence lemmas, and then running post-methods. Otherwise, when it isfalse, it iteratively applies this simplification procedure. - zeta : Bool
- beta : Bool
When
true(default:true), performs beta reduction of applications offunexpressions. That is,(fun x => e[x]) vreduces toe[v]. - eta : Bool
TODO (currently unimplemented). When
true(default:true), performs eta reduction forfunexpressions. That is,(fun x => f x)reduces tof. - etaStruct : EtaStructMode
Configures how to determine definitional equality between two structure instances. See documentation for
Lean.Meta.EtaStructMode. - iota : Bool
When
true(default:true), reducesmatchexpressions applied to constructors. - proj : Bool
When
true(default:true), reduces projections of structure constructors. - decide : Bool
- arith : Bool
When
true(default:false), simplifies simple arithmetic expressions. - autoUnfold : Bool
When
true(default:false), unfolds definitions. This can be enabled using thesimp!syntax. - dsimp : Bool
- failIfUnchanged : Bool
If
failIfUnchangedistrue(default:true), then calls tosimp,dsimp, orsimp_allwill fail if they do not make progress. - ground : Bool
If
groundistrue(default:false), then ground terms are reduced. A term is ground when it does not contain free or meta variables. Reduction is interrupted at a function applicationf ...iffis marked to not be unfolded. Ground term reduction applies@[seval]lemmas. - unfoldPartialApp : Bool
If
unfoldPartialAppistrue(default:false), then calls tosimp,dsimp, orsimp_allwill unfold even partial applications offwhen we requestfto be unfolded. - zetaDelta : Bool
When
true(default:false), local definitions are unfolded. That is, given a local context containingx : t := e, then the free variablexreduces toe. Otherwise,xmust be provided as asimpargument. - index : Bool
When
index(default :true) isfalse,simpwill only use the root symbol to find candidatesimptheorems. It approximates Lean 3simpbehavior. - implicitDefEqProofs : Bool
If
implicitDefEqProofs := true,simpdoes not create proof terms when the input and output terms are definitionally equal. - zetaUnused : Bool
- catchRuntime : Bool
When
true(default :true), then simps will catch runtime exceptions and convert them intosimpexceptions. - zetaHave : Bool
When
false(default:true), then disables zeta reduction ofhaveexpressions. Ifzetaisfalse, then this option has no effect. Unusedhaves are still removed ifzetaorzetaUnusedare true. - letToHave : Bool
When
true(default :true), thensimpwill attempt to transformlets intohaves if they are non-dependent. This only applies whenzeta := false.
Instances For
Instances For
A neutral configuration for simp, turning off all reductions and other built-in simplifications.
Equations
Instances For
Instances For
Configuration for which occurrences that match an expression should be rewritten.
- all : Occurrences
All occurrences should be rewritten.
- pos
(idxs : List Nat)
: Occurrences
A list of indices for which occurrences should be rewritten.
- neg
(idxs : List Nat)
: Occurrences
A list of indices for which occurrences should not be rewritten.
Instances For
Configuration for the extract_lets tactic.
- proofs : Bool
If true (default: false), extract lets from subterms that are proofs. Top-level lets are always extracted.
- types : Bool
If true (default: true), extract lets from subterms that are types. Top-level lets are always extracted.
- implicits : Bool
If true (default: false), extract lets from subterms that are implicit arguments.
- descend : Bool
- underBinder : Bool
If true (default: true), descend into forall/lambda/let bodies when extracting. Only relevant when
descendis true. - usedOnly : Bool
If true (default: false), eliminate unused lets rather than extract them.
- merge : Bool
If true (default: true), reuse local declarations that have syntactically equal values. Note that even when false, the caching strategy for
extract_lets may result in fewer extracted let bindings than expected. - useContext : Bool
When merging is enabled, if true (default: true), make use of pre-existing local definitions in the local context.
- onlyGivenNames : Bool
If true (default: false), then once
givenNamesis exhausted, stop extracting lets. Otherwise continue extracting lets. - preserveBinderNames : Bool
If true (default: false), then when no name is provided for a 'let' expression, the name is used as-is without making it be inaccessible. The name still might be inaccessible if the binder name was.
- lift : Bool
If true (default: false), lift non-extractable
lets as far out as possible.
Instances For
Configuration for the lift_lets tactic.