File: Mathlib/CategoryTheory/Linear/Basic.lean

full_name: CategoryTheory.Linear.smul_comp
code: /-- A category is called `R`-linear if `P ⟶ Q` is an `R`-module such that composition is
    `R`-linear in both variables. -/
class Linear (R : Type w) [Semiring R] (C : Type u) [Category.{v} C] [Preadditive C] where
  homModule : ∀ X Y : C, Module R (X ⟶ Y) := by infer_instance
  /-- compatibility of the scalar multiplication with the post-composition -/
  smul_comp : ∀ (X Y Z : C) (r : R) (f : X ⟶ Y) (g : Y ⟶ Z), (r • f) ≫ g = r • f ≫ g := by
    aesop_cat
  /-- compatibility of the scalar multiplication with the pre-composition -/
  comp_smul : ∀ (X Y Z : C) (f : X ⟶ Y) (r : R) (g : Y ⟶ Z), f ≫ (r • g) = r • f ≫ g := by
    aesop_cat
goal: (r • f) ≫ g = r • f ≫ g

full_name: CategoryTheory.Linear.homModule
code: /-- A category is called `R`-linear if `P ⟶ Q` is an `R`-module such that composition is
    `R`-linear in both variables. -/
class Linear (R : Type w) [Semiring R] (C : Type u) [Category.{v} C] [Preadditive C] where
  homModule : ∀ X Y : C, Module R (X ⟶ Y) := by infer_instance
  /-- compatibility of the scalar multiplication with the post-composition -/
  smul_comp : ∀ (X Y Z : C) (r : R) (f : X ⟶ Y) (g : Y ⟶ Z), (r • f) ≫ g = r • f ≫ g := by
    aesop_cat
  /-- compatibility of the scalar multiplication with the pre-composition -/
  comp_smul : ∀ (X Y Z : C) (f : X ⟶ Y) (r : R) (g : Y ⟶ Z), f ≫ (r • g) = r • f ≫ g := by
    aesop_cat
goal: Module R (X ⟶ Y)

full_name: CategoryTheory.Linear.comp_smul
code: /-- A category is called `R`-linear if `P ⟶ Q` is an `R`-module such that composition is
    `R`-linear in both variables. -/
class Linear (R : Type w) [Semiring R] (C : Type u) [Category.{v} C] [Preadditive C] where
  homModule : ∀ X Y : C, Module R (X ⟶ Y) := by infer_instance
  /-- compatibility of the scalar multiplication with the post-composition -/
  smul_comp : ∀ (X Y Z : C) (r : R) (f : X ⟶ Y) (g : Y ⟶ Z), (r • f) ≫ g = r • f ≫ g := by
    aesop_cat
  /-- compatibility of the scalar multiplication with the pre-composition -/
  comp_smul : ∀ (X Y Z : C) (f : X ⟶ Y) (r : R) (g : Y ⟶ Z), f ≫ (r • g) = r • f ≫ g := by
    aesop_cat
goal: f ≫ (r • g) = r • f ≫ g

full_name: CategoryTheory.Linear
code: /-- A category is called `R`-linear if `P ⟶ Q` is an `R`-module such that composition is
    `R`-linear in both variables. -/
class Linear (R : Type w) [Semiring R] (C : Type u) [Category.{v} C] [Preadditive C] where
  homModule : ∀ X Y : C, Module R (X ⟶ Y) := by infer_instance
  /-- compatibility of the scalar multiplication with the post-composition -/
  smul_comp : ∀ (X Y Z : C) (r : R) (f : X ⟶ Y) (g : Y ⟶ Z), (r • f) ≫ g = r • f ≫ g := by
    aesop_cat
  /-- compatibility of the scalar multiplication with the pre-composition -/
  comp_smul : ∀ (X Y Z : C) (f : X ⟶ Y) (r : R) (g : Y ⟶ Z), f ≫ (r • g) = r • f ≫ g := by
    aesop_cat
goal: Type (max (max u v) w)

full_name: CategoryTheory.Linear.preadditiveNatLinear
code: instance preadditiveNatLinear : Linear ℕ C 
goal: CategoryTheory.Linear ℕ C

full_name: CategoryTheory.Linear.preadditiveIntLinear
code: instance preadditiveIntLinear : Linear ℤ C 
goal: CategoryTheory.Linear ℤ C

full_name: CategoryTheory.Linear.instModuleEnd
code: instance [Semiring R] [Linear R C] (X : C) : Module R (End X) 
goal: Module R (CategoryTheory.End X)

full_name: CategoryTheory.Linear.instAlgebraEnd
code: instance [CommSemiring R] [Linear R C] (X : C) : Algebra R (End X) 
goal: Algebra R (CategoryTheory.End X)

full_name: CategoryTheory.Linear.inducedCategory
code: instance inducedCategory : Linear.{w, v} R (InducedCategory C F) 
goal: CategoryTheory.Linear R (CategoryTheory.InducedCategory C F)

full_name: CategoryTheory.Linear.fullSubcategory
code: instance fullSubcategory (Z : C → Prop) : Linear.{w, v} R (FullSubcategory Z) 
goal: CategoryTheory.Linear R (CategoryTheory.FullSubcategory Z)

full_name: CategoryTheory.Linear.leftComp_apply
code: /-- Composition by a fixed left argument as an `R`-linear map. -/
@[simps]
def leftComp {X Y : C} (Z : C) (f : X ⟶ Y) : (Y ⟶ Z) →ₗ[R] X ⟶ Z 
goal: (CategoryTheory.Linear.leftComp R Z f) g = f ≫ g

full_name: CategoryTheory.Linear.leftComp
code: /-- Composition by a fixed left argument as an `R`-linear map. -/
@[simps]
def leftComp {X Y : C} (Z : C) (f : X ⟶ Y) : (Y ⟶ Z) →ₗ[R] X ⟶ Z 
goal: (Y ⟶ Z) →ₗ[R] X ⟶ Z

full_name: CategoryTheory.Linear.rightComp
code: /-- Composition by a fixed right argument as an `R`-linear map. -/
@[simps]
def rightComp (X : C) {Y Z : C} (g : Y ⟶ Z) : (X ⟶ Y) →ₗ[R] X ⟶ Z 
goal: (X ⟶ Y) →ₗ[R] X ⟶ Z

full_name: CategoryTheory.Linear.rightComp_apply
code: /-- Composition by a fixed right argument as an `R`-linear map. -/
@[simps]
def rightComp (X : C) {Y Z : C} (g : Y ⟶ Z) : (X ⟶ Y) →ₗ[R] X ⟶ Z 
goal: (CategoryTheory.Linear.rightComp R X g) f = f ≫ g

full_name: CategoryTheory.Linear.instEpiHSMulHomOfInvertible
code: instance {X Y : C} (f : X ⟶ Y) [Epi f] (r : R) [Invertible r] : Epi (r • f) 
goal: CategoryTheory.Epi (r • f)

full_name: CategoryTheory.Linear.instMonoHSMulHomOfInvertible
code: instance {X Y : C} (f : X ⟶ Y) [Mono f] (r : R) [Invertible r] : Mono (r • f) 
goal: CategoryTheory.Mono (r • f)

full_name: CategoryTheory.Linear.homCongr
code: /-- Given isomorphic objects `X ≅ Y, W ≅ Z` in a `k`-linear category, we have a `k`-linear
isomorphism between `Hom(X, W)` and `Hom(Y, Z).` -/
def homCongr (k : Type*) {C : Type*} [Category C] [Semiring k] [Preadditive C] [Linear k C]
    {X Y W Z : C} (f₁ : X ≅ Y) (f₂ : W ≅ Z) : (X ⟶ W) ≃ₗ[k] Y ⟶ Z 
goal: (X ⟶ W) ≃ₗ[k] Y ⟶ Z

full_name: CategoryTheory.Linear.homCongr_apply
code: theorem homCongr_apply (k : Type*) {C : Type*} [Category C] [Semiring k] [Preadditive C]
    [Linear k C] {X Y W Z : C} (f₁ : X ≅ Y) (f₂ : W ≅ Z) (f : X ⟶ W) :
    homCongr k f₁ f₂ f = (f₁.inv ≫ f) ≫ f₂.hom 
goal: (CategoryTheory.Linear.homCongr k f₁ f₂) f = (f₁.inv ≫ f) ≫ f₂.hom

full_name: CategoryTheory.Linear.homCongr_symm_apply
code: theorem homCongr_symm_apply (k : Type*) {C : Type*} [Category C] [Semiring k] [Preadditive C]
    [Linear k C] {X Y W Z : C} (f₁ : X ≅ Y) (f₂ : W ≅ Z) (f : Y ⟶ Z) :
    (homCongr k f₁ f₂).symm f = f₁.hom ≫ f ≫ f₂.inv 
goal: (CategoryTheory.Linear.homCongr k f₁ f₂).symm f = f₁.hom ≫ f ≫ f₂.inv

full_name: CategoryTheory.Linear.units_smul_comp
code: @[simp]
lemma units_smul_comp {X Y Z : C} (r : Rˣ) (f : X ⟶ Y) (g : Y ⟶ Z) :
    (r • f) ≫ g = r • f ≫ g 
goal: (r • f) ≫ g = r • f ≫ g

full_name: CategoryTheory.Linear.comp_units_smul
code: @[simp]
lemma comp_units_smul {X Y Z : C} (f : X ⟶ Y) (r : Rˣ) (g : Y ⟶ Z) :
    f ≫ (r • g) = r • f ≫ g 
goal: f ≫ (r • g) = r • f ≫ g

full_name: CategoryTheory.Linear.comp
code: /-- Composition as a bilinear map. -/
@[simps]
def comp (X Y Z : C) : (X ⟶ Y) →ₗ[S] (Y ⟶ Z) →ₗ[S] X ⟶ Z 
goal: (X ⟶ Y) →ₗ[S] (Y ⟶ Z) →ₗ[S] X ⟶ Z

full_name: CategoryTheory.Linear.comp_apply
code: /-- Composition as a bilinear map. -/
@[simps]
def comp (X Y Z : C) : (X ⟶ Y) →ₗ[S] (Y ⟶ Z) →ₗ[S] X ⟶ Z 
goal: (CategoryTheory.Linear.comp X Y Z) f = CategoryTheory.Linear.leftComp S Z f