Unicode Character Database (UCD) support for Lean 4.
This library is one of a small family of Lean 4 Unicode libraries. Each one has a narrow job, so you only depend on what you need.
| Library | What it is for |
|---|---|
| UnicodeBasic | The foundation. Fast lookups of commonly used character properties such as general category, case mappings, numeric values, scripts and names, from compact precompiled tables. Start here. |
| UnicodeData (this library) | Direct access to the Unicode Character Database files themselves, such as UnicodeData.txt, PropList.txt, CaseFolding.txt and SpecialCasing.txt. Heavier than UnicodeBasic, but complete, and handy for properties UnicodeBasic does not cover or for checking it against the source. |
| UnicodeFormat | Encoding and decoding: UTF-8, UTF-16 and UTF-32, the byte-level encoding schemes with byte order marks, strict and lossy decoding, and streaming iterators. |
| UnicodeLemmas | Proofs about UnicodeBasic properties, such as the fact that every cased character is alphabetic. |
| UnicodeExtra | Unicode algorithms on whole strings that are too large or too specialized for UnicodeBasic, built on top of it. |
Add the following dependency to your project's lakefile.toml:
[[require]]
name = "UnicodeData"
git = "https://github.com/fgdorais/lean4-unicode-data.git"
rev = "main" # or any specific revisionOr this dependency to your project's lakefile.lean:
require UnicodeData from git
"https://github.com/fgdorais/lean4-unicode-data.git" @ "main"You can generate documentation locally using lake build UnicodeData:docs in the docs directory.
- The
Lean 4 / Unicode Datalibrary is copyright © 2023-2026 François G. Dorais. The library is released under the Apache 2.0 license. See the file LICENSE for additional details. - The Unicode Character Database files are copyright © 1991-2026 Unicode®, Inc. The files are distributed under the Unicode® Copyright and Terms of Use. See the file LICENSE-UNICODE for additional details.