Lean 4 fork for HoTT-compatible kernel extensions (Path types, transport, HITs). Maintained against upstream leanprover/lean4.
Find a file
Mario Carneiro a00cf6330f
fix: add a missing case to Level.geq (#2689)
This PR adds a case to `Level.geq` that is present in the kernel's level
`is_geq` procedure, making them consistent with one another.

This came up during testing of `lean4lean`. Currently `Level.geq`
differs from `level::is_geq` in the case of `max u v >= imax u v`. The
elaborator function is overly pessimistic and yields `false` on this
while the kernel function yields true. This comes up concretely in the
`Trans` class:
```lean
class Trans (r : α → β → Sort u) (s : β → γ → Sort v) (t : outParam (α → γ → Sort w)) where
  trans : r a b → s b c → t a c
```
The type of this class is `Sort (max (max (max (max (max (max 1 u) u_1)
u_2) u_3) v) w)` (where `u_1 u_2 u_3` are the levels of `α β γ`), but if
you try writing that type explicitly then the `class` command fails.
Omitting the type leaves the `class` to infer the universe level (the
command assumes the level is correct, and the kernel agrees it is), but
including the type then the elaborator checks the level inequality with
`Level.geq` and fails.

---------

Co-authored-by: Kyle Miller <kmill31415@gmail.com>
2024-11-19 21:27:00 +00:00
.github chore: pr-body: run as part of merge_group, but do not do anything (#6069) 2024-11-13 15:47:58 +00:00
doc chore: CI: bump lycheeverse/lychee-action from 1.9.0 to 2.0.2 (#5959) 2024-11-05 10:41:16 +00:00
images
nix feat: add date and time functionality (#4904) 2024-11-14 14:04:19 +00:00
releases_drafts chore: release notes for 4.12.0 (#5549) 2024-10-01 04:07:28 +00:00
script fix: do not link statically against pthread/dl/rt (#5966) 2024-11-05 18:20:42 +00:00
src fix: add a missing case to Level.geq (#2689) 2024-11-19 21:27:00 +00:00
stage0 chore: update stage0 2024-11-19 13:06:43 +00:00
tests fix: add a missing case to Level.geq (#2689) 2024-11-19 21:27:00 +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 feat: import LeanSAT's tactic frontends 2024-08-28 18:14:39 +02:00
CMakePresets.json chore: modernize build instructions (#4032) 2024-05-23 10:55:07 +00:00
CODEOWNERS chore: @hargoniX Std.Sat codeowner, fix Kim's user name (#5765) 2024-10-18 11:13:28 +00:00
CONTRIBUTING.md doc: triage 2024-07-26 18:24:06 +02:00
debug.log feat: lake: Reservoir-related configuration for packages (#4770) 2024-09-02 16:07:08 +00:00
flake.lock feat: ship cadical (#4325) 2024-08-23 09:13:27 +00:00
flake.nix chore: CI: build 64-bit platforms consistently with GMP 2024-11-01 22:48:49 +11: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
LICENSES feat: ship cadical (#4325) 2024-08-23 09:13:27 +00:00
README.md doc: mention build doc source location (#4045) 2024-05-01 22:42:54 +00:00
RELEASES.md chore: port release notes for v4.13.0 to master (#5947) 2024-11-05 01:34:52 +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).