Documentation

Mathlib.Tactic.FunProp.Theorems

fun_prop environment extensions storing theorems for fun_prop #

Tag for one of the 5 basic lambda theorems, that also hold extra data for composition theorem

Instances For

    Tag for one of the 5 basic lambda theorems

    Instances For
      def Mathlib.Meta.FunProp.detectLambdaTheoremArgs (f : Lean.Expr) (ctxVars : Array Lean.Expr) :
      Lean.MetaM (Option LambdaTheoremArgs)

      Decides whether f is a function corresponding to one of the lambda theorems.

      Instances For

        Structure holding information about lambda theorem.

        • funPropName : Lean.Name

          Name of function property

        • thmName : Lean.Name

          Name of lambda theorem

        • Type and important argument of the theorem.

        Instances For

          Collection of lambda theorems

          Instances For

            Return proof of lambda theorem

            Instances For
              @[reducible, inline]

              Environment extension storing lambda theorems.

              Instances For

                Environment extension storing all lambda theorems.

                def Mathlib.Meta.FunProp.getLambdaTheorems (funPropName : Lean.Name) (type : LambdaTheoremType) :
                Lean.CoreM (Array LambdaTheorem)

                Get lambda theorems for particular function property funPropName.

                Instances For

                  Function theorems are stated in uncurried or compositional form.

                  uncurried

                  theorem Continuous_add : Continuous (fun x โ†ฆ x.1 + x.2)
                  

                  compositional

                  theorem Continuous_add (hf : Continuous f) (hg : Continuous g) : Continuous (fun x โ†ฆ (f x) + (g x))
                  
                  Instances For
                    def Mathlib.Meta.FunProp.instReprTheoremForm.repr :
                    TheoremForm โ†’ โ„• โ†’ Std.Format
                    Instances For
                      @[implicit_reducible]

                      TheoremForm to string

                      theorem about specific function (either declared constant or free variable)

                      • funPropName : Lean.Name

                        function property name

                      • thmOrigin : Origin

                        theorem name

                      • funOrigin : Origin

                        function name

                      • mainArgs : Array โ„•

                        array of argument indices about which this theorem is about

                      • appliedArgs : โ„•

                        total number of arguments applied to the function

                      • priority : โ„•

                        priority

                      • form of the theorem, see documentation of TheoremForm

                      Instances For
                        • theorems : Std.TreeMap Lean.Name (Std.TreeMap Lean.Name (Array FunctionTheorem) Lean.Name.quickCmp) Lean.Name.quickCmp

                          map: function name โ†’ function property โ†’ function theorem

                        Instances For

                          return proof of function theorem

                          Instances For
                            def Mathlib.Meta.FunProp.getTheoremsForFunction (funName funPropName : Lean.Name) :
                            Lean.CoreM (Array FunctionTheorem)
                            Instances For

                              Get proof of a theorem.

                              Instances For
                                @[reducible, inline]

                                Extensions for transition or morphism theorems

                                Instances For

                                  Environment extension for transition theorems.

                                  Get transition theorems applicable to e.

                                  For example calling on e equal to Continuous f might return theorems implying continuity from linearity over finite-dimensional spaces or differentiability.

                                  Instances For

                                    Environment extension for morphism theorems.

                                    Get morphism theorems applicable to e.

                                    For example calling on e equal to Continuous f for f : Xโ†’L[โ„] Y would return theorem inferring continuity from the bundled morphism.

                                    Instances For

                                      There are four types of theorems:

                                      • lam - theorem about basic lambda calculus terms
                                      • function - theorem about a specific function(declared or free variable) in specific arguments
                                      • mor - special theorems talking about bundled morphisms/DFunLike.coe
                                      • transition - theorems inferring one function property from another

                                      Examples:

                                      • lam
                                        theorem Continuous_id : Continuous fun x โ†ฆ x
                                        theorem Continuous_comp (hf : Continuous f) (hg : Continuous g) : Continuous fun x โ†ฆ f (g x)
                                      
                                      • function
                                        theorem Continuous_add : Continuous (fun x โ†ฆ x.1 + x.2)
                                        theorem Continuous_add (hf : Continuous f) (hg : Continuous g) :
                                            Continuous (fun x โ†ฆ (f x) + (g x))
                                      
                                        theorem ContDiff.clm_apply {f : E โ†’ F โ†’L[๐•œ] G} {g : E โ†’ F}
                                            (hf : ContDiff ๐•œ n f) (hg : ContDiff ๐•œ n g) :
                                            ContDiff ๐•œ n fun x โ†ฆ (f x) (g x)
                                        theorem clm_linear {f : E โ†’L[๐•œ] F} : IsLinearMap ๐•œ f
                                      
                                      • transition - the conclusion has to be in the form P f where f is a free variable
                                        theorem linear_is_continuous [FiniteDimensional โ„ E] {f : E โ†’ F} (hf : IsLinearMap ๐•œ f) :
                                            Continuous f
                                      
                                      Instances For
                                        def Mathlib.Meta.FunProp.getTheoremFromConst (declName : Lean.Name) (prio : โ„• := 1000) :
                                        Lean.MetaM Theorem

                                        For a theorem declaration declName return fun_prop theorem. It correctly detects which type of theorem it is.

                                        Instances For
                                          def Mathlib.Meta.FunProp.addTheorem (declName : Lean.Name) (attrKind : Lean.AttributeKind := Lean.AttributeKind.global) (prio : โ„• := 1000) :
                                          Lean.MetaM Unit

                                          Register theorem declName with fun_prop.

                                          Instances For