
theorem Th24:
  for R, S being add-associative right_zeroed right_complementable
  non empty doubleLoopStr, F being non empty Subset of R, G being non empty
  Subset of S, P being Function of R, S, lc being LinearCombination of F, LC
  being LinearCombination of G, E being FinSequence of [:the carrier of R, the
carrier of R, the carrier of R:] st P is RingHomomorphism & len lc = len LC & E
represents lc & (for i being set st i in dom LC
   holds LC.i = (P.((E/.i)`1_3))*(P.((E /.i)`2_3))*(P.((E/.i)`3_3)))
   holds P.(Sum lc) = Sum LC
proof
  let R, S be add-associative right_zeroed right_complementable non empty
  doubleLoopStr, F be non empty Subset of R, G be non empty Subset of S, P be
Function of R,S, lc be LinearCombination of F, LC be LinearCombination of G, E
be FinSequence of [:the carrier of R, the carrier of R, the carrier of R:] such
  that
A1: P is RingHomomorphism and
A2: len lc = len LC and
A3: E represents lc and
A4: for i being set st i in dom LC
   holds LC.i = (P.((E/.i)`1_3))*(P.((E/.i)`2_3))*(P.((E/.i)`3_3));
  defpred P[Nat] means for lc9 being LinearCombination of F, LC9
being LinearCombination of G st lc9 = lc|Seg $1 & LC9 = LC|Seg $1 holds P.(Sum
  lc9) = Sum LC9;
A5: P is additive multiplicative by A1;
A6: dom lc = dom LC by A2,FINSEQ_3:29;
A7: for k being Nat st P[k] holds P[k+1]
  proof
    let k be Nat;
    assume
A8: P[k];
    thus P[k+1]
    proof
      let lc9 be LinearCombination of F, LC9 be LinearCombination of G;
      assume that
A9:   lc9 = lc| Seg (k+1) and
A10:  LC9 = LC|Seg (k+1);
      per cases;
      suppose
A11:    len lc < k+1;
        then
A12:    len lc <= k by NAT_1:13;
A13:    lc9 = lc by A9,A11,FINSEQ_3:49
          .= lc|Seg k by A12,FINSEQ_3:49;
        LC9 = LC by A2,A10,A11,FINSEQ_3:49
          .= LC|Seg k by A2,A12,FINSEQ_3:49;
        hence thesis by A8,A13;
      end;
      suppose
A14:    len lc >= k+1;
        set i = k+1;
        reconsider LCk = LC|Seg k as LinearCombination of G by IDEAL_1:41;
        reconsider lck = lc|Seg k as LinearCombination of F by IDEAL_1:41;
        1 <= k+1 by NAT_1:11;
        then
A15:    k+1 in dom lc by A14,FINSEQ_3:25;
        then
A16:    lc.(k+1) = lc/.(k+1) by PARTFUN1:def 6;
A17:    LC.(k+1) = LC/.(k+1) by A6,A15,PARTFUN1:def 6;
        lc|Seg (k+1) = lck^<*lc.(k+1)*> by A15,FINSEQ_5:10;
        hence P.(Sum lc9) = P.((Sum lck)+lc/.(k+1)) by A9,A16,FVSUM_1:71
          .= P.(Sum lck)+P.(lc/.(k+1)) by A5
          .= (Sum LCk)+P.(lc/.(k+1)) by A8
          .= (Sum LCk)+P.(((E/.i)`1_3)*((E/.i)`2_3)*((E/.i)`3_3))
                   by A3,A15,A16
          .= (Sum LCk)+P.(((E/.i)`1_3)*((E/.i)`2_3))*P.((E/.i)`3_3)
                   by A5
          .= (Sum LCk)+P.((E/.i)`1_3)*P.((E/.i)`2_3)*P.((E/.i)`3_3)
                  by A5
          .= (Sum LCk)+LC/.(k+1) by A4,A6,A15,A17
          .= Sum (LCk^<*LC/.(k+1)*>) by FVSUM_1:71
          .= Sum LC9 by A6,A10,A15,A17,FINSEQ_5:10;
      end;
    end;
  end;
A18: lc = lc|Seg len lc & LC = LC|Seg len LC by FINSEQ_3:49;
A19: P[ 0 ]
  proof
    let lc9 be LinearCombination of F, LC9 be LinearCombination of G such that
A20: lc9 = lc|(Seg 0 qua set) and
A21: LC9 = LC|(Seg 0 qua set);
    thus P.(Sum lc9) = P.(Sum <*>the carrier of R) by A20
      .= P.(0.R) by RLVECT_1:43
      .= 0.S by A1,Th23
      .= Sum <*>the carrier of S by RLVECT_1:43
      .= Sum LC9 by A21;
  end;
  for k being Nat holds P[k] from NAT_1:sch 2(A19,A7);
  hence thesis by A2,A18;
end;
