Lean 4 fork for HoTT-compatible kernel extensions (Path types, transport, HITs). Maintained against upstream leanprover/lean4.
Find a file
Leonardo de Moura ee42c3ca56
fix: discrepancy in the elaborators for theorem, def, and example (#4482)
When the type of a definition or example is a proposition,
we should elaborate on them as we elaborate on theorems.
This is particularly important for examples that are often
used in educational material.

Recall that when elaborating theorem headers, we convert unassigned
universe metavariables into universe parameters. The motivation is
that the proof of a theorem should not influence its statement.
However, before this commit, this was not the case for definitions and
examples when their type was a proposition. This discrepancy often
confused users.

Additionally, we considered extending the above behavior whenever
the type of a definition is provided. That is, we would keep the
current behavior only if `: <type>` was omitted in a definition.
However, this proved to be too restrictive.
For example, the following instance in `Core.lean` would fail:
```
instance {α : Sort u} [Setoid α] : HasEquiv α :=
  ⟨Setoid.r⟩
```
and we would have to write instead:
```
instance {α : Sort u} [Setoid α] : HasEquiv.{u, 0} α :=
  ⟨Setoid.r⟩
```
There are other failures like this in the core, and we assume many more
in Mathlib.

closes #4398

@semorrison @jcommelin: what do you think?
2024-06-27 00:58:58 +00:00
.github chore: mark releases as prerelease (#4544) 2024-06-24 01:04:04 +00:00
doc doc: documenting Char and upstreaming extensionality from batteries (#4438) 2024-06-16 00:43:34 +00:00
images chore(CMakeLists.txt): move Lean logo to make sure we can test leanemacs without installing Lean 2015-01-31 17:38:49 -08:00
nix chore: Nix: fix cacheRoots 2024-06-21 23:35:38 +02:00
releases_drafts feat: add a linter for local vars that clash with their constructors (#4301) 2024-06-14 13:03:09 +00:00
script feat: support Lake for building Lean core oleans (#3886) 2024-06-13 16:18:24 +00:00
src fix: discrepancy in the elaborators for theorem, def, and example (#4482) 2024-06-27 00:58:58 +00:00
stage0 chore: update stage0 2024-06-23 10:09:59 +00:00
tests fix: discrepancy in the elaborators for theorem, def, and example (#4482) 2024-06-27 00:58:58 +00:00
.gitattributes chore: Do not hide stage0/src/stdlib_flags.h from diffs 2023-09-13 19:29:25 +02:00
.gitignore feat: support Lake for building Lean core oleans (#3886) 2024-06-13 16:18:24 +00:00
.ignore chore: ignore stage0/ (for rg etc.) 2022-03-18 15:28:20 +01:00
CMakeLists.txt chore: update-stage0-commit cmake target (#3692) 2024-04-04 13:35:53 +00:00
CMakePresets.json chore: modernize build instructions (#4032) 2024-05-23 10:55:07 +00:00
CODEOWNERS chore: update code owners 2024-04-24 10:16:16 +02:00
CONTRIBUTING.md doc: Adjust contributor's docs to squash merging (#2927) 2023-11-21 10:13:43 +00:00
flake.lock chore: test results as job summary (#3715) 2024-03-27 10:14:33 +00:00
flake.nix chore: nix shell: add gdb (#4476) 2024-06-18 11:07:20 +00:00
lean-toolchain doc: VS Code dev setup (#2961) 2023-11-30 08:35:03 +00:00
lean.code-workspace chore: add the lean4 extension to the vscode workspace (#3059) 2023-12-14 08:58:21 +00:00
LICENSE chore: remove LICENSE header that confused GitHub 2021-11-18 09:42:35 +01:00
LICENSES chore: add GMP license for now 2021-11-18 09:42:35 +01:00
README.md doc: mention build doc source location (#4045) 2024-05-01 22:42:54 +00:00
RELEASES.md chore: begin development cycle for v4.10.0 (#4374) 2024-06-06 12:06:13 +00:00

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 (documentation source: doc/make/index.md).