[{"data":1,"prerenderedAt":4},["ShallowReactive",2],{"rmKGm701dN":3},"# PolyFun\n\nPolynomial functors, interaction trees, and dependent interaction frameworks\nin Lean 4, generic substrate for protocol theory, PL semantics, and\nconcurrent systems.\n\n## Status\n\nPolyFun is a ready, buildable Lean 4 library. The repository builds without\n`sorry` or `admit` placeholders, and the public documentation reflects the\ncurrent module layout and scope.\n\nPolyFun originated as a wholesale extraction from\n[`Verified-zkEVM/VCV-io`](https://github.com/Verified-zkEVM/VCV-io).\n\n## Scope\n\n`PolyFun` collects three layers of generic, domain-agnostic infrastructure\nthat emerged from the cryptographic-protocols formalization in `VCV-io`:\n\n1. **Polynomial functors and lenses.** `PFunctor` cores (positions /\n   directions), polynomial charts, lenses, equivalences, free monad\n   `FreeM`, displayed `FreeM`, and the `Cofree` / M-type companion.\n2. **Interaction trees** in the style of Xia, Zakowski, He, Hur, Malecha,\n   Pierce, and Zdancewic (POPL 2020), modeled as the M-type of a one-step\n   polynomial functor, with strong/weak bisimulation, simulation,\n   handlers, and event signatures.\n3. **Generic interaction framework** for sequential, two-party, multi-party,\n   and concurrent interaction over a `Spec` polynomial substrate, with\n   structural decoration, syntax/strategy/execution lenses, and an\n   open-process layer for compositional reasoning.\n\nCryptographic content (probabilistic semantics, evaluation distributions,\noracle simulation, security definitions) lives in\n[`Verified-zkEVM/VCV-io`](https://github.com/Verified-zkEVM/VCV-io)\nand depends on this library.\n\n## Build\n\n```bash\nlake exe cache get\nlake build\n```\n\nRequires the toolchain pinned in [`lean-toolchain`](lean-toolchain) and\n[`mathlib v4.29.0`](https://github.com/leanprover-community/mathlib4) (only\nexternal dependency).\n\n## Documentation\n\n- [`AGENTS.md`](AGENTS.md), [`CLAUDE.md`](CLAUDE.md): one-screen guide for\n  human and AI contributors. Symlinked.\n- [`CONTRIBUTING.md`](CONTRIBUTING.md): style, naming, attribution, and large-\n  contribution policy.\n- [`REFERENCES.md`](REFERENCES.md): the bibliography backing module\n  docstrings.\n- [`docs/wiki/`](docs/wiki/): deeper agent-facing notes on the\n  `PFunctor` substrate, interaction trees, the interaction framework,\n  notation, and recurring gotchas.\n\n## License\n\nApache-2.0.\n",1783784682716]