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(Algebra/Group/Even): "Advanced" lemmas about even elements. #20272

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

artie2000
Copy link
Collaborator

@artie2000 artie2000 commented Dec 27, 2024

Add construction of subgroup of even elements / squares.
Add result that squares (IsSquare) are non-negative.

These results cannot be added to Mathlib.Algebra.Group.Even directly because of import restrictions.
This PR is split off from #16094


Open in Gitpod

@github-actions github-actions bot added the new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! label Dec 27, 2024
Copy link

github-actions bot commented Dec 27, 2024

PR summary d3acc8fce2

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
Mathlib.Algebra.Group.Subgroup.Even (new file) 345

Declarations diff

+ IsSquare.nonneg
+ squareIn_toSubmonoid
+ squareIn_toSubsemigroup
+++ coe_squareIn
+++ mem_squareIn
+++ squareIn

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for script/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@mathlib4-dependent-issues-bot mathlib4-dependent-issues-bot added blocked-by-other-PR This PR depends on another PR to Mathlib (this label is automatically managed by a bot) and removed blocked-by-other-PR This PR depends on another PR to Mathlib (this label is automatically managed by a bot) labels Dec 27, 2024
@mathlib4-dependent-issues-bot
Copy link
Collaborator

This PR/issue depends on:

@leanprover-community-bot-assistant leanprover-community-bot-assistant added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Dec 28, 2024
@YaelDillies
Copy link
Collaborator

Advanced isn't really descriptive. What about Algebra.Group.Submonoid.Even?

@artie2000
Copy link
Collaborator Author

Advanced isn't really descriptive. What about Algebra.Group.Submonoid.Even?

That sounds good, but I'm also adding the non-negativity result. Maybe that should go elsewhere? Not sure where the right home for it is. It can't go in Algebra.Group.Even due to import restrictions on order.

@leanprover-community-bot-assistant leanprover-community-bot-assistant removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Dec 28, 2024
@YaelDillies
Copy link
Collaborator

What about a file under Algebra.Order.Group? Also note that the diff currently contains unrelated changes. Likely your last merge was botched somehow.

@artie2000
Copy link
Collaborator Author

Uhh
I think I messed up the diff somehow
I was just trying to rebase onto the latest changes

@artie2000 artie2000 force-pushed the artie2000-sq-advanced branch from 9d9d7f8 to 406491e Compare December 28, 2024 19:26
@artie2000
Copy link
Collaborator Author

What about a file under Algebra.Order.Group? Also note that the diff currently contains unrelated changes. Likely your last merge was botched somehow.

The lemma this is a variation on (mul_self_nonneg) is in Algebra.Order.Ring.Unbundled.Basic. However, import restrictions prevent me from putting the lemma directly into that file (Group.Even imports MonoidHom). Other files such as Algebra.Order.Ring.Basic are about bundled order typeclasses. I've put it at the top of Algebra.Order.Ring.Basic for now, but this doesn't feel like the right solution.

@YaelDillies
Copy link
Collaborator

I see you fiddle with Mathlib.lean quite a lot. Do you know about lake exe mk_all?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants