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

Subtraction in NatInt #119

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Villetaneuse
Copy link
Contributor

@Villetaneuse Villetaneuse commented Mar 10, 2025

This is the revival of an old PR in former repository.

We add two axioms in NatInt to restrict the models to exactly the integers and the natural numbers (with pred 0 = 0). This allows us to prove lemmas such as sub_succ and then prove many properties of sub which are shared between the natural numbers and the integers.

The Natural and Integer parts of Numbers are modified in consequence. The result should be completely compatible except for mul_sub_distr_l which had different variable names in Integers and Natural (we chose to keep it as it was in Integers).

We also remove references to old NZAxiomsSig modules.

This needs more polishing, so still a draft:

  • the case of mul_sub_distr_l should be decided
  • removing some Private_ lemmas is possible (e.g. with Let), this would result in a cleaner PR
  • check exactly the before/after for a user importing PeanoNat, etc

Fixes / closes #????

  • Added changelog.
  • Added / updated documentation.
  • Opened overlay pull requests.

@SkySkimmer
Copy link
Contributor

removing some Private_ lemmas is possible (e.g. with Let), this would result in a cleaner PR

Why not Local?

@Villetaneuse
Copy link
Contributor Author

Villetaneuse commented Mar 10, 2025

removing some Private_ lemmas is possible (e.g. with Let), this would result in a cleaner PR

Why not Local?

This only prevents to use the lemmas with an unqualified name, right? They would still appear in Search result, if I understand correctly.

But maybe both is better.

This is the revival of an old PR in former repository.

We add two axioms in NatInt to restrict the models to exactly the
integers and the natural numbers (with `pred 0 = 0`). This allows
us to prove lemmas such as `sub_succ` and then prove many properties of
`sub` which are shared between the natural numbers and the integers.

The Natural and Integer parts of Numbers are modified in consequence.
The result should be completely compatible except for `mul_sub_distr_l`
which had different variable names in Integers and Natural (we chose to
keep it as it was in Integers).

We also remove references to old NZAxiomsSig modules.

This needs more polishing, so still a draft:
- the case of `mul_sub_distr_l` should be decided
- removing some `Private_` lemmas is possible (e.g. with `Let`), this
  would result in a cleaner PR
- check exactly the before/after for a user importing PeanoNat, etc
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