Hello HoTTLean team,
First, thank you for your incredible work on SynthLean and HoTTLean.
My work is heavily inspired by Prof. Awodey's recent theoretical papers on the Effective 2-topos and Path Types.
I am currently working on a Proof-of-Concept (PoC) in Lean 4 that bridges a deeply embedded syntactic DSL for zero-knowledge cryptographic protocols with categorical semantics in the Effective 2-Topos, heavily utilizing the natural model semantics approach from your framework.
My repository can be found here: https://github.com/yura-ogura/crypto_topos
The Problem:
While formalizing higher categorical structures like IsAssembly, IsEffObject, and InternalGroupoid, I encountered a severe compiler limitation. These structures inherently form deeply nested $\Sigma$-types (around 10 to 17 levels deep).
When I attempt to implement these as fully concrete def or structure instances mapping down to my $\mathbb{Z}_q$ algebraic models, the Lean 4 compiler suffers from AST explosion and deterministic timeouts during type checking and reduction.
Current Workaround:
To keep the PoC computationally feasible and ensure instant compilation, I had to temporarily flatten these deeply nested structures and operations into axiom interfaces. While this eliminates the compiler load (and bypasses universe level contradictions between Type 1 categorical structures and Type 0 identities), it obviously loses the computational content of the semantic model.
My Questions:
Since your team is at the forefront of implementing these massive categorical and synthetic structures in Lean:
- How does the
HoTTLean / SynthLean architecture handle the AST explosion associated with deeply nested $\Sigma$-types?
- Are there specific design patterns (e.g., flattening into mutual inductives, specific opaque bounding, or compiler flags) you recommend to bypass these deterministic timeouts?
- How do you safely map universe polymorphic/higher-type structures without triggering universe level contradictions during identity evaluation?
Any advice, pointers to specific files in your codebase, or general guidance would be massively appreciated. I am just a student trying to push the boundaries of what is possible with Lean 4 in cryptography, and your insights would be invaluable.
Thank you!
Hello HoTTLean team,
First, thank you for your incredible work on
SynthLeanandHoTTLean.My work is heavily inspired by Prof. Awodey's recent theoretical papers on the Effective 2-topos and Path Types.
I am currently working on a Proof-of-Concept (PoC) in Lean 4 that bridges a deeply embedded syntactic DSL for zero-knowledge cryptographic protocols with categorical semantics in the Effective 2-Topos, heavily utilizing the natural model semantics approach from your framework.
My repository can be found here: https://github.com/yura-ogura/crypto_topos
The Problem:$\Sigma$ -types (around 10 to 17 levels deep).
While formalizing higher categorical structures like
IsAssembly,IsEffObject, andInternalGroupoid, I encountered a severe compiler limitation. These structures inherently form deeply nestedWhen I attempt to implement these as fully concrete$\mathbb{Z}_q$ algebraic models, the Lean 4 compiler suffers from AST explosion and deterministic timeouts during type checking and reduction.
deforstructureinstances mapping down to myCurrent Workaround:
To keep the PoC computationally feasible and ensure instant compilation, I had to temporarily flatten these deeply nested structures and operations into
axiominterfaces. While this eliminates the compiler load (and bypasses universe level contradictions between Type 1 categorical structures and Type 0 identities), it obviously loses the computational content of the semantic model.My Questions:
Since your team is at the forefront of implementing these massive categorical and synthetic structures in Lean:
HoTTLean/SynthLeanarchitecture handle the AST explosion associated with deeply nestedAny advice, pointers to specific files in your codebase, or general guidance would be massively appreciated. I am just a student trying to push the boundaries of what is possible with Lean 4 in cryptography, and your insights would be invaluable.
Thank you!