
theorem Th45:
  for G be Group,
      H be Subgroup of G,
      a be FinSequence of G,
      b be FinSequence of H
  st a = b
  holds Product a = Product b
  proof
    let G be Group, H be Subgroup of G;
    defpred P[Nat] means
    for a be FinSequence of G,
        b be FinSequence of H
    st len a = $1 & a = b
    holds Product a = Product b;
    A1: P[0]
    proof
      let a be FinSequence of G,
          b be FinSequence of H;
      assume len a = 0 & a = b; then
      a = <*>([#]G) & b = <*>([#]H); then
      Product a = 1_G & Product b = 1_H by GROUP_4:8;
      hence Product a = Product b by GROUP_2:44;
    end;
    A4: for k be Nat st P[k] holds P[k+1]
    proof
      let k be Nat;
      assume
      A5: P[k];
      let a be FinSequence of G, b be FinSequence of H;
      assume
      A6: len a = k+1 & a = b;
      reconsider g = a/.(k+1) as Element of G;
      reconsider i = b/.(k+1) as Element of H;
      reconsider a0 = a|k as FinSequence of G;
      reconsider b0 = b|k as FinSequence of H;
      k+1 in Seg(k+1) by FINSEQ_1:4; then
      A7: k+1 in dom a by A6,FINSEQ_1:def 3; then
      A8: a/.(k+1) = a.(k+1) by PARTFUN1:def 6;
      k+1 in Seg(k+1) by FINSEQ_1:4; then
      A9: k+1 in dom b by A6,FINSEQ_1:def 3; then
      A10: b/.(k+1) = b.(k+1) by PARTFUN1:def 6;
      k <= len a & k <= len b by A6,XREAL_1:31; then
      len a0 = k & len b0 = k by FINSEQ_1:17; then
      A13: Product a0 = Product b0 by A5,A6;
      A14: g = a.(k+1) by A7,PARTFUN1:def 6
            .= i by A6,A9,PARTFUN1:def 6;
      thus Product a = Product(a0^<*g*>) by A6,A8,FINSEQ_3:55
                    .= (Product a0) * g by GROUP_4:6
                    .= (Product b0) * i by A13,A14,GROUP_2:43
                    .= Product (b0^<*i*>) by GROUP_4:6
                    .= Product b by A6,A10,FINSEQ_3:55;
    end;
    for k be Nat holds P[k] from NAT_1:sch 2(A1,A4);
    hence thesis;
  end;
