@@ -126,6 +126,28 @@ theorem bracket_apply (x y : ⨁ i, L i) (i : ι) : ⁅x, y⁆ i = ⁅x i, y i
126
126
zipWith_apply _ _ x y i
127
127
#align direct_sum.bracket_apply DirectSum.bracket_apply
128
128
129
+ theorem lie_of_same [DecidableEq ι] {i : ι} (x y : L i) :
130
+ ⁅of L i x, of L i y⁆ = of L i ⁅x, y⁆ :=
131
+ DFinsupp.zipWith_single_single _ _ _ _
132
+ #align direct_sum.lie_of_of_eq DirectSum.lie_of_same
133
+
134
+ theorem lie_of_of_ne [DecidableEq ι] {i j : ι} (hij : i ≠ j) (x : L i) (y : L j) :
135
+ ⁅of L i x, of L j y⁆ = 0 := by
136
+ refine DFinsupp.ext fun k => ?_
137
+ rw [bracket_apply]
138
+ obtain rfl | hik := Decidable.eq_or_ne i k
139
+ · rw [of_eq_of_ne _ _ _ _ hij.symm, lie_zero, zero_apply]
140
+ · rw [of_eq_of_ne _ _ _ _ hik, zero_lie, zero_apply]
141
+ #align direct_sum.lie_of_of_ne DirectSum.lie_of_of_ne
142
+
143
+ @[simp]
144
+ theorem lie_of [DecidableEq ι] {i j : ι} (x : L i) (y : L j) :
145
+ ⁅of L i x, of L j y⁆ = if hij : i = j then of L i ⁅x, hij.symm.recOn y⁆ else 0 := by
146
+ obtain rfl | hij := Decidable.eq_or_ne i j
147
+ · simp only [lie_of_same L x y, dif_pos]
148
+ · simp only [lie_of_of_ne L hij x y, hij, dif_neg]
149
+ #align direct_sum.lie_of DirectSum.lie_of
150
+
129
151
instance lieAlgebra : LieAlgebra R (⨁ i, L i) :=
130
152
{ (inferInstance : Module R _) with
131
153
lie_smul := fun c x y => by
@@ -174,37 +196,6 @@ theorem lieAlgebra_ext {x y : ⨁ i, L i}
174
196
DFinsupp.ext h
175
197
#align direct_sum.lie_algebra_ext DirectSum.lieAlgebra_ext
176
198
177
- theorem lie_of_of_ne [DecidableEq ι] {i j : ι} (hij : j ≠ i) (x : L i) (y : L j) :
178
- ⁅of L i x, of L j y⁆ = 0 := by
179
- apply lieAlgebra_ext R ι L; intro k
180
- rw [LieHom.map_lie]
181
- simp only [of, singleAddHom, AddMonoidHom.coe_mk, ZeroHom.coe_mk, lieAlgebraComponent_apply,
182
- component, lapply, LinearMap.coe_mk, AddHom.coe_mk, single_apply, LieHom.map_zero]
183
- -- The next four lines were not needed before leanprover/lean4#2644
184
- erw [AddMonoidHom.coe_mk, AddHom.coe_mk, ZeroHom.coe_mk]
185
- rotate_left
186
- intros; erw [single_add]
187
- erw [single_apply, single_apply]
188
- by_cases hik : i = k
189
- · simp only [dif_neg, not_false_iff, lie_zero, hik.symm, hij]
190
- · simp only [dif_neg, not_false_iff, zero_lie, hik]
191
- #align direct_sum.lie_of_of_ne DirectSum.lie_of_of_ne
192
-
193
- theorem lie_of_of_eq [DecidableEq ι] {i j : ι} (hij : j = i) (x : L i) (y : L j) :
194
- ⁅of L i x, of L j y⁆ = of L i ⁅x, hij.recOn y⁆ := by
195
- have : of L j y = of L i (hij.recOn y) := Eq.rec (Eq.refl _) hij
196
- rw [this, ← lieAlgebraOf_apply R ι L i ⁅x, hij.recOn y⁆, LieHom.map_lie, lieAlgebraOf_apply,
197
- lieAlgebraOf_apply]
198
- #align direct_sum.lie_of_of_eq DirectSum.lie_of_of_eq
199
-
200
- @[simp]
201
- theorem lie_of [DecidableEq ι] {i j : ι} (x : L i) (y : L j) :
202
- ⁅of L i x, of L j y⁆ = if hij : j = i then lieAlgebraOf R ι L i ⁅x, hij.recOn y⁆ else 0 := by
203
- by_cases hij : j = i
204
- · simp only [lie_of_of_eq R ι L hij x y, hij, dif_pos, not_false_iff, lieAlgebraOf_apply]
205
- · simp only [lie_of_of_ne R ι L hij x y, hij, dif_neg, not_false_iff]
206
- #align direct_sum.lie_of DirectSum.lie_of
207
-
208
199
variable {R L ι}
209
200
210
201
/-- Given a family of Lie algebras `L i`, together with a family of morphisms of Lie algebras
@@ -236,16 +227,14 @@ def toLieAlgebra [DecidableEq ι] (L' : Type w₁) [LieRing L'] [LieAlgebra R L'
236
227
simp only [LinearMap.map_neg, neg_inj, ← LieAlgebra.ad_apply R]
237
228
rw [← LinearMap.comp_apply, ← LinearMap.comp_apply]
238
229
congr; clear x; ext j x; exact this j i x y
239
- -- Tidy up and use `lie_of`.
240
230
intro i j y x
241
- simp only [lie_of R, lieAlgebraOf_apply, LieHom.coe_toLinearMap, toAddMonoid_of,
242
- coe_toModule_eq_coe_toAddMonoid, LinearMap.toAddMonoidHom_coe]
231
+ simp only [coe_toModule_eq_coe_toAddMonoid, toAddMonoid_of]
243
232
-- And finish with trivial case analysis.
244
- rcases eq_or_ne i j with (h | h)
245
- · have h' : f j (h.recOn y) = f i y := Eq.rec (Eq.refl _) h
246
- simp only [h, h', LieHom.coe_toLinearMap, dif_pos, LieHom. map_lie, toAddMonoid_of,
247
- LinearMap.toAddMonoidHom_coe]
248
- · simp only [h , hf j i h .symm x y, dif_neg, not_false_iff, AddMonoidHom.map_zero ] }
233
+ obtain rfl | hij := Decidable.eq_or_ne i j
234
+ · simp_rw [lie_of_same, toAddMonoid_of, LinearMap.toAddMonoidHom_coe, LieHom.coe_toLinearMap,
235
+ LieHom.map_lie]
236
+ · simp_rw [lie_of_of_ne _ hij.symm, map_zero, LinearMap.toAddMonoidHom_coe,
237
+ LieHom.coe_toLinearMap , hf j i hij .symm x y] }
249
238
#align direct_sum.to_lie_algebra DirectSum.toLieAlgebra
250
239
251
240
end Algebras
0 commit comments