Skip to content

Commit 3666308

Browse files
committed
chore(Analysis/Distribution/ContDiffMapSupportedIn): remove _apply le… (#31094)
…mmas about instances #30198 added both a coe_foo and a foo_apply lemma for foo in {zero,add,sub,neg,smul}: remove the apply lemmas again. - there was no good reason for having both; when in doubt, use coe lemmas - for simp, the coe lemmas are equally strong (and having both is very unusual at best), - when rewriting, one can add Pi.zero_apply and friends.
1 parent 0748090 commit 3666308

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

Mathlib/Analysis/Distribution/ContDiffMapSupportedIn.lean

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -172,25 +172,17 @@ instance : Zero 𝓓^{n}_{K}(E, F) where
172172
lemma coe_zero : (0 : 𝓓^{n}_{K}(E, F)) = (0 : E → F) :=
173173
rfl
174174

175-
@[simp]
176-
lemma zero_apply (x : E) : (0 : 𝓓^{n}_{K}(E, F)) x = 0 :=
177-
rfl
178-
179175
instance : Add 𝓓^{n}_{K}(E, F) where
180176
add f g := .mk (f + g) (f.contDiff.add g.contDiff) <| by
181177
rw [← add_zero 0]
182178
exact f.zero_on_compl.comp_left₂ g.zero_on_compl
183179

184-
-- TODO: can this and the next lemma be auto-generated, e.g. using `simps`?
180+
-- TODO: can this lemma be auto-generated, e.g. using `simps`?
185181
-- Investigate the same question for `zero` above and `sub` , `neg` and `smul` below.
186182
@[simp]
187183
lemma coe_add (f g : 𝓓^{n}_{K}(E, F)) : (f + g : 𝓓^{n}_{K}(E, F)) = (f : E → F) + g :=
188184
rfl
189185

190-
@[simp]
191-
lemma add_apply (f g : 𝓓^{n}_{K}(E, F)) (x : E) : (f + g) x = f x + g x :=
192-
rfl
193-
194186
instance : Neg 𝓓^{n}_{K}(E, F) where
195187
neg f := .mk (-f) (f.contDiff.neg) <| by
196188
rw [← neg_zero]
@@ -200,10 +192,6 @@ instance : Neg 𝓓^{n}_{K}(E, F) where
200192
lemma coe_neg (f : 𝓓^{n}_{K}(E, F)) : (-f : 𝓓^{n}_{K}(E, F)) = (-f : E → F) :=
201193
rfl
202194

203-
@[simp]
204-
theorem neg_apply {f : 𝓓^{n}_{K}(E, F)} {x : E} : (-f) x = - f x :=
205-
rfl
206-
207195
instance instSub : Sub 𝓓^{n}_{K}(E, F) where
208196
sub f g := .mk (f - g) (f.contDiff.sub g.contDiff) <| by
209197
rw [← sub_zero 0]
@@ -213,10 +201,6 @@ instance instSub : Sub 𝓓^{n}_{K}(E, F) where
213201
lemma coe_sub (f g : 𝓓^{n}_{K}(E, F)) : (f - g : 𝓓^{n}_{K}(E, F)) = (f : E → F) - g :=
214202
rfl
215203

216-
@[simp]
217-
theorem sub_apply {f g : 𝓓^{n}_{K}(E, F)} {x : E} : (f - g) x = f x - g x :=
218-
rfl
219-
220204
instance instSMul {R} [Semiring R] [Module R F] [SMulCommClass ℝ R F] [ContinuousConstSMul R F] :
221205
SMul R 𝓓^{n}_{K}(E, F) where
222206
smul c f := .mk (c • (f : E → F)) (f.contDiff.const_smul c) <| by
@@ -228,11 +212,6 @@ lemma coe_smul {R} [Semiring R] [Module R F] [SMulCommClass ℝ R F] [Continuous
228212
(c : R) (f : 𝓓^{n}_{K}(E, F)) : (c • f : 𝓓^{n}_{K}(E, F)) = c • (f : E → F) :=
229213
rfl
230214

231-
@[simp]
232-
lemma smul_apply {R} [Semiring R] [Module R F] [SMulCommClass ℝ R F] [ContinuousConstSMul R F]
233-
(c : R) (f : 𝓓^{n}_{K}(E, F)) (x : E) : (c • f) x = c • (f x) :=
234-
rfl
235-
236215
instance : AddCommGroup 𝓓^{n}_{K}(E, F) :=
237216
DFunLike.coe_injective.addCommGroup _ rfl (fun _ _ ↦ rfl) (fun _ ↦ rfl) (fun _ _ ↦ rfl)
238217
(fun _ _ ↦ rfl) fun _ _ ↦ rfl

0 commit comments

Comments
 (0)