
theorem Eprod:
for R being Ring,
    S being Subring of R
for F being non empty FinSequence of the carrier of R,
    G being non empty FinSequence of the carrier of S
st F = G holds Product F = Product G
proof
let R be Ring, S be Subring of R;
let F be non empty FinSequence of the carrier of R,
    G be non empty FinSequence of the carrier of S;
assume AS: F = G;
defpred P[Nat] means
  for F being non empty FinSequence of the carrier of R,
      G being non empty FinSequence of the carrier of S
  st len F = $1 & F = G holds Product F = Product G;
A: P[0];
B: now let k be Nat;
   assume B0: P[k];
   now let F be non empty FinSequence of the carrier of R,
           G be non empty FinSequence of the carrier of S;
   assume B1: len F = k + 1 & F = G;
   consider F1 being FinSequence, x being object such that
   B2: F = F1^<*x*> by FINSEQ_1:46;
   H: rng F c= the carrier of R by FINSEQ_1:def 4;
      rng F1 c= rng F by B2,FINSEQ_1:29; then
   reconsider F1 as FinSequence of the carrier of R
                                           by XBOOLE_1:1,H,FINSEQ_1:def 4;
   len <*x*> = 1 by FINSEQ_1:40; then
   C4: dom F = Seg(len F1 + 1) by B2,FINSEQ_1:def 7;
   B4: len F = len F1 + len<*x*> by B2,FINSEQ_1:22
            .= len F1 + 1 by FINSEQ_1:39;
   B12: 1 <= len F1 + 1 by NAT_1:11;
   dom <*x*> = Seg 1 by FINSEQ_1:38; then
   B11: 1 in dom <*x*> by FINSEQ_1:3;
   D20: x = <*x*>.1
         .= F.(len F1 + 1) by B11,B2,FINSEQ_1:def 7; then
   B13: x in rng F by B12,C4,FINSEQ_1:1,FUNCT_1:3;
   rng F c= the carrier of R by FINSEQ_1:def 4; then
   reconsider x as Element of the carrier of R by B13;
   consider G1 being FinSequence, y being object such that
   D2: G = G1^<*y*> by FINSEQ_1:46;
   H: rng G c= the carrier of S by FINSEQ_1:def 4;
      rng G1 c= rng G by D2,FINSEQ_1:29; then
   reconsider G1 as FinSequence of the carrier of S
                                           by XBOOLE_1:1,H,FINSEQ_1:def 4;
   len <*y*> = 1 by FINSEQ_1:40; then
   C4: dom G = Seg(len G1 + 1) by D2,FINSEQ_1:def 7;
   D4: len G = len G1 + len<*y*> by D2,FINSEQ_1:22
            .= len G1 + 1 by FINSEQ_1:39;
   B12: 1 <= len G1 + 1 by NAT_1:11;
   dom <*y*> = Seg 1 by FINSEQ_1:38; then
   B11: 1 in dom <*y*> by FINSEQ_1:3;
   D21: y = <*y*>.1
         .= G.(len G1 + 1) by B11,D2,FINSEQ_1:def 7; then
   B13: y in rng G by B12,C4,FINSEQ_1:1,FUNCT_1:3;
   rng G c= the carrier of S by FINSEQ_1:def 4; then
   reconsider y as Element of the carrier of S by B13;
   B14: G1 = F1
        proof
        now let k be Nat;
        assume 1 <= k & k <= len G1; then
        k in Seg(len F1) & k in Seg(len G1) by B1,B4,D4,FINSEQ_1:1; then
        K: k in dom F1 & k in dom G1 by FINSEQ_1:def 3;
        hence G1.k = F.k by B1,D2,FINSEQ_1:def 7
                  .= F1.k by K,B2,FINSEQ_1:def 7;
        end;
        hence thesis by B1,B4,D4,FINSEQ_1:14;
        end;
   per cases;
   suppose F1 is non empty; then
     E: Product G1 = Product F1 by B0,B1,B4,B14;
     thus Product F
            = (Product F1) * x by B2,GROUP_4:6
           .= (Product G1) * y by E,B1,B14,D20,D21,FIELD_6:16
           .= Product G by D2,GROUP_4:6;
     end;
   suppose F1 is empty; then
     F = <*x*> & G = <*y*> by B14,B2,D2,FINSEQ_1:34; then
     Product F = x & Product G = y by GROUP_4:9;
     hence Product F = Product G by B1,B14,D20,D21;
     end;
   end;
   hence P[k+1];
   end;
I: for k being Nat holds P[k] from NAT_1:sch 2(A,B);
consider n being Nat such that H: n = len F;
thus thesis by I,H,AS;
end;
