Documentation

Lean.Meta.Tactic.NormCast

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 : Label

    elim lemma: LHS has 0 head coes and ≥ 1 internal coe

  • move : Label

    move lemma: LHS has 1 head coe and 0 internal coes, RHS has 0 head coes and ≥ 1 internal coes

  • squash : Label

    squash lemma: LHS has ≥ 1 head coes and 0 internal coes, RHS has fewer head coes

Instances For

    Assuming e is an application, returns the list of subterms that simp will rewrite in.

    Equations
      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
          Instances For

            Classifies a declaration of type ty as a norm_cast rule.

            Equations
              Instances For

                The push_cast simp attribute.

                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.

                • A simp set which pushes coercions to the leaves.

                • squash : SimpExtension

                  A simp set which simplifies transitive coercions.

                Instances For

                  The norm_cast extension data.

                  addElim decl adds decl as an elim lemma to be used by norm_cast.

                  Equations
                    Instances For

                      addMove decl adds decl as a move lemma to be used by norm_cast.

                      Equations
                        Instances For

                          addSquash decl adds decl as a squash lemma to be used by norm_cast.

                          Equations
                            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
                                Instances For