Documentation

LeanOA.Mathlib.Tactic.CFCPull.Attr

The @[cfc_pull] attribute #

The cfc_pull attribute marks lemmas for use by the cfc_pull tactic and categorizes them according to their shape, and records other information used by the tactic.

What a tagged lemma is for.

  • pull : Kind

    ⟨algebraic expression⟩ = cfc f a, usable as a plain simp lemma.

  • target : Kind

    Like pull, but the ring, the element or a type is not determined by the algebraic side, e.g. a = cfc (fun x : R ↦ x) a, so simp cannot use the lemma as it is. cfc_pull specializes these at the ring asked for and, if need be (Entry.elemFree), at its targets.

  • compose : Kind

    cfc f ⟨structured element⟩ = cfc g a, e.g. cfc f (CFC.abs a) = cfc (f ‖·‖) a.

  • conv : Kind

    cfc f a = cfc g a changing the scalar ring or the unitality.

Instances For
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      A tagged lemma, in one of the orientations cfc_pull may use it in.

      • The lemma: a declaration, or, from the [..] list of cfc_pull, a local hypothesis (*) or a term.

      • The proof and its universe parameters, as simp elaborated them, when the lemma is a term from the [..] list of cfc_pull.

      • inv : Bool

        Whether simp uses it right to left.

      • kind : Kind

        Its CFCPUll.Kind: pull, target, compose or conv.

      • prio : ℕ

        The attribute priority.

      • The head constant of the scalar ring of the right-hand side, if it is concrete.

      • unital : Bool

        Whether the right-hand side is cfc rather than cfcₙ.

      • srcRing : Option Lean.Name

        For conv lemmas: the ring of the left-hand side.

      • srcUnital : Bool

        For conv lemmas: the unitality of the left-hand side.

      • holes : Bool

        For pull and target lemmas: whether the algebraic side has applications of the calculus in it (holes). A lemma without holes is applied top-down, before its argument is simplified.

      • freeType : Bool

        For target lemmas: whether some type appears in neither side of the equation, like the S of StarAlgHomClass.map_cfc. cfc_pull has to guess it, and tries the scalar rings it knows.

      • elemFree : Bool

        For target lemmas: whether the element has to be supplied, because the algebraic side is the bare element (a = cfc (fun x ↦ x) a, which would match anything) or does not mention it (1 = cfc (fun _ ↦ 1) a). Otherwise simp finds the element by unification, and cfc_pull accepts the rewrite if it is a target.

      • elemHead : Option Lean.Name

        For pull and target lemmas: the head constant of the element the calculus is applied to, if it is structured: DFunLike.coe for the φ a of φ (cfc f a) = cfc f (φ a).

      • The lemma as simp uses it, in its orientation and at its priority, if simp can use it on its own, finding the ring and the element by unification: that is, unless it is a target lemma, which cfc_pull specializes when it is called.

      Instances For

        What the lemmas of a simp set of cfc_pull are for.

        • pull : SetKind

          pull lemmas with holes: simp uses them itself.

        • towards : SetKind

          pull lemmas with holes towards a structured element (φ (cfc f a) = cfc f (φ a)), used only if that element is a target.

        • loose : SetKind

          pull lemmas without holes, at a concrete ring (CFC.sqrt a = cfc √· a): used top-down.

        • looseTowards : SetKind

          pull lemmas without holes that are generic in their ring, which they find in a scalar (r • a = cfc (r * ·) a): used top-down, if r is in the ring asked for and a is a target.

        • compose : SetKind

          compose lemmas.

        • conv : SetKind

          conv lemmas, in one direction.

        Instances For
          Equations
          • One or more equations did not get rendered due to their size.
          Instances For

            The lemmas of one simp set have the same use, ring and unitality. cfc_pull orders the sets for one use when it knows which ring and unitality are asked for: fewer scalar conversions first, then the requested unitality. Inside a set the priority decides, as always.

            Instances For
              Equations
              Instances For

                The simp set a lemma goes to when it is tagged, if it is not one cfc_pull specializes.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For

                  The @[cfc_pull] lemmas, and the simp sets of those simp can use on its own.

                  Instances For

                    Add lemmas to a simp set.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For

                      Add a lemma, to its simp set too if it has one.

                      Equations
                      Instances For

                        Remove the lemmas of a declaration.

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For

                          The environment extension holding the @[cfc_pull] lemmas.

                          Recognise cfc f a or cfcₙ f a: (ring, unital, fn, elem).

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For

                            The lemma as a term, with fresh universe metavariables.

                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For

                              Classify a lemma of type type: the entries recording how cfc_pull may use it, or none if it is not an equation with cfc or cfcₙ at the head of a side.

                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For

                                Classify a lemma of type type, which must be one cfc_pull can use.

                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For

                                  The cfc_pull attribute marks lemmas for use by the cfc_pull tactic. Such a lemma is an equation with cfc or cfcₙ at the head of at least one side. The attribute sorts lemmas into the following categories and records other information used by the tactic, including the scalar ring, unitality, and whether the algebraic side contains applications of cfc (holes).

                                  categoryshapeexample
                                  pullcfc f a = ⟨an expression in the algebra⟩cfc_mul
                                  targeta pull lemma whose algebraic side does not fix Rcfc_id'
                                  convcfc (f : R → R) a = cfc (g : S → S) a, cfcₙ f a = cfc f acfcₙ_eq_cfc
                                  composecfc (f ∘ g) a = cfc f ⟨an expression in a⟩cfc_comp_pow
                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For