Lean 4 fork for HoTT-compatible kernel extensions (Path types, transport, HITs). Maintained against upstream leanprover/lean4.
Find a file
Kyle Miller e0a29f43d2
feat: adjust deriving Inhabited to use structure field defaults (#9815)
This PR changes the `Inhabited` deriving handler for `structure` types
to use default field values when present; this ensures that `{}` and
`default` are interchangeable when all fields have default values. The
handler effectively uses `by refine' {..} <;> exact default` to
construct the inhabitant. (Note: when default field values cannot be
resolved, they are ignored, as usual for ellipsis mode.)

Implementation note: the handler now constructs the `Expr` directly and
adds it to the environment, though the `instance` is still added using
`elabCommand`.

Closes #9463
2026-04-09 18:54:24 +00:00
.claude
.github
.vscode
doc
images
releases_drafts
script
src feat: adjust deriving Inhabited to use structure field defaults (#9815) 2026-04-09 18:54:24 +00:00
stage0
tests feat: adjust deriving Inhabited to use structure field defaults (#9815) 2026-04-09 18:54:24 +00:00
.gitattributes
.gitignore
.gitpod.Dockerfile
.gitpod.yml
.ignore
CMakeLists.txt
CMakePresets.json
CODEOWNERS
CONTRIBUTING.md
flake.lock
flake.nix
lean-toolchain
LICENSE
LICENSES
README.md
RELEASES.md

This is the repository for Lean 4.

About

Installation

See Install Lean.

Contributing

Please read our Contribution Guidelines first.

Building from Source

See Building Lean.