rnel.operators
¶
Priority-product operators (Sections 5.2, 6.2 and 8.3 of Smarandache and Leyva-Vázquez).
A tuple is a dict {component: value}. Conjunction multiplies every pair of components and assigns each product to the component of higher priority; components in the same tier share a product equally. Disjunction uses the reverse order and equals the De Morgan dual of conjunction.
Tuple = dict[str, float]
module-attribute
¶
TINF_AND = [['T'], ['N'], ['I'], ['F']]
module-attribute
¶
TINF_OR = [['F'], ['I'], ['N'], ['T']]
module-attribute
¶
priority_product(x, y, tiers)
¶
Conjunction-type product with tiers ordered from lowest to highest priority.
Source code in src/rnel/operators.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | |
mass(x)
¶
Source code in src/rnel/operators.py
31 32 | |
tinf_not(x)
¶
Negation kept from (T, I, N, F): (F, N, I, T).
Source code in src/rnel/operators.py
40 41 42 | |
tinf_and(x, y)
¶
Source code in src/rnel/operators.py
45 46 | |
tinf_or(x, y)
¶
Source code in src/rnel/operators.py
49 50 | |
mu_tiers(n, disjunction=False)
¶
Source code in src/rnel/operators.py
54 55 56 | |
mu_not(x)
¶
(T, I, N, U1..Un, F) -> (F, N, I, U1..Un, T).
Source code in src/rnel/operators.py
59 60 61 62 63 | |
mu_and(x, y)
¶
Source code in src/rnel/operators.py
66 67 68 | |
mu_or(x, y)
¶
Source code in src/rnel/operators.py
71 72 73 | |
rnel_tiers(components, disjunction=False)
¶
Source code in src/rnel/operators.py
77 78 79 80 | |
rnel_not(x)
¶
Only T and F swap: contradiction, undetermined, neither and ignorance are fixed points (Belnap).
Source code in src/rnel/operators.py
83 84 85 86 87 | |
rnel_and(x, y)
¶
Source code in src/rnel/operators.py
90 91 | |
rnel_or(x, y)
¶
Source code in src/rnel/operators.py
94 95 | |
implies(x, y, neg, disj)
¶
x -> y := not x or y.
Source code in src/rnel/operators.py
98 99 100 | |
coarsen(x)
¶
pi: (T, everything else, F) -> SL (b, u, d) coordinates, unnormalised.
Source code in src/rnel/operators.py
103 104 105 106 | |
calibrated_and(x, y, ax, ay, conj=tinf_and)
¶
Base-rate-calibrated conjunction: the priority-product conjunction conj (tinf_and, mu_and or rnel_and)
plus the transfer K = [(1-ax) ay T_x I_y + ax (1-ay) I_x T_y] / (1 - ax ay) from indeterminacy to T, where
I is the total indeterminacy mass. On normalised inputs its coarsening is SL multiplication with base
rates ax, ay. The base rate of the result is ax * ay.
Source code in src/rnel/operators.py
128 129 130 131 132 133 134 135 136 137 138 | |
calibrated_or(x, y, ax, ay, disj=tinf_or)
¶
Base-rate-calibrated disjunction: disj plus the transfer
K = [ax (1-ay) F_x I_y + (1-ax) ay I_x F_y] / (ax + ay - ax ay) from indeterminacy to F. On normalised
inputs its coarsening is SL comultiplication with base rates ax, ay. The base rate of the result is
ax + ay - ax * ay.
Source code in src/rnel/operators.py
141 142 143 144 145 146 147 148 149 150 151 | |