 reserve a for non empty set;
 reserve b, x, o for object;

theorem Th8:
    for A, B be Ring, i be Function of A,B st i is RingHomomorphism
    & i = id A holds A is Subring of B
    proof
      let A, B be Ring, i be Function of A,B;
      assume
A1:   i is RingHomomorphism & i = id A; then
A2:   i is unity-preserving;
A3:   for o be object holds
        o in the carrier of A implies o in the carrier of B
      proof
        let o be object;
        assume
A4:     o in the carrier of A; then
        i.o = o by A1,FUNCT_1:18;
        hence thesis by FUNCT_2:5,A4;
      end; then
A6:   the carrier of A c= the carrier of B;
A7:   the addF of A = (the addF of B)||the carrier of A
      proof
        set aA = the addF of A,
        aB = (the addF of B) || the carrier of A;
A8:     dom aB = dom(the addF of B) /\ [:the carrier of A,the carrier of A:]
        by RELAT_1:61
        .= [:the carrier of B,the carrier of B:] /\
           [:the carrier of A,the carrier of A:] by FUNCT_2:def 1
        .= [:the carrier of A,the carrier of A:] by A6,ZFMISC_1:96,XBOOLE_1:28;
       for x be object st x in dom aA holds aA.x = aB.x
       proof
         let x be object;
         assume
A9:      x in dom aA; then
         consider a,b being object such that
A10:     a in the carrier of A & b in the carrier of A & x = [a,b]
           by ZFMISC_1:def 2;
     reconsider a,b as Element of A by A10;
     reconsider a1 = a, b1 = b as Element of B by A3;
A11:     i.a = a by A1;
A12:     i.b = b by A1;
         aA.x = i.(a+b) by A1,A10
         .= a1 + b1 by A11,A12,A1,VECTSP_1:def 20
         .= aB.x by A9,A10,FUNCT_1:49;
         hence thesis;
       end;
       hence thesis by A8,FUNCT_2:def 1;
     end;
A13: the multF of A = (the multF of B)||the carrier of A
     proof
       set aA = the multF of A,
           aB = (the multF of B) || the carrier of A;
A14:   dom aB = dom(the multF of B) /\ [:the carrier of A,the carrier of A:]
       by RELAT_1:61
       .= [:the carrier of B,the carrier of B:] /\
          [:the carrier of A,the carrier of A:] by FUNCT_2:def 1
       .= [:the carrier of A,the carrier of A:] by A6,ZFMISC_1:96,XBOOLE_1:28;
       for x be object st x in dom aA holds aA.x = aB.x
       proof
         let x be object;
         assume
A15:     x in dom aA; then
         consider a,b being object such that
A16:     a in the carrier of A & b in the carrier of A & x = [a,b]
         by ZFMISC_1:def 2;
reconsider a,b as Element of A by A16;
reconsider a1 = a, b1 = b as Element of B by A3;
A17:     i.a = a by A1;
A18:     i.b = b by A1;
A19:     i is multiplicative by A1;
         aA.x = i.(a*b) by A1,A16
         .= a1 * b1 by A19,A17,A18
         .= aB.x by A15,A16,FUNCT_1:49;
         hence thesis;
       end;
       hence thesis by A14,FUNCT_2:def 1;
     end;
     0.B = i.0.A by A1,RING_2:6 .= 0.A by A1;
     hence thesis by A1,A2,A6,A7,A13,C0SP1:def 3;
   end;
