Equations
- Lean.Meta.Grind.instInhabitedCasesTypes.default = { casesMap := default }
Instances For
Equations
Instances For
Instances For
Equations
Instances For
Inserts declName ↦ prio into s.
Instances For
- eqLhs (gen : Bool) : EMatchTheoremKind
- eqRhs (gen : Bool) : EMatchTheoremKind
- eqBoth (gen : Bool) : EMatchTheoremKind
- eqBwd : EMatchTheoremKind
- fwd : EMatchTheoremKind
- bwd (gen : Bool) : EMatchTheoremKind
- leftRight : EMatchTheoremKind
- rightLeft : EMatchTheoremKind
- default (gen : Bool) : EMatchTheoremKind
- user : EMatchTheoremKind
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Meta.Grind.instHashableEMatchTheoremKind.hash (Lean.Meta.Grind.EMatchTheoremKind.eqLhs a) = mixHash 0 (hash a)
- Lean.Meta.Grind.instHashableEMatchTheoremKind.hash (Lean.Meta.Grind.EMatchTheoremKind.eqRhs a) = mixHash 1 (hash a)
- Lean.Meta.Grind.instHashableEMatchTheoremKind.hash (Lean.Meta.Grind.EMatchTheoremKind.eqBoth a) = mixHash 2 (hash a)
- Lean.Meta.Grind.instHashableEMatchTheoremKind.hash Lean.Meta.Grind.EMatchTheoremKind.eqBwd = 3
- Lean.Meta.Grind.instHashableEMatchTheoremKind.hash Lean.Meta.Grind.EMatchTheoremKind.fwd = 4
- Lean.Meta.Grind.instHashableEMatchTheoremKind.hash (Lean.Meta.Grind.EMatchTheoremKind.bwd a) = mixHash 5 (hash a)
- Lean.Meta.Grind.instHashableEMatchTheoremKind.hash Lean.Meta.Grind.EMatchTheoremKind.leftRight = 6
- Lean.Meta.Grind.instHashableEMatchTheoremKind.hash Lean.Meta.Grind.EMatchTheoremKind.rightLeft = 7
- Lean.Meta.Grind.instHashableEMatchTheoremKind.hash (Lean.Meta.Grind.EMatchTheoremKind.default a) = mixHash 8 (hash a)
- Lean.Meta.Grind.instHashableEMatchTheoremKind.hash Lean.Meta.Grind.EMatchTheoremKind.user = 9
Instances For
Equations
Instances For
Equations
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Grind patterns may have constraints associated with them.
- notDefEq
(lhs : Nat)
(rhs : CnstrRHS)
: EMatchTheoremConstraint
A constraint of the form
lhs =/= rhs. Thelhsis one of the bound variables, and therhsan abstract term that must not be definitionally equal to a termtassigned tolhs. - defEq
(lhs : Nat)
(rhs : CnstrRHS)
: EMatchTheoremConstraint
A constraint of the form
lhs =?= rhs. Thelhsis one of the bound variables, and therhsan abstract term that must be definitionally equal to a termtassigned tolhs. - sizeLt
(lhs n : Nat)
: EMatchTheoremConstraint
A constraint of the form
size lhs < n. Thelhsis one of the bound variables. The size is computed ignoring implicit terms, but sharing is not taken into account. - depthLt
(lhs n : Nat)
: EMatchTheoremConstraint
A constraint of the form
depth lhs < n. Thelhsis one of the bound variables. The depth is computed in constant time using theapproxDepthfield attached to expressions. - genLt
(n : Nat)
: EMatchTheoremConstraint
Instantiates the theorem only if its generation is less than
n - isGround
(bvarIdx : Nat)
: EMatchTheoremConstraint
Constraints of the form
is_ground x. Instantiates the theorem only ifxis ground term. - isValue
(bvarIdx : Nat)
(strict : Bool)
: EMatchTheoremConstraint
Constraints of the form
is_value xandis_strict_value x. A value is defined as- A constructor fully applied to value arguments.
- A literal: numerals, strings, etc.
- A lambda. In the strict case, lambdas are not considered.
- maxInsts
(n : Nat)
: EMatchTheoremConstraint
Instantiates the theorem only if less than
ninstances have been generated for this theorem. - guard
(e : Expr)
: EMatchTheoremConstraint
It instructs
grindto postpone the instantiation of the theorem untileis known to betrue. - check
(e : Expr)
: EMatchTheoremConstraint
Similar to
guard, but checks whethereis implied by asserting¬e. - notValue
(bvarIdx : Nat)
(strict : Bool)
: EMatchTheoremConstraint
Constraints of the form
not_value xandnot_strict_value x. They are the negations ofis_value xandis_strict_value x.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
A theorem for heuristic instantiation based on E-matching.
It stores universe parameter names for universe polymorphic proofs. Recall that it is non-empty only when we elaborate an expression provided by the user. When
proofis just a constant, we can use the universe parameter names stored in the declaration.- proof : Expr
- numParams : Nat
Contains all symbols used in
patterns.- origin : Origin
- kind : EMatchTheoremKind
- minIndexable : Bool
Stores whether patterns were inferred using the minimal indexable subexpression condition.
- cnstrs : List EMatchTheoremConstraint
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
A theorem marked with @[grind inj]
- proof : Expr
Contains all symbols used in the term
fat the theorem's conclusion:Function.Injective f.- origin : Origin
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- casesTypes : CasesTypes
- extThms : ExtTheorems
- funCC : NameSet
- ematch : Theorems EMatchTheorem
- inj : Theorems InjectiveTheorem
Instances For
Equations
Instances For
Equations
Instances For
Equations
- s.addEntry (Lean.Meta.Grind.Entry.cases declName eager) = { casesTypes := s.casesTypes.insert declName eager, extThms := s.extThms, funCC := s.funCC, ematch := s.ematch, inj := s.inj }
- s.addEntry (Lean.Meta.Grind.Entry.ext declName) = { casesTypes := s.casesTypes, extThms := Lean.PersistentHashSet.insert s.extThms declName, funCC := s.funCC, ematch := s.ematch, inj := s.inj }
- s.addEntry (Lean.Meta.Grind.Entry.funCC declName) = { casesTypes := s.casesTypes, extThms := s.extThms, funCC := s.funCC.insert declName, ematch := s.ematch, inj := s.inj }
- s.addEntry (Lean.Meta.Grind.Entry.ematch thm) = { casesTypes := s.casesTypes, extThms := s.extThms, funCC := s.funCC, ematch := s.ematch.insert thm, inj := s.inj }
- s.addEntry (Lean.Meta.Grind.Entry.inj thm) = { casesTypes := s.casesTypes, extThms := s.extThms, funCC := s.funCC, ematch := s.ematch, inj := s.inj.insert thm }
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
grind is parametrized by a collection of ExtensionState. The motivation is to allow
users to use multiple extensions simultaneously without merging them into a single structure.
The collection is scanned linearly. In practice, we expect the array to be very small.
Instances For
Equations
- One or more equations did not get rendered due to their size.