cubical-transport-hott-lean4/CubicalTransport
Maximus Gorog f27211f73f REL1 foundation: schema-based inductive + HIT CTypes (Lean side)
Adds schema-based inductive type encoding to the engine, supporting both
plain inductives (Nat, List, Bool) and HITs (S¹, propositional truncation,
suspensions) via a single CTypeSchema/CtorSpec/CTypeArg structure.

New CType constructor:
  - .ind (S : CTypeSchema) (params : List CType)

New CTerm constructors:
  - .dimExpr  (r : DimExpr)
  - .ctor     (S, ctorName, params, args)
  - .indElim  (S, params, motive, branches, target)

New CVal constructors:
  - .vctor    (S, ctorName, params, evaluatedArgs)
  - .vdimExpr (DimExpr)

New CNeu constructor:
  - .nIndElim (S, params, motive, branches, neuTarget)

Five-way mutual block in Syntax.lean (CType, CTerm, CTypeArg, CtorSpec,
CTypeSchema) with Repr derivation post-hoc.  Tag layout per
docs/INDUCTIVE_TYPES.md §6: old tags preserved (no shifting).  Existing
62/62 smoke + property tests pass unchanged through Rust.

Substitution / dim-absent / endpoint handling:
  Subst.lean      — substDim, substDimExpr, equation lemmas,
                    substDim_eq_substDimExpr (mutual with .params helpers).
  DimLine.lean    — CTerm.dimAbsent + CType.dimAbsent (mutual w/ helpers
                    for list / branches / params).  Plus all five
                    auxiliary mutual blocks: substDim_absent_aux,
                    substDimExpr_absent_aux, dimAbsent_after_substDim_aux,
                    substDim_comm_aux — for both CTerm and CType.

Eval.lean: ctor → vctor (eval'd args); indElim β-reduces on canonical
vctor target via vApp chain over branch body, otherwise stuck via
.nIndElim; dimExpr → vdimExpr.  Path-ctor boundary firing and
recursive-arg IH wiring marked TODO REL1.1 (β-reduction works for
non-recursive ctors today).

Readback.lean: vctor → .ctor, vdimExpr → .dimExpr, nIndElim → .indElim.

FFITest.lean: cvalSummary / ctermSummary extended with new constructor
arms.

Topolei (sibling repo) has not yet been migrated — see
docs/INDUCTIVE_TYPES.md §9.1 for the per-file impact map.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 15:09:39 -06:00
..
CompLaws.lean Split: engine = cubical-transport HoTT only 2026-04-27 21:35:01 -06:00
DimLine.lean REL1 foundation: schema-based inductive + HIT CTypes (Lean side) 2026-04-30 15:09:39 -06:00
Equiv.lean Split: engine = cubical-transport HoTT only 2026-04-27 21:35:01 -06:00
Eval.lean REL1 foundation: schema-based inductive + HIT CTypes (Lean side) 2026-04-30 15:09:39 -06:00
EvalTest.lean Split: engine = cubical-transport HoTT only 2026-04-27 21:35:01 -06:00
Face.lean Split: engine = cubical-transport HoTT only 2026-04-27 21:35:01 -06:00
FFI.lean Split: engine = cubical-transport HoTT only 2026-04-27 21:35:01 -06:00
FFITest.lean REL1 foundation: schema-based inductive + HIT CTypes (Lean side) 2026-04-30 15:09:39 -06:00
Glue.lean Split: engine = cubical-transport HoTT only 2026-04-27 21:35:01 -06:00
Interval.lean Split: engine = cubical-transport HoTT only 2026-04-27 21:35:01 -06:00
Line.lean Split: engine = cubical-transport HoTT only 2026-04-27 21:35:01 -06:00
PropertyTest.lean Split: engine = cubical-transport HoTT only 2026-04-27 21:35:01 -06:00
Readback.lean REL1 foundation: schema-based inductive + HIT CTypes (Lean side) 2026-04-30 15:09:39 -06:00
Soundness.lean Split: engine = cubical-transport HoTT only 2026-04-27 21:35:01 -06:00
Subst.lean REL1 foundation: schema-based inductive + HIT CTypes (Lean side) 2026-04-30 15:09:39 -06:00
Syntax.lean REL1 foundation: schema-based inductive + HIT CTypes (Lean side) 2026-04-30 15:09:39 -06:00
System.lean Split: engine = cubical-transport HoTT only 2026-04-27 21:35:01 -06:00
Transport.lean Split: engine = cubical-transport HoTT only 2026-04-27 21:35:01 -06:00
TransportLaws.lean Split: engine = cubical-transport HoTT only 2026-04-27 21:35:01 -06:00
Typing.lean Split: engine = cubical-transport HoTT only 2026-04-27 21:35:01 -06:00
Value.lean REL1 foundation: schema-based inductive + HIT CTypes (Lean side) 2026-04-30 15:09:39 -06:00
ValueTyping.lean Split: engine = cubical-transport HoTT only 2026-04-27 21:35:01 -06:00