reserve v,x for object;
reserve D,V,A for set;
reserve n for Nat;
reserve p,q for PartialPredicate of D;
reserve f,g for BinominativeFunction of D;
reserve D for non empty set;
reserve d for Element of D;
reserve f,g for BinominativeFunction of D;
reserve p,q,r,s for PartialPredicate of D;

theorem
  <*PP_and(r,p),f,q*> is SFHT of D &
  <*PP_and(PP_not(r),p),g,q*> is SFHT of D implies
  <*p,PP_IF(r,f,g),q*> is SFHT of D
  proof
    set F = PP_IF(r,f,g);
    set P = PP_and(r,p);
    set Q = PP_not(r);
    set R = PP_and(Q,p);
    assume that
A1: <*P,f,q*> is SFHT of D and
A2: <*R,g,q*> is SFHT of D;
    for d holds d in dom p & p.d = TRUE & d in dom F & F.d in dom q implies
     q.(F.d) = TRUE
    proof
      let d;
      assume that
A3:   d in dom p and
A4:   p.d = TRUE and
A5:   d in dom F and
A6:   F.d in dom q;
A7:   dom(P) = {d where d is Element of D:
       d in dom r & r.d = FALSE or d in dom p & p.d = FALSE
       or d in dom r & r.d = TRUE & d in dom p & p.d = TRUE} by PARTPR_1:16;
A8:   dom(R) = {d where d is Element of D:
       d in dom Q & Q.d = FALSE or d in dom p & p.d = FALSE
       or d in dom Q & Q.d = TRUE & d in dom p & p.d = TRUE} by PARTPR_1:16;
      dom(F) = {d where d is Element of D:
       d in dom r & r.d = TRUE & d in dom f
      or d in dom r & r.d = FALSE & d in dom g} by PARTPR_2:def 11;
      then consider d1 being Element of D such that
A9:   d = d1 and
A10:  d1 in dom r & r.d1 = TRUE & d1 in dom f
      or d1 in dom r & r.d1 = FALSE & d1 in dom g by A5;
      reconsider d1 as Element of D;
      now
        per cases by A10;
        suppose that
A11:      d1 in dom r and
A12:      r.d1 = TRUE and
A13:      d1 in dom f;
A14:      F.d = f.d by A9,A11,A12,A13,PARTPR_2:def 11;
A15:      d in dom P by A3,A4,A7,A9,A11,A12;
          P.d = TRUE by A3,A4,A9,A11,A12,PARTPR_1:18;
          hence q.(F.d) = TRUE by A1,A6,A9,A13,A14,A15,Th11;
        end;
        suppose that
A16:      d1 in dom r and
A17:      r.d1 = FALSE and
A18:      d1 in dom g;
A19:      F.d = g.d by A9,A16,A17,A18,PARTPR_2:def 11;
A20:      d in dom Q by A9,A16,PARTPR_1:def 2;
A21:      Q.d = TRUE by A9,A16,A17,PARTPR_1:def 2;
          then
A22:      R.d = TRUE by A3,A4,A20,PARTPR_1:18;
          d in dom R by A3,A4,A8,A20,A21;
          hence q.(F.d) = TRUE by A2,A6,A9,A18,A19,A22,Th11;
        end;
      end;
      hence thesis;
    end;
    then <*p,F,q*> in SFHTs(D);
    hence thesis;
  end;
