?- setof(Author, Book^Pages^(book_author(Book, Author), book_pages(Book, Pages), Pages > 1000), Authors).
Depending on the structure of the Prolog database, it could be shorter: ?- setof(Author, Pages^(book(_, Author, Pages), Pages > 1000), Authors).
Maybe this is just an XKCD moment https://xkcd.com/1172/ ...