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

Commit a5b7de0

Browse files
committed
chore(linear_algebra): fix/add coe_fn simp lemmas (#7015)
* move `@[simp]` from `linear_map.comp_apply` to new `linear_map.coe_comp`; * rename `linear_map.comp_coe` to `linear_map.coe_comp`, swap LHS&RHS; * add `linear_map.coe_proj`, move `@[simp]` from `linear_map.proj_apply`.
1 parent fc87598 commit a5b7de0

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

src/algebra/module/linear_map.lean

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,9 @@ variables (f : M₂ →ₗ[R] M₃) (g : M →ₗ[R] M₂)
212212
/-- Composition of two linear maps is a linear map -/
213213
def comp : M →ₗ[R] M₃ := ⟨f ∘ g, by simp, by simp⟩
214214

215-
@[simp] lemma comp_apply (x : M) : f.comp g x = f (g x) := rfl
215+
lemma comp_apply (x : M) : f.comp g x = f (g x) := rfl
216216

217-
@[norm_cast]
218-
lemma comp_coe : (f : M₂ → M₃) ∘ (g : M → M₂) = f.comp g := rfl
217+
@[simp, norm_cast] lemma coe_comp : (f.comp g : M → M₃) = f ∘ g := rfl
219218

220219
@[simp] theorem comp_id : f.comp id = f :=
221220
linear_map.ext $ λ x, rfl

src/linear_algebra/basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ lemma iterate_bijective (h : bijective f') : ∀ n : ℕ, bijective ⇑(f' ^ n)
266266
lemma injective_of_iterate_injective {n : ℕ} (hn : n ≠ 0) (h : injective ⇑(f' ^ n)) :
267267
injective f' :=
268268
begin
269-
rw [← nat.succ_pred_eq_of_pos (pos_iff_ne_zero.mpr hn), iterate_succ, ←comp_coe] at h,
269+
rw [← nat.succ_pred_eq_of_pos (pos_iff_ne_zero.mpr hn), iterate_succ, coe_comp] at h,
270270
exact injective.of_comp h,
271271
end
272272
end

src/linear_algebra/pi.lean

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ rfl
6060
def proj (i : ι) : (Πi, φ i) →ₗ[R] φ i :=
6161
⟨ λa, a i, assume f g, rfl, assume c f, rfl ⟩
6262

63-
@[simp] lemma proj_apply (i : ι) (b : Πi, φ i) : (proj i : (Πi, φ i) →ₗ[R] φ i) b = b i := rfl
63+
@[simp] lemma coe_proj (i : ι) : ⇑(proj i : (Πi, φ i) →ₗ[R] φ i) = function.eval i := rfl
64+
65+
lemma proj_apply (i : ι) (b : Πi, φ i) : (proj i : (Πi, φ i) →ₗ[R] φ i) b = b i := rfl
6466

6567
lemma proj_pi (f : Πi, M₂ →ₗ[R] φ i) (i : ι) : (proj i).comp (pi f) = f i :=
6668
ext $ assume c, rfl

0 commit comments

Comments
 (0)