Lean 4 fork for HoTT-compatible kernel extensions (Path types, transport, HITs). Maintained against upstream leanprover/lean4.
Find a file
George Rennie 34c0535844
refactor: encode constants as inversions of false in AIG framework (#7649)
This PR changes the AIG representation of constants from `const (b :
Bool)` to a single constructor `false`. Since #7381 `Ref` contains an
`invert` flag meaning the constant `true` can be represented as a `Ref`
to `false` with `invert` set, so no expressivity is lost.

The main advantage to this representation is that it allows pattern
matching on constants to match just on the `invert` field rather than on
both `invert` and the constant value or having to XOR the two together.
This representation is also standard in other AIG frameworks, such as
the [Aiger standard](https://fmv.jku.at/aiger/FORMAT.aiger).

This PR also generalizes the idempotency rule in `mkGateCached` from `(a
/\ b) = a` when `(a = b)` to also cover `(¬a /\ ¬b) = ¬a` when `a = b`
as it was not covered.
2025-03-24 10:43:00 +00:00
.github chore: CI: bring back coredump tracing (#7625) 2025-03-21 15:25:45 +00:00
doc chore: post-#7100 cleanup (#7196) 2025-02-23 22:46:22 +00:00
images
nix fix: Windows stage0 linking (#6622) 2025-01-14 09:09:50 +01:00
releases chore: copy v4.17.0 release notes from releases/v4.17.0 branch (#7325) 2025-03-04 11:24:51 +00:00
releases_drafts chore: cherry-pick release notes from releases/v4.15.0 and releases/v4.16.0 (#6520) 2025-01-04 01:25:33 +00:00
script fix: indenting in release notes script (#7326) 2025-03-12 23:02:02 +00:00
src refactor: encode constants as inversions of false in AIG framework (#7649) 2025-03-24 10:43:00 +00:00
stage0 chore: update stage0 2025-03-24 08:25:00 +01:00
tests refactor: encode constants as inversions of false in AIG framework (#7649) 2025-03-24 10:43: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
.gitpod.Dockerfile chore: add gitpod configuration (#6382) 2024-12-15 21:38:13 +00:00
.gitpod.yml chore: add gitpod configuration (#6382) 2024-12-15 21:38:13 +00:00
.ignore chore: ignore stage0/ (for rg etc.) 2022-03-18 15:28:20 +01:00
CMakeLists.txt chore: CI: USE_LAKE secondary build job (#7505) 2025-03-20 12:16:53 +00:00
CMakePresets.json chore: fix fsanitize preset (#7651) 2025-03-24 09:17:45 +00:00
CODEOWNERS chore: adjust CODEOWNERS (#6327) 2024-12-10 08:37:20 +00:00
CONTRIBUTING.md doc: triage 2024-07-26 18:24:06 +02:00
flake.lock feat: upgrade cadical to 2.1.2 (#7347) 2025-03-05 17:58:58 +00:00
flake.nix chore: CI: bring back coredump tracing (#7625) 2025-03-21 15:25:45 +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 feat: ship cadical (#4325) 2024-08-23 09:13:27 +00:00
README.md chore: update documentation title and link README to reference (#6409) 2024-12-17 22:18:56 +00:00
RELEASES.md chore: split RELEASES.md into releases/ folder (#6918) 2025-02-03 11:04:09 +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).