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

feat: add Int.emod_sub_emod and Int.sub_emod_emod #6507

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

Conversation

vlad902
Copy link

@vlad902 vlad902 commented Jan 2, 2025

This PR adds the subtraction equivalents for Int.emod_add_emod ((a % n + b) % n = (a + b) % n) and Int.add_emod_emod ((a + b % n) % n = (a + b) % n). These are marked @[simp] like their addition equivalents.

Discussed on Zulip in
https://leanprover.zulipchat.com/#narrow/channel/270676-lean4/topic/Adding.20some.20sub_emod.20lemmas.20to.20DivModLemmas

@vlad902 vlad902 requested a review from kim-em as a code owner January 2, 2025 11:48
@github-actions github-actions bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Jan 2, 2025
@leanprover-community-bot
Copy link
Collaborator

leanprover-community-bot commented Jan 2, 2025

Mathlib CI status (docs):

  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 7d0c0d4d9254f1ad9eaa7428efddb2bc740dcd9a --onto 2c87905d77b707c3283c1de759fd63269ac386a1. (2025-01-02 12:08:01)
  • ✅ Mathlib branch lean-pr-testing-6507 has successfully built against this PR. (2025-01-02 13:35:25) View Log

This PR adds the subtraction equivalents for `Int.emod_add_emod`
(`(a % n + b) % n = (a + b) % n`) and `Int.add_emod_emod`
(`(a + b % n) % n = (a + b) % n`). These are marked @[simp] like their
addition equivalents.

Discussed on Zulip in
https://leanprover.zulipchat.com/#narrow/channel/270676-lean4/topic/Adding.20some.20sub_emod.20lemmas.20to.20DivModLemmas
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Jan 2, 2025
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Jan 2, 2025
@leanprover-community-bot leanprover-community-bot added the builds-mathlib CI has verified that Mathlib builds against this PR label Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builds-mathlib CI has verified that Mathlib builds against this PR toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants