feat: generation-tracked environment extensions This PR adds generation-tracked environment extensions: every modification of an extension registered with `trackGen := true` bumps a generation counter, so that a result computed from the extension state can be validated later by comparing generations (`EnvExtension.getGen`). `Environment.trackedGen` counts the modifications of all such extensions, and `modifyState (bumpGen := false)` changes the state without bumping. Generations are branch-local, so tracked extensions must use `AsyncMode.local` or `.mainOnly`. Extensions also gain a `name` for diagnostics, set automatically for persistent extensions. The generations and `trackedGen` are stored in the kernel environment next to the extension states, sized together with them, so that anything replacing the states replaces their generations as well; the extension states themselves and `getState` are unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This is the repository for Lean 4.
See Install Lean.
Please read our Contribution Guidelines first.
See Building Lean.