
theorem Th60:
  for L being add-associative left_zeroed right_zeroed
add-cancelable associative distributive well-unital non empty doubleLoopStr,
  F being non empty Subset of L, x being set holds x in F-Ideal iff ex f being
  LinearCombination of F st x = Sum f
proof
  let L be add-associative right_zeroed add-cancelable left_zeroed associative
distributive well-unital non empty doubleLoopStr, F be non empty Subset of L;
  set I = { x where x is Element of L: ex lc being LinearCombination of F st
  Sum lc = x };
A1: I c= the carrier of L
  proof
    let x be object;
    assume x in I;
    then ex x9 being Element of L st x9=x & ex lc being LinearCombination of F
    st Sum lc = x9;
    hence thesis;
  end;
  let x be set;
A2: F c= I
  proof
    let x be object;
    assume
A3: x in F;
    then reconsider x as Element of L;
    set lc = <* x *>;
    now
      let i be set;
      assume
A4:   i in dom lc;
      dom lc = {1} by FINSEQ_1:2,38;
      then i = 1 by A4,TARSKI:def 1;
      then lc.i = x
        .= 1.L*x
        .= 1.L*x*1.L;
      hence
      ex u,v being Element of L, a being Element of F st lc/.i = u*a*v by A3,A4
,PARTFUN1:def 6;
    end;
    then reconsider lc as LinearCombination of F by Def8;
    Sum lc = x by BINOM:3;
    hence thesis;
  end;
A5: I c= F-Ideal
  proof
    defpred P[Nat] means for lc being LinearCombination of F st len lc <= $1
    holds Sum lc in F-Ideal;
    let x be object;
    assume x in I;
    then consider x9 being Element of L such that
A6: x9=x and
A7: ex lc being LinearCombination of F st Sum lc = x9;
    consider lc being LinearCombination of F such that
A8: Sum lc = x9 by A7;
A9: for k being Nat st P[k] holds P[k+1]
    proof
      let k be Nat;
      assume
A10:  P[k];
      thus P[k+1]
      proof
        let lc be LinearCombination of F;
        assume
A11:    len lc <= k+1;
        per cases by A11,NAT_1:8;
        suppose
          len lc <= k;
          hence thesis by A10;
        end;
        suppose
A12:      len lc = k+1;
          then lc is non empty;
          then consider
          q being LinearCombination of F, r being Element of L such
          that
A13:      lc=q^<*r*> and
A14:      <*r*> is LinearCombination of F by Th32;
          k+1 = len q + len <*r*> by A12,A13,FINSEQ_1:22
            .= len q + 1 by FINSEQ_1:39;
          then
A15:      Sum q in F-Ideal by A10;
          dom <*r*> = {1} by FINSEQ_1:2,38;
          then
A16:      1 in dom <*r*> by TARSKI:def 1;
          then consider u,v being Element of L, a being Element of F such that
A17:      <* r *>/.1 = u*a*v by A14,Def8;
          F c= F-Ideal by Def14;
          then a in F-Ideal;
          then
A18:      u*a in F-Ideal by Def2;
A19:      <*r*>/.1 = <*r*>.1 by A16,PARTFUN1:def 6;
          Sum <* r *> = r by BINOM:3
            .= u*a*v by A17,A19;
          then
A20:      Sum <* r *> in F-Ideal by A18,Def3;
          Sum lc = Sum q + Sum <* r *> by A13,RLVECT_1:41;
          hence thesis by A15,A20,Def1;
        end;
      end;
    end;
A21: P[0]
    proof
      set y = the Element of F;
      let lc be LinearCombination of F;
      assume len lc <= 0;
      then lc = <*>(the carrier of L);
      then
A22:  Sum lc = 0.L by RLVECT_1:43;
      F c= F-Ideal by Def14;
      then
A23:  y in F-Ideal;
      0.L*y = 0.L by BINOM:1;
      hence thesis by A22,A23,Def2;
    end;
    for k being Nat holds P[k] from NAT_1:sch 2(A21,A9);
    then P[len lc];
    hence thesis by A6,A8;
  end;
  reconsider I as non empty Subset of L by A2,A1;
  reconsider I9=I as non empty Subset of L;
A24: I9 is add-closed
  proof
    let x, y be Element of L;
    assume that
A25: x in I9 and
A26: y in I9;
    consider x9 being Element of L such that
A27: x9=x and
A28: ex lc being LinearCombination of F st Sum lc = x9 by A25;
    consider lcx being LinearCombination of F such that
A29: Sum lcx = x9 by A28;
    consider y9 being Element of L such that
A30: y9=y and
A31: ex lc being LinearCombination of F st Sum lc = y9 by A26;
    consider lcy being LinearCombination of F such that
A32: Sum lcy = y9 by A31;
    Sum (lcx^lcy) = x9 + y9 by A29,A32,RLVECT_1:41;
    hence thesis by A27,A30;
  end;
A33: I9 is right-ideal
  proof
    let p, x be Element of L;
    assume x in I9;
    then consider x9 being Element of L such that
A34: x9=x and
A35: ex lc being LinearCombination of F st Sum lc = x9;
    consider lcx being LinearCombination of F such that
A36: Sum lcx = x9 by A35;
    reconsider lcxp = lcx*p as LinearCombination of F by Th24;
    x*p = Sum lcxp by A34,A36,BINOM:5;
    hence thesis;
  end;
  I9 is left-ideal
  proof
    let p, x be Element of L;
    assume x in I9;
    then consider x9 being Element of L such that
A37: x9=x and
A38: ex lc being LinearCombination of F st Sum lc = x9;
    consider lcx being LinearCombination of F such that
A39: Sum lcx = x9 by A38;
    reconsider plcx = p*lcx as LinearCombination of F by Th23;
    p*x = Sum plcx by A37,A39,BINOM:4;
    hence thesis;
  end;
  then F-Ideal c= I by A2,A24,A33,Def14;
  then
A40: I = F-Ideal by A5;
  hereby
    assume x in F-Ideal;
    then ex x9 being Element of L st x9=x & ex lc being LinearCombination of F
    st Sum lc = x9 by A40;
    hence ex f being LinearCombination of F st x = Sum f;
  end;
  assume ex f being LinearCombination of F st x = Sum f;
  hence thesis by A40;
end;
