Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 6e08817

Browse files
committed
Merge remote-tracking branch 'origin/master' into nnrat_cast
2 parents 1fbb8a9 + acebd8d commit 6e08817

File tree

18 files changed

+182
-114
lines changed

18 files changed

+182
-114
lines changed

src/algebra/field/opposite.lean

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Authors: Kenny Lau
55
-/
66
import algebra.field.defs
77
import algebra.ring.opposite
8+
import data.int.cast.lemmas
89

910
/-!
1011
# Field structure on the multiplicative/additive opposite
@@ -34,6 +35,20 @@ lemma op_rat_cast [has_rat_cast α] (q : ℚ) : op (q : α) = q := rfl
3435
@[simp, norm_cast, to_additive]
3536
lemma unop_rat_cast [has_rat_cast α] (q : ℚ) : unop (q : αᵐᵒᵖ) = q := rfl
3637

38+
namespace mul_opposite
39+
40+
@[to_additive] instance [has_rat_cast α] : has_rat_cast αᵐᵒᵖ := ⟨λ n, op n⟩
41+
42+
variables {α}
43+
44+
@[simp, norm_cast, to_additive]
45+
lemma op_rat_cast [has_rat_cast α] (q : ℚ) : op (q : α) = q := rfl
46+
47+
@[simp, norm_cast, to_additive]
48+
lemma unop_rat_cast [has_rat_cast α] (q : ℚ) : unop (q : αᵐᵒᵖ) = q := rfl
49+
50+
variables (α)
51+
3752
instance [division_semiring α] : division_semiring αᵐᵒᵖ :=
3853
{ nnrat_cast := λ q, op q,
3954
nnrat_cast_eq := λ q, by { rw [nnrat.cast_def, op_div, op_nat_cast, op_nat_cast, div_eq_mul_inv],
@@ -44,7 +59,7 @@ instance [division_ring α] : division_ring αᵐᵒᵖ :=
4459
{ rat_cast := λ q, op q,
4560
rat_cast_mk := λ a b hb h, by { rw [rat.cast_def, op_div, op_nat_cast, op_int_cast],
4661
exact int.commute_cast _ _ },
47-
..mul_opposite.division_semiring, ..mul_opposite.ring α }
62+
..mul_opposite.division_semiring α, ..mul_opposite.ring α }
4863

4964
instance [semifield α] : semifield αᵐᵒᵖ :=
5065
{ ..mul_opposite.division_semiring, ..mul_opposite.comm_semiring α }
@@ -56,6 +71,10 @@ end mul_opposite
5671

5772
namespace add_opposite
5873

74+
end mul_opposite
75+
76+
namespace add_opposite
77+
5978
instance [division_semiring α] : division_semiring αᵃᵒᵖ :=
6079
{ nnrat_cast := λ q, op q,
6180
nnrat_cast_eq := λ q, by { rw [nnrat.cast_def, op_div, op_nat_cast, op_nat_cast] },
@@ -72,6 +91,6 @@ instance [semifield α] : semifield αᵃᵒᵖ :=
7291
{ ..add_opposite.division_semiring, ..add_opposite.comm_semiring α }
7392

7493
instance [field α] : field αᵃᵒᵖ :=
75-
{ ..add_opposite.division_ring, ..add_opposite.comm_ring α }
94+
{ ..add_opposite.division_ring α, ..add_opposite.comm_ring α }
7695

7796
end add_opposite

src/algebra/group/opposite.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ namespace mul_opposite
2424
### Additive structures on `αᵐᵒᵖ`
2525
-/
2626

27+
@[to_additive] instance [has_nat_cast α] : has_nat_cast αᵐᵒᵖ := ⟨λ n, op n⟩
28+
@[to_additive] instance [has_int_cast α] : has_int_cast αᵐᵒᵖ := ⟨λ n, op n⟩
29+
2730
instance [add_semigroup α] : add_semigroup (αᵐᵒᵖ) :=
2831
unop_injective.add_semigroup _ (λ x y, rfl)
2932

@@ -45,9 +48,6 @@ unop_injective.add_monoid _ rfl (λ _ _, rfl) (λ _ _, rfl)
4548
instance [add_comm_monoid α] : add_comm_monoid αᵐᵒᵖ :=
4649
unop_injective.add_comm_monoid _ rfl (λ _ _, rfl) (λ _ _, rfl)
4750

48-
@[to_additive] instance [has_nat_cast α] : has_nat_cast αᵐᵒᵖ := ⟨λ n, op n⟩
49-
@[to_additive] instance [has_int_cast α] : has_int_cast αᵐᵒᵖ := ⟨λ n, op n⟩
50-
5151
instance [add_monoid_with_one α] : add_monoid_with_one αᵐᵒᵖ :=
5252
{ nat_cast_zero := show op ((0 : ℕ) : α) = 0, by rw [nat.cast_zero, op_zero],
5353
nat_cast_succ := show ∀ n, op ((n + 1 : ℕ) : α) = op (n : ℕ) + 1, by simp,

src/algebra/module/basic.lean

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -381,27 +381,32 @@ lemma map_nat_cast_smul [add_comm_monoid M] [add_comm_monoid M₂] {F : Type*}
381381
f ((x : R) • a) = (x : S) • f a :=
382382
by simp only [←nsmul_eq_smul_cast, map_nsmul]
383383

384-
lemma map_inv_int_cast_smul [add_comm_group M] [add_comm_group M₂] {F : Type*}
384+
lemma map_inv_nat_cast_smul [add_comm_monoid M] [add_comm_monoid M₂] {F : Type*}
385385
[add_monoid_hom_class F M M₂] (f : F)
386-
(R S : Type*) [division_ring R] [division_ring S] [module R M] [module S M₂]
387-
(n : ) (x : M) :
386+
(R S : Type*) [division_semiring R] [division_semiring S] [module R M] [module S M₂]
387+
(n : ) (x : M) :
388388
f ((n⁻¹ : R) • x) = (n⁻¹ : S) • f x :=
389389
begin
390390
by_cases hR : (n : R) = 0; by_cases hS : (n : S) = 0,
391391
{ simp [hR, hS] },
392392
{ suffices : ∀ y, f y = 0, by simp [this], clear x, intro x,
393-
rw [← inv_smul_smul₀ hS (f x), ← map_int_cast_smul f R S], simp [hR] },
393+
rw [← inv_smul_smul₀ hS (f x), ← map_nat_cast_smul f R S], simp [hR] },
394394
{ suffices : ∀ y, f y = 0, by simp [this], clear x, intro x,
395-
rw [← smul_inv_smul₀ hR x, map_int_cast_smul f R S, hS, zero_smul] },
396-
{ rw [← inv_smul_smul₀ hS (f _), ← map_int_cast_smul f R S, smul_inv_smul₀ hR] }
395+
rw [← smul_inv_smul₀ hR x, map_nat_cast_smul f R S, hS, zero_smul] },
396+
{ rw [← inv_smul_smul₀ hS (f _), ← map_nat_cast_smul f R S, smul_inv_smul₀ hR] }
397397
end
398398

399-
lemma map_inv_nat_cast_smul [add_comm_group M] [add_comm_group M₂] {F : Type*}
399+
lemma map_inv_int_cast_smul [add_comm_group M] [add_comm_group M₂] {F : Type*}
400400
[add_monoid_hom_class F M M₂] (f : F)
401401
(R S : Type*) [division_ring R] [division_ring S] [module R M] [module S M₂]
402-
(n : ℕ) (x : M) :
403-
f ((n⁻¹ : R) • x) = (n⁻¹ : S) • f x :=
404-
by exact_mod_cast map_inv_int_cast_smul f R S n x
402+
(z : ℤ) (x : M) :
403+
f ((z⁻¹ : R) • x) = (z⁻¹ : S) • f x :=
404+
begin
405+
obtain ⟨n, rfl | rfl⟩ := z.eq_coe_or_neg,
406+
{ rw [int.cast_coe_nat, int.cast_coe_nat, map_inv_nat_cast_smul _ R S] },
407+
{ simp_rw [int.cast_neg, int.cast_coe_nat, inv_neg, neg_smul, map_neg,
408+
map_inv_nat_cast_smul _ R S] },
409+
end
405410

406411
lemma map_rat_cast_smul [add_comm_group M] [add_comm_group M₂] {F : Type*}
407412
[add_monoid_hom_class F M M₂] (f : F)
@@ -421,34 +426,34 @@ instance subsingleton_rat_module (E : Type*) [add_comm_group E] : subsingleton (
421426
⟨λ P Q, module.ext' P Q $ λ r x,
422427
@map_rat_smul _ _ _ _ P Q _ _ (add_monoid_hom.id E) r x⟩
423428

429+
/-- If `E` is a vector space over two division semirings `R` and `S`, then scalar multiplications
430+
agree on inverses of natural numbers in `R` and `S`. -/
431+
lemma inv_nat_cast_smul_eq {E : Type*} (R S : Type*) [add_comm_monoid E] [division_semiring R]
432+
[division_semiring S] [module R E] [module S E] (n : ℕ) (x : E) :
433+
(n⁻¹ : R) • x = (n⁻¹ : S) • x :=
434+
map_inv_nat_cast_smul (add_monoid_hom.id E) R S n x
435+
424436
/-- If `E` is a vector space over two division rings `R` and `S`, then scalar multiplications
425437
agree on inverses of integer numbers in `R` and `S`. -/
426438
lemma inv_int_cast_smul_eq {E : Type*} (R S : Type*) [add_comm_group E] [division_ring R]
427439
[division_ring S] [module R E] [module S E] (n : ℤ) (x : E) :
428440
(n⁻¹ : R) • x = (n⁻¹ : S) • x :=
429441
map_inv_int_cast_smul (add_monoid_hom.id E) R S n x
430442

431-
/-- If `E` is a vector space over two division rings `R` and `S`, then scalar multiplications
432-
agree on inverses of natural numbers in `R` and `S`. -/
433-
lemma inv_nat_cast_smul_eq {E : Type*} (R S : Type*) [add_comm_group E] [division_ring R]
434-
[division_ring S] [module R E] [module S E] (n : ℕ) (x : E) :
435-
(n⁻¹ : R) • x = (n⁻¹ : S) • x :=
436-
map_inv_nat_cast_smul (add_monoid_hom.id E) R S n x
443+
/-- If `E` is a vector space over a division ring `R` and has a monoid action by `α`, then that
444+
action commutes by scalar multiplication of inverses of natural numbers in `R`. -/
445+
lemma inv_nat_cast_smul_commE : Type*} (R : Type*) [add_comm_monoid E] [division_semiring R]
446+
[monoid α] [module R E] [distrib_mul_action α E] (n : ℕ) (s : α) (x : E) :
447+
(n⁻¹ : R) • s • x = s • (n⁻¹ : R) • x :=
448+
(map_inv_nat_cast_smul (distrib_mul_action.to_add_monoid_hom E s) R R n x).symm
437449

438-
/-- If `E` is a vector space over a division rings `R` and has a monoid action by `α`, then that
450+
/-- If `E` is a vector space over a division ring `R` and has a monoid action by `α`, then that
439451
action commutes by scalar multiplication of inverses of integers in `R` -/
440452
lemma inv_int_cast_smul_comm {α E : Type*} (R : Type*) [add_comm_group E] [division_ring R]
441453
[monoid α] [module R E] [distrib_mul_action α E] (n : ℤ) (s : α) (x : E) :
442454
(n⁻¹ : R) • s • x = s • (n⁻¹ : R) • x :=
443455
(map_inv_int_cast_smul (distrib_mul_action.to_add_monoid_hom E s) R R n x).symm
444456

445-
/-- If `E` is a vector space over a division rings `R` and has a monoid action by `α`, then that
446-
action commutes by scalar multiplication of inverses of natural numbers in `R`. -/
447-
lemma inv_nat_cast_smul_comm {α E : Type*} (R : Type*) [add_comm_group E] [division_ring R]
448-
[monoid α] [module R E] [distrib_mul_action α E] (n : ℕ) (s : α) (x : E) :
449-
(n⁻¹ : R) • s • x = s • (n⁻¹ : R) • x :=
450-
(map_inv_nat_cast_smul (distrib_mul_action.to_add_monoid_hom E s) R R n x).symm
451-
452457
/-- If `E` is a vector space over two division rings `R` and `S`, then scalar multiplications
453458
agree on rational numbers in `R` and `S`. -/
454459
lemma rat_cast_smul_eq {E : Type*} (R S : Type*) [add_comm_group E] [division_ring R]

src/algebra/periodic.lean

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ protected lemma periodic.const_smul [add_monoid α] [group γ] [distrib_mul_acti
103103
periodic (λ x, f (a • x)) (a⁻¹ • c) :=
104104
λ x, by simpa only [smul_add, smul_inv_smul] using h (a • x)
105105

106-
lemma periodic.const_smul₀ [add_comm_monoid α] [division_ring γ] [module γ α]
106+
lemma periodic.const_smul₀ [add_comm_monoid α] [division_semiring γ] [module γ α]
107107
(h : periodic f c) (a : γ) :
108108
periodic (λ x, f (a • x)) (a⁻¹ • c) :=
109109
begin
@@ -112,7 +112,7 @@ begin
112112
simpa only [smul_add, smul_inv_smul₀ ha] using h (a • x),
113113
end
114114

115-
protected lemma periodic.const_mul [division_ring α] (h : periodic f c) (a : α) :
115+
protected lemma periodic.const_mul [division_semiring α] (h : periodic f c) (a : α) :
116116
periodic (λ x, f (a * x)) (a⁻¹ * c) :=
117117
h.const_smul₀ a
118118

@@ -121,29 +121,29 @@ lemma periodic.const_inv_smul [add_monoid α] [group γ] [distrib_mul_action γ
121121
periodic (λ x, f (a⁻¹ • x)) (a • c) :=
122122
by simpa only [inv_inv] using h.const_smul a⁻¹
123123

124-
lemma periodic.const_inv_smul₀ [add_comm_monoid α] [division_ring γ] [module γ α]
124+
lemma periodic.const_inv_smul₀ [add_comm_monoid α] [division_semiring γ] [module γ α]
125125
(h : periodic f c) (a : γ) :
126126
periodic (λ x, f (a⁻¹ • x)) (a • c) :=
127127
by simpa only [inv_inv] using h.const_smul₀ a⁻¹
128128

129-
lemma periodic.const_inv_mul [division_ring α] (h : periodic f c) (a : α) :
129+
lemma periodic.const_inv_mul [division_semiring α] (h : periodic f c) (a : α) :
130130
periodic (λ x, f (a⁻¹ * x)) (a * c) :=
131131
h.const_inv_smul₀ a
132132

133-
lemma periodic.mul_const [division_ring α] (h : periodic f c) (a : α) :
133+
lemma periodic.mul_const [division_semiring α] (h : periodic f c) (a : α) :
134134
periodic (λ x, f (x * a)) (c * a⁻¹) :=
135135
h.const_smul₀ $ mul_opposite.op a
136136

137-
lemma periodic.mul_const' [division_ring α]
137+
lemma periodic.mul_const' [division_semiring α]
138138
(h : periodic f c) (a : α) :
139139
periodic (λ x, f (x * a)) (c / a) :=
140140
by simpa only [div_eq_mul_inv] using h.mul_const a
141141

142-
lemma periodic.mul_const_inv [division_ring α] (h : periodic f c) (a : α) :
142+
lemma periodic.mul_const_inv [division_semiring α] (h : periodic f c) (a : α) :
143143
periodic (λ x, f (x * a⁻¹)) (c * a) :=
144144
h.const_inv_smul₀ $ mul_opposite.op a
145145

146-
lemma periodic.div_const [division_ring α] (h : periodic f c) (a : α) :
146+
lemma periodic.div_const [division_semiring α] (h : periodic f c) (a : α) :
147147
periodic (λ x, f (x / a)) (c * a) :=
148148
by simpa only [div_eq_mul_inv] using h.mul_const_inv a
149149

@@ -425,12 +425,12 @@ lemma antiperiodic.const_smul [add_monoid α] [has_neg β] [group γ] [distrib_m
425425
antiperiodic (λ x, f (a • x)) (a⁻¹ • c) :=
426426
λ x, by simpa only [smul_add, smul_inv_smul] using h (a • x)
427427

428-
lemma antiperiodic.const_smul₀ [add_comm_monoid α] [has_neg β] [division_ring γ] [module γ α]
428+
lemma antiperiodic.const_smul₀ [add_comm_monoid α] [has_neg β] [division_semiring γ] [module γ α]
429429
(h : antiperiodic f c) {a : γ} (ha : a ≠ 0) :
430430
antiperiodic (λ x, f (a • x)) (a⁻¹ • c) :=
431431
λ x, by simpa only [smul_add, smul_inv_smul₀ ha] using h (a • x)
432432

433-
lemma antiperiodic.const_mul [division_ring α] [has_neg β]
433+
lemma antiperiodic.const_mul [division_semiring α] [has_neg β]
434434
(h : antiperiodic f c) {a : α} (ha : a ≠ 0) :
435435
antiperiodic (λ x, f (a * x)) (a⁻¹ * c) :=
436436
h.const_smul₀ ha
@@ -440,32 +440,33 @@ lemma antiperiodic.const_inv_smul [add_monoid α] [has_neg β] [group γ] [distr
440440
antiperiodic (λ x, f (a⁻¹ • x)) (a • c) :=
441441
by simpa only [inv_inv] using h.const_smul a⁻¹
442442

443-
lemma antiperiodic.const_inv_smul₀ [add_comm_monoid α] [has_neg β] [division_ring γ] [module γ α]
443+
lemma antiperiodic.const_inv_smul₀
444+
[add_comm_monoid α] [has_neg β] [division_semiring γ] [module γ α]
444445
(h : antiperiodic f c) {a : γ} (ha : a ≠ 0) :
445446
antiperiodic (λ x, f (a⁻¹ • x)) (a • c) :=
446447
by simpa only [inv_inv] using h.const_smul₀ (inv_ne_zero ha)
447448

448-
lemma antiperiodic.const_inv_mul [division_ring α] [has_neg β]
449+
lemma antiperiodic.const_inv_mul [division_semiring α] [has_neg β]
449450
(h : antiperiodic f c) {a : α} (ha : a ≠ 0) :
450451
antiperiodic (λ x, f (a⁻¹ * x)) (a * c) :=
451452
h.const_inv_smul₀ ha
452453

453-
lemma antiperiodic.mul_const [division_ring α] [has_neg β]
454+
lemma antiperiodic.mul_const [division_semiring α] [has_neg β]
454455
(h : antiperiodic f c) {a : α} (ha : a ≠ 0) :
455456
antiperiodic (λ x, f (x * a)) (c * a⁻¹) :=
456457
h.const_smul₀ $ (mul_opposite.op_ne_zero_iff a).mpr ha
457458

458-
lemma antiperiodic.mul_const' [division_ring α] [has_neg β]
459+
lemma antiperiodic.mul_const' [division_semiring α] [has_neg β]
459460
(h : antiperiodic f c) {a : α} (ha : a ≠ 0) :
460461
antiperiodic (λ x, f (x * a)) (c / a) :=
461462
by simpa only [div_eq_mul_inv] using h.mul_const ha
462463

463-
lemma antiperiodic.mul_const_inv [division_ring α] [has_neg β]
464+
lemma antiperiodic.mul_const_inv [division_semiring α] [has_neg β]
464465
(h : antiperiodic f c) {a : α} (ha : a ≠ 0) :
465466
antiperiodic (λ x, f (x * a⁻¹)) (c * a) :=
466467
h.const_inv_smul₀ $ (mul_opposite.op_ne_zero_iff a).mpr ha
467468

468-
protected lemma antiperiodic.div_inv [division_ring α] [has_neg β]
469+
protected lemma antiperiodic.div_inv [division_semiring α] [has_neg β]
469470
(h : antiperiodic f c) {a : α} (ha : a ≠ 0) :
470471
antiperiodic (λ x, f (x / a)) (c * a) :=
471472
by simpa only [div_eq_mul_inv] using h.mul_const_inv ha

src/algebra/star/module.lean

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,22 @@ This file also provides some lemmas that need `algebra.module.basic` imported to
3333
section smul_lemmas
3434
variables {R M : Type*}
3535

36+
@[simp] lemma star_nat_cast_smul [semiring R] [add_comm_monoid M] [module R M] [star_add_monoid M]
37+
(n : ℕ) (x : M) : star ((n : R) • x) = (n : R) • star x :=
38+
map_nat_cast_smul (star_add_equiv : M ≃+ M) R R n x
39+
3640
@[simp] lemma star_int_cast_smul [ring R] [add_comm_group M] [module R M] [star_add_monoid M]
3741
(n : ℤ) (x : M) : star ((n : R) • x) = (n : R) • star x :=
3842
map_int_cast_smul (star_add_equiv : M ≃+ M) R R n x
3943

40-
@[simp] lemma star_nat_cast_smul [semiring R] [add_comm_monoid M] [module R M] [star_add_monoid M]
41-
(n : ℕ) (x : M) : star ((n : R) • x) = (n : R) • star x :=
42-
map_nat_cast_smul (star_add_equiv : M ≃+ M) R R n x
44+
@[simp] lemma star_inv_nat_cast_smul [division_semiring R] [add_comm_monoid M] [module R M]
45+
[star_add_monoid M] (n : ℕ) (x : M) : star ((n⁻¹ : R) • x) = (n⁻¹ : R) • star x :=
46+
map_inv_nat_cast_smul (star_add_equiv : M ≃+ M) R R n x
4347

4448
@[simp] lemma star_inv_int_cast_smul [division_ring R] [add_comm_group M] [module R M]
4549
[star_add_monoid M] (n : ℤ) (x : M) : star ((n⁻¹ : R) • x) = (n⁻¹ : R) • star x :=
4650
map_inv_int_cast_smul (star_add_equiv : M ≃+ M) R R n x
4751

48-
@[simp] lemma star_inv_nat_cast_smul [division_ring R] [add_comm_group M] [module R M]
49-
[star_add_monoid M] (n : ℕ) (x : M) : star ((n⁻¹ : R) • x) = (n⁻¹ : R) • star x :=
50-
map_inv_nat_cast_smul (star_add_equiv : M ≃+ M) R R n x
51-
5252
@[simp] lemma star_rat_cast_smul [division_ring R] [add_comm_group M] [module R M]
5353
[star_add_monoid M] (n : ℚ) (x : M) : star ((n : R) • x) = (n : R) • star x :=
5454
map_rat_cast_smul (star_add_equiv : M ≃+ M) _ _ _ x

src/algebra/star/pointwise.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ instance [has_star α] [has_trivial_star α] : has_trivial_star (set α) :=
117117
protected lemma star_inv [group α] [star_semigroup α] (s : set α) : (s⁻¹)⋆ = (s⋆)⁻¹ :=
118118
by { ext, simp only [mem_star, mem_inv, star_inv] }
119119

120-
protected lemma star_inv' [division_ring α] [star_ring α] (s : set α) : (s⁻¹)⋆ = (s⋆)⁻¹ :=
120+
protected lemma star_inv' [division_semiring α] [star_ring α] (s : set α) : (s⁻¹)⋆ = (s⋆)⁻¹ :=
121121
by { ext, simp only [mem_star, mem_inv, star_inv'] }
122122

123123
end set

src/algebra/star/self_adjoint.lean

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,15 +166,20 @@ star_int_cast _
166166

167167
end ring
168168

169-
section division_ring
170-
variables [division_ring R] [star_ring R]
169+
section division_semiring
170+
variables [division_semiring R] [star_ring R]
171171

172172
lemma inv {x : R} (hx : is_self_adjoint x) : is_self_adjoint x⁻¹ :=
173173
by simp only [is_self_adjoint_iff, star_inv', hx.star_eq]
174174

175175
lemma zpow {x : R} (hx : is_self_adjoint x) (n : ℤ) : is_self_adjoint (x ^ n):=
176176
by simp only [is_self_adjoint_iff, star_zpow₀, hx.star_eq]
177177

178+
end division_semiring
179+
180+
section division_ring
181+
variables [division_ring R] [star_ring R]
182+
178183
lemma _root_.is_self_adjoint_rat_cast (x : ℚ) : is_self_adjoint (x : R) :=
179184
star_rat_cast _
180185

src/analysis/inner_product_space/adjoint.lean

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -434,14 +434,13 @@ open_locale complex_conjugate
434434

435435
/-- The adjoint of the linear map associated to a matrix is the linear map associated to the
436436
conjugate transpose of that matrix. -/
437-
lemma conj_transpose_eq_adjoint (A : matrix m n 𝕜) :
438-
to_lin' A.conj_transpose =
439-
@linear_map.adjoint _ (euclidean_space 𝕜 n) (euclidean_space 𝕜 m) _ _ _ _ _ (to_lin' A) :=
437+
lemma to_euclidean_lin_conj_transpose_eq_adjoint (A : matrix m n 𝕜) :
438+
A.conj_transpose.to_euclidean_lin = A.to_euclidean_lin.adjoint :=
440439
begin
441-
rw @linear_map.eq_adjoint_iff _ (euclidean_space 𝕜 m) (euclidean_space 𝕜 n),
440+
rw linear_map.eq_adjoint_iff,
442441
intros x y,
443-
convert dot_product_assoc (conj ∘ (id x : m → 𝕜)) y A using 1,
444-
simp [dot_product, mul_vec, ring_hom.map_sum, ← star_ring_end_apply, mul_comm],
442+
simp_rw [euclidean_space.inner_eq_star_dot_product, pi_Lp_equiv_to_euclidean_lin,
443+
to_lin'_apply, star_mul_vec, conj_transpose_conj_transpose, dot_product_mul_vec],
445444
end
446445

447446
end matrix

0 commit comments

Comments
 (0)