reserve T for non empty Abelian
  add-associative right_zeroed right_complementable RLSStruct,
  X,Y,Z,B,C,B1,B2 for Subset of T,
  x,y,p for Point of T;
reserve t,s,r1 for Real;
reserve n for Element of NAT;
reserve X,Y,B1,B2 for Subset of TOP-REAL n;
reserve x,y for Point of TOP-REAL n;

theorem Th74:
  for V being RealLinearSpace, B being Subset of V holds
  B is convex iff
  for x,y be Point of V,r be Real st 0 <= r & r <= 1 & x in B &
  y in B holds r*x + (1-r)*y in B
proof
  let V be RealLinearSpace, B be Subset of V;
  thus B is convex implies for x,y be Point of V,r be Real st 0 <= r &
  r <= 1 & x in B & y in B holds r*x + (1-r)*y in B
  proof
    assume
A1: B is convex;
    for x,y be Point of V,r be Real st 0 <= r & r <= 1 & x in B & y
    in B holds r*x + (1-r)*y in B
    proof
      let x,y be Point of V,r be Real;
      assume that
A2:   0 <= r & r <= 1 and
A3:   x in B & y in B;
      (1-r)*y + r*x in {(1-r1)*y+r1*x where r1 is Real:0<=r1&r1<=1}
        by A2;
      then
A4:   (1-r)*y + r*x in LSeg(x,y) by RLTOPSP1:def 2;
      LSeg(x,y) c= B by A1,A3,JORDAN1:def 1;
      hence thesis by A4;
    end;
    hence thesis;
  end;
  (for x,y be Point of V,r be Real st 0 <= r & r <= 1 & x in B & y
  in B holds r*x + (1-r)*y in B) implies B is convex
  proof
    assume
A5: for x,y be Point of V,r be Real st 0 <= r & r <= 1 & x in
    B & y in B holds r*x + (1-r)*y in B;
    for x,y being Point of V st x in B & y in B holds LSeg(x,y) c= B
    proof
      let x,y be Point of V;
      assume
A6:   x in B & y in B;
      let p be object;
      assume p in LSeg(x,y);
      then p in {(1-r1) * y + r1*x where r1 is Real:0<=r1&r1<=1} by
RLTOPSP1:def 2;
      then ex r1 being Real
           st p = (1-r1) * y + r1 * x & 0<=r1 & r1<=1;
      hence thesis by A5,A6;
    end;
    hence thesis by RLTOPSP1:22;
  end;
  hence thesis;
end;
