Skip to content

Conversation

@andres-erbsen
Copy link
Collaborator

@andres-erbsen andres-erbsen commented May 31, 2025

@andres-erbsen andres-erbsen force-pushed the early-lia branch 18 times, most recently from 5b5c1c9 to 8e7d182 Compare May 31, 2025 20:31
@andres-erbsen andres-erbsen marked this pull request as ready for review May 31, 2025 22:33
andres-erbsen added a commit to andres-erbsen/fiat-crypto that referenced this pull request May 31, 2025
andres-erbsen added a commit to andres-erbsen/bedrock2 that referenced this pull request May 31, 2025
andres-erbsen added a commit to mit-plv/fiat-crypto that referenced this pull request Jun 1, 2025
andres-erbsen added a commit to mit-plv/bedrock2 that referenced this pull request Jun 1, 2025
Copy link
Contributor

@proux01 proux01 left a comment

Choose a reason for hiding this comment

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

Sounds reasonable at first glance

Comment on lines 228 to 235
<dt> <a name="zarith"></a><b>ZArith</b>:
Binary encoding of integers.
This binary encoding was initially developped to enable effective
computations, compared to the unary encoding of nat. Proofs were then added
making the types usable for mathematical proofs, although this was not
the initial intent. If even-more efficient computations are needed, look
at the <a href="#primitive-int">primitive-int</a> package below for 63 bits machine arithmetic
or the coq-bignums package for arbitrary precision machine arithmetic.
Everything can be imported with From Stdlib Require Import ZArith.
Also contains the migromega tactic that can be loaded with
From Stdlib Require Import Lia.
Integer-arithmetic properties
</dt>
Copy link
Contributor

Choose a reason for hiding this comment

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

We probably don't want to loose that information

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated. Most of the information is now split between entries for integers and primitive-int. I put back more mention of proofs and the suggested Require Import here. I removed the historical note because it does not seem relevant and important enough to be on the front page.

@andres-erbsen andres-erbsen force-pushed the early-lia branch 3 times, most recently from ab28487 to c0e6db0 Compare June 12, 2025 12:17
@andres-erbsen
Copy link
Collaborator Author

I addressed the comments and rebased. I think this PR is likely to go stale again; please also make a decision about how to handle the remaining overlay.

Copy link
Contributor

@proux01 proux01 left a comment

Choose a reason for hiding this comment

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

Would have been better to have multiple meaningful commits than a huge one but well, now it's done.

Rational numbers, including canonical (Qc) and non-canonical (Q)
constructions on top of binary <a href="#integers">Integers</a> as well as
basic theory. Alternative definitions are available in coq-mathcomp-algebra
(unary rat and theory) or coq-bignums (machine-integer construction) and
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure what unary means here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

https://en.wikipedia.org/wiki/Unary_numeral_system, referring to how rat is constructed in mathcomp

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe "based on unary nat"?

<dt> <a name="qarith"></a><b>QArith</b>:
Rational numbers, including canonical (Qc) and non-canonical (Q)
constructions on top of binary <a href="#integers">Integers</a> as well as
basic theory. Alternative definitions are available in coq-mathcomp-algebra
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe

Suggested change
basic theory. Alternative definitions are available in coq-mathcomp-algebra
basic theory. A more convenient definition is available in coq-mathcomp-algebra

(it's not like the three following things are pure alternatives of one another, but one is nice for proofs, the other to compute efficiently and the third thing can be used to refine proved things to computable things)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We disagree about which is more convenient.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe "more convenient for proofs" or "more convenient for mathematical developments"?

@proux01
Copy link
Contributor

proux01 commented Jun 12, 2025

how to handle the remaining overlay.

IIUC, this is only VST. You can probably ask them to merge it once their CI confirms it's indeed backward compatible.

@andres-erbsen
Copy link
Collaborator Author

I responded to comments, please take another look

CI says error: Failed to open archive (Source threw exception: error: unable to download 'https://github.com/andres-erbsen/VST/archive/early-lia.tar.gz': HTTP error 404 after the overlay commit

@andres-erbsen
Copy link
Collaborator Author

I will deal with the bedrock2 overlay propagation. If you could poke VST (as the assignee), that'd be great. Thanks!

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.

2 participants