Skip to content

Commit 72acbe6

Browse files
committed
refactor(Lie/Graded): remove a redundant assumption (leanprover-community#38120)
The equality pattern can be helpful when working with families of types, but provides little value when working with families of submodules. Indeed, the only caller passes `rfl`, and any family implementing this interface can use `let +generalize k := i + j` if they really find it useful. Also adds an implementation note that remarks the design is divergent from GradedModule and GradedMonoid. I think we should correct this divergence, but it's not at all urgent.
1 parent 943e379 commit 72acbe6

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

Mathlib/Algebra/Lie/Graded.lean

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ public import Mathlib.Algebra.Lie.Derivation.Basic
1212
# Graded Lie algebras
1313
1414
This file defines typeclasses `SetLike.GradedBracket` and `GradedLieAlgebra`, for working with Lie
15-
algebras that are graded by a collection `ℒ` of submodules. The additivity of degree with respect to
16-
the bracket product is encoded by an addition condition so we can avoid the usual difficulties of
17-
adding elements of `A (i + j)` to elements of `A (j + i)`.
15+
algebras that are graded by a collection `ℒ` of submodules.
1816
1917
## Main definitions
2018
@@ -25,6 +23,12 @@ adding elements of `A (i + j)` to elements of `A (j + i)`.
2523
* `LieDerivation.ofGrading`: A Lie derivation on a graded Lie algebra, that scalar-multiplies graded
2624
pieces by an additive map applied to degree.
2725
26+
## Implementation notes
27+
28+
For now we only implement internally-graded Lie algebras; supporting the externally-graded case
29+
would be achieved by generalizing the `LieRing (⨁ i, ℒ i)` instance to take a family of types,
30+
and defining a new `GradedMonoid.GBracket` class to provide the data piecewise.
31+
2832
-/
2933

3034
@[expose] public section
@@ -38,7 +42,7 @@ section SetLike
3842
/-- A class that ensures a bracket product preserves an additive grading. -/
3943
class SetLike.GradedBracket [SetLike σ L] [Bracket L L] [Add ι] (ℒ : ι → σ) : Prop where
4044
/-- Bracket is homogeneous -/
41-
bracket_mem : ∀ ⦃i j k⦄ {gi gj}, i + j = k → gi ∈ ℒ i → gj ∈ ℒ j → ⁅gi, gj⁆ ∈ ℒ k
45+
bracket_mem : ∀ ⦃i j⦄ {gi gj}, gi ∈ ℒ i → gj ∈ ℒ j → ⁅gi, gj⁆ ∈ ℒ (i + j)
4246

4347
variable [DecidableEq ι] [AddCommMonoid ι] [CommRing R] [LieRing L] [LieAlgebra R L]
4448
(ℒ : ι → Submodule R L)
@@ -125,7 +129,7 @@ def ofGradingSum (φ : ι →+ R) : LieDerivation R (⨁ i, ℒ i) (⨁ i, ℒ i
125129
add_lie, smul_add, add_sub, ← sub_sub]
126130
congr 1
127131
have : (decompose ℒ).symm ⁅of (fun i ↦ ℒ i) i a, of (fun i ↦ ℒ i) k b⁆ ∈ ℒ (i + k) := by
128-
simp [SetLike.GradedBracket.bracket_mem rfl (Submodule.coe_mem a) (Submodule.coe_mem b)]
132+
simp [SetLike.GradedBracket.bracket_mem (Submodule.coe_mem a) (Submodule.coe_mem b)]
129133
rw [hM _ _ this, hM k (of (ℒ ·) k b) (by simp), ← lie_skew (of (ℒ ·) k b),
130134
add_sub_right_comm, add_right_cancel_iff, add_comm i k, map_add, add_smul,
131135
DirectSum.add_apply, Submodule.coe_add, sub_eq_add_neg, lie_smul, add_left_cancel_iff,

0 commit comments

Comments
 (0)