analysis.normed_space.triv_sq_zero_ext ⟷ Mathlib.Analysis.NormedSpace.TrivSqZeroExt

This file has been ported!

Changes since the initial port

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.

Changes in mathlib3

(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)

(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)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -79,7 +79,7 @@ theorem hasSum_snd_expSeries_of_smul_comm [Field π•œ] [CharZero π•œ] [Ring R]
     sub_zero]
   simp_rw [← Nat.succ_eq_add_one, Nat.pred_succ, Nat.factorial_succ, Nat.cast_mul, ←
     Nat.succ_eq_add_one,
-    mul_div_cancel_left _ ((@Nat.cast_ne_zero π•œ _ _ _).mpr <| Nat.succ_ne_zero _)]
+    mul_div_cancel_leftβ‚€ _ ((@Nat.cast_ne_zero π•œ _ _ _).mpr <| Nat.succ_ne_zero _)]
   exact h
 #align triv_sq_zero_ext.has_sum_snd_exp_series_of_smul_comm TrivSqZeroExt.hasSum_snd_expSeries_of_smul_comm
 -/
@@ -103,7 +103,7 @@ end Topology
 
 section NormedRing
 
-variable [IsROrC π•œ] [NormedRing R] [AddCommGroup M]
+variable [RCLike π•œ] [NormedRing R] [AddCommGroup M]
 
 variable [NormedAlgebra π•œ R] [Module R M] [Module Rᡐᡒᡖ M] [SMulCommClass R Rᡐᡒᡖ M]
 
@@ -147,7 +147,7 @@ end NormedRing
 
 section NormedCommRing
 
-variable [IsROrC π•œ] [NormedCommRing R] [AddCommGroup M]
+variable [RCLike π•œ] [NormedCommRing R] [AddCommGroup M]
 
 variable [NormedAlgebra π•œ R] [Module R M] [Module Rᡐᡒᡖ M] [IsCentralScalar R M]
 
@@ -193,7 +193,7 @@ end NormedCommRing
 
 section NormedField
 
-variable [IsROrC π•œ] [NormedField R] [AddCommGroup M]
+variable [RCLike π•œ] [NormedField R] [AddCommGroup M]
 
 variable [NormedAlgebra π•œ R] [Module R M] [Module Rᡐᡒᡖ M] [IsCentralScalar R M]
 
Diff
@@ -47,7 +47,6 @@ section Topology
 
 variable [TopologicalSpace R] [TopologicalSpace M]
 
-#print TrivSqZeroExt.hasSum_fst_expSeries /-
 /-- If `exp R x.fst` converges to `e` then `(exp R x).fst` converges to `e`. -/
 theorem hasSum_fst_expSeries [Field π•œ] [Ring R] [AddCommGroup M] [Algebra π•œ R] [Module R M]
     [Module Rᡐᡒᡖ M] [SMulCommClass R Rᡐᡒᡖ M] [Module π•œ M] [IsScalarTower π•œ R M]
@@ -57,7 +56,6 @@ theorem hasSum_fst_expSeries [Field π•œ] [Ring R] [AddCommGroup M] [Algebra 
     HasSum (fun n => fst (NormedSpace.expSeries π•œ (tsze R M) n fun _ => x)) e := by
   simpa [NormedSpace.expSeries_apply_eq] using h
 #align triv_sq_zero_ext.has_sum_fst_exp_series TrivSqZeroExt.hasSum_fst_expSeries
--/
 
 #print TrivSqZeroExt.hasSum_snd_expSeries_of_smul_comm /-
 /-- If `exp R x.fst` converges to `e` then `(exp R x).snd` converges to `e β€’ x.snd`. -/
Diff
@@ -53,9 +53,9 @@ theorem hasSum_fst_expSeries [Field π•œ] [Ring R] [AddCommGroup M] [Algebra 
     [Module Rᡐᡒᡖ M] [SMulCommClass R Rᡐᡒᡖ M] [Module π•œ M] [IsScalarTower π•œ R M]
     [IsScalarTower π•œ Rᡐᡒᡖ M] [TopologicalRing R] [TopologicalAddGroup M] [ContinuousSMul R M]
     [ContinuousSMul Rᡐᡒᡖ M] (x : tsze R M) {e : R}
-    (h : HasSum (fun n => expSeries π•œ R n fun _ => x.fst) e) :
-    HasSum (fun n => fst (expSeries π•œ (tsze R M) n fun _ => x)) e := by
-  simpa [expSeries_apply_eq] using h
+    (h : HasSum (fun n => NormedSpace.expSeries π•œ R n fun _ => x.fst) e) :
+    HasSum (fun n => fst (NormedSpace.expSeries π•œ (tsze R M) n fun _ => x)) e := by
+  simpa [NormedSpace.expSeries_apply_eq] using h
 #align triv_sq_zero_ext.has_sum_fst_exp_series TrivSqZeroExt.hasSum_fst_expSeries
 -/
 
@@ -66,10 +66,10 @@ theorem hasSum_snd_expSeries_of_smul_comm [Field π•œ] [CharZero π•œ] [Ring R]
     [IsScalarTower π•œ R M] [IsScalarTower π•œ Rᡐᡒᡖ M] [TopologicalRing R] [TopologicalAddGroup M]
     [ContinuousSMul R M] [ContinuousSMul Rᡐᡒᡖ M] (x : tsze R M)
     (hx : MulOpposite.op x.fst β€’ x.snd = x.fst β€’ x.snd) {e : R}
-    (h : HasSum (fun n => expSeries π•œ R n fun _ => x.fst) e) :
-    HasSum (fun n => snd (expSeries π•œ (tsze R M) n fun _ => x)) (e β€’ x.snd) :=
+    (h : HasSum (fun n => NormedSpace.expSeries π•œ R n fun _ => x.fst) e) :
+    HasSum (fun n => snd (NormedSpace.expSeries π•œ (tsze R M) n fun _ => x)) (e β€’ x.snd) :=
   by
-  simp_rw [expSeries_apply_eq] at *
+  simp_rw [NormedSpace.expSeries_apply_eq] at *
   conv =>
     congr
     ext
@@ -92,8 +92,9 @@ theorem hasSum_expSeries_of_smul_comm [Field π•œ] [CharZero π•œ] [Ring R] [Add
     [Module R M] [Module Rᡐᡒᡖ M] [SMulCommClass R Rᡐᡒᡖ M] [Module π•œ M] [IsScalarTower π•œ R M]
     [IsScalarTower π•œ Rᡐᡒᡖ M] [TopologicalRing R] [TopologicalAddGroup M] [ContinuousSMul R M]
     [ContinuousSMul Rᡐᡒᡖ M] (x : tsze R M) (hx : MulOpposite.op x.fst β€’ x.snd = x.fst β€’ x.snd)
-    {e : R} (h : HasSum (fun n => expSeries π•œ R n fun _ => x.fst) e) :
-    HasSum (fun n => expSeries π•œ (tsze R M) n fun _ => x) (inl e + inr (e β€’ x.snd)) := by
+    {e : R} (h : HasSum (fun n => NormedSpace.expSeries π•œ R n fun _ => x.fst) e) :
+    HasSum (fun n => NormedSpace.expSeries π•œ (tsze R M) n fun _ => x) (inl e + inr (e β€’ x.snd)) :=
+  by
   simpa only [inl_fst_add_inr_snd_eq] using
     (has_sum_inl _ <| has_sum_fst_exp_series π•œ x h).add
       (has_sum_inr _ <| has_sum_snd_exp_series_of_smul_comm π•œ x hx h)
@@ -118,17 +119,17 @@ variable [CompleteSpace R] [T2Space R] [T2Space M]
 
 #print TrivSqZeroExt.exp_def_of_smul_comm /-
 theorem exp_def_of_smul_comm (x : tsze R M) (hx : MulOpposite.op x.fst β€’ x.snd = x.fst β€’ x.snd) :
-    exp π•œ x = inl (exp π•œ x.fst) + inr (exp π•œ x.fst β€’ x.snd) :=
+    NormedSpace.exp π•œ x = inl (NormedSpace.exp π•œ x.fst) + inr (NormedSpace.exp π•œ x.fst β€’ x.snd) :=
   by
-  simp_rw [exp, FormalMultilinearSeries.sum]
+  simp_rw [NormedSpace.exp, FormalMultilinearSeries.sum]
   refine' (has_sum_exp_series_of_smul_comm π•œ x hx _).tsum_eq
-  exact expSeries_hasSum_exp _
+  exact NormedSpace.expSeries_hasSum_exp _
 #align triv_sq_zero_ext.exp_def_of_smul_comm TrivSqZeroExt.exp_def_of_smul_comm
 -/
 
 #print TrivSqZeroExt.exp_inl /-
 @[simp]
-theorem exp_inl (x : R) : exp π•œ (inl x : tsze R M) = inl (exp π•œ x) :=
+theorem exp_inl (x : R) : NormedSpace.exp π•œ (inl x : tsze R M) = inl (NormedSpace.exp π•œ x) :=
   by
   rw [exp_def_of_smul_comm, snd_inl, fst_inl, smul_zero, inr_zero, add_zero]
   Β· rw [snd_inl, fst_inl, smul_zero, smul_zero]
@@ -137,9 +138,9 @@ theorem exp_inl (x : R) : exp π•œ (inl x : tsze R M) = inl (exp π•œ x) :=
 
 #print TrivSqZeroExt.exp_inr /-
 @[simp]
-theorem exp_inr (m : M) : exp π•œ (inr m : tsze R M) = 1 + inr m :=
+theorem exp_inr (m : M) : NormedSpace.exp π•œ (inr m : tsze R M) = 1 + inr m :=
   by
-  rw [exp_def_of_smul_comm, snd_inr, fst_inr, exp_zero, one_smul, inl_one]
+  rw [exp_def_of_smul_comm, snd_inr, fst_inr, NormedSpace.exp_zero, one_smul, inl_one]
   Β· rw [snd_inr, fst_inr, MulOpposite.op_zero, zero_smul, zero_smul]
 #align triv_sq_zero_ext.exp_inr TrivSqZeroExt.exp_inr
 -/
@@ -161,21 +162,22 @@ variable [TopologicalAddGroup M] [ContinuousSMul R M]
 variable [CompleteSpace R] [T2Space R] [T2Space M]
 
 #print TrivSqZeroExt.exp_def /-
-theorem exp_def (x : tsze R M) : exp π•œ x = inl (exp π•œ x.fst) + inr (exp π•œ x.fst β€’ x.snd) :=
+theorem exp_def (x : tsze R M) :
+    NormedSpace.exp π•œ x = inl (NormedSpace.exp π•œ x.fst) + inr (NormedSpace.exp π•œ x.fst β€’ x.snd) :=
   exp_def_of_smul_comm π•œ x (op_smul_eq_smul _ _)
 #align triv_sq_zero_ext.exp_def TrivSqZeroExt.exp_def
 -/
 
 #print TrivSqZeroExt.fst_exp /-
 @[simp]
-theorem fst_exp (x : tsze R M) : fst (exp π•œ x) = exp π•œ x.fst := by
+theorem fst_exp (x : tsze R M) : fst (NormedSpace.exp π•œ x) = NormedSpace.exp π•œ x.fst := by
   rw [exp_def, fst_add, fst_inl, fst_inr, add_zero]
 #align triv_sq_zero_ext.fst_exp TrivSqZeroExt.fst_exp
 -/
 
 #print TrivSqZeroExt.snd_exp /-
 @[simp]
-theorem snd_exp (x : tsze R M) : snd (exp π•œ x) = exp π•œ x.fst β€’ x.snd := by
+theorem snd_exp (x : tsze R M) : snd (NormedSpace.exp π•œ x) = NormedSpace.exp π•œ x.fst β€’ x.snd := by
   rw [exp_def, snd_add, snd_inl, snd_inr, zero_add]
 #align triv_sq_zero_ext.snd_exp TrivSqZeroExt.snd_exp
 -/
@@ -183,7 +185,7 @@ theorem snd_exp (x : tsze R M) : snd (exp π•œ x) = exp π•œ x.fst β€’ x.snd :=
 #print TrivSqZeroExt.eq_smul_exp_of_invertible /-
 /-- Polar form of trivial-square-zero extension. -/
 theorem eq_smul_exp_of_invertible (x : tsze R M) [Invertible x.fst] :
-    x = x.fst β€’ exp π•œ (β…Ÿ x.fst β€’ inr x.snd) := by
+    x = x.fst β€’ NormedSpace.exp π•œ (β…Ÿ x.fst β€’ inr x.snd) := by
   rw [← inr_smul, exp_inr, smul_add, ← inl_one, ← inl_smul, ← inr_smul, smul_eq_mul, mul_one,
     smul_smul, mul_invOf_self, one_smul, inl_fst_add_inr_snd_eq]
 #align triv_sq_zero_ext.eq_smul_exp_of_invertible TrivSqZeroExt.eq_smul_exp_of_invertible
@@ -209,7 +211,7 @@ variable [CompleteSpace R] [T2Space R] [T2Space M]
 /-- More convenient version of `triv_sq_zero_ext.eq_smul_exp_of_invertible` for when `R` is a
 field. -/
 theorem eq_smul_exp_of_ne_zero (x : tsze R M) (hx : x.fst β‰  0) :
-    x = x.fst β€’ exp π•œ (x.fst⁻¹ β€’ inr x.snd) :=
+    x = x.fst β€’ NormedSpace.exp π•œ (x.fst⁻¹ β€’ inr x.snd) :=
   letI : Invertible x.fst := invertibleOfNonzero hx
   eq_smul_exp_of_invertible _ _
 #align triv_sq_zero_ext.eq_smul_exp_of_ne_zero TrivSqZeroExt.eq_smul_exp_of_ne_zero
Diff
@@ -3,9 +3,9 @@ Copyright (c) 2023 Eric Wieser. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Eric Wieser
 -/
-import Mathbin.Analysis.NormedSpace.Basic
-import Mathbin.Analysis.NormedSpace.Exponential
-import Mathbin.Topology.Instances.TrivSqZeroExt
+import Analysis.NormedSpace.Basic
+import Analysis.NormedSpace.Exponential
+import Topology.Instances.TrivSqZeroExt
 
 #align_import analysis.normed_space.triv_sq_zero_ext from "leanprover-community/mathlib"@"5c1efce12ba86d4901463f61019832f6a4b1a0d0"
 
Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2023 Eric Wieser. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Eric Wieser
-
-! This file was ported from Lean 3 source module analysis.normed_space.triv_sq_zero_ext
-! leanprover-community/mathlib commit 5c1efce12ba86d4901463f61019832f6a4b1a0d0
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Analysis.NormedSpace.Basic
 import Mathbin.Analysis.NormedSpace.Exponential
 import Mathbin.Topology.Instances.TrivSqZeroExt
 
+#align_import analysis.normed_space.triv_sq_zero_ext from "leanprover-community/mathlib"@"5c1efce12ba86d4901463f61019832f6a4b1a0d0"
+
 /-!
 # Results on `triv_sq_zero_ext R M` related to the norm
 
Diff
@@ -42,7 +42,6 @@ For now, this file contains results about `exp` for this type.
 
 variable (π•œ : Type _) {R M : Type _}
 
--- mathport name: exprtsze
 local notation "tsze" => TrivSqZeroExt
 
 namespace TrivSqZeroExt
@@ -51,6 +50,7 @@ section Topology
 
 variable [TopologicalSpace R] [TopologicalSpace M]
 
+#print TrivSqZeroExt.hasSum_fst_expSeries /-
 /-- If `exp R x.fst` converges to `e` then `(exp R x).fst` converges to `e`. -/
 theorem hasSum_fst_expSeries [Field π•œ] [Ring R] [AddCommGroup M] [Algebra π•œ R] [Module R M]
     [Module Rᡐᡒᡖ M] [SMulCommClass R Rᡐᡒᡖ M] [Module π•œ M] [IsScalarTower π•œ R M]
@@ -60,7 +60,9 @@ theorem hasSum_fst_expSeries [Field π•œ] [Ring R] [AddCommGroup M] [Algebra 
     HasSum (fun n => fst (expSeries π•œ (tsze R M) n fun _ => x)) e := by
   simpa [expSeries_apply_eq] using h
 #align triv_sq_zero_ext.has_sum_fst_exp_series TrivSqZeroExt.hasSum_fst_expSeries
+-/
 
+#print TrivSqZeroExt.hasSum_snd_expSeries_of_smul_comm /-
 /-- If `exp R x.fst` converges to `e` then `(exp R x).snd` converges to `e β€’ x.snd`. -/
 theorem hasSum_snd_expSeries_of_smul_comm [Field π•œ] [CharZero π•œ] [Ring R] [AddCommGroup M]
     [Algebra π•œ R] [Module R M] [Module Rᡐᡒᡖ M] [SMulCommClass R Rᡐᡒᡖ M] [Module π•œ M]
@@ -85,7 +87,9 @@ theorem hasSum_snd_expSeries_of_smul_comm [Field π•œ] [CharZero π•œ] [Ring R]
     mul_div_cancel_left _ ((@Nat.cast_ne_zero π•œ _ _ _).mpr <| Nat.succ_ne_zero _)]
   exact h
 #align triv_sq_zero_ext.has_sum_snd_exp_series_of_smul_comm TrivSqZeroExt.hasSum_snd_expSeries_of_smul_comm
+-/
 
+#print TrivSqZeroExt.hasSum_expSeries_of_smul_comm /-
 /-- If `exp R x.fst` converges to `e` then `exp R x` converges to `inl e + inr (e β€’ x.snd)`. -/
 theorem hasSum_expSeries_of_smul_comm [Field π•œ] [CharZero π•œ] [Ring R] [AddCommGroup M] [Algebra π•œ R]
     [Module R M] [Module Rᡐᡒᡖ M] [SMulCommClass R Rᡐᡒᡖ M] [Module π•œ M] [IsScalarTower π•œ R M]
@@ -97,6 +101,7 @@ theorem hasSum_expSeries_of_smul_comm [Field π•œ] [CharZero π•œ] [Ring R] [Add
     (has_sum_inl _ <| has_sum_fst_exp_series π•œ x h).add
       (has_sum_inr _ <| has_sum_snd_exp_series_of_smul_comm π•œ x hx h)
 #align triv_sq_zero_ext.has_sum_exp_series_of_smul_comm TrivSqZeroExt.hasSum_expSeries_of_smul_comm
+-/
 
 end Topology
 
@@ -114,6 +119,7 @@ variable [TopologicalAddGroup M] [ContinuousSMul R M] [ContinuousSMul Rᡐᡒᡖ
 
 variable [CompleteSpace R] [T2Space R] [T2Space M]
 
+#print TrivSqZeroExt.exp_def_of_smul_comm /-
 theorem exp_def_of_smul_comm (x : tsze R M) (hx : MulOpposite.op x.fst β€’ x.snd = x.fst β€’ x.snd) :
     exp π•œ x = inl (exp π•œ x.fst) + inr (exp π•œ x.fst β€’ x.snd) :=
   by
@@ -121,20 +127,25 @@ theorem exp_def_of_smul_comm (x : tsze R M) (hx : MulOpposite.op x.fst β€’ x.snd
   refine' (has_sum_exp_series_of_smul_comm π•œ x hx _).tsum_eq
   exact expSeries_hasSum_exp _
 #align triv_sq_zero_ext.exp_def_of_smul_comm TrivSqZeroExt.exp_def_of_smul_comm
+-/
 
+#print TrivSqZeroExt.exp_inl /-
 @[simp]
 theorem exp_inl (x : R) : exp π•œ (inl x : tsze R M) = inl (exp π•œ x) :=
   by
   rw [exp_def_of_smul_comm, snd_inl, fst_inl, smul_zero, inr_zero, add_zero]
   Β· rw [snd_inl, fst_inl, smul_zero, smul_zero]
 #align triv_sq_zero_ext.exp_inl TrivSqZeroExt.exp_inl
+-/
 
+#print TrivSqZeroExt.exp_inr /-
 @[simp]
 theorem exp_inr (m : M) : exp π•œ (inr m : tsze R M) = 1 + inr m :=
   by
   rw [exp_def_of_smul_comm, snd_inr, fst_inr, exp_zero, one_smul, inl_one]
   Β· rw [snd_inr, fst_inr, MulOpposite.op_zero, zero_smul, zero_smul]
 #align triv_sq_zero_ext.exp_inr TrivSqZeroExt.exp_inr
+-/
 
 end NormedRing
 
@@ -152,26 +163,34 @@ variable [TopologicalAddGroup M] [ContinuousSMul R M]
 
 variable [CompleteSpace R] [T2Space R] [T2Space M]
 
+#print TrivSqZeroExt.exp_def /-
 theorem exp_def (x : tsze R M) : exp π•œ x = inl (exp π•œ x.fst) + inr (exp π•œ x.fst β€’ x.snd) :=
   exp_def_of_smul_comm π•œ x (op_smul_eq_smul _ _)
 #align triv_sq_zero_ext.exp_def TrivSqZeroExt.exp_def
+-/
 
+#print TrivSqZeroExt.fst_exp /-
 @[simp]
 theorem fst_exp (x : tsze R M) : fst (exp π•œ x) = exp π•œ x.fst := by
   rw [exp_def, fst_add, fst_inl, fst_inr, add_zero]
 #align triv_sq_zero_ext.fst_exp TrivSqZeroExt.fst_exp
+-/
 
+#print TrivSqZeroExt.snd_exp /-
 @[simp]
 theorem snd_exp (x : tsze R M) : snd (exp π•œ x) = exp π•œ x.fst β€’ x.snd := by
   rw [exp_def, snd_add, snd_inl, snd_inr, zero_add]
 #align triv_sq_zero_ext.snd_exp TrivSqZeroExt.snd_exp
+-/
 
+#print TrivSqZeroExt.eq_smul_exp_of_invertible /-
 /-- Polar form of trivial-square-zero extension. -/
 theorem eq_smul_exp_of_invertible (x : tsze R M) [Invertible x.fst] :
     x = x.fst β€’ exp π•œ (β…Ÿ x.fst β€’ inr x.snd) := by
   rw [← inr_smul, exp_inr, smul_add, ← inl_one, ← inl_smul, ← inr_smul, smul_eq_mul, mul_one,
     smul_smul, mul_invOf_self, one_smul, inl_fst_add_inr_snd_eq]
 #align triv_sq_zero_ext.eq_smul_exp_of_invertible TrivSqZeroExt.eq_smul_exp_of_invertible
+-/
 
 end NormedCommRing
 
@@ -189,6 +208,7 @@ variable [TopologicalAddGroup M] [ContinuousSMul R M]
 
 variable [CompleteSpace R] [T2Space R] [T2Space M]
 
+#print TrivSqZeroExt.eq_smul_exp_of_ne_zero /-
 /-- More convenient version of `triv_sq_zero_ext.eq_smul_exp_of_invertible` for when `R` is a
 field. -/
 theorem eq_smul_exp_of_ne_zero (x : tsze R M) (hx : x.fst β‰  0) :
@@ -196,6 +216,7 @@ theorem eq_smul_exp_of_ne_zero (x : tsze R M) (hx : x.fst β‰  0) :
   letI : Invertible x.fst := invertibleOfNonzero hx
   eq_smul_exp_of_invertible _ _
 #align triv_sq_zero_ext.eq_smul_exp_of_ne_zero TrivSqZeroExt.eq_smul_exp_of_ne_zero
+-/
 
 end NormedField
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Eric Wieser
 
 ! This file was ported from Lean 3 source module analysis.normed_space.triv_sq_zero_ext
-! leanprover-community/mathlib commit 88a563b158f59f2983cfad685664da95502e8cdd
+! leanprover-community/mathlib commit 5c1efce12ba86d4901463f61019832f6a4b1a0d0
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -15,6 +15,9 @@ import Mathbin.Topology.Instances.TrivSqZeroExt
 /-!
 # Results on `triv_sq_zero_ext R M` related to the norm
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 For now, this file contains results about `exp` for this type.
 
 ## Main results
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Eric Wieser
 
 ! This file was ported from Lean 3 source module analysis.normed_space.triv_sq_zero_ext
-! leanprover-community/mathlib commit b8d2eaa69d69ce8f03179a5cda774fc0cde984e4
+! leanprover-community/mathlib commit 88a563b158f59f2983cfad685664da95502e8cdd
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -25,9 +25,14 @@ For now, this file contains results about `exp` for this type.
 * `triv_sq_zero_ext.exp_inr`
 
 ## TODO
+
 * Actually define a sensible norm on `triv_sq_zero_ext R M`, so that we have access to lemmas
   like `exp_add`.
-* Generalize some of these results to non-commutative `R`.
+* Generalize more of these results to non-commutative `R`. In principle, under sufficient conditions
+  we should expect
+ `(exp π•œ x).snd = ∫ t in 0..1, exp π•œ (t β€’ x.fst) β€’ op (exp π•œ ((1 - t) β€’ x.fst)) β€’ x.snd`
+  ([Physics.SE](https://physics.stackexchange.com/a/41671/185147), and
+  https://link.springer.com/chapter/10.1007/978-3-540-44953-9_2).
 
 -/
 
@@ -43,20 +48,31 @@ section Topology
 
 variable [TopologicalSpace R] [TopologicalSpace M]
 
-/-- If `exp R x.fst` converges to `e` then `exp R x` converges to `inl e + inr (e β€’ x.snd)`. -/
-theorem hasSum_expSeries [Field π•œ] [CharZero π•œ] [CommRing R] [AddCommGroup M] [Algebra π•œ R]
-    [Module R M] [Module Rᡐᡒᡖ M] [IsCentralScalar R M] [Module π•œ M] [IsScalarTower π•œ R M]
-    [TopologicalRing R] [TopologicalAddGroup M] [ContinuousSMul R M] (x : tsze R M) {e : R}
+/-- If `exp R x.fst` converges to `e` then `(exp R x).fst` converges to `e`. -/
+theorem hasSum_fst_expSeries [Field π•œ] [Ring R] [AddCommGroup M] [Algebra π•œ R] [Module R M]
+    [Module Rᡐᡒᡖ M] [SMulCommClass R Rᡐᡒᡖ M] [Module π•œ M] [IsScalarTower π•œ R M]
+    [IsScalarTower π•œ Rᡐᡒᡖ M] [TopologicalRing R] [TopologicalAddGroup M] [ContinuousSMul R M]
+    [ContinuousSMul Rᡐᡒᡖ M] (x : tsze R M) {e : R}
+    (h : HasSum (fun n => expSeries π•œ R n fun _ => x.fst) e) :
+    HasSum (fun n => fst (expSeries π•œ (tsze R M) n fun _ => x)) e := by
+  simpa [expSeries_apply_eq] using h
+#align triv_sq_zero_ext.has_sum_fst_exp_series TrivSqZeroExt.hasSum_fst_expSeries
+
+/-- If `exp R x.fst` converges to `e` then `(exp R x).snd` converges to `e β€’ x.snd`. -/
+theorem hasSum_snd_expSeries_of_smul_comm [Field π•œ] [CharZero π•œ] [Ring R] [AddCommGroup M]
+    [Algebra π•œ R] [Module R M] [Module Rᡐᡒᡖ M] [SMulCommClass R Rᡐᡒᡖ M] [Module π•œ M]
+    [IsScalarTower π•œ R M] [IsScalarTower π•œ Rᡐᡒᡖ M] [TopologicalRing R] [TopologicalAddGroup M]
+    [ContinuousSMul R M] [ContinuousSMul Rᡐᡒᡖ M] (x : tsze R M)
+    (hx : MulOpposite.op x.fst β€’ x.snd = x.fst β€’ x.snd) {e : R}
     (h : HasSum (fun n => expSeries π•œ R n fun _ => x.fst) e) :
-    HasSum (fun n => expSeries π•œ (tsze R M) n fun _ => x) (inl e + inr (e β€’ x.snd)) :=
+    HasSum (fun n => snd (expSeries π•œ (tsze R M) n fun _ => x)) (e β€’ x.snd) :=
   by
   simp_rw [expSeries_apply_eq] at *
   conv =>
     congr
     ext
-    rw [← inl_fst_add_inr_snd_eq (x ^ _), fst_pow, snd_pow, smul_add, ← inr_smul, ← inl_smul,
-      nsmul_eq_smul_cast π•œ n, smul_smul, inv_mul_eq_div, ← inv_div, ← smul_assoc]
-  refine' (has_sum_inl M h).add (has_sum_inr M _)
+    rw [snd_smul, snd_pow_of_smul_comm _ _ hx, nsmul_eq_smul_cast π•œ n, smul_smul, inv_mul_eq_div, ←
+      inv_div, ← smul_assoc]
   apply HasSum.smul_const
   rw [← hasSum_nat_add_iff' 1]; swap; infer_instance
   rw [Finset.range_one, Finset.sum_singleton, Nat.cast_zero, div_zero, inv_zero, zero_smul,
@@ -65,12 +81,62 @@ theorem hasSum_expSeries [Field π•œ] [CharZero π•œ] [CommRing R] [AddCommGroup
     Nat.succ_eq_add_one,
     mul_div_cancel_left _ ((@Nat.cast_ne_zero π•œ _ _ _).mpr <| Nat.succ_ne_zero _)]
   exact h
-#align triv_sq_zero_ext.has_sum_exp_series TrivSqZeroExt.hasSum_expSeries
+#align triv_sq_zero_ext.has_sum_snd_exp_series_of_smul_comm TrivSqZeroExt.hasSum_snd_expSeries_of_smul_comm
+
+/-- If `exp R x.fst` converges to `e` then `exp R x` converges to `inl e + inr (e β€’ x.snd)`. -/
+theorem hasSum_expSeries_of_smul_comm [Field π•œ] [CharZero π•œ] [Ring R] [AddCommGroup M] [Algebra π•œ R]
+    [Module R M] [Module Rᡐᡒᡖ M] [SMulCommClass R Rᡐᡒᡖ M] [Module π•œ M] [IsScalarTower π•œ R M]
+    [IsScalarTower π•œ Rᡐᡒᡖ M] [TopologicalRing R] [TopologicalAddGroup M] [ContinuousSMul R M]
+    [ContinuousSMul Rᡐᡒᡖ M] (x : tsze R M) (hx : MulOpposite.op x.fst β€’ x.snd = x.fst β€’ x.snd)
+    {e : R} (h : HasSum (fun n => expSeries π•œ R n fun _ => x.fst) e) :
+    HasSum (fun n => expSeries π•œ (tsze R M) n fun _ => x) (inl e + inr (e β€’ x.snd)) := by
+  simpa only [inl_fst_add_inr_snd_eq] using
+    (has_sum_inl _ <| has_sum_fst_exp_series π•œ x h).add
+      (has_sum_inr _ <| has_sum_snd_exp_series_of_smul_comm π•œ x hx h)
+#align triv_sq_zero_ext.has_sum_exp_series_of_smul_comm TrivSqZeroExt.hasSum_expSeries_of_smul_comm
 
 end Topology
 
 section NormedRing
 
+variable [IsROrC π•œ] [NormedRing R] [AddCommGroup M]
+
+variable [NormedAlgebra π•œ R] [Module R M] [Module Rᡐᡒᡖ M] [SMulCommClass R Rᡐᡒᡖ M]
+
+variable [Module π•œ M] [IsScalarTower π•œ R M] [IsScalarTower π•œ Rᡐᡒᡖ M]
+
+variable [TopologicalSpace M] [TopologicalRing R]
+
+variable [TopologicalAddGroup M] [ContinuousSMul R M] [ContinuousSMul Rᡐᡒᡖ M]
+
+variable [CompleteSpace R] [T2Space R] [T2Space M]
+
+theorem exp_def_of_smul_comm (x : tsze R M) (hx : MulOpposite.op x.fst β€’ x.snd = x.fst β€’ x.snd) :
+    exp π•œ x = inl (exp π•œ x.fst) + inr (exp π•œ x.fst β€’ x.snd) :=
+  by
+  simp_rw [exp, FormalMultilinearSeries.sum]
+  refine' (has_sum_exp_series_of_smul_comm π•œ x hx _).tsum_eq
+  exact expSeries_hasSum_exp _
+#align triv_sq_zero_ext.exp_def_of_smul_comm TrivSqZeroExt.exp_def_of_smul_comm
+
+@[simp]
+theorem exp_inl (x : R) : exp π•œ (inl x : tsze R M) = inl (exp π•œ x) :=
+  by
+  rw [exp_def_of_smul_comm, snd_inl, fst_inl, smul_zero, inr_zero, add_zero]
+  Β· rw [snd_inl, fst_inl, smul_zero, smul_zero]
+#align triv_sq_zero_ext.exp_inl TrivSqZeroExt.exp_inl
+
+@[simp]
+theorem exp_inr (m : M) : exp π•œ (inr m : tsze R M) = 1 + inr m :=
+  by
+  rw [exp_def_of_smul_comm, snd_inr, fst_inr, exp_zero, one_smul, inl_one]
+  Β· rw [snd_inr, fst_inr, MulOpposite.op_zero, zero_smul, zero_smul]
+#align triv_sq_zero_ext.exp_inr TrivSqZeroExt.exp_inr
+
+end NormedRing
+
+section NormedCommRing
+
 variable [IsROrC π•œ] [NormedCommRing R] [AddCommGroup M]
 
 variable [NormedAlgebra π•œ R] [Module R M] [Module Rᡐᡒᡖ M] [IsCentralScalar R M]
@@ -84,10 +150,7 @@ variable [TopologicalAddGroup M] [ContinuousSMul R M]
 variable [CompleteSpace R] [T2Space R] [T2Space M]
 
 theorem exp_def (x : tsze R M) : exp π•œ x = inl (exp π•œ x.fst) + inr (exp π•œ x.fst β€’ x.snd) :=
-  by
-  simp_rw [exp, FormalMultilinearSeries.sum]
-  refine' (has_sum_exp_series π•œ x _).tsum_eq
-  exact expSeries_hasSum_exp _
+  exp_def_of_smul_comm π•œ x (op_smul_eq_smul _ _)
 #align triv_sq_zero_ext.exp_def TrivSqZeroExt.exp_def
 
 @[simp]
@@ -100,16 +163,6 @@ theorem snd_exp (x : tsze R M) : snd (exp π•œ x) = exp π•œ x.fst β€’ x.snd :=
   rw [exp_def, snd_add, snd_inl, snd_inr, zero_add]
 #align triv_sq_zero_ext.snd_exp TrivSqZeroExt.snd_exp
 
-@[simp]
-theorem exp_inl (x : R) : exp π•œ (inl x : tsze R M) = inl (exp π•œ x) := by
-  rw [exp_def, fst_inl, snd_inl, smul_zero, inr_zero, add_zero]
-#align triv_sq_zero_ext.exp_inl TrivSqZeroExt.exp_inl
-
-@[simp]
-theorem exp_inr (m : M) : exp π•œ (inr m : tsze R M) = 1 + inr m := by
-  rw [exp_def, fst_inr, exp_zero, snd_inr, one_smul, inl_one]
-#align triv_sq_zero_ext.exp_inr TrivSqZeroExt.exp_inr
-
 /-- Polar form of trivial-square-zero extension. -/
 theorem eq_smul_exp_of_invertible (x : tsze R M) [Invertible x.fst] :
     x = x.fst β€’ exp π•œ (β…Ÿ x.fst β€’ inr x.snd) := by
@@ -117,7 +170,7 @@ theorem eq_smul_exp_of_invertible (x : tsze R M) [Invertible x.fst] :
     smul_smul, mul_invOf_self, one_smul, inl_fst_add_inr_snd_eq]
 #align triv_sq_zero_ext.eq_smul_exp_of_invertible TrivSqZeroExt.eq_smul_exp_of_invertible
 
-end NormedRing
+end NormedCommRing
 
 section NormedField
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Eric Wieser
 
 ! This file was ported from Lean 3 source module analysis.normed_space.triv_sq_zero_ext
-! leanprover-community/mathlib commit 806c0bb86f6128cfa2f702285727518eb5244390
+! leanprover-community/mathlib commit b8d2eaa69d69ce8f03179a5cda774fc0cde984e4
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -17,9 +17,6 @@ import Mathbin.Topology.Instances.TrivSqZeroExt
 
 For now, this file contains results about `exp` for this type.
 
-TODO: actually define a sensible norm on `triv_sq_zero_ext R M`, so that we have access to lemmas
-like `exp_add`.
-
 ## Main results
 
 * `triv_sq_zero_ext.fst_exp`
@@ -27,6 +24,11 @@ like `exp_add`.
 * `triv_sq_zero_ext.exp_inl`
 * `triv_sq_zero_ext.exp_inr`
 
+## TODO
+* Actually define a sensible norm on `triv_sq_zero_ext R M`, so that we have access to lemmas
+  like `exp_add`.
+* Generalize some of these results to non-commutative `R`.
+
 -/
 
 
@@ -43,8 +45,8 @@ variable [TopologicalSpace R] [TopologicalSpace M]
 
 /-- If `exp R x.fst` converges to `e` then `exp R x` converges to `inl e + inr (e β€’ x.snd)`. -/
 theorem hasSum_expSeries [Field π•œ] [CharZero π•œ] [CommRing R] [AddCommGroup M] [Algebra π•œ R]
-    [Module R M] [Module π•œ M] [IsScalarTower π•œ R M] [TopologicalRing R] [TopologicalAddGroup M]
-    [ContinuousSMul R M] (x : tsze R M) {e : R}
+    [Module R M] [Module Rᡐᡒᡖ M] [IsCentralScalar R M] [Module π•œ M] [IsScalarTower π•œ R M]
+    [TopologicalRing R] [TopologicalAddGroup M] [ContinuousSMul R M] (x : tsze R M) {e : R}
     (h : HasSum (fun n => expSeries π•œ R n fun _ => x.fst) e) :
     HasSum (fun n => expSeries π•œ (tsze R M) n fun _ => x) (inl e + inr (e β€’ x.snd)) :=
   by
@@ -71,7 +73,9 @@ section NormedRing
 
 variable [IsROrC π•œ] [NormedCommRing R] [AddCommGroup M]
 
-variable [NormedAlgebra π•œ R] [Module R M] [Module π•œ M] [IsScalarTower π•œ R M]
+variable [NormedAlgebra π•œ R] [Module R M] [Module Rᡐᡒᡖ M] [IsCentralScalar R M]
+
+variable [Module π•œ M] [IsScalarTower π•œ R M]
 
 variable [TopologicalSpace M] [TopologicalRing R]
 
@@ -119,7 +123,9 @@ section NormedField
 
 variable [IsROrC π•œ] [NormedField R] [AddCommGroup M]
 
-variable [NormedAlgebra π•œ R] [Module R M] [Module π•œ M] [IsScalarTower π•œ R M]
+variable [NormedAlgebra π•œ R] [Module R M] [Module Rᡐᡒᡖ M] [IsCentralScalar R M]
+
+variable [Module π•œ M] [IsScalarTower π•œ R M]
 
 variable [TopologicalSpace M] [TopologicalRing R]
 

Changes in mathlib4

mathlib3
mathlib4
chore: Rename IsROrC to RCLike (#10819)

IsROrC contains data, which goes against the expectation that classes prefixed with Is are prop-valued. People have been complaining about this on and off, so this PR renames IsROrC to RCLike.

Diff
@@ -316,7 +316,7 @@ end Normed
 
 section
 
-variable [IsROrC π•œ] [NormedRing R] [NormedAddCommGroup M]
+variable [RCLike π•œ] [NormedRing R] [NormedAddCommGroup M]
 variable [NormedAlgebra π•œ R] [NormedSpace π•œ M] [Module R M] [Module Rᡐᡒᡖ M]
 variable [BoundedSMul R M] [BoundedSMul Rᡐᡒᡖ M] [SMulCommClass R Rᡐᡒᡖ M]
 variable [IsScalarTower π•œ R M] [IsScalarTower π•œ Rᡐᡒᡖ M]
chore(NormedSpace/Basic): move some theorems to NormedSpace.Real (#10206)

This way we don't switch between general normed spaces and real normed spaces back and forth throughout the file.

Diff
@@ -3,7 +3,6 @@ Copyright (c) 2023 Eric Wieser. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Eric Wieser
 -/
-import Mathlib.Analysis.NormedSpace.Basic
 import Mathlib.Analysis.NormedSpace.Exponential
 import Mathlib.Analysis.NormedSpace.ProdLp
 import Mathlib.Topology.Instances.TrivSqZeroExt
feat(Analysis/NormedSpace/TrivSqZeroExt): The L1 norm (#9492)

The motivation here is to enable using exp_add_of_commute on dual numbers.

This Zulip thread has some discussion about other possible norms.

Diff
@@ -5,6 +5,7 @@ Authors: Eric Wieser
 -/
 import Mathlib.Analysis.NormedSpace.Basic
 import Mathlib.Analysis.NormedSpace.Exponential
+import Mathlib.Analysis.NormedSpace.ProdLp
 import Mathlib.Topology.Instances.TrivSqZeroExt
 
 #align_import analysis.normed_space.triv_sq_zero_ext from "leanprover-community/mathlib"@"88a563b158f59f2983cfad685664da95502e8cdd"
@@ -12,7 +13,15 @@ import Mathlib.Topology.Instances.TrivSqZeroExt
 /-!
 # Results on `TrivSqZeroExt R M` related to the norm
 
-For now, this file contains results about `exp` for this type.
+This file contains results about `NormedSpace.exp` for `TrivSqZeroExt`.
+
+It also contains a definition of the $β„“^1$ norm,
+which defines $\|r + m\| \coloneqq \|r\| + \|m\|$.
+This is not a particularly canonical choice of definition,
+but it is sufficient to provide a `NormedAlgebra` instance,
+and thus enables `NormedSpace.exp_add_of_commute` to be used on `TrivSqZeroExt`.
+If the non-canonicity becomes problematic in future,
+we could keep the collection of instances behind an `open scoped`.
 
 ## Main results
 
@@ -20,21 +29,29 @@ For now, this file contains results about `exp` for this type.
 * `TrivSqZeroExt.snd_exp`
 * `TrivSqZeroExt.exp_inl`
 * `TrivSqZeroExt.exp_inr`
+* The $β„“^1$ norm on `TrivSqZeroExt`:
+  * `TrivSqZeroExt.instL1SeminormedAddCommGroup`
+  * `TrivSqZeroExt.instL1SeminormedRing`
+  * `TrivSqZeroExt.instL1SeminormedCommRing`
+  * `TrivSqZeroExt.instL1BoundedSMul`
+  * `TrivSqZeroExt.instL1NormedAddCommGroup`
+  * `TrivSqZeroExt.instL1NormedRing`
+  * `TrivSqZeroExt.instL1NormedCommRing`
+  * `TrivSqZeroExt.instL1NormedSpace`
+  * `TrivSqZeroExt.instL1NormedAlgebra`
 
 ## TODO
 
-* Actually define a sensible norm on `TrivSqZeroExt R M`, so that we have access to lemmas
-  like `exp_add`.
 * Generalize more of these results to non-commutative `R`. In principle, under sufficient conditions
   we should expect
- `(exp π•œ x).snd = ∫ t in 0..1, exp π•œ (t β€’ x.fst) β€’ op (exp π•œ ((1 - t) β€’ x.fst)) β€’ x.snd`
+  `(exp π•œ x).snd = ∫ t in 0..1, exp π•œ (t β€’ x.fst) β€’ op (exp π•œ ((1 - t) β€’ x.fst)) β€’ x.snd`
   ([Physics.SE](https://physics.stackexchange.com/a/41671/185147), and
   https://link.springer.com/chapter/10.1007/978-3-540-44953-9_2).
 
 -/
 
 
-variable (π•œ : Type*) {R M : Type*}
+variable (π•œ : Type*) {S R M : Type*}
 
 local notation "tsze" => TrivSqZeroExt
 
@@ -176,4 +193,140 @@ end Field
 
 end Topology
 
+/-!
+### The $β„“^1$ norm on the trivial square zero extension
+-/
+
+noncomputable section Seminormed
+
+section Ring
+variable [SeminormedCommRing S] [SeminormedRing R] [SeminormedAddCommGroup M]
+variable [Algebra S R] [Module S M] [Module R M] [Module Rᡐᡒᡖ M]
+variable [BoundedSMul S R] [BoundedSMul S M] [BoundedSMul R M] [BoundedSMul Rᡐᡒᡖ M]
+variable [SMulCommClass R Rᡐᡒᡖ M] [IsScalarTower S R M] [IsScalarTower S Rᡐᡒᡖ M]
+
+instance instL1SeminormedAddCommGroup : SeminormedAddCommGroup (tsze R M) :=
+  inferInstanceAs <| SeminormedAddCommGroup (WithLp 1 <| R Γ— M)
+
+example :
+    (TrivSqZeroExt.instUniformSpace : UniformSpace (tsze R M)) =
+    PseudoMetricSpace.toUniformSpace := rfl
+
+theorem norm_def (x : tsze R M) : β€–xβ€– = β€–fst xβ€– + β€–snd xβ€– := by
+  rw [WithLp.prod_norm_eq_add (by norm_num)]
+  simp only [ENNReal.one_toReal, Real.rpow_one, div_one]
+  rfl
+
+theorem nnnorm_def (x : tsze R M) : β€–xβ€–β‚Š = β€–fst xβ€–β‚Š + β€–snd xβ€–β‚Š := by
+  ext; simp [norm_def]
+
+@[simp] theorem norm_inl (r : R) : β€–(inl r : tsze R M)β€– = β€–rβ€– := by simp [norm_def]
+@[simp] theorem norm_inr (m : M) : β€–(inr m : tsze R M)β€– = β€–mβ€– := by simp [norm_def]
+
+@[simp] theorem nnnorm_inl (r : R) : β€–(inl r : tsze R M)β€–β‚Š = β€–rβ€–β‚Š := by simp [nnnorm_def]
+@[simp] theorem nnnorm_inr (m : M) : β€–(inr m : tsze R M)β€–β‚Š = β€–mβ€–β‚Š := by simp [nnnorm_def]
+
+instance instL1SeminormedRing : SeminormedRing (tsze R M) where
+  norm_mul
+  | ⟨r₁, mβ‚βŸ©, ⟨rβ‚‚, mβ‚‚βŸ© => by
+    dsimp
+    rw [norm_def, norm_def, norm_def, add_mul, mul_add, mul_add, snd_mul, fst_mul]
+    dsimp [fst, snd]
+    rw [add_assoc]
+    gcongr
+    Β· exact norm_mul_le _ _
+    refine (norm_add_le _ _).trans ?_
+    gcongr
+    Β· exact norm_smul_le _ _
+    refine (_root_.norm_smul_le _ _).trans ?_
+    rw [mul_comm, MulOpposite.norm_op]
+    exact le_add_of_nonneg_right <| by positivity
+  __ : SeminormedAddCommGroup (tsze R M) := inferInstance
+  __ : Ring (tsze R M) := inferInstance
+
+instance instL1BoundedSMul : BoundedSMul S (tsze R M) :=
+  inferInstanceAs <| BoundedSMul S (WithLp 1 <| R Γ— M)
+
+instance [NormOneClass R] : NormOneClass (tsze R M) where
+  norm_one := by rw [norm_def, fst_one, snd_one, norm_zero, norm_one, add_zero]
+
+
+end Ring
+
+section CommRing
+
+variable [SeminormedCommRing R] [SeminormedAddCommGroup M]
+variable [Module R M] [Module Rᡐᡒᡖ M] [IsCentralScalar R M]
+variable [BoundedSMul R M]
+
+instance instL1SeminormedCommRing : SeminormedCommRing (tsze R M) where
+  __ : CommRing (tsze R M) := inferInstance
+  __ : SeminormedRing (tsze R M) := inferInstance
+
+end CommRing
+
+end Seminormed
+
+noncomputable section Normed
+
+section Ring
+
+variable [NormedCommRing S] [NormedRing R] [NormedAddCommGroup M]
+variable [Algebra S R] [Module S M] [Module R M] [Module Rᡐᡒᡖ M]
+variable [BoundedSMul S R] [BoundedSMul S M] [BoundedSMul R M] [BoundedSMul Rᡐᡒᡖ M]
+variable [SMulCommClass R Rᡐᡒᡖ M] [IsScalarTower S R M] [IsScalarTower S Rᡐᡒᡖ M]
+
+instance instL1NormedAddCommGroup : NormedAddCommGroup (tsze R M) :=
+  inferInstanceAs <| NormedAddCommGroup (WithLp 1 <| R Γ— M)
+
+instance instL1NormedRing : NormedRing (tsze R M) where
+  __ : NormedAddCommGroup (tsze R M) := inferInstance
+  __ : SeminormedRing (tsze R M) := inferInstance
+
+end Ring
+
+section CommRing
+
+variable [NormedCommRing R] [NormedAddCommGroup M]
+variable [Module R M] [Module Rᡐᡒᡖ M] [IsCentralScalar R M]
+variable [BoundedSMul R M]
+
+instance instL1NormedCommRing : NormedCommRing (tsze R M) where
+  __ : CommRing (tsze R M) := inferInstance
+  __ : NormedRing (tsze R M) := inferInstance
+
+end CommRing
+
+section Algebra
+
+variable [NormedField π•œ] [NormedRing R] [NormedAddCommGroup M]
+variable [NormedAlgebra π•œ R] [NormedSpace π•œ M] [Module R M] [Module Rᡐᡒᡖ M]
+variable [BoundedSMul R M] [BoundedSMul Rᡐᡒᡖ M] [SMulCommClass R Rᡐᡒᡖ M]
+variable [IsScalarTower π•œ R M] [IsScalarTower π•œ Rᡐᡒᡖ M]
+
+instance instL1NormedSpace : NormedSpace π•œ (tsze R M) :=
+  inferInstanceAs <| NormedSpace π•œ (WithLp 1 <| R Γ— M)
+
+instance instL1NormedAlgebra : NormedAlgebra π•œ (tsze R M) where
+  norm_smul_le := _root_.norm_smul_le
+
+end Algebra
+
+
+end Normed
+
+section
+
+variable [IsROrC π•œ] [NormedRing R] [NormedAddCommGroup M]
+variable [NormedAlgebra π•œ R] [NormedSpace π•œ M] [Module R M] [Module Rᡐᡒᡖ M]
+variable [BoundedSMul R M] [BoundedSMul Rᡐᡒᡖ M] [SMulCommClass R Rᡐᡒᡖ M]
+variable [IsScalarTower π•œ R M] [IsScalarTower π•œ Rᡐᡒᡖ M]
+variable [CompleteSpace R] [CompleteSpace M]
+
+-- Evidence that we have sufficient instances on `tsze R N` to make `exp_add_of_commute` usable
+example (a b : tsze R M) (h : Commute a b) : exp π•œ (a + b) = exp π•œ a * exp π•œ b :=
+  exp_add_of_commute h
+
+end
+
 end TrivSqZeroExt
feat(Analysis/NormedSpace/TrivSqZeroExt): generalize to topological spaces (#9491)

These results are still true even if the exponential does not converge, because in those cases all the terms are zero.

The hasSum_fst_expSeries lemma has been dropped because it's a trivial consequence of the new fst_expSeries; the fact that the series are elementwise equal.

Diff
@@ -44,76 +44,70 @@ namespace TrivSqZeroExt
 
 section Topology
 
-variable [TopologicalSpace R] [TopologicalSpace M]
-
-/-- If `exp R x.fst` converges to `e` then `(exp R x).fst` converges to `e`. -/
-theorem hasSum_fst_expSeries [Field π•œ] [Ring R] [AddCommGroup M] [Algebra π•œ R] [Module R M]
-    [Module Rᡐᡒᡖ M] [SMulCommClass R Rᡐᡒᡖ M] [Module π•œ M] [IsScalarTower π•œ R M]
-    [IsScalarTower π•œ Rᡐᡒᡖ M] [TopologicalRing R] [TopologicalAddGroup M] [ContinuousSMul R M]
-    [ContinuousSMul Rᡐᡒᡖ M] (x : tsze R M) {e : R}
-    (h : HasSum (fun n => expSeries π•œ R n fun _ => x.fst) e) :
-    HasSum (fun n => fst (expSeries π•œ (tsze R M) n fun _ => x)) e := by
-  simpa [expSeries_apply_eq] using h
-#align triv_sq_zero_ext.has_sum_fst_exp_series TrivSqZeroExt.hasSum_fst_expSeries
+section not_charZero
+variable [Field π•œ] [Ring R] [AddCommGroup M]
+  [Algebra π•œ R] [Module π•œ M] [Module R M] [Module Rᡐᡒᡖ M]
+  [SMulCommClass R Rᡐᡒᡖ M] [IsScalarTower π•œ R M] [IsScalarTower π•œ Rᡐᡒᡖ M]
+  [TopologicalSpace R] [TopologicalSpace M]
+  [TopologicalRing R] [TopologicalAddGroup M] [ContinuousSMul R M] [ContinuousSMul Rᡐᡒᡖ M]
+
+@[simp] theorem fst_expSeries (x : tsze R M) (n : β„•) :
+    fst (expSeries π•œ (tsze R M) n fun _ => x) = expSeries π•œ R n fun _ => x.fst := by
+  simp [expSeries_apply_eq]
+
+end not_charZero
+
+section Ring
+variable [Field π•œ] [CharZero π•œ] [Ring R] [AddCommGroup M]
+  [Algebra π•œ R] [Module π•œ M] [Module R M] [Module Rᡐᡒᡖ M]
+  [SMulCommClass R Rᡐᡒᡖ M] [IsScalarTower π•œ R M] [IsScalarTower π•œ Rᡐᡒᡖ M]
+  [TopologicalSpace R] [TopologicalSpace M]
+  [TopologicalRing R] [TopologicalAddGroup M] [ContinuousSMul R M] [ContinuousSMul Rᡐᡒᡖ M]
+
+theorem snd_expSeries_of_smul_comm
+    (x : tsze R M) (hx : MulOpposite.op x.fst β€’ x.snd = x.fst β€’ x.snd) (n : β„•) :
+    snd (expSeries π•œ (tsze R M) (n + 1) fun _ => x) = (expSeries π•œ R n fun _ => x.fst) β€’ x.snd := by
+  simp_rw [expSeries_apply_eq, snd_smul, snd_pow_of_smul_comm _ _ hx, nsmul_eq_smul_cast π•œ (n + 1),
+    smul_smul, smul_assoc, Nat.factorial_succ, Nat.pred_succ, Nat.cast_mul, mul_inv_rev,
+    inv_mul_cancel_rightβ‚€ ((Nat.cast_ne_zero (R := π•œ)).mpr <| Nat.succ_ne_zero n)]
 
 /-- If `exp R x.fst` converges to `e` then `(exp R x).snd` converges to `e β€’ x.snd`. -/
-theorem hasSum_snd_expSeries_of_smul_comm [Field π•œ] [CharZero π•œ] [Ring R] [AddCommGroup M]
-    [Algebra π•œ R] [Module R M] [Module Rᡐᡒᡖ M] [SMulCommClass R Rᡐᡒᡖ M] [Module π•œ M]
-    [IsScalarTower π•œ R M] [IsScalarTower π•œ Rᡐᡒᡖ M] [TopologicalRing R] [TopologicalAddGroup M]
-    [ContinuousSMul R M] [ContinuousSMul Rᡐᡒᡖ M] (x : tsze R M)
+theorem hasSum_snd_expSeries_of_smul_comm (x : tsze R M)
     (hx : MulOpposite.op x.fst β€’ x.snd = x.fst β€’ x.snd) {e : R}
     (h : HasSum (fun n => expSeries π•œ R n fun _ => x.fst) e) :
     HasSum (fun n => snd (expSeries π•œ (tsze R M) n fun _ => x)) (e β€’ x.snd) := by
-  simp_rw [expSeries_apply_eq] at *
-  conv =>
-    congr
-    ext n
-    rw [snd_smul, snd_pow_of_smul_comm _ _ hx, nsmul_eq_smul_cast π•œ n, smul_smul, inv_mul_eq_div, ←
-      inv_div, ← smul_assoc]
-  apply HasSum.smul_const
   rw [← hasSum_nat_add_iff' 1]
-  rw [Finset.range_one, Finset.sum_singleton, Nat.cast_zero, div_zero, inv_zero, zero_smul,
-    sub_zero]
-  simp_rw [← Nat.succ_eq_add_one, Nat.pred_succ, Nat.factorial_succ, Nat.cast_mul, ←
-    Nat.succ_eq_add_one,
-    mul_div_cancel_left _ ((@Nat.cast_ne_zero π•œ _ _ _).mpr <| Nat.succ_ne_zero _)]
-  exact h
+  simp_rw [snd_expSeries_of_smul_comm _ _ hx]
+  simp_rw [expSeries_apply_eq] at *
+  rw [Finset.range_one, Finset.sum_singleton, Nat.factorial_zero, Nat.cast_one, pow_zero,
+    inv_one, one_smul, snd_one, sub_zero]
+  exact h.smul_const _
 #align triv_sq_zero_ext.has_sum_snd_exp_series_of_smul_comm TrivSqZeroExt.hasSum_snd_expSeries_of_smul_comm
 
 /-- If `exp R x.fst` converges to `e` then `exp R x` converges to `inl e + inr (e β€’ x.snd)`. -/
-theorem hasSum_expSeries_of_smul_comm [Field π•œ] [CharZero π•œ] [Ring R] [AddCommGroup M] [Algebra π•œ R]
-    [Module R M] [Module Rᡐᡒᡖ M] [SMulCommClass R Rᡐᡒᡖ M] [Module π•œ M] [IsScalarTower π•œ R M]
-    [IsScalarTower π•œ Rᡐᡒᡖ M] [TopologicalRing R] [TopologicalAddGroup M] [ContinuousSMul R M]
-    [ContinuousSMul Rᡐᡒᡖ M] (x : tsze R M) (hx : MulOpposite.op x.fst β€’ x.snd = x.fst β€’ x.snd)
+theorem hasSum_expSeries_of_smul_comm
+    (x : tsze R M) (hx : MulOpposite.op x.fst β€’ x.snd = x.fst β€’ x.snd)
     {e : R} (h : HasSum (fun n => expSeries π•œ R n fun _ => x.fst) e) :
     HasSum (fun n => expSeries π•œ (tsze R M) n fun _ => x) (inl e + inr (e β€’ x.snd)) := by
+  have : HasSum (fun n => fst (expSeries π•œ (tsze R M) n fun _ => x)) e := by
+    simpa [fst_expSeries] using h
   simpa only [inl_fst_add_inr_snd_eq] using
-    (hasSum_inl _ <| hasSum_fst_expSeries π•œ x h).add
-      (hasSum_inr _ <| hasSum_snd_expSeries_of_smul_comm π•œ x hx h)
+    (hasSum_inl _ <| this).add (hasSum_inr _ <| hasSum_snd_expSeries_of_smul_comm π•œ x hx h)
 #align triv_sq_zero_ext.has_sum_exp_series_of_smul_comm TrivSqZeroExt.hasSum_expSeries_of_smul_comm
 
-end Topology
-
-section NormedRing
-
-variable [IsROrC π•œ] [NormedRing R] [AddCommGroup M]
-
-variable [NormedAlgebra π•œ R] [Module R M] [Module Rᡐᡒᡖ M] [SMulCommClass R Rᡐᡒᡖ M]
-
-variable [Module π•œ M] [IsScalarTower π•œ R M] [IsScalarTower π•œ Rᡐᡒᡖ M]
-
-variable [TopologicalSpace M] [TopologicalRing R]
-
-variable [TopologicalAddGroup M] [ContinuousSMul R M] [ContinuousSMul Rᡐᡒᡖ M]
-
-variable [CompleteSpace R] [T2Space R] [T2Space M]
+variable [T2Space R] [T2Space M]
 
 theorem exp_def_of_smul_comm (x : tsze R M) (hx : MulOpposite.op x.fst β€’ x.snd = x.fst β€’ x.snd) :
     exp π•œ x = inl (exp π•œ x.fst) + inr (exp π•œ x.fst β€’ x.snd) := by
   simp_rw [exp, FormalMultilinearSeries.sum]
-  refine' (hasSum_expSeries_of_smul_comm π•œ x hx _).tsum_eq
-  exact expSeries_hasSum_exp _
-#align triv_sq_zero_ext.exp_def_of_smul_comm TrivSqZeroExt.exp_def_of_smul_comm
+  by_cases h : Summable (fun (n : β„•) => (expSeries π•œ R n) fun x_1 ↦ fst x)
+  Β· refine (hasSum_expSeries_of_smul_comm π•œ x hx ?_).tsum_eq
+    exact h.hasSum
+  Β· rw [tsum_eq_zero_of_not_summable h, zero_smul, inr_zero, inl_zero, zero_add,
+      tsum_eq_zero_of_not_summable]
+    simp_rw [← fst_expSeries] at h
+    refine mt ?_ h
+    exact (Summable.map Β· (TrivSqZeroExt.fstHom π•œ R M).toLinearMap continuous_fst)
 
 @[simp]
 theorem exp_inl (x : R) : exp π•œ (inl x : tsze R M) = inl (exp π•œ x) := by
@@ -127,21 +121,16 @@ theorem exp_inr (m : M) : exp π•œ (inr m : tsze R M) = 1 + inr m := by
   Β· rw [snd_inr, fst_inr, MulOpposite.op_zero, zero_smul, zero_smul]
 #align triv_sq_zero_ext.exp_inr TrivSqZeroExt.exp_inr
 
-end NormedRing
+end Ring
 
-section NormedCommRing
+section CommRing
+variable [Field π•œ] [CharZero π•œ] [CommRing R] [AddCommGroup M]
+  [Algebra π•œ R] [Module π•œ M] [Module R M] [Module Rᡐᡒᡖ M]
+  [IsCentralScalar R M] [IsScalarTower π•œ R M]
+  [TopologicalSpace R] [TopologicalSpace M]
+  [TopologicalRing R] [TopologicalAddGroup M] [ContinuousSMul R M] [ContinuousSMul Rᡐᡒᡖ M]
 
-variable [IsROrC π•œ] [NormedCommRing R] [AddCommGroup M]
-
-variable [NormedAlgebra π•œ R] [Module R M] [Module Rᡐᡒᡖ M] [IsCentralScalar R M]
-
-variable [Module π•œ M] [IsScalarTower π•œ R M]
-
-variable [TopologicalSpace M] [TopologicalRing R]
-
-variable [TopologicalAddGroup M] [ContinuousSMul R M]
-
-variable [CompleteSpace R] [T2Space R] [T2Space M]
+variable [T2Space R] [T2Space M]
 
 theorem exp_def (x : tsze R M) : exp π•œ x = inl (exp π•œ x.fst) + inr (exp π•œ x.fst β€’ x.snd) :=
   exp_def_of_smul_comm π•œ x (op_smul_eq_smul _ _)
@@ -164,21 +153,16 @@ theorem eq_smul_exp_of_invertible (x : tsze R M) [Invertible x.fst] :
     smul_smul, mul_invOf_self, one_smul, inl_fst_add_inr_snd_eq]
 #align triv_sq_zero_ext.eq_smul_exp_of_invertible TrivSqZeroExt.eq_smul_exp_of_invertible
 
-end NormedCommRing
-
-section NormedField
+end CommRing
 
-variable [IsROrC π•œ] [NormedField R] [AddCommGroup M]
+section Field
+variable [Field π•œ] [CharZero π•œ] [Field R] [AddCommGroup M]
+  [Algebra π•œ R] [Module π•œ M] [Module R M] [Module Rᡐᡒᡖ M]
+  [IsCentralScalar R M] [IsScalarTower π•œ R M]
+  [TopologicalSpace R] [TopologicalSpace M]
+  [TopologicalRing R] [TopologicalAddGroup M] [ContinuousSMul R M] [ContinuousSMul Rᡐᡒᡖ M]
 
-variable [NormedAlgebra π•œ R] [Module R M] [Module Rᡐᡒᡖ M] [IsCentralScalar R M]
-
-variable [Module π•œ M] [IsScalarTower π•œ R M]
-
-variable [TopologicalSpace M] [TopologicalRing R]
-
-variable [TopologicalAddGroup M] [ContinuousSMul R M]
-
-variable [CompleteSpace R] [T2Space R] [T2Space M]
+variable [T2Space R] [T2Space M]
 
 /-- More convenient version of `TrivSqZeroExt.eq_smul_exp_of_invertible` for when `R` is a
 field. -/
@@ -188,6 +172,8 @@ theorem eq_smul_exp_of_ne_zero (x : tsze R M) (hx : x.fst β‰  0) :
   eq_smul_exp_of_invertible _ _
 #align triv_sq_zero_ext.eq_smul_exp_of_ne_zero TrivSqZeroExt.eq_smul_exp_of_ne_zero
 
-end NormedField
+end Field
+
+end Topology
 
 end TrivSqZeroExt
chore: exp -> NormedSpace.exp (#8436)

Per discussion at zulip

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -38,6 +38,8 @@ variable (π•œ : Type*) {R M : Type*}
 
 local notation "tsze" => TrivSqZeroExt
 
+open NormedSpace -- For `exp`.
+
 namespace TrivSqZeroExt
 
 section Topology
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -34,7 +34,7 @@ For now, this file contains results about `exp` for this type.
 -/
 
 
-variable (π•œ : Type _) {R M : Type _}
+variable (π•œ : Type*) {R M : Type*}
 
 local notation "tsze" => TrivSqZeroExt
 
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2023 Eric Wieser. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Eric Wieser
-
-! This file was ported from Lean 3 source module analysis.normed_space.triv_sq_zero_ext
-! leanprover-community/mathlib commit 88a563b158f59f2983cfad685664da95502e8cdd
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Analysis.NormedSpace.Basic
 import Mathlib.Analysis.NormedSpace.Exponential
 import Mathlib.Topology.Instances.TrivSqZeroExt
 
+#align_import analysis.normed_space.triv_sq_zero_ext from "leanprover-community/mathlib"@"88a563b158f59f2983cfad685664da95502e8cdd"
+
 /-!
 # Results on `TrivSqZeroExt R M` related to the norm
 
feat: port Analysis.NormedSpace.TrivSqZeroExt (#4626)

Dependencies 12 + 753

754 files ported (98.4%)
337896 lines ported (98.4%)
Show graph

The unported dependencies are

The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file