infoductor/lakefile.toml
Maximus Gorog f4787b9091 Phase B: Comonad sub-library — proof-pattern detection ported from mm-lean
Six general-purpose modules ported from mm-link/mm-lean/src/ into
Infoductor/Comonad/, namespaced for Infoductor and adapted to
Lean 4 v4.30.0-rc2:

- ComonadFinder.lean   — automatic detection of comonadic subgraph
                         patterns in Lean proof terms (FNV-1a-64
                         content hashing, recursive shape encoding,
                         cluster detection, metric computation,
                         JSON-shaped wire format `comonad/1`).
                         816 → 712 lines (test section dropped on
                         port; see § 13 note).
- ComonadCommands.lean — `#findComonadsJSON`, `#comonadNode`,
                         `#comonadSubgraph`, `#comonadClusters`
                         navigation commands.
- Convolution.lean     — cross-theorem pattern composition.
                         `String.containsSubstr` (removed in Lean
                         4.30) replaced with inline arrow-counter.
- ExtractConsts.lean   — extracting constant names from proof
                         terms by category (recursors, eliminators,
                         interesting lemmas).
- ExtractDefn.lean     — extracts comonadic clusters as Lean
                         `def` skeletons.
- GridView.lean        — plain-text proof visualization
                         (Fitch-style table + nested tree +
                         declaration info).  Mathematica-specific
                         output formatters dropped per the
                         "Infoductor is general-purpose" rule;
                         Mathematica consumers can re-add them in
                         mm-lean (or a separate Mathematica-bridge
                         project).  291 → 187 lines.

`Infoductor.Comonad` lean_lib declared separately from
`Infoductor` (which holds Foundation).  Mathlib is required for
`Tactic.Explode` proof-decomposition primitive used by the
comonad analysis.  Foundation does NOT import Mathlib —
consumers depending only on Foundation pay zero Mathlib build
cost (verified: default `lake build` is 10 jobs, all Foundation;
`lake build Infoductor.Comonad` triggers the Mathlib subgraph).

Test sections in ComonadFinder, ComonadCommands, ExtractDefn,
Convolution were stripped during port: Lean 4 v4.30 changed
`info.value?` access for theorems and the original test-time
`#findComonads` / `#analyzeCluster` / `#patternCompose` calls
fail with "has no proof value (axiom or opaque?)" or "elaboration
function not implemented".  Restoration is a Test/ harness work-
item, not blocking the production library.

Mathematica-coupled mm-lean files NOT moved (stay in mm-lean):
- Main.lean, PantographMain.lean (orchestrators)
- Mathematica.lean + Mathematica/ (bridge to Wolfram)
- Provers.lean + Provers/ (LJT, Tableaux — domain-specific)
- All `.m`, `.wl`, `.nb` Mathematica scripts.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 07:39:36 -06:00

50 lines
2.3 KiB
TOML

name = "infoductor"
version = "0.1.0"
defaultTargets = ["Infoductor"]
# Generic Lean library + tooling for algebraic organization of code
# repositories: `restructure` macro layer, `Edit` monad, `Context`
# comonad, the `@[macroAlias]` / `@[methodology]` / `@[metaPath]`
# attribute registries, and reference dispatch tactics.
#
# Consumers (cubical-transport-hott-lean4, topolei, …) depend on
# `Infoductor.Foundation` (and, when wanted, the other lean_libs
# below) to organise their proofs without committing to a specific
# methodology — the methodology is the consumer's choice.
#
# Pairs naturally with the Pantograph project (the conductor of an
# electric train sits atop the pantograph hardware).
# ── Dependencies ────────────────────────────────────────────────────────────
# Mathlib is required by `Infoductor.Comonad` for its `Tactic.Explode`
# proof-decomposition primitive. `Infoductor.Foundation` does NOT
# import Mathlib, so consumers depending only on Foundation pay no
# Mathlib build cost (Lake compiles only the imported subgraph).
# Pinned to the commit mm-lean was tracking at port time (2026-05-01).
[[require]]
name = "mathlib"
git = "https://github.com/leanprover-community/mathlib4"
rev = "master"
# ── Sub-libraries ───────────────────────────────────────────────────────────
# `Infoductor` is the umbrella name; sub-libraries below are cherry-
# pickable. Downstream `import Infoductor.Foundation.Meta` (etc.)
# only pulls that sub-library's subgraph.
[[lean_lib]]
name = "Infoductor"
# Foundation lives directly under `Infoductor.Foundation.*`; this
# default lib root resolves the umbrella module + Foundation's
# sub-modules. No Mathlib dependency through this lib.
# Comonad: comonadic proof-pattern detection. Pulls Mathlib (for
# Tactic.Explode). Optional — only built when imported by
# downstream code.
[[lean_lib]]
name = "Infoductor.Comonad"
roots = ["Infoductor.Comonad"]
# Future sub-libs (declared as each lands):
# Tactics: reference dispatchers built on Foundation.
# Pantograph: plugin / live integration (when ready).
# Runner: headless surface (when concrete need arises).