Documentation

Mathlib.Tactic.Attr.Register

Attributes used in Mathlib #

In this file we define all simp-like and label-like attributes used in Mathlib. We declare all of them in one file for two reasons:

def Parser.Attr.functor_norm_proc :
Lean.ParserDescr

Simplification procedure

Instances For
    def Parser.Attr.functor_norm :
    Lean.ParserDescr

    Simp set for functor_norm

    Instances For
      def Parser.Attr.monad_norm :
      Lean.ParserDescr

      Simp set for functor_norm

      Instances For
        def Parser.Attr.monad_norm_proc :
        Lean.ParserDescr

        Simplification procedure

        Instances For
          def Parser.Attr.parity_simps :
          Lean.ParserDescr

          Simp attribute for lemmas about Even

          Instances For
            def Parser.Attr.parity_simps_proc :
            Lean.ParserDescr

            Simplification procedure

            Instances For
              def Parser.Attr.rclike_simps :
              Lean.ParserDescr

              "Simp attribute for lemmas about RCLike"

              Instances For
                def Parser.Attr.rclike_simps_proc :
                Lean.ParserDescr

                Simplification procedure

                Instances For
                  def Parser.Attr.rify_simps :
                  Lean.ParserDescr

                  The simpset rify_simps is used by the tactic rify to move expressions from β„•, β„€, or β„š to ℝ.

                  Instances For
                    def Parser.Attr.rify_simps_proc :
                    Lean.ParserDescr

                    Simplification procedure

                    Instances For
                      def Parser.Attr.qify_simps_proc :
                      Lean.ParserDescr

                      Simplification procedure

                      Instances For
                        def Parser.Attr.qify_simps :
                        Lean.ParserDescr

                        The simpset qify_simps is used by the tactic qify to move expressions from β„• or β„€ to β„š which gives a well-behaved division.

                        Instances For
                          def Parser.Attr.zify_simps_proc :
                          Lean.ParserDescr

                          Simplification procedure

                          Instances For
                            def Parser.Attr.zify_simps :
                            Lean.ParserDescr

                            The simpset zify_simps is used by the tactic zify to move expressions from β„• to β„€ which gives a well-behaved subtraction.

                            Instances For
                              def Parser.Attr.mfld_simps_proc :
                              Lean.ParserDescr

                              Simplification procedure

                              Instances For
                                def Parser.Attr.mfld_simps :
                                Lean.ParserDescr

                                The simpset mfld_simps records several simp lemmas that are especially useful in manifolds. It is a subset of the whole set of simp lemmas, but it makes it possible to have quicker proofs (when used with squeeze_simp or simp only) while retaining readability.

                                The typical use case is the following, in a file on manifolds: If simp [foo, bar] is slow, replace it with squeeze_simp [foo, bar, mfld_simps] and paste its output. The list of lemmas should be reasonable (contrary to the output of squeeze_simp [foo, bar] which might contain tens of lemmas), and the outcome should be quick enough.

                                Instances For
                                  def Parser.Attr.integral_simps_proc :
                                  Lean.ParserDescr

                                  Simplification procedure

                                  Instances For
                                    def Parser.Attr.integral_simps :
                                    Lean.ParserDescr

                                    Simp set for integral rules.

                                    Instances For
                                      def Parser.Attr.typevec :
                                      Lean.ParserDescr

                                      simp set for the manipulation of typevec and arrow expressions

                                      Instances For
                                        def Parser.Attr.typevec_proc :
                                        Lean.ParserDescr

                                        Simplification procedure

                                        Instances For
                                          def Parser.Attr.ghost_simps_proc :
                                          Lean.ParserDescr

                                          Simplification procedure

                                          Instances For
                                            def Parser.Attr.ghost_simps :
                                            Lean.ParserDescr

                                            Simplification rules for ghost equations.

                                            Instances For
                                              def Parser.Attr.nontriviality :
                                              Lean.ParserDescr

                                              The @[nontriviality] simp set is used by the nontriviality tactic to automatically discharge theorems about the trivial case (where we know Subsingleton Ξ± and many theorems in e.g. groups are trivially true).

                                              Instances For
                                                def Parser.Attr.nontriviality_proc :
                                                Lean.ParserDescr

                                                Simplification procedure

                                                Instances For
                                                  def Parser.Attr.is_poly :
                                                  Lean.ParserDescr

                                                  A stub attribute for is_poly.

                                                  Instances For
                                                    def Parser.Attr.fin_omega_proc :
                                                    Lean.ParserDescr

                                                    Simplification procedure

                                                    Instances For
                                                      def Parser.Attr.fin_omega :
                                                      Lean.ParserDescr

                                                      A simp set for the fin_omega wrapper around omega.

                                                      Instances For
                                                        def Parser.Attr.enat_to_nat_top :
                                                        Lean.ParserDescr

                                                        A simp set for simplifying expressions involving ⊀ in enat_to_nat.

                                                        Instances For
                                                          def Parser.Attr.enat_to_nat_top_proc :
                                                          Lean.ParserDescr

                                                          Simplification procedure

                                                          Instances For
                                                            def Parser.Attr.enat_to_nat_coe :
                                                            Lean.ParserDescr

                                                            A simp set for pushing coercions from β„• to β„•βˆž in enat_to_nat.

                                                            Instances For
                                                              def Parser.Attr.enat_to_nat_coe_proc :
                                                              Lean.ParserDescr

                                                              Simplification procedure

                                                              Instances For
                                                                def Parser.Attr.pnat_to_nat_coe :
                                                                Lean.ParserDescr

                                                                A simp set for the pnat_to_nat tactic.

                                                                Instances For
                                                                  def Parser.Attr.pnat_to_nat_coe_proc :
                                                                  Lean.ParserDescr

                                                                  Simplification procedure

                                                                  Instances For
                                                                    def Parser.Attr.mon_tauto_proc :
                                                                    Lean.ParserDescr

                                                                    Simplification procedure

                                                                    Instances For
                                                                      def Parser.Attr.mon_tauto :
                                                                      Lean.ParserDescr

                                                                      mon_tauto is a simp set to prove tautologies about morphisms from some (tensor) power of M to M, where M is a (commutative) monoid object in a (braided) monoidal category.

                                                                      This simp set is incompatible with the standard simp set. If you want to use it, make sure to add the following to your simp call to disable the problematic default simp lemmas:

                                                                      -MonoidalCategory.whiskerLeft_id, -MonoidalCategory.id_whiskerRight,
                                                                      -MonoidalCategory.tensor_comp, -MonoidalCategory.tensor_comp_assoc,
                                                                      -MonObj.mul_assoc, -MonObj.mul_assoc_assoc
                                                                      

                                                                      The general algorithm it follows is to push the associators Ξ±_ and commutators Ξ²_ inwards until they cancel against the right sequence of multiplications.

                                                                      This approach is justified by the fact that a tautology in the language of (commutative) monoid objects "remembers" how it was proved: Every use of a (commutative) monoid object axiom inserts a unitor, associator or commutator, and proving a tautology simply amounts to undoing those moves as prescribed by the presence of unitors, associators and commutators in its expression.

                                                                      This simp set is opinionated about its normal form, which is why it cannot be used concurrently with some of the simp lemmas in the standard simp set:

                                                                      • It eliminates all mentions of whiskers by rewriting them to tensored homs, which goes against whiskerLeft_id and id_whiskerRight: X ◁ f = πŸ™ X βŠ—β‚˜ f, f β–· X = πŸ™ X βŠ—β‚˜ f. This goes against whiskerLeft_id and id_whiskerRight in the standard simp set.
                                                                      • It collapses compositions of tensored homs to the tensored hom of the compositions, which goes against tensor_comp: (f₁ βŠ—β‚˜ g₁) ≫ (fβ‚‚ βŠ—β‚˜ gβ‚‚) = (f₁ ≫ fβ‚‚) βŠ—β‚˜ (g₁ ≫ gβ‚‚). TODO: Isn't this direction Just Better?
                                                                      • It cancels the associators against multiplications, which goes against mul_assoc: (Ξ±_ M M M).hom ≫ (πŸ™ M βŠ—β‚˜ ΞΌ) ≫ ΞΌ = (ΞΌ βŠ—β‚˜ πŸ™ M) ≫ ΞΌ, (Ξ±_ M M M).inv ≫ (ΞΌ βŠ—β‚˜ πŸ™ M) ≫ ΞΌ = (πŸ™ M βŠ—β‚˜ ΞΌ) ≫ ΞΌ
                                                                      • It unfolds non-primitive coherence isomorphisms, like the tensor strengths tensorΞΌ, tensorΞ΄.
                                                                      Instances For