The various guard_*
tactics have similar matching specifiers for how equal expressions
have to be to pass the tactic.
This inductive gives the different specifiers that can be selected.
- syntactic: Lean.Elab.Tactic.GuardExpr.MatchKind
A syntactic match means that the
Expr
s are==
after strippingMData
- defEq: optParam Lean.Meta.TransparencyMode Lean.Meta.TransparencyMode.reducible → Lean.Elab.Tactic.GuardExpr.MatchKind
A defeq match
isDefEqGuarded
returns true. (Note that unification is allowed here.) - alphaEq: Lean.Elab.Tactic.GuardExpr.MatchKind
An alpha-eq match means that
Expr.eqv
returns true.
Instances For
Converts a colon
syntax into a MatchKind
Equations
- One or more equations did not get rendered due to their size.
Instances For
Converts a colonEq
syntax into a MatchKind
Equations
- One or more equations did not get rendered due to their size.
Instances For
Converts a equal
syntax into a MatchKind
Equations
- One or more equations did not get rendered due to their size.
Instances For
Applies the selected matching rule to two expressions.
Equations
- Lean.Elab.Tactic.GuardExpr.MatchKind.isEq a b Lean.Elab.Tactic.GuardExpr.MatchKind.syntactic = pure (a.consumeMData == b.consumeMData)
- Lean.Elab.Tactic.GuardExpr.MatchKind.isEq a b Lean.Elab.Tactic.GuardExpr.MatchKind.alphaEq = pure (a.eqv b)
- Lean.Elab.Tactic.GuardExpr.MatchKind.isEq a b (Lean.Elab.Tactic.GuardExpr.MatchKind.defEq red) = Lean.withoutModifyingState (Lean.Meta.withTransparency red (Lean.Meta.isDefEqGuarded a b))
Instances For
Elaborate a
and b
and then do the given equality test mk
. We make sure to unify
the types of a
and b
after elaboration so that when synthesizing pending metavariables
we don't get the wrong instances due to default instances (for example, for nat literals).
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
- 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
- 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.