
theorem HetHomo:
  for f being real-valued FinSequence st
    Het f = 0 holds f is homogeneous
  proof
    let f be real-valued FinSequence;
    assume
A1: Het f = 0;
    set X = { n where n is Nat : n in dom f & f.n <> Mean f };
    assume
a4: f is heterogeneous;
A5: for n being Nat st n in dom f holds f.n = Mean f
    proof
      let n be Nat;
      assume
A2:   n in dom f;
      f.n = Mean f
      proof
        assume f.n <> Mean f; then
        n in X by A2;
        hence thesis by A1;
      end;
      hence thesis;
    end;
    for x, y being object st x in dom f & y in dom f holds f.x = f.y
    proof
      let x,y be object;
      assume
B1:   x in dom f & y in dom f; then
      reconsider xx = x, yy = y as Nat;
      f.xx = Mean f by A5,B1;
      hence thesis by A5,B1;
    end;
    hence thesis by a4;
  end;
