Skip to content

[Merged by Bors] - feat(Geometry/Convex): modules are convex spaces#39531

Closed
YaelDillies wants to merge 4 commits into
leanprover-community:masterfrom
YaelDillies:convex_space_module
Closed

[Merged by Bors] - feat(Geometry/Convex): modules are convex spaces#39531
YaelDillies wants to merge 4 commits into
leanprover-community:masterfrom
YaelDillies:convex_space_module

Conversation

@YaelDillies

Copy link
Copy Markdown
Contributor

Show that every semimodule over an ordered semiring is a convex space.

It is sadly impossible to make this a global instance since it creates diamonds with structural instances such as ConvexSpace R X → ConvexSpace R Y → ConvexSpace R (X × Y) because (∑ i, f i).fst = ∑ i, (f i).fst isn't defeq, ultimately because Finset.sum isn't a field of AddCommMonoid.


Open in Gitpod

@github-actions

github-actions Bot commented May 18, 2026

Copy link
Copy Markdown

PR summary f6e2fcbfe6

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.Analysis.Convex.MetricSpace 1490 1492 +2 (+0.13%)
Import changes for all files
Files Import difference
Mathlib.Analysis.Convex.MetricSpace 2
Mathlib.Geometry.Convex.ConvexSpace.Module (new file) 1033

Declarations diff

+ ConvexSpace.ofModule
+ IsModuleConvexSpace
+ IsModuleConvexSpace.ofModule
+ convexCombPair_eq_sum
+ convexSpaceSelf
+ fst_convexCombPair
+ iConvexComb_apply
+ iConvexComb_reindex
+ instance : ConvexSpace R (ι →₀ X) := .mk
+ instance [ConvexSpace R N] [IsModuleConvexSpace R N] : IsModuleConvexSpace R (M × N)
+ instance {ι : Type*} : IsModuleConvexSpace R (ι →₀ M)
+ instance {ι : Type*} {M : ι → Type*} [∀ i, AddCommMonoid (M i)] [∀ i, Module R (M i)]
+ isAffineMap_eval
+ isModuleConvexSpace_self
+ onFinsetSupport
+ sConvexComb_apply
+ snd_convexCombPair
++ convexCombPair_apply
- convexCombPair_eq_add
- sConvexComb_eq_sum

You can run this locally as follows
## from your `mathlib4` directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci

## summary with just the declaration names:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh <optional_commit>

## more verbose report:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh long <optional_commit>

The doc-module for scripts/pr_summary/declarations_diff.sh in the mathlib-ci repository contains some details about this script.


No changes to strong technical debt.
No changes to weak technical debt.

@github-actions github-actions Bot added the t-convex-geometry Affine geometry, cones, simplices label May 18, 2026
@YaelDillies
YaelDillies requested a review from ocfnash May 18, 2026 14:34
Comment thread Mathlib/Geometry/Convex/ConvexSpace/Defs.lean Outdated
Comment thread Mathlib/LinearAlgebra/Finsupp/Pi.lean Outdated
Comment thread Mathlib/Geometry/Convex/ConvexSpace/Defs.lean
Comment thread Mathlib/Geometry/Convex/ConvexSpace/Module.lean Outdated
Comment thread Mathlib/Geometry/Convex/ConvexSpace/Module.lean Outdated
@ocfnash ocfnash added the awaiting-author A reviewer has asked the author a question or requested changes. label May 18, 2026
@YaelDillies
YaelDillies force-pushed the convex_space_module branch from 6cabf9d to a7bbdb4 Compare May 19, 2026 12:22
@YaelDillies YaelDillies removed the awaiting-author A reviewer has asked the author a question or requested changes. label May 19, 2026
@YaelDillies
YaelDillies force-pushed the convex_space_module branch from c985d0e to e718c92 Compare May 20, 2026 10:39
@ocfnash

ocfnash commented May 20, 2026

Copy link
Copy Markdown
Contributor

bors merge

mathlib-bors Bot pushed a commit that referenced this pull request May 20, 2026
Show that every semimodule over an ordered semiring is a convex space.

It is sadly impossible to make this a global instance since it creates diamonds with structural instances such as `ConvexSpace R X → ConvexSpace R Y → ConvexSpace R (X × Y)` because `(∑ i, f i).fst = ∑ i, (f i).fst` isn't defeq, ultimately because `Finset.sum` isn't a field of `AddCommMonoid`.
@mathlib-triage mathlib-triage Bot added the ready-to-merge This PR has been sent to bors. label May 20, 2026
@mathlib-bors

mathlib-bors Bot commented May 20, 2026

Copy link
Copy Markdown
Contributor

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors Bot changed the title feat(Geometry/Convex): modules are convex spaces [Merged by Bors] - feat(Geometry/Convex): modules are convex spaces May 20, 2026
@mathlib-bors mathlib-bors Bot closed this May 20, 2026
@YaelDillies
YaelDillies deleted the convex_space_module branch May 20, 2026 17:47
RaggedR pushed a commit to RaggedR/mathlib4 that referenced this pull request May 22, 2026
…y#39531)

Show that every semimodule over an ordered semiring is a convex space.

It is sadly impossible to make this a global instance since it creates diamonds with structural instances such as `ConvexSpace R X → ConvexSpace R Y → ConvexSpace R (X × Y)` because `(∑ i, f i).fst = ∑ i, (f i).fst` isn't defeq, ultimately because `Finset.sum` isn't a field of `AddCommMonoid`.
b-mehta pushed a commit to b-mehta/mathlib4 that referenced this pull request Jun 2, 2026
…y#39531)

Show that every semimodule over an ordered semiring is a convex space.

It is sadly impossible to make this a global instance since it creates diamonds with structural instances such as `ConvexSpace R X → ConvexSpace R Y → ConvexSpace R (X × Y)` because `(∑ i, f i).fst = ∑ i, (f i).fst` isn't defeq, ultimately because `Finset.sum` isn't a field of `AddCommMonoid`.
Bergschaf pushed a commit to Bergschaf/mathlib4 that referenced this pull request Jun 3, 2026
…y#39531)

Show that every semimodule over an ordered semiring is a convex space.

It is sadly impossible to make this a global instance since it creates diamonds with structural instances such as `ConvexSpace R X → ConvexSpace R Y → ConvexSpace R (X × Y)` because `(∑ i, f i).fst = ∑ i, (f i).fst` isn't defeq, ultimately because `Finset.sum` isn't a field of `AddCommMonoid`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge This PR has been sent to bors. t-convex-geometry Affine geometry, cones, simplices

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants