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

Commit dc7de46

Browse files
abentkampavigad
authored andcommitted
feat(analysis/convex): convex sets and functions (#834)
1 parent 171e913 commit dc7de46

File tree

5 files changed

+889
-0
lines changed

5 files changed

+889
-0
lines changed

src/algebra/module.lean

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,28 @@ def mk' (f : β → γ) (H : is_linear_map α f) : β →ₗ γ := {to_fun := f,
171171
@[simp] theorem mk'_apply {f : β → γ} (H : is_linear_map α f) (x : β) :
172172
mk' f H x = f x := rfl
173173

174+
lemma is_linear_map_neg :
175+
is_linear_map α (λ (z : β), -z) :=
176+
is_linear_map.mk neg_add (λ x y, (smul_neg x y).symm)
177+
178+
lemma is_linear_map_smul {α R : Type*} [add_comm_group α] [comm_ring R] [module R α] (c : R):
179+
is_linear_map R (λ (z : α), c • z) :=
180+
begin
181+
refine is_linear_map.mk (smul_add c) _,
182+
intros _ _,
183+
simp [smul_smul],
184+
ac_refl
185+
end
186+
187+
--TODO: move
188+
lemma is_linear_map_smul' {α R : Type*} [add_comm_group α] [comm_ring R] [module R α] (a : α):
189+
is_linear_map R (λ (c : R), c • a) :=
190+
begin
191+
refine is_linear_map.mk (λ x y, add_smul x y a) _,
192+
intros _ _,
193+
simp [smul_smul]
194+
end
195+
174196
end is_linear_map
175197

176198
/-- A submodule of a module is one which is closed under vector operations.

0 commit comments

Comments
 (0)