Skip to content

[Merged by Bors] - feat: s⁻¹.encard = s.encard#19400

Closed
YaelDillies wants to merge 2 commits intomasterfrom
encard_inv
Closed

[Merged by Bors] - feat: s⁻¹.encard = s.encard#19400
YaelDillies wants to merge 2 commits intomasterfrom
encard_inv

Conversation

@YaelDillies
Copy link
Copy Markdown
Contributor

From Kneser (LeanCamCombi)


Open in Gitpod

From Kneser (LeanCamCombi)
@YaelDillies YaelDillies added the t-algebra Algebra (groups, rings, fields, etc) label Nov 23, 2024
@YaelDillies YaelDillies requested a review from b-mehta November 23, 2024 11:49
@github-actions
Copy link
Copy Markdown

github-actions bot commented Nov 23, 2024

PR summary 41d5dffad1

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.Algebra.Group.Pointwise.Set.Card 750 751 +1 (+0.13%)
Import changes for all files
Files Import difference
Mathlib.Algebra.Group.Pointwise.Set.Card Mathlib.RingTheory.Adjoin.Dimension 1

Declarations diff

+ encard_inv
+ encard_smul_set
+ ncard_inv
+ ncard_smul_set

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).

Comment on lines 51 to 57
@[to_additive (attr := simp)]
lemma encard_inv (s : Set G) : s⁻¹.encard = s.encard := by simp [encard, PartENat.card]

@[to_additive (attr := simp)]
lemma ncard_inv (s : Set G) : s⁻¹.ncard = s.ncard := by simp [ncard]

@[to_additive (attr := deprecated (since := "2024-09-30"))] alias card_inv := natCard_inv
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.

Suggested change
@[to_additive (attr := simp)]
lemma encard_inv (s : Set G) : s⁻¹.encard = s.encard := by simp [encard, PartENat.card]
@[to_additive (attr := simp)]
lemma ncard_inv (s : Set G) : s⁻¹.ncard = s.ncard := by simp [ncard]
@[to_additive (attr := deprecated (since := "2024-09-30"))] alias card_inv := natCard_inv
@[to_additive (attr := deprecated (since := "2024-09-30"))] alias card_inv := natCard_inv
@[to_additive (attr := simp)]
lemma encard_inv (s : Set G) : s⁻¹.encard = s.encard := by simp [encard, PartENat.card]
@[to_additive (attr := simp)]
lemma ncard_inv (s : Set G) : s⁻¹.ncard = s.ncard := by simp [ncard]

to keep the alias closer

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I was purposefully flushing the aliases to the bottom because they are mostly just noise. What's your rationale for wanting aliases closer to the declaration they already reference?

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.

Since they reference the declaration, it's easier to identify which lemma is being referenced rather than needing to scroll to find it. In addition, in the docs, it's useful to have these lemmas next to each other rather than having other things in between.

Copy link
Copy Markdown
Contributor

@b-mehta b-mehta left a comment

Choose a reason for hiding this comment

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

bors d+

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Nov 23, 2024

✌️ YaelDillies can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@ghost ghost added the delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). label Nov 23, 2024
@YaelDillies
Copy link
Copy Markdown
Contributor Author

bors merge

mathlib-bors bot pushed a commit that referenced this pull request Nov 23, 2024
From Kneser (LeanCamCombi)
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Nov 23, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat: s⁻¹.encard = s.encard [Merged by Bors] - feat: s⁻¹.encard = s.encard Nov 23, 2024
@mathlib-bors mathlib-bors bot closed this Nov 23, 2024
@mathlib-bors mathlib-bors bot deleted the encard_inv branch November 23, 2024 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). t-algebra Algebra (groups, rings, fields, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants