https://github.com/fgdorais/lean4-unicode-basic
Basic Unicode support for Lean 4
https://github.com/fgdorais/lean4-unicode-basic
lean lean4
Last synced: 4 months ago
JSON representation
Basic Unicode support for Lean 4
- Host: GitHub
- URL: https://github.com/fgdorais/lean4-unicode-basic
- Owner: fgdorais
- License: apache-2.0
- Created: 2023-03-11T15:23:41.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2026-02-15T09:08:30.000Z (4 months ago)
- Last Synced: 2026-02-15T15:21:28.224Z (4 months ago)
- Topics: lean, lean4
- Language: C
- Homepage:
- Size: 15.9 MB
- Stars: 15
- Watchers: 2
- Forks: 7
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Lean 4 / Unicode Basic
Basic Unicode support for Lean 4.
Unicode properties that are currently supported by `UnicodeBasic` include:
* `Alphabetic`
* `Bidi_Class`
* `Bidi_Control`
* `Bidi_Mirrored`
* `Canonical_Combining_Class`
* `Case_Ignorable`
* `Cased`
* `Decomposition_Mapping`
* `Decomposition_Type`
* `Default_Ignorable_Code_Point`
* `General_Category`
* `Hex_Digit`
* `Math`
* `Name`
* `Numeric_Type`
* `Numeric_Value`
* `Noncharacter_Code_Point`
* `Simple_Lowercase_Mapping`
* `Simple_Uppercase_Mapping`
* `Simple_Titlecase_Mapping`
* `Lowercase`
* `Uppercase`
* `White_Space`
To keep the `UnicodeBasic` library lightweight, only commonly used properties can be supported. If you need a property not yet in the list above, please submit a feature request!
## Installation
Add the following dependency to your project's `lakefile.toml`:
```toml
[[require]]
name = "UnicodeBasic"
git = "https://github.com/fgdorais/lean4-unicode-basic.git"
rev = "main" # or any specific revision
```
Or this dependency to your project's `lakefile.lean`:
```lean4
require UnicodeBasic from git
"https://github.com/fgdorais/lean4-unicode-basic.git" @ "main"
```
Then add `import UnicodeBasic` at the top of any Lean file where you plan to use this library.
## Usage
The main entry point is the root file `UnicodeBasic`. This file contains a description of the main API as well as all primary library functions. The file `UnicodeBasic.Types` contains all the primary data types used in the library.
The remaining files are implementation details. Some of these may be of interest for developers. For example `UnicodeBasic.CharacterDatabase` defines a stream type for parsing files from the [Unicode Character Database](https://www.unicode.org/Public/UCD/latest/ucd/).
## Documentation
Current documentation can be found at [www.dorais.org/lean4-unicode-basic/doc](https://www.dorais.org/lean4-unicode-basic/doc/).
Documentation is also provided for each release since version 1.1.0.
Users can also generate documentation locally using `lake build UnicodeBasic:docs UnicodeData:docs` in the `docs` directory.
-----
* The `Lean 4 / Unicode Basic` library is copyright © 2023-2025 François G. Dorais. The library is released under the [Apache 2.0 license](http://www.apache.org/licenses/LICENSE-2.0). See the file LICENSE for additional details.
* The `UnicodeData.txt` and `PropList.txt` files are copyright © 1991-2025 Unicode®, Inc. The files are distributed under the [Unicode® Copyright and Terms of Use](https://www.unicode.org/copyright.html). See the file LICENSE-UNICODE for additional details.