
theorem Th26:
  for X being finite set, P being Dependency of X, F being
  Dependency-set of X st P in F ex A, B being Subset of X st [A, B] in
  Maximal_wrt F & [A, B] >= P
proof
  let X be finite set,x be Dependency of X,F be Dependency-set of X;
  set DOX = Dependencies-Order X;
  assume
A1: x in F;
  then reconsider FF= F as non empty Dependency-set of X;
  reconsider S = { y where y is Element of FF: x <= y } as set;
A2: field DOX = [:bool X, bool X:] by Th17;
A3: S c= field DOX
  proof
    let a be object;
    assume a in S;
    then ex b be Element of FF st a = b & x <= b;
    hence thesis by A2;
  end;
  x in S by A1;
  then consider m being Element of S such that
A4: m is_maximal_wrt S, DOX by A3,Th2;
  m in S by A4;
  then
A5: ex y being Element of FF st m = y & x <= y;
  then consider a, b being Subset of X such that
A6: m = [a, b] by Th8;
  take a, b;
  m is_maximal_wrt F, DOX
  proof
    thus m in F by A5;
    given y being set such that
A7: y in F and
A8: y <> m and
A9: [m, y] in DOX;
    consider e, f being Dependency of X such that
A10: [m, y] = [e, f] and
A11: e <= f by A9;
    reconsider y as Element of FF by A7;
A12: y = f by A10,XTUPLE_0:1;
    m = e by A10,XTUPLE_0:1;
    then x <= y by A5,A11,A12,Th12;
    then y in S;
    hence contradiction by A4,A8,A9;
  end;
  hence [a,b] in Maximal_wrt F by A6,Def1;
  thus thesis by A5,A6;
end;
