 reserve x for object;
 reserve G for non empty 1-sorted;
 reserve A for Subset of G;
 reserve y,y1,y2,Y,Z for set;
 reserve k for Nat;
 reserve G for Group;
 reserve a,g,h for Element of G;
 reserve A for Subset of G;
reserve G for non empty multMagma,
  A,B,C for Subset of G;
reserve a,b,g,g1,g2,h,h1,h2 for Element of G;
reserve G for Group-like non empty multMagma;
reserve h,g,g1,g2 for Element of G;
reserve A for Subset of G;
reserve H for Subgroup of G;
reserve h,h1,h2 for Element of H;
reserve G,G1,G2,G3 for Group;
reserve a,a1,a2,b,b1,b2,g,g1,g2 for Element of G;
reserve A,B for Subset of G;
reserve H,H1,H2,H3 for Subgroup of G;
reserve h,h1,h2 for Element of H;

theorem Th136:
  Left_Cosets H, Right_Cosets H are_equipotent
proof
  defpred P[object,object] means ex g st $1 = g * H & $2 = H * g";
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 g such that
A2: x = g * H by Def15;
    reconsider y = H * g" as set;
    take y;
    take g;
    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: rng f = Right_Cosets H
  proof
    thus rng f c= Right_Cosets H
    proof
      let x be object;
      assume x in rng f;
      then consider y being object such that
A6:   y in dom f and
A7:   f.y = x by FUNCT_1:def 3;
      ex g st y = g * H & f.y = H * g" by A3,A4,A6;
      hence thesis by A7,Def16;
    end;
    let x be object;
    assume
A8: x in Right_Cosets H;
    then reconsider A = x as Subset of G;
    consider g such that
A9: A = H * g by A8,Def16;
A10: g" * H in Left_Cosets H by Def15;
    then
A11: f.(g" * H) in rng f by A3,FUNCT_1:def 3;
    consider a such that
A12: g" * H = a * H and
A13: f.(g" * H) = H * a" by A4,A10;
    a" * g" in H by A12,Th114;
    hence thesis by A9,A11,A13,Th120;
  end;
  f is one-to-one
  proof
    let x,y be object;
    assume that
A14: x in dom f and
A15: y in dom f and
A16: f.x = f.y;
    consider b such that
A17: y = b * H and
A18: f.y = H * b" by A3,A4,A15;
    consider a such that
A19: x = a * H and
A20: f.x = H * a" by A3,A4,A14;
    b" * a"" in H by A16,A20,A18,Th120;
    hence thesis by A19,A17,Th114;
  end;
  hence thesis by A3,A5,WELLORD2:def 4;
end;
