Skip to content

Commit

Permalink
fix(algebra/module/linear_map): do not introduce show (#8102)
Browse files Browse the repository at this point in the history
Without this change, `apply linear_map.coe_injective` on a goal of `f = g` introduces some unpleasant `show` terms, giving a goal of
```lean
(λ (f : M →ₗ[R] M₂), show M → M₂, from ⇑f) f = (λ (f : M →ₗ[R] M₂), show M → M₂, from ⇑f) g
```
which is then frustrating to `rw` at, instead of
```lean
⇑f = ⇑g
```
  • Loading branch information
eric-wieser committed Jun 28, 2021
1 parent 3cb247c commit bfd0685
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/algebra/module/linear_map.lean
Expand Up @@ -106,7 +106,7 @@ theorem is_linear : is_linear_map R f := ⟨f.map_add', f.map_smul'⟩

variables {f g}

theorem coe_injective : injective (λ f : M →ₗ[R] M₂, show M → M₂, from f) :=
theorem coe_injective : @injective (M →ₗ[R] M₂) (M → M₂) coe_fn :=
by rintro ⟨f, _⟩ ⟨g, _⟩ ⟨h⟩; congr

@[ext] theorem ext (H : ∀ x, f x = g x) : f = g :=
Expand Down

0 comments on commit bfd0685

Please sign in to comment.