
theorem Th12: :: ExtCliquemin
for R being transitive RelStr, C being Clique of R, x, y being Element of R
 st x is_minimal_in C & y <= x holds C \/ {y} is Clique of R
proof
  let R be transitive RelStr, C be Clique of R, x, y be Element of R such that
A1: x is_minimal_in C and
A2: y <= x;
A3: x in C by A1,WAYBEL_4:56;
A4: the carrier of R is non empty by A1,WAYBEL_4:56;
  set Cb = C \/ {y};
A5: Cb c= the carrier of R proof
    let x be object;
    assume A6: x in Cb;
    per cases by A6,XBOOLE_0:def 3;
    suppose x in C;
      hence x in the carrier of R;
    end;
    suppose x in {y};
      then x = y by TARSKI:def 1;
      hence x in the carrier of R by A4;
    end;
   end;
   now
    let a, b be Element of R such that
   A7: a in Cb & b in Cb and
   A8: a <> b;
    per cases by A7,XBOOLE_0:def 3;
    suppose a in C & b in C;
     hence a <= b or b <= a by A8,Th6;
    end;
    suppose that
    A9: a in C and
    A10: b in {y};
    A11: b = y by A10,TARSKI:def 1;
    A12: not a < x by A1,A9,WAYBEL_4:56;
        per cases;
        suppose A13: a <> x;
          then not a <= x by A12;
          then x <= a by A9,A3,A13,Th6;
          hence a <= b or b <= a by A2,A11,ORDERS_2:3;
        end;
        suppose x = a;
          hence a <= b or b <= a by A2,A10,TARSKI:def 1;
        end;
    end;
    suppose that
    A14: a in {y} and
    A15: b in C;
    A16: a = y by A14,TARSKI:def 1;
    A17: not b < x by A1,A15,WAYBEL_4:56;
        per cases;
        suppose A18: b <> x;
          then not b <= x  by A17;
          then x <= b by A15,A3,A18,Th6;
          hence a <= b or b <= a by A2,A16,ORDERS_2:3;
        end;
        suppose x = b;
          hence a <= b or b <= a by A2,A14,TARSKI:def 1;
        end;
    end;
    suppose a in {y} & b in {y};
      then a = y & b = y by TARSKI:def 1;
      hence a <= b or b <= a by A8;
    end;
  end;
  hence C \/ {y} is Clique of R by A5,Th6;
end;
