Skip to content

Commit

Permalink
chore(Algebra/Operations): golf a proof (#9201)
Browse files Browse the repository at this point in the history
Golf the proof of `Submodule.smul_singleton` and rename it to `Submodule.singleton_smul`.
  • Loading branch information
urkud committed Dec 25, 2023
1 parent db487f1 commit de998ec
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions Mathlib/Algebra/Algebra/Operations.lean
Expand Up @@ -670,19 +670,12 @@ theorem smul_le_smul {s t : SetSemiring A} {M N : Submodule R A}
mul_le_mul (span_mono h₁) h₂
#align submodule.smul_le_smul Submodule.smul_le_smul

theorem smul_singleton (a : A) (M : Submodule R A) :
theorem singleton_smul (a : A) (M : Submodule R A) :
Set.up ({a} : Set A) • M = M.map (LinearMap.mulLeft R a) := by
conv_lhs => rw [← span_eq M]
change span _ _ * span _ _ = _
rw [span_mul_span]
apply le_antisymm
· rw [span_le]
rintro _ ⟨b, m, hb, hm, rfl⟩
rw [SetLike.mem_coe, mem_map, Set.mem_singleton_iff.mp hb]
exact ⟨m, hm, rfl⟩
· rintro _ ⟨m, hm, rfl⟩
exact subset_span ⟨a, m, Set.mem_singleton a, hm, rfl⟩
#align submodule.smul_singleton Submodule.smul_singleton
rw [smul_def, SetSemiring.down_up, span_mul_span, singleton_mul]
exact (map (LinearMap.mulLeft R a) M).span_eq
#align submodule.smul_singleton Submodule.singleton_smul

section Quotient

Expand Down

0 comments on commit de998ec

Please sign in to comment.