Lean 4 fork for HoTT-compatible kernel extensions (Path types, transport, HITs). Maintained against upstream leanprover/lean4.
Find a file
Wojciech Rozowski eb013fb90d
fix: construction of CompleteLattice instance for eta-reduced definitions (#10144)
This PR changes the construction of a `CompleteLattice` instance on
predicates (maps intro `Prop`) inside of
`coinductive_fixpoint`/`inductive_fixpoint` machinery.

Consider a following endomap on predicates of the type ` α → Prop`:
```lean4
def DefFunctor (r : α → α → Prop) (infSeq : α → Prop) : α → Prop :=
   λ x : α => ∃ y, r x y ∧ infSeq y
```
The following eta-reduced expression failed to elaborate:
```lean4
def def1 (r : α → α → Prop) : α → Prop := DefFunctor r (def1 r)
  coinductive_fixpoint monotonicity sorry
```

At the same time, eta-expanded variant would elaborate correctly:
```lean4
def def2 (r : α → α → Prop) : α → Prop := fun x => DefFunctor r (def2 r) x
  coinductive_fixpoint monotonicity sorry
```

This PR fixes the above issue, by changing the way how `CompleteLattice`
instance on the space of predicates is constructed, to allow for the
eta-reduced case, as outlined above.
2025-08-28 12:27:53 +00:00
.github chore: CI: disable broken test on macOS x64 2025-08-27 13:14:32 +02:00
doc chore: fix spelling errors (#10042) 2025-08-22 07:23:12 +00:00
images
releases_drafts
script chore: review of failing grind tests (#10166) 2025-08-28 05:24:31 +00:00
src fix: construction of CompleteLattice instance for eta-reduced definitions (#10144) 2025-08-28 12:27:53 +00:00
stage0 chore: update stage0 2025-08-28 09:45:24 +00:00
tests fix: construction of CompleteLattice instance for eta-reduced definitions (#10144) 2025-08-28 12:27:53 +00:00
.gitattributes
.gitignore
.gitpod.Dockerfile
.gitpod.yml
.ignore
CMakeLists.txt chore: make USE_LAKE the default (#10016) 2025-08-21 11:43:25 +00:00
CMakePresets.json
CODEOWNERS
CONTRIBUTING.md
flake.lock
flake.nix chore: remove broken Nix build (#9910) 2025-08-14 08:31:39 +00:00
lean-toolchain
lean.code-workspace
LICENSE
LICENSES
README.md doc: fix examples link 2025-08-22 16:28:01 +02:00
RELEASES.md

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.