
theorem Th62:
  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-RightIdeal iff ex f
  being RightLinearCombination of F st x = Sum f
proof
  let L be add-associative left_zeroed right_zeroed add-cancelable 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 RightLinearCombination 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 RightLinearCombination
    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
        .= x*1.L;
      hence
      ex v being Element of L, a being Element of F st lc/.i = a*v by A3,A4,
PARTFUN1:def 6;
    end;
    then reconsider lc as RightLinearCombination of F by Def10;
    Sum lc = x by BINOM:3;
    hence thesis;
  end;
A5: I c= F-RightIdeal
  proof
    defpred P[Nat] means for lc being RightLinearCombination of F st len lc <=
    $1 holds Sum lc in F-RightIdeal;
    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 RightLinearCombination of F st Sum lc = x9;
    consider lc being RightLinearCombination 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 RightLinearCombination 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 RightLinearCombination of F, r being Element of L
          such that
A13:      lc=q^<*r*> and
A14:      <*r*> is RightLinearCombination of F by Th34;
          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-RightIdeal by A10;
          dom <*r*> = {1} by FINSEQ_1:2,38;
          then
A16:      1 in dom <*r*> by TARSKI:def 1;
          then consider v being Element of L, a being Element of F such that
A17:      <* r *>/.1 = a*v by A14,Def10;
          F c= F-RightIdeal by Def16;
          then
A18:      a in F-RightIdeal;
A19:      <*r*>/.1 = <*r*>.1 by A16,PARTFUN1:def 6;
          Sum <* r *> = r by BINOM:3
            .= a*v by A17,A19;
          then
A20:      Sum <* r *> in F-RightIdeal 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 RightLinearCombination 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-RightIdeal by Def16;
      then
A23:  y in F-RightIdeal;
      y*0.L = 0.L by BINOM:2;
      hence thesis by A22,A23,Def3;
    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 RightLinearCombination of F st Sum lc = x9 by A25;
    consider lcx being RightLinearCombination 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 RightLinearCombination of F st Sum lc = y9 by A26;
    consider lcy being RightLinearCombination 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;
  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
A33: x9=x and
A34: ex lc being RightLinearCombination of F st Sum lc = x9;
    consider lcx being RightLinearCombination of F such that
A35: Sum lcx = x9 by A34;
    reconsider lcxp = lcx*p as RightLinearCombination of F by Th29;
    x*p = Sum lcxp by A33,A35,BINOM:5;
    hence thesis;
  end;
  then F-RightIdeal c= I by A2,A24,Def16;
  then
A36: I = F-RightIdeal by A5;
  hereby
    assume x in F-RightIdeal;
    then ex x9 being Element of L st x9=x & ex lc being RightLinearCombination
    of F st Sum lc = x9 by A36;
    hence ex f being RightLinearCombination of F st x = Sum f;
  end;
  assume ex f being RightLinearCombination of F st x = Sum f;
  hence thesis by A36;
end;
