Skip to content

Commit cbf62a7

Browse files
kim-emclaude
andcommitted
feat: add Lean.Grind.PowIdentity instance for finite fields
This provides a `PowIdentity K (Fintype.card K)` instance for any finite field, based on `FiniteField.pow_card` (Fermat's little theorem). This allows the `grind` ring solver to reduce high-degree polynomials over finite fields. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
1 parent baa71fa commit cbf62a7

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎Mathlib/FieldTheory/Finite/Basic.lean‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,16 @@ theorem pow_card_pow (n : ℕ) (a : K) : a ^ q ^ n = a := by
239239

240240
end
241241

242+
section
243+
244+
variable [Field K] [Fintype K]
245+
246+
open Lean in
247+
instance instGrindPowIdentity : Grind.PowIdentity K (Fintype.card K) where
248+
pow_eq := pow_card
249+
250+
end
251+
242252
variable (K) [Field K] [Fintype K]
243253

244254
/-- The cardinality `q` is a power of the characteristic of `K`. -/

0 commit comments

Comments
 (0)