doc-next-gen

Mathlib.Algebra.Module.Submodule.Range

Module docstring

{"# Range of linear maps

The range LinearMap.range of a (semi)linear map f : M → M₂ is a submodule of M₂.

More specifically, LinearMap.range applies to any SemilinearMapClass over a RingHomSurjective ring homomorphism.

Note that this also means that dot notation (i.e. f.range for a linear map f) does not work.

Notations

  • We continue to use the notations M →ₛₗ[σ] M₂ and M →ₗ[R] M₂ for the type of semilinear (resp. linear) maps from M to M₂ over the ring homomorphism σ (resp. over the ring R).

Tags

linear algebra, vector space, module, range "}

LinearMap.range definition
[RingHomSurjective τ₁₂] (f : F) : Submodule R₂ M₂
Full source
/-- The range of a linear map `f : M → M₂` is a submodule of `M₂`.
See Note [range copy pattern]. -/
def range [RingHomSurjective τ₁₂] (f : F) : Submodule R₂ M₂ :=
  (map f ).copy (Set.range f) Set.image_univ.symm
Range of a semilinear map as a submodule
Informal description
Given a semilinear map \( f : M \to M₂ \) between modules over semirings \( R \) and \( R₂ \) respectively (with a ring homomorphism \( \tau_{12} : R \to R₂ \)), the range of \( f \) is the submodule of \( M₂ \) consisting of all elements of the form \( f(x) \) where \( x \in M \). More formally, the range is defined as the image of the universal submodule \( \top \subseteq M \) under \( f \), with its underlying set being the set-theoretic range of \( f \).
LinearMap.range_coe theorem
[RingHomSurjective τ₁₂] (f : F) : (range f : Set M₂) = Set.range f
Full source
theorem range_coe [RingHomSurjective τ₁₂] (f : F) : (range f : Set M₂) = Set.range f :=
  rfl
Range Submodule as Set Equals Function Range
Informal description
For a semilinear map $f \colon M \to M₂$ between modules over semirings $R$ and $R₂$ (with ring homomorphism $\tau_{12} \colon R \to R₂$), the underlying set of the range submodule $\text{range}(f)$ is equal to the set-theoretic range of $f$, i.e., $$(\text{range}(f) : \text{Set } M₂) = \{f(x) \mid x \in M\}.$$
LinearMap.range_toAddSubmonoid theorem
[RingHomSurjective τ₁₂] (f : M →ₛₗ[τ₁₂] M₂) : (range f).toAddSubmonoid = AddMonoidHom.mrange f
Full source
theorem range_toAddSubmonoid [RingHomSurjective τ₁₂] (f : M →ₛₗ[τ₁₂] M₂) :
    (range f).toAddSubmonoid = AddMonoidHom.mrange f :=
  rfl
Range of Semilinear Map as Additive Submonoid
Informal description
For a semilinear map $f \colon M \to_{\tau_{12}} M_2$ between modules over semirings $R$ and $R_2$ (with ring homomorphism $\tau_{12} \colon R \to R_2$), the underlying additive submonoid of the range of $f$ is equal to the additive submonoid generated by the image of $f$. That is, $(\text{range } f).\text{toAddSubmonoid} = \text{AddMonoidHom.mrange } f$.
LinearMap.mem_range theorem
[RingHomSurjective τ₁₂] {f : F} {x} : x ∈ range f ↔ ∃ y, f y = x
Full source
@[simp]
theorem mem_range [RingHomSurjective τ₁₂] {f : F} {x} : x ∈ range fx ∈ range f ↔ ∃ y, f y = x :=
  Iff.rfl
Characterization of Elements in the Range of a Semilinear Map
Informal description
Let $R$ and $R₂$ be semirings with a ring homomorphism $\tau_{12} : R \to R₂$, and let $M$ be an $R$-module and $M₂$ an $R₂$-module. For any $\tau_{12}$-semilinear map $f : M \to M₂$ and any element $x \in M₂$, we have that $x$ belongs to the range of $f$ if and only if there exists some $y \in M$ such that $f(y) = x$.
LinearMap.range_eq_map theorem
[RingHomSurjective τ₁₂] (f : F) : range f = map f ⊤
Full source
theorem range_eq_map [RingHomSurjective τ₁₂] (f : F) : range f = map f  := by
  ext
  simp
Range of a Semilinear Map as Image of the Universal Submodule
Informal description
For any semilinear map $f \colon M \to M₂$ between modules over semirings $R$ and $R₂$ (with a ring homomorphism $\tau_{12} \colon R \to R₂$), the range of $f$ is equal to the image of the universal submodule $\top \subseteq M$ under $f$. That is, \[ \text{range}(f) = f(\top). \]
LinearMap.mem_range_self theorem
[RingHomSurjective τ₁₂] (f : F) (x : M) : f x ∈ range f
Full source
theorem mem_range_self [RingHomSurjective τ₁₂] (f : F) (x : M) : f x ∈ range f :=
  ⟨x, rfl⟩
Self-image belongs to range of semilinear map
Informal description
For any $\tau_{12}$-semilinear map $f \colon M \to M_2$ between modules over semirings $R$ and $R_2$ (where $\tau_{12} \colon R \to R_2$ is a surjective ring homomorphism), and for any element $x \in M$, the image $f(x)$ belongs to the range of $f$.
LinearMap.range_id theorem
: range (LinearMap.id : M →ₗ[R] M) = ⊤
Full source
@[simp]
theorem range_id : range (LinearMap.id : M →ₗ[R] M) =  :=
  SetLike.coe_injective Set.range_id
Range of Identity Linear Map is Entire Module
Informal description
For any module $M$ over a semiring $R$, the range of the identity linear map $\text{id} \colon M \to M$ is equal to the entire module $M$.
LinearMap.range_comp theorem
[RingHomSurjective τ₁₂] [RingHomSurjective τ₂₃] [RingHomSurjective τ₁₃] (f : M →ₛₗ[τ₁₂] M₂) (g : M₂ →ₛₗ[τ₂₃] M₃) : range (g.comp f : M →ₛₗ[τ₁₃] M₃) = map g (range f)
Full source
theorem range_comp [RingHomSurjective τ₁₂] [RingHomSurjective τ₂₃] [RingHomSurjective τ₁₃]
    (f : M →ₛₗ[τ₁₂] M₂) (g : M₂ →ₛₗ[τ₂₃] M₃) : range (g.comp f : M →ₛₗ[τ₁₃] M₃) = map g (range f) :=
  SetLike.coe_injective (Set.range_comp g f)
Range of Composition of Semilinear Maps Equals Image of Range
Informal description
Let $R$, $S$, and $T$ be semirings with ring homomorphisms $\tau_{12} \colon R \to S$ and $\tau_{23} \colon S \to T$ such that $\tau_{13} = \tau_{23} \circ \tau_{12}$ is surjective. Given semilinear maps $f \colon M \to_{\tau_{12}} M_2$ and $g \colon M_2 \to_{\tau_{23}} M_3$, the range of their composition $g \circ f \colon M \to_{\tau_{13}} M_3$ equals the image of the range of $f$ under $g$, i.e., \[ \mathrm{range}(g \circ f) = g(\mathrm{range}(f)). \]
LinearMap.range_comp_le_range theorem
[RingHomSurjective τ₂₃] [RingHomSurjective τ₁₃] (f : M →ₛₗ[τ₁₂] M₂) (g : M₂ →ₛₗ[τ₂₃] M₃) : range (g.comp f : M →ₛₗ[τ₁₃] M₃) ≤ range g
Full source
theorem range_comp_le_range [RingHomSurjective τ₂₃] [RingHomSurjective τ₁₃] (f : M →ₛₗ[τ₁₂] M₂)
    (g : M₂ →ₛₗ[τ₂₃] M₃) : range (g.comp f : M →ₛₗ[τ₁₃] M₃) ≤ range g :=
  SetLike.coe_mono (Set.range_comp_subset_range f g)
Range of Composition of Semilinear Maps is Contained in Range of Outer Map
Informal description
Let $R$, $S$, and $T$ be semirings with ring homomorphisms $\tau_{12} \colon R \to S$, $\tau_{23} \colon S \to T$, and $\tau_{13} = \tau_{23} \circ \tau_{12}$, where $\tau_{23}$ and $\tau_{13}$ are surjective. Given semilinear maps $f \colon M \to_{\tau_{12}} M_2$ and $g \colon M_2 \to_{\tau_{23}} M_3$, the range of their composition $g \circ f \colon M \to_{\tau_{13}} M_3$ is contained in the range of $g$, i.e., \[ \mathrm{range}(g \circ f) \subseteq \mathrm{range}(g). \]
LinearMap.range_eq_top theorem
[RingHomSurjective τ₁₂] {f : F} : range f = ⊤ ↔ Surjective f
Full source
theorem range_eq_top [RingHomSurjective τ₁₂] {f : F} :
    rangerange f = ⊤ ↔ Surjective f := by
  rw [SetLike.ext'_iff, range_coe, top_coe, Set.range_eq_univ]
Range Equals Entire Codomain iff Semilinear Map is Surjective
Informal description
For a semilinear map $f \colon M \to M₂$ between modules over semirings $R$ and $R₂$ (with a surjective ring homomorphism $\tau_{12} \colon R \to R₂$), the range of $f$ is equal to the entire module $M₂$ if and only if $f$ is surjective. That is, \[ \text{range}(f) = M₂ \leftrightarrow \text{Surjective}(f). \]
LinearMap.range_eq_top_of_surjective theorem
[RingHomSurjective τ₁₂] (f : F) (hf : Surjective f) : range f = ⊤
Full source
theorem range_eq_top_of_surjective [RingHomSurjective τ₁₂] (f : F) (hf : Surjective f) :
    range f =  := range_eq_top.2 hf
Surjective Semilinear Maps Have Full Range
Informal description
Let $R$ and $R₂$ be semirings with a surjective ring homomorphism $\tau_{12} \colon R \to R₂$, and let $M$ be an $R$-module and $M₂$ an $R₂$-module. For any $\tau_{12}$-semilinear map $f \colon M \to M₂$, if $f$ is surjective, then the range of $f$ is equal to the entire module $M₂$, i.e., \[ \text{range}(f) = M₂. \]
LinearMap.range_le_iff_comap theorem
[RingHomSurjective τ₁₂] {f : F} {p : Submodule R₂ M₂} : range f ≤ p ↔ comap f p = ⊤
Full source
theorem range_le_iff_comap [RingHomSurjective τ₁₂] {f : F} {p : Submodule R₂ M₂} :
    rangerange f ≤ p ↔ comap f p = ⊤ := by rw [range_eq_map, map_le_iff_le_comap, eq_top_iff]
Range Containment Criterion via Pullback Submodule
Informal description
Let $R$ and $R₂$ be semirings with a surjective ring homomorphism $\tau_{12} \colon R \to R₂$, let $M$ be an $R$-module and $M₂$ an $R₂$-module, and let $f \colon M \to M₂$ be a $\tau_{12}$-semilinear map. For any submodule $p$ of $M₂$, the range of $f$ is contained in $p$ if and only if the pullback submodule $f^{-1}(p)$ equals the entire module $M$. That is, \[ \mathrm{range}(f) \subseteq p \leftrightarrow f^{-1}(p) = M. \]
LinearMap.map_le_range theorem
[RingHomSurjective τ₁₂] {f : F} {p : Submodule R M} : map f p ≤ range f
Full source
theorem map_le_range [RingHomSurjective τ₁₂] {f : F} {p : Submodule R M} : map f p ≤ range f :=
  SetLike.coe_mono (Set.image_subset_range f p)
Image of Submodule Under Semilinear Map is Contained in Range
Informal description
Let $R$ and $R_2$ be semirings with a ring homomorphism $\tau_{12} \colon R \to R_2$, let $M$ be an $R$-module and $M_2$ an $R_2$-module, and let $f \colon M \to M_2$ be a $\tau_{12}$-semilinear map. For any submodule $p$ of $M$, the image of $p$ under $f$ is contained in the range of $f$, i.e., \[ f(p) \subseteq \mathrm{range}(f). \]
LinearMap.range_neg theorem
{R : Type*} {R₂ : Type*} {M : Type*} {M₂ : Type*} [Semiring R] [Ring R₂] [AddCommMonoid M] [AddCommGroup M₂] [Module R M] [Module R₂ M₂] {τ₁₂ : R →+* R₂} [RingHomSurjective τ₁₂] (f : M →ₛₗ[τ₁₂] M₂) : LinearMap.range (-f) = LinearMap.range f
Full source
@[simp]
theorem range_neg {R : Type*} {R₂ : Type*} {M : Type*} {M₂ : Type*} [Semiring R] [Ring R₂]
    [AddCommMonoid M] [AddCommGroup M₂] [Module R M] [Module R₂ M₂] {τ₁₂ : R →+* R₂}
    [RingHomSurjective τ₁₂] (f : M →ₛₗ[τ₁₂] M₂) : LinearMap.range (-f) = LinearMap.range f := by
  change range ((-LinearMap.id : M₂ →ₗ[R₂] M₂).comp f) = _
  rw [range_comp, Submodule.map_neg, Submodule.map_id]
Range Invariance Under Negation of Semilinear Maps
Informal description
Let $R$ be a semiring, $R₂$ a ring, $M$ an $R$-module, and $M₂$ an $R₂$-module. Given a $\tau_{12}$-semilinear map $f \colon M \to M₂$ where $\tau_{12} \colon R \to R₂$ is a surjective ring homomorphism, the range of $-f$ is equal to the range of $f$, i.e., \[ \mathrm{range}(-f) = \mathrm{range}(f). \]
LinearMap.range_domRestrict theorem
[Module R M₂] (K : Submodule R M) (f : M →ₗ[R] M₂) : range (domRestrict f K) = K.map f
Full source
@[simp] lemma range_domRestrict [Module R M₂] (K : Submodule R M) (f : M →ₗ[R] M₂) :
    range (domRestrict f K) = K.map f := by ext; simp
Range of Restricted Linear Map Equals Image of Submodule
Informal description
Let $R$ be a semiring, $M$ and $M₂$ be $R$-modules, and $K$ be a submodule of $M$. For any linear map $f \colon M \to M₂$, the range of the domain restriction of $f$ to $K$ is equal to the image of $K$ under $f$, i.e., \[ \mathrm{range}(f|_{K}) = f(K). \]
LinearMap.range_domRestrict_le_range theorem
[RingHomSurjective τ₁₂] (f : M →ₛₗ[τ₁₂] M₂) (S : Submodule R M) : LinearMap.range (f.domRestrict S) ≤ LinearMap.range f
Full source
lemma range_domRestrict_le_range [RingHomSurjective τ₁₂] (f : M →ₛₗ[τ₁₂] M₂) (S : Submodule R M) :
    LinearMap.range (f.domRestrict S) ≤ LinearMap.range f := by
  rintro x ⟨⟨y, hy⟩, rfl⟩
  exact LinearMap.mem_range_self f y
Range of Restricted Semilinear Map is Contained in Original Range
Informal description
Let $R$ and $R_2$ be semirings, $M$ be an $R$-module, $M_2$ be an $R_2$-module, and $\tau_{12} \colon R \to R_2$ be a surjective ring homomorphism. For any $\tau_{12}$-semilinear map $f \colon M \to M_2$ and any submodule $S \subseteq M$, the range of the domain restriction $f|_S$ is contained in the range of $f$, i.e., \[ \mathrm{range}(f|_S) \subseteq \mathrm{range}(f). \]
AddMonoidHom.coe_toIntLinearMap_range theorem
{M M₂ : Type*} [AddCommGroup M] [AddCommGroup M₂] (f : M →+ M₂) : LinearMap.range f.toIntLinearMap = AddSubgroup.toIntSubmodule f.range
Full source
@[simp]
theorem _root_.AddMonoidHom.coe_toIntLinearMap_range {M M₂ : Type*} [AddCommGroup M]
    [AddCommGroup M₂] (f : M →+ M₂) :
    LinearMap.range f.toIntLinearMap = AddSubgroup.toIntSubmodule f.range := rfl
Range Correspondence Between Additive Group Homomorphism and $\mathbb{Z}$-Linear Map
Informal description
Let $M$ and $M₂$ be additive commutative groups, and let $f \colon M \to M₂$ be an additive group homomorphism. When $f$ is viewed as a $\mathbb{Z}$-linear map between these groups (considered as $\mathbb{Z}$-modules), the range of this linear map equals the $\mathbb{Z}$-submodule corresponding to the range of $f$ as an additive group homomorphism.
Submodule.map_comap_eq_of_le theorem
[RingHomSurjective τ₁₂] {f : F} {p : Submodule R₂ M₂} (h : p ≤ LinearMap.range f) : (p.comap f).map f = p
Full source
lemma _root_.Submodule.map_comap_eq_of_le [RingHomSurjective τ₁₂] {f : F} {p : Submodule R₂ M₂}
    (h : p ≤ LinearMap.range f) : (p.comap f).map f = p :=
  SetLike.coe_injective <| Set.image_preimage_eq_of_subset h
Image-Preimage Equality for Submodules under Semilinear Maps
Informal description
Let $f : M \to M₂$ be a semilinear map between modules over semirings $R$ and $R₂$ (with ring homomorphism $\tau_{12} : R \to R₂$), and let $p$ be a submodule of $M₂$ such that $p$ is contained in the range of $f$. Then the image under $f$ of the preimage of $p$ equals $p$, i.e., $f(f^{-1}(p)) = p$.
LinearMap.range_restrictScalars theorem
[SMul R R₂] [Module R₂ M] [Module R M₂] [CompatibleSMul M M₂ R R₂] [IsScalarTower R R₂ M₂] (f : M →ₗ[R₂] M₂) : LinearMap.range (f.restrictScalars R) = (LinearMap.range f).restrictScalars R
Full source
lemma range_restrictScalars [SMul R R₂] [Module R₂ M] [Module R M₂] [CompatibleSMul M M₂ R R₂]
    [IsScalarTower R R₂ M₂] (f : M →ₗ[R₂] M₂) :
  LinearMap.range (f.restrictScalars R) = (LinearMap.range f).restrictScalars R := rfl
Range Preservation under Scalar Restriction for Linear Maps
Informal description
Let $R$ and $R₂$ be semirings with a scalar multiplication action of $R$ on $R₂$, and let $M$ be an $R₂$-module and $M₂$ be an $R$-module such that the scalar multiplications are compatible and form a scalar tower. For any $R₂$-linear map $f \colon M \to M₂$, the range of $f$ viewed as an $R$-linear map (via restriction of scalars) equals the range of $f$ as an $R₂$-linear map, also viewed as an $R$-submodule.
LinearMap.iterateRange definition
(f : M →ₗ[R] M) : ℕ →o (Submodule R M)ᵒᵈ
Full source
/-- The decreasing sequence of submodules consisting of the ranges of the iterates of a linear map.
-/
@[simps]
def iterateRange (f : M →ₗ[R] M) : ℕ →o (Submodule R M)ᵒᵈ where
  toFun n := LinearMap.range (f ^ n)
  monotone' n m w x h := by
    obtain ⟨c, rfl⟩ := Nat.exists_eq_add_of_le  w
    rw [LinearMap.mem_range] at h
    obtain ⟨m, rfl⟩ := h
    rw [LinearMap.mem_range]
    use (f ^ c) m
    rw [pow_add, Module.End.mul_apply]
Decreasing sequence of ranges of iterates of a linear map
Informal description
Given an $R$-linear endomorphism $f \colon M \to M$ of an $R$-module $M$, the function $\text{iterateRange}(f)$ maps each natural number $n$ to the range submodule $\text{range}(f^n)$ of $M$, where $f^n$ denotes the $n$-fold composition of $f$ with itself. This function is antitone (order-reversing) with respect to the inclusion order on submodules, meaning that for $n \leq m$, we have $\text{range}(f^m) \subseteq \text{range}(f^n)$.
LinearMap.rangeRestrict abbrev
[RingHomSurjective τ₁₂] (f : M →ₛₗ[τ₁₂] M₂) : M →ₛₗ[τ₁₂] LinearMap.range f
Full source
/-- Restrict the codomain of a linear map `f` to `f.range`.

This is the bundled version of `Set.rangeFactorization`. -/
abbrev rangeRestrict [RingHomSurjective τ₁₂] (f : M →ₛₗ[τ₁₂] M₂) : M →ₛₗ[τ₁₂] LinearMap.range f :=
  f.codRestrict (LinearMap.range f) (LinearMap.mem_range_self f)
Range Restriction of a Semilinear Map
Informal description
Given a semilinear map $f \colon M \to M₂$ between modules over semirings $R$ and $R₂$ (with respect to a ring homomorphism $\tau_{12} \colon R \to R₂$), the range restriction of $f$ is the semilinear map from $M$ to the submodule $\text{range}(f) \subseteq M₂$ that sends each $x \in M$ to $f(x) \in \text{range}(f)$.
LinearMap.fintypeRange instance
[Fintype M] [DecidableEq M₂] [RingHomSurjective τ₁₂] (f : M →ₛₗ[τ₁₂] M₂) : Fintype (range f)
Full source
/-- The range of a linear map is finite if the domain is finite.
Note: this instance can form a diamond with `Subtype.fintype` in the
  presence of `Fintype M₂`. -/
instance fintypeRange [Fintype M] [DecidableEq M₂] [RingHomSurjective τ₁₂] (f : M →ₛₗ[τ₁₂] M₂) :
    Fintype (range f) :=
  Set.fintypeRange f
Finiteness of the Range of a Semilinear Map with Finite Domain
Informal description
For any semilinear map $f \colon M \to M₂$ between modules over semirings $R$ and $R₂$ (with respect to a ring homomorphism $\tau_{12} \colon R \to R₂$), if the domain $M$ is finite and $M₂$ has decidable equality, then the range of $f$ is finite.
LinearMap.range_codRestrict theorem
{τ₂₁ : R₂ →+* R} [RingHomSurjective τ₂₁] (p : Submodule R M) (f : M₂ →ₛₗ[τ₂₁] M) (hf) : range (codRestrict p f hf) = comap p.subtype (LinearMap.range f)
Full source
theorem range_codRestrict {τ₂₁ : R₂ →+* R} [RingHomSurjective τ₂₁] (p : Submodule R M)
    (f : M₂ →ₛₗ[τ₂₁] M) (hf) :
    range (codRestrict p f hf) = comap p.subtype (LinearMap.range f) := by
  simpa only [range_eq_map] using map_codRestrict _ _ _ _
Range of Codomain-Restricted Semilinear Map Equals Pullback of Original Range
Informal description
Let $R$ and $R₂$ be semirings, $M$ be an $R$-module, $M₂$ be an $R₂$-module, and $\tau_{21} : R₂ \to R$ be a surjective ring homomorphism. Given a submodule $p \subseteq M$ and a $\tau_{21}$-semilinear map $f : M₂ \to M$ such that $f(x) \in p$ for all $x \in M₂$, the range of the codomain-restricted map $\text{codRestrict } p \ f \ hf$ is equal to the pullback along the inclusion $p \hookrightarrow M$ of the range of $f$. In other words: \[ \text{range}(\text{codRestrict } p \ f \ hf) = \text{comap}(p.\text{subtype}, \text{range}(f)) \]
Submodule.map_comap_eq theorem
[RingHomSurjective τ₁₂] (f : F) (q : Submodule R₂ M₂) : map f (comap f q) = range f ⊓ q
Full source
theorem _root_.Submodule.map_comap_eq [RingHomSurjective τ₁₂] (f : F) (q : Submodule R₂ M₂) :
    map f (comap f q) = rangerange f ⊓ q :=
  le_antisymm (le_inf map_le_range (map_comap_le _ _)) <| by
    rintro _ ⟨⟨x, _, rfl⟩, hx⟩; exact ⟨x, hx, rfl⟩
Image-Preimage Equality for Submodules under Semilinear Maps: $f(f^{-1}(q)) = \mathrm{range}(f) \cap q$
Informal description
Let $R$ and $R_2$ be semirings with a surjective ring homomorphism $\tau_{12} \colon R \to R_2$, let $M$ be an $R$-module and $M_2$ an $R_2$-module, and let $f \colon M \to M_2$ be a $\tau_{12}$-semilinear map. For any submodule $q$ of $M_2$, the image of the preimage of $q$ under $f$ equals the intersection of the range of $f$ with $q$, i.e., \[ f(f^{-1}(q)) = \mathrm{range}(f) \cap q. \]
Submodule.map_comap_eq_self theorem
[RingHomSurjective τ₁₂] {f : F} {q : Submodule R₂ M₂} (h : q ≤ range f) : map f (comap f q) = q
Full source
theorem _root_.Submodule.map_comap_eq_self [RingHomSurjective τ₁₂] {f : F} {q : Submodule R₂ M₂}
    (h : q ≤ range f) : map f (comap f q) = q := by rwa [Submodule.map_comap_eq, inf_eq_right]
Image-Preimage Identity for Submodules Contained in Range: $f(f^{-1}(q)) = q$ when $q \subseteq \mathrm{range}(f)$
Informal description
Let $R$ and $R_2$ be semirings with a surjective ring homomorphism $\tau_{12} \colon R \to R_2$, let $M$ be an $R$-module and $M_2$ an $R_2$-module, and let $f \colon M \to M_2$ be a $\tau_{12}$-semilinear map. For any submodule $q$ of $M_2$ that is contained in the range of $f$, the image of the preimage of $q$ under $f$ equals $q$ itself, i.e., \[ f(f^{-1}(q)) = q. \]
LinearMap.range_zero theorem
[RingHomSurjective τ₁₂] : range (0 : M →ₛₗ[τ₁₂] M₂) = ⊥
Full source
@[simp]
theorem range_zero [RingHomSurjective τ₁₂] : range (0 : M →ₛₗ[τ₁₂] M₂) =  := by
  simpa only [range_eq_map] using Submodule.map_zero _
Range of Zero Semilinear Map is Zero Submodule
Informal description
For the zero semilinear map $0 \colon M \to M₂$ between modules over semirings $R$ and $R₂$ (with respect to a ring homomorphism $\tau_{12} \colon R \to R₂$), the range of $0$ is equal to the zero submodule $\{0\}$ of $M₂$.
LinearMap.range_le_bot_iff theorem
(f : M →ₛₗ[τ₁₂] M₂) : range f ≤ ⊥ ↔ f = 0
Full source
theorem range_le_bot_iff (f : M →ₛₗ[τ₁₂] M₂) : rangerange f ≤ ⊥ ↔ f = 0 := by
  rw [range_le_iff_comap]; exact ker_eq_top
Range Containment in Zero Submodule Characterizes Zero Map
Informal description
For a semilinear map $f \colon M \to M₂$ between modules over semirings $R$ and $R₂$ (with respect to a ring homomorphism $\tau_{12} \colon R \to R₂$), the range of $f$ is contained in the zero submodule $\{0\}$ of $M₂$ if and only if $f$ is the zero map. That is, \[ \mathrm{range}(f) \subseteq \{0\} \leftrightarrow f = 0. \]
LinearMap.range_eq_bot theorem
{f : M →ₛₗ[τ₁₂] M₂} : range f = ⊥ ↔ f = 0
Full source
theorem range_eq_bot {f : M →ₛₗ[τ₁₂] M₂} : rangerange f = ⊥ ↔ f = 0 := by
  rw [← range_le_bot_iff, le_bot_iff]
Characterization of Zero Map via Range: $\mathrm{range}(f) = \{0\} \leftrightarrow f = 0$
Informal description
For a semilinear map $f \colon M \to M₂$ between modules over semirings $R$ and $R₂$ (with respect to a ring homomorphism $\tau_{12} \colon R \to R₂$), the range of $f$ is equal to the zero submodule $\{0\}$ of $M₂$ if and only if $f$ is the zero map. That is, \[ \mathrm{range}(f) = \{0\} \leftrightarrow f = 0. \]
LinearMap.range_le_ker_iff theorem
{f : M →ₛₗ[τ₁₂] M₂} {g : M₂ →ₛₗ[τ₂₃] M₃} : range f ≤ ker g ↔ (g.comp f : M →ₛₗ[τ₁₃] M₃) = 0
Full source
theorem range_le_ker_iff {f : M →ₛₗ[τ₁₂] M₂} {g : M₂ →ₛₗ[τ₂₃] M₃} :
    rangerange f ≤ ker g ↔ (g.comp f : M →ₛₗ[τ₁₃] M₃) = 0 :=
  ⟨fun h => ker_eq_top.1 <| eq_top_iff'.2 fun _ => h <| ⟨_, rfl⟩, fun h x hx =>
    mem_ker.2 <| Exists.elim hx fun y hy => by rw [← hy, ← comp_apply, h, zero_apply]⟩
Range-Kernel Containment Criterion for Semilinear Maps
Informal description
For semilinear maps $f \colon M \to_{\tau_{12}} M_2$ and $g \colon M_2 \to_{\tau_{23}} M_3$, the range of $f$ is contained in the kernel of $g$ if and only if the composition $g \circ f$ is the zero map. That is: \[ \text{range}(f) \subseteq \ker(g) \iff g \circ f = 0 \]
LinearMap.comap_le_comap_iff theorem
{f : F} (hf : range f = ⊤) {p p'} : comap f p ≤ comap f p' ↔ p ≤ p'
Full source
theorem comap_le_comap_iff {f : F} (hf : range f = ) {p p'} : comapcomap f p ≤ comap f p' ↔ p ≤ p' :=
  ⟨fun H ↦ by rwa [SetLike.le_def, (range_eq_top.1 hf).forall], comap_mono⟩
Submodule Pullback Order Preservation under Surjective Semilinear Maps
Informal description
Let $f : M \to M₂$ be a surjective semilinear map between modules over semirings $R$ and $R₂$ (with ring homomorphism $\tau_{12} : R \to R₂$), and let $p, p'$ be submodules of $M₂$. Then the pullback submodule $\text{comap } f \ p$ is contained in $\text{comap } f \ p'$ if and only if $p$ is contained in $p'$. That is: \[ \text{comap } f \ p \subseteq \text{comap } f \ p' \leftrightarrow p \subseteq p' \]
LinearMap.comap_injective theorem
{f : F} (hf : range f = ⊤) : Injective (comap f)
Full source
theorem comap_injective {f : F} (hf : range f = ) : Injective (comap f) := fun _ _ h =>
  le_antisymm ((comap_le_comap_iff hf).1 (le_of_eq h)) ((comap_le_comap_iff hf).1 (ge_of_eq h))
Injectivity of Submodule Pullback under Surjective Semilinear Maps
Informal description
Let $f : M \to M₂$ be a surjective semilinear map between modules over semirings $R$ and $R₂$ (with ring homomorphism $\tau_{12} : R \to R₂$). Then the pullback operation $\text{comap } f$ is injective on submodules of $M₂$, meaning that for any submodules $p, p' \subseteq M₂$, if $\text{comap } f \ p = \text{comap } f \ p'$, then $p = p'$.
LinearMap.ker_eq_range_of_comp_eq_id theorem
{M P} [AddCommGroup M] [Module R M] [AddCommGroup P] [Module R P] {f : M →ₗ[R] P} {g : P →ₗ[R] M} (h : f ∘ₗ g = .id) : ker f = range (LinearMap.id - g ∘ₗ f)
Full source
theorem ker_eq_range_of_comp_eq_id {M P} [AddCommGroup M] [Module R M]
    [AddCommGroup P] [Module R P] {f : M →ₗ[R] P} {g : P →ₗ[R] M} (h : f ∘ₗ g = .id) :
    ker f = range (LinearMap.id - g ∘ₗ f) :=
  le_antisymm (fun x hx ↦ ⟨x, show x - g (f x) = x by rw [hx, map_zero, sub_zero]⟩) <|
    range_le_ker_iff.mpr <| by rw [comp_sub, comp_id, ← comp_assoc, h, id_comp, sub_self]
Kernel-Range Decomposition for Linear Maps with Right Inverse
Informal description
Let $M$ and $P$ be modules over a ring $R$, where both $M$ and $P$ are additive commutative groups. Given linear maps $f \colon M \to P$ and $g \colon P \to M$ such that their composition $f \circ g$ equals the identity map on $P$, then the kernel of $f$ is equal to the range of the linear map $\text{id}_M - g \circ f$ from $M$ to itself.
LinearMap.range_toAddSubgroup theorem
[RingHomSurjective τ₁₂] (f : M →ₛₗ[τ₁₂] M₂) : (range f).toAddSubgroup = f.toAddMonoidHom.range
Full source
theorem range_toAddSubgroup [RingHomSurjective τ₁₂] (f : M →ₛₗ[τ₁₂] M₂) :
    (range f).toAddSubgroup = f.toAddMonoidHom.range :=
  rfl
Equality of Additive Subgroup Ranges for Semilinear Maps
Informal description
Let $M$ and $M₂$ be modules over semirings $R$ and $R₂$ respectively, with a ring homomorphism $\tau_{12} \colon R \to R₂$. For any $\tau_{12}$-semilinear map $f \colon M \to M₂$, the additive subgroup associated with the range of $f$ (as a submodule) is equal to the range of $f$ when viewed as an additive monoid homomorphism. In other words, $( \text{range } f ).\text{toAddSubgroup} = f.\text{toAddMonoidHom}.\text{range}$.
LinearMap.ker_le_iff theorem
[RingHomSurjective τ₁₂] {p : Submodule R M} : ker f ≤ p ↔ ∃ y ∈ range f, f ⁻¹' { y } ⊆ p
Full source
theorem ker_le_iff [RingHomSurjective τ₁₂] {p : Submodule R M} :
    kerker f ≤ p ↔ ∃ y ∈ range f, f ⁻¹' {y} ⊆ p := by
  constructor
  · intro h
    use 0
    rw [← SetLike.mem_coe, range_coe]
    exact ⟨⟨0, map_zero f⟩, h⟩
  · rintro ⟨y, h₁, h₂⟩
    rw [SetLike.le_def]
    intro z hz
    simp only [mem_ker, SetLike.mem_coe] at hz
    rw [← SetLike.mem_coe, range_coe, Set.mem_range] at h₁
    obtain ⟨x, hx⟩ := h₁
    have hx' : x ∈ p := h₂ hx
    have hxz : z + x ∈ p := by
      apply h₂
      simp [hx, hz]
    suffices z + x - x ∈ p by simpa only [this, add_sub_cancel_right]
    exact p.sub_mem hxz hx'
Kernel Containment Criterion via Range and Preimage
Informal description
Let $f : M \to M₂$ be a semilinear map between modules over semirings $R$ and $R₂$ (with ring homomorphism $\tau_{12} : R \to R₂$), and let $p$ be a submodule of $M$. The kernel of $f$ is contained in $p$ if and only if there exists an element $y$ in the range of $f$ such that the preimage of the singleton set $\{y\}$ under $f$ is contained in $p$.
LinearMap.range_smul theorem
(f : V →ₗ[K] V₂) (a : K) (h : a ≠ 0) : range (a • f) = range f
Full source
theorem range_smul (f : V →ₗ[K] V₂) (a : K) (h : a ≠ 0) : range (a • f) = range f := by
  simpa only [range_eq_map] using Submodule.map_smul f _ a h
Range Invariance under Nonzero Scalar Multiplication of Linear Maps
Informal description
Let $V$ and $V₂$ be vector spaces over a field $K$, and let $f : V \to V₂$ be a linear map. For any nonzero scalar $a \in K$, the range of the scaled linear map $a \cdot f$ is equal to the range of $f$, i.e., \[ \text{range}(a \cdot f) = \text{range}(f). \]
LinearMap.range_smul' theorem
(f : V →ₗ[K] V₂) (a : K) : range (a • f) = ⨆ _ : a ≠ 0, range f
Full source
theorem range_smul' (f : V →ₗ[K] V₂) (a : K) :
    range (a • f) = ⨆ _ : a ≠ 0, range f := by
  simpa only [range_eq_map] using Submodule.map_smul' f _ a
Range of Scaled Linear Map as Supremum over Nonzero Condition
Informal description
Let $V$ and $V₂$ be vector spaces over a field $K$, and let $f : V \to V₂$ be a linear map. For any scalar $a \in K$, the range of the scaled linear map $a \cdot f$ is equal to the supremum of the range of $f$ over all proofs that $a \neq 0$. That is, \[ \text{range}(a \cdot f) = \bigsqcup_{h : a \neq 0} \text{range}(f). \]
Submodule.map_top theorem
[RingHomSurjective τ₁₂] (f : F) : map f ⊤ = range f
Full source
@[simp]
theorem map_top [RingHomSurjective τ₁₂] (f : F) : map f  = range f :=
  (range_eq_map f).symm
Image of Universal Submodule Equals Range of Semilinear Map
Informal description
For any semilinear map $f \colon M \to M₂$ between modules over semirings $R$ and $R₂$ (with a ring homomorphism $\tau_{12} \colon R \to R₂$), the image of the universal submodule $\top \subseteq M$ under $f$ is equal to the range of $f$. That is, \[ f(\top) = \text{range}(f). \]
Submodule.range_subtype theorem
: range p.subtype = p
Full source
@[simp]
theorem range_subtype : range p.subtype = p := by simpa using map_comap_subtype p 
Range of Submodule Inclusion Equals Submodule Itself
Informal description
For any submodule $p$ of a module $M$ over a semiring $R$, the range of the inclusion map $\iota \colon p \hookrightarrow M$ is equal to $p$ itself. That is, \[ \text{range}(\iota) = p. \]
Submodule.map_subtype_le theorem
(p' : Submodule R p) : map p.subtype p' ≤ p
Full source
theorem map_subtype_le (p' : Submodule R p) : map p.subtype p' ≤ p := by
  simpa using (map_le_range : map p.subtype p' ≤ range p.subtype)
Image of Submodule Under Inclusion is Contained in Ambient Submodule
Informal description
For any submodule $p'$ of a submodule $p$ of an $R$-module $M$, the image of $p'$ under the inclusion map $\iota \colon p \hookrightarrow M$ is contained in $p$, i.e., \[ \iota(p') \subseteq p. \]
Submodule.map_subtype_top theorem
: map p.subtype (⊤ : Submodule R p) = p
Full source
/-- Under the canonical linear map from a submodule `p` to the ambient space `M`, the image of the
maximal submodule of `p` is just `p`. -/
theorem map_subtype_top : map p.subtype ( : Submodule R p) = p := by simp
Image of Universal Submodule under Inclusion Equals Submodule Itself
Informal description
For any submodule $p$ of a module $M$ over a semiring $R$, the image of the universal submodule $\top \subseteq p$ under the inclusion map $\iota \colon p \hookrightarrow M$ is equal to $p$ itself. That is, \[ \iota(\top) = p. \]
Submodule.comap_subtype_eq_top theorem
{p p' : Submodule R M} : comap p.subtype p' = ⊤ ↔ p ≤ p'
Full source
@[simp]
theorem comap_subtype_eq_top {p p' : Submodule R M} : comapcomap p.subtype p' = ⊤ ↔ p ≤ p' :=
  eq_top_iff.trans <| map_le_iff_le_comap.symm.trans <| by rw [map_subtype_top]
Pullback of Submodule under Inclusion Equals Entire Submodule iff Submodule is Contained
Informal description
For any submodules $p$ and $p'$ of an $R$-module $M$, the pullback of $p'$ under the inclusion map $\iota \colon p \hookrightarrow M$ equals the entire submodule $p$ (i.e., $\iota^{-1}(p') = p$) if and only if $p$ is contained in $p'$.
Submodule.comap_subtype_self theorem
: comap p.subtype p = ⊤
Full source
@[simp]
theorem comap_subtype_self : comap p.subtype p =  :=
  comap_subtype_eq_top.2 le_rfl
Pullback of Submodule Under Inclusion Equals Itself
Informal description
For any submodule $p$ of a module $M$ over a semiring $R$, the pullback of $p$ under the inclusion map $\iota \colon p \hookrightarrow M$ equals the entire submodule $p$ (i.e., $\iota^{-1}(p) = p$).
Submodule.comap_subtype_le_iff theorem
{p q r : Submodule R M} : q.comap p.subtype ≤ r.comap p.subtype ↔ p ⊓ q ≤ p ⊓ r
Full source
@[simp]
lemma comap_subtype_le_iff {p q r : Submodule R M} :
    q.comap p.subtype ≤ r.comap p.subtype ↔ p ⊓ q ≤ p ⊓ r :=
  ⟨fun h ↦ by simpa using map_mono (f := p.subtype) h,
   fun h ↦ by simpa using comap_mono (f := p.subtype) h⟩
Pullback Containment Criterion via Intersections: $\iota^{-1}(q) \subseteq \iota^{-1}(r) \iff p \cap q \subseteq p \cap r$
Informal description
For submodules $p, q, r$ of an $R$-module $M$, the pullback of $q$ under the inclusion map $\iota \colon p \hookrightarrow M$ is contained in the pullback of $r$ under $\iota$ if and only if the intersection of $p$ with $q$ is contained in the intersection of $p$ with $r$. In other words: \[ \iota^{-1}(q) \subseteq \iota^{-1}(r) \iff p \cap q \subseteq p \cap r \] where $\iota^{-1}(q) = \{x \in p \mid x \in q\}$ denotes the pullback submodule.
Submodule.range_inclusion theorem
(p q : Submodule R M) (h : p ≤ q) : range (inclusion h) = comap q.subtype p
Full source
theorem range_inclusion (p q : Submodule R M) (h : p ≤ q) :
    range (inclusion h) = comap q.subtype p := by
  rw [← map_top, inclusion, LinearMap.map_codRestrict, map_top, range_subtype]
Range of Submodule Inclusion Equals Pullback Along Ambient Inclusion
Informal description
Let $R$ be a semiring and $M$ an $R$-module. For any submodules $p \subseteq q$ of $M$, the range of the inclusion map $\iota \colon p \hookrightarrow q$ equals the pullback of $p$ along the submodule inclusion $q \hookrightarrow M$. In other words: \[ \text{range}(\iota) = \{x \in q \mid x \in p\} \] where $\iota$ is the linear map sending each $x \in p$ to itself (viewed as an element of $q$).
Submodule.map_subtype_range_inclusion theorem
{p p' : Submodule R M} (h : p ≤ p') : map p'.subtype (range <| inclusion h) = p
Full source
@[simp]
theorem map_subtype_range_inclusion {p p' : Submodule R M} (h : p ≤ p') :
    map p'.subtype (range <| inclusion h) = p := by simp [range_inclusion, map_comap_eq, h]
Image of Inclusion Range Equals Original Submodule: $\iota'(\text{range}(\iota)) = p$
Informal description
Let $R$ be a semiring and $M$ an $R$-module. For any submodules $p \subseteq p'$ of $M$, the image of the range of the inclusion map $\iota \colon p \hookrightarrow p'$ under the submodule inclusion $p' \hookrightarrow M$ equals $p$. In other words: \[ \iota'( \text{range}(\iota) ) = p \] where $\iota \colon p \hookrightarrow p'$ is the inclusion map and $\iota' \colon p' \hookrightarrow M$ is the submodule inclusion.
Submodule.restrictScalars_map theorem
[SMul R R₂] [Module R₂ M] [Module R M₂] [IsScalarTower R R₂ M] [IsScalarTower R R₂ M₂] (f : M →ₗ[R₂] M₂) (M' : Submodule R₂ M) : (M'.map f).restrictScalars R = (M'.restrictScalars R).map (f.restrictScalars R)
Full source
lemma restrictScalars_map [SMul R R₂] [Module R₂ M] [Module R M₂] [IsScalarTower R R₂ M]
    [IsScalarTower R R₂ M₂] (f : M →ₗ[R₂] M₂) (M' : Submodule R₂ M) :
  (M'.map f).restrictScalars R = (M'.restrictScalars R).map (f.restrictScalars R) := rfl
Compatibility of Submodule Pushforward with Scalar Restriction: $f(M')|_R = f|_R(M'|_R)$
Informal description
Let $R$ and $R₂$ be semirings with a scalar multiplication action of $R$ on $R₂$, and let $M$ be an $R₂$-module and $M₂$ be an $R$-module, both equipped with compatible scalar tower structures. For any $R₂$-linear map $f \colon M \to M₂$ and any submodule $M'$ of $M$ over $R₂$, the following equality holds: $$(f(M'))_{\text{restrict } R} = (f_{\text{restrict } R})(M'_{\text{restrict } R})$$ where the subscript "restrict $R$" denotes the restriction of scalars from $R₂$ to $R$.
Submodule.MapSubtype.relIso definition
: Submodule R p ≃o { p' : Submodule R M // p' ≤ p }
Full source
/-- If `N ⊆ M` then submodules of `N` are the same as submodules of `M` contained in `N`.

See also `Submodule.mapIic`. -/
def MapSubtype.relIso : SubmoduleSubmodule R p ≃o { p' : Submodule R M // p' ≤ p } where
  toFun p' := ⟨map p.subtype p', map_subtype_le p _⟩
  invFun q := comap p.subtype q
  left_inv p' := comap_map_eq_of_injective (by exact Subtype.val_injective) p'
  right_inv := fun ⟨q, hq⟩ => Subtype.ext_val <| by simp [map_comap_subtype p, inf_of_le_right hq]
  map_rel_iff' {p₁ p₂} := Subtype.coe_le_coe.symm.trans <| by
    dsimp
    rw [map_le_iff_le_comap,
      comap_map_eq_of_injective (show Injective p.subtype from Subtype.coe_injective) p₂]
Order isomorphism between submodules of a submodule and submodules contained in it
Informal description
The order isomorphism between the lattice of submodules of a submodule $p$ of an $R$-module $M$ and the lattice of submodules of $M$ that are contained in $p$. Specifically, the isomorphism consists of: - The forward map sends a submodule $p'$ of $p$ to its image under the inclusion map $p \hookrightarrow M$ - The inverse map sends a submodule $q$ of $M$ (with $q \subseteq p$) to its preimage under the inclusion map This establishes an order-preserving bijection between: $$ \{\text{submodules of } p\} \simeq \{\text{submodules of } M \text{ contained in } p\} $$ where both sets are ordered by inclusion.
Submodule.MapSubtype.orderEmbedding definition
: Submodule R p ↪o Submodule R M
Full source
/-- If `p ⊆ M` is a submodule, the ordering of submodules of `p` is embedded in the ordering of
submodules of `M`. -/
def MapSubtype.orderEmbedding : SubmoduleSubmodule R p ↪o Submodule R M :=
  (RelIso.toRelEmbedding <| MapSubtype.relIso p).trans <|
    Subtype.relEmbedding (X := Submodule R M) (fun p p' ↦ p ≤ p') _
Order embedding of submodules of a submodule into the full module
Informal description
The order embedding that maps submodules of a submodule $p$ of an $R$-module $M$ to submodules of $M$ contained in $p$, preserving the inclusion order. Specifically, this is the composition of: 1. The order isomorphism between submodules of $p$ and submodules of $M$ contained in $p$ 2. The natural embedding of the subtype $\{p' \in \text{Submodule } R M \mid p' \leq p\}$ into $\text{Submodule } R M$ This embedding preserves the lattice structure of submodules, meaning for any submodules $p_1, p_2$ of $p$, we have $p_1 \subseteq p_2$ if and only if their images under this embedding satisfy the same inclusion in $M$.
Submodule.map_subtype_embedding_eq theorem
(p' : Submodule R p) : MapSubtype.orderEmbedding p p' = map p.subtype p'
Full source
@[simp]
theorem map_subtype_embedding_eq (p' : Submodule R p) :
    MapSubtype.orderEmbedding p p' = map p.subtype p' :=
  rfl
Equality of Submodule Embedding and Subtype Map
Informal description
For any submodule $p'$ of a submodule $p$ of an $R$-module $M$, the image of $p'$ under the order embedding $\text{MapSubtype.orderEmbedding}$ is equal to the image of $p'$ under the linear map $p.\text{subtype}$, i.e., $$\text{MapSubtype.orderEmbedding}(p, p') = \text{map}(p.\text{subtype}, p').$$
Submodule.mapIic definition
(p : Submodule R M) : Submodule R p ≃o Set.Iic p
Full source
/-- If `N ⊆ M` then submodules of `N` are the same as submodules of `M` contained in `N`. -/
def mapIic (p : Submodule R M) :
    SubmoduleSubmodule R p ≃o Set.Iic p :=
  Submodule.MapSubtype.relIso p
Order isomorphism between submodules of a submodule and submodules contained in it
Informal description
The order isomorphism between the lattice of submodules of a submodule $p$ of an $R$-module $M$ and the lattice of submodules of $M$ that are contained in $p$. Specifically, the isomorphism consists of: - The forward map sends a submodule $p'$ of $p$ to its image under the inclusion map $p \hookrightarrow M$ - The inverse map sends a submodule $q$ of $M$ (with $q \subseteq p$) to its preimage under the inclusion map This establishes an order-preserving bijection between: $$ \{\text{submodules of } p\} \simeq \{\text{submodules of } M \text{ contained in } p\} $$ where both sets are ordered by inclusion.
Submodule.coe_mapIic_apply theorem
(p : Submodule R M) (q : Submodule R p) : (p.mapIic q : Submodule R M) = q.map p.subtype
Full source
@[simp] lemma coe_mapIic_apply
    (p : Submodule R M) (q : Submodule R p) :
    (p.mapIic q : Submodule R M) = q.map p.subtype :=
  rfl
Image of Submodule under Order Isomorphism Equals Pushforward via Inclusion
Informal description
For any submodule $p$ of an $R$-module $M$ and any submodule $q$ of $p$, the image of $q$ under the order isomorphism `mapIic` (viewed as a submodule of $M$) equals the image of $q$ under the canonical inclusion map $p \hookrightarrow M$. In other words, the following diagram commutes: \[ (q : \text{Submodule } R\, p) \xrightarrow{\text{mapIic}} (q : \text{Submodule } R\, M) = q \xrightarrow{\text{map } p.\text{subtype}} \text{Submodule } R\, M \]
LinearMap.ker_eq_bot_of_cancel theorem
{f : M →ₛₗ[τ₁₂] M₂} (h : ∀ u v : ker f →ₗ[R] M, f.comp u = f.comp v → u = v) : ker f = ⊥
Full source
/-- A monomorphism is injective. -/
theorem ker_eq_bot_of_cancel {f : M →ₛₗ[τ₁₂] M₂}
    (h : ∀ u v : kerker f →ₗ[R] M, f.comp u = f.comp v → u = v) : ker f =  := by
  have h₁ : f.comp (0 : kerker f →ₗ[R] M) = 0 := comp_zero _
  rw [← Submodule.range_subtype (ker f),
    ← h 0 (ker f).subtype (Eq.trans h₁ (comp_ker_subtype f).symm)]
  exact range_zero
Trivial Kernel from Cancellation Property of Semilinear Maps
Informal description
Let $f \colon M \to M₂$ be a semilinear map between modules over semirings $R$ and $R₂$ with respect to a ring homomorphism $\tau_{12} \colon R \to R₂$. If for any two linear maps $u, v \colon \ker f \to M$, the equality $f \circ u = f \circ v$ implies $u = v$, then the kernel of $f$ is trivial, i.e., $\ker f = \{0\}$.
LinearMap.range_comp_of_range_eq_top theorem
[RingHomSurjective τ₁₂] [RingHomSurjective τ₂₃] [RingHomSurjective τ₁₃] {f : M →ₛₗ[τ₁₂] M₂} (g : M₂ →ₛₗ[τ₂₃] M₃) (hf : range f = ⊤) : range (g.comp f : M →ₛₗ[τ₁₃] M₃) = range g
Full source
theorem range_comp_of_range_eq_top [RingHomSurjective τ₁₂] [RingHomSurjective τ₂₃]
    [RingHomSurjective τ₁₃] {f : M →ₛₗ[τ₁₂] M₂} (g : M₂ →ₛₗ[τ₂₃] M₃) (hf : range f = ) :
    range (g.comp f : M →ₛₗ[τ₁₃] M₃) = range g := by rw [range_comp, hf, Submodule.map_top]
Range of Composition Equals Range When First Map is Surjective
Informal description
Let $R$, $S$, and $T$ be semirings with surjective ring homomorphisms $\tau_{12} \colon R \to S$, $\tau_{23} \colon S \to T$, and $\tau_{13} = \tau_{23} \circ \tau_{12}$. Given semilinear maps $f \colon M \to_{\tau_{12}} M_2$ with $\mathrm{range}(f) = M_2$ and $g \colon M_2 \to_{\tau_{23}} M_3$, the range of their composition equals the range of $g$, i.e., \[ \mathrm{range}(g \circ f) = \mathrm{range}(g). \]
LinearMap.submoduleImage definition
{M' : Type*} [AddCommMonoid M'] [Module R M'] {O : Submodule R M} (ϕ : O →ₗ[R] M') (N : Submodule R M) : Submodule R M'
Full source
/-- If `O` is a submodule of `M`, and `Φ : O →ₗ M'` is a linear map,
then `(ϕ : O →ₗ M').submoduleImage N` is `ϕ(N)` as a submodule of `M'` -/
def submoduleImage {M' : Type*} [AddCommMonoid M'] [Module R M'] {O : Submodule R M}
    (ϕ : O →ₗ[R] M') (N : Submodule R M) : Submodule R M' :=
  (N.comap O.subtype).map ϕ
Image of a submodule under a linear map
Informal description
Given a submodule $O$ of a module $M$ over a semiring $R$, a linear map $\phi \colon O \to M'$ to another module $M'$ over $R$, and a submodule $N$ of $M$, the submodule image $\phi(N)$ is defined as the image of $N \cap O$ under $\phi$, viewed as a submodule of $M'$. More precisely, $\phi(N)$ consists of all elements $x \in M'$ such that there exists $y \in N \cap O$ with $\phi(y) = x$.
LinearMap.mem_submoduleImage theorem
{M' : Type*} [AddCommMonoid M'] [Module R M'] {O : Submodule R M} {ϕ : O →ₗ[R] M'} {N : Submodule R M} {x : M'} : x ∈ ϕ.submoduleImage N ↔ ∃ (y : _) (yO : y ∈ O), y ∈ N ∧ ϕ ⟨y, yO⟩ = x
Full source
@[simp]
theorem mem_submoduleImage {M' : Type*} [AddCommMonoid M'] [Module R M'] {O : Submodule R M}
    {ϕ : O →ₗ[R] M'} {N : Submodule R M} {x : M'} :
    x ∈ ϕ.submoduleImage Nx ∈ ϕ.submoduleImage N ↔ ∃ (y : _) (yO : y ∈ O), y ∈ N ∧ ϕ ⟨y, yO⟩ = x := by
  refine Submodule.mem_map.trans ⟨?_, ?_⟩ <;> simp_rw [Submodule.mem_comap]
  · rintro ⟨⟨y, yO⟩, yN : y ∈ N, h⟩
    exact ⟨y, yO, yN, h⟩
  · rintro ⟨y, yO, yN, h⟩
    exact ⟨⟨y, yO⟩, yN, h⟩
Characterization of elements in the image of a submodule under a linear map
Informal description
Let $M$ and $M'$ be modules over a semiring $R$, $O$ be a submodule of $M$, $\phi \colon O \to M'$ be a linear map, and $N$ be a submodule of $M$. For any $x \in M'$, we have $x \in \phi(N)$ if and only if there exists $y \in O$ such that $y \in N$ and $\phi(y) = x$. Here, $\phi(N)$ denotes the image of $N \cap O$ under $\phi$, which forms a submodule of $M'$.
LinearMap.mem_submoduleImage_of_le theorem
{M' : Type*} [AddCommMonoid M'] [Module R M'] {O : Submodule R M} {ϕ : O →ₗ[R] M'} {N : Submodule R M} (hNO : N ≤ O) {x : M'} : x ∈ ϕ.submoduleImage N ↔ ∃ (y : _) (yN : y ∈ N), ϕ ⟨y, hNO yN⟩ = x
Full source
theorem mem_submoduleImage_of_le {M' : Type*} [AddCommMonoid M'] [Module R M'] {O : Submodule R M}
    {ϕ : O →ₗ[R] M'} {N : Submodule R M} (hNO : N ≤ O) {x : M'} :
    x ∈ ϕ.submoduleImage Nx ∈ ϕ.submoduleImage N ↔ ∃ (y : _) (yN : y ∈ N), ϕ ⟨y, hNO yN⟩ = x := by
  refine mem_submoduleImage.trans ⟨?_, ?_⟩
  · rintro ⟨y, yO, yN, h⟩
    exact ⟨y, yN, h⟩
  · rintro ⟨y, yN, h⟩
    exact ⟨y, hNO yN, yN, h⟩
Characterization of elements in the image of a submodule under a linear map when $N \subseteq O$
Informal description
Let $M$ and $M'$ be modules over a semiring $R$, $O$ be a submodule of $M$, $\phi \colon O \to M'$ be a linear map, and $N$ be a submodule of $M$ such that $N \subseteq O$. For any $x \in M'$, we have $x \in \phi(N)$ if and only if there exists $y \in N$ such that $\phi(y) = x$. Here, $\phi(N)$ denotes the image of $N$ under $\phi$, which forms a submodule of $M'$.
LinearMap.submoduleImage_apply_of_le theorem
{M' : Type*} [AddCommMonoid M'] [Module R M'] {O : Submodule R M} (ϕ : O →ₗ[R] M') (N : Submodule R M) (hNO : N ≤ O) : ϕ.submoduleImage N = range (ϕ.comp (Submodule.inclusion hNO))
Full source
theorem submoduleImage_apply_of_le {M' : Type*} [AddCommMonoid M'] [Module R M']
    {O : Submodule R M} (ϕ : O →ₗ[R] M') (N : Submodule R M) (hNO : N ≤ O) :
    ϕ.submoduleImage N = range (ϕ.comp (Submodule.inclusion hNO)) := by
  rw [submoduleImage, range_comp, Submodule.range_inclusion]
Image of Submodule under Linear Map Equals Range of Composition with Inclusion
Informal description
Let $M$ and $M'$ be modules over a semiring $R$, $O$ be a submodule of $M$, $\phi \colon O \to M'$ be a linear map, and $N$ be a submodule of $M$ such that $N \subseteq O$. Then the image of $N$ under $\phi$ equals the range of the composition $\phi \circ \iota$, where $\iota \colon N \hookrightarrow O$ is the inclusion map. In other words: \[ \phi(N) = \mathrm{range}(\phi \circ \iota) \]
LinearMap.range_rangeRestrict theorem
: range f.rangeRestrict = ⊤
Full source
@[simp] theorem range_rangeRestrict : range f.rangeRestrict =  := by simp [f.range_codRestrict _]
Range-Restricted Map is Surjective onto Its Range
Informal description
For any semilinear map $f \colon M \to M₂$ between modules, the range of the range-restricted map $f_{\text{rangeRestrict}} \colon M \to \text{range}(f)$ is the entire submodule $\text{range}(f)$. In other words, the map $f_{\text{rangeRestrict}}$ is surjective onto its range.
LinearMap.surjective_rangeRestrict theorem
: Surjective f.rangeRestrict
Full source
theorem surjective_rangeRestrict : Surjective f.rangeRestrict := by
  rw [← range_eq_top, range_rangeRestrict]
Surjectivity of Range-Restricted Semilinear Map
Informal description
For any semilinear map $f \colon M \to M₂$ between modules, the range-restricted map $f_{\text{rangeRestrict}} \colon M \to \text{range}(f)$ is surjective.
LinearMap.ker_rangeRestrict theorem
: ker f.rangeRestrict = ker f
Full source
@[simp] theorem ker_rangeRestrict : ker f.rangeRestrict = ker f := LinearMap.ker_codRestrict _ _ _
Kernel Equality for Range-Restricted Semilinear Map
Informal description
For any semilinear map $f \colon M \to M₂$ between modules, the kernel of the range-restricted map $f_{\text{rangeRestrict}} \colon M \to \text{range}(f)$ is equal to the kernel of $f$. That is, $$\ker(f_{\text{rangeRestrict}}) = \ker f.$$
LinearMap.injective_rangeRestrict_iff theorem
: Injective f.rangeRestrict ↔ Injective f
Full source
@[simp] theorem injective_rangeRestrict_iff : InjectiveInjective f.rangeRestrict ↔ Injective f :=
  Set.injective_codRestrict _
Injectivity of Range-Restricted Semilinear Map $\leftrightarrow$ Injectivity of Original Map
Informal description
Let $f \colon M \to M₂$ be a semilinear map between modules. The range-restricted map $f_{\text{range}} \colon M \to \text{range}(f)$ is injective if and only if $f$ is injective.