Skip to content

[Merged by Bors] - feat(LinearAlgebra/LinearIndependent): linearIndependent_iffₒₛ etc for linearly and canonically ordered semiring - #27341

Closed
staroperator wants to merge 18 commits into
leanprover-community:masterfrom
staroperator:linearIndependent_OrderedSub
Closed

staroperator wants to merge 18 commits into
leanprover-community:masterfrom
staroperator:linearIndependent_OrderedSub

Conversation

@staroperator

@staroperator staroperator commented Jul 22, 2025 •

Copy link
Copy Markdown
Collaborator

If the semiring R is linearly and canonically ordered (e.g. R = ℕ), LinearIndependent can be proved from linear combination over two disjoint sets.

This result is stronger than linearIndependent_iff'ₛ and is particularly useful in #27342.



Open in Gitpod

@github-actions

github-actions Bot commented Jul 22, 2025 •

Copy link
Copy Markdown

PR summary 88e5ab07ce

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.LinearAlgebra.LinearIndependent.Defs 811 812 +1 (+0.12%)
Import changes for all files
Files Import difference
12 files Mathlib.Algebra.SkewMonoidAlgebra.Basic Mathlib.LinearAlgebra.Basis.Basic Mathlib.LinearAlgebra.Basis.Exact Mathlib.LinearAlgebra.Basis.Fin Mathlib.LinearAlgebra.Basis.Flag Mathlib.LinearAlgebra.Basis.Prod Mathlib.LinearAlgebra.Basis.SMul Mathlib.LinearAlgebra.Basis.Submodule Mathlib.LinearAlgebra.FreeModule.Basic Mathlib.LinearAlgebra.LinearIndependent.Basic Mathlib.LinearAlgebra.LinearIndependent.Defs Mathlib.RingTheory.AlgebraTower
1

Declarations diff

+ Fintype.linearIndependent_iffₒₛ
+ Fintype.not_linearIndependent_iffₒₛ
+ linearIndepOn_finset_iffₒₛ
+ linearIndependent_iffₒₛ
+ not_linearIndepOn_finset_iffₒₛ
+ not_linearIndependent_iffₒₛ

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 the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Jul 22, 2025
@staroperator staroperator added the t-algebra Algebra (groups, rings, fields, etc) label Jul 22, 2025
@mathlib4-dependent-issues-bot mathlib4-dependent-issues-bot removed the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Jul 23, 2025
@j-loreaux j-loreaux added the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Jul 26, 2025
@staroperator staroperator removed the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Jul 28, 2025
@mathlib4-dependent-issues-bot mathlib4-dependent-issues-bot added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Jul 29, 2025
@staroperator
staroperator force-pushed the linearIndependent_OrderedSub branch 2 times, most recently from 7ae6b4c to be55f68 Compare August 22, 2025 23:18
Comment thread Mathlib/Algebra/Order/Sub/Basic.lean Resolved
Comment thread Mathlib/Algebra/Order/Sub/Basic.lean Resolved
Comment on lines +220 to +228
· have := (exists_add_of_le h).choose_spec
rw [this] at h
conv_rhs => rw [this, add_comm]
rw [add_le_add_iff_right]
· rw [not_le] at h
constructor <;> intro h'
· simpa using add_le_add h' h.le
· exact zero_le c

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.

This can probably be golfed

@YaelDillies YaelDillies added the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Aug 23, 2025
@staroperator
staroperator force-pushed the linearIndependent_OrderedSub branch from a238f7a to c8d7e6b Compare August 23, 2025 15:11
@staroperator staroperator added awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. and removed awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. labels Aug 23, 2025
@github-actions github-actions Bot removed the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Aug 23, 2025
mathlib-bors Bot pushed a commit that referenced this pull request Aug 24, 2025
…ered monoid (#27639)

There is a `Sub` structure for linearly canonically ordered monoid using choice that satisfies `OrderedSub`.

Thanks eric-wieser for the suggestion in #27341!
@mathlib4-dependent-issues-bot mathlib4-dependent-issues-bot removed the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Aug 24, 2025
@staroperator
staroperator force-pushed the linearIndependent_OrderedSub branch from 5132f90 to c280a6d Compare August 24, 2025 22:20
pechersky pushed a commit to pechersky/mathlib4 that referenced this pull request Aug 25, 2025
…ered monoid (leanprover-community#27639)

There is a `Sub` structure for linearly canonically ordered monoid using choice that satisfies `OrderedSub`.

Thanks eric-wieser for the suggestion in leanprover-community#27341!

@YaelDillies YaelDillies left a comment

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.

Thanks!

maintainer delegate

@github-actions

Copy link
Copy Markdown

🚀 Pull request has been placed on the maintainer queue by YaelDillies.

@ghost ghost added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Aug 25, 2025
@staroperator staroperator changed the title feat(LinearAlgebra/LinearIndependent): linearIndependent_iffₒ etc for canonically linearly ordered semiring feat(LinearAlgebra/LinearIndependent): linearIndependent_iffₒₛ etc for linearly and canonically ordered semiring Aug 25, 2025
@JovanGerb

Copy link
Copy Markdown
Contributor

What does the ₒ stand for in the theorem names? There are no other theorem names in mathlib that contain a subscript o.

@staroperator

Copy link
Copy Markdown
Collaborator Author

What does the ₒ stand for in the theorem names? There are no other theorem names in mathlib that contain a subscript o.

ₒ is for "ordered". This is to follow the existing ₛ ended theorems...

@JovanGerb

Copy link
Copy Markdown
Contributor

LGTM, I golfed the proofs a bit:

  • I removed some unexpected · tactic focuses
  • replaced refine Finset.sum_congr with the congr! tactic.
  • replaced a big simp call with set_option push_neg.use_distrib true in push_neg

@riccardobrasca

Copy link
Copy Markdown
Member

Thanks!

bors d+

@mathlib-bors

mathlib-bors Bot commented Aug 26, 2025

Copy link
Copy Markdown
Contributor

✌️ staroperator 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 delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). and removed maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. labels Aug 26, 2025
@staroperator

Copy link
Copy Markdown
Collaborator Author

bors r+

mathlib-bors Bot pushed a commit that referenced this pull request Aug 27, 2025
…for linearly and canonically ordered semiring (#27341)

If the semiring `R` is linearly and canonically ordered (e.g. `R = ℕ`), `LinearIndependent` can be proved from linear combination over two disjoint sets.

This result is stronger than `linearIndependent_iff'ₛ` and is particularly useful in #27342.

Co-authored-by: staroperator <[email protected]>
Co-authored-by: Jovan Gerbscheid <[email protected]>
@mathlib-bors

mathlib-bors Bot commented Aug 27, 2025

Copy link
Copy Markdown
Contributor

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors Bot changed the title feat(LinearAlgebra/LinearIndependent): linearIndependent_iffₒₛ etc for linearly and canonically ordered semiring [Merged by Bors] - feat(LinearAlgebra/LinearIndependent): linearIndependent_iffₒₛ etc for linearly and canonically ordered semiring Aug 27, 2025
@mathlib-bors mathlib-bors Bot closed this Aug 27, 2025
FormulaRabbit81 pushed a commit to YaelDillies/mathlib4 that referenced this pull request Aug 30, 2025
…ered monoid (leanprover-community#27639)

There is a `Sub` structure for linearly canonically ordered monoid using choice that satisfies `OrderedSub`.

Thanks eric-wieser for the suggestion in leanprover-community#27341!
FormulaRabbit81 pushed a commit to YaelDillies/mathlib4 that referenced this pull request Aug 30, 2025
…for linearly and canonically ordered semiring (leanprover-community#27341)

If the semiring `R` is linearly and canonically ordered (e.g. `R = ℕ`), `LinearIndependent` can be proved from linear combination over two disjoint sets.

This result is stronger than `linearIndependent_iff'ₛ` and is particularly useful in leanprover-community#27342.

Co-authored-by: staroperator <[email protected]>
Co-authored-by: Jovan Gerbscheid <[email protected]>
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.

7 participants