Or Formula

From OpenCog

Or Formula

Inputs: list of truth values t_0, t_1, ..., t_(n-1)

Output: total_s = tvs[0]

            for tv in tvs[1:]:
               andAB = total_s * tv.mean
                total_s = total_s + tv.mean - andAB
            return total_s

Consistency conditions: none

Comments: The current Python code is incorrect. The formula calculated in the loop above uses inclusion-exclusion to find the value of OR(t_0, t_1, ...)

Formulas can be implemented in Atomese using the PredicateFormulaLink.