
theorem Th10:
  for L being non empty multMagma, a being Element of L, p, q
  being FinSequence of the carrier of L holds a*(p^q) = (a*p)^(a*q)
proof
  let L be non empty multMagma, a be Element of L, p, q be FinSequence of the
  carrier of L;
A1: dom (a*(p^q)) = dom (p^q) by Def1;
A2: dom (a*q) = dom q by Def1;
  then
A3: len (a*q) = len q by FINSEQ_3:29;
A4: dom (a*p) = dom p by Def1;
  then
A5: len (a*p) = len p by FINSEQ_3:29;
A6: now
    let i be Nat;
    assume
A7: i in dom (a*(p^q));
    per cases by A1,A7,FINSEQ_1:25;
    suppose
A8:   i in dom p;
      thus (a*(p^q))/.i = a*((p^q)/.i) by A1,A7,Def1
        .= a*(p/.i) by A8,FINSEQ_4:68
        .= (a*p)/.i by A8,Def1
        .= ((a*p)^(a*q))/.i by A4,A8,FINSEQ_4:68;
    end;
    suppose
      ex n being Nat st n in dom q & i = len p+n;
      then consider n being Nat such that
A9:   n in dom q and
A10:  i = len p+n;
      thus (a*(p^q))/.i = a*((p^q)/.i) by A1,A7,Def1
        .= a*(q/.n) by A9,A10,FINSEQ_4:69
        .= (a*q)/.n by A9,Def1
        .= ((a*p)^(a*q))/.i by A5,A2,A9,A10,FINSEQ_4:69;
    end;
  end;
  len ((a*p)^(a*q)) = len (a*p) + len (a*q) by FINSEQ_1:22
    .= len (p^q) by A5,A3,FINSEQ_1:22;
  then dom (a*(p^q)) = dom ((a*p)^(a*q)) by A1,FINSEQ_3:29;
  hence thesis by A6,FINSEQ_5:12;
end;
