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

Commit 4ec7cc5

Browse files
committed
refactor(*): fix field names in linear_map and submodule (#3032)
* `linear_map` now uses `map_add'` and `map_smul`'; * `submodule` now `extends add_submonoid` and adds `smul_mem'`; * no more `submodule.is_add_subgroup` instance; * `open_subgroup` now uses bundled subgroups; * `is_linear_map` is not a `class` anymore: we had a couple of `instances` but zero lemmas taking it as a typeclass argument; * `subgroup.mem_coe` now takes `{g : G}` as it should, not `[g : G]`.
1 parent 338bbd2 commit 4ec7cc5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+479
-475
lines changed

src/algebra/category/Group/Z_Module_equivalence.lean

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ open category_theory.equivalence
2020
/-- The forgetful functor from `ℤ` modules to `AddCommGroup` is full. -/
2121
instance : full (forget₂ (Module ℤ) AddCommGroup) :=
2222
{ preimage := λ A B f,
23+
-- TODO: why `add_monoid_hom.to_int_linear_map` doesn't work here?
2324
{ to_fun := f,
24-
add := λ x y, add_monoid_hom.map_add f x y,
25-
smul := λ n x, by convert add_monoid_hom.map_int_module_smul f n x } }
25+
map_add' := add_monoid_hom.map_add f,
26+
map_smul' := λ n x, by convert add_monoid_hom.map_int_module_smul f n x } }
2627

2728
/-- The forgetful functor from `ℤ` modules to `AddCommGroup` is essentially surjective. -/
2829
instance : ess_surj (forget₂ (Module ℤ) AddCommGroup) :=

src/algebra/category/Module/basic.lean

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,6 @@ variables {R} {M N U : Module R}
8181
@[simp] lemma coe_comp (f : M ⟶ N) (g : N ⟶ U) :
8282
((f ≫ g) : M → U) = g ∘ f := rfl
8383

84-
instance hom_is_module_hom (f : M ⟶ N) :
85-
is_linear_map R (f : M → N) := linear_map.is_linear _
86-
8784
end Module
8885

8986
variables {R}
@@ -108,8 +105,8 @@ def to_linear_equiv {X Y : Module.{u} R} (i : X ≅ Y) : X ≃ₗ[R] Y :=
108105
inv_fun := i.inv,
109106
left_inv := by tidy,
110107
right_inv := by tidy,
111-
add := by tidy,
112-
smul := by tidy, }.
108+
map_add' := by tidy,
109+
map_smul' := by tidy, }.
113110

114111
end category_theory.iso
115112

src/algebra/lie_algebra.lean

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -354,14 +354,14 @@ lemma endo_algebra_bracket (M : Type v) [add_comm_group M] [module R M] (f g : m
354354
/--
355355
The adjoint action of a Lie algebra on itself.
356356
-/
357-
def Ad : L →ₗ⁅R⁆ module.End R L := {
358-
to_fun := λ x, {
359-
to_fun := has_bracket.bracket x,
360-
add := by { intros, apply lie_add, },
361-
smul := by { intros, apply lie_smul, } },
362-
add := by { intros, ext, simp, },
363-
smul := by { intros, ext, simp, },
364-
map_lie := by {
357+
def Ad : L →ₗ⁅R⁆ module.End R L :=
358+
{ to_fun := λ x,
359+
{ to_fun := has_bracket.bracket x,
360+
map_add' := by { intros, apply lie_add, },
361+
map_smul' := by { intros, apply lie_smul, } },
362+
map_add' := by { intros, ext, simp, },
363+
map_smul' := by { intros, ext, simp, },
364+
map_lie := by {
365365
intros x y, ext z,
366366
rw endo_algebra_bracket,
367367
suffices : ⁅⁅x, y⁆, z⁆ = ⁅x, ⁅y, z⁆⁆ + ⁅⁅x, z⁆, y⁆, by simpa [sub_eq_add_neg],

src/algebra/module.lean

Lines changed: 56 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -223,11 +223,11 @@ def ring_hom.to_semimodule [semiring R] [semiring S] (f : R →+* S) : semimodul
223223
`f (x + y) = f x + f y` and `f (c • x) = c • f x`. The predicate `is_linear_map R f` asserts this
224224
property. A bundled version is available with `linear_map`, and should be favored over
225225
`is_linear_map` most of the time. -/
226-
class is_linear_map (R : Type u) {M : Type v} {M₂ : Type w}
226+
structure is_linear_map (R : Type u) {M : Type v} {M₂ : Type w}
227227
[semiring R] [add_comm_monoid M] [add_comm_monoid M₂] [semimodule R M] [semimodule R M₂]
228228
(f : M → M₂) : Prop :=
229-
(add [] : ∀ x y, f (x + y) = f x + f y)
230-
(smul [] : ∀ (c : R) x, f (c • x) = c • f x)
229+
(map_add : ∀ x y, f (x + y) = f x + f y)
230+
(map_smul : ∀ (c : R) x, f (c • x) = c • f x)
231231

232232
/-- A map `f` between semimodules over a semiring is linear if it satisfies the two properties
233233
`f (x + y) = f x + f y` and `f (c • x) = c • f x`. Elements of `linear_map R M M₂` (available under
@@ -236,8 +236,8 @@ the predicate `is_linear_map`, but it should be avoided most of the time. -/
236236
structure linear_map (R : Type u) (M : Type v) (M₂ : Type w)
237237
[semiring R] [add_comm_monoid M] [add_comm_monoid M₂] [semimodule R M] [semimodule R M₂] :=
238238
(to_fun : M → M₂)
239-
(add : ∀x y, to_fun (x + y) = to_fun x + to_fun y)
240-
(smul : ∀(c : R) x, to_fun (c • x) = c • to_fun x)
239+
(map_add' : ∀x y, to_fun (x + y) = to_fun x + to_fun y)
240+
(map_smul' : ∀(c : R) x, to_fun (c • x) = c • to_fun x)
241241

242242
infixr ` →ₗ `:25 := linear_map _
243243
notation M ` →ₗ[`:25 R:25 `] `:0 M₂:0 := linear_map R M M₂
@@ -274,7 +274,7 @@ variables (f g : M →ₗ[R] M₂)
274274

275275
@[simp] lemma to_fun_eq_coe : f.to_fun = ⇑f := rfl
276276

277-
theorem is_linear : is_linear_map R f := {..f}
277+
theorem is_linear : is_linear_map R f := ⟨f.2, f.3
278278

279279
variables {f g}
280280
@[ext] theorem ext (H : ∀ x, f x = g x) : f = g :=
@@ -288,9 +288,9 @@ theorem ext_iff : f = g ↔ ∀ x, f x = g x :=
288288

289289
variables (f g)
290290

291-
@[simp] lemma map_add (x y : M) : f (x + y) = f x + f y := f.add x y
291+
@[simp] lemma map_add (x y : M) : f (x + y) = f x + f y := f.map_add' x y
292292

293-
@[simp] lemma map_smul (c : R) (x : M) : f (c • x) = c • f x := f.smul c x
293+
@[simp] lemma map_smul (c : R) (x : M) : f (c • x) = c • f x := f.map_smul' c x
294294

295295
@[simp] lemma map_zero : f 0 = 0 :=
296296
by rw [← zero_smul R, map_smul f 0 0, zero_smul]
@@ -356,7 +356,7 @@ variables [semimodule R M] [semimodule R M₂]
356356
include R
357357

358358
/-- Convert an `is_linear_map` predicate to a `linear_map` -/
359-
def mk' (f : M → M₂) (H : is_linear_map R f) : M →ₗ M₂ := {to_fun := f, ..H}
359+
def mk' (f : M → M₂) (H : is_linear_map R f) : M →ₗ M₂ := f, H.1, H.2
360360

361361
@[simp] theorem mk'_apply {f : M → M₂} (H : is_linear_map R f) (x : M) :
362362
mk' f H x = f x := rfl
@@ -379,10 +379,6 @@ include M M₂ lin
379379

380380
lemma map_zero : f (0 : M) = (0 : M₂) := (lin.mk' f).map_zero
381381

382-
lemma map_add : ∀ x y, f (x + y) = f x + f y := lin.add
383-
384-
lemma map_smul (c : R) (x : M) : f (c • x) = c • f x := (lin.mk' f).map_smul c x
385-
386382
end add_comm_monoid
387383

388384
section add_comm_group
@@ -410,35 +406,53 @@ end is_linear_map
410406
abbreviation module.End (R : Type u) (M : Type v)
411407
[semiring R] [add_comm_monoid M] [semimodule R M] := M →ₗ[R] M
412408

409+
set_option old_structure_cmd true
410+
413411
/-- A submodule of a module is one which is closed under vector operations.
414412
This is a sufficient condition for the subset of vectors in the submodule
415413
to themselves form a module. -/
416414
structure submodule (R : Type u) (M : Type v) [semiring R]
417-
[add_comm_monoid M] [semimodule R M] : Type v :=
418-
(carrier : set M)
419-
(zero : (0:M) ∈ carrier)
420-
(add : ∀ {x y}, x ∈ carrier → y ∈ carrier → x + y ∈ carrier)
421-
(smul : ∀ (c:R) {x}, x ∈ carrier → c • x ∈ carrier)
415+
[add_comm_monoid M] [semimodule R M] extends add_submonoid M : Type v :=
416+
(smul_mem' : ∀ (c:R) {x}, x ∈ carrier → c • x ∈ carrier)
417+
418+
/-- Reinterpret a `submodule` as an `add_submonoid`. -/
419+
add_decl_doc submodule.to_add_submonoid
422420

423421
namespace submodule
424422

425423
variables [semiring R] [add_comm_monoid M] [semimodule R M]
426424

427-
instance : has_coe (submodule R M) (set M) := ⟨submodule.carrier⟩
425+
instance : has_coe_t (submodule R M) (set M) := ⟨λ s, s.carrier⟩
428426
instance : has_mem M (submodule R M) := ⟨λ x p, x ∈ (p : set M)⟩
429427
instance : has_coe_to_sort (submodule R M) := ⟨_, λ p, {x : M // x ∈ p}⟩
430428

431-
end submodule
429+
variables (p q : submodule R M)
430+
431+
@[simp, norm_cast] theorem coe_sort_coe : ↥(p : set M) = p := rfl
432+
433+
variables {p q}
434+
435+
protected theorem «exists» {q : p → Prop} : (∃ x, q x) ↔ (∃ x ∈ p, q ⟨x, ‹_›⟩) := set_coe.exists
436+
437+
protected theorem «forall» {q : p → Prop} : (∀ x, q x) ↔ (∀ x ∈ p, q ⟨x, ‹_›⟩) := set_coe.forall
438+
439+
theorem ext' : injective (coe : submodule R M → set M) :=
440+
λ p q h, by cases p; cases q; congr'
441+
442+
@[simp, norm_cast] theorem coe_set_eq : (p : set M) = q ↔ p = q := ext'.eq_iff
443+
444+
theorem ext'_iff : p = q ↔ (p : set M) = q := coe_set_eq.symm
432445

433-
protected theorem submodule.exists [semiring R] [add_comm_monoid M] [semimodule R M] {p : submodule R M}
434-
{q : p → Prop} :
435-
(∃ x, q x) ↔ (∃ x (hx : x ∈ p), q ⟨x, hx⟩) :=
436-
set_coe.exists
446+
@[ext] theorem ext (h : ∀ x, x ∈ p ↔ x ∈ q) : p = q := ext' $ set.ext h
437447

438-
protected theorem submodule.forall [semiring R] [add_comm_monoid M] [semimodule R M] {p : submodule R M}
439-
{q : p → Prop} :
440-
(∀ x, q x) ↔ (∀ x (hx : x ∈ p), q ⟨x, hx⟩) :=
441-
set_coe.forall
448+
theorem to_add_submonoid_injective :
449+
injective (to_add_submonoid : submodule R M → add_submonoid M) :=
450+
λ p q h, ext'_iff.2 $ add_submonoid.ext'_iff.1 h
451+
452+
@[simp] theorem to_add_submonoid_eq : p.to_add_submonoid = q.to_add_submonoid ↔ p = q :=
453+
to_add_submonoid_injective.eq_iff
454+
455+
end submodule
442456

443457
namespace submodule
444458

@@ -452,30 +466,17 @@ variables {semimodule_M : semimodule R M}
452466
variables {p q : submodule R M}
453467
variables {r : R} {x y : M}
454468

455-
theorem ext' (h : (p : set M) = q) : p = q :=
456-
by cases p; cases q; congr'
457-
458-
protected theorem ext'_iff : (p : set M) = q ↔ p = q :=
459-
⟨ext', λ h, h ▸ rfl⟩
460-
461-
@[ext] theorem ext
462-
(h : ∀ x, x ∈ p ↔ x ∈ q) : p = q := ext' $ set.ext h
463-
464469
variables (p)
465470
@[simp] theorem mem_coe : x ∈ (p : set M) ↔ x ∈ p := iff.rfl
466471

467-
@[simp] lemma zero_mem : (0 : M) ∈ p := p.zero
472+
@[simp] lemma zero_mem : (0 : M) ∈ p := p.zero_mem'
468473

469-
lemma add_mem (h₁ : x ∈ p) (h₂ : y ∈ p) : x + y ∈ p := p.add h₁ h₂
474+
lemma add_mem (h₁ : x ∈ p) (h₂ : y ∈ p) : x + y ∈ p := p.add_mem' h₁ h₂
470475

471-
lemma smul_mem (r : R) (h : x ∈ p) : r • x ∈ p := p.smul r h
476+
lemma smul_mem (r : R) (h : x ∈ p) : r • x ∈ p := p.smul_mem' r h
472477

473-
lemma sum_mem {t : finset ι} {f : ι → M} :
474-
(∀c∈t, f c ∈ p) → (∑ i in t, f i) ∈ p :=
475-
begin
476-
classical,
477-
exact finset.induction_on t (by simp [p.zero_mem]) (by simp [p.add_mem] {contextual := tt})
478-
end
478+
lemma sum_mem {t : finset ι} {f : ι → M} : (∀c∈t, f c ∈ p) → (∑ i in t, f i) ∈ p :=
479+
p.to_add_submonoid.sum_mem
479480

480481
@[simp] lemma smul_mem_iff' (u : units R) : (u:R) • x ∈ p ↔ x ∈ p :=
481482
⟨λ h, by simpa only [smul_smul, u.inv_mul, one_smul] using p.smul_mem ↑u⁻¹ h, p.smul_mem u⟩
@@ -501,8 +502,7 @@ variables {p}
501502
variables (p)
502503

503504
instance : add_comm_monoid p :=
504-
by refine {add := (+), zero := 0, ..};
505-
{ intros, apply set_coe.ext, simp [add_comm, add_left_comm] }
505+
{ add := (+), zero := 0, .. p.to_add_submonoid.to_add_comm_monoid }
506506

507507
instance : semimodule R p :=
508508
by refine {smul := (•), ..};
@@ -527,10 +527,15 @@ variables {r : R} {x y : M}
527527

528528
lemma neg_mem (hx : x ∈ p) : -x ∈ p := by rw ← neg_one_smul R; exact p.smul_mem _ hx
529529

530+
/-- Reinterpret a submodule as an additive subgroup. -/
531+
def to_add_subgroup : add_subgroup M :=
532+
{ neg_mem' := λ _, p.neg_mem , .. p.to_add_submonoid }
533+
534+
@[simp] lemma coe_to_add_subgroup : (p.to_add_subgroup : set M) = p := rfl
535+
530536
lemma sub_mem (hx : x ∈ p) (hy : y ∈ p) : x - y ∈ p := p.add_mem hx (p.neg_mem hy)
531537

532-
lemma neg_mem_iff : -x ∈ p ↔ x ∈ p :=
533-
⟨λ h, by simpa using neg_mem p h, neg_mem p⟩
538+
@[simp] lemma neg_mem_iff : -x ∈ p ↔ x ∈ p := p.to_add_subgroup.neg_mem_iff
534539

535540
lemma add_mem_iff_left (h₁ : y ∈ p) : x + y ∈ p ↔ x ∈ p :=
536541
⟨λ h₂, by simpa using sub_mem _ h₂ h₁, λ h₂, add_mem _ h₂ h₁⟩
@@ -543,13 +548,7 @@ instance : has_neg p := ⟨λx, ⟨-x.1, neg_mem _ x.2⟩⟩
543548
@[simp, norm_cast] lemma coe_neg (x : p) : ((-x : p) : M) = -x := rfl
544549

545550
instance : add_comm_group p :=
546-
by refine {add := (+), zero := 0, neg := has_neg.neg, ..};
547-
{ intros, apply set_coe.ext, simp [add_comm, add_left_comm] }
548-
549-
instance submodule_is_add_subgroup : is_add_subgroup (p : set M) :=
550-
{ zero_mem := p.zero,
551-
add_mem := p.add,
552-
neg_mem := λ _, p.neg_mem }
551+
{ add := (+), zero := 0, neg := has_neg.neg, ..p.to_add_subgroup.to_add_comm_group }
553552

554553
@[simp, norm_cast] lemma coe_sub (x y : p) : (↑(x - y) : M) = ↑x - ↑y := rfl
555554

src/analysis/analytic/composition.lean

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,11 @@ multilinear map, called `q.comp_along_composition p c` below. -/
143143
def comp_along_composition_multilinear {n : ℕ}
144144
(q : formal_multilinear_series 𝕜 F G) (p : formal_multilinear_series 𝕜 E F)
145145
(c : composition n) : multilinear_map 𝕜 (λ i : fin n, E) G :=
146-
{ to_fun := λ v, q c.length (p.apply_composition c v),
147-
add := λ v i x y, by simp only [apply_composition_update, continuous_multilinear_map.map_add],
148-
smul := λ v i c x, by simp only [apply_composition_update, continuous_multilinear_map.map_smul] }
146+
{ to_fun := λ v, q c.length (p.apply_composition c v),
147+
map_add' := λ v i x y, by simp only [apply_composition_update,
148+
continuous_multilinear_map.map_add],
149+
map_smul' := λ v i c x, by simp only [apply_composition_update,
150+
continuous_multilinear_map.map_smul] }
149151

150152
/-- The norm of `q.comp_along_composition_multilinear p c` is controlled by the product of
151153
the norms of the relevant bits of `q` and `p`. -/

src/analysis/complex/basic.lean

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ attribute [instance, priority 900] complex.normed_space.restrict_scalars_real
8282
/-- Linear map version of the real part function, from `ℂ` to `ℝ`. -/
8383
def linear_map.re : ℂ →ₗ[ℝ] ℝ :=
8484
{ to_fun := λx, x.re,
85-
add := by simp,
86-
smul := λc x, by { change ((c : ℂ) * x).re = c * x.re, simp } }
85+
map_add' := by simp,
86+
map_smul' := λc x, by { change ((c : ℂ) * x).re = c * x.re, simp } }
8787

8888
@[simp] lemma linear_map.re_apply (z : ℂ) : linear_map.re z = z.re := rfl
8989

@@ -112,8 +112,8 @@ end
112112
/-- Linear map version of the imaginary part function, from `ℂ` to `ℝ`. -/
113113
def linear_map.im : ℂ →ₗ[ℝ] ℝ :=
114114
{ to_fun := λx, x.im,
115-
add := by simp,
116-
smul := λc x, by { change ((c : ℂ) * x).im = c * x.im, simp } }
115+
map_add' := by simp,
116+
map_smul' := λc x, by { change ((c : ℂ) * x).im = c * x.im, simp } }
117117

118118
@[simp] lemma linear_map.im_apply (z : ℂ) : linear_map.im z = z.im := rfl
119119

@@ -143,8 +143,8 @@ end
143143
/-- Linear map version of the canonical embedding of `ℝ` in `ℂ`. -/
144144
def linear_map.of_real : ℝ →ₗ[ℝ] ℂ :=
145145
{ to_fun := λx, of_real x,
146-
add := by simp,
147-
smul := λc x, by { simp, refl } }
146+
map_add' := by simp,
147+
map_smul' := λc x, by { simp, refl } }
148148

149149
@[simp] lemma linear_map.of_real_apply (x : ℝ) : linear_map.of_real x = x := rfl
150150

src/analysis/convex/basic.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ lemma convex.is_linear_image (hs : convex s) {f : E → F} (hf : is_linear_map
209209
convex (f '' s) :=
210210
begin
211211
rintros _ _ ⟨x, hx, rfl⟩ ⟨y, hy, rfl⟩ a b ha hb hab,
212-
exact ⟨a • x + b • y, hs hx hy ha hb hab, by simp only [hf.add,hf.smul]⟩
212+
exact ⟨a • x + b • y, hs hx hy ha hb hab, by simp only [hf.map_add,hf.map_smul]⟩
213213
end
214214

215215
lemma convex.linear_image (hs : convex s) (f : E →ₗ[ℝ] F) : convex (image f s) :=
@@ -220,7 +220,7 @@ lemma convex.is_linear_preimage {s : set F} (hs : convex s) {f : E → F} (hf :
220220
begin
221221
intros x y hx hy a b ha hb hab,
222222
convert hs hx hy ha hb hab,
223-
simp only [mem_preimage, hf.add, hf.smul]
223+
simp only [mem_preimage, hf.map_add, hf.map_smul]
224224
end
225225

226226
lemma convex.linear_preimage {s : set F} (hs : convex s) (f : E →ₗ[ℝ] F) :

src/analysis/normed_space/bounded_linear_maps.lean

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ lemma is_linear_map.with_bound
3838
/-- A continuous linear map satisfies `is_bounded_linear_map` -/
3939
lemma continuous_linear_map.is_bounded_linear_map (f : E →L[𝕜] F) : is_bounded_linear_map 𝕜 f :=
4040
{ bound := f.bound,
41-
..f.to_linear_map }
41+
..f.to_linear_map.is_linear }
4242

4343
namespace is_bounded_linear_map
4444

@@ -165,8 +165,8 @@ lemma is_bounded_linear_map_prod_multilinear
165165
{E : ι → Type*} [∀i, normed_group (E i)] [∀i, normed_space 𝕜 (E i)] :
166166
is_bounded_linear_map 𝕜
167167
(λ p : (continuous_multilinear_map 𝕜 E F) × (continuous_multilinear_map 𝕜 E G), p.1.prod p.2) :=
168-
{ add := λ p₁ p₂, by { ext1 m, refl },
169-
smul := λ c p, by { ext1 m, refl },
168+
{ map_add := λ p₁ p₂, by { ext1 m, refl },
169+
map_smul := λ c p, by { ext1 m, refl },
170170
bound := ⟨1, zero_lt_one, λ p, begin
171171
rw one_mul,
172172
apply continuous_multilinear_map.op_norm_le_bound _ (norm_nonneg _) (λ m, _),
@@ -244,9 +244,9 @@ calc f (x, y - z) = f (x, y + (-1 : 𝕜) • z) : by simp [sub_eq_add_neg]
244244

245245
lemma is_bounded_bilinear_map.is_bounded_linear_map_left (h : is_bounded_bilinear_map 𝕜 f) (y : F) :
246246
is_bounded_linear_map 𝕜 (λ x, f (x, y)) :=
247-
{ add := λ x x', h.add_left _ _ _,
248-
smul := λ c x, h.smul_left _ _ _,
249-
bound := begin
247+
{ map_add := λ x x', h.add_left _ _ _,
248+
map_smul := λ c x, h.smul_left _ _ _,
249+
bound := begin
250250
rcases h.bound with ⟨C, C_pos, hC⟩,
251251
refine ⟨C * (∥y∥ + 1), mul_pos C_pos (lt_of_lt_of_le (zero_lt_one) (by simp)), λ x, _⟩,
252252
have : ∥y∥ ≤ ∥y∥ + 1, by simp [zero_le_one],
@@ -258,9 +258,9 @@ lemma is_bounded_bilinear_map.is_bounded_linear_map_left (h : is_bounded_bilinea
258258

259259
lemma is_bounded_bilinear_map.is_bounded_linear_map_right (h : is_bounded_bilinear_map 𝕜 f) (x : E) :
260260
is_bounded_linear_map 𝕜 (λ y, f (x, y)) :=
261-
{ add := λ y y', h.add_right _ _ _,
262-
smul := λ c y, h.smul_right _ _ _,
263-
bound := begin
261+
{ map_add := λ y y', h.add_right _ _ _,
262+
map_smul := λ c y, h.smul_right _ _ _,
263+
bound := begin
264264
rcases h.bound with ⟨C, C_pos, hC⟩,
265265
refine ⟨C * (∥x∥ + 1), mul_pos C_pos (lt_of_lt_of_le (zero_lt_one) (by simp)), λ y, _⟩,
266266
have : ∥x∥ ≤ ∥x∥ + 1, by simp [zero_le_one],
@@ -357,12 +357,12 @@ is indeed the derivative of `f` is proved in `is_bounded_bilinear_map.has_fderiv
357357
def is_bounded_bilinear_map.linear_deriv (h : is_bounded_bilinear_map 𝕜 f) (p : E × F) :
358358
(E × F) →ₗ[𝕜] G :=
359359
{ to_fun := λq, f (p.1, q.2) + f (q.1, p.2),
360-
add := λq₁ q₂, begin
360+
map_add' := λq₁ q₂, begin
361361
change f (p.1, q₁.2 + q₂.2) + f (q₁.1 + q₂.1, p.2) =
362362
f (p.1, q₁.2) + f (q₁.1, p.2) + (f (p.1, q₂.2) + f (q₂.1, p.2)),
363363
simp [h.add_left, h.add_right], abel
364364
end,
365-
smul := λc q, begin
365+
map_smul' := λc q, begin
366366
change f (p.1, c • q.2) + f (c • q.1, p.2) = c • (f (p.1, q.2) + f (q.1, p.2)),
367367
simp [h.smul_left, h.smul_right, smul_add]
368368
end }

0 commit comments

Comments
 (0)