geometry.manifold.algebra.left_invariant_derivation
โท
Mathlib.Geometry.Manifold.Algebra.LeftInvariantDerivation
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -323,7 +323,7 @@ instance : Bracket (LeftInvariantDerivation I G) (LeftInvariantDerivation I G)
have hX := Derivation.congr_fun (left_invariant' g X) (Y f)
have hY := Derivation.congr_fun (left_invariant' g Y) (X f)
rw [apply_hfdifferential, apply_fdifferential, Derivation.evalAt_apply] at hX hY โข
- rw [comp_L] at hX hY
+ rw [comp_L] at hX hY
rw [Derivation.commutator_apply, SmoothMap.coe_sub, Pi.sub_apply, coe_derivation]
rw [coe_derivation] at hX hY โข
rw [hX, hY]
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,8 +3,8 @@ Copyright ยฉ 2020 Nicolรฒ Cavalleri. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Nicolรฒ Cavalleri
-/
-import Mathbin.RingTheory.Derivation.Lie
-import Mathbin.Geometry.Manifold.DerivationBundle
+import RingTheory.Derivation.Lie
+import Geometry.Manifold.DerivationBundle
#align_import geometry.manifold.algebra.left_invariant_derivation from "leanprover-community/mathlib"@"2fe465deb81bcd7ccafa065bb686888a82f15372"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,15 +2,12 @@
Copyright ยฉ 2020 Nicolรฒ Cavalleri. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Nicolรฒ Cavalleri
-
-! This file was ported from Lean 3 source module geometry.manifold.algebra.left_invariant_derivation
-! leanprover-community/mathlib commit 2fe465deb81bcd7ccafa065bb686888a82f15372
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.RingTheory.Derivation.Lie
import Mathbin.Geometry.Manifold.DerivationBundle
+#align_import geometry.manifold.algebra.left_invariant_derivation from "leanprover-community/mathlib"@"2fe465deb81bcd7ccafa065bb686888a82f15372"
+
/-!
# Left invariant derivations
mathlib commit https://github.com/leanprover-community/mathlib/commit/2fe465deb81bcd7ccafa065bb686888a82f15372
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Nicolรฒ Cavalleri
! This file was ported from Lean 3 source module geometry.manifold.algebra.left_invariant_derivation
-! leanprover-community/mathlib commit b608348ffaeb7f557f2fd46876037abafd326ff3
+! leanprover-community/mathlib commit 2fe465deb81bcd7ccafa065bb686888a82f15372
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -15,6 +15,9 @@ import Mathbin.Geometry.Manifold.DerivationBundle
# Left invariant derivations
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
In this file we define the concept of left invariant derivation for a Lie group. The concept is
analogous to the more classical concept of left invariant vector fields, and it holds that the
derivation associated to a vector field is left invariant iff the field is.
mathlib commit https://github.com/leanprover-community/mathlib/commit/8905e5ed90859939681a725b00f6063e65096d95
@@ -38,6 +38,7 @@ variable {๐ : Type _} [NontriviallyNormedField ๐] {E : Type _} [NormedAddC
private def disable_has_sizeof {ฮฑ} : SizeOf ฮฑ :=
โจfun _ => 0โฉ
+#print LeftInvariantDerivation /-
/-- Left-invariant global derivations.
A global derivation is left-invariant if it is equal to its pullback along left multiplication by
@@ -49,6 +50,7 @@ structure LeftInvariantDerivation extends Derivation ๐ C^โโฎI, G; ๐โฏ
๐
โ (smoothLeftMul_one I g) (Derivation.evalAt 1 to_derivation) =
Derivation.evalAt g to_derivation
#align left_invariant_derivation LeftInvariantDerivation
+-/
variable {I G}
@@ -63,9 +65,11 @@ instance : CoeFun (LeftInvariantDerivation I G) fun _ => C^โโฎI, G; ๐โฏ
variable {M : Type _} [TopologicalSpace M] [ChartedSpace H M] {x : M} {r : ๐}
{X Y : LeftInvariantDerivation I G} {f f' : C^โโฎI, G; ๐โฏ}
+#print LeftInvariantDerivation.toFun_eq_coe /-
theorem toFun_eq_coe : X.toFun = โX :=
rfl
#align left_invariant_derivation.to_fun_eq_coe LeftInvariantDerivation.toFun_eq_coe
+-/
theorem coe_to_linearMap : โ(X : C^โโฎI, G; ๐โฏ โโ[๐] C^โโฎI, G; ๐โฏ) = X :=
rfl
@@ -76,64 +80,86 @@ theorem toDerivation_eq_coe : X.toDerivation = X :=
rfl
#align left_invariant_derivation.to_derivation_eq_coe LeftInvariantDerivation.toDerivation_eq_coe
+#print LeftInvariantDerivation.coe_injective /-
theorem coe_injective :
@Function.Injective (LeftInvariantDerivation I G) (_ โ C^โคโฎI, G; ๐โฏ) coeFn := fun X Y h => by
cases X; cases Y; congr; exact Derivation.coe_injective h
#align left_invariant_derivation.coe_injective LeftInvariantDerivation.coe_injective
+-/
+#print LeftInvariantDerivation.ext /-
@[ext]
theorem ext (h : โ f, X f = Y f) : X = Y :=
coe_injective <| funext h
#align left_invariant_derivation.ext LeftInvariantDerivation.ext
+-/
variable (X Y f)
+#print LeftInvariantDerivation.coe_derivation /-
theorem coe_derivation :
โ(X : Derivation ๐ C^โโฎI, G; ๐โฏ C^โโฎI, G; ๐โฏ) = (X : C^โโฎI, G; ๐โฏ โ C^โโฎI, G; ๐โฏ) :=
rfl
#align left_invariant_derivation.coe_derivation LeftInvariantDerivation.coe_derivation
+-/
-theorem coe_derivation_injective :
+#print LeftInvariantDerivation.toDerivation_injective /-
+theorem toDerivation_injective :
Function.Injective
(coe : LeftInvariantDerivation I G โ Derivation ๐ C^โโฎI, G; ๐โฏ C^โโฎI, G; ๐โฏ) :=
fun X Y h => by cases X; cases Y; congr; exact h
-#align left_invariant_derivation.coe_derivation_injective LeftInvariantDerivation.coe_derivation_injective
+#align left_invariant_derivation.coe_derivation_injective LeftInvariantDerivation.toDerivation_injective
+-/
+#print LeftInvariantDerivation.left_invariant' /-
/-- Premature version of the lemma. Prefer using `left_invariant` instead. -/
theorem left_invariant' :
๐
โ (smoothLeftMul_one I g) (Derivation.evalAt (1 : G) โX) = Derivation.evalAt g โX :=
left_invariant'' X g
#align left_invariant_derivation.left_invariant' LeftInvariantDerivation.left_invariant'
+-/
+#print LeftInvariantDerivation.map_add /-
@[simp]
theorem map_add : X (f + f') = X f + X f' :=
Derivation.map_add X f f'
#align left_invariant_derivation.map_add LeftInvariantDerivation.map_add
+-/
+#print LeftInvariantDerivation.map_zero /-
@[simp]
theorem map_zero : X 0 = 0 :=
Derivation.map_zero X
#align left_invariant_derivation.map_zero LeftInvariantDerivation.map_zero
+-/
+#print LeftInvariantDerivation.map_neg /-
@[simp]
theorem map_neg : X (-f) = -X f :=
Derivation.map_neg X f
#align left_invariant_derivation.map_neg LeftInvariantDerivation.map_neg
+-/
+#print LeftInvariantDerivation.map_sub /-
@[simp]
theorem map_sub : X (f - f') = X f - X f' :=
Derivation.map_sub X f f'
#align left_invariant_derivation.map_sub LeftInvariantDerivation.map_sub
+-/
+#print LeftInvariantDerivation.map_smul /-
@[simp]
theorem map_smul : X (r โข f) = r โข X f :=
Derivation.map_smul X r f
#align left_invariant_derivation.map_smul LeftInvariantDerivation.map_smul
+-/
+#print LeftInvariantDerivation.leibniz /-
@[simp]
theorem leibniz : X (f * f') = f โข X f' + f' โข X f :=
X.leibniz' _ _
#align left_invariant_derivation.leibniz LeftInvariantDerivation.leibniz
+-/
instance : Zero (LeftInvariantDerivation I G) :=
โจโจ0, fun g => by simp only [LinearMap.map_zero, Derivation.coe_zero]โฉโฉ
@@ -151,44 +177,60 @@ instance : Neg (LeftInvariantDerivation I G) where neg X := โจ-X, fun g => by s
instance : Sub (LeftInvariantDerivation I G)
where sub X Y := โจX - Y, fun g => by simp [left_invariant']โฉ
+#print LeftInvariantDerivation.coe_add /-
@[simp]
theorem coe_add : โ(X + Y) = X + Y :=
rfl
#align left_invariant_derivation.coe_add LeftInvariantDerivation.coe_add
+-/
+#print LeftInvariantDerivation.coe_zero /-
@[simp]
theorem coe_zero : โ(0 : LeftInvariantDerivation I G) = 0 :=
rfl
#align left_invariant_derivation.coe_zero LeftInvariantDerivation.coe_zero
+-/
+#print LeftInvariantDerivation.coe_neg /-
@[simp]
theorem coe_neg : โ(-X) = -X :=
rfl
#align left_invariant_derivation.coe_neg LeftInvariantDerivation.coe_neg
+-/
+#print LeftInvariantDerivation.coe_sub /-
@[simp]
theorem coe_sub : โ(X - Y) = X - Y :=
rfl
#align left_invariant_derivation.coe_sub LeftInvariantDerivation.coe_sub
+-/
+#print LeftInvariantDerivation.lift_add /-
@[simp, norm_cast]
theorem lift_add : (โ(X + Y) : Derivation ๐ C^โโฎI, G; ๐โฏ C^โโฎI, G; ๐โฏ) = X + Y :=
rfl
#align left_invariant_derivation.lift_add LeftInvariantDerivation.lift_add
+-/
+#print LeftInvariantDerivation.lift_zero /-
@[simp, norm_cast]
theorem lift_zero :
(โ(0 : LeftInvariantDerivation I G) : Derivation ๐ C^โโฎI, G; ๐โฏ C^โโฎI, G; ๐โฏ) = 0 :=
rfl
#align left_invariant_derivation.lift_zero LeftInvariantDerivation.lift_zero
+-/
+#print LeftInvariantDerivation.hasNatScalar /-
instance hasNatScalar : SMul โ (LeftInvariantDerivation I G)
where smul r X := โจr โข X, fun g => by simp_rw [LinearMap.map_smul_of_tower, left_invariant']โฉ
#align left_invariant_derivation.has_nat_scalar LeftInvariantDerivation.hasNatScalar
+-/
+#print LeftInvariantDerivation.hasIntScalar /-
instance hasIntScalar : SMul โค (LeftInvariantDerivation I G)
where smul r X := โจr โข X, fun g => by simp_rw [LinearMap.map_smul_of_tower, left_invariant']โฉ
#align left_invariant_derivation.has_int_scalar LeftInvariantDerivation.hasIntScalar
+-/
instance : AddCommGroup (LeftInvariantDerivation I G) :=
coe_injective.AddCommGroup _ coe_zero coe_add coe_neg coe_sub (fun _ _ => rfl) fun _ _ => rfl
@@ -198,29 +240,36 @@ instance : SMul ๐ (LeftInvariantDerivation I G)
variable (r X)
+#print LeftInvariantDerivation.coe_smul /-
@[simp]
theorem coe_smul : โ(r โข X) = r โข X :=
rfl
#align left_invariant_derivation.coe_smul LeftInvariantDerivation.coe_smul
+-/
+#print LeftInvariantDerivation.lift_smul /-
@[simp]
theorem lift_smul (k : ๐) : (โ(k โข X) : Derivation ๐ C^โโฎI, G; ๐โฏ C^โโฎI, G; ๐โฏ) = k โข X :=
rfl
#align left_invariant_derivation.lift_smul LeftInvariantDerivation.lift_smul
+-/
variable (I G)
+#print LeftInvariantDerivation.coeFnAddMonoidHom /-
/-- The coercion to function is a monoid homomorphism. -/
@[simps]
def coeFnAddMonoidHom : LeftInvariantDerivation I G โ+ C^โโฎI, G; ๐โฏ โ C^โโฎI, G; ๐โฏ :=
โจfun X => X.toDerivation.toFun, coe_zero, coe_addโฉ
#align left_invariant_derivation.coe_fn_add_monoid_hom LeftInvariantDerivation.coeFnAddMonoidHom
+-/
variable {I G}
instance : Module ๐ (LeftInvariantDerivation I G) :=
coe_injective.Module _ (coeFnAddMonoidHom I G) coe_smul
+#print LeftInvariantDerivation.evalAt /-
/-- Evaluation at a point for left invariant derivation. Same thing as for generic global
derivations (`derivation.eval_at`). -/
def evalAt : LeftInvariantDerivation I G โโ[๐] PointDerivation I g
@@ -229,31 +278,42 @@ def evalAt : LeftInvariantDerivation I G โโ[๐] PointDerivation I g
map_add' X Y := rfl
map_smul' k X := rfl
#align left_invariant_derivation.eval_at LeftInvariantDerivation.evalAt
+-/
+#print LeftInvariantDerivation.evalAt_apply /-
theorem evalAt_apply : evalAt g X f = (X f) g :=
rfl
#align left_invariant_derivation.eval_at_apply LeftInvariantDerivation.evalAt_apply
+-/
+#print LeftInvariantDerivation.evalAt_coe /-
@[simp]
theorem evalAt_coe : Derivation.evalAt g โX = evalAt g X :=
rfl
#align left_invariant_derivation.eval_at_coe LeftInvariantDerivation.evalAt_coe
+-/
+#print LeftInvariantDerivation.left_invariant /-
theorem left_invariant : ๐
โ (smoothLeftMul_one I g) (evalAt (1 : G) X) = evalAt g X :=
X.left_invariant'' g
#align left_invariant_derivation.left_invariant LeftInvariantDerivation.left_invariant
+-/
+#print LeftInvariantDerivation.evalAt_mul /-
theorem evalAt_mul : evalAt (g * h) X = ๐
โ (L_apply I g h) (evalAt h X) := by ext f;
rw [โ left_invariant, apply_hfdifferential, apply_hfdifferential, L_mul, fdifferential_comp,
apply_fdifferential, LinearMap.comp_apply, apply_fdifferential, โ apply_hfdifferential,
left_invariant]
#align left_invariant_derivation.eval_at_mul LeftInvariantDerivation.evalAt_mul
+-/
+#print LeftInvariantDerivation.comp_L /-
theorem comp_L : (X f).comp (๐ณ I g) = X (f.comp (๐ณ I g)) := by
ext h <;>
rw [ContMDiffMap.comp_apply, L_apply, โ eval_at_apply, eval_at_mul, apply_hfdifferential,
apply_fdifferential, eval_at_apply]
#align left_invariant_derivation.comp_L LeftInvariantDerivation.comp_L
+-/
instance : Bracket (LeftInvariantDerivation I G) (LeftInvariantDerivation I G)
where bracket X Y :=
@@ -269,6 +329,7 @@ instance : Bracket (LeftInvariantDerivation I G) (LeftInvariantDerivation I G)
rw [hX, hY]
rflโฉ
+#print LeftInvariantDerivation.commutator_coe_derivation /-
@[simp]
theorem commutator_coe_derivation :
โโ
X, Yโ =
@@ -276,10 +337,13 @@ theorem commutator_coe_derivation :
Derivation ๐ C^โโฎI, G; ๐โฏ C^โโฎI, G; ๐โฏ) :=
rfl
#align left_invariant_derivation.commutator_coe_derivation LeftInvariantDerivation.commutator_coe_derivation
+-/
+#print LeftInvariantDerivation.commutator_apply /-
theorem commutator_apply : โ
X, Yโ f = X (Y f) - Y (X f) :=
rfl
#align left_invariant_derivation.commutator_apply LeftInvariantDerivation.commutator_apply
+-/
instance : LieRing (LeftInvariantDerivation I G)
where
mathlib commit https://github.com/leanprover-community/mathlib/commit/fdc286cc6967a012f41b87f76dcd2797b53152af
@@ -31,7 +31,7 @@ open scoped LieGroup Manifold Derivation
variable {๐ : Type _} [NontriviallyNormedField ๐] {E : Type _} [NormedAddCommGroup E]
[NormedSpace ๐ E] {H : Type _} [TopologicalSpace H] (I : ModelWithCorners ๐ E H) (G : Type _)
- [TopologicalSpace G] [ChartedSpace H G] [Monoid G] [HasSmoothMul I G] (g h : G)
+ [TopologicalSpace G] [ChartedSpace H G] [Monoid G] [SmoothMul I G] (g h : G)
-- Generate trivial has_sizeof instance. It prevents weird type class inference timeout problems
@[local nolint instance_priority, local instance 10000]
mathlib commit https://github.com/leanprover-community/mathlib/commit/93f880918cb51905fd51b76add8273cbc27718ab
@@ -251,7 +251,7 @@ theorem evalAt_mul : evalAt (g * h) X = ๐
โ (L_apply I g h) (evalAt h X) :=
theorem comp_L : (X f).comp (๐ณ I g) = X (f.comp (๐ณ I g)) := by
ext h <;>
- rw [ContMdiffMap.comp_apply, L_apply, โ eval_at_apply, eval_at_mul, apply_hfdifferential,
+ rw [ContMDiffMap.comp_apply, L_apply, โ eval_at_apply, eval_at_mul, apply_hfdifferential,
apply_fdifferential, eval_at_apply]
#align left_invariant_derivation.comp_L LeftInvariantDerivation.comp_L
mathlib commit https://github.com/leanprover-community/mathlib/commit/34ebaffc1d1e8e783fc05438ec2e70af87275ac9
@@ -4,10 +4,11 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Nicolรฒ Cavalleri
! This file was ported from Lean 3 source module geometry.manifold.algebra.left_invariant_derivation
-! leanprover-community/mathlib commit d1bd9c5df2867c1cb463bc6364446d57bdd9f7f1
+! leanprover-community/mathlib commit b608348ffaeb7f557f2fd46876037abafd326ff3
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
+import Mathbin.RingTheory.Derivation.Lie
import Mathbin.Geometry.Manifold.DerivationBundle
/-!
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -77,7 +77,7 @@ theorem toDerivation_eq_coe : X.toDerivation = X :=
theorem coe_injective :
@Function.Injective (LeftInvariantDerivation I G) (_ โ C^โคโฎI, G; ๐โฏ) coeFn := fun X Y h => by
- cases X; cases Y; congr ; exact Derivation.coe_injective h
+ cases X; cases Y; congr; exact Derivation.coe_injective h
#align left_invariant_derivation.coe_injective LeftInvariantDerivation.coe_injective
@[ext]
@@ -95,7 +95,7 @@ theorem coe_derivation :
theorem coe_derivation_injective :
Function.Injective
(coe : LeftInvariantDerivation I G โ Derivation ๐ C^โโฎI, G; ๐โฏ C^โโฎI, G; ๐โฏ) :=
- fun X Y h => by cases X; cases Y; congr ; exact h
+ fun X Y h => by cases X; cases Y; congr; exact h
#align left_invariant_derivation.coe_derivation_injective LeftInvariantDerivation.coe_derivation_injective
/-- Premature version of the lemma. Prefer using `left_invariant` instead. -/
@@ -261,10 +261,10 @@ instance : Bracket (LeftInvariantDerivation I G) (LeftInvariantDerivation I G)
ext f
have hX := Derivation.congr_fun (left_invariant' g X) (Y f)
have hY := Derivation.congr_fun (left_invariant' g Y) (X f)
- rw [apply_hfdifferential, apply_fdifferential, Derivation.evalAt_apply] at hX hYโข
- rw [comp_L] at hX hY
+ rw [apply_hfdifferential, apply_fdifferential, Derivation.evalAt_apply] at hX hY โข
+ rw [comp_L] at hX hY
rw [Derivation.commutator_apply, SmoothMap.coe_sub, Pi.sub_apply, coe_derivation]
- rw [coe_derivation] at hX hYโข
+ rw [coe_derivation] at hX hY โข
rw [hX, hY]
rflโฉ
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -26,7 +26,7 @@ implementing one of the possible definitions of the Lie algebra attached to a Li
noncomputable section
-open LieGroup Manifold Derivation
+open scoped LieGroup Manifold Derivation
variable {๐ : Type _} [NontriviallyNormedField ๐] {E : Type _} [NormedAddCommGroup E]
[NormedSpace ๐ E] {H : Type _} [TopologicalSpace H] (I : ModelWithCorners ๐ E H) (G : Type _)
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -76,12 +76,8 @@ theorem toDerivation_eq_coe : X.toDerivation = X :=
#align left_invariant_derivation.to_derivation_eq_coe LeftInvariantDerivation.toDerivation_eq_coe
theorem coe_injective :
- @Function.Injective (LeftInvariantDerivation I G) (_ โ C^โคโฎI, G; ๐โฏ) coeFn := fun X Y h =>
- by
- cases X
- cases Y
- congr
- exact Derivation.coe_injective h
+ @Function.Injective (LeftInvariantDerivation I G) (_ โ C^โคโฎI, G; ๐โฏ) coeFn := fun X Y h => by
+ cases X; cases Y; congr ; exact Derivation.coe_injective h
#align left_invariant_derivation.coe_injective LeftInvariantDerivation.coe_injective
@[ext]
@@ -99,11 +95,7 @@ theorem coe_derivation :
theorem coe_derivation_injective :
Function.Injective
(coe : LeftInvariantDerivation I G โ Derivation ๐ C^โโฎI, G; ๐โฏ C^โโฎI, G; ๐โฏ) :=
- fun X Y h => by
- cases X
- cases Y
- congr
- exact h
+ fun X Y h => by cases X; cases Y; congr ; exact h
#align left_invariant_derivation.coe_derivation_injective LeftInvariantDerivation.coe_derivation_injective
/-- Premature version of the lemma. Prefer using `left_invariant` instead. -/
@@ -250,9 +242,7 @@ theorem left_invariant : ๐
โ (smoothLeftMul_one I g) (evalAt (1 : G) X) = ev
X.left_invariant'' g
#align left_invariant_derivation.left_invariant LeftInvariantDerivation.left_invariant
-theorem evalAt_mul : evalAt (g * h) X = ๐
โ (L_apply I g h) (evalAt h X) :=
- by
- ext f
+theorem evalAt_mul : evalAt (g * h) X = ๐
โ (L_apply I g h) (evalAt h X) := by ext f;
rw [โ left_invariant, apply_hfdifferential, apply_hfdifferential, L_mul, fdifferential_comp,
apply_fdifferential, LinearMap.comp_apply, apply_fdifferential, โ apply_hfdifferential,
left_invariant]
@@ -293,27 +283,22 @@ theorem commutator_apply : โ
X, Yโ f = X (Y f) - Y (X f) :=
instance : LieRing (LeftInvariantDerivation I G)
where
add_lie X Y Z := by
- ext1
+ ext1;
simp only [commutator_apply, coe_add, Pi.add_apply, LinearMap.map_add,
LeftInvariantDerivation.map_add]
ring
lie_add X Y Z := by
- ext1
+ ext1;
simp only [commutator_apply, coe_add, Pi.add_apply, LinearMap.map_add,
LeftInvariantDerivation.map_add]
ring
- lie_self X := by
- ext1
- simp only [commutator_apply, sub_self]
- rfl
+ lie_self X := by ext1; simp only [commutator_apply, sub_self]; rfl
leibniz_lie X Y Z := by
- ext1
- simp only [commutator_apply, coe_add, coe_sub, map_sub, Pi.add_apply]
+ ext1; simp only [commutator_apply, coe_add, coe_sub, map_sub, Pi.add_apply]
ring
instance : LieAlgebra ๐ (LeftInvariantDerivation I G)
- where lie_smul r Y Z := by
- ext1
+ where lie_smul r Y Z := by ext1;
simp only [commutator_apply, map_smul, smul_sub, coe_smul, Pi.smul_apply]
end LeftInvariantDerivation
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -36,7 +36,6 @@ variable {๐ : Type _} [NontriviallyNormedField ๐] {E : Type _} [NormedAddC
@[local nolint instance_priority, local instance 10000]
private def disable_has_sizeof {ฮฑ} : SizeOf ฮฑ :=
โจfun _ => 0โฉ
-#align disable_has_sizeof disable_has_sizeof
/-- Left-invariant global derivations.
mathlib commit https://github.com/leanprover-community/mathlib/commit/09079525fd01b3dda35e96adaa08d2f943e1648c
@@ -33,7 +33,7 @@ variable {๐ : Type _} [NontriviallyNormedField ๐] {E : Type _} [NormedAddC
[TopologicalSpace G] [ChartedSpace H G] [Monoid G] [HasSmoothMul I G] (g h : G)
-- Generate trivial has_sizeof instance. It prevents weird type class inference timeout problems
-@[local nolint instance_priority, local instance]
+@[local nolint instance_priority, local instance 10000]
private def disable_has_sizeof {ฮฑ} : SizeOf ฮฑ :=
โจfun _ => 0โฉ
#align disable_has_sizeof disable_has_sizeof
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
@@ -31,6 +31,7 @@ variable {๐ : Type*} [NontriviallyNormedField ๐] {E : Type*} [NormedAddCom
[TopologicalSpace G] [ChartedSpace H G] [Monoid G] [SmoothMul I G] (g h : G)
-- Generate trivial has_sizeof instance. It prevents weird type class inference timeout problems
+-- Porting note(#12096): removed @[nolint instance_priority], linter not ported yet
-- @[local nolint instance_priority, local instance 10000]
-- private def disable_has_sizeof {ฮฑ} : SizeOf ฮฑ :=
-- โจfun _ => 0โฉ
The FunLike hierarchy is very big and gets scanned through each time we need a coercion (via the CoeFun
instance). It looks like unbundled inheritance suits Lean 4 better here. The only class that still extends FunLike
is EquivLike
, since that has a custom coe_injective'
field that is easier to implement. All other classes should take FunLike
or EquivLike
as a parameter.
Previously, morphism classes would be Type
-valued and extend FunLike
:
/-- `MyHomClass F A B` states that `F` is a type of `MyClass.op`-preserving morphisms.
You should extend this class when you extend `MyHom`. -/
class MyHomClass (F : Type*) (A B : outParam <| Type*) [MyClass A] [MyClass B]
extends FunLike F A B :=
(map_op : โ (f : F) (x y : A), f (MyClass.op x y) = MyClass.op (f x) (f y))
After this PR, they should be Prop
-valued and take FunLike
as a parameter:
/-- `MyHomClass F A B` states that `F` is a type of `MyClass.op`-preserving morphisms.
You should extend this class when you extend `MyHom`. -/
class MyHomClass (F : Type*) (A B : outParam <| Type*) [MyClass A] [MyClass B]
[FunLike F A B] : Prop :=
(map_op : โ (f : F) (x y : A), f (MyClass.op x y) = MyClass.op (f x) (f y))
(Note that A B
stay marked as outParam
even though they are not purely required to be so due to the FunLike
parameter already filling them in. This is required to see through type synonyms, which is important in the category theory library. Also, I think keeping them as outParam
is slightly faster.)
Similarly, MyEquivClass
should take EquivLike
as a parameter.
As a result, every mention of [MyHomClass F A B]
should become [FunLike F A B] [MyHomClass F A B]
.
While overall this gives some great speedups, there are some cases that are noticeably slower. In particular, a failing application of a lemma such as map_mul
is more expensive. This is due to suboptimal processing of arguments. For example:
variable [FunLike F M N] [Mul M] [Mul N] (f : F) (x : M) (y : M)
theorem map_mul [MulHomClass F M N] : f (x * y) = f x * f y
example [AddHomClass F A B] : f (x * y) = f x * f y := map_mul f _ _
Before this PR, applying map_mul f
gives the goals [Mul ?M] [Mul ?N] [MulHomClass F ?M ?N]
. Since M
and N
are out_param
s, [MulHomClass F ?M ?N]
is synthesized first, supplies values for ?M
and ?N
and then the Mul M
and Mul N
instances can be found.
After this PR, the goals become [FunLike F ?M ?N] [Mul ?M] [Mul ?N] [MulHomClass F ?M ?N]
. Now [FunLike F ?M ?N]
is synthesized first, supplies values for ?M
and ?N
and then the Mul M
and Mul N
instances can be found, before trying MulHomClass F M N
which fails. Since the Mul
hierarchy is very big, this can be slow to fail, especially when there is no such Mul
instance.
A long-term but harder to achieve solution would be to specify the order in which instance goals get solved. For example, we'd like to change the arguments to map_mul
to look like [FunLike F M N] [Mul M] [Mul N] [highPriority <| MulHomClass F M N]
because MulHomClass
fails or succeeds much faster than the others.
As a consequence, the simpNF
linter is much slower since by design it tries and fails to apply many map_
lemmas. The same issue occurs a few times in existing calls to simp [map_mul]
, where map_mul
is tried "too soon" and fails. Thanks to the speedup of leanprover/lean4#2478 the impact is very limited, only in files that already were close to the timeout.
simp
not firing sometimesThis affects map_smulโโ
and related definitions. For simp
lemmas Lean apparently uses a slightly different mechanism to find instances, so that rw
can find every argument to map_smulโโ
successfully but simp
can't: leanprover/lean4#3701.
Especially in the category theory library, we might sometimes have a type A
which is also accessible as a synonym (Bundled A hA).1
. Instance synthesis doesn't always work if we have f : A โ* B
but x * y : (Bundled A hA).1
or vice versa. This seems to be mostly fixed by keeping A B
as outParam
s in MulHomClass F A B
. (Presumably because Lean will do a definitional check A =?= (Bundled A hA).1
instead of using the syntax in the discrimination tree.)
The timeouts can be worked around for now by specifying which map_mul
we mean, either as map_mul f
for some explicit f
, or as e.g. MonoidHomClass.map_mul
.
map_smulโโ
not firing as simp
lemma can be worked around by going back to the pre-FunLike situation and making LinearMap.map_smulโโ
a simp
lemma instead of the generic map_smulโโ
. Writing simp [map_smulโโ _]
also works.
Co-authored-by: Matthew Ballard <matt@mrb.email> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Scott Morrison <scott@tqft.net> Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com>
@@ -60,15 +60,14 @@ theorem toDerivation_injective :
fun X Y h => by cases X; cases Y; congr
#align left_invariant_derivation.coe_derivation_injective LeftInvariantDerivation.toDerivation_injective
-instance : LinearMapClass (LeftInvariantDerivation I G) ๐ C^โโฎI, G; ๐โฏ C^โโฎI, G; ๐โฏ where
+instance : FunLike (LeftInvariantDerivation I G) C^โโฎI, G; ๐โฏ C^โโฎI, G; ๐โฏ where
coe f := f.toDerivation
coe_injective' _ _ h := toDerivation_injective <| DFunLike.ext' h
+
+instance : LinearMapClass (LeftInvariantDerivation I G) ๐ C^โโฎI, G; ๐โฏ C^โโฎI, G; ๐โฏ where
map_add f := map_add f.1
map_smulโโ f := map_smul f.1.1
-instance : CoeFun (LeftInvariantDerivation I G) fun _ => C^โโฎI, G; ๐โฏ โ C^โโฎI, G; ๐โฏ :=
- โจDFunLike.coeโฉ
-
variable {M : Type*} [TopologicalSpace M] [ChartedSpace H M] {x : M} {r : ๐}
{X Y : LeftInvariantDerivation I G} {f f' : C^โโฎI, G; ๐โฏ}
@@ -140,18 +139,10 @@ instance : Add (LeftInvariantDerivation I G) where
simp only [map_add, Derivation.coe_add, left_invariant', Pi.add_apply]โฉ
instance : Neg (LeftInvariantDerivation I G) where
- neg X := โจ-X, fun g => by
- -- porting note: was simp [left_invariant']
- -- `rw` fails without detailed type annotations too; also it needs a lot of time
- rw [map_neg (Derivation.evalAt (๐ := ๐) (1 : G)), map_neg (๐
โ (smoothLeftMul_one I g)),
- left_invariant', map_neg (Derivation.evalAt (๐ := ๐) g)]โฉ
+ neg X := โจ-X, fun g => by simp [left_invariant']โฉ
instance : Sub (LeftInvariantDerivation I G) where
- sub X Y := โจX - Y, fun g => by
- -- porting note: was simp [left_invariant']
- -- `rw` fails without detailed type annotations too; also it needs a lot of time
- rw [map_sub (Derivation.evalAt (๐ := ๐) (1 : G)), map_sub (๐
โ (smoothLeftMul_one I g)),
- map_sub (Derivation.evalAt (๐ := ๐) g), left_invariant', left_invariant']โฉ
+ sub X Y := โจX - Y, fun g => by simp [left_invariant']โฉ
@[simp]
theorem coe_add : โ(X + Y) = X + Y :=
FunLike
to DFunLike
(#9785)
This prepares for the introduction of a non-dependent synonym of FunLike, which helps a lot with keeping #8386 readable.
This is entirely search-and-replace in 680197f combined with manual fixes in 4145626, e900597 and b8428f8. The commands that generated this change:
sed -i 's/\bFunLike\b/DFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\btoFunLike\b/toDFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/import Mathlib.Data.DFunLike/import Mathlib.Data.FunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\bHom_FunLike\b/Hom_DFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\binstFunLike\b/instDFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\bfunLike\b/instDFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\btoo many metavariables to apply `fun_like.has_coe_to_fun`/too many metavariables to apply `DFunLike.hasCoeToFun`/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com>
@@ -62,12 +62,12 @@ theorem toDerivation_injective :
instance : LinearMapClass (LeftInvariantDerivation I G) ๐ C^โโฎI, G; ๐โฏ C^โโฎI, G; ๐โฏ where
coe f := f.toDerivation
- coe_injective' _ _ h := toDerivation_injective <| FunLike.ext' h
+ coe_injective' _ _ h := toDerivation_injective <| DFunLike.ext' h
map_add f := map_add f.1
map_smulโโ f := map_smul f.1.1
instance : CoeFun (LeftInvariantDerivation I G) fun _ => C^โโฎI, G; ๐โฏ โ C^โโฎI, G; ๐โฏ :=
- โจFunLike.coeโฉ
+ โจDFunLike.coeโฉ
variable {M : Type*} [TopologicalSpace M] [ChartedSpace H M] {x : M} {r : ๐}
{X Y : LeftInvariantDerivation I G} {f f' : C^โโฎI, G; ๐โฏ}
@@ -82,12 +82,12 @@ theorem toFun_eq_coe : X.toFun = โX :=
#noalign left_invariant_derivation.to_derivation_eq_coe
theorem coe_injective :
- @Function.Injective (LeftInvariantDerivation I G) (_ โ C^โโฎI, G; ๐โฏ) FunLike.coe :=
- FunLike.coe_injective
+ @Function.Injective (LeftInvariantDerivation I G) (_ โ C^โโฎI, G; ๐โฏ) DFunLike.coe :=
+ DFunLike.coe_injective
#align left_invariant_derivation.coe_injective LeftInvariantDerivation.coe_injective
@[ext]
-theorem ext (h : โ f, X f = Y f) : X = Y := FunLike.ext _ _ h
+theorem ext (h : โ f, X f = Y f) : X = Y := DFunLike.ext _ _ h
#align left_invariant_derivation.ext LeftInvariantDerivation.ext
variable (X Y f)
@@ -215,7 +215,7 @@ variable (I G)
/-- The coercion to function is a monoid homomorphism. -/
@[simps]
def coeFnAddMonoidHom : LeftInvariantDerivation I G โ+ C^โโฎI, G; ๐โฏ โ C^โโฎI, G; ๐โฏ :=
- โจโจFunLike.coe, coe_zeroโฉ, coe_addโฉ
+ โจโจDFunLike.coe, coe_zeroโฉ, coe_addโฉ
#align left_invariant_derivation.coe_fn_add_monoid_hom LeftInvariantDerivation.coeFnAddMonoidHom
variable {I G}
Due to recent changes in core we can reduce or remove many set_option maxHeartbeats
statements.
I have tried to be careful to not leave anything too close to the line, so don't be surprised if some of these can still be reduced further.
This reduces us from 96 maxHeartbeats
statements to 44
. (There are 10 false positives in meta or testing code.)
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@@ -146,7 +146,6 @@ instance : Neg (LeftInvariantDerivation I G) where
rw [map_neg (Derivation.evalAt (๐ := ๐) (1 : G)), map_neg (๐
โ (smoothLeftMul_one I g)),
left_invariant', map_neg (Derivation.evalAt (๐ := ๐) g)]โฉ
-set_option maxHeartbeats 300000 in
instance : Sub (LeftInvariantDerivation I G) where
sub X Y := โจX - Y, fun g => by
-- porting note: was simp [left_invariant']
@@ -251,7 +251,8 @@ theorem evalAt_mul : evalAt (g * h) X = ๐
โ (L_apply I g h) (evalAt h X) :=
apply_fdifferential]
-- Porting note: more agressive here
erw [LinearMap.comp_apply]
- rw [apply_fdifferential, โ apply_hfdifferential, left_invariant]
+ -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
+ erw [apply_fdifferential, โ apply_hfdifferential, left_invariant]
#align left_invariant_derivation.eval_at_mul LeftInvariantDerivation.evalAt_mul
theorem comp_L : (X f).comp (๐ณ I g) = X (f.comp (๐ณ I g)) := by
@@ -251,8 +251,7 @@ theorem evalAt_mul : evalAt (g * h) X = ๐
โ (L_apply I g h) (evalAt h X) :=
apply_fdifferential]
-- Porting note: more agressive here
erw [LinearMap.comp_apply]
- -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
- erw [apply_fdifferential, โ apply_hfdifferential, left_invariant]
+ rw [apply_fdifferential, โ apply_hfdifferential, left_invariant]
#align left_invariant_derivation.eval_at_mul LeftInvariantDerivation.evalAt_mul
theorem comp_L : (X f).comp (๐ณ I g) = X (f.comp (๐ณ I g)) := by
@@ -251,7 +251,8 @@ theorem evalAt_mul : evalAt (g * h) X = ๐
โ (L_apply I g h) (evalAt h X) :=
apply_fdifferential]
-- Porting note: more agressive here
erw [LinearMap.comp_apply]
- rw [apply_fdifferential, โ apply_hfdifferential, left_invariant]
+ -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
+ erw [apply_fdifferential, โ apply_hfdifferential, left_invariant]
#align left_invariant_derivation.eval_at_mul LeftInvariantDerivation.evalAt_mul
theorem comp_L : (X f).comp (๐ณ I g) = X (f.comp (๐ณ I g)) := by
@@ -139,7 +139,6 @@ instance : Add (LeftInvariantDerivation I G) where
โจX + Y, fun g => by
simp only [map_add, Derivation.coe_add, left_invariant', Pi.add_apply]โฉ
-set_option maxHeartbeats 400000 in
instance : Neg (LeftInvariantDerivation I G) where
neg X := โจ-X, fun g => by
-- porting note: was simp [left_invariant']
@@ -147,7 +146,7 @@ instance : Neg (LeftInvariantDerivation I G) where
rw [map_neg (Derivation.evalAt (๐ := ๐) (1 : G)), map_neg (๐
โ (smoothLeftMul_one I g)),
left_invariant', map_neg (Derivation.evalAt (๐ := ๐) g)]โฉ
-set_option maxHeartbeats 400000 in
+set_option maxHeartbeats 300000 in
instance : Sub (LeftInvariantDerivation I G) where
sub X Y := โจX - Y, fun g => by
-- porting note: was simp [left_invariant']
@@ -262,7 +261,6 @@ theorem comp_L : (X f).comp (๐ณ I g) = X (f.comp (๐ณ I g)) := by
set_option linter.uppercaseLean3 false in
#align left_invariant_derivation.comp_L LeftInvariantDerivation.comp_L
-set_option maxHeartbeats 400000 in
instance : Bracket (LeftInvariantDerivation I G) (LeftInvariantDerivation I G) where
bracket X Y :=
โจโ
(X : Derivation ๐ C^โโฎI, G; ๐โฏ C^โโฎI, G; ๐โฏ), Yโ, fun g => by
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -26,8 +26,8 @@ noncomputable section
open scoped LieGroup Manifold Derivation
-variable {๐ : Type _} [NontriviallyNormedField ๐] {E : Type _} [NormedAddCommGroup E]
- [NormedSpace ๐ E] {H : Type _} [TopologicalSpace H] (I : ModelWithCorners ๐ E H) (G : Type _)
+variable {๐ : Type*} [NontriviallyNormedField ๐] {E : Type*} [NormedAddCommGroup E]
+ [NormedSpace ๐ E] {H : Type*} [TopologicalSpace H] (I : ModelWithCorners ๐ E H) (G : Type*)
[TopologicalSpace G] [ChartedSpace H G] [Monoid G] [SmoothMul I G] (g h : G)
-- Generate trivial has_sizeof instance. It prevents weird type class inference timeout problems
@@ -69,7 +69,7 @@ instance : LinearMapClass (LeftInvariantDerivation I G) ๐ C^โโฎI, G; ๐
instance : CoeFun (LeftInvariantDerivation I G) fun _ => C^โโฎI, G; ๐โฏ โ C^โโฎI, G; ๐โฏ :=
โจFunLike.coeโฉ
-variable {M : Type _} [TopologicalSpace M] [ChartedSpace H M] {x : M} {r : ๐}
+variable {M : Type*} [TopologicalSpace M] [ChartedSpace H M] {x : M} {r : ๐}
{X Y : LeftInvariantDerivation I G} {f f' : C^โโฎI, G; ๐โฏ}
theorem toFun_eq_coe : X.toFun = โX :=
@@ -2,15 +2,12 @@
Copyright ยฉ 2020 Nicolรฒ Cavalleri. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Nicolรฒ Cavalleri
-
-! This file was ported from Lean 3 source module geometry.manifold.algebra.left_invariant_derivation
-! leanprover-community/mathlib commit b608348ffaeb7f557f2fd46876037abafd326ff3
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.RingTheory.Derivation.Lie
import Mathlib.Geometry.Manifold.DerivationBundle
+#align_import geometry.manifold.algebra.left_invariant_derivation from "leanprover-community/mathlib"@"b608348ffaeb7f557f2fd46876037abafd326ff3"
+
/-!
# Left invariant derivations
The unported dependencies are
algebra.order.module
init.core
linear_algebra.free_module.finite.rank
algebra.order.monoid.cancel.defs
algebra.abs
algebra.group_power.lemmas
init.data.list.basic
linear_algebra.free_module.rank
algebra.order.monoid.cancel.basic
init.data.list.default
topology.subset_properties
init.logic
The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file