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