Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Lean/Mathlib/Mathlib/Algebra/SkewMonoidAlgebra/     Datei vom 15.10.2026 mit Größe 4 kB image not shown  

Quelle  Support.lean   Sprache: Lean

 

/-
Copyright (c) 2025 Xavier Généreux. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Xavier Généreux, María Inés de Frutos Fernández
-/

module

public import Mathlib.Algebra.Group.Pointwise.Finset.Basic
public import Mathlib.Algebra.SkewMonoidAlgebra.Basic

set_option doc.verso true
set_option doc.verso.suggestions false

/-!
# Lemmas about the support of an element of a skew monoid algebra

For `f : SkewMonoidAlgebra k G`, `f.support` is the set of all `a ∈ G` such that `f.coeff a ≠ 0`.
-/


public section

open scoped Pointwise

namespace SkewMonoidAlgebra

open Finset Finsupp

variable {k G : Type*}

section AddCommMonoid

variable [AddCommMonoid k] {a : G} {b : k}

@[simp] lemma support_single (a : G) (h : b ≠ 0) : (single a b).support = {a} :=
  Finsupp.support_single _ h

@[deprecated (since := "2026-05-05")] alias support_single_ne_zero := support_single

theorem support_single_subset : (single a b).support ⊆ {a} := Finsupp.support_single_subset

theorem support_sum {k' G' : Type*} [DecidableEq G'] [AddCommMonoid k'] {f : G →₀ k}
    {g : G → k → SkewMonoidAlgebra k' G'} :
    (f.sum g).support ⊆ f.support.biUnion fun a ↦ (g a (f a)).support := by
  simpa [support, coeff_finsuppSum] using Finsupp.support_sum

end AddCommMonoid

section AddCommGroup

variable [AddCommGroup k]

theorem support_neg (p : SkewMonoidAlgebra k G) : (-p).support = p.support := by
  rw [support, coeff_neg, Finsupp.support_neg, support_coeff]

end AddCommGroup

section AddCommMonoidWithOne

variable [One G] [AddCommMonoidWithOne k]

lemma support_one_subset : (1 : SkewMonoidAlgebra k G).support ⊆ 1 :=
  Finsupp.support_single_subset

@[simp]
lemma support_one [NeZero (1 : k)] : (1 : SkewMonoidAlgebra k G).support = 1 :=
  Finsupp.support_single _ one_ne_zero

end AddCommMonoidWithOne

section Semiring

variable [Monoid G] [Semiring k] [MulSemiringAction G k]
variable (f g : SkewMonoidAlgebra k G)

section DecidableEq

variable [DecidableEq G]

theorem support_mul : (f * g).support ⊆ f.support * g.support :=
  support_sum.trans <| biUnion_subset.2 fun _x hx ↦
    support_sum.trans <| biUnion_subset.2 fun _y hy ↦
      support_single_subset.trans <| singleton_subset_iff.2 <| mem_image₂_of_mem hx hy

theorem support_single_mul_subset (r : k) (a : G) :
    (single a r * f : SkewMonoidAlgebra k G).support ⊆ Finset.image (a * ·) f.support :=
  (support_mul _ _).trans <| (Finset.image₂_subset_right support_single_subset).trans <| by
    rw [Finset.image₂_singleton_left]

theorem support_mul_single_subset (r : k) (a : G) :
    (f * single a r).support ⊆ Finset.image (· * a) f.support :=
  (support_mul _ _).trans <| (Finset.image₂_subset_left support_single_subset).trans <| by
    rw [Finset.image₂_singleton_right]

theorem support_single_mul_eq_image {r : k} {x : G} (lx : IsLeftRegular x)
    (hrx : ∀ y, r * x • y = 0 ↔ y = 0) :
    (single x r * f : SkewMonoidAlgebra k G).support = Finset.image (x * ·) f.support := by
  refine subset_antisymm (support_single_mul_subset f _ _) fun y hy ↦ ?_
  obtain ⟨y, yf, rfl⟩ : ∃ a : G, a ∈ f.support ∧ x * a = y := by
    simpa only [Finset.mem_image, exists_prop] using hy
  simp [coeff_mul, mem_support_iff.mp yf, hrx, mem_support_iff, Ne,
    zero_mul, ite_self, lx.eq_iff]

theorem support_mul_single_eq_image {r : k} {x : G} (rx : IsRightRegular x)
    (hrx : ∀ g : G, ∀ y, y * g • r = 0 ↔ y = 0) :
    (f * single x r).support = Finset.image (· * x) f.support := by
  refine subset_antisymm (support_mul_single_subset f _ _) fun y hy ↦ ?_
  obtain ⟨y, yf, rfl⟩ : ∃ a : G, a ∈ f.support ∧ a * x = y := by
    simpa only [Finset.mem_image, exists_prop] using hy
  simp [coeff_mul, mem_support_iff.mp yf, hrx, mem_support_iff, mul_zero,
    ite_self, rx.eq_iff]

end DecidableEq

theorem support_mul_single [IsRightCancelMul G] (r : k) (x : G)
    (hrx : ∀ g : G, ∀ y, y * g • r = 0 ↔ y = 0) :
    (f * single x r).support = f.support.map (mulRightEmbedding x) := by
  classical
  ext a
  simp [support_mul_single_eq_image f (IsRightRegular.all x) hrx]

theorem support_single_mul [IsLeftCancelMul G] (r : k) (x : G)
    (hrx : ∀ y, r * x • y = 0 ↔ y = 0) :
    (single x r * f : SkewMonoidAlgebra k G).support = f.support.map (mulLeftEmbedding x) := by
  classical
  ext a
  simp [support_single_mul_eq_image f (IsLeftRegular.all x) hrx]

section Span

/-- An element of `SkewMonoidAlgebra k G` is in the subalgebra generated by its support. -/
theorem mem_span_support (f : SkewMonoidAlgebra k G) :
    f ∈ Submodule.span k (of k G '' (f.support : Set G)) := by
  rw [Fintype.mem_span_image_iff_exists_fun k]
  use Finset.restrict f.support f.coeff
  simp only [Finset.restrict_def, smul_of]
  conv_rhs => rw [← sum_coeff_single f, Finsupp.sum, ← Finset.sum_finset_coe]
  rfl

end Span

end Semiring

end SkewMonoidAlgebra

Messung
CHZG
9310010097

¤ Dauer der Verarbeitung: 0.2 Sekunden  (vorverarbeitet am  2026-11-24) ¤

*© Formatika GbR, Deutschland