
theorem Th28: ::  WWA2:
  for X being finite non empty set, F being Full-family of X holds
  Maximal_wrt F is (M1) (M2) (M3)
proof
  let X be finite non empty set, F be full_family Dependency-set of X;
  set DOX = Dependencies-Order X;
  set MEF = Maximal_wrt F;
  thus Maximal_wrt F is (M1)
  proof
A1: field DOX = [:bool X, bool X:] by Th17;
    let A be Subset of X;
    defpred P[object] means
ex y being Dependency of X st $1 = y & y >= [A,A];
    consider MA being set such that
A2: for x being object holds x in MA iff x in F & P[x] from XBOOLE_0:sch
    1;
    MA c= F
    by A2;
    then
A3: MA is finite Subset of field DOX by A1,XBOOLE_1:1;
    [A, A] in F by Def15;
    then MA <> {} by A2;
    then consider x being Element of MA such that
A4: x is_maximal_wrt MA, DOX by A3,Th2;
A5: x in MA by A4;
    then x in F by A2;
    then consider A9, B9 being object such that
A6: A9 in bool X and
A7: B9 in bool X and
A8: x = [A9,B9] by ZFMISC_1:def 2;
    reconsider A9, B9 as Subset of X by A6,A7;
    take A9, B9;
A9: ex y being Dependency of X st x = y & y >= [A,A] by A2,A5;
    hence [A9, B9] >= [A, A] by A8;
    x is_maximal_wrt F, DOX
    proof
      thus x in F by A2,A5;
      given z being set such that
A10:  z in F and
A11:  z <> x and
A12:  [x, z] in DOX;
      consider e, f being Dependency of X such that
A13:  [x,z] = [e, f] and
A14:  e <= f by A12;
      x = e by A13,XTUPLE_0:1;
      then
A15:  f >= [A,A] by A9,A14,Th12;
      z = f by A13,XTUPLE_0:1;
      then z in MA by A2,A10,A15;
      hence contradiction by A4,A11,A12;
    end;
    hence thesis by A8,Def1;
  end;
  thus Maximal_wrt F is (M2)
  proof
    let A, B, A9, B9 be Subset of X such that
A16: [A, B] in MEF and
A17: [A9, B9] in MEF and
A18: [A, B] >= [A9, B9];
A19: [[A9,B9], [A, B]] in DOX by A18;
    assume not (A = A9 & B = B9);
    then
A20: [A, B] <> [A9,B9] by XTUPLE_0:1;
    [A9, B9] is_maximal_wrt F, DOX by A17,Def1;
    hence contradiction by A16,A20,A19;
  end;
  thus Maximal_wrt F is (M3)
  proof
    let A, B, A9, B9 be Subset of X;
    assume that
A21: [A, B] in MEF and
A22: [A9, B9] in MEF and
A23: A9 c= B;
A24: A ^|^ B, F by A21;
    [A9,B9] >= [B,B9] by A23;
    then [ B, B9] in F by A22,Def12;
    then
A25: [ A, B9] in F by A21,Th18;
    B c= B\/B9 by XBOOLE_1:7;
    then
A26: [A,B\/B9] >= [A,B];
    A\/A = A;
    then [A, B\/B9] in F by A21,A25,Def13;
    then B\/B9 = B by A24,A26,Th27;
    hence thesis by XBOOLE_1:11;
  end;
end;
