@@ -131,6 +131,11 @@ noncomputable irreducible_def exp (x : 𝔸) : 𝔸 :=
131131 else
132132 1
133133
134+ /-- The junk value when `𝔸` can't be equipped with a `ℚ`-algebra structure. -/
135+ @[simp]
136+ theorem exp_of_isEmpty_algebra_rat [IsEmpty (Algebra ℚ 𝔸)] (x : 𝔸) : exp x = 1 := by
137+ rw [exp, dif_neg (not_nonempty_iff.mpr ‹_›)]
138+
134139theorem expSeries_apply_eq (x : 𝔸) (n : ℕ) :
135140 (expSeries 𝕂 𝔸 n fun _ => x) = (n !⁻¹ : 𝕂) • x ^ n := by simp [expSeries]
136141
@@ -186,14 +191,11 @@ theorem exp_zero : exp (0 : 𝔸) = 1 := by
186191@[simp]
187192theorem exp_op [T2Space 𝔸] (x : 𝔸) :
188193 exp (MulOpposite.op x) = MulOpposite.op (exp x) := by
189- by_cases h : Nonempty (Algebra ℚ 𝔸)
190- · obtain ⟨_⟩ := h
191- rw [exp_eq_tsum ℚ, exp_eq_tsum ℚ]
194+ obtain h | ⟨⟨_⟩⟩ := isEmpty_or_nonempty (Algebra ℚ 𝔸)
195+ · have : IsEmpty (Algebra ℚ 𝔸ᵐᵒᵖ) := ⟨fun _ => h.elim <| (RingEquiv.opOp 𝔸).algebra ℚ⟩
196+ simp
197+ · rw [exp_eq_tsum ℚ, exp_eq_tsum ℚ]
192198 simp_rw [← MulOpposite.op_pow, ← MulOpposite.op_smul, tsum_op]
193- · have : ¬Nonempty (Algebra ℚ 𝔸ᵐᵒᵖ) := by
194- rintro ⟨h'⟩
195- exact h ⟨(RingEquiv.opOp 𝔸).algebra ℚ⟩
196- rw [exp, exp, dif_neg h, dif_neg this, MulOpposite.op_one]
197199
198200@[simp]
199201theorem exp_unop [T2Space 𝔸] (x : 𝔸ᵐᵒᵖ) :
@@ -202,10 +204,9 @@ theorem exp_unop [T2Space 𝔸] (x : 𝔸ᵐᵒᵖ) :
202204
203205theorem star_exp [T2Space 𝔸] [StarRing 𝔸] [ContinuousStar 𝔸] (x : 𝔸) :
204206 star (exp x) = exp (star x) := by
205- by_cases h : Nonempty (Algebra ℚ 𝔸)
206- · obtain ⟨_⟩ := h
207- simp_rw [exp_eq_tsum ℚ, ← star_pow, ← star_inv_natCast_smul, ← tsum_star]
208- · rw [exp, exp, dif_neg h, dif_neg h, star_one]
207+ obtain _ | ⟨⟨_⟩⟩ := isEmpty_or_nonempty (Algebra ℚ 𝔸)
208+ · simp
209+ · simp_rw [exp_eq_tsum ℚ, ← star_pow, ← star_inv_natCast_smul, ← tsum_star]
209210
210211/-- A subalgebra of `𝔸` that is closed topologically and under `ℚ`-scaling is closed under `exp`. -/
211212theorem exp_mem
@@ -226,12 +227,10 @@ theorem _root_.IsSelfAdjoint.exp [T2Space 𝔸] [StarRing 𝔸] [ContinuousStar
226227
227228theorem _root_.Commute.exp_right [T2Space 𝔸] {x y : 𝔸} (h : Commute x y) :
228229 Commute x (exp y) := by
229- by_cases h : Nonempty (Algebra ℚ 𝔸)
230- · obtain ⟨_⟩ := h
231- rw [exp_eq_tsum ℚ]
230+ obtain _ | ⟨⟨_⟩⟩ := isEmpty_or_nonempty (Algebra ℚ 𝔸)
231+ · simp
232+ · rw [exp_eq_tsum ℚ]
232233 exact Commute.tsum_right x fun n => (h.pow_right n).smul_right _
233- · rw [exp, dif_neg h]
234- exact Commute.one_right x
235234
236235theorem _root_.Commute.exp_left [T2Space 𝔸] {x y : 𝔸} (h : Commute x y) :
237236 Commute (exp x) y :=
0 commit comments