reserve x,y,y1,y2 for set;
reserve G for Group;
reserve a,b,c,d,g,h for Element of G;
reserve A,B,C,D for Subset of G;
reserve H,H1,H2,H3 for Subgroup of G;
reserve n for Nat;
reserve i for Integer;

theorem Th71:
  Index H = Index(H |^ a)
proof
  defpred P[object,object] means
   ex b st $1 = b * H & $2 = (b |^ a) * (H |^ a);
A1: for x being object st x in Left_Cosets H ex y being object st P[x,y]
  proof
    let x be object;
    assume x in Left_Cosets H;
    then consider b such that
A2: x = b * H by GROUP_2:def 15;
    reconsider y = (b |^ a) * (H |^ a) as set;
    take y;
    take b;
    thus thesis by A2;
  end;
  consider f being Function such that
A3: dom f = Left_Cosets H and
A4: for x being object st x in Left_Cosets H holds P[x,f.x]
from CLASSES1:sch 1(A1);
A5: for x,y1,y2 st x in Left_Cosets H & P[x,y1] & P[x,y2] holds y1 = y2
  proof
    set A = carr H;
    let x,y1,y2;
    assume x in Left_Cosets H;
    given b such that
A6: x = b * H and
A7: y1 = (b |^ a) * (H |^ a);
    given c such that
A8: x = c * H and
A9: y2 = (c |^ a) * (H |^ a);
    thus y1 = (a" * b * a) * (a" * H * a) by A7,Th59
      .= (a" * b * a) * (a" * A) * a by GROUP_2:33
      .= (a" * b) * (a * (a" * A)) * a by GROUP_2:32
      .= a" * b * (a * a" * A) * a by GROUP_2:32
      .= a" * b * (1_G * A) * a by GROUP_1:def 5
      .= a" * b * A * a by GROUP_2:37
      .= a" * (c * H) * a by A6,A8,GROUP_2:32
      .= a" * c * A * a by GROUP_2:32
      .= a" * c * (1_G * A) * a by GROUP_2:37
      .= a" * c * (a * a" * A) * a by GROUP_1:def 5
      .= (a" * c) * (a * (a" * A)) * a by GROUP_2:32
      .= (a" * c * a) * (a" * A) * a by GROUP_2:32
      .= (a" * c * a) * (a" * H * a) by GROUP_2:33
      .= y2 by A9,Th59;
  end;
A10: rng f = Left_Cosets(H |^ a)
  proof
    thus rng f c= Left_Cosets(H |^ a)
    proof
      let x be object;
      assume x in rng f;
      then consider y being object such that
A11:  y in dom f & f.y = x by FUNCT_1:def 3;
      ex b st y = b * H & x = (b |^ a) * (H |^ a) by A3,A4,A11;
      hence thesis by GROUP_2:def 15;
    end;
    let x be object;
    assume x in Left_Cosets(H |^ a);
    then consider b such that
A12: x = b * (H |^ a) by GROUP_2:def 15;
    set c = b |^ a";
A13: x = (c |^ a) * (H |^ a) by A12,Th25;
A14: c * H in Left_Cosets H by GROUP_2:def 15;
    then consider d such that
A15: c * H = d * H and
A16: f.(c * H) = (d |^ a) * (H |^ a) by A4;
    (c |^ a) * (H |^ a) = (d |^ a) * (H |^ a) by A5,A14,A15;
    hence thesis by A3,A13,A14,A16,FUNCT_1:def 3;
  end;
  f is one-to-one
  proof
    let x,y be object;
    assume that
A17: x in dom f and
A18: y in dom f and
A19: f.x = f.y;
    consider c such that
A20: y = c * H and
A21: f.y = (c |^ a) * (H |^ a) by A3,A4,A18;
    consider b such that
A22: x = b * H and
A23: f.x = (b |^ a) * (H |^ a) by A3,A4,A17;
A24: (c |^ a)" * (b |^ a) = (c" |^ a) * (b |^ a) by Th26
      .= (c" * b) |^ a by Th23;
    (c |^ a)" * (b |^ a) in H |^ a by A19,A23,A21,GROUP_2:114;
    then consider d such that
A25: (c" * b) |^ a = d |^ a and
A26: d in H by A24,Th58;
    c" * b = d by A25,Th16;
    hence thesis by A22,A20,A26,GROUP_2:114;
  end;
  then Left_Cosets H,Left_Cosets(H |^ a) are_equipotent by A3,A10,
WELLORD2:def 4;
  hence thesis by CARD_1:5;
end;
