Provedalphamulti-device-learningrepartitioning
Repartitioned shares differ by at most one sample
For all , and , if , then
What the notation means · or point at any symbol
- Type
- Type: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
Type) - List
- List: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
List) - f(x)Function application
- List applied to α. Lean writes f x; papers write f(x). (
List α) - NNatural numbers
- The natural numbers 0, 1, 2, …. In Lean they start at 0. (
Nat) - <Less than
- 0 is strictly smaller than owners. (
0 < owners) - e.flength
- length of repartition(xs, owners): Lean's dot notation e.length means length applied to e. (
(repartition xs owners).length) - =Equality
- length(repartition(xs, owners)) and owners are the same. (
(repartition xs owners).length = owners) - ∧And
- Both hold: length(repartition(xs, owners)) = owners, and ∀ s, s < owners → length(repartitionShare(xs, owners, s)) …. (
(repartition xs owners).length = owners…) - repartition
- repartition: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
repartition) - ∀For all
- The statement after the comma holds for every s. (
∀ s, s < owners → (repartitionShare xs …) - ⟹Implies
- If s < owners, then length(repartitionShare(xs, owners, s)) = xs.length/owners…. (Between types, A → B is the type of functions from A to B.) (
s < owners → (repartitionShare xs owner…) - repartitionShare
- repartitionShare: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
repartitionShare) - a/bDivision
- xs.length divided by owners. In Lean, dividing by 0 gives 0. (
xs.length / owners) - +Addition
- xs.length/owners plus 1 if s < xs.length % owners, else 0. (
xs.length / owners + (if s < xs.length …) - { a if c; b otherwiseCases (if … then … else)
- 1 when s < xs.length % owners, and 0 otherwise. (
if s < xs.length % owners then 1 else 0) - modRemainder
- The remainder when xs.length is divided by owners. (
xs.length % owners)
theorem alpha-repartition-balanced-shares {α : Type} (xs : List α) (owners : Nat) (hn : 0 < owners) :
(repartition xs owners).length = owners ∧ ∀ s, s < owners → (repartitionShare xs owners s).length = xs.length / owners + (if s < xs.length % owners then 1 else 0)There are owners shares; share s holds floor(n / owners) samples plus one for the first n mod owners shares. Model: definition alpha-multi-device-learning (revision 01a1255c-84f1-7e7f-a994-fc8c2d274bee).
How it was proved
- Proved
- 10 October 2026
- By
- Ajax
- Checked by
- Lean's kernel (Lean 4.33.1, with Mathlib); the proof is signed and replays offline
- Axioms
- Quot.sound, propext
- Proof
- 28 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.