Skip to content

New lemmas for stdlib#1053

Open
namasikanam wants to merge 5 commits into
mainfrom
lemmas-from-oram
Open

New lemmas for stdlib#1053
namasikanam wants to merge 5 commits into
mainfrom
lemmas-from-oram

Conversation

@namasikanam

Copy link
Copy Markdown
Collaborator

This is the first part of the auxiliary lemmas used in the oram proofs. My current plan is to create 5 PRs (~2k LoC) in total.

I will make sure all the proofs are either written by human, or first generated by LLM and then carefully edited step by step by myself.

@oskgo

oskgo commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

It seems like applying some_not_none is going to be no more helpful than destructuring the argument.

Some of the proofs for the option lemmas can also be significantly simplified by destructuring. omap_some_oget can be proven with just by case x.

@namasikanam

Copy link
Copy Markdown
Collaborator Author

It seems like applying some_not_none is going to be no more helpful than destructuring the argument.

Some of the proofs for the option lemmas can also be significantly simplified by destructuring. omap_some_oget can be proven with just by case x.

Thanks. This makes lots of sense. I feel that I learned the proper way of handling option. I removed the all lemmas related to option except the following one, which I feel useful and I hope it's also useful for others.

lemma oget_ext ['a] (x y : 'a option) :
     x <> None
  => y <> None
  => oget x = oget y
  => x = y.
proof. by case x; case y. qed.

@oskgo oskgo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Had a look at the rest now.

Comment thread theories/algebra/Ring.ec Outdated
Comment thread theories/analysis/RealExp.ec Outdated
Comment thread theories/datatypes/Int.ec
@namasikanam

namasikanam commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator Author

@oskgo Thanks for your review. They make lots of sense to me and I learned something. I've resolved all your comments and updated my PR.

@namasikanam

namasikanam commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator Author

Hmmm...as now we strengthened two lemmas in stdlib, an external project (xmss) is broken. Shall I keep the original lemmas, rexpr_hmono_ltr and rexpr_hmono, or updated external projects which depend on these two lemmas?

Comment thread theories/core/Core.ec Outdated
Comment thread theories/core/Core.ec
@oskgo

oskgo commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

@namasikanam The external projects should be updated. I think @fdupress maintains xmss.

@fdupress

Copy link
Copy Markdown
Member

I don't, but I keep it up to date.
I don't see the failure, though.

@namasikanam

namasikanam commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator Author

I don't, but I keep it up to date. I don't see the failure, though.

@fdupress You can see the failure through CI now.
https://github.com/EasyCrypt/easycrypt/actions/runs/27955903321/job/82726110975?pr=1053

I can also create a PR to XMSS by myself if you want.

fdupress added a commit to formosa-crypto/formosa-xmss that referenced this pull request Jun 22, 2026
This follows from changes to the lemma in EasyCrypt/easycrypt#1053
@fdupress

Copy link
Copy Markdown
Member

I don't, but I keep it up to date. I don't see the failure, though.

@fdupress You can see the failure through CI now. https://github.com/EasyCrypt/easycrypt/actions/runs/27955903321/job/82726110975?pr=1053

I can also create a PR to XMSS by myself if you want.

This is done. External CI works, but we'll need to synchronise the merging across the repos.

@fdupress

Copy link
Copy Markdown
Member

Which we can't do because the local CI setup for the XMSS repo is still not fixed for compatibility with the external CI on breaking changes.

I'll reprioritise sorting this out.

@namasikanam namasikanam requested a review from oskgo June 22, 2026 15:57
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.

3 participants