% -*-Prolog-*- :- expects_dialect(pfc). % A company is a kind of business entity with at least one officer. Known % companies include XYZ_CORP and ABC_CORP. All of a company's officers % are people, subsidiaries of companies are themselves companies, and for % any given company C and any given subsidiary S of C, C is an owner of S. % % (define_prim_relation COMPANY (?c) % (and (BUSINESS_ENTITY ?c) (at_least 1 (OFFICER ?c)))) % (COMPANY XYZ_CORP) % (COMPANY ABC_CORP) % (forall (COMPANY ?c) % (and (all (OFFICER ?c) (PERSON)) % (all (SUBSIDIARY ?c) (COMPANY)) % (forall ?s (implies (SUBSIDIARY ?c ?s) % (OWNED_BY ?s ?c))))) % business_entity(C), officer(C,P) ==> company(C). company(xyz_corp). company(abc_corp). company(C,) ==> (officer(C,P) ==> person(P)), (subsidiary(C,C2) ==> company(C), owned_by(C2,C)).