
theorem Th65:
  for R being Abelian left_zeroed right_zeroed add-cancelable
  well-unital add-associative associative commutative distributive non empty
doubleLoopStr, a,b being Element of R holds {a,b}-Ideal = the set of all
a*r + b*s where r,s
  is Element of R
proof
  let R be Abelian left_zeroed right_zeroed add-cancelable associative
well-unital add-associative commutative distributive non empty doubleLoopStr,
  a,b be Element of R;
  set A = {a,b};
  reconsider a9=a, b9=b as Element of A by TARSKI:def 2;
  set M = the set of all Sum s where s is LinearCombination of A ;
  set N = the set of all a*r + b*s where r,s is Element of R ;
A1: for u being object holds u in M implies u in N
  proof
    let u be object;
    assume u in M;
    then consider s being LinearCombination of A such that
A2: u = Sum s;
    consider f being sequence of the carrier of R such that
A3: Sum s = f.(len s) and
A4: f.0 = 0.R and
A5: for j being Nat,v being Element of R st j < len s & v =
    s.(j + 1) holds f.(j + 1) = f.j + v by RLVECT_1:def 12;
    defpred P[Element of NAT] means ex r,s being Element of R st f.($1) = a*r
    + b*s;
A6: now
      let j be Element of NAT;
      assume that
      0 <= j and
A7:   j < len s;
      thus P[j] implies P[j+1]
      proof
        0 + 1 <= j + 1 & j + 1 <= len s by A7,NAT_1:13;
        then j + 1 in Seg(len s) by FINSEQ_1:1;
        then
A8:     j + 1 in dom s by FINSEQ_1:def 3;
        then
A9:     s/.(j+1) = s.(j+1) by PARTFUN1:def 6;
        assume ex r,s being Element of R st f.j = a*r + b*s;
        then consider r1,s1 being Element of R such that
A10:    f.j = a*r1 + b*s1;
        consider r2,r3 being Element of R, a9 being Element of A such that
A11:    s/.(j+1) = r2*a9*r3 by A8,Def8;
        per cases by TARSKI:def 2;
        suppose
          a9 = a;
          then f.(j+1) = (a*r1 + b*s1) + r2*a*r3 by A5,A7,A10,A11,A9
            .= (a*r1 + a*r2*r3) + b*s1 by RLVECT_1:def 3
            .= (a*r1 + a*(r2*r3)) + b*s1 by GROUP_1:def 3
            .= a*(r1 + r2*r3) + b*s1 by VECTSP_1:def 7;
          hence thesis;
        end;
        suppose
          a9 = b;
          then f.(j+1) = (a*r1 + b*s1) + r2*b*r3 by A5,A7,A10,A11,A9
            .= a*r1 + (b*s1 + b*r2*r3) by RLVECT_1:def 3
            .= a*r1 + (b*s1 + b*(r2*r3)) by GROUP_1:def 3
            .= a*r1 + b*(s1 + r2*r3) by VECTSP_1:def 7;
          hence thesis;
        end;
      end;
    end;
    f.0 = a*0.R by A4,BINOM:2
      .= a*0.R + 0.R by RLVECT_1:def 4
      .= a*0.R + b*0.R by BINOM:2;
    then
A12: P[0];
    for k being Element of NAT st 0 <= k & k <= len s holds P[k] from
    INT_1:sch 7 (A12,A6);
    then ex r,t being Element of R st Sum s = a*r + b*t by A3;
    hence thesis by A2;
  end;
A13: now
    let x be object;
    hereby
      assume x in {a,b}-Ideal;
      then x in {a,b}-RightIdeal by Th63;
      then consider f being RightLinearCombination of A such that
A14:  x = Sum f by Th62;
      f is LinearCombination of A by Th28;
      hence x in M by A14;
    end;
    assume x in M;
    then ex s being LinearCombination of A st x = Sum s;
    hence x in {a,b}-Ideal by Th60;
  end;
  for u being object holds u in N implies u in M
  proof
    let u be object;
    assume u in N;
    then consider r,t being Element of R such that
A15: u = a*r + b*t;
    set s = <* a*r, b*t *>;
    for i being set st i in dom s ex r,t being Element of R, a being
    Element of A st s/.i = r*a*t
    proof
      let i be set;
      assume
A16:  i in dom s;
      then i in Seg(len s) by FINSEQ_1:def 3;
      then
A17:  i in {1,2} by FINSEQ_1:2,44;
      per cases by A17,TARSKI:def 2;
      suppose
        i = 1;
        then s/.i = s.1 by A16,PARTFUN1:def 6
          .= a*r
          .= 1.R*a9*r;
        hence thesis;
      end;
      suppose
        i = 2;
        then s/.i = s.2 by A16,PARTFUN1:def 6
          .= b*t
          .= 1.R*b9*t;
        hence thesis;
      end;
    end;
    then reconsider s as LinearCombination of A by Def8;
    Sum s = a*r + b*t by Th1;
    hence thesis by A15;
  end;
  then M = N by A1,TARSKI:2;
  hence thesis by A13,TARSKI:2;
end;
