Section FinGroup.
Variables (R : numDomainType) (gT : finGroupType).
Implicit Types G : {group gT}.
Definition midf_lte := (midf_le, midf_lt).
(* The AGM, unscaled but without the nth root. *)

Lemma leif_AGM (I : finType) (A : {pred I}) (E : I -> F) :
let n := #|A| in let mu := (\sum_(i in A) E i) / n%:R in
{in A, forall i, 0 <= E i} ->
\prod_(i in A) E i <= mu ^+ n
?= iff [forall i in A, forall j in A, E i == E j].