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

full_name: Submodule.pointwiseNeg
code: /-- The submodule with every element negated. Note if `R` is a ring and not just a semiring, this
is a no-op, as shown by `Submodule.neg_eq_self`.

Recall that When `R` is the semiring corresponding to the nonnegative elements of `R'`,
`Submodule R' M` is the type of cones of `M`. This instance reflects such cones about `0`.

This is available as an instance in the `Pointwise` locale. -/
protected def pointwiseNeg : Neg (Submodule R M) 
goal: Neg (Submodule R M)

full_name: Submodule.coe_set_neg
code: @[simp]
theorem coe_set_neg (S : Submodule R M) : ↑(-S) = -(S : Set M) 
goal: ↑(-S) = -↑S

full_name: Submodule.neg_toAddSubmonoid
code: @[simp]
theorem neg_toAddSubmonoid (S : Submodule R M) : (-S).toAddSubmonoid = -S.toAddSubmonoid 
goal: (-S).toAddSubmonoid = -S.toAddSubmonoid

full_name: Submodule.mem_neg
code: @[simp]
theorem mem_neg {g : M} {S : Submodule R M} : g ∈ -S ↔ -g ∈ S 
goal: g ∈ -S ↔ -g ∈ S

full_name: Submodule.involutivePointwiseNeg
code: /-- `Submodule.pointwiseNeg` is involutive.

This is available as an instance in the `Pointwise` locale. -/
protected def involutivePointwiseNeg : InvolutiveNeg (Submodule R M) 
goal: InvolutiveNeg (Submodule R M)

full_name: Submodule.neg_le_neg
code: @[simp]
theorem neg_le_neg (S T : Submodule R M) : -S ≤ -T ↔ S ≤ T 
goal: -S ≤ -T ↔ S ≤ T

full_name: Submodule.neg_le
code: theorem neg_le (S T : Submodule R M) : -S ≤ T ↔ S ≤ -T 
goal: -S ≤ T ↔ S ≤ -T

full_name: Submodule.negOrderIso
code: /-- `Submodule.pointwiseNeg` as an order isomorphism. -/
def negOrderIso : Submodule R M ≃o Submodule R M 
goal: Submodule R M ≃o Submodule R M

full_name: Submodule.closure_neg
code: theorem closure_neg (s : Set M) : span R (-s) = -span R s 
goal: Submodule.span R (-s) = -Submodule.span R s

full_name: Submodule.neg_inf
code: @[simp]
theorem neg_inf (S T : Submodule R M) : -(S ⊓ T) = -S ⊓ -T 
goal: -(S ⊓ T) = -S ⊓ -T

full_name: Submodule.neg_sup
code: @[simp]
theorem neg_sup (S T : Submodule R M) : -(S ⊔ T) = -S ⊔ -T 
goal: -(S ⊔ T) = -S ⊔ -T

full_name: Submodule.neg_bot
code: @[simp]
theorem neg_bot : -(⊥ : Submodule R M) = ⊥ 
goal: -⊥ = ⊥

full_name: Submodule.neg_top
code: @[simp]
theorem neg_top : -(⊤ : Submodule R M) = ⊤ 
goal: -⊤ = ⊤

full_name: Submodule.neg_iInf
code: @[simp]
theorem neg_iInf {ι : Sort*} (S : ι → Submodule R M) : (-⨅ i, S i) = ⨅ i, -S i 
goal: -⨅ i, S i = ⨅ i, -S i

full_name: Submodule.neg_iSup
code: @[simp]
theorem neg_iSup {ι : Sort*} (S : ι → Submodule R M) : (-⨆ i, S i) = ⨆ i, -S i 
goal: -⨆ i, S i = ⨆ i, -S i

full_name: Submodule.neg_eq_self
code: @[simp]
theorem neg_eq_self [Ring R] [AddCommGroup M] [Module R M] (p : Submodule R M) : -p = p 
goal: -p = p

full_name: Submodule.pointwiseZero
code: instance pointwiseZero : Zero (Submodule R M) 
goal: Zero (Submodule R M)

full_name: Submodule.pointwiseAdd
code: instance pointwiseAdd : Add (Submodule R M) 
goal: Add (Submodule R M)

full_name: Submodule.pointwiseAddCommMonoid
code: instance pointwiseAddCommMonoid : AddCommMonoid (Submodule R M) 
goal: AddCommMonoid (Submodule R M)

full_name: Submodule.add_eq_sup
code: @[simp]
theorem add_eq_sup (p q : Submodule R M) : p + q = p ⊔ q 
goal: p + q = p ⊔ q

full_name: Submodule.zero_eq_bot
code: @[simp, nolint simpNF]
theorem zero_eq_bot : (0 : Submodule R M) = ⊥ 
goal: 0 = ⊥

full_name: Submodule.instCanonicallyOrderedAddCommMonoid
code: instance : CanonicallyOrderedAddCommMonoid (Submodule R M) 
goal: CanonicallyOrderedAddCommMonoid (Submodule R M)

full_name: Submodule.pointwiseDistribMulAction
code: /-- The action on a submodule corresponding to applying the action to every element.

This is available as an instance in the `Pointwise` locale. -/
protected def pointwiseDistribMulAction : DistribMulAction α (Submodule R M) 
goal: DistribMulAction α (Submodule R M)

full_name: Submodule.coe_pointwise_smul
code: @[simp]
theorem coe_pointwise_smul (a : α) (S : Submodule R M) : ↑(a • S) = a • (S : Set M) 
goal: ↑(a • S) = a • ↑S

full_name: Submodule.pointwise_smul_toAddSubmonoid
code: @[simp]
theorem pointwise_smul_toAddSubmonoid (a : α) (S : Submodule R M) :
    (a • S).toAddSubmonoid = a • S.toAddSubmonoid 
goal: (a • S).toAddSubmonoid = a • S.toAddSubmonoid

full_name: Submodule.pointwise_smul_toAddSubgroup
code: @[simp]
theorem pointwise_smul_toAddSubgroup {R M : Type*} [Ring R] [AddCommGroup M] [DistribMulAction α M]
    [Module R M] [SMulCommClass α R M] (a : α) (S : Submodule R M) :
    (a • S).toAddSubgroup = a • S.toAddSubgroup 
goal: (a • S).toAddSubgroup = a • S.toAddSubgroup

full_name: Submodule.smul_mem_pointwise_smul
code: theorem smul_mem_pointwise_smul (m : M) (a : α) (S : Submodule R M) : m ∈ S → a • m ∈ a • S 
goal: m ∈ S → a • m ∈ a • S

full_name: Submodule.instCovariantClassHSMulLe
code: instance : CovariantClass α (Submodule R M) HSMul.hSMul LE.le 
goal: CovariantClass α (Submodule R M) HSMul.hSMul LE.le

full_name: Submodule.smul_bot'
code: /-- See also `Submodule.smul_bot`. -/
@[simp]
theorem smul_bot' (a : α) : a • (⊥ : Submodule R M) = ⊥ 
goal: a • ⊥ = ⊥

full_name: Submodule.smul_sup'
code: /-- See also `Submodule.smul_sup`. -/
theorem smul_sup' (a : α) (S T : Submodule R M) : a • (S ⊔ T) = a • S ⊔ a • T 
goal: a • (S ⊔ T) = a • S ⊔ a • T

full_name: Submodule.smul_span
code: theorem smul_span (a : α) (s : Set M) : a • span R s = span R (a • s) 
goal: a • Submodule.span R s = Submodule.span R (a • s)

full_name: Submodule.span_smul
code: theorem span_smul (a : α) (s : Set M) : span R (a • s) = a • span R s 
goal: Submodule.span R (a • s) = a • Submodule.span R s

full_name: Submodule.pointwiseCentralScalar
code: instance pointwiseCentralScalar [DistribMulAction αᵐᵒᵖ M] [SMulCommClass αᵐᵒᵖ R M]
    [IsCentralScalar α M] : IsCentralScalar α (Submodule R M) 
goal: IsCentralScalar α (Submodule R M)

full_name: Submodule.smul_le_self_of_tower
code: @[simp]
theorem smul_le_self_of_tower {α : Type*} [Semiring α] [Module α R] [Module α M]
    [SMulCommClass α R M] [IsScalarTower α R M] (a : α) (S : Submodule R M) : a • S ≤ S 
goal: a • S ≤ S

full_name: Submodule.pointwiseMulActionWithZero
code: /-- The action on a submodule corresponding to applying the action to every element.

This is available as an instance in the `Pointwise` locale.

This is a stronger version of `Submodule.pointwiseDistribMulAction`. Note that `add_smul` does
not hold so this cannot be stated as a `Module`. -/
protected def pointwiseMulActionWithZero : MulActionWithZero α (Submodule R M) 
goal: MulActionWithZero α (Submodule R M)

full_name: Submodule.pointwiseSetSMul
code: /--
Let `s ⊆ R` be a set and `N ≤ M` be a submodule, then `s • N` is the smallest submodule containing
all `r • n` where `r ∈ s` and `n ∈ N`.
-/
protected def pointwiseSetSMul : SMul (Set S) (Submodule R M) 
goal: SMul (Set S) (Submodule R M)

full_name: Submodule.mem_set_smul_def
code: lemma mem_set_smul_def (x : M) :
    x ∈ s • N ↔
  x ∈ sInf { p : Submodule R M | ∀ ⦃r : S⦄ {n : M}, r ∈ s → n ∈ N → r • n ∈ p } 
goal: x ∈ s • N ↔ x ∈ sInf {p | ∀ ⦃r : S⦄ {n : M}, r ∈ s → n ∈ N → r • n ∈ p}

full_name: Submodule.mem_set_smul_of_mem_mem
code: @[aesop safe]
lemma mem_set_smul_of_mem_mem {r : S} {m : M} (mem1 : r ∈ s) (mem2 : m ∈ N) :
    r • m ∈ s • N 
goal: r • m ∈ s • N

full_name: Submodule.set_smul_le
code: lemma set_smul_le (p : Submodule R M)
    (closed_under_smul : ∀ ⦃r : S⦄ ⦃n : M⦄, r ∈ s → n ∈ N → r • n ∈ p) :
    s • N ≤ p 
goal: s • N ≤ p

full_name: Submodule.set_smul_le_iff
code: lemma set_smul_le_iff (p : Submodule R M) :
    s • N ≤ p ↔
    ∀ ⦃r : S⦄ ⦃n : M⦄, r ∈ s → n ∈ N → r • n ∈ p 
goal: s • N ≤ p ↔ ∀ ⦃r : S⦄ ⦃n : M⦄, r ∈ s → n ∈ N → r • n ∈ p

full_name: Submodule.set_smul_eq_of_le
code: lemma set_smul_eq_of_le (p : Submodule R M)
    (closed_under_smul : ∀ ⦃r : S⦄ ⦃n : M⦄, r ∈ s → n ∈ N → r • n ∈ p)
    (le : p ≤ s • N) :
    s • N = p 
goal: s • N = p

full_name: Submodule.instCovariantClassSetHSMulLe
code: instance : CovariantClass (Set S) (Submodule R M) HSMul.hSMul LE.le 
goal: CovariantClass (Set S) (Submodule R M) HSMul.hSMul LE.le

full_name: Submodule.set_smul_mono_right
code: @[deprecated smul_mono_right (since := "2024-03-31")]
theorem set_smul_mono_right {p q : Submodule R M} (le : p ≤ q) :
    s • p ≤ s • q 
goal: s • p ≤ s • q

full_name: Submodule.set_smul_mono_left
code: lemma set_smul_mono_left {s t : Set S} (le : s ≤ t) :
    s • N ≤ t • N 
goal: s • N ≤ t • N

full_name: Submodule.set_smul_le_of_le_le
code: lemma set_smul_le_of_le_le {s t : Set S} {p q : Submodule R M}
    (le_set : s ≤ t) (le_submodule : p ≤ q) : s • p ≤ t • q 
goal: s • p ≤ t • q

full_name: Submodule.set_smul_eq_iSup
code: lemma set_smul_eq_iSup [SMulCommClass S R M] (s : Set S) (N : Submodule R M) :
    s • N = ⨆ (a ∈ s), a • N 
goal: s • N = ⨆ a ∈ s, a • N

full_name: Submodule.set_smul_span
code: theorem set_smul_span [SMulCommClass S R M] (s : Set S) (t : Set M) :
    s • span R t = span R (s • t) 
goal: s • Submodule.span R t = Submodule.span R (s • t)

full_name: Submodule.span_set_smul
code: theorem span_set_smul [SMulCommClass S R M] (s : Set S) (t : Set M) :
    span R (s • t) = s • span R t 
goal: Submodule.span R (s • t) = s • Submodule.span R t

full_name: Submodule.set_smul_inductionOn
code: /--
Induction principle for set acting on submodules. To prove `P` holds for all `s • N`, it is enough
to prove:
- for all `r ∈ s` and `n ∈ N`, `P (r • n)`;
- for all `r` and `m ∈ s • N`, `P (r • n)`;
- for all `m₁, m₂`, `P m₁` and `P m₂` implies `P (m₁ + m₂)`;
- `P 0`.

To invoke this induction principle, use `induction x, hx using Submodule.set_smul_inductionOn` where
`x : M` and `hx : x ∈ s • N`
-/
@[elab_as_elim]
lemma set_smul_inductionOn {motive : (x : M) → (_ : x ∈ s • N) → Prop}
    (x : M)
    (hx : x ∈ s • N)
    (smul₀ : ∀ ⦃r : S⦄ ⦃n : M⦄ (mem₁ : r ∈ s) (mem₂ : n ∈ N),
      motive (r • n) (mem_set_smul_of_mem_mem mem₁ mem₂))
    (smul₁ : ∀ (r : R) ⦃m : M⦄ (mem : m ∈ s • N) ,
      motive m mem → motive (r • m) (Submodule.smul_mem _ r mem)) --
    (add : ∀ ⦃m₁ m₂ : M⦄ (mem₁ : m₁ ∈ s • N) (mem₂ : m₂ ∈ s • N),
      motive m₁ mem₁ → motive m₂ mem₂ → motive (m₁ + m₂) (Submodule.add_mem _ mem₁ mem₂))
    (zero : motive 0 (Submodule.zero_mem _)) :
    motive x hx 
goal: motive x hx

full_name: Submodule.set_smul_eq_map
code: lemma set_smul_eq_map [SMulCommClass R R N] :
    sR • N =
    Submodule.map
      (N.subtype.comp (Finsupp.lsum R <| DistribMulAction.toLinearMap _ _))
      (Finsupp.supported N R sR) 
goal: sR • N = Submodule.map (N.subtype ∘ₗ (Finsupp.lsum R) (DistribMulAction.toLinearMap R ↥N)) (Finsupp.supported (↥N) R sR)

full_name: Submodule.mem_set_smul
code: lemma mem_set_smul (x : M) [SMulCommClass R R N] :
    x ∈ sR • N ↔ ∃ (c : R →₀ N), (c.support : Set R) ⊆ sR ∧ x = c.sum fun r m ↦ r • m 
goal: x ∈ sR • N ↔ ∃ c, ↑c.support ⊆ sR ∧ x = ↑(c.sum fun r m => r • m)

full_name: Submodule.empty_set_smul
code: @[simp] lemma empty_set_smul : (∅ : Set S) • N = ⊥ 
goal: ∅ • N = ⊥

full_name: Submodule.set_smul_bot
code: @[simp] lemma set_smul_bot : s • (⊥ : Submodule R M) = ⊥ 
goal: s • ⊥ = ⊥

full_name: Submodule.singleton_set_smul
code: lemma singleton_set_smul [SMulCommClass S R M] (r : S) : ({r} : Set S) • N = r • N 
goal: {r} • N = r • N

full_name: Submodule.mem_singleton_set_smul
code: lemma mem_singleton_set_smul [SMulCommClass R S M] (r : S) (x : M) :
    x ∈ ({r} : Set S) • N ↔ ∃ (m : M), m ∈ N ∧ x = r • m 
goal: x ∈ {r} • N ↔ ∃ m ∈ N, x = r • m

full_name: Submodule.pointwiseSetMulAction
code: /-- A subset of a ring `R` has a multiplicative action on submodules of a module over `R`. -/
protected def pointwiseSetMulAction [SMulCommClass R R M] :
    MulAction (Set R) (Submodule R M) 
goal: MulAction (Set R) (Submodule R M)

full_name: Submodule.pointwiseSetDistribMulAction
code: /-- In a ring, sets acts on submodules. -/
protected def pointwiseSetDistribMulAction [SMulCommClass R R M] :
    DistribMulAction (Set R) (Submodule R M) 
goal: DistribMulAction (Set R) (Submodule R M)

full_name: Submodule.sup_set_smul
code: lemma sup_set_smul (s t : Set S) :
    (s ⊔ t) • N = s • N ⊔ t • N 
goal: (s ⊔ t) • N = s • N ⊔ t • N

full_name: Submodule.coe_span_smul
code: lemma coe_span_smul {R' M' : Type*} [CommSemiring R'] [AddCommMonoid M'] [Module R' M']
    (s : Set R') (N : Submodule R' M') :
    (Ideal.span s : Set R') • N = s • N 
goal: ↑(Ideal.span s) • N = s • N