cubical-transport-hott-lean4/CubicalTransport/Algebra/EngineMethodologies.lean
Maximus Gorog e26ada2fbc
Some checks are pending
Lean Action CI / build (push) Waiting to run
Extract Algebra/ foundation to Infoductor; require it from forgejo
The six generic methodology / repo-organization modules
(Meta / Edit / Restructure / MacroAlias / MetaPath / Methodology)
move out of CubicalTransport/Algebra/ into the new Infoductor repo
at http://maxgit.wg:3000/max/infoductor.

cubical-transport-hott-lean4 now `require`s `infoductor` from that
forgejo URL.  Imports updated:
- import CubicalTransport.Algebra.X → import Infoductor.Foundation.X
- open CubicalTransport.Algebra → open Infoductor

Files that stay (cubical-domain-specific):
- CubicalTransport/Algebra/EngineMethodologies.lean (cubical
  closing-form @[methodology] tags)
- CubicalTransport/Algebra/Test.lean (integration tests)

Files deleted (moved to Infoductor.Foundation):
- CubicalTransport/Algebra/Meta.lean
- CubicalTransport/Algebra/Edit.lean
- CubicalTransport/Algebra/Restructure.lean
- CubicalTransport/Algebra/MacroAlias.lean
- CubicalTransport/Algebra/MetaPath.lean
- CubicalTransport/Algebra/Methodology.lean

Architecture rationale (per memory: "Infoductor — generic
methodology / repo-organization project"):
- Foundation primitives are domain-agnostic; anyone can register
  their own methodology atop them, regardless of cubical interest.
- Cubical-transport keeps the question-form (CompQ etc.) and
  cubical-specific @[methodology] / @[metaPath] decls.
- topolei (next, separate work) will consume both
  Infoductor.Foundation and cubical-transport, picking cubical
  as its methodology.
- "Info-ductor" — conducts information through a codebase; pairs
  with Pantograph (the conductor sits atop the pantograph
  hardware on an electric train).

93/93 tests pass (47 smoke + 46 property).  53 build jobs total
(43 cubical + 10 Infoductor.Foundation + linker stages).  No new
axioms, no behavioural change — pure code-organization refactor.

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

85 lines
3.9 KiB
Text

/-
CubicalTransport.Algebra.EngineMethodologies
============================================
Engine-bound methodology registrations. Per ALGEBRA_PLAN.md §9:
> Every existing `eval_*` / `vTransp_*` / `vCompValue_*` / Glue /
> Soundness theorem has at least one corresponding `@[methodology]`
> registration that closes its representative question via
> `cubical_search`.
Each registration here is a *closing form* — a theorem that closes
a concrete-shape question goal directly, with its classifier
hypothesis discharged automatically (typically by `rfl` after
struct projection). This turns a hypothesis-bearing simp lemma
(`ask_of_full_face`) into a `cubical_search`-applicable closer
(`compq_top_concrete`).
Goals targeted:
- Full-face / empty-face / interval-line questions (all three
question shapes: CompQ, TranspQ, HCompQ).
- hcomp on `.pi` and on `.top` — closing forms with concrete body.
Out of scope here:
- Methodologies requiring non-trivial classifier discharge
(e.g., `ask_of_const_line` wants `¬IsFullFace ∧ ¬IsEmptyFace ∧
IsConstLine`). These would need a richer dispatch tactic; for
now `cubical_simp` covers them via the simp-routing path.
- Methodologies depending on Glue / Path body shape. The Glue
transport axioms have ~10 face-disjoint cases that each need
their own concrete closers; they land in a follow-up.
-/
import Infoductor.Foundation.Methodology
import CubicalTransport.Question
namespace CubicalTransport.Algebra.EngineMethodologies
open Infoductor
open Question
-- ── CompQ closers ───────────────────────────────────────────────────────────
/-- C1 closer: literal `.top` face on a CompQ → `eval env (u.substDim
binder .one)`. Classifier discharged by struct-projection rfl. -/
@[methodology IsCompQTopFace]
theorem compQ_top_face (env : CEnv) (i : DimVar) (A : CType) (u t : CTerm) :
(CompQ.mk env i A .top u t).ask = eval env (u.substDim i .one) :=
CompQ.ask_of_full_face _ rfl
/-- C2 closer: literal `.bot` face on a CompQ → `eval env (.transp
binder body .bot t)`. -/
@[methodology IsCompQBotFace]
theorem compQ_bot_face (env : CEnv) (i : DimVar) (A : CType) (u t : CTerm) :
(CompQ.mk env i A .bot u t).ask = eval env (.transp i A .bot t) :=
CompQ.ask_of_empty_face _ rfl
-- ── TranspQ closers ─────────────────────────────────────────────────────────
/-- T1 closer: literal `.top` face on a TranspQ → identity. -/
@[methodology IsTranspQTopFace]
theorem transpQ_top_face (env : CEnv) (i : DimVar) (A : CType) (t : CTerm) :
(TranspQ.mk env i A .top t).ask = eval env t :=
TranspQ.ask_of_full_face _ rfl
/-- T2 specialisation: any face on `.interval` → identity. -/
@[methodology IsTranspQIntervalLine]
theorem transpQ_interval_line (env : CEnv) (i : DimVar)
(φ : FaceFormula) (t : CTerm) :
(TranspQ.mk env i .interval φ t).ask = eval env t :=
TranspQ.ask_of_interval_line _ rfl
-- ── HCompQ closers ──────────────────────────────────────────────────────────
/-- HCompQ full-face closer: `vPApp tube .one`. -/
@[methodology IsHCompQTopFace]
theorem hcompQ_top_face (A : CType) (tube base : CVal) :
(HCompQ.mk A .top tube base).ask = vPApp tube .one :=
HCompQ.ask_of_full_face _ rfl
end CubicalTransport.Algebra.EngineMethodologies
-- (No `cubical_close` macro shipped here. A composite closer like
-- `simp; (rfl | cubical_search)` is a one-line user-side composition;
-- baking it in would impose an opinionated ordering and an
-- opinionated default tactic. Compose at the call site as needed.)