Lean 4 fork for HoTT-compatible kernel extensions (Path types, transport, HITs). Maintained against upstream leanprover/lean4.
Find a file
Leonardo de Moura aef4a29148
feat: Field support in grind ring (#8777)
This PR implements basic `Field` support in the commutative ring module
in `grind`. It is just division by numerals for now. Examples:
```lean
open Lean Grind

example [Field α] [IsCharP α 0] (a b c : α) : a/3 = b → c = a/3 → a/2 + a/2 = b + 2*c  := by
  grind

example [Field α] (a b : α) : b = 0 → (a + a) / 0 = b := by
  grind

example [Field α] [IsCharP α 3] (a b : α) : a/3 = b → b = 0 := by
  grind

example [Field α] [IsCharP α 7] (a b c : α) : a/3 = b → c = a/3 → a/2 + a/2 = b + 2*c + 7 := by
  grind

example [Field R] [IsCharP R 0] (x : R) (cos : R → R) :
    (cos x ^ 2 + (2 * cos x ^ 2 - 1) ^ 2 + (4 * cos x ^ 3 - 3 * cos x) ^ 2 - 1) / 4 =
      cos x * (cos x ^ 2 - 1 / 2) * (4 * cos x ^ 3 - 3 * cos x) := by
  grind
```
2025-06-13 22:42:49 +00:00
.github chore: merge-checkout test fixed and removed from exclusions on master 2025-06-13 15:30:58 +02:00
doc chore: improvements to release checklist and scripts (#8586) 2025-06-10 22:56:06 +00:00
images
nix
releases_drafts
script chore: move benchmarking script to this repo (#8718) 2025-06-11 12:27:06 +00:00
src feat: Field support in grind ring (#8777) 2025-06-13 22:42:49 +00:00
stage0 chore: update stage0 2025-06-12 16:36:08 +02:00
tests feat: Field support in grind ring (#8777) 2025-06-13 22:42:49 +00:00
.gitattributes
.gitignore
.gitpod.Dockerfile
.gitpod.yml
.ignore
CMakeLists.txt
CMakePresets.json
CODEOWNERS
CONTRIBUTING.md
flake.lock
flake.nix
lean-toolchain
lean.code-workspace
LICENSE
LICENSES feat: ship cadical (#4325) 2024-08-23 09:13:27 +00:00
README.md
RELEASES.md

This is the repository for Lean 4.

About

Installation

See Setting Up Lean.

Contributing

Please read our Contribution Guidelines first.

Building from Source

See Building Lean.