Skip to content

Commit 57e07e9

Browse files
CBirkbeckclaude
andcommitted
golf eq_monomial_of_unique_weight: rcases → split_ifs
Phase 4 of /cleanup on the four added lemmas. The split_ifs variant saves one line and is more direct than the rcases + if_pos/if_neg pattern. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 44b2842 commit 57e07e9

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

Mathlib/RingTheory/MvPolynomial/WeightedHomogeneous.lean

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,9 @@ theorem eq_monomial_of_unique_weight {w : σ → M} (hφ : IsWeightedHomogeneous
265265
classical
266266
ext d
267267
rw [coeff_monomial]
268-
rcases eq_or_ne d d₀ with rfl | hd
269-
· rw [if_pos rfl]
270-
rw [if_neg hd.symm]
271-
exact hφ.coeff_eq_zero d fun h ↦ hd (huniq d h)
268+
split_ifs with hd
269+
· rw [hd]
270+
exact hφ.coeff_eq_zero d fun h ↦ hd (huniq d h).symm
272271

273272
/-- The sum of weighted homogeneous polynomials of degree `n` is weighted homogeneous of
274273
weighted degree `n`. -/

0 commit comments

Comments
 (0)