diff --git a/src/linear_algebra/multilinear.lean b/src/linear_algebra/multilinear.lean index bd6773b6931d4..1a54ff62d0390 100644 --- a/src/linear_algebra/multilinear.lean +++ b/src/linear_algebra/multilinear.lean @@ -80,8 +80,27 @@ variables [semiring R] instance : has_coe_to_fun (multilinear_map R M₁ M₂) := ⟨_, to_fun⟩ +initialize_simps_projections multilinear_map (to_fun → apply) + +@[simp] lemma to_fun_eq_coe : f.to_fun = f := rfl + +@[simp] lemma coe_mk (f : (Π i, M₁ i) → M₂) (h₁ h₂ ) : + ⇑(⟨f, h₁, h₂⟩ : multilinear_map R M₁ M₂) = f := rfl + +theorem congr_fun {f g : multilinear_map R M₁ M₂} (h : f = g) (x : Π i, M₁ i) : f x = g x := +congr_arg (λ h : multilinear_map R M₁ M₂, h x) h + +theorem congr_arg (f : multilinear_map R M₁ M₂) {x y : Π i, M₁ i} (h : x = y) : f x = f y := +congr_arg (λ x : Π i, M₁ i, f x) h + +theorem coe_inj ⦃f g : multilinear_map R M₁ M₂⦄ (h : ⇑f = g) : f = g := +by cases f; cases g; cases h; refl + @[ext] theorem ext {f f' : multilinear_map R M₁ M₂} (H : ∀ x, f x = f' x) : f = f' := -by cases f; cases f'; congr'; exact funext H +coe_inj (funext H) + +theorem ext_iff {f g : multilinear_map R M₁ M₂} : f = g ↔ ∀ x, f x = g x := +⟨λ h x, h ▸ rfl, λ h, ext h⟩ @[simp] lemma map_add (m : Πi, M₁ i) (i : ι) (x y : M₁ i) : f (update m i (x + y)) = f (update m i x) + f (update m i y) :=