Label
is a type used to classify norm_cast
lemmas.
- elim lemma: LHS has 0 head coes and ≥ 1 internal coe
- move lemma: LHS has 1 head coe and 0 internal coes, RHS has 0 head coes and ≥ 1 internal coes
- squash lemma: LHS has ≥ 1 head coes and 0 internal coes, RHS has fewer head coes
- elim : Lean.Meta.NormCast.Label
elim lemma: LHS has 0 head coes and ≥ 1 internal coe
- move : Lean.Meta.NormCast.Label
move lemma: LHS has 1 head coe and 0 internal coes, RHS has 0 head coes and ≥ 1 internal coes
- squash : Lean.Meta.NormCast.Label
squash lemma: LHS has ≥ 1 head coes and 0 internal coes, RHS has fewer head coes
Instances For
Equations
- Lean.Meta.NormCast.instDecidableEqLabel x✝ y✝ = if h : x✝.toCtorIdx = y✝.toCtorIdx then isTrue ⋯ else isFalse ⋯
Equations
- Lean.Meta.NormCast.instReprLabel = { reprPrec := Lean.Meta.NormCast.reprLabel✝ }
Equations
- Lean.Meta.NormCast.instInhabitedLabel = { default := Lean.Meta.NormCast.Label.elim }
Assuming e
is an application, returns the list of subterms that simp
will rewrite in.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Counts how many coercions are at the head of the expression.
Counts how many coercions are inside the expression, including the head ones.
Counts how many coercions are inside the expression, excluding the head ones.
Equations
- Lean.Meta.NormCast.countInternalCoes e = do let __do_lift ← Lean.Meta.NormCast.countCoes e let __do_lift_1 ← Lean.Meta.NormCast.countHeadCoes e pure (__do_lift - __do_lift_1)
Instances For
Classifies a declaration of type ty
as a norm_cast
rule.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The norm_cast
attribute stores a simp set for each of the three types of norm_cast
lemma.
A simp set which lifts coercions to the top level.
- down : Lean.Meta.SimpExtension
A simp set which pushes coercions to the leaves.
- squash : Lean.Meta.SimpExtension
A simp set which simplifies transitive coercions.
Instances For
Equations
- Lean.Meta.NormCast.instInhabitedNormCastExtension = { default := { up := default, down := default, squash := default } }
The norm_cast
extension data.
addElim decl
adds decl
as an elim
lemma to be used by norm_cast
.
Equations
- Lean.Meta.NormCast.addElim decl kind prio = Lean.Meta.addSimpTheorem Lean.Meta.NormCast.normCastExt.up decl true false kind prio
Instances For
addMove decl
adds decl
as a move
lemma to be used by norm_cast
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
addSquash decl
adds decl
as a squash
lemma to be used by norm_cast
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
addInfer decl
infers the label of decl
(elim
, move
, or squash
) and arranges for it to
be used by norm_cast
.
- elim lemma: LHS has 0 head coes and ≥ 1 internal coe
- move lemma: LHS has 1 head coe and 0 internal coes, RHS has 0 head coes and ≥ 1 internal coes
- squash lemma: LHS has ≥ 1 head coes and 0 internal coes, RHS has fewer head coes
Equations
- One or more equations did not get rendered due to their size.