Skip to content

[Merged by Bors] - feat: Field, FiniteDimensional and Algebra.IsSeparable instances for WithAbs#27974

Closed
smmercuri wants to merge 3 commits intoleanprover-community:masterfrom
smmercuri:smmercuri/WithAbsFieldInstances
Closed

[Merged by Bors] - feat: Field, FiniteDimensional and Algebra.IsSeparable instances for WithAbs#27974
smmercuri wants to merge 3 commits intoleanprover-community:masterfrom
smmercuri:smmercuri/WithAbsFieldInstances

Conversation

@smmercuri
Copy link
Copy Markdown
Collaborator

This PR continues the work from #24870.

Original PR: #24870

@github-actions github-actions bot added large-import Automatically added label for PRs with a significant increase in transitive imports t-analysis Analysis (normed *, calculus) labels Aug 5, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Aug 5, 2025

PR summary 25b3be17c7

Import changes exceeding 2%

% File
+19.03% Mathlib.Analysis.Normed.Field.WithAbs

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.Analysis.Normed.Field.WithAbs 1608 1914 +306 (+19.03%)
Import changes for all files
Files Import difference
Mathlib.Analysis.Normed.Field.WithAbs 306

Declarations diff

+ instField
+ instance [Algebra R R'] [Algebra.IsSeparable R R'] (v : AbsoluteValue R S) :
+ instance [Module R R'] [FiniteDimensional R R'] (v : AbsoluteValue R S) :

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

@j-loreaux
Copy link
Copy Markdown
Contributor

Can you justify the big import increase? I have a potential justification, but I'd like to hear yours first.

@j-loreaux j-loreaux added the awaiting-author A reviewer has asked the author a question or requested changes. label Aug 16, 2025
@smmercuri
Copy link
Copy Markdown
Collaborator Author

Can you justify the big import increase? I have a potential justification, but I'd like to hear yours first.

I think it makes sense to have these instances on WithAbs in Normed/Field/WithAbs.lean because this file mostly concerns field extensions using WithAbs and typically one cares about finite separable extensions. The alternative, placing FiniteDimensional and IsSeparable instances in separate file(s), would require those files to import Normed.Field.WithAbs, which I'm not sure is better. What do you think?

@smmercuri smmercuri removed the awaiting-author A reviewer has asked the author a question or requested changes. label Oct 7, 2025
@j-loreaux
Copy link
Copy Markdown
Contributor

j-loreaux commented Oct 18, 2025

That's a reasonable stance. My argument was: this file is small anyway, and so it maybe is reasonable to think that it didn't have all the necessary imports to do basic things. Moreover, and perhaps most importantly: this has zero impact on downstream files, as all files which import this file already import the new one transitively.

@j-loreaux
Copy link
Copy Markdown
Contributor

bors merge

@ghost ghost added the ready-to-merge This PR has been sent to bors. label Oct 18, 2025
mathlib-bors bot pushed a commit that referenced this pull request Oct 18, 2025
…s for `WithAbs` (#27974)

This PR continues the work from #24870.

Original PR: #24870
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Oct 18, 2025

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat: Field, FiniteDimensional and Algebra.IsSeparable instances for WithAbs [Merged by Bors] - feat: Field, FiniteDimensional and Algebra.IsSeparable instances for WithAbs Oct 18, 2025
@mathlib-bors mathlib-bors bot closed this Oct 18, 2025
Jlh18 pushed a commit to Jlh18/mathlib4 that referenced this pull request Oct 24, 2025
BeibeiX0 pushed a commit to BeibeiX0/mathlib4 that referenced this pull request Nov 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

large-import Automatically added label for PRs with a significant increase in transitive imports ready-to-merge This PR has been sent to bors. t-analysis Analysis (normed *, calculus)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants