reserve V for RealLinearSpace;
reserve u,u1,u2,v,v1,v2,w,w1,y for VECTOR of V;
reserve a,a1,a2,b,b1,b2,c1,c2 for Real;
reserve x,z for set;
reserve p,p1,q,q1 for Element of Lambda(OASpace(V));
reserve POS for non empty ParOrtStr;
reserve p,p1,p2,q,q1,r,r1,r2 for Element of AMSpace(V,w,y);

theorem Th32:
  Gen w,y & p<>p1 implies for q ex q1 st p,p1 // p,q1 & p,p1 _|_ q1,q
proof
  assume that
A1: Gen w,y and
A2: p<>p1;
  let q;
  reconsider u=p,v=q,u1=p1 as Element of V;
  u1-u <> 0.V by A2,RLVECT_1:21;
  then consider a such that
A3: (v-u) - a*(u1-u),u1-u are_Ort_wrt w,y by A1,Th13;
  set v1 = u + a*(u1-u);
  reconsider q1=v1 as Element of AMSpace(V,w,y);
  v-v1 = (v-u)- a*(u1-u) by RLVECT_1:27;
  then u1-u,v-v1 are_Ort_wrt w,y by A3;
  then u,u1,v1,v are_Ort_wrt w,y;
  then
A4: p,p1 _|_ q1,q by Th21;
  a*(u1-u) = a*(u1-u)+0.V by RLVECT_1:4
    .= a*(u1-u)+(u-u) by RLVECT_1:15
    .= v1-u by RLVECT_1:def 3
    .= 1*(v1-u) by RLVECT_1:def 8;
  then p,p1 // p,q1 by Th22;
  hence thesis by A4;
end;
