cubical-transport-hott-lean4/CubicalTransport.lean
Maximus Gorog c7f91fa933
Some checks are pending
Lean Action CI / build (push) Waiting to run
Modal cascade Phase 3: Modal.lean module proper — Layer 0 complete
Per THEORY.md §3.3 (the substantive theorems) and §3.2 (Crisp piece,
scoped down).  Closes the Modal cascade; Layer 0 substrate now lands
in full as a 13-module reachable set from the root barrel.

§1  Three modal CFunctor witnesses on CType_as_Category ℓ:
      flatFunctor / sharpFunctor / shapeFunctor.
    obj X = .lam "$x" (.{flat,sharp,shape}Intro (.app X (.var "$x"))).
    arr f = .lam "$m" (.{flat,sharp,shape}Elim
              (.lam "$y" (.{flat,sharp,shape}Intro (.app f (.var "$y"))))
              (.var "$m"))  — elim-then-intro functorial action.

§1a 9 @[simp] rfl-lemmas + 2 substantive-dependence theorems
    (flatFunctor_obj_dep, flatFunctor_arr_f_dep) — distinct
    inputs yield distinct functor-image CTerms.

§2  Crisp : CTerm → Prop with three constructors
    (flatElimBody / flatIntroOfCrisp / appPropagation).
    CContext.crispVar context discipline DEFERRED to a future phase
    (THEORY.md §3.2): would require Ctx-shape refactor through ~30
    HasType cases + Subst/DimLine cascade.  Documented in docstring.

§3  Three adjoint-triple theorems with substantive Prop statements:
      flat_sharp_adjoint  : Nonempty (CAdjoint flatFunctor sharpFunctor)
      shape_flat_adjoint  : Nonempty (CAdjoint shapeFunctor flatFunctor)
      cohesive_triple     : LexModality witnesses for shape & sharp +
                            cross-modal coherence existential
    All sorry'd with specific blocker annotations (modal-cohesion
    path-equality lift, EML-real-cohesion §3.4/§3.5, lex-modality
    construction depending on Category.CCategory_internal sorry).

    Honest weakness: cohesive_triple part 3 (the cross-modal
    coherence) uses `∃ coh, coh = a ∨ coh = b` shape which is
    trivially satisfiable.  The real coherence square (Path-equality
    between the two unit/counit composites) requires the adjunctions
    above to be constructed first.  Strengthening to the Path form
    is queued behind their discharge.

§4  Three β-rule soundness theorems
    (flat_beta_sound / sharp_beta_sound / shape_beta_sound) —
    discharged via Phase 1's eval β-axioms.  Zero sorries here.

Barrel: import CubicalTransport.Modal added.

Build: lake build (48 jobs) + lake build CubicalTransport (43 jobs)
PASS.  Runtime: lake exe cubical-test 49/49 + 46/46 = 95 PASS.
+610 lines (NEW Modal.lean), +1 line (barrel).  3 new sorries, all
annotated with specific blockers.

Layer 0 substrate is now COMPLETE: 13 modules reachable from barrel
(Truncation, Decidable, Reify, Omega, Category, Modality, Modal,
Subobject, SIP, Bridge.Set, Contract, Reflect, Tactic.EqContract).

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

40 lines
1.3 KiB
Text

import CubicalTransport.Universe
import CubicalTransport.Interval
import CubicalTransport.Face
import CubicalTransport.Syntax
import CubicalTransport.DecEq
import CubicalTransport.Subst
import CubicalTransport.DimLine
import CubicalTransport.Typing
import CubicalTransport.Equiv
import CubicalTransport.Glue
import CubicalTransport.Value
import CubicalTransport.Transport
import CubicalTransport.Line
import CubicalTransport.Eval
import CubicalTransport.EvalTest
import CubicalTransport.Readback
import CubicalTransport.FFI
import CubicalTransport.FFITest
import CubicalTransport.ValueTyping
import CubicalTransport.TransportLaws
import CubicalTransport.System
import CubicalTransport.CompLaws
import CubicalTransport.Soundness
import CubicalTransport.Inductive
import CubicalTransport.Bridge
import CubicalTransport.Question
import CubicalTransport.PropertyTest
import CubicalTransport.Truncation
import CubicalTransport.Decidable
import CubicalTransport.Reify
import CubicalTransport.Omega
import CubicalTransport.Category
import CubicalTransport.Modality
import CubicalTransport.Modal
import CubicalTransport.Subobject
import CubicalTransport.SIP
import CubicalTransport.Bridge.Set
import CubicalTransport.Contract
import CubicalTransport.Reflect
import CubicalTransport.Tactic.EqContract