MemberLink
The MemberLink is a type of Link used to indicate set membership. MemberLinks should always have arity two:
MemberLink SomeAtom "the element" OtherAtom "the set which the element belongs to"
which denotes the set membership function x ∈ S with x being the element, and S being the set to which x belongs to. The TruthValue associated with a MemberLink is meant to indicate fuzzy set membership. Thus,
MemberLink <0.1> ConceptNode "dinner plate" ConceptNode "things that hold water"
suggests that while dinner plates could hold water, they are not very good at it (in the context of ordinary dining).
Contents
Beta reduction and beta normal form
MemberLinks are commonly used to write a beta redex form, when used with a SatisfyingSetLink.
For example, set membership to be indicated as follows:
MemberLink ConceptNode "animals" SatisfyingSetLink EvaluationLink PredicateNode "breathe" ListLink VariableNode "$X" ConceptNode "air"
which states that "animals" belong to the set of "things $X that breath air". The above can be understood to be a beta redex, and, by applying beta-reduction, it can be reduced to the much smaller and simpler constant expression:
EvaluationLink PredicateNode "breathe" ListLink ConceptNode "animals" ConceptNode "air"
which just states that "animals breath air".
The MemberLink is the declarative form of the PutLink. That is, the PutLink also specifies a beta redex, but a PutLink can be executed (with the cog-execute! function) to force the beta reduction to happen. By contrast, the MemberLink is a passive declaration of facts that hold true. Thus, the imperative equivalent of the above is:
PutLink EvaluationLink PredicateNode "breathe" ListLink VariableNode "$X" ConceptNode "air" ConceptNode "animals"
When this PutLink is executed, the EvaluationLink will be created, with "animals" substituted for the variable. Executing the PutLink explicitly puts "animals" into the "set of things that breath air".
More information
For more information see
Truth Values
The truth-value semantics of EvaluationLinks (and therefore of MemberLink's) is not one of conditional probability. Instead, it is given by the function or CombinatorTree that represents the corresponding Predicate. (??? unclear...)
CAUTION: in PLN, it is assumed that the truth value of EvaluationLink and MemberLink is a fuzzy set membership value, and NOT a probabilistic truth value. Neither the C++ code, nor the python or scheme wrappers distinguish these two types of truth values at this time. Combining these two different kinds of truth values can and will result in crazy results. Caveat Emptor!
Beta reduction in PLN
The PLN rule MemberToEvaluationRule will take a MemberLink (i.e. a link that is a beta redex) and beta-reduce it to an EvaluationLink. The EvaluationToMemberRule performs the opposite conversion (eta-conversion).