File: Mathlib/Tactic/FunProp/Theorems.lean

full_name: Mathlib.Meta.FunProp.LambdaTheoremArgs.comp
code: /-- Stores important argument indices of lambda theorems

For example
```
theorem Continuous_const {α β} [TopologicalSpace α] [TopologicalSpace β] (y : β) :
    Continuous fun _ : α => y
```
is represented by
```
  .const 0 4
```
 -/
inductive LambdaTheoremArgs
  | id (X : Nat)
  | const (X y : Nat)
  | proj (x Y : Nat)
  | projDep (x Y : Nat)
  | comp (f g : Nat)
  | letE (f g : Nat)
  | pi (f : Nat)
  deriving Inhabited, BEq, Repr, Hashable
goal: Mathlib.Meta.FunProp.LambdaTheoremArgs

full_name: Mathlib.Meta.FunProp.LambdaTheoremArgs.letE
code: /-- Stores important argument indices of lambda theorems

For example
```
theorem Continuous_const {α β} [TopologicalSpace α] [TopologicalSpace β] (y : β) :
    Continuous fun _ : α => y
```
is represented by
```
  .const 0 4
```
 -/
inductive LambdaTheoremArgs
  | id (X : Nat)
  | const (X y : Nat)
  | proj (x Y : Nat)
  | projDep (x Y : Nat)
  | comp (f g : Nat)
  | letE (f g : Nat)
  | pi (f : Nat)
  deriving Inhabited, BEq, Repr, Hashable
goal: Mathlib.Meta.FunProp.LambdaTheoremArgs

full_name: Mathlib.Meta.FunProp.LambdaTheoremArgs.projDep
code: /-- Stores important argument indices of lambda theorems

For example
```
theorem Continuous_const {α β} [TopologicalSpace α] [TopologicalSpace β] (y : β) :
    Continuous fun _ : α => y
```
is represented by
```
  .const 0 4
```
 -/
inductive LambdaTheoremArgs
  | id (X : Nat)
  | const (X y : Nat)
  | proj (x Y : Nat)
  | projDep (x Y : Nat)
  | comp (f g : Nat)
  | letE (f g : Nat)
  | pi (f : Nat)
  deriving Inhabited, BEq, Repr, Hashable
goal: Mathlib.Meta.FunProp.LambdaTheoremArgs

full_name: Mathlib.Meta.FunProp.LambdaTheoremArgs.const
code: /-- Stores important argument indices of lambda theorems

For example
```
theorem Continuous_const {α β} [TopologicalSpace α] [TopologicalSpace β] (y : β) :
    Continuous fun _ : α => y
```
is represented by
```
  .const 0 4
```
 -/
inductive LambdaTheoremArgs
  | id (X : Nat)
  | const (X y : Nat)
  | proj (x Y : Nat)
  | projDep (x Y : Nat)
  | comp (f g : Nat)
  | letE (f g : Nat)
  | pi (f : Nat)
  deriving Inhabited, BEq, Repr, Hashable
goal: Mathlib.Meta.FunProp.LambdaTheoremArgs

full_name: Mathlib.Meta.FunProp.LambdaTheoremArgs.pi
code: /-- Stores important argument indices of lambda theorems

For example
```
theorem Continuous_const {α β} [TopologicalSpace α] [TopologicalSpace β] (y : β) :
    Continuous fun _ : α => y
```
is represented by
```
  .const 0 4
```
 -/
inductive LambdaTheoremArgs
  | id (X : Nat)
  | const (X y : Nat)
  | proj (x Y : Nat)
  | projDep (x Y : Nat)
  | comp (f g : Nat)
  | letE (f g : Nat)
  | pi (f : Nat)
  deriving Inhabited, BEq, Repr, Hashable
goal: Mathlib.Meta.FunProp.LambdaTheoremArgs

full_name: Mathlib.Meta.FunProp.instInhabitedLambdaTheoremArgs
code: /-- Stores important argument indices of lambda theorems

For example
```
theorem Continuous_const {α β} [TopologicalSpace α] [TopologicalSpace β] (y : β) :
    Continuous fun _ : α => y
```
is represented by
```
  .const 0 4
```
 -/
inductive LambdaTheoremArgs
  | id (X : Nat)
  | const (X y : Nat)
  | proj (x Y : Nat)
  | projDep (x Y : Nat)
  | comp (f g : Nat)
  | letE (f g : Nat)
  | pi (f : Nat)
  deriving Inhabited, BEq, Repr, Hashable
goal: Inhabited Mathlib.Meta.FunProp.LambdaTheoremArgs

full_name: Mathlib.Meta.FunProp.LambdaTheoremArgs.id
code: /-- Stores important argument indices of lambda theorems

For example
```
theorem Continuous_const {α β} [TopologicalSpace α] [TopologicalSpace β] (y : β) :
    Continuous fun _ : α => y
```
is represented by
```
  .const 0 4
```
 -/
inductive LambdaTheoremArgs
  | id (X : Nat)
  | const (X y : Nat)
  | proj (x Y : Nat)
  | projDep (x Y : Nat)
  | comp (f g : Nat)
  | letE (f g : Nat)
  | pi (f : Nat)
  deriving Inhabited, BEq, Repr, Hashable
goal: Mathlib.Meta.FunProp.LambdaTheoremArgs

full_name: Mathlib.Meta.FunProp.instBEqLambdaTheoremArgs
code: /-- Stores important argument indices of lambda theorems

For example
```
theorem Continuous_const {α β} [TopologicalSpace α] [TopologicalSpace β] (y : β) :
    Continuous fun _ : α => y
```
is represented by
```
  .const 0 4
```
 -/
inductive LambdaTheoremArgs
  | id (X : Nat)
  | const (X y : Nat)
  | proj (x Y : Nat)
  | projDep (x Y : Nat)
  | comp (f g : Nat)
  | letE (f g : Nat)
  | pi (f : Nat)
  deriving Inhabited, BEq, Repr, Hashable
goal: BEq Mathlib.Meta.FunProp.LambdaTheoremArgs

full_name: Mathlib.Meta.FunProp.instReprLambdaTheoremArgs
code: /-- Stores important argument indices of lambda theorems

For example
```
theorem Continuous_const {α β} [TopologicalSpace α] [TopologicalSpace β] (y : β) :
    Continuous fun _ : α => y
```
is represented by
```
  .const 0 4
```
 -/
inductive LambdaTheoremArgs
  | id (X : Nat)
  | const (X y : Nat)
  | proj (x Y : Nat)
  | projDep (x Y : Nat)
  | comp (f g : Nat)
  | letE (f g : Nat)
  | pi (f : Nat)
  deriving Inhabited, BEq, Repr, Hashable
goal: Repr Mathlib.Meta.FunProp.LambdaTheoremArgs

full_name: Mathlib.Meta.FunProp.instHashableLambdaTheoremArgs
code: /-- Stores important argument indices of lambda theorems

For example
```
theorem Continuous_const {α β} [TopologicalSpace α] [TopologicalSpace β] (y : β) :
    Continuous fun _ : α => y
```
is represented by
```
  .const 0 4
```
 -/
inductive LambdaTheoremArgs
  | id (X : Nat)
  | const (X y : Nat)
  | proj (x Y : Nat)
  | projDep (x Y : Nat)
  | comp (f g : Nat)
  | letE (f g : Nat)
  | pi (f : Nat)
  deriving Inhabited, BEq, Repr, Hashable
goal: Hashable Mathlib.Meta.FunProp.LambdaTheoremArgs

full_name: Mathlib.Meta.FunProp.LambdaTheoremArgs
code: /-- Stores important argument indices of lambda theorems

For example
```
theorem Continuous_const {α β} [TopologicalSpace α] [TopologicalSpace β] (y : β) :
    Continuous fun _ : α => y
```
is represented by
```
  .const 0 4
```
 -/
inductive LambdaTheoremArgs
  | id (X : Nat)
  | const (X y : Nat)
  | proj (x Y : Nat)
  | projDep (x Y : Nat)
  | comp (f g : Nat)
  | letE (f g : Nat)
  | pi (f : Nat)
  deriving Inhabited, BEq, Repr, Hashable
goal: Type

full_name: Mathlib.Meta.FunProp.LambdaTheoremArgs.proj
code: /-- Stores important argument indices of lambda theorems

For example
```
theorem Continuous_const {α β} [TopologicalSpace α] [TopologicalSpace β] (y : β) :
    Continuous fun _ : α => y
```
is represented by
```
  .const 0 4
```
 -/
inductive LambdaTheoremArgs
  | id (X : Nat)
  | const (X y : Nat)
  | proj (x Y : Nat)
  | projDep (x Y : Nat)
  | comp (f g : Nat)
  | letE (f g : Nat)
  | pi (f : Nat)
  deriving Inhabited, BEq, Repr, Hashable
goal: Mathlib.Meta.FunProp.LambdaTheoremArgs

full_name: Mathlib.Meta.FunProp.instInhabitedLambdaTheoremType
code: /-- There are 5(+1) basic lambda theorems

- id      `Continuous fun x => x`
- const   `Continuous fun x => y`
- proj    `Continuous fun (f : X → Y) => f x`
- projDep `Continuous fun (f : (x : X) → Y x => f x)`
- comp    `Continuous f → Continuous g → Continuous fun x => f (g x)`
- letE    `Continuous f → Continuous g → Continuous fun x => let y := g x; f x y`
- pi      `∀ y, Continuous (f · y) → Continuous fun x y => f x y` -/
inductive LambdaTheoremType
  | id  | const | proj| projDep | comp | letE  | pi
  deriving Inhabited, BEq, Repr, Hashable
goal: Inhabited Mathlib.Meta.FunProp.LambdaTheoremType

full_name: Mathlib.Meta.FunProp.LambdaTheoremType.pi
code: /-- There are 5(+1) basic lambda theorems

- id      `Continuous fun x => x`
- const   `Continuous fun x => y`
- proj    `Continuous fun (f : X → Y) => f x`
- projDep `Continuous fun (f : (x : X) → Y x => f x)`
- comp    `Continuous f → Continuous g → Continuous fun x => f (g x)`
- letE    `Continuous f → Continuous g → Continuous fun x => let y := g x; f x y`
- pi      `∀ y, Continuous (f · y) → Continuous fun x y => f x y` -/
inductive LambdaTheoremType
  | id  | const | proj| projDep | comp | letE  | pi
  deriving Inhabited, BEq, Repr, Hashable
goal: Mathlib.Meta.FunProp.LambdaTheoremType

full_name: Mathlib.Meta.FunProp.instReprLambdaTheoremType
code: /-- There are 5(+1) basic lambda theorems

- id      `Continuous fun x => x`
- const   `Continuous fun x => y`
- proj    `Continuous fun (f : X → Y) => f x`
- projDep `Continuous fun (f : (x : X) → Y x => f x)`
- comp    `Continuous f → Continuous g → Continuous fun x => f (g x)`
- letE    `Continuous f → Continuous g → Continuous fun x => let y := g x; f x y`
- pi      `∀ y, Continuous (f · y) → Continuous fun x y => f x y` -/
inductive LambdaTheoremType
  | id  | const | proj| projDep | comp | letE  | pi
  deriving Inhabited, BEq, Repr, Hashable
goal: Repr Mathlib.Meta.FunProp.LambdaTheoremType

full_name: Mathlib.Meta.FunProp.LambdaTheoremType.const
code: /-- There are 5(+1) basic lambda theorems

- id      `Continuous fun x => x`
- const   `Continuous fun x => y`
- proj    `Continuous fun (f : X → Y) => f x`
- projDep `Continuous fun (f : (x : X) → Y x => f x)`
- comp    `Continuous f → Continuous g → Continuous fun x => f (g x)`
- letE    `Continuous f → Continuous g → Continuous fun x => let y := g x; f x y`
- pi      `∀ y, Continuous (f · y) → Continuous fun x y => f x y` -/
inductive LambdaTheoremType
  | id  | const | proj| projDep | comp | letE  | pi
  deriving Inhabited, BEq, Repr, Hashable
goal: Mathlib.Meta.FunProp.LambdaTheoremType

full_name: Mathlib.Meta.FunProp.LambdaTheoremType
code: /-- There are 5(+1) basic lambda theorems

- id      `Continuous fun x => x`
- const   `Continuous fun x => y`
- proj    `Continuous fun (f : X → Y) => f x`
- projDep `Continuous fun (f : (x : X) → Y x => f x)`
- comp    `Continuous f → Continuous g → Continuous fun x => f (g x)`
- letE    `Continuous f → Continuous g → Continuous fun x => let y := g x; f x y`
- pi      `∀ y, Continuous (f · y) → Continuous fun x y => f x y` -/
inductive LambdaTheoremType
  | id  | const | proj| projDep | comp | letE  | pi
  deriving Inhabited, BEq, Repr, Hashable
goal: Type

full_name: Mathlib.Meta.FunProp.instHashableLambdaTheoremType
code: /-- There are 5(+1) basic lambda theorems

- id      `Continuous fun x => x`
- const   `Continuous fun x => y`
- proj    `Continuous fun (f : X → Y) => f x`
- projDep `Continuous fun (f : (x : X) → Y x => f x)`
- comp    `Continuous f → Continuous g → Continuous fun x => f (g x)`
- letE    `Continuous f → Continuous g → Continuous fun x => let y := g x; f x y`
- pi      `∀ y, Continuous (f · y) → Continuous fun x y => f x y` -/
inductive LambdaTheoremType
  | id  | const | proj| projDep | comp | letE  | pi
  deriving Inhabited, BEq, Repr, Hashable
goal: Hashable Mathlib.Meta.FunProp.LambdaTheoremType

full_name: Mathlib.Meta.FunProp.LambdaTheoremType.comp
code: /-- There are 5(+1) basic lambda theorems

- id      `Continuous fun x => x`
- const   `Continuous fun x => y`
- proj    `Continuous fun (f : X → Y) => f x`
- projDep `Continuous fun (f : (x : X) → Y x => f x)`
- comp    `Continuous f → Continuous g → Continuous fun x => f (g x)`
- letE    `Continuous f → Continuous g → Continuous fun x => let y := g x; f x y`
- pi      `∀ y, Continuous (f · y) → Continuous fun x y => f x y` -/
inductive LambdaTheoremType
  | id  | const | proj| projDep | comp | letE  | pi
  deriving Inhabited, BEq, Repr, Hashable
goal: Mathlib.Meta.FunProp.LambdaTheoremType

full_name: Mathlib.Meta.FunProp.LambdaTheoremType.letE
code: /-- There are 5(+1) basic lambda theorems

- id      `Continuous fun x => x`
- const   `Continuous fun x => y`
- proj    `Continuous fun (f : X → Y) => f x`
- projDep `Continuous fun (f : (x : X) → Y x => f x)`
- comp    `Continuous f → Continuous g → Continuous fun x => f (g x)`
- letE    `Continuous f → Continuous g → Continuous fun x => let y := g x; f x y`
- pi      `∀ y, Continuous (f · y) → Continuous fun x y => f x y` -/
inductive LambdaTheoremType
  | id  | const | proj| projDep | comp | letE  | pi
  deriving Inhabited, BEq, Repr, Hashable
goal: Mathlib.Meta.FunProp.LambdaTheoremType

full_name: Mathlib.Meta.FunProp.LambdaTheoremType.projDep
code: /-- There are 5(+1) basic lambda theorems

- id      `Continuous fun x => x`
- const   `Continuous fun x => y`
- proj    `Continuous fun (f : X → Y) => f x`
- projDep `Continuous fun (f : (x : X) → Y x => f x)`
- comp    `Continuous f → Continuous g → Continuous fun x => f (g x)`
- letE    `Continuous f → Continuous g → Continuous fun x => let y := g x; f x y`
- pi      `∀ y, Continuous (f · y) → Continuous fun x y => f x y` -/
inductive LambdaTheoremType
  | id  | const | proj| projDep | comp | letE  | pi
  deriving Inhabited, BEq, Repr, Hashable
goal: Mathlib.Meta.FunProp.LambdaTheoremType

full_name: Mathlib.Meta.FunProp.LambdaTheoremType.proj
code: /-- There are 5(+1) basic lambda theorems

- id      `Continuous fun x => x`
- const   `Continuous fun x => y`
- proj    `Continuous fun (f : X → Y) => f x`
- projDep `Continuous fun (f : (x : X) → Y x => f x)`
- comp    `Continuous f → Continuous g → Continuous fun x => f (g x)`
- letE    `Continuous f → Continuous g → Continuous fun x => let y := g x; f x y`
- pi      `∀ y, Continuous (f · y) → Continuous fun x y => f x y` -/
inductive LambdaTheoremType
  | id  | const | proj| projDep | comp | letE  | pi
  deriving Inhabited, BEq, Repr, Hashable
goal: Mathlib.Meta.FunProp.LambdaTheoremType

full_name: Mathlib.Meta.FunProp.LambdaTheoremType.id
code: /-- There are 5(+1) basic lambda theorems

- id      `Continuous fun x => x`
- const   `Continuous fun x => y`
- proj    `Continuous fun (f : X → Y) => f x`
- projDep `Continuous fun (f : (x : X) → Y x => f x)`
- comp    `Continuous f → Continuous g → Continuous fun x => f (g x)`
- letE    `Continuous f → Continuous g → Continuous fun x => let y := g x; f x y`
- pi      `∀ y, Continuous (f · y) → Continuous fun x y => f x y` -/
inductive LambdaTheoremType
  | id  | const | proj| projDep | comp | letE  | pi
  deriving Inhabited, BEq, Repr, Hashable
goal: Mathlib.Meta.FunProp.LambdaTheoremType

full_name: Mathlib.Meta.FunProp.instBEqLambdaTheoremType
code: BEq
goal: BEq Mathlib.Meta.FunProp.LambdaTheoremType

full_name: Mathlib.Meta.FunProp.LambdaTheoremArgs.type
code: /-- -/
def LambdaTheoremArgs.type (t : LambdaTheoremArgs) : LambdaTheoremType 
goal: Mathlib.Meta.FunProp.LambdaTheoremType

full_name: Mathlib.Meta.FunProp.detectLambdaTheoremArgs
code: /--  -/
def detectLambdaTheoremArgs (f : Expr) (ctxVars : Array Expr) :
    MetaM (Option LambdaTheoremArgs) 
goal: Lean.MetaM (Option Mathlib.Meta.FunProp.LambdaTheoremArgs)

full_name: Mathlib.Meta.FunProp.LambdaTheorem.funPropName
code: /--  -/
structure LambdaTheorem where
  /-- Name of function property -/
  funPropName : Name
  /-- Name of lambda theorem -/
  thmName : Name
  /-- Type and important argument of the theorem. -/
  thmArgs : LambdaTheoremArgs
  deriving Inhabited, BEq
goal: Lean.Name

full_name: Mathlib.Meta.FunProp.LambdaTheorem.thmName
code: /--  -/
structure LambdaTheorem where
  /-- Name of function property -/
  funPropName : Name
  /-- Name of lambda theorem -/
  thmName : Name
  /-- Type and important argument of the theorem. -/
  thmArgs : LambdaTheoremArgs
  deriving Inhabited, BEq
goal: Lean.Name

full_name: Mathlib.Meta.FunProp.instBEqLambdaTheorem
code: /--  -/
structure LambdaTheorem where
  /-- Name of function property -/
  funPropName : Name
  /-- Name of lambda theorem -/
  thmName : Name
  /-- Type and important argument of the theorem. -/
  thmArgs : LambdaTheoremArgs
  deriving Inhabited, BEq
goal: BEq Mathlib.Meta.FunProp.LambdaTheorem

full_name: Mathlib.Meta.FunProp.instInhabitedLambdaTheorem
code: /--  -/
structure LambdaTheorem where
  /-- Name of function property -/
  funPropName : Name
  /-- Name of lambda theorem -/
  thmName : Name
  /-- Type and important argument of the theorem. -/
  thmArgs : LambdaTheoremArgs
  deriving Inhabited, BEq
goal: Inhabited Mathlib.Meta.FunProp.LambdaTheorem

full_name: Mathlib.Meta.FunProp.LambdaTheorem.thmArgs
code: /--  -/
structure LambdaTheorem where
  /-- Name of function property -/
  funPropName : Name
  /-- Name of lambda theorem -/
  thmName : Name
  /-- Type and important argument of the theorem. -/
  thmArgs : LambdaTheoremArgs
  deriving Inhabited, BEq
goal: Mathlib.Meta.FunProp.LambdaTheoremArgs

full_name: Mathlib.Meta.FunProp.LambdaTheorem
code: /--  -/
structure LambdaTheorem where
  /-- Name of function property -/
  funPropName : Name
  /-- Name of lambda theorem -/
  thmName : Name
  /-- Type and important argument of the theorem. -/
  thmArgs : LambdaTheoremArgs
  deriving Inhabited, BEq
goal: Type

full_name: Mathlib.Meta.FunProp.LambdaTheorems.theorems
code: /-- -/
structure LambdaTheorems where
  /-- map: function property name × theorem type → lambda theorem -/
  theorems : HashMap (Name × LambdaTheoremType) LambdaTheorem := {}
  deriving Inhabited
goal: Lean.HashMap (Lean.Name × Mathlib.Meta.FunProp.LambdaTheoremType) Mathlib.Meta.FunProp.LambdaTheorem

full_name: Mathlib.Meta.FunProp.instInhabitedLambdaTheorems
code: /-- -/
structure LambdaTheorems where
  /-- map: function property name × theorem type → lambda theorem -/
  theorems : HashMap (Name × LambdaTheoremType) LambdaTheorem := {}
  deriving Inhabited
goal: Inhabited Mathlib.Meta.FunProp.LambdaTheorems

full_name: Mathlib.Meta.FunProp.LambdaTheorems
code: /-- -/
structure LambdaTheorems where
  /-- map: function property name × theorem type → lambda theorem -/
  theorems : HashMap (Name × LambdaTheoremType) LambdaTheorem := {}
  deriving Inhabited
goal: Type

full_name: Mathlib.Meta.FunProp.LambdaTheorem.getProof
code: /-- return proof of lambda theorem -/
def LambdaTheorem.getProof (thm : LambdaTheorem) : MetaM Expr 
goal: Lean.MetaM Lean.Expr

full_name: Mathlib.Meta.FunProp.LambdaTheoremsExt
code: /-- -/
abbrev LambdaTheoremsExt 
goal: Type

full_name: Mathlib.Meta.FunProp.initFn._@.Mathlib.Tactic.FunProp.Theorems._hyg.3089
code: /-- Extension storing all lambda theorems. -/
initialize lambdaTheoremsExt : LambdaTheoremsExt ←
  registerSimpleScopedEnvExtension {
    name := by exact decl_name%
    initial := {}
    addEntry := fun d e =>
      {d with theorems := d.theorems.insert (e.funPropName, e.thmArgs.type) e}
  }
goal: IO Mathlib.Meta.FunProp.LambdaTheoremsExt

full_name: Mathlib.Meta.FunProp.lambdaTheoremsExt
code: /-- Extension storing all lambda theorems. -/
initialize lambdaTheoremsExt : LambdaTheoremsExt ←
  registerSimpleScopedEnvExtension {
    name := by exact decl_name%
    initial := {}
    addEntry := fun d e =>
      {d with theorems := d.theorems.insert (e.funPropName, e.thmArgs.type) e}
  }
goal: Mathlib.Meta.FunProp.LambdaTheoremsExt

full_name: Mathlib.Meta.FunProp.getLambdaTheorem
code: /-- -/
def getLambdaTheorem (funPropName : Name) (type : LambdaTheoremType) :
    CoreM (Option LambdaTheorem) 
goal: Lean.CoreM (Option Mathlib.Meta.FunProp.LambdaTheorem)

full_name: Mathlib.Meta.FunProp.TheoremForm.comp
code: /-- 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))
```
 -/
inductive TheoremForm where
  | uncurried | comp
  deriving Inhabited, BEq, Repr
goal: Mathlib.Meta.FunProp.TheoremForm

full_name: Mathlib.Meta.FunProp.TheoremForm
code: /-- 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))
```
 -/
inductive TheoremForm where
  | uncurried | comp
  deriving Inhabited, BEq, Repr
goal: Type

full_name: Mathlib.Meta.FunProp.TheoremForm.uncurried
code: /-- 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))
```
 -/
inductive TheoremForm where
  | uncurried | comp
  deriving Inhabited, BEq, Repr
goal: Mathlib.Meta.FunProp.TheoremForm

full_name: Mathlib.Meta.FunProp.instInhabitedTheoremForm
code: /-- 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))
```
 -/
inductive TheoremForm where
  | uncurried | comp
  deriving Inhabited, BEq, Repr
goal: Inhabited Mathlib.Meta.FunProp.TheoremForm

full_name: Mathlib.Meta.FunProp.instReprTheoremForm
code: /-- 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))
```
 -/
inductive TheoremForm where
  | uncurried | comp
  deriving Inhabited, BEq, Repr
goal: Repr Mathlib.Meta.FunProp.TheoremForm

full_name: Mathlib.Meta.FunProp.instBEqTheoremForm
code: BEq
goal: BEq Mathlib.Meta.FunProp.TheoremForm

full_name: Mathlib.Meta.FunProp.instInhabitedFunctionTheorem
code: /-- theorem about specific function (either declared constant or free variable) -/
structure FunctionTheorem where
  /-- function property name -/
  funPropName : Name
  /-- theorem name -/
  thmOrigin   : Origin
  /-- function name -/
  funOrigin   : Origin
  /-- array of argument indices about which this theorem is about -/
  mainArgs    : Array Nat
  /-- total number of arguments applied to the function  -/
  appliedArgs : Nat
  /-- priority  -/
  priority    : Nat  := eval_prio default
  /-- form of the theorem, see documentation of TheoremForm -/
  form : TheoremForm
  deriving Inhabited, BEq
goal: Inhabited Mathlib.Meta.FunProp.FunctionTheorem

full_name: Mathlib.Meta.FunProp.FunctionTheorem.form
code: /-- theorem about specific function (either declared constant or free variable) -/
structure FunctionTheorem where
  /-- function property name -/
  funPropName : Name
  /-- theorem name -/
  thmOrigin   : Origin
  /-- function name -/
  funOrigin   : Origin
  /-- array of argument indices about which this theorem is about -/
  mainArgs    : Array Nat
  /-- total number of arguments applied to the function  -/
  appliedArgs : Nat
  /-- priority  -/
  priority    : Nat  := eval_prio default
  /-- form of the theorem, see documentation of TheoremForm -/
  form : TheoremForm
  deriving Inhabited, BEq
goal: Mathlib.Meta.FunProp.TheoremForm

full_name: Mathlib.Meta.FunProp.FunctionTheorem.mainArgs
code: /-- theorem about specific function (either declared constant or free variable) -/
structure FunctionTheorem where
  /-- function property name -/
  funPropName : Name
  /-- theorem name -/
  thmOrigin   : Origin
  /-- function name -/
  funOrigin   : Origin
  /-- array of argument indices about which this theorem is about -/
  mainArgs    : Array Nat
  /-- total number of arguments applied to the function  -/
  appliedArgs : Nat
  /-- priority  -/
  priority    : Nat  := eval_prio default
  /-- form of the theorem, see documentation of TheoremForm -/
  form : TheoremForm
  deriving Inhabited, BEq
goal: Array ℕ

full_name: Mathlib.Meta.FunProp.FunctionTheorem
code: /-- theorem about specific function (either declared constant or free variable) -/
structure FunctionTheorem where
  /-- function property name -/
  funPropName : Name
  /-- theorem name -/
  thmOrigin   : Origin
  /-- function name -/
  funOrigin   : Origin
  /-- array of argument indices about which this theorem is about -/
  mainArgs    : Array Nat
  /-- total number of arguments applied to the function  -/
  appliedArgs : Nat
  /-- priority  -/
  priority    : Nat  := eval_prio default
  /-- form of the theorem, see documentation of TheoremForm -/
  form : TheoremForm
  deriving Inhabited, BEq
goal: Type

full_name: Mathlib.Meta.FunProp.FunctionTheorem.funPropName
code: /-- theorem about specific function (either declared constant or free variable) -/
structure FunctionTheorem where
  /-- function property name -/
  funPropName : Name
  /-- theorem name -/
  thmOrigin   : Origin
  /-- function name -/
  funOrigin   : Origin
  /-- array of argument indices about which this theorem is about -/
  mainArgs    : Array Nat
  /-- total number of arguments applied to the function  -/
  appliedArgs : Nat
  /-- priority  -/
  priority    : Nat  := eval_prio default
  /-- form of the theorem, see documentation of TheoremForm -/
  form : TheoremForm
  deriving Inhabited, BEq
goal: Lean.Name

full_name: Mathlib.Meta.FunProp.instBEqFunctionTheorem
code: /-- theorem about specific function (either declared constant or free variable) -/
structure FunctionTheorem where
  /-- function property name -/
  funPropName : Name
  /-- theorem name -/
  thmOrigin   : Origin
  /-- function name -/
  funOrigin   : Origin
  /-- array of argument indices about which this theorem is about -/
  mainArgs    : Array Nat
  /-- total number of arguments applied to the function  -/
  appliedArgs : Nat
  /-- priority  -/
  priority    : Nat  := eval_prio default
  /-- form of the theorem, see documentation of TheoremForm -/
  form : TheoremForm
  deriving Inhabited, BEq
goal: BEq Mathlib.Meta.FunProp.FunctionTheorem

full_name: Mathlib.Meta.FunProp.FunctionTheorem.funOrigin
code: /-- theorem about specific function (either declared constant or free variable) -/
structure FunctionTheorem where
  /-- function property name -/
  funPropName : Name
  /-- theorem name -/
  thmOrigin   : Origin
  /-- function name -/
  funOrigin   : Origin
  /-- array of argument indices about which this theorem is about -/
  mainArgs    : Array Nat
  /-- total number of arguments applied to the function  -/
  appliedArgs : Nat
  /-- priority  -/
  priority    : Nat  := eval_prio default
  /-- form of the theorem, see documentation of TheoremForm -/
  form : TheoremForm
  deriving Inhabited, BEq
goal: Mathlib.Meta.FunProp.Origin

full_name: Mathlib.Meta.FunProp.FunctionTheorem.appliedArgs
code: /-- theorem about specific function (either declared constant or free variable) -/
structure FunctionTheorem where
  /-- function property name -/
  funPropName : Name
  /-- theorem name -/
  thmOrigin   : Origin
  /-- function name -/
  funOrigin   : Origin
  /-- array of argument indices about which this theorem is about -/
  mainArgs    : Array Nat
  /-- total number of arguments applied to the function  -/
  appliedArgs : Nat
  /-- priority  -/
  priority    : Nat  := eval_prio default
  /-- form of the theorem, see documentation of TheoremForm -/
  form : TheoremForm
  deriving Inhabited, BEq
goal: ℕ

full_name: Mathlib.Meta.FunProp.FunctionTheorem.thmOrigin
code: /-- theorem about specific function (either declared constant or free variable) -/
structure FunctionTheorem where
  /-- function property name -/
  funPropName : Name
  /-- theorem name -/
  thmOrigin   : Origin
  /-- function name -/
  funOrigin   : Origin
  /-- array of argument indices about which this theorem is about -/
  mainArgs    : Array Nat
  /-- total number of arguments applied to the function  -/
  appliedArgs : Nat
  /-- priority  -/
  priority    : Nat  := eval_prio default
  /-- form of the theorem, see documentation of TheoremForm -/
  form : TheoremForm
  deriving Inhabited, BEq
goal: Mathlib.Meta.FunProp.Origin

full_name: Mathlib.Meta.FunProp.FunctionTheorem.priority
code: /-- theorem about specific function (either declared constant or free variable) -/
structure FunctionTheorem where
  /-- function property name -/
  funPropName : Name
  /-- theorem name -/
  thmOrigin   : Origin
  /-- function name -/
  funOrigin   : Origin
  /-- array of argument indices about which this theorem is about -/
  mainArgs    : Array Nat
  /-- total number of arguments applied to the function  -/
  appliedArgs : Nat
  /-- priority  -/
  priority    : Nat  := eval_prio default
  /-- form of the theorem, see documentation of TheoremForm -/
  form : TheoremForm
  deriving Inhabited, BEq
goal: ℕ

full_name: _private.Mathlib.Tactic.FunProp.Theorems.0.Mathlib.Meta.FunProp.instOrdName_mathlib
code: private local instance : Ord Name 
goal: Ord Lean.Name

full_name: Mathlib.Meta.FunProp.instInhabitedFunctionTheorems
code: /-- -/
structure FunctionTheorems where
  /-- map: function name → function property → function theorem -/
  theorems :
    Batteries.RBMap Name (Batteries.RBMap Name (Array FunctionTheorem) compare) compare := {}
  deriving Inhabited
goal: Inhabited Mathlib.Meta.FunProp.FunctionTheorems

full_name: Mathlib.Meta.FunProp.FunctionTheorems
code: /-- -/
structure FunctionTheorems where
  /-- map: function name → function property → function theorem -/
  theorems :
    Batteries.RBMap Name (Batteries.RBMap Name (Array FunctionTheorem) compare) compare := {}
  deriving Inhabited
goal: Type

full_name: Mathlib.Meta.FunProp.FunctionTheorems.theorems
code: /-- -/
structure FunctionTheorems where
  /-- map: function name → function property → function theorem -/
  theorems :
    Batteries.RBMap Name (Batteries.RBMap Name (Array FunctionTheorem) compare) compare := {}
  deriving Inhabited
goal: Batteries.RBMap Lean.Name (Batteries.RBMap Lean.Name (Array Mathlib.Meta.FunProp.FunctionTheorem) compare) compare

full_name: Mathlib.Meta.FunProp.FunctionTheorem.getProof
code: /-- return proof of function theorem -/
def FunctionTheorem.getProof (thm : FunctionTheorem) : MetaM Expr 
goal: Lean.MetaM Lean.Expr

full_name: Mathlib.Meta.FunProp.FunctionTheoremsExt
code: /-- -/
abbrev FunctionTheoremsExt 
goal: Type

full_name: Mathlib.Meta.FunProp.initFn._@.Mathlib.Tactic.FunProp.Theorems._hyg.3641
code: /-- Extension storing all function theorems. -/
initialize functionTheoremsExt : FunctionTheoremsExt ←
  registerSimpleScopedEnvExtension {
    name     := by exact decl_name%
    initial  := {}
    addEntry := fun d e =>
      {d with
        theorems :=
          d.theorems.alter e.funOrigin.name fun funProperties =>
            let funProperties := funProperties.getD {}
            funProperties.alter e.funPropName fun thms =>
              let thms := thms.getD #[]
              thms.push e}
  }
goal: IO Mathlib.Meta.FunProp.FunctionTheoremsExt

full_name: Mathlib.Meta.FunProp.functionTheoremsExt
code: /-- Extension storing all function theorems. -/
initialize functionTheoremsExt : FunctionTheoremsExt ←
  registerSimpleScopedEnvExtension {
    name     := by exact decl_name%
    initial  := {}
    addEntry := fun d e =>
      {d with
        theorems :=
          d.theorems.alter e.funOrigin.name fun funProperties =>
            let funProperties := funProperties.getD {}
            funProperties.alter e.funPropName fun thms =>
              let thms := thms.getD #[]
              thms.push e}
  }
goal: Mathlib.Meta.FunProp.FunctionTheoremsExt

full_name: Mathlib.Meta.FunProp.getTheoremsForFunction
code: /-- -/
def getTheoremsForFunction (funName : Name) (funPropName : Name) :
    CoreM (Array FunctionTheorem) 
goal: Lean.CoreM (Array Mathlib.Meta.FunProp.FunctionTheorem)

full_name: Mathlib.Meta.FunProp.GeneralTheorem.thmName
code: /-- General theorem about function property
  used for transition and morphism theorems -/
structure GeneralTheorem where
  /-- function property name -/
  funPropName   : Name
  /-- theorem name -/
  thmName     : Name
  /-- discrimination tree keys used to index this theorem -/
  keys        : List RefinedDiscrTree.DTExpr
  /-- priority -/
  priority    : Nat  := eval_prio default
  deriving Inhabited, BEq
goal: Lean.Name

full_name: Mathlib.Meta.FunProp.instInhabitedGeneralTheorem
code: /-- General theorem about function property
  used for transition and morphism theorems -/
structure GeneralTheorem where
  /-- function property name -/
  funPropName   : Name
  /-- theorem name -/
  thmName     : Name
  /-- discrimination tree keys used to index this theorem -/
  keys        : List RefinedDiscrTree.DTExpr
  /-- priority -/
  priority    : Nat  := eval_prio default
  deriving Inhabited, BEq
goal: Inhabited Mathlib.Meta.FunProp.GeneralTheorem

full_name: Mathlib.Meta.FunProp.GeneralTheorem.priority
code: /-- General theorem about function property
  used for transition and morphism theorems -/
structure GeneralTheorem where
  /-- function property name -/
  funPropName   : Name
  /-- theorem name -/
  thmName     : Name
  /-- discrimination tree keys used to index this theorem -/
  keys        : List RefinedDiscrTree.DTExpr
  /-- priority -/
  priority    : Nat  := eval_prio default
  deriving Inhabited, BEq
goal: ℕ

full_name: Mathlib.Meta.FunProp.instBEqGeneralTheorem
code: /-- General theorem about function property
  used for transition and morphism theorems -/
structure GeneralTheorem where
  /-- function property name -/
  funPropName   : Name
  /-- theorem name -/
  thmName     : Name
  /-- discrimination tree keys used to index this theorem -/
  keys        : List RefinedDiscrTree.DTExpr
  /-- priority -/
  priority    : Nat  := eval_prio default
  deriving Inhabited, BEq
goal: BEq Mathlib.Meta.FunProp.GeneralTheorem

full_name: Mathlib.Meta.FunProp.GeneralTheorem.funPropName
code: /-- General theorem about function property
  used for transition and morphism theorems -/
structure GeneralTheorem where
  /-- function property name -/
  funPropName   : Name
  /-- theorem name -/
  thmName     : Name
  /-- discrimination tree keys used to index this theorem -/
  keys        : List RefinedDiscrTree.DTExpr
  /-- priority -/
  priority    : Nat  := eval_prio default
  deriving Inhabited, BEq
goal: Lean.Name

full_name: Mathlib.Meta.FunProp.GeneralTheorem.keys
code: /-- General theorem about function property
  used for transition and morphism theorems -/
structure GeneralTheorem where
  /-- function property name -/
  funPropName   : Name
  /-- theorem name -/
  thmName     : Name
  /-- discrimination tree keys used to index this theorem -/
  keys        : List RefinedDiscrTree.DTExpr
  /-- priority -/
  priority    : Nat  := eval_prio default
  deriving Inhabited, BEq
goal: List Mathlib.Meta.FunProp.RefinedDiscrTree.DTExpr

full_name: Mathlib.Meta.FunProp.GeneralTheorem
code: /-- General theorem about function property
  used for transition and morphism theorems -/
structure GeneralTheorem where
  /-- function property name -/
  funPropName   : Name
  /-- theorem name -/
  thmName     : Name
  /-- discrimination tree keys used to index this theorem -/
  keys        : List RefinedDiscrTree.DTExpr
  /-- priority -/
  priority    : Nat  := eval_prio default
  deriving Inhabited, BEq
goal: Type

full_name: Mathlib.Meta.FunProp.GeneralTheorem.getProof
code: /-- Get proof of a theorem. -/
def GeneralTheorem.getProof (thm : GeneralTheorem) : MetaM Expr 
goal: Lean.MetaM Lean.Expr

full_name: Mathlib.Meta.FunProp.instInhabitedGeneralTheorems
code: /-- -/
structure GeneralTheorems where
  /-- -/
  theorems     : RefinedDiscrTree GeneralTheorem := {}
  deriving Inhabited
goal: Inhabited Mathlib.Meta.FunProp.GeneralTheorems

full_name: Mathlib.Meta.FunProp.GeneralTheorems
code: /-- -/
structure GeneralTheorems where
  /-- -/
  theorems     : RefinedDiscrTree GeneralTheorem := {}
  deriving Inhabited
goal: Type

full_name: Mathlib.Meta.FunProp.GeneralTheorems.theorems
code: /-- -/
structure GeneralTheorems where
  /-- -/
  theorems     : RefinedDiscrTree GeneralTheorem := {}
  deriving Inhabited
goal: Mathlib.Meta.FunProp.RefinedDiscrTree Mathlib.Meta.FunProp.GeneralTheorem

full_name: Mathlib.Meta.FunProp.GeneralTheoremsExt
code: /-- -/
abbrev GeneralTheoremsExt 
goal: Type

full_name: Mathlib.Meta.FunProp.initFn._@.Mathlib.Tactic.FunProp.Theorems._hyg.3996
code: /-- -/
initialize transitionTheoremsExt : GeneralTheoremsExt ←
  registerSimpleScopedEnvExtension {
    name     := by exact decl_name%
    initial  := {}
    addEntry := fun d e =>
      {d with theorems := e.keys.foldl (RefinedDiscrTree.insertDTExpr · · e) d.theorems}
  }
goal: IO Mathlib.Meta.FunProp.GeneralTheoremsExt

full_name: Mathlib.Meta.FunProp.transitionTheoremsExt
code: /-- -/
initialize transitionTheoremsExt : GeneralTheoremsExt ←
  registerSimpleScopedEnvExtension {
    name     := by exact decl_name%
    initial  := {}
    addEntry := fun d e =>
      {d with theorems := e.keys.foldl (RefinedDiscrTree.insertDTExpr · · e) d.theorems}
  }
goal: Mathlib.Meta.FunProp.GeneralTheoremsExt

full_name: Mathlib.Meta.FunProp.morTheoremsExt
code: /-- -/
initialize morTheoremsExt : GeneralTheoremsExt ←
  registerSimpleScopedEnvExtension {
    name     := by exact decl_name%
    initial  := {}
    addEntry := fun d e =>
      {d with theorems := e.keys.foldl (RefinedDiscrTree.insertDTExpr · · e) d.theorems}
  }
goal: Mathlib.Meta.FunProp.GeneralTheoremsExt

full_name: Mathlib.Meta.FunProp.initFn._@.Mathlib.Tactic.FunProp.Theorems._hyg.4058
code: /-- -/
initialize morTheoremsExt : GeneralTheoremsExt ←
  registerSimpleScopedEnvExtension {
    name     := by exact decl_name%
    initial  := {}
    addEntry := fun d e =>
      {d with theorems := e.keys.foldl (RefinedDiscrTree.insertDTExpr · · e) d.theorems}
  }
goal: IO Mathlib.Meta.FunProp.GeneralTheoremsExt

full_name: Mathlib.Meta.FunProp.Theorem.lam
code: /-- 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))
```
- mor - the head of function body has to be ``DFunLike.code
```
  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
```
-/
inductive Theorem where
  | lam        (thm : LambdaTheorem)
  | function   (thm : FunctionTheorem)
  | mor        (thm : GeneralTheorem)
  | transition (thm : GeneralTheorem)
goal: Mathlib.Meta.FunProp.Theorem

full_name: Mathlib.Meta.FunProp.Theorem.function
code: /-- 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))
```
- mor - the head of function body has to be ``DFunLike.code
```
  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
```
-/
inductive Theorem where
  | lam        (thm : LambdaTheorem)
  | function   (thm : FunctionTheorem)
  | mor        (thm : GeneralTheorem)
  | transition (thm : GeneralTheorem)
goal: Mathlib.Meta.FunProp.Theorem

full_name: Mathlib.Meta.FunProp.Theorem.transition
code: /-- 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))
```
- mor - the head of function body has to be ``DFunLike.code
```
  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
```
-/
inductive Theorem where
  | lam        (thm : LambdaTheorem)
  | function   (thm : FunctionTheorem)
  | mor        (thm : GeneralTheorem)
  | transition (thm : GeneralTheorem)
goal: Mathlib.Meta.FunProp.Theorem

full_name: Mathlib.Meta.FunProp.Theorem
code: /-- 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))
```
- mor - the head of function body has to be ``DFunLike.code
```
  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
```
-/
inductive Theorem where
  | lam        (thm : LambdaTheorem)
  | function   (thm : FunctionTheorem)
  | mor        (thm : GeneralTheorem)
  | transition (thm : GeneralTheorem)
goal: Type

full_name: Mathlib.Meta.FunProp.Theorem.mor
code: /-- 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))
```
- mor - the head of function body has to be ``DFunLike.code
```
  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
```
-/
inductive Theorem where
  | lam        (thm : LambdaTheorem)
  | function   (thm : FunctionTheorem)
  | mor        (thm : GeneralTheorem)
  | transition (thm : GeneralTheorem)
goal: Mathlib.Meta.FunProp.Theorem

full_name: Mathlib.Meta.FunProp.getTheoremFromConst
code: /-- -/
def getTheoremFromConst (declName : Name) (prio : Nat := eval_prio default) : MetaM Theorem 
goal: Lean.MetaM Mathlib.Meta.FunProp.Theorem

full_name: Mathlib.Meta.FunProp.addTheorem
code: /-- -/
def addTheorem (declName : Name) (attrKind : AttributeKind := .global)
    (prio : Nat := eval_prio default) : MetaM Unit 
goal: Lean.MetaM Unit