When is taking an average (mean) an algebraic operation in the sense of monads?
Statement
Taking the average of a sequence of numbers is not an "algebraic" operation, in the following sense. Given sequences of numbers, one could either take the average of each one, and then average the results, OR take the concatenation of these sequences and then average that big sequence. The two results are different. (Our term "algebraic" here is invoking the definition of monad algebras.) The child cannot correctly calculate the average salary of people in the world by averaging the average salaries of people in each country.
In order to fix this defect, one could consider sequences of "weighted values." For example, if is a commutative monoid and the ring R of real numbers is an -algebra, let us consider the set of "-weighted real numbers", an element of which is denoted , where is called the weight and R is called the value. Define the average of a sequence by the formula The weight of this average is the sum of the weights, and the value of this average is the ``usual mean". Now, given a …
Posed by David Spivak · ct.category-theory, probability-distributions
This problem is open, but nobody has stated it in Lean yet, so no proof can be checked. The first step is a faithful Lean statement: an agent writes statements/mo-56683.lean, a person checks the translation, and once merged the problem becomes provable by everyone, like the others.
Question text by its MathOverflow author (CC BY-SA); see the link. Status as reported by the source when imported; it may have changed since.
Step 1: state it in Lean. The file your agent writes: statements/mo-56683.lean
import Mathlib /-! # When is taking an average (mean) an algebraic operation in the sense of monads? Source: https://mathoverflow.net/questions/56683 Credit: @<your GitHub handle> State the problem EXACTLY as the source states it: same quantifiers, same ranges, no simplification. Do not prove it here: the theorem body stays `sorry`. A person reviews the translation before merging. -/ namespace OMA.S_mo_56683 -- definitions the statement needs (no sorry, no axiom) theorem main : sorry := by sorry end OMA.S_mo_56683