[{"data":1,"prerenderedAt":4},["ShallowReactive",2],{"AtksXTz1hr":3},"\u003Cp align=\"center\">\n  \u003Cimg src=\"assets/logo.svg\" alt=\"linglib\" width=\"560\">\n\u003C/p>\n\n[![CI](https://github.com/linglib-community/linglib/actions/workflows/ci.yml/badge.svg)](https://github.com/linglib-community/linglib/actions/workflows/ci.yml)\n[![Lean 4](https://img.shields.io/badge/Lean-v4.34.1-blue)](https://leanprover.github.io/)\n[![Mathlib](https://img.shields.io/badge/mathlib-v4.34.1-blueviolet)](https://github.com/leanprover-community/mathlib4)\n[![License](https://img.shields.io/badge/license-Apache%202.0-green)](LICENSE)\n\nA Lean 4 library for formal linguistics across semantics, syntax, pragmatics, morphology, phonology, and processing.\n\n> ⚠️ Among other things, this repository is an experiment in \"AI for Linguistics\" using recent advances in proof assistants and autoformalization. If you find any inaccuracies or errors, please [open an issue](https://github.com/linglib-community/linglib/issues)! \n\n## Overview\n\nLinglib aims to provide for linguistic theory what mathlib provides for mathematics: a machine-verified library where theories can be formalized against shared definitions and tested against a shared body of data. \n\n- **Make theories fully explicit.** In practice, theoretical proposals involve some amount of hand-waving, leaving gaps between what is claimed and what actually follows from the definitions. Lean checks predictions as theorems and if the consequences don't follow, the code doesn't compile. \n\n- **Detect breakage.** Because every study imports a shared library, tweaking your semantics for (say) attitude verbs tells you exactly which downstream results about conditionals, questions, or implicature still go through, and which were silently sensitive to this choices. This is like a \"regression test\" for theory. \n\n- **Compare theories.** We can formally characterize where theories agree and where they diverge (and the divergence points highlight predictions where further data could be collected.)\n\n## Building\n\n```bash\nlake exe cache get  # Get mathlib cache\nlake build\n```\n\n## Using Linglib in your own Lake project\n\nLinglib pins a specific toolchain (currently **Lean v4.34.1 / mathlib v4.34.1**), so your project's `lean-toolchain` must match. Add to your `lakefile.lean`:\n\n```lean\nrequire linglib from git\n  \"https://github.com/linglib-community/linglib\" @ \"v4.34.1\"\n```\n\n(Use `@ \"main\"` to track the latest development instead of the pinned release.)\n\nThen `import Linglib` — or, more selectively, e.g. `import Linglib.Pragmatics.RSA.Basic`.\n\n## Links\n\n- **Project site & API docs:** [linglib.io](https://linglib.io/) — also hosts the blog, an interactive dependency map, and the bibliography.\n- **Contributing:** see [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## License\n\nApache 2.0 — see [LICENSE](LICENSE).\n",1791836498173]