Lean 4 fork for HoTT-compatible kernel extensions (Path types, transport, HITs). Maintained against upstream leanprover/lean4.
Find a file
Leonardo de Moura 34dc2572f3 fix: make sure OfScientific Float instance is never unfolded during type class resolution
This commit fixes issue reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/deterministic.20timeout/near/287654818

Type class resolution was diverging when trying to synthesize
```lean
 HSub (optParam Float 0.0) (optParam Float 1.0) ?m.472
```
and Lean was diverging while unfolding
```lean
 instance : OfScientific Float where
   ofScientific m s e :=
     if s then
       let s := 64 - m.log2 -- ensure we have 64 bits of mantissa left after division
       let m := (m <<< (3 * e + s)) / 5^e
       Float.ofBinaryScientific m (-4 * e - s)
     else
       Float.ofBinaryScientific (m * 5^e) e
```
was being unfolded.

Anothe potential solution for the problem above is to erase the
`optParam` annotations before performing type class resolution.
2022-06-27 17:40:34 -07:00
.github chore: CI: fix Windows 2022-06-28 00:38:19 +02:00
.vscode doc: fix some syntax and link in the docs, and more 2021-10-10 11:36:43 +02:00
doc chore: Nix: fix stage0-from-input 2022-06-27 22:37:02 +02:00
images
nix chore: Nix: stop pinning Nix in ciShell 2022-06-21 22:57:39 +02:00
script chore: update script/reformat.lean 2022-05-13 11:55:44 +02:00
src fix: make sure OfScientific Float instance is never unfolded during type class resolution 2022-06-27 17:40:34 -07:00
stage0 refactor: make more use of quotations 2022-06-27 22:37:02 +02:00
tests fix: make sure OfScientific Float instance is never unfolded during type class resolution 2022-06-27 17:40:34 -07:00
.gitattributes chore: fix changelog path... 2022-02-09 09:42:17 +01:00
.gitignore fix: UTF-8 file path support for lean on Windows 2021-09-22 12:21:52 +02:00
.gitmodules chore: add ignore = untracked 2021-10-18 14:39:43 -07:00
.ignore chore: ignore stage0/ (for rg etc.) 2022-03-18 15:28:20 +01:00
CMakeLists.txt fix: forward USE_GMP to stage 0 2021-12-02 15:52:48 +01:00
CONTRIBUTING.md doc: fix a few links 2021-11-09 09:55:11 +01:00
default.nix doc: setup 2021-01-03 13:21:58 +01:00
flake.lock chore: nix flake update 2022-06-03 13:41:04 +02:00
flake.nix chore: Nix: fix stage0-from-input 2022-06-27 22:37:02 +02: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 chore: add link to the new book 2022-06-09 16:09:07 -07:00
RELEASES.md doc: add typed macros to RELEASES.md 2022-06-27 23:42:13 +02:00
shell.nix chore: update benchmark suite 2022-05-25 18:26:36 +02:00

This is the repository for Lean 4, which is currently being released as milestone releases towards a first stable release. Lean 3 is still the latest stable release.

About

Installation

See Setting Up Lean.

Contributing

Please read our Contribution Guidelines first.

Building from Source

See Building Lean.