Skip to content

Commit

Permalink
refactor(LinearAlgebra/BilinearForm/Basic): Deprecate coercions (#12132)
Browse files Browse the repository at this point in the history
Following #11278 the coercions in `LinearAlgebra/BilinearForm/Basic` are no longer useful. This PR deprecates them.
  • Loading branch information
mans0954 authored and Louddy committed Apr 15, 2024
1 parent 7e2dd97 commit 400d126
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 6 additions & 4 deletions Mathlib/LinearAlgebra/BilinearForm/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ namespace BilinForm

#noalign bilin_form.coe_fn_mk

@[deprecated]
theorem coeFn_congr : ∀ {x x' y y' : M}, x = x' → y = y' → B x y = B x' y'
| _, _, _, _, rfl, rfl => rfl
#align bilin_form.coe_fn_congr LinearMap.BilinForm.coeFn_congr
Expand Down Expand Up @@ -122,10 +123,7 @@ theorem coe_injective : Function.Injective ((fun B x y => B x y) : BilinForm R M
#align bilin_form.coe_injective LinearMap.BilinForm.coe_injective

@[ext]
theorem ext (H : ∀ x y : M, B x y = D x y) : B = D :=
coe_injective <| by
funext
exact H _ _
theorem ext (H : ∀ x y : M, B x y = D x y) : B = D := ext₂ H
#align bilin_form.ext LinearMap.BilinForm.ext

theorem congr_fun (h : B = D) (x y : M) : B x y = D x y :=
Expand All @@ -136,6 +134,7 @@ theorem ext_iff : B = D ↔ ∀ x y, B x y = D x y :=
⟨congr_fun, ext₂⟩
#align bilin_form.ext_iff LinearMap.BilinForm.ext_iff

@[deprecated]
theorem coe_zero : ⇑(0 : BilinForm R M) = 0 :=
rfl
#align bilin_form.coe_zero LinearMap.BilinForm.coe_zero
Expand All @@ -147,6 +146,7 @@ theorem zero_apply (x y : M) : (0 : BilinForm R M) x y = 0 :=

variable (B D B₁ D₁)

@[deprecated]
theorem coe_add : ⇑(B + D) = B + D :=
rfl
#align bilin_form.coe_add LinearMap.BilinForm.coe_add
Expand All @@ -159,6 +159,7 @@ theorem add_apply (x y : M) : (B + D) x y = B x y + D x y :=
#noalign bilin_form.coe_smul
#noalign bilin_form.smul_apply

@[deprecated]
theorem coe_neg : ⇑(-B₁) = -B₁ :=
rfl
#align bilin_form.coe_neg LinearMap.BilinForm.coe_neg
Expand All @@ -168,6 +169,7 @@ theorem neg_apply (x y : M₁) : (-B₁) x y = -B₁ x y :=
rfl
#align bilin_form.neg_apply LinearMap.BilinForm.neg_apply

@[deprecated]
theorem coe_sub : ⇑(B₁ - D₁) = B₁ - D₁ :=
rfl
#align bilin_form.coe_sub LinearMap.BilinForm.coe_sub
Expand Down
4 changes: 1 addition & 3 deletions Mathlib/LinearAlgebra/BilinearForm/Hom.lean
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ theorem sum_right {α} (t : Finset α) (w : M) (g : α → M) :

theorem sum_apply {α} (t : Finset α) (B : α → BilinForm R M) (v w : M) :
(∑ i in t, B i) v w = ∑ i in t, B i v w := by
show coeFnAddMonoidHom (∑ i in t, B i) v w = _
rw [map_sum, Finset.sum_apply, Finset.sum_apply]
rfl
simp only [coeFn_sum, Finset.sum_apply]

variable {B}

Expand Down

0 comments on commit 400d126

Please sign in to comment.