Skip to content

Commit 0699f5e

Browse files
committed
blindly golf your way to a stronger result
1 parent 34fbae2 commit 0699f5e

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

Mathlib/RingTheory/DedekindDomain/Ideal.lean

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -254,15 +254,12 @@ theorem isDedekindDomainInv_iff [Algebra A K] [IsFractionRing A K] :
254254
rw [← h.toEquiv.apply_eq_iff_eq]
255255
simp [h]
256256

257+
omit [IsDomain A] in
257258
theorem FractionalIdeal.adjoinIntegral_eq_one_of_isUnit [Algebra A K] [IsFractionRing A K] (x : K)
258259
(hx : IsIntegral A x) (hI : IsUnit (adjoinIntegral A⁰ x hx)) : adjoinIntegral A⁰ x hx = 1 := by
259260
set I := adjoinIntegral A⁰ x hx
260-
have mul_self : IsIdempotentElem I := by
261-
apply coeToSubmodule_injective
262-
simp only [coe_mul, adjoinIntegral_coe, I]
263-
rw [(Algebra.adjoin A {x}).isIdempotentElem_toSubmodule]
264-
convert congr_arg (· * I⁻¹) mul_self <;>
265-
simp only [(mul_inv_cancel_iff_isUnit K).mpr hI, mul_assoc, mul_one]
261+
refine hI.mul_eq_right.mp <| coeToSubmodule_injective ?_
262+
simp only [coe_mul, adjoinIntegral_coe, I, (Algebra.adjoin A {x}).isIdempotentElem_toSubmodule.eq]
266263

267264
namespace IsDedekindDomainInv
268265

0 commit comments

Comments
 (0)