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
  x in v + Z_Lin{w1,w2,w3}
   iff ex a,b,c be Integer st x = v + a * w1 + b * w2 + c * w3
proof
  thus x in v + Z_Lin{w1,w2,w3} implies ex a,b,c be Integer
    st x = v + a * w1 + b * w2 + c * w3
  proof
    assume x in v + Z_Lin{w1,w2,w3};
    then consider u such that
A1: x = v + u and
A2: u in Z_Lin{w1,w2,w3};
    consider a,b,c be Integer such that
A3: u = a * w1 + b * w2 + c * w3 by A2,Th22;
    take a,b,c;
    x = v + (a * w1 + b * w2) + c * w3 by A1,A3,RLVECT_1:def 3;
    hence thesis by RLVECT_1:def 3;
  end;
  given a,b,c be Integer such that
A4: x = v + a * w1 + b * w2 + c * w3;
  a * w1 + b * w2 + c * w3 in Z_Lin{w1,w2,w3} by Th22;
  then v + (a * w1 + b * w2 + c * w3) in v + Z_Lin{w1,w2,w3};
  then v + (a * w1 + b * w2) + c * w3 in v + Z_Lin{w1,w2,w3}
    by RLVECT_1:def 3;
  hence thesis by A4,RLVECT_1:def 3;
end;
