 reserve A, B, C, A1, B1, C1, A2, B2, C2, C3 for Point of TOP-REAL 2,
  lambda, mu, nu, alpha, beta, gamma for Real,
  X, Y, Z for Subset of TOP-REAL 2;

theorem
  Th9: A, B, C are_collinear iff the_area_of_polygon3(A, B, C) = 0
proof
  hereby
    assume A, B, C are_collinear;
    then per cases by TOPREAL9:67;
    suppose A in LSeg(B, C);
      then consider lambda such that
      A1: A = (1 - lambda) * B + lambda * C & 0 <= lambda & lambda <= 1;
      the_area_of_polygon3(A, B, C) =
      (1 - lambda) * the_area_of_polygon3(B, B, C)
      + lambda * the_area_of_polygon3(C, B, C) by Th7,A1;
      hence the_area_of_polygon3(A, B, C) = 0;
    end;
    suppose B in LSeg(C, A);
      then consider lambda such that
      A2: B = (1 - lambda) * C + lambda * A & 0 <= lambda & lambda <= 1;
      the_area_of_polygon3(A, B, C) =
      - the_area_of_polygon3((1 - lambda) * C + lambda * A, A, C) by A2
      .= - (1 - lambda) * the_area_of_polygon3(C, A, C)
      - lambda * the_area_of_polygon3(A, A, C) by Th7;
      hence the_area_of_polygon3(A, B, C) = 0;
    end;
    suppose C in LSeg(A, B);
      then consider lambda such that
      A3: C = (1 - lambda) * A + lambda * B & 0 <= lambda & lambda <= 1;
      the_area_of_polygon3(A, B, C) =
      - the_area_of_polygon3((1 - lambda) * A + lambda * B, B, A) by A3
      .= - (1 - lambda) * the_area_of_polygon3(A, B, A)
      - lambda * the_area_of_polygon3(B, B, A) by Th7;
      hence the_area_of_polygon3(A, B, C) = 0;
    end;
  end;
  assume the_area_of_polygon3(A, B, C) = 0;
  then |.A - B.| * |.C - B.| * sin angle (C, B, A) / 2 = 0 by EUCLID_6:5;
  then per cases;
  suppose |.(A - B).| = 0;
    then A = B by EUCLID_6:42;
    then not A, B, C are_mutually_distinct by ZFMISC_1:def 5;
    hence A, B, C are_collinear by EUCLID_6:20;
  end;
  suppose |.(C - B).| = 0;
    then C = B by EUCLID_6:42;
    then not A, B, C are_mutually_distinct by ZFMISC_1:def 5;
    hence A, B, C are_collinear by EUCLID_6:20;
  end;
  suppose A4: sin (angle (C, B, A)) = 0;
    2 * PI * 0 <= angle(C, B, A) & angle(C, B, A) < 2 * PI + 2 * PI * 0
    by COMPLEX2:70;
    then angle(C, B, A) = 2 * PI * 0 or angle(C, B, A) = PI + 2 * PI * 0
    by A4,SIN_COS6:21;
    then per cases;
    suppose angle(C, B, A) = 0;
      then angle(B, C, A) = PI or angle(B, A, C) = PI
      or not C, B, A are_mutually_distinct by Th8;
      then C in LSeg(B, A) or A in LSeg(B, C)
      or not (C <> B & C <> A & B <> A) by EUCLID_6:11,ZFMISC_1:def 5;
      then C in LSeg(B, A) or A in LSeg(B, C)
      or not A, B, C are_mutually_distinct by ZFMISC_1:def 5;
      hence thesis by EUCLID_6:20,TOPREAL9:67;
    end;
    suppose angle(C, B, A) = PI;
      then B in LSeg(C, A) by EUCLID_6:11;
      hence thesis by TOPREAL9:67;
    end;
  end;
end;
