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;

theorem Th1:
  for w,y st Gen w,y holds (u,v are_Ort_wrt w,y iff for a1,a2,b1,b2
  st u = a1*w + a2*y & v = b1*w + b2*y holds a1*b1 + a2*b2 = 0 )
proof
  let w,y such that
A1: Gen w,y;
  hereby
    assume u,v are_Ort_wrt w,y;
    then consider a1,a2,b1,b2 such that
A2: u = a1*w + a2*y and
A3: v = b1*w + b2*y and
A4: a1*b1 + a2*b2 = 0;
    let a19,a29,b19,b29 be Real;
    assume that
A5: u = a19*w + a29*y and
A6: v = b19*w + b29*y;
A7: b1=b19 by A1,A3,A6,Lm4;
    a1=a19 & a2=a29 by A1,A2,A5,Lm4;
    hence 0 = a19*b19 + a29*b29 by A1,A3,A4,A6,A7,Lm4;
  end;
  consider a1,a2 such that
A8: u = a1*w + a2*y by A1;
  consider b1,b2 such that
A9: v = b1*w + b2*y by A1;
  assume
  for a1,a2,b1,b2 st u = a1*w + a2*y & v = b1*w + b2*y holds a1*b1 + a2*b2 = 0;
  then a1*b1 + a2*b2 = 0 by A8,A9;
  hence thesis by A8,A9;
end;
