Skip to content

Commit

Permalink
feat(algebra/module/linear_map) : cancel_right and cancel_left for li…
Browse files Browse the repository at this point in the history
…near_maps (#13703)
  • Loading branch information
antoinelab01 committed Apr 26, 2022
1 parent 5172448 commit b0efdbb
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/algebra/module/linear_map.lean
Expand Up @@ -357,6 +357,18 @@ linear_map.ext $ λ x, rfl
@[simp] theorem id_comp : id.comp f = f :=
linear_map.ext $ λ x, rfl

variables {f g} {f' : M₂ →ₛₗ[σ₂₃] M₃} {g' : M₁ →ₛₗ[σ₁₂] M₂}

include σ₁₃
theorem cancel_right (hg : function.surjective g) :
f.comp g = f'.comp g ↔ f = f' :=
⟨λ h, ext $ hg.forall.2 (ext_iff.1 h), λ h, h ▸ rfl⟩

theorem cancel_left (hf : function.injective f) :
f.comp g = f.comp g' ↔ g = g' :=
⟨λ h, ext $ λ x, hf $ by rw [← comp_apply, h, comp_apply], λ h, h ▸ rfl⟩
omit σ₁₃

end

variables [add_comm_monoid M] [add_comm_monoid M₁] [add_comm_monoid M₂] [add_comm_monoid M₃]
Expand Down

0 comments on commit b0efdbb

Please sign in to comment.