Skip to content

Commit 053b764

Browse files
committed
fix(Algebra/Field): ensure Field.toGrindField.toInv is def-eq to Field.toInv (#32711)
This PR fixes an issue where the `Inv` instance obtained from `Field.toGrindField` was not definitionally equal to `Field.toInv` under instance reducibility. This caused `grind` to fail. Reported at https://leanprover.zulipchat.com/#narrow/channel/287929-mathlib4/topic/non.20def-eq.20.60Inv.60.20instances.20in.20.60Discriminant.2EDifferent.60 🤖 Prepared with Claude Code
1 parent f3f5e6f commit 053b764

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

Mathlib/Algebra/Field/Basic.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ variable [Field K]
160160

161161
instance (priority := 100) Field.toGrindField [Field K] : Lean.Grind.Field K :=
162162
{ CommRing.toGrindCommRing K, ‹Field K› with
163+
inv a := a⁻¹
163164
zpow := ⟨fun a n => a^n⟩
164165
zpow_zero a := by simp
165166
zpow_succ a n := by
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import Mathlib.FieldTheory.IntermediateField.Basic
2+
3+
example {K L : Type*} [Field K] [Field L] [Algebra K L]
4+
(E : IntermediateField K L) :
5+
(Field.toGrindField.toInv : Inv E) = InvMemClass.inv := by
6+
with_reducible_and_instances rfl

0 commit comments

Comments
 (0)