# PredicateNode

The ** PredicateNode** names the predicate of a relation. Predicates are functions that have arguments, and produce a truth value as output. These are commonly used with EvaluationLinks, which specify the arguments to the predicate.

Predicates in OpenCog roughly resemble the predicate of first-order logic. However, because all atoms in the AtomSpace carry a truth value, the concept of a predicate in OpenCog is more general than that of a predicate in first-order logic. It is more closely akin to an characteristic function in probability theory, which helps assign a floating-point truth value to a declaration, or to a classifying topos in mathematical logic, which is used to assign arbitrary "truth values" or "classifications" to expressions.

## Contents

## Example

The following uses the `PredicateNode "breathe"`

to define things that breathe air:

EvaluationLink PredicateNode "breathe" ListLink VariableNode "$X" ConceptNode "air"

This can be converted to the concept of "all things that breath air" by means of the SatisfyingSetLink.

## Usage

Some usage notes:

- New PredicateNodes can be defined by using EquivalenceLinks and DefineLinks.

- A PredicateNode can be converted into a ConceptNode, by means of its satisfying set. The SatisfyingSetLink, together with the EquivalenceLink, is used to perform this conversion.

- A GroundedPredicateNode specifies a predicate whose truth value is updated by the evaluation of a scheme, python or C++ code snippet. It is analogous to GroundedSchemaNodes.

- See the page on CombinatorsAndProcedureNodes for a more detailed discussion of what PredicateNodes are, and how they work.

## PLN Semantics

In PLN, the TruthValue of a PredicateNode is defined as the average over all evaluations of that predicate. Roughly speaking, it is the probability of that predicate being true in the universe of all things. The AverageLink page provides an explicit example.