reserve x for object;
reserve D for set;
reserve p for PartialPredicate of D;
reserve D for non empty set;
reserve p,q,r for PartialPredicate of D;

theorem Th29:
  PP_and(p,PP_or(p,q)) = p
  proof
    set o = PP_or(p,q);
    set a = PP_and(p,o);
A1: dom a = {d where d is Element of D:
     d in dom p & p.d = FALSE or d in dom o & o.d = FALSE
     or d in dom p & p.d = TRUE & d in dom o & o.d = TRUE} by Th16;
A2: dom o = {d where d is Element of D:
     d in dom p & p.d = TRUE or d in dom q & q.d = TRUE
     or d in dom p & p.d = FALSE & d in dom q & q.d = FALSE} by Def4;
    thus dom a = dom p
    proof
      thus dom a c= dom p
      proof
        let d be object;
        assume d in dom a;
        then per cases by Th17;
        suppose that
A3:       d in dom o and
A4:       o.d = FALSE;
          per cases by A3,Th8;
          suppose d in dom p & p.d = TRUE;
            hence thesis;
          end;
          suppose d in dom q & q.d = TRUE
            or d in dom p & p.d = FALSE & d in dom q & q.d = FALSE;
            hence thesis by A4,Def4;
          end;
        end;
        suppose d in dom p & p.d = FALSE
          or d in dom p & p.d = TRUE & d in dom o & o.d = TRUE;
          hence thesis;
        end;
      end;
      let d be object;
      assume
A5:   d in dom p;
      then per cases by Th3;
      suppose
A6:     p.d = TRUE;
        then
A7:     o.d = TRUE by A5,Def4;
        d in dom o by A2,A5,A6;
        hence thesis by A1,A5,A6,A7;
      end;
      suppose p.d = FALSE;
        hence thesis by A1,A5;
      end;
    end;
    let d be object;
    assume d in dom a;
    then per cases by Th17;
    suppose that
A8:   d in dom o and
A9:  o.d = FALSE;
      per cases by A8,Th8;
      suppose d in dom p & p.d = TRUE;
        hence thesis by A9,Def4;
      end;
      suppose d in dom q & q.d = TRUE;
        hence thesis by A9,Def4;
      end;
      suppose d in dom p & p.d = FALSE & d in dom q & q.d = FALSE;
        hence thesis by Th19;
      end;
    end;
    suppose d in dom p & p.d = FALSE;
      hence thesis by Th19;
    end;
    suppose d in dom p & p.d = TRUE & d in dom o & o.d = TRUE;
      hence thesis by Th18;
    end;
  end;
