Skip to content

Commit f3e4ce9

Browse files
committed
golf
1 parent 23ad05a commit f3e4ce9

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

Mathlib/RingTheory/RegularLocalRing/Basic.lean

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,6 @@ theorem isRegular_of_span_eq_maximalIdeal [IsRegularLocalRing R] (rs : List R)
272272
((Finset.coe_subset.mpr sub).trans mem)).out 0 2).mp ?_)
273273
use rs.toFinset
274274
simpa [sub, card] using span
275-
apply IsSMulRegular.of_right_eq_zero_of_smul (fun x hx ↦ ?_)
276275
have : (Ideal.Quotient.mk (Ideal.ofList (List.take i rs))) rs[i] ≠ 0 := by
277276
simp only [ne_eq, Ideal.Quotient.eq_zero_iff_mem]
278277
by_contra mem
@@ -291,14 +290,12 @@ theorem isRegular_of_span_eq_maximalIdeal [IsRegularLocalRing R] (rs : List R)
291290
simp only [Ideal.ofList_append, SetLike.mem_coe]
292291
rcases hx with l|eq|r
293292
· exact Ideal.mem_sup_left (Ideal.subset_span (Set.mem_setOf.mpr l))
294-
· apply Ideal.mem_sup_left
295-
simpa [eq] using mem
293+
· exact Ideal.mem_sup_left (eq ▸ mem)
296294
· exact Ideal.mem_sup_right (Ideal.subset_span (Set.mem_setOf.mpr r))
297-
have : Submodule.spanFinrank (maximalIdeal R) ≤ rs'.length := by
298-
rw [← span']
295+
have : Submodule.spanFinrank (Ideal.ofList rs') ≤ rs'.length := by
299296
apply (Submodule.spanFinrank_span_le_ncard_of_finite rs'.finite_toSet).trans
300297
apply le_of_eq_of_le _ (List.toFinset_card_le rs')
301298
simp [← (Set.ncard_coe_finset rs'.toFinset)]
302-
simp only [← len, List.length_append, List.length_take, List.length_drop, rs'] at this
299+
simp only [span', ← len, List.length_append, List.length_take, List.length_drop, rs'] at this
303300
omega
304-
exact (mul_eq_zero_iff_left this).mp hx
301+
exact (IsRegular.of_ne_zero this).isSMulRegular

0 commit comments

Comments
 (0)