lean4-htt/tests
Kyle Miller 20eea7372f
feat: make delta deriving more robust and handle binders (#9800)
This PR improves the delta deriving handler, giving it the ability to
process definitions with binders, as well as the ability to recursively
unfold definitions. Furthermore, delta deriving now tries all explicit
non-out-param arguments to a class, and it can handle "mixin" instance
arguments. The `deriving` syntax has been changed to accept general
terms, which makes it possible to derive specific instances with for
example `deriving OfNat _ 1` or `deriving Module R`. The class is
allowed to be a pi type, to add additional hypotheses; here is a Mathlib
example:
```lean
def Sym (α : Type*) (n : ℕ) :=
  { s : Multiset α // Multiset.card s = n }
deriving [DecidableEq α] → DecidableEq _
```
This underscore stands for where `Sym α n` may be inserted, which is
necessary when `→` is used. The `deriving instance` command can refer to
scoped variables when delta deriving as well. Breaking change: the
derived instance's name uses the `instance` command's name generator,
and the new instance is added to the current namespace.

This closes
[mathlib4#380](https://github.com/leanprover-community/mathlib4/issues/380).
2025-08-10 21:21:54 +00:00
..
bench chore: stabilize benchmark output (#9820) 2025-08-10 10:53:38 +00:00
compiler chore: remove >6 month old deprecations (#9640) 2025-08-05 02:29:15 +00:00
elabissues
ir
lean feat: make delta deriving more robust and handle binders (#9800) 2025-08-10 21:21:54 +00:00
pkg fix: panic on duplicate private def in public section (#9761) 2025-08-06 16:09:18 +00:00
playground
plugin
simpperf
.gitignore
common.sh
lakefile.toml
lean-toolchain