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).