We have revised `AI2' to `ai2'. We could have simply put quotes
around as in studies(bill,
where the reading is that the population of the first object in the relation population/2 is the second object expressed in millions of people.
Note we have changed `France' to `france'.
Here, the statement has been expressed as a unary `relation' of something being a rich country.
We have covered a similar example previously.
We have asserted that the attribute of primeness belongs to the number 2.
The statement has been turned into the equivalent `everybody who is welsh is british'. This is an alternative to the statement subset(welsh,british). We read this as meaning that the subset/2 relation holds between the set of welsh people and the set of british people.
As usual, we have lower-cased the words `Welsh' and `British'.
This is a trick question. You cannot answer this one from the notes. Why not? Well, let me give the meaning of the above: the author/2 relation holds between `hamlet' (which stands for the famous play called ``Hamlet: Prince of Denmark'') and the unique atom `someone' which has been conjured from thin air.
The problem lies in expressing existential statements such as ``someone likes ice-cream'' and so on. This is informally recast as there exists some person such that this person likes ice-cream. In first order predicate logic, we would formalise this as x likes(x,ice_cream). This can be turned into likes(whatshisname,ice_cream) (this is known as Skolemisation). Without going into technicalities, we give a legitimate context when this `trick' can be done ---whenever we have no universal quantifiers ( i.e. indicated by words such as all, everyone, etc) then we may introduce a unique atom (we should be able to guarantee its uniqueness) to stand for the `someone'.
This is an example of a universally quantified statement. It is equivalent to x human(x) mortal(x).
Note that, in the Prolog version, this `universal quantification' is implicit.
Again, the universal quantification is implicit in the Prolog version.
Here, we have a body with a conjunction of two goals. This could be avoided with pays_taxes(X):- rich_person(X). Which you prefer depends on the way other relevant information is to be used or, how it is provided.
This is a version where it is true that `Bill' takes his umbrella whenever it is raining.
Note that in many of these examples, there is no mention of how the truth of various statements change with time.
Here, we might have tried to write supper(X):- naughty(X). This is, however, illegal in Prolog but not for syntactic reasons.
Another way of doing this might be eats_supper(X,false):- naughty(X). This allows for a more uniform treatment of both those who are `naughty' and those who aren't.
Again, we have gone for the representation `most likely' to be useful.
We could hide much of this as firebrigade_employs(X):- over_six_foot(X).