reserve Y for non empty set;
reserve B for Subset of Y;

theorem Th18:
  for a being Function of Y,BOOLEAN holds 'not' B_INF(a) =
  B_SUP('not' a) & 'not' B_SUP(a)=B_INF('not' a)
proof
  let a be Function of Y,BOOLEAN;
A1: (for x being Element of Y holds ('not' a).x=TRUE) implies for x being
  Element of Y holds a.x=FALSE
  proof
    assume
A2: for x being Element of Y holds ('not' a).x=TRUE;
    let x be Element of Y;
    ('not' a).x=TRUE by A2;
    then 'not' a.x=TRUE by MARGREL1:def 19;
    hence thesis;
  end;
A3: (for x being Element of Y holds ('not' a).x=FALSE) implies for x being
  Element of Y holds a.x= TRUE
  proof
    assume
A4: for x being Element of Y holds ('not' a).x=FALSE;
    let x be Element of Y;
    ('not' a).x=FALSE by A4;
    then 'not' a.x=FALSE by MARGREL1:def 19;
    hence thesis;
  end;
A5: now
    assume
A6: (for x being Element of Y holds a.x=TRUE ) or for x being Element
    of Y holds a.x=FALSE;
    now
      per cases by A6;
      case
A7:     (for x being Element of Y holds a.x=TRUE) & not (for x being
        Element of Y holds a.x=FALSE);
A8:     for x being Element of Y holds ('not' a).x= FALSE
        proof
          let x be Element of Y;
          'not' (TRUE) = FALSE;
          then 'not' a.x= FALSE by A7;
          hence thesis by MARGREL1:def 19;
        end;
        B_INF(a) = I_el(Y) by A7,Def13;
        then
A9:     'not' B_INF(a) = O_el(Y) by Th1;
        B_INF('not' a) = O_el(Y) & 'not' B_SUP(a) = 'not' I_el(Y) by A1,A7
,Def13,Def14;
        hence thesis by A9,A8,Def14,Th1;
      end;
      case
A10:    (for x being Element of Y holds a.x=FALSE) & not (for x being
        Element of Y holds a.x=TRUE);
A11:    for x being Element of Y holds ('not' a).x= TRUE
        proof
          let x be Element of Y;
          'not' (FALSE) = TRUE;
          then 'not' a.x= TRUE by A10;
          hence thesis by MARGREL1:def 19;
        end;
        'not' B_SUP(a) = 'not' O_el(Y) by A10,Def14;
        then
A12:    'not' B_SUP(a) = I_el(Y) by Th1;
        B_SUP('not' a) = I_el(Y) & 'not' B_INF(a) = 'not' O_el(Y) by A3,A10
,Def13,Def14;
        hence thesis by A12,A11,Def13,Th1;
      end;
      case
A13:    (for x being Element of Y holds a.x=TRUE ) & for x being
        Element of Y holds a.x=FALSE;
        let x be Element of Y;
        a.x=TRUE by A13;
        hence thesis by A13;
      end;
    end;
    hence thesis;
  end;
  now
    assume that
A14: not( for x being Element of Y holds a.x=TRUE ) and
A15: not(for x being Element of Y holds a.x=FALSE);
    'not' B_INF(a) = 'not' O_el(Y) by A14,Def13;
    then
A16: 'not' B_INF(a) = I_el(Y) by Th1;
    'not' B_SUP(a) = 'not' I_el(Y) & B_INF('not' a) = O_el(Y) by A1,A15,Def13
,Def14;
    hence thesis by A3,A14,A16,Def14,Th1;
  end;
  hence thesis by A5;
end;
