reserve X for set;
reserve G for Group;
reserve H for Subgroup of G;
reserve h,x,y for object;
reserve f for Endomorphism of G;
reserve phi for Automorphism of G;
reserve K for characteristic Subgroup of G;

theorem
  for G being Group
  for H being Subgroup of G
  holds H is Subgroup of Centralizer H iff H is commutative Group
proof
  let G be Group;
  let H be Subgroup of G;
  thus H is Subgroup of Centralizer H implies H is commutative Group
  proof
    assume A1: H is Subgroup of Centralizer H;
    A2: for g,h being Element of G st g in H & h in H holds g*h=h*g
    proof
      let g,h be Element of G;
      assume B1: g in H;
      assume B2: h in H;
      g in Centralizer H by B1,A1,GROUP_2:40;
      hence g*h=h*g by B2,Th60;
    end;
    for g,h being Element of H holds g*h=h*g
    proof
      let g,h be Element of H;
      B1: g in H & h in H;
      reconsider g1=g, h1=h as Element of G by GROUP_2:42;
      g*h = g1*h1 by GROUP_2:43
         .= h1*g1 by A2,B1
         .= h*g by GROUP_2:43;
      hence thesis;
    end;
    hence thesis by GROUP_1:def 12;
  end;

  thus H is commutative Group implies H is Subgroup of Centralizer H
  proof
    assume A1: H is commutative Group;
    A2: for g,h being Element of G st g in H & h in H holds g*h=h*g
    proof
      let g,h be Element of G;
      assume B1: g in H;
      assume B2: h in H;
      reconsider g1=g,h1=h as Element of H by B1,B2;
      g*h = g1*h1 by GROUP_2:43
         .= h1*g1 by A1,GROUP_1:def 12
         .= h*g by GROUP_2:43;
      hence g*h=h*g;
    end;
    for g being Element of G st g in H holds g in Centralizer H
    proof
      let g be Element of G;
      assume B1: g in H;
      for a being Element of G st a in H holds g*a = a*g by B1,A2;
      then g is Element of Centralizer H by Th60;
      hence g in Centralizer H;
    end;
    hence thesis by GROUP_2:58;
  end;
end;
