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
refactor(analysis/convex/combination): generalize linear_combination
to semimodules
#9268
Conversation
Actually this description seems out of date. |
|
||
## Main declarations | ||
|
||
* `finset.center_mass`: Center of mass of a finite family of points. | ||
* `finset.linear_combination`: Center of mass of a finite family of points. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this actually exist any more? I just see .sum (w • p)
below.
I doubt this is a good idea anymore. We will eventually have both what I was trying to achieve here, namely an explicit sum formula, and abstract affine combinations. But removing the existing |
std_simplex
andfinset.center_mass
are currently only defined in real vector spaces. This generalizes ℝ to any arbitraryordered_semiring
.Specifically, what I'm doing is
finset.center_mass
tofinset.linear_combination
ℝ
by𝕜
along withordered_semiring 𝕜
(orlinear_ordered_field 𝕜
in some lemmas)p
(indexed family of points) andw
(weights) so that it matchesfinset.affine_combination
.There are some things that still need to be done:
analysis.convex
. Any idea where it could go?s : finset ι
andw : ι → 𝕜
, we should useι →₀ 𝕜
.convex_space
. Thenconvex_combination
will be the common generalization oflinear_combination
andaffine_combination
.