lean4-htt/src/Lean/Meta
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
..
ArgsPacker chore: fix spelling mistakes in src/Lean/Meta/ (#5436) 2024-09-23 23:09:14 +00:00
Constructions fix: allow arbitrary sorts in structural recursion over reflexive inductive types (#7639) 2025-06-13 21:51:09 +00:00
Match doc: add documentation for builtin attributes (#8173) 2025-06-11 09:04:37 +00:00
Tactic feat: Field support in grind ring (#8777) 2025-06-13 22:42:49 +00:00
AbstractMVars.lean feat: abstract metavars in grind preprocessor (#8299) 2025-05-12 14:53:54 +00:00
AbstractNestedProofs.lean feat: create private aux decls in private contexts 2025-06-03 15:53:05 +02:00
ACLt.lean fix: isDefEq, whnf, simp caching and configuration (#6053) 2024-11-18 01:17:26 +00:00
AppBuilder.lean fix: grind.debug true when using grind +ring (#8134) 2025-04-27 20:28:08 +00:00
ArgsPacker.lean chore: fix spelling mistakes (#8324) 2025-05-14 06:52:16 +00:00
Basic.lean fix: refine how simp tracks unfolded local definitions (#8753) 2025-06-13 00:57:57 +00:00
BinderNameHint.lean chore: fix spelling mistakes (#7328) 2025-04-07 01:15:48 +00:00
Canonicalizer.lean chore: remove the old Lean.Data.HashMap implementation (#7519) 2025-03-20 23:49:55 +00:00
Check.lean fix: reduce ambiguity of "final" in application type mismatch message (#8322) 2025-05-14 16:12:10 +00:00
CheckTactic.lean chore: bool and prop lemmas for Mathlib compatibility and improved confluence (#3508) 2024-03-04 23:56:30 +00:00
Closure.lean fix: refine how simp tracks unfolded local definitions (#8753) 2025-06-13 00:57:57 +00:00
Coe.lean doc: add documentation for builtin attributes (#8173) 2025-06-11 09:04:37 +00:00
CoeAttr.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
CollectFVars.lean feat: change Array.get to take a Nat and a proof (#6032) 2024-11-12 03:30:46 +00:00
CollectMVars.lean chore: cleanup after export Bool.and/or/not/xor 2024-09-16 12:45:51 +10:00
CompletionName.lean chore: fix spelling mistakes in src/Lean/Meta/ (#5436) 2024-09-23 23:09:14 +00:00
CongrTheorems.lean fix: transparency setting when computing congruence lemmas in grind (#7760) 2025-03-31 20:52:36 +00:00
Constructions.lean refactor: Split Constructions module (#4656) 2024-07-05 08:25:44 +00:00
CtorRecognizer.lean fix: have Lean.Meta.isConstructorApp'? be aware of n + k Nat offsets (#6270) 2024-12-01 18:04:32 +00:00
DecLevel.lean chore: missing registerTraceClass (#4369) 2024-06-06 00:53:16 +00:00
Diagnostics.lean fix: add workaround for MessageData limitations (#6669) 2025-01-16 16:58:20 +00:00
DiscrTree.lean fix: replace bad simp lemmas for Id (#7352) 2025-05-22 22:45:35 +00:00
DiscrTreeTypes.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Eqns.lean feat: explicit defeq attribute (#8419) 2025-06-06 18:40:06 +00:00
Eval.lean refactor: introduce VisibilityMap in Lean.Environment, use it to split base in preparation for private import (#8145) 2025-04-28 10:17:18 +00:00
ExprDefEq.lean feat: zetaUnused option (implementation) (#6755) 2025-01-26 11:14:12 +00:00
ExprLens.lean chore: code convention (#4009) 2024-04-28 15:49:55 +00:00
ExprTraverse.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
ForEachExpr.lean chore: avoid runtime array bounds checks (#6134) 2024-11-21 05:04:52 +00:00
FunInfo.lean feat: refactor of find functions on List/Array/Vector (#6833) 2025-01-30 01:14:21 +00:00
GeneralizeTelescope.lean feat: change Array.get to take a Nat and a proof (#6032) 2024-11-12 03:30:46 +00:00
GeneralizeVars.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
GetUnfoldableConst.lean fix: unknown identifier ranges (#8362) 2025-05-22 10:05:31 +00:00
GlobalInstances.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Hint.lean feat: pre-stage0 groundwork for named error messages (#8649) 2025-06-11 14:52:08 +00:00
IndPredBelow.lean feat: use omission dots for hidden let values in Infoview (#8041) 2025-05-27 23:09:11 +00:00
Inductive.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
InferType.lean perf: Environment blocker removals from async-proofs branch (#7483) 2025-03-14 13:37:01 +00:00
Injective.lean feat: do not export private declarations (#8337) 2025-06-02 08:01:08 +00:00
Instances.lean doc: add documentation for builtin attributes (#8173) 2025-06-11 09:04:37 +00:00
IntInstTesters.lean feat: divisibility constraint normalizer (#7092) 2025-02-15 04:20:40 +00:00
Iterator.lean chore: fix spelling mistakes in src/Lean/Meta/ (#5436) 2024-09-23 23:09:14 +00:00
KAbstract.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
KExprMap.lean chore: switch to Std.HashMap and Std.HashSet almost everywhere 2024-08-07 18:24:42 +02:00
LazyDiscrTree.lean feat: meta syntax 2025-06-04 18:26:05 +02:00
LevelDefEq.lean chore: mark Meta.Context.config as private (#6051) 2024-11-13 13:30:06 +11:00
LitValues.lean chore: remove prime from Fin.ofNat' (#8515) 2025-05-28 11:51:00 +00:00
Match.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
MatchUtil.lean fix: regression on match expressions with builtin literals (#3521) 2024-02-27 18:49:44 +00:00
NatInstTesters.lean feat: Nat divisibility constraints in cutsat (#7495) 2025-03-15 03:46:47 +00:00
Offset.lean chore: cleanup imports (#5825) 2024-10-23 23:51:13 +00:00
Order.lean chore: fix spelling mistakes (#8324) 2025-05-14 06:52:16 +00:00
PPGoal.lean feat: use omission dots for hidden let values in Infoview (#8041) 2025-05-27 23:09:11 +00:00
PProdN.lean chore: fix spelling mistakes (#7328) 2025-04-07 01:15:48 +00:00
RecursorInfo.lean feat: refactor of find functions on List/Array/Vector (#6833) 2025-01-30 01:14:21 +00:00
Reduce.lean refactor: more idiomatic syntax for if h: (#5567) 2024-10-01 15:23:54 +00:00
ReduceEval.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
SizeOf.lean feat: explicit defeq attribute (#8419) 2025-06-06 18:40:06 +00:00
Sorry.lean feat: labeled and unique sorries (#5757) 2024-12-11 23:53:02 +00:00
Structure.lean refactor: factor out common code for structure default values (#7737) 2025-03-31 22:40:39 +00:00
SynthInstance.lean feat: abstract metavars in grind preprocessor (#8299) 2025-05-12 14:53:54 +00:00
Tactic.lean feat: extract_lets and lift_lets tactics (#6432) 2025-04-21 08:57:01 +00:00
Transform.lean perf: store dsimp cache in a simp call (#7428) 2025-05-14 22:21:06 +00:00
TransparencyMode.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
TryThis.lean chore: fix spelling mistakes (#8324) 2025-05-14 06:52:16 +00:00
UnificationHint.lean fix: isDefEq, whnf, simp caching and configuration (#6053) 2024-11-18 01:17:26 +00:00
WHNF.lean chore: remove prime from Fin.ofNat' (#8515) 2025-05-28 11:51:00 +00:00