File: Mathlib/Algebra/Module/Submodule/Basic.lean

full_name: Submodule
code: /-- A submodule of a module is one which is closed under vector operations.
  This is a sufficient condition for the subset of vectors in the submodule
  to themselves form a module. -/
structure Submodule (R : Type u) (M : Type v) [Semiring R] [AddCommMonoid M] [Module R M] extends
  AddSubmonoid M, SubMulAction R M : Type v
goal: Type v

full_name: Submodule.setLike
code: instance setLike : SetLike (Submodule R M) M 
goal: SetLike (Submodule R M) M

full_name: Submodule.addSubmonoidClass
code: instance addSubmonoidClass : AddSubmonoidClass (Submodule R M) M 
goal: AddSubmonoidClass (Submodule R M) M

full_name: Submodule.smulMemClass
code: instance smulMemClass : SMulMemClass (Submodule R M) R M 
goal: SMulMemClass (Submodule R M) R M

full_name: Submodule.mem_toAddSubmonoid
code: @[simp]
theorem mem_toAddSubmonoid (p : Submodule R M) (x : M) : x ∈ p.toAddSubmonoid ↔ x ∈ p 
goal: x ∈ p.toAddSubmonoid ↔ x ∈ p

full_name: Submodule.mem_mk
code: @[simp]
theorem mem_mk {S : AddSubmonoid M} {x : M} (h) : x ∈ (⟨S, h⟩ : Submodule R M) ↔ x ∈ S 
goal: x ∈ { toAddSubmonoid := S, smul_mem' := h } ↔ x ∈ S

full_name: Submodule.coe_set_mk
code: @[simp]
theorem coe_set_mk (S : AddSubmonoid M) (h) : ((⟨S, h⟩ : Submodule R M) : Set M) = S 
goal: ↑{ toAddSubmonoid := S, smul_mem' := h } = ↑S

full_name: Submodule.eta
code: @[simp] theorem eta (h) : ({p with smul_mem' := h} : Submodule R M) = p 
goal: { toAddSubmonoid := p.toAddSubmonoid, smul_mem' := h } = p

full_name: Submodule.mk_le_mk
code: @[simp]
theorem mk_le_mk {S S' : AddSubmonoid M} (h h') :
    (⟨S, h⟩ : Submodule R M) ≤ (⟨S', h'⟩ : Submodule R M) ↔ S ≤ S' 
goal: { toAddSubmonoid := S, smul_mem' := h } ≤ { toAddSubmonoid := S', smul_mem' := h' } ↔ S ≤ S'

full_name: Submodule.ext
code: @[ext]
theorem ext (h : ∀ x, x ∈ p ↔ x ∈ q) : p = q 
goal: p = q

full_name: Submodule.carrier_inj
code: @[simp]
theorem carrier_inj : p.carrier = q.carrier ↔ p = q 
goal: p.carrier = q.carrier ↔ p = q

full_name: Submodule.copy
code: /-- Copy of a submodule with a new `carrier` equal to the old one. Useful to fix definitional
equalities. -/
protected def copy (p : Submodule R M) (s : Set M) (hs : s = ↑p) : Submodule R M 
goal: Submodule R M

full_name: Submodule.coe_copy
code: @[simp]
theorem coe_copy (S : Submodule R M) (s : Set M) (hs : s = ↑S) : (S.copy s hs : Set M) = s 
goal: ↑(S.copy s hs) = s

full_name: Submodule.copy_eq
code: theorem copy_eq (S : Submodule R M) (s : Set M) (hs : s = ↑S) : S.copy s hs = S 
goal: S.copy s hs = S

full_name: Submodule.toAddSubmonoid_injective
code: theorem toAddSubmonoid_injective : Injective (toAddSubmonoid : Submodule R M → AddSubmonoid M) 
goal: Function.Injective Submodule.toAddSubmonoid

full_name: Submodule.toAddSubmonoid_eq
code: @[simp]
theorem toAddSubmonoid_eq : p.toAddSubmonoid = q.toAddSubmonoid ↔ p = q 
goal: p.toAddSubmonoid = q.toAddSubmonoid ↔ p = q

full_name: Submodule.toAddSubmonoid_strictMono
code: @[mono]
theorem toAddSubmonoid_strictMono : StrictMono (toAddSubmonoid : Submodule R M → AddSubmonoid M) 
goal: StrictMono Submodule.toAddSubmonoid

full_name: Submodule.toAddSubmonoid_le
code: theorem toAddSubmonoid_le : p.toAddSubmonoid ≤ q.toAddSubmonoid ↔ p ≤ q 
goal: p.toAddSubmonoid ≤ q.toAddSubmonoid ↔ p ≤ q

full_name: Submodule.toAddSubmonoid_mono
code: @[mono]
theorem toAddSubmonoid_mono : Monotone (toAddSubmonoid : Submodule R M → AddSubmonoid M) 
goal: Monotone Submodule.toAddSubmonoid

full_name: Submodule.coe_toAddSubmonoid
code: @[simp]
theorem coe_toAddSubmonoid (p : Submodule R M) : (p.toAddSubmonoid : Set M) = p 
goal: ↑p.toAddSubmonoid = ↑p

full_name: Submodule.toSubMulAction_injective
code: theorem toSubMulAction_injective : Injective (toSubMulAction : Submodule R M → SubMulAction R M) 
goal: Function.Injective Submodule.toSubMulAction

full_name: Submodule.toSubMulAction_eq
code: theorem toSubMulAction_eq : p.toSubMulAction = q.toSubMulAction ↔ p = q 
goal: p.toSubMulAction = q.toSubMulAction ↔ p = q

full_name: Submodule.toSubMulAction_strictMono
code: @[mono]
theorem toSubMulAction_strictMono :
    StrictMono (toSubMulAction : Submodule R M → SubMulAction R M) 
goal: StrictMono Submodule.toSubMulAction

full_name: Submodule.toSubMulAction_mono
code: @[mono]
theorem toSubMulAction_mono : Monotone (toSubMulAction : Submodule R M → SubMulAction R M) 
goal: Monotone Submodule.toSubMulAction

full_name: Submodule.coe_toSubMulAction
code: @[simp]
theorem coe_toSubMulAction (p : Submodule R M) : (p.toSubMulAction : Set M) = p 
goal: ↑p.toSubMulAction = ↑p

full_name: SMulMemClass.toModule
code: /-- A submodule of a `Module` is a `Module`.  -/
instance (priority := 75) toModule : Module R S' 
goal: Module R ↥S'

full_name: SMulMemClass.toModule'
code: /-- This can't be an instance because Lean wouldn't know how to find `R`, but we can still use
this to manually derive `Module` on specific types. -/
def toModule' (S R' R A : Type*) [Semiring R] [NonUnitalNonAssocSemiring A]
    [Module R A] [Semiring R'] [SMul R' R] [Module R' A] [IsScalarTower R' R A]
    [SetLike S A] [AddSubmonoidClass S A] [SMulMemClass S R A] (s : S) :
    Module R' s 
goal: Module R' ↥s

full_name: Submodule.mem_carrier
code: theorem mem_carrier : x ∈ p.carrier ↔ x ∈ (p : Set M) 
goal: x ∈ p.carrier ↔ x ∈ ↑p

full_name: Submodule.zero_mem
code: @[simp]
protected theorem zero_mem : (0 : M) ∈ p 
goal: 0 ∈ p

full_name: Submodule.add_mem
code: protected theorem add_mem (h₁ : x ∈ p) (h₂ : y ∈ p) : x + y ∈ p 
goal: x + y ∈ p

full_name: Submodule.smul_mem
code: theorem smul_mem (r : R) (h : x ∈ p) : r • x ∈ p 
goal: r • x ∈ p

full_name: Submodule.smul_of_tower_mem
code: theorem smul_of_tower_mem [SMul S R] [SMul S M] [IsScalarTower S R M] (r : S) (h : x ∈ p) :
    r • x ∈ p 
goal: r • x ∈ p

full_name: Submodule.sum_mem
code: protected theorem sum_mem {t : Finset ι} {f : ι → M} : (∀ c ∈ t, f c ∈ p) → (∑ i ∈ t, f i) ∈ p 
goal: (∀ c ∈ t, f c ∈ p) → ∑ i ∈ t, f i ∈ p

full_name: Submodule.sum_smul_mem
code: theorem sum_smul_mem {t : Finset ι} {f : ι → M} (r : ι → R) (hyp : ∀ c ∈ t, f c ∈ p) :
    (∑ i ∈ t, r i • f i) ∈ p 
goal: ∑ i ∈ t, r i • f i ∈ p

full_name: Submodule.smul_mem_iff'
code: @[simp]
theorem smul_mem_iff' [Group G] [MulAction G M] [SMul G R] [IsScalarTower G R M] (g : G) :
    g • x ∈ p ↔ x ∈ p 
goal: g • x ∈ p ↔ x ∈ p

full_name: Submodule.add
code: instance add : Add p 
goal: Add ↥p

full_name: Submodule.zero
code: instance zero : Zero p 
goal: Zero ↥p

full_name: Submodule.inhabited
code: instance inhabited : Inhabited p 
goal: Inhabited ↥p

full_name: Submodule.smul
code: instance smul [SMul S R] [SMul S M] [IsScalarTower S R M] : SMul S p 
goal: SMul S ↥p

full_name: Submodule.isScalarTower
code: instance isScalarTower [SMul S R] [SMul S M] [IsScalarTower S R M] : IsScalarTower S R p 
goal: IsScalarTower S R ↥p

full_name: Submodule.isScalarTower'
code: instance isScalarTower' {S' : Type*} [SMul S R] [SMul S M] [SMul S' R] [SMul S' M] [SMul S S']
    [IsScalarTower S' R M] [IsScalarTower S S' M] [IsScalarTower S R M] : IsScalarTower S S' p 
goal: IsScalarTower S S' ↥p

full_name: Submodule.isCentralScalar
code: instance isCentralScalar [SMul S R] [SMul S M] [IsScalarTower S R M] [SMul Sᵐᵒᵖ R] [SMul Sᵐᵒᵖ M]
    [IsScalarTower Sᵐᵒᵖ R M] [IsCentralScalar S M] : IsCentralScalar S p 
goal: IsCentralScalar S ↥p

full_name: Submodule.nonempty
code: protected theorem nonempty : (p : Set M).Nonempty 
goal: (↑p).Nonempty

full_name: Submodule.mk_eq_zero
code: theorem mk_eq_zero {x} (h : x ∈ p) : (⟨x, h⟩ : p) = 0 ↔ x = 0 
goal: ⟨x, h⟩ = 0 ↔ x = 0

full_name: Submodule.coe_eq_zero
code: @[norm_cast] -- Porting note: removed `@[simp]` because this follows from `ZeroMemClass.coe_zero`
theorem coe_eq_zero {x : p} : (x : M) = 0 ↔ x = 0 
goal: ↑x = 0 ↔ x = 0

full_name: Submodule.coe_add
code: @[simp, norm_cast]
theorem coe_add (x y : p) : (↑(x + y) : M) = ↑x + ↑y 
goal: ↑(x + y) = ↑x + ↑y

full_name: Submodule.coe_zero
code: @[simp, norm_cast]
theorem coe_zero : ((0 : p) : M) = 0 
goal: ↑0 = 0

full_name: Submodule.coe_smul
code: @[norm_cast]
theorem coe_smul (r : R) (x : p) : ((r • x : p) : M) = r • (x : M) 
goal: ↑(r • x) = r • ↑x

full_name: Submodule.coe_smul_of_tower
code: @[simp, norm_cast]
theorem coe_smul_of_tower [SMul S R] [SMul S M] [IsScalarTower S R M] (r : S) (x : p) :
    ((r • x : p) : M) = r • (x : M) 
goal: ↑(r • x) = r • ↑x

full_name: Submodule.coe_mk
code: @[norm_cast] -- Porting note: removed `@[simp]` because this is now structure eta
theorem coe_mk (x : M) (hx : x ∈ p) : ((⟨x, hx⟩ : p) : M) = x 
goal: ↑⟨x, hx⟩ = x

full_name: Submodule.coe_mem
code: theorem coe_mem (x : p) : (x : M) ∈ p 
goal: ↑x ∈ p

full_name: Submodule.addCommMonoid
code: instance addCommMonoid : AddCommMonoid p 
goal: AddCommMonoid ↥p

full_name: Submodule.module'
code: instance module' [Semiring S] [SMul S R] [Module S M] [IsScalarTower S R M] : Module S p 
goal: Module S ↥p

full_name: Submodule.module
code: instance module : Module R p 
goal: Module R ↥p

full_name: Submodule.noZeroSMulDivisors
code: instance noZeroSMulDivisors [NoZeroSMulDivisors R M] : NoZeroSMulDivisors R p 
goal: NoZeroSMulDivisors R ↥p

full_name: Submodule.instVAddSubtypeMem
code: instance [VAdd M α] : VAdd p α 
goal: VAdd (↥p) α

full_name: Submodule.vaddCommClass
code: instance vaddCommClass [VAdd M β] [VAdd α β] [VAddCommClass M α β] : VAddCommClass p α β 
goal: VAddCommClass (↥p) α β

full_name: Submodule.instFaithfulVAddSubtypeMem
code: instance [VAdd M α] [FaithfulVAdd M α] : FaithfulVAdd p α 
goal: FaithfulVAdd (↥p) α

full_name: Submodule.vadd_def
code: theorem vadd_def [VAdd M α] (g : p) (m : α) : g +ᵥ m = (g : M) +ᵥ m 
goal: g +ᵥ m = ↑g +ᵥ m

full_name: Submodule.addSubgroupClass
code: instance addSubgroupClass [Module R M] : AddSubgroupClass (Submodule R M) M 
goal: AddSubgroupClass (Submodule R M) M

full_name: Submodule.neg_mem
code: protected theorem neg_mem (hx : x ∈ p) : -x ∈ p 
goal: -x ∈ p

full_name: Submodule.toAddSubgroup
code: /-- Reinterpret a submodule as an additive subgroup. -/
def toAddSubgroup : AddSubgroup M 
goal: AddSubgroup M

full_name: Submodule.coe_toAddSubgroup
code: @[simp]
theorem coe_toAddSubgroup : (p.toAddSubgroup : Set M) = p 
goal: ↑p.toAddSubgroup = ↑p

full_name: Submodule.mem_toAddSubgroup
code: @[simp]
theorem mem_toAddSubgroup : x ∈ p.toAddSubgroup ↔ x ∈ p 
goal: x ∈ p.toAddSubgroup ↔ x ∈ p

full_name: Submodule.toAddSubgroup_injective
code: theorem toAddSubgroup_injective : Injective (toAddSubgroup : Submodule R M → AddSubgroup M)
  
goal: Function.Injective Submodule.toAddSubgroup

full_name: Submodule.toAddSubgroup_eq
code: @[simp]
theorem toAddSubgroup_eq : p.toAddSubgroup = p'.toAddSubgroup ↔ p = p' 
goal: p.toAddSubgroup = p'.toAddSubgroup ↔ p = p'

full_name: Submodule.toAddSubgroup_strictMono
code: @[mono]
theorem toAddSubgroup_strictMono : StrictMono (toAddSubgroup : Submodule R M → AddSubgroup M) 
goal: StrictMono Submodule.toAddSubgroup

full_name: Submodule.toAddSubgroup_le
code: theorem toAddSubgroup_le : p.toAddSubgroup ≤ p'.toAddSubgroup ↔ p ≤ p' 
goal: p.toAddSubgroup ≤ p'.toAddSubgroup ↔ p ≤ p'

full_name: Submodule.toAddSubgroup_mono
code: @[mono]
theorem toAddSubgroup_mono : Monotone (toAddSubgroup : Submodule R M → AddSubgroup M) 
goal: Monotone Submodule.toAddSubgroup

full_name: Submodule.sub_mem
code: protected theorem sub_mem : x ∈ p → y ∈ p → x - y ∈ p 
goal: x ∈ p → y ∈ p → x - y ∈ p

full_name: Submodule.neg_mem_iff
code: protected theorem neg_mem_iff : -x ∈ p ↔ x ∈ p 
goal: -x ∈ p ↔ x ∈ p

full_name: Submodule.add_mem_iff_left
code: protected theorem add_mem_iff_left : y ∈ p → (x + y ∈ p ↔ x ∈ p) 
goal: y ∈ p → (x + y ∈ p ↔ x ∈ p)

full_name: Submodule.add_mem_iff_right
code: protected theorem add_mem_iff_right : x ∈ p → (x + y ∈ p ↔ y ∈ p) 
goal: x ∈ p → (x + y ∈ p ↔ y ∈ p)

full_name: Submodule.coe_neg
code: protected theorem coe_neg (x : p) : ((-x : p) : M) = -x 
goal: ↑(-x) = -↑x

full_name: Submodule.coe_sub
code: protected theorem coe_sub (x y : p) : (↑(x - y) : M) = ↑x - ↑y 
goal: ↑(x - y) = ↑x - ↑y

full_name: Submodule.sub_mem_iff_left
code: theorem sub_mem_iff_left (hy : y ∈ p) : x - y ∈ p ↔ x ∈ p 
goal: x - y ∈ p ↔ x ∈ p

full_name: Submodule.sub_mem_iff_right
code: theorem sub_mem_iff_right (hx : x ∈ p) : x - y ∈ p ↔ y ∈ p 
goal: x - y ∈ p ↔ y ∈ p

full_name: Submodule.addCommGroup
code: instance addCommGroup : AddCommGroup p 
goal: AddCommGroup ↥p

full_name: Submodule.neg_coe
code: theorem neg_coe : -(p : Set M) = p 
goal: -↑p = ↑p

full_name: Submodule.not_mem_of_ortho
code: theorem not_mem_of_ortho {x : M} {N : Submodule R M}
    (ortho : ∀ (c : R), ∀ y ∈ N, c • x + y = (0 : M) → c = 0) : x ∉ N 
goal: x ∉ N

full_name: Submodule.ne_zero_of_ortho
code: theorem ne_zero_of_ortho {x : M} {N : Submodule R M}
    (ortho : ∀ (c : R), ∀ y ∈ N, c • x + y = (0 : M) → c = 0) : x ≠ 0 
goal: x ≠ 0

full_name: SubmoduleClass.module'
code: instance (priority := 75) module' {T : Type*} [Semiring R] [AddCommMonoid M] [Semiring S]
    [Module R M] [SMul S R] [Module S M] [IsScalarTower S R M] [SetLike T M] [AddSubmonoidClass T M]
    [SMulMemClass T R M] (t : T) : Module S t 
goal: Module S ↥t

full_name: SubmoduleClass.module
code: instance (priority := 75) module [Semiring R] [AddCommMonoid M] [Module R M] [SetLike S M]
    [AddSubmonoidClass S M] [SMulMemClass S R M] (s : S) : Module R s 
goal: Module R ↥s

full_name: Submodule.smul_mem_iff
code: theorem smul_mem_iff (s0 : s ≠ 0) : s • x ∈ p ↔ x ∈ p 
goal: s • x ∈ p ↔ x ∈ p

full_name: Subspace
code: /-- Subspace of a vector space. Defined to equal `Submodule`. -/
abbrev Subspace (R : Type u) (M : Type v) [DivisionRing R] [AddCommGroup M] [Module R M] 
goal: Type v