File: Mathlib/Algebra/Module/Injective.lean

full_name: Module.Injective.out
code: /--
An `R`-module `Q` is injective if and only if every injective `R`-linear map descends to a linear
map to `Q`, i.e. in the following diagram, if `f` is injective then there is an `R`-linear map
`h : Y ⟶ Q` such that `g = h ∘ f`
  ```
  X --- f ---> Y
  |
  | g
  v
  Q
  ```
-/
@[mk_iff] class Module.Injective : Prop where
  out : ∀ ⦃X Y : Type v⦄ [AddCommGroup X] [AddCommGroup Y] [Module R X] [Module R Y]
    (f : X →ₗ[R] Y) (_ : Function.Injective f) (g : X →ₗ[R] Q),
    ∃ h : Y →ₗ[R] Q, ∀ x, h (f x) = g x
goal: Function.Injective ⇑f → ∀ (g : X →ₗ[R] Q), ∃ h, ∀ (x : X), h (f x) = g x

full_name: Module.Injective
code: /--
An `R`-module `Q` is injective if and only if every injective `R`-linear map descends to a linear
map to `Q`, i.e. in the following diagram, if `f` is injective then there is an `R`-linear map
`h : Y ⟶ Q` such that `g = h ∘ f`
  ```
  X --- f ---> Y
  |
  | g
  v
  Q
  ```
-/
@[mk_iff] class Module.Injective : Prop where
  out : ∀ ⦃X Y : Type v⦄ [AddCommGroup X] [AddCommGroup Y] [Module R X] [Module R Y]
    (f : X →ₗ[R] Y) (_ : Function.Injective f) (g : X →ₗ[R] Q),
    ∃ h : Y →ₗ[R] Q, ∀ x, h (f x) = g x
goal: Prop

full_name: Module.injective_iff
code: /--
An `R`-module `Q` is injective if and only if every injective `R`-linear map descends to a linear
map to `Q`, i.e. in the following diagram, if `f` is injective then there is an `R`-linear map
`h : Y ⟶ Q` such that `g = h ∘ f`
  ```
  X --- f ---> Y
  |
  | g
  v
  Q
  ```
-/
@[mk_iff] class Module.Injective : Prop where
  out : ∀ ⦃X Y : Type v⦄ [AddCommGroup X] [AddCommGroup Y] [Module R X] [Module R Y]
    (f : X →ₗ[R] Y) (_ : Function.Injective f) (g : X →ₗ[R] Q),
    ∃ h : Y →ₗ[R] Q, ∀ x, h (f x) = g x
goal: Module.Injective R Q ↔
  ∀ ⦃X Y : Type v⦄ [inst : AddCommGroup X] [inst_1 : AddCommGroup Y] [inst_2 : Module R X] [inst_3 : Module R Y]
    (f : X →ₗ[R] Y), Function.Injective ⇑f → ∀ (g : X →ₗ[R] Q), ∃ h, ∀ (x : X), h (f x) = g x

full_name: Module.injective_object_of_injective_module
code: theorem Module.injective_object_of_injective_module [inj : Module.Injective R Q] :
    CategoryTheory.Injective (ModuleCat.of R Q) 
goal: CategoryTheory.Injective (ModuleCat.of R Q)

full_name: Module.injective_module_of_injective_object
code: theorem Module.injective_module_of_injective_object
    [inj : CategoryTheory.Injective <| ModuleCat.of R Q] :
    Module.Injective R Q 
goal: Module.Injective R Q

full_name: Module.injective_iff_injective_object
code: theorem Module.injective_iff_injective_object :
    Module.Injective R Q ↔
    CategoryTheory.Injective (ModuleCat.of R Q) 
goal: Module.Injective R Q ↔ CategoryTheory.Injective (ModuleCat.of R Q)

full_name: Module.Baer
code: /-- An `R`-module `Q` satisfies Baer's criterion if any `R`-linear map from an `Ideal R` extends to
an `R`-linear map `R ⟶ Q`-/
def Module.Baer : Prop 
goal: Prop

full_name: Module.Baer.ExtensionOf
code: /-- If we view `M` as a submodule of `N` via the injective linear map `i : M ↪ N`, then a submodule
between `M` and `N` is a submodule `N'` of `N`. To prove Baer's criterion, we need to consider
pairs of `(N', f')` such that `M ≤ N' ≤ N` and `f'` extends `f`. -/
structure ExtensionOf extends LinearPMap R N Q where
  le : LinearMap.range i ≤ domain
  is_extension : ∀ m : M, f m = toLinearPMap ⟨i m, le ⟨m, rfl⟩⟩
goal: Type (max u_2 v)

full_name: Module.Baer.ExtensionOf.le
code: /-- If we view `M` as a submodule of `N` via the injective linear map `i : M ↪ N`, then a submodule
between `M` and `N` is a submodule `N'` of `N`. To prove Baer's criterion, we need to consider
pairs of `(N', f')` such that `M ≤ N' ≤ N` and `f'` extends `f`. -/
structure ExtensionOf extends LinearPMap R N Q where
  le : LinearMap.range i ≤ domain
  is_extension : ∀ m : M, f m = toLinearPMap ⟨i m, le ⟨m, rfl⟩⟩
goal: LinearMap.range i ≤ self.domain

full_name: Module.Baer.ExtensionOf.is_extension
code: /-- If we view `M` as a submodule of `N` via the injective linear map `i : M ↪ N`, then a submodule
between `M` and `N` is a submodule `N'` of `N`. To prove Baer's criterion, we need to consider
pairs of `(N', f')` such that `M ≤ N' ≤ N` and `f'` extends `f`. -/
structure ExtensionOf extends LinearPMap R N Q where
  le : LinearMap.range i ≤ domain
  is_extension : ∀ m : M, f m = toLinearPMap ⟨i m, le ⟨m, rfl⟩⟩
goal: f m = ↑self.toLinearPMap ⟨i m, ⋯⟩

full_name: Module.Baer.ExtensionOf.ext
code: @[ext]
theorem ExtensionOf.ext {a b : ExtensionOf i f} (domain_eq : a.domain = b.domain)
    (to_fun_eq :
      ∀ ⦃x : a.domain⦄ ⦃y : b.domain⦄, (x : N) = y → a.toLinearPMap x = b.toLinearPMap y) :
    a = b 
goal: a = b

full_name: Module.Baer.ExtensionOf.ext_iff
code: theorem ExtensionOf.ext_iff {a b : ExtensionOf i f} :
    a = b ↔ ∃ _ : a.domain = b.domain, ∀ ⦃x : a.domain⦄ ⦃y : b.domain⦄,
    (x : N) = y → a.toLinearPMap x = b.toLinearPMap y 
goal: a = b ↔ ∃ (_ : a.domain = b.domain), ∀ ⦃x : ↥a.domain⦄ ⦃y : ↥b.domain⦄, ↑x = ↑y → ↑a.toLinearPMap x = ↑b.toLinearPMap y

full_name: Module.Baer.instInfExtensionOf
code: instance : Inf (ExtensionOf i f) 
goal: Inf (Module.Baer.ExtensionOf i f)

full_name: Module.Baer.instSemilatticeInfExtensionOf
code: instance : SemilatticeInf (ExtensionOf i f) 
goal: SemilatticeInf (Module.Baer.ExtensionOf i f)

full_name: Module.Baer.chain_linearPMap_of_chain_extensionOf
code: theorem chain_linearPMap_of_chain_extensionOf {c : Set (ExtensionOf i f)}
    (hchain : IsChain (· ≤ ·) c) :
    IsChain (· ≤ ·) <| (fun x : ExtensionOf i f => x.toLinearPMap) '' c 
goal: IsChain (fun x x_1 => x ≤ x_1) ((fun x => x.toLinearPMap) '' c)

full_name: Module.Baer.ExtensionOf.max
code: /-- The maximal element of every nonempty chain of `extension_of i f`. -/
def ExtensionOf.max {c : Set (ExtensionOf i f)} (hchain : IsChain (· ≤ ·) c)
    (hnonempty : c.Nonempty) : ExtensionOf i f 
goal: Module.Baer.ExtensionOf i f

full_name: Module.Baer.ExtensionOf.le_max
code: theorem ExtensionOf.le_max {c : Set (ExtensionOf i f)} (hchain : IsChain (· ≤ ·) c)
    (hnonempty : c.Nonempty) (a : ExtensionOf i f) (ha : a ∈ c) :
    a ≤ ExtensionOf.max hchain hnonempty 
goal: a ≤ Module.Baer.ExtensionOf.max hchain hnonempty

full_name: Module.Baer.ExtensionOf.inhabited
code: instance ExtensionOf.inhabited : Inhabited (ExtensionOf i f) 
goal: Inhabited (Module.Baer.ExtensionOf i f)

full_name: Module.Baer.extensionOfMax
code: /-- Since every nonempty chain has a maximal element, by Zorn's lemma, there is a maximal
`extension_of i f`. -/
def extensionOfMax : ExtensionOf i f 
goal: Module.Baer.ExtensionOf i f

full_name: Module.Baer.extensionOfMax_is_max
code: theorem extensionOfMax_is_max :
    ∀ a : ExtensionOf i f, extensionOfMax i f ≤ a → a = extensionOfMax i f 
goal: Module.Baer.extensionOfMax i f ≤ a → a = Module.Baer.extensionOfMax i f

full_name: Module.Baer.supExtensionOfMaxSingleton
code: abbrev supExtensionOfMaxSingleton (y : N) : Submodule R N 
goal: Submodule R N

full_name: _private.Mathlib.Algebra.Module.Injective.0.Module.Baer.extensionOfMax_adjoin.aux1
code: private theorem extensionOfMax_adjoin.aux1 {y : N} (x : supExtensionOfMaxSingleton i f y) :
    ∃ (a : (extensionOfMax i f).domain) (b : R), x.1 = a.1 + b • y 
goal: ∃ a b, ↑x = ↑a + b • y

full_name: Module.Baer.ExtensionOfMaxAdjoin.fst
code: /-- If `x ∈ M ⊔ ⟨y⟩`, then `x = m + r • y`, `fst` pick an arbitrary such `m`. -/
def ExtensionOfMaxAdjoin.fst {y : N} (x : supExtensionOfMaxSingleton i f y) :
    (extensionOfMax i f).domain 
goal: ↥(Module.Baer.extensionOfMax i f).domain

full_name: Module.Baer.ExtensionOfMaxAdjoin.snd
code: /-- If `x ∈ M ⊔ ⟨y⟩`, then `x = m + r • y`, `snd` pick an arbitrary such `r`. -/
def ExtensionOfMaxAdjoin.snd {y : N} (x : supExtensionOfMaxSingleton i f y) : R 
goal: R

full_name: Module.Baer.ExtensionOfMaxAdjoin.eqn
code: theorem ExtensionOfMaxAdjoin.eqn {y : N} (x : supExtensionOfMaxSingleton i f y) :
    ↑x = ↑(ExtensionOfMaxAdjoin.fst i x) + ExtensionOfMaxAdjoin.snd i x • y 
goal: ↑x = ↑(Module.Baer.ExtensionOfMaxAdjoin.fst i x) + Module.Baer.ExtensionOfMaxAdjoin.snd i x • y

full_name: Module.Baer.ExtensionOfMaxAdjoin.ideal
code: /-- The ideal `I = {r | r • y ∈ N}`-/
def ExtensionOfMaxAdjoin.ideal (y : N) : Ideal R 
goal: Ideal R

full_name: Module.Baer.ExtensionOfMaxAdjoin.idealTo
code: /-- A linear map `I ⟶ Q` by `x ↦ f' (x • y)` where `f'` is the maximal extension-/
def ExtensionOfMaxAdjoin.idealTo (y : N) : ExtensionOfMaxAdjoin.ideal i f y →ₗ[R] Q 
goal: ↥(Module.Baer.ExtensionOfMaxAdjoin.ideal i f y) →ₗ[R] Q

full_name: Module.Baer.ExtensionOfMaxAdjoin.extendIdealTo
code: /-- Since we assumed `Q` being Baer, the linear map `x ↦ f' (x • y) : I ⟶ Q` extends to `R ⟶ Q`,
call this extended map `φ`-/
def ExtensionOfMaxAdjoin.extendIdealTo (h : Module.Baer R Q) (y : N) : R →ₗ[R] Q 
goal: R →ₗ[R] Q

full_name: Module.Baer.ExtensionOfMaxAdjoin.extendIdealTo_is_extension
code: theorem ExtensionOfMaxAdjoin.extendIdealTo_is_extension (h : Module.Baer R Q) (y : N) :
    ∀ (x : R) (mem : x ∈ ExtensionOfMaxAdjoin.ideal i f y),
      ExtensionOfMaxAdjoin.extendIdealTo i f h y x = ExtensionOfMaxAdjoin.idealTo i f y ⟨x, mem⟩ 
goal: (Module.Baer.ExtensionOfMaxAdjoin.extendIdealTo i f h y) x = (Module.Baer.ExtensionOfMaxAdjoin.idealTo i f y) ⟨x, mem⟩

full_name: Module.Baer.ExtensionOfMaxAdjoin.extendIdealTo_wd'
code: theorem ExtensionOfMaxAdjoin.extendIdealTo_wd' (h : Module.Baer R Q) {y : N} (r : R)
    (eq1 : r • y = 0) : ExtensionOfMaxAdjoin.extendIdealTo i f h y r = 0 
goal: (Module.Baer.ExtensionOfMaxAdjoin.extendIdealTo i f h y) r = 0

full_name: Module.Baer.ExtensionOfMaxAdjoin.extendIdealTo_wd
code: theorem ExtensionOfMaxAdjoin.extendIdealTo_wd (h : Module.Baer R Q) {y : N} (r r' : R)
    (eq1 : r • y = r' • y) : ExtensionOfMaxAdjoin.extendIdealTo i f h y r =
    ExtensionOfMaxAdjoin.extendIdealTo i f h y r' 
goal: (Module.Baer.ExtensionOfMaxAdjoin.extendIdealTo i f h y) r = (Module.Baer.ExtensionOfMaxAdjoin.extendIdealTo i f h y) r'

full_name: Module.Baer.ExtensionOfMaxAdjoin.extendIdealTo_eq
code: theorem ExtensionOfMaxAdjoin.extendIdealTo_eq (h : Module.Baer R Q) {y : N} (r : R)
    (hr : r • y ∈ (extensionOfMax i f).domain) : ExtensionOfMaxAdjoin.extendIdealTo i f h y r =
    (extensionOfMax i f).toLinearPMap ⟨r • y, hr⟩ 
goal: (Module.Baer.ExtensionOfMaxAdjoin.extendIdealTo i f h y) r = ↑(Module.Baer.extensionOfMax i f).toLinearPMap ⟨r • y, hr⟩

full_name: Module.Baer.ExtensionOfMaxAdjoin.extensionToFun
code: /-- We can finally define a linear map `M ⊔ ⟨y⟩ ⟶ Q` by `x + r • y ↦ f x + φ r`
-/
def ExtensionOfMaxAdjoin.extensionToFun (h : Module.Baer R Q) {y : N} :
    supExtensionOfMaxSingleton i f y → Q 
goal: ↥(Module.Baer.supExtensionOfMaxSingleton i f y) → Q

full_name: Module.Baer.ExtensionOfMaxAdjoin.extensionToFun_wd
code: theorem ExtensionOfMaxAdjoin.extensionToFun_wd (h : Module.Baer R Q) {y : N}
    (x : supExtensionOfMaxSingleton i f y) (a : (extensionOfMax i f).domain)
    (r : R) (eq1 : ↑x = ↑a + r • y) :
    ExtensionOfMaxAdjoin.extensionToFun i f h x =
      (extensionOfMax i f).toLinearPMap a + ExtensionOfMaxAdjoin.extendIdealTo i f h y r 
goal: Module.Baer.ExtensionOfMaxAdjoin.extensionToFun i f h x =
  ↑(Module.Baer.extensionOfMax i f).toLinearPMap a + (Module.Baer.ExtensionOfMaxAdjoin.extendIdealTo i f h y) r

full_name: Module.Baer.extensionOfMaxAdjoin
code: /-- The linear map `M ⊔ ⟨y⟩ ⟶ Q` by `x + r • y ↦ f x + φ r` is an extension of `f`-/
def extensionOfMaxAdjoin (h : Module.Baer R Q) (y : N) : ExtensionOf i f 
goal: Module.Baer.ExtensionOf i f

full_name: Module.Baer.extensionOfMax_le
code: theorem extensionOfMax_le (h : Module.Baer R Q) {y : N} :
    extensionOfMax i f ≤ extensionOfMaxAdjoin i f h y 
goal: Module.Baer.extensionOfMax i f ≤ Module.Baer.extensionOfMaxAdjoin i f h y

full_name: Module.Baer.extensionOfMax_to_submodule_eq_top
code: theorem extensionOfMax_to_submodule_eq_top (h : Module.Baer R Q) :
    (extensionOfMax i f).domain = ⊤ 
goal: (Module.Baer.extensionOfMax i f).domain = ⊤

full_name: Module.Baer.extension_property
code: protected theorem extension_property (h : Module.Baer R Q)
    (f : M →ₗ[R] N) (hf : Function.Injective f) (g : M →ₗ[R] Q) : ∃ h, h ∘ₗ f = g 
goal: ∃ h, h ∘ₗ f = g

full_name: Module.Baer.extension_property_addMonoidHom
code: theorem extension_property_addMonoidHom (h : Module.Baer ℤ Q)
    (f : M →+ N) (hf : Function.Injective f) (g : M →+ Q) : ∃ h : N →+ Q, h.comp f = g 
goal: ∃ h, h.comp f = g

full_name: Module.Baer.injective
code: /-- **Baer's criterion** for injective module : a Baer module is an injective module, i.e. if every
linear map from an ideal can be extended, then the module is injective. -/
protected theorem injective (h : Module.Baer R Q) : Module.Injective R Q 
goal: Module.Injective R Q

full_name: Module.Baer.of_injective
code: protected theorem of_injective [Small.{v} R] (inj : Module.Injective R Q) : Module.Baer R Q 
goal: Module.Baer R Q

full_name: Module.Baer.iff_injective
code: protected theorem iff_injective [Small.{v} R] : Module.Baer R Q ↔ Module.Injective R Q 
goal: Module.Baer R Q ↔ Module.Injective R Q

full_name: Module.ulift_injective_of_injective
code: lemma Module.ulift_injective_of_injective [Small.{v} R]
    (inj : Module.Injective R M) :
    Module.Injective R (ULift.{v'} M) 
goal: Module.Injective R (ULift.{v', v} M)

full_name: Module.injective_of_ulift_injective
code: lemma Module.injective_of_ulift_injective
    (inj : Module.Injective R (ULift.{v'} M)) :
    Module.Injective R M 
goal: Module.Injective R M

full_name: Module.injective_iff_ulift_injective
code: lemma Module.injective_iff_ulift_injective :
    Module.Injective R M ↔ Module.Injective R (ULift.{v'} M) 
goal: Module.Injective R M ↔ Module.Injective R (ULift.{v', v} M)

full_name: ModuleCat.ulift_injective_of_injective
code: instance ModuleCat.ulift_injective_of_injective
    [inj : CategoryTheory.Injective <| ModuleCat.of R M] :
    CategoryTheory.Injective <| ModuleCat.of R (ULift.{v'} M) 
goal: CategoryTheory.Injective (ModuleCat.of R (ULift.{v', v} M))

full_name: Module.Injective.extension_property
code: lemma Module.Injective.extension_property
    (f : P →ₗ[R] P') (hf : Function.Injective f)
    (g : P →ₗ[R] M) : ∃ h : P' →ₗ[R] M, h ∘ₗ f = g 
goal: ∃ h, h ∘ₗ f = g