|
| 1 | +/- |
| 2 | +Copyright (c) 2023 Eric Wieser. All rights reserved. |
| 3 | +Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | +Authors: Eric Wieser |
| 5 | +-/ |
| 6 | +import data.complex.module |
| 7 | +import ring_theory.norm |
| 8 | +import ring_theory.trace |
| 9 | + |
| 10 | +/-! # Lemmas about `algebra.trace` and `algebra.norm` on `ℂ` -/ |
| 11 | + |
| 12 | +open complex |
| 13 | + |
| 14 | +lemma algebra.left_mul_matrix_complex (z : ℂ) : |
| 15 | + algebra.left_mul_matrix complex.basis_one_I z = !![z.re, -z.im; z.im, z.re] := |
| 16 | +begin |
| 17 | + ext i j, |
| 18 | + rw [algebra.left_mul_matrix_eq_repr_mul, complex.coe_basis_one_I_repr, complex.coe_basis_one_I, |
| 19 | + mul_re, mul_im, matrix.of_apply], |
| 20 | + fin_cases j, |
| 21 | + { simp_rw [matrix.cons_val_zero, one_re, one_im, mul_zero, mul_one, sub_zero, zero_add], |
| 22 | + fin_cases i; refl }, |
| 23 | + { simp_rw [matrix.cons_val_one, matrix.head_cons, I_re, I_im, mul_zero, mul_one, zero_sub, |
| 24 | + add_zero], |
| 25 | + fin_cases i; refl }, |
| 26 | +end |
| 27 | + |
| 28 | +lemma algebra.trace_complex_apply (z : ℂ) : algebra.trace ℝ ℂ z = 2*z.re := |
| 29 | +begin |
| 30 | + rw [algebra.trace_eq_matrix_trace complex.basis_one_I, |
| 31 | + algebra.left_mul_matrix_complex, matrix.trace_fin_two], |
| 32 | + exact (two_mul _).symm |
| 33 | +end |
| 34 | + |
| 35 | +lemma algebra.norm_complex_apply (z : ℂ) : algebra.norm ℝ z = z.norm_sq := |
| 36 | +begin |
| 37 | + rw [algebra.norm_eq_matrix_det complex.basis_one_I, |
| 38 | + algebra.left_mul_matrix_complex, matrix.det_fin_two, norm_sq_apply], |
| 39 | + simp, |
| 40 | +end |
| 41 | + |
| 42 | +lemma algebra.norm_complex_eq : algebra.norm ℝ = norm_sq.to_monoid_hom := |
| 43 | +monoid_hom.ext algebra.norm_complex_apply |
0 commit comments