reserve Y for non empty set,
  G for Subset of PARTITIONS(Y);
reserve a, u for Function of Y,BOOLEAN;

theorem :: De'Morgan's Law
  for PA being a_partition of Y holds 'not' Ex(a,PA,G) = All('not' a,PA, G)
proof
  let PA be a_partition of Y;
    let z be Element of Y;
    per cases;
    suppose
A1:   (for x being Element of Y st x in EqClass(z,CompF(PA,G)) holds (
'not' a).x=TRUE) & ex x being Element of Y st x in EqClass(z,CompF(PA,G)) & a.x
      =TRUE;
      then consider x1 being Element of Y such that
A2:   x1 in EqClass(z,CompF(PA,G)) and
A3:   a.x1=TRUE;
      ('not' a).x1='not' TRUE by A3,MARGREL1:def 19;
      hence thesis by A1,A2,MARGREL1:11;
    end;
    suppose
A4:   (for x being Element of Y st x in EqClass(z,CompF(PA,G)) holds (
'not' a).x=TRUE) & not (ex x being Element of Y st x in EqClass(z,CompF(PA,G))
      & a.x=TRUE);
      then 'not' B_SUP(a,CompF(PA,G)).z = TRUE by BVFUNC_1:def 17,MARGREL1:11;
      then ('not' B_SUP(a,CompF(PA,G))).z = TRUE by MARGREL1:def 19;
      hence thesis by A4,BVFUNC_1:def 16;
    end;
    suppose
A5:   not (for x being Element of Y st x in EqClass(z,CompF(PA,G))
holds ('not' a).x=TRUE) & ex x being Element of Y st x in EqClass(z,CompF(PA,G)
      ) & a.x=TRUE;
      then B_SUP(a,CompF(PA,G)).z = TRUE by BVFUNC_1:def 17;
      then
A6:  ('not' B_SUP(a,CompF(PA,G))).z = 'not' TRUE by MARGREL1:def 19;
      B_INF('not' a,CompF(PA,G)).z = FALSE by A5,BVFUNC_1:def 16;
      hence thesis by A6,MARGREL1:11;
    end;
    suppose
A7:  not (for x being Element of Y st x in EqClass(z,CompF(PA,G))
holds ('not' a).x=TRUE) & not (ex x being Element of Y st x in EqClass(z,CompF(
      PA,G)) & a.x=TRUE);
      then consider x1 being Element of Y such that
A8:  x1 in EqClass(z,CompF(PA,G)) and
A9:  ('not' a).x1<>TRUE;
      ('not' a).x1=FALSE by A9,XBOOLEAN:def 3;
      then 'not' a.x1=FALSE by MARGREL1:def 19;
      hence thesis by A7,A8,MARGREL1:11;
    end;
end;
