Facts are statements that describe object properties or relations between objects. Let us imagine we want to encode that Ulysses, Penelope, Telemachus, Achilles, and others are characters of Homer’s ended with a period: 

From these examples, we understand that the general form of a Prolog fact is: relation(object1, object2, …, objectn) objects, such as normally strings of letters, digits, or underscores  letter. An atom can also be a string beginning with an uppercase letter or including white spaces, but it must be enclosed between quotes. Thus . Symbols or names representingulysses or penelope, are called atoms. Atoms are_”, and begin with a lowercase’Ulysses’ or ’Pallas Athena’ In logic, the name of the symbolic are legal atoms.relation is the predicate, the objects object1 and the number by its name and arity: , object2, . . . , objectn involved in the relation are the arguments,n of the arguments is the arity. Traditionally, a Prolog predicate is indicatedpredicate/arity, for example, character/2, king/3

Iliad and Odyssey. This translates into Prolog facts    character(priam, iliad). character(hecuba, iliad).


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s