Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formalise Propositions 3.6 and 3.7 from RS17 paper #30

Merged
merged 6 commits into from
Sep 21, 2023

Conversation

dvmcarpena
Copy link
Collaborator

Closes #3.
Prop 3.6 works fine, but for prop 3.7 the check of Δ³-is-retract-Δ²×Δ¹-section does not terminate in my laptop. I'm not sure what's happening, but proof seems ok.

@fizruk
Copy link
Member

fizruk commented Sep 20, 2023

I can reproduce the issue, I will trace it and report later. Thanks for letting us know!

@fizruk
Copy link
Member

fizruk commented Sep 21, 2023

Initially, I thought there is a bug and an infinite loop somewhere. But it turns out, there's just a huge inefficiency (which can also be considered a bug, I guess). In particular, when checking Δ³-is-retract-Δ²×Δ¹-section, rzk has unnecessarily generated 21 LEM instances for points, many of which are ill typed (there was no typechecking in that part), leading to $2^{21}$ branches to check, which just took a lot of time.

I have fixed the issue locally, and now I see another issue in Δ³-is-retract-Δ²×Δ¹.
The default proof by refl does not work, since $\eta$-expansion for pairs in the cube/tope layer does not fire appropriately, leading essentially to $\langle \langle \pi_1 (t_{12}), \pi_2 (t_{12}) \rangle, t_3 \rangle \equiv \langle t_{12}, t_3 \rangle$ in the goal, which does not simplify to reflexive equality tope (but should), so the typechecking is stuck and reports a type error.

I will fix this second issue as well soon, make a release, and then this PR will be good to merge!

Thanks for exposing weaknesses in the implementation :)

Copy link
Member

@fizruk fizruk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is working now, with rzk-0.5.7! If you don't plan on pushing more changes here, I am happy to merge :)

@dvmcarpena dvmcarpena marked this pull request as ready for review September 21, 2023 14:51
@dvmcarpena
Copy link
Collaborator Author

Great! Thanks for the quick response and fixes! Ready to merge for me :)

@emilyriehl emilyriehl merged commit 877695f into rzk-lang:main Sep 21, 2023
1 check passed
@emilyriehl
Copy link
Collaborator

Done.

@dvmcarpena dvmcarpena deleted the issue-3 branch September 30, 2023 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Formalise Propositions 3.6 and 3.7 from RS17 paper
3 participants