reserve x,y for set;
reserve a,b for Real;
reserve i,j for Integer;
reserve V for RealLinearSpace;
reserve W1,W2,W3 for Subspace of V;
reserve v,v1,v2,v3,u,w,w1,w2,w3 for VECTOR of V;
reserve A,B,C for Subset of V;
reserve L,L1,L2 for Linear_Combination of V;
reserve l,l1,l2 for Linear_Combination of A;

theorem Th16:
  x in Z_Lin{v} iff ex a be Integer st x = a * v
proof
  thus x in Z_Lin{v} implies ex a be Integer st x = a * v
  proof
    assume x in Z_Lin{v};
    then consider l being Linear_Combination of {v} such that
A1: x = Sum(l) & rng l c= INT;
A2: Sum(l) = l.v * v by RLVECT_2:32;
        ex f being Function st l = f & dom f = the carrier of V
              & rng f c= REAL by FUNCT_2:def 2; then
        l.v in rng l by FUNCT_1:3;
    hence thesis by A1,A2;
  end;
  given a0 be Integer such that
A3: x = a0 * v;
  reconsider a=a0 as Element of REAL by XREAL_0:def 1;
  consider f being Function of the carrier of V, REAL such that
A4: f.v = a and
A5: for z being VECTOR of V st z <> v holds f.z = H(z) from FUNCT_2:sch 6;
  reconsider f as Element of Funcs(the carrier of V,REAL) by FUNCT_2:8;
A6:now
    let z be VECTOR of V;
    assume not z in {v};
    then z <> v by TARSKI:def 1;
    hence f.z = 0 by A5;
  end;
  then reconsider f as Linear_Combination of V by RLVECT_2:def 3;
  Carrier f c= {v}
  proof
    let x be object;
    assume
A7: x in Carrier f;
    then f.x <> 0 by RLVECT_2:19;
    then x = v by A5,A7;
    hence thesis by TARSKI:def 1;
  end;
  then reconsider f as Linear_Combination of {v} by RLVECT_2:def 6;
A8:Sum(f) = x by A3,A4,RLVECT_2:32;
   rng f c= INT
      proof
       let y be object;
       assume A9:y in rng f;
       consider x be object
         such that A10: x in the carrier of V & y=f.x by A9,FUNCT_2:11;
       reconsider z=x as VECTOR of V by A10;
       per cases;
         suppose not z in {v}; then
         f.z = 0 by A6;
         hence y in INT by A10,NUMBERS:17;
        end;
         suppose z in {v}; then
         f.z = a0 by A4,TARSKI:def 1;
         hence y in INT by A10,INT_1:def 2;
        end;
      end;
  hence thesis by A8;
end;
