@@ -176,7 +176,6 @@ instance : lie_module R L (M →ₗ[R] N) :=
176
176
177
177
end basic_properties
178
178
179
- set_option old_structure_cmd true
180
179
/-- A morphism of Lie algebras is a linear map respecting the bracket operations. -/
181
180
structure lie_hom (R : Type u) (L : Type v) (L' : Type w)
182
181
[comm_ring R] [lie_ring L] [lie_algebra R L] [lie_ring L'] [lie_algebra R L']
@@ -190,15 +189,21 @@ notation L ` →ₗ⁅`:25 R:25 `⁆ `:0 L':0 := lie_hom R L L'
190
189
namespace lie_hom
191
190
192
191
variables {R : Type u} {L₁ : Type v} {L₂ : Type w} {L₃ : Type w₁}
193
- variables [comm_ring R] [lie_ring L₁] [lie_ring L₂] [lie_ring L₃]
194
- variables [lie_algebra R L₁] [lie_algebra R L₂] [lie_algebra R L₃]
192
+ variables [comm_ring R]
193
+ variables [lie_ring L₁] [lie_algebra R L₁]
194
+ variables [lie_ring L₂] [lie_algebra R L₂]
195
+ variables [lie_ring L₃] [lie_algebra R L₃]
195
196
196
197
instance : has_coe (L₁ →ₗ⁅R⁆ L₂) (L₁ →ₗ[R] L₂) := ⟨lie_hom.to_linear_map⟩
197
198
198
199
/-- see Note [function coercion] -/
199
- instance : has_coe_to_fun (L₁ →ₗ⁅R⁆ L₂) := ⟨_, lie_hom.to_fun⟩
200
+ instance : has_coe_to_fun (L₁ →ₗ⁅R⁆ L₂) := ⟨_, λ f, f.to_linear_map.to_fun⟩
201
+
202
+ /-- See Note [custom simps projection]. We need to specify this projection explicitly in this case,
203
+ because it is a composition of multiple projections. -/
204
+ def simps.apply (h : L₁ →ₗ⁅R⁆ L₂) : L₁ → L₂ := h
200
205
201
- initialize_simps_projections lie_hom (to_fun → apply)
206
+ initialize_simps_projections lie_hom (to_linear_map_to_fun → apply)
202
207
203
208
@[simp, norm_cast] lemma coe_to_linear_map (f : L₁ →ₗ⁅R⁆ L₂) : ((f : L₁ →ₗ[R] L₂) : L₁ → L₂) = f :=
204
209
rfl
@@ -247,7 +252,7 @@ lemma one_apply (x : L₁) : (1 : (L₁ →ₗ⁅R⁆ L₁)) x = x := rfl
247
252
instance : inhabited (L₁ →ₗ⁅R⁆ L₂) := ⟨0 ⟩
248
253
249
254
lemma coe_injective : @function.injective (L₁ →ₗ⁅R⁆ L₂) (L₁ → L₂) coe_fn :=
250
- by rintro ⟨f, _⟩ ⟨ g, _⟩ ⟨h⟩; congr
255
+ by rintro ⟨⟨ f, _⟩⟩ ⟨⟨ g, _⟩ ⟩ ⟨h⟩; congr
251
256
252
257
@[ext] lemma ext {f g : L₁ →ₗ⁅R⁆ L₂} (h : ∀ x, f x = g x) : f = g :=
253
258
coe_injective $ funext h
@@ -258,15 +263,11 @@ lemma ext_iff {f g : L₁ →ₗ⁅R⁆ L₂} : f = g ↔ ∀ x, f x = g x :=
258
263
lemma congr_fun {f g : L₁ →ₗ⁅R⁆ L₂} (h : f = g) (x : L₁) : f x = g x := h ▸ rfl
259
264
260
265
@[simp] lemma mk_coe (f : L₁ →ₗ⁅R⁆ L₂) (h₁ h₂ h₃) :
261
- (⟨f, h₁, h₂, h₃⟩ : L₁ →ₗ⁅R⁆ L₂) = f :=
266
+ (⟨⟨ f, h₁, h₂⟩ , h₃⟩ : L₁ →ₗ⁅R⁆ L₂) = f :=
262
267
by { ext, refl, }
263
268
264
269
@[simp] lemma coe_mk (f : L₁ → L₂) (h₁ h₂ h₃) :
265
- ((⟨f, h₁, h₂, h₃⟩ : L₁ →ₗ⁅R⁆ L₂) : L₁ → L₂) = f := rfl
266
-
267
- @[norm_cast, simp] lemma coe_linear_mk (f : L₁ →ₗ[R] L₂) (h₁ h₂ h₃) :
268
- ((⟨f, h₁, h₂, h₃⟩ : L₁ →ₗ⁅R⁆ L₂) : L₁ →ₗ[R] L₂) = ⟨f, h₁, h₂⟩ :=
269
- by { ext, refl, }
270
+ ((⟨⟨f, h₁, h₂⟩, h₃⟩ : L₁ →ₗ⁅R⁆ L₂) : L₁ → L₂) = f := rfl
270
271
271
272
/-- The composition of morphisms is a morphism. -/
272
273
def comp (f : L₂ →ₗ⁅R⁆ L₃) (g : L₁ →ₗ⁅R⁆ L₂) : L₁ →ₗ⁅R⁆ L₃ :=
@@ -308,10 +309,12 @@ instead define an equivalence to be a morphism which is also a (plain) equivalen
308
309
more convenient to define via linear equivalence to get `.to_linear_equiv` for free. -/
309
310
structure lie_equiv (R : Type u) (L : Type v) (L' : Type w)
310
311
[comm_ring R] [lie_ring L] [lie_algebra R L] [lie_ring L'] [lie_algebra R L']
311
- extends L →ₗ⁅R⁆ L', L ≃ₗ[R] L'
312
+ extends L →ₗ⁅R⁆ L' :=
313
+ (inv_fun : L' → L)
314
+ (left_inv : function.left_inverse inv_fun to_lie_hom.to_fun)
315
+ (right_inv : function.right_inverse inv_fun to_lie_hom.to_fun)
312
316
313
317
attribute [nolint doc_blame] lie_equiv.to_lie_hom
314
- attribute [nolint doc_blame] lie_equiv.to_linear_equiv
315
318
316
319
notation L ` ≃ₗ⁅`:50 R `⁆ ` L' := lie_equiv R L L'
317
320
@@ -321,11 +324,14 @@ variables {R : Type u} {L₁ : Type v} {L₂ : Type w} {L₃ : Type w₁}
321
324
variables [comm_ring R] [lie_ring L₁] [lie_ring L₂] [lie_ring L₃]
322
325
variables [lie_algebra R L₁] [lie_algebra R L₂] [lie_algebra R L₃]
323
326
327
+ /-- Consider an equivalence of Lie algebras as a linear equivalence. -/
328
+ def to_linear_equiv (f : L₁ ≃ₗ⁅R⁆ L₂) : L₁ ≃ₗ[R] L₂ := { ..f.to_lie_hom, ..f }
329
+
324
330
instance has_coe_to_lie_hom : has_coe (L₁ ≃ₗ⁅R⁆ L₂) (L₁ →ₗ⁅R⁆ L₂) := ⟨to_lie_hom⟩
325
331
instance has_coe_to_linear_equiv : has_coe (L₁ ≃ₗ⁅R⁆ L₂) (L₁ ≃ₗ[R] L₂) := ⟨to_linear_equiv⟩
326
332
327
333
/-- see Note [function coercion] -/
328
- instance : has_coe_to_fun (L₁ ≃ₗ⁅R⁆ L₂) := ⟨_, to_fun⟩
334
+ instance : has_coe_to_fun (L₁ ≃ₗ⁅R⁆ L₂) := ⟨_, λ e, e.to_lie_hom. to_fun⟩
329
335
330
336
@[simp, norm_cast] lemma coe_to_lie_equiv (e : L₁ ≃ₗ⁅R⁆ L₂) : ((e : L₁ →ₗ⁅R⁆ L₂) : L₁ → L₂) = e :=
331
337
rfl
@@ -355,7 +361,7 @@ def symm (e : L₁ ≃ₗ⁅R⁆ L₂) : L₂ ≃ₗ⁅R⁆ L₁ :=
355
361
..e.to_linear_equiv.symm }
356
362
357
363
@[simp] lemma symm_symm (e : L₁ ≃ₗ⁅R⁆ L₂) : e.symm.symm = e :=
358
- by { cases e , refl, }
364
+ by { rcases e with ⟨⟨⟨⟩⟩⟩ , refl, }
359
365
360
366
@[simp] lemma apply_symm_apply (e : L₁ ≃ₗ⁅R⁆ L₂) : ∀ x, e (e.symm x) = x :=
361
367
e.to_linear_equiv.apply_symm_apply
0 commit comments