File: Mathlib/LinearAlgebra/QuadraticForm/QuadraticModuleCat.lean

full_name: QuadraticModuleCat.form
code: /-- The category of quadratic modules; modules with an associated quadratic form-/
structure QuadraticModuleCat extends ModuleCat.{v} R where
  /-- The quadratic form associated with the module. -/
  form : QuadraticForm R carrier
goal: QuadraticForm R ↑self.toModuleCat

full_name: QuadraticModuleCat
code: /-- The category of quadratic modules; modules with an associated quadratic form-/
structure QuadraticModuleCat extends ModuleCat.{v} R where
  /-- The quadratic form associated with the module. -/
  form : QuadraticForm R carrier
goal: Type (max u (v + 1))

full_name: QuadraticModuleCat.instCoeSortType
code: instance : CoeSort (QuadraticModuleCat.{v} R) (Type v) 
goal: CoeSort (QuadraticModuleCat R) (Type v)

full_name: QuadraticModuleCat.moduleCat_of_toModuleCat
code: @[simp] theorem moduleCat_of_toModuleCat (X : QuadraticModuleCat.{v} R) :
    ModuleCat.of R X.toModuleCat = X.toModuleCat 
goal: ModuleCat.of R ↑X.toModuleCat = X.toModuleCat

full_name: QuadraticModuleCat.of_form
code: /-- The object in the category of quadratic R-modules associated to a quadratic R-module. -/
@[simps form]
def of {X : Type v} [AddCommGroup X] [Module R X] (Q : QuadraticForm R X) :
    QuadraticModuleCat R 
goal: (QuadraticModuleCat.of Q).form = Q

full_name: QuadraticModuleCat.of
code: /-- The object in the category of quadratic R-modules associated to a quadratic R-module. -/
@[simps form]
def of {X : Type v} [AddCommGroup X] [Module R X] (Q : QuadraticForm R X) :
    QuadraticModuleCat R 
goal: QuadraticModuleCat R

full_name: QuadraticModuleCat.Hom.toIsometry
code: /-- A type alias for `QuadraticForm.LinearIsometry` to avoid confusion between the categorical and
algebraic spellings of composition. -/
@[ext]
structure Hom (V W : QuadraticModuleCat.{v} R) :=
  /-- The underlying isometry -/
  toIsometry : V.form →qᵢ W.form
goal: V.form →qᵢ W.form

full_name: QuadraticModuleCat.Hom
code: /-- A type alias for `QuadraticForm.LinearIsometry` to avoid confusion between the categorical and
algebraic spellings of composition. -/
@[ext]
structure Hom (V W : QuadraticModuleCat.{v} R) :=
  /-- The underlying isometry -/
  toIsometry : V.form →qᵢ W.form
goal: Type v

full_name: QuadraticModuleCat.Hom.toIsometry_injective
code: lemma Hom.toIsometry_injective (V W : QuadraticModuleCat.{v} R) :
    Function.Injective (Hom.toIsometry : Hom V W → _) 
goal: Function.Injective QuadraticModuleCat.Hom.toIsometry

full_name: QuadraticModuleCat.category
code: instance category : Category (QuadraticModuleCat.{v} R) 
goal: CategoryTheory.Category.{v, max (v + 1) u} (QuadraticModuleCat R)

full_name: QuadraticModuleCat.hom_ext
code: @[ext]
lemma hom_ext {M N : QuadraticModuleCat.{v} R} (f g : M ⟶ N) (h : f.toIsometry = g.toIsometry) :
    f = g 
goal: f = g

full_name: QuadraticModuleCat.ofHom
code: /-- Typecheck a `QuadraticForm.Isometry` as a morphism in `Module R`. -/
abbrev ofHom {X : Type v} [AddCommGroup X] [Module R X]
    {Q₁ : QuadraticForm R X} {Q₂ : QuadraticForm R X} (f : Q₁ →qᵢ Q₂) :
    of Q₁ ⟶ of Q₂ 
goal: QuadraticModuleCat.of Q₁ ⟶ QuadraticModuleCat.of Q₂

full_name: QuadraticModuleCat.toIsometry_comp
code: @[simp] theorem toIsometry_comp {M N U : QuadraticModuleCat.{v} R} (f : M ⟶ N) (g : N ⟶ U) :
    (f ≫ g).toIsometry = g.toIsometry.comp f.toIsometry 
goal: (f ≫ g).toIsometry = g.toIsometry.comp f.toIsometry

full_name: QuadraticModuleCat.toIsometry_id
code: @[simp] theorem toIsometry_id {M : QuadraticModuleCat.{v} R} :
    Hom.toIsometry (𝟙 M) = Isometry.id _ 
goal: (𝟙 M).toIsometry = QuadraticMap.Isometry.id M.form

full_name: QuadraticModuleCat.concreteCategory
code: instance concreteCategory : ConcreteCategory.{v} (QuadraticModuleCat.{v} R) 
goal: CategoryTheory.ConcreteCategory (QuadraticModuleCat R)

full_name: QuadraticModuleCat.hasForgetToModule
code: instance hasForgetToModule : HasForget₂ (QuadraticModuleCat R) (ModuleCat R) 
goal: CategoryTheory.HasForget₂ (QuadraticModuleCat R) (ModuleCat R)

full_name: QuadraticModuleCat.forget₂_obj
code: @[simp]
theorem forget₂_obj (X : QuadraticModuleCat R) :
    (forget₂ (QuadraticModuleCat R) (ModuleCat R)).obj X = ModuleCat.of R X 
goal: (CategoryTheory.forget₂ (QuadraticModuleCat R) (ModuleCat R)).obj X = ModuleCat.of R ↑X.toModuleCat

full_name: QuadraticModuleCat.forget₂_map
code: @[simp]
theorem forget₂_map (X Y : QuadraticModuleCat R) (f : X ⟶ Y) :
    (forget₂ (QuadraticModuleCat R) (ModuleCat R)).map f = f.toIsometry.toLinearMap 
goal: (CategoryTheory.forget₂ (QuadraticModuleCat R) (ModuleCat R)).map f = f.toIsometry.toLinearMap

full_name: QuadraticModuleCat.ofIso_hom_toIsometry
code: /-- Build an isomorphism in the category `QuadraticModuleCat R` from a
`QuadraticForm.IsometryEquiv`. -/
@[simps]
def ofIso (e : Q₁.IsometryEquiv Q₂) : QuadraticModuleCat.of Q₁ ≅ QuadraticModuleCat.of Q₂ 
goal: (QuadraticModuleCat.ofIso e).hom.toIsometry = e.toIsometry

full_name: QuadraticModuleCat.ofIso
code: /-- Build an isomorphism in the category `QuadraticModuleCat R` from a
`QuadraticForm.IsometryEquiv`. -/
@[simps]
def ofIso (e : Q₁.IsometryEquiv Q₂) : QuadraticModuleCat.of Q₁ ≅ QuadraticModuleCat.of Q₂ 
goal: QuadraticModuleCat.of Q₁ ≅ QuadraticModuleCat.of Q₂

full_name: QuadraticModuleCat.ofIso_inv_toIsometry
code: /-- Build an isomorphism in the category `QuadraticModuleCat R` from a
`QuadraticForm.IsometryEquiv`. -/
@[simps]
def ofIso (e : Q₁.IsometryEquiv Q₂) : QuadraticModuleCat.of Q₁ ≅ QuadraticModuleCat.of Q₂ 
goal: (QuadraticModuleCat.ofIso e).inv.toIsometry = e.symm.toIsometry

full_name: QuadraticModuleCat.ofIso_refl
code: @[simp] theorem ofIso_refl : ofIso (IsometryEquiv.refl Q₁) = .refl _ 
goal: QuadraticModuleCat.ofIso (QuadraticMap.IsometryEquiv.refl Q₁) = CategoryTheory.Iso.refl (QuadraticModuleCat.of Q₁)

full_name: QuadraticModuleCat.ofIso_symm
code: @[simp] theorem ofIso_symm (e : Q₁.IsometryEquiv Q₂) : ofIso e.symm = (ofIso e).symm 
goal: QuadraticModuleCat.ofIso e.symm = (QuadraticModuleCat.ofIso e).symm

full_name: QuadraticModuleCat.ofIso_trans
code: @[simp] theorem ofIso_trans (e : Q₁.IsometryEquiv Q₂) (f : Q₂.IsometryEquiv Q₃) :
    ofIso (e.trans f) = ofIso e ≪≫ ofIso f 
goal: QuadraticModuleCat.ofIso (e.trans f) = QuadraticModuleCat.ofIso e ≪≫ QuadraticModuleCat.ofIso f

full_name: CategoryTheory.Iso.toIsometryEquiv_invFun
code: /-- Build a `QuadraticForm.IsometryEquiv` from an isomorphism in the category
`QuadraticModuleCat R`. -/
@[simps]
def toIsometryEquiv (i : X ≅ Y) : X.form.IsometryEquiv Y.form 
goal: i.toIsometryEquiv.invFun a = i.inv.toIsometry a

full_name: CategoryTheory.Iso.toIsometryEquiv
code: /-- Build a `QuadraticForm.IsometryEquiv` from an isomorphism in the category
`QuadraticModuleCat R`. -/
@[simps]
def toIsometryEquiv (i : X ≅ Y) : X.form.IsometryEquiv Y.form 
goal: QuadraticMap.IsometryEquiv X.form Y.form

full_name: CategoryTheory.Iso.toIsometryEquiv_toFun
code: /-- Build a `QuadraticForm.IsometryEquiv` from an isomorphism in the category
`QuadraticModuleCat R`. -/
@[simps]
def toIsometryEquiv (i : X ≅ Y) : X.form.IsometryEquiv Y.form 
goal: i.toIsometryEquiv a = i.hom.toIsometry a

full_name: CategoryTheory.Iso.toIsometryEquiv_refl
code: @[simp] theorem toIsometryEquiv_refl : toIsometryEquiv (.refl X) = .refl _ 
goal: (CategoryTheory.Iso.refl X).toIsometryEquiv = QuadraticMap.IsometryEquiv.refl X.form

full_name: CategoryTheory.Iso.toIsometryEquiv_symm
code: @[simp] theorem toIsometryEquiv_symm (e : X ≅ Y) :
    toIsometryEquiv e.symm = (toIsometryEquiv e).symm 
goal: e.symm.toIsometryEquiv = e.toIsometryEquiv.symm

full_name: CategoryTheory.Iso.toIsometryEquiv_trans
code: @[simp] theorem toIsometryEquiv_trans (e : X ≅ Y) (f : Y ≅ Z) :
    toIsometryEquiv (e ≪≫ f) = e.toIsometryEquiv.trans f.toIsometryEquiv 
goal: (e ≪≫ f).toIsometryEquiv = e.toIsometryEquiv.trans f.toIsometryEquiv