eyeprolog 1.6.12 → 1.6.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/examples/proof/abstract-interpretation.pl +146 -0
  2. package/examples/proof/ackermann.pl +296 -0
  3. package/examples/proof/alignment-demo.pl +196 -0
  4. package/examples/proof/allen-interval-calculus.pl +1271 -0
  5. package/examples/proof/auroracare.pl +954 -0
  6. package/examples/proof/basic-monadic.pl +37176 -0
  7. package/examples/proof/bayes-therapy.pl +1349 -0
  8. package/examples/proof/bench.pl +2802 -0
  9. package/examples/proof/binomial-vandermonde.pl +983 -0
  10. package/examples/proof/blocks-world-planning.pl +471 -0
  11. package/examples/proof/bmi.pl +386 -0
  12. package/examples/proof/braking-safety-worlds.pl +508 -0
  13. package/examples/proof/buck-converter-design.pl +179 -0
  14. package/examples/proof/bulk-stream-write.pl +3 -0
  15. package/examples/proof/collatz-1000.pl +43784 -0
  16. package/examples/proof/competitive-enzyme-kinetics.pl +167 -0
  17. package/examples/proof/complex.pl +514 -0
  18. package/examples/proof/context-schema-audit.pl +374 -0
  19. package/examples/proof/continued-fraction-sqrt2.pl +476 -0
  20. package/examples/proof/control-system.pl +137 -0
  21. package/examples/proof/critical-path-schedule.pl +491 -0
  22. package/examples/proof/cross-organization-data-sharing.pl +732 -0
  23. package/examples/proof/cyclic-path.pl +44 -0
  24. package/examples/proof/dairy-energy-balance.pl +290 -0
  25. package/examples/proof/dcg-expression-language.pl +157 -0
  26. package/examples/proof/deep-taxonomy-10.pl +185 -0
  27. package/examples/proof/deep-taxonomy-100.pl +365 -0
  28. package/examples/proof/deep-taxonomy-1000.pl +163 -0
  29. package/examples/proof/deep-taxonomy-10000.pl +163 -0
  30. package/examples/proof/deep-taxonomy-100000.pl +163 -0
  31. package/examples/proof/delfour.pl +1615 -0
  32. package/examples/proof/dijkstra-findall-sort.pl +354 -0
  33. package/examples/proof/dijkstra-risk-path.pl +820 -0
  34. package/examples/proof/dijkstra.pl +753 -0
  35. package/examples/proof/dining-philosophers.pl +2663 -0
  36. package/examples/proof/donald-gerald-robert.pl +311 -0
  37. package/examples/proof/dpv-odrl-purpose-mapping.pl +1189 -0
  38. package/examples/proof/drone-corridor-planner.pl +2365 -0
  39. package/examples/proof/easter-computus.pl +1406 -0
  40. package/examples/proof/eulerian-path.pl +457 -0
  41. package/examples/proof/ev-range-worlds.pl +508 -0
  42. package/examples/proof/exoplanet-validation-worlds.pl +397 -0
  43. package/examples/proof/explainable-ev-depot-configuration.pl +313 -0
  44. package/examples/proof/family-cousins.pl +920 -0
  45. package/examples/proof/fast-fourier-transform.pl +5045 -0
  46. package/examples/proof/fastpow.pl +769 -0
  47. package/examples/proof/fft8-numeric.pl +685 -0
  48. package/examples/proof/fibonacci.pl +1425 -0
  49. package/examples/proof/field-nitrogen-balance.pl +320 -0
  50. package/examples/proof/flandor.pl +533 -0
  51. package/examples/proof/fundamental-theorem-arithmetic.pl +245 -0
  52. package/examples/proof/gd-step-certified.pl +1717 -0
  53. package/examples/proof/goldbach.pl +1135 -0
  54. package/examples/proof/gps.pl +627 -0
  55. package/examples/proof/graph.pl +105 -0
  56. package/examples/proof/gray-code-counter.pl +355 -0
  57. package/examples/proof/hamiltonian-path.pl +3373 -0
  58. package/examples/proof/hamming-code.pl +232 -0
  59. package/examples/proof/heron-theorem.pl +79 -0
  60. package/examples/proof/http-client.pl +0 -0
  61. package/examples/proof/illegitimate-reasoning.pl +220 -0
  62. package/examples/proof/integer-partitions.pl +1642 -0
  63. package/examples/proof/iso-atomic-conversion.pl +73 -0
  64. package/examples/proof/knowledge-engineering-alignment-flow.pl +200 -0
  65. package/examples/proof/knuth-bendix-completion.pl +290 -0
  66. package/examples/proof/law-of-cosines.pl +71 -0
  67. package/examples/proof/least-squares-regression.pl +342 -0
  68. package/examples/proof/lee.pl +637 -0
  69. package/examples/proof/lldm.pl +581 -0
  70. package/examples/proof/manufacturing-quality-control.pl +181 -0
  71. package/examples/proof/map-four-color-search.pl +796 -0
  72. package/examples/proof/markov-logic-network.pl +405 -0
  73. package/examples/proof/matrix-chain-order.pl +164 -0
  74. package/examples/proof/matrix-noncommutativity.pl +183 -0
  75. package/examples/proof/microgrid-dispatch.pl +164 -0
  76. package/examples/proof/missionaries-cannibals.pl +428 -0
  77. package/examples/proof/modular-exponentiation.pl +838 -0
  78. package/examples/proof/monkey-bananas.pl +278 -0
  79. package/examples/proof/network-sla.pl +100 -0
  80. package/examples/proof/newton-raphson.pl +520 -0
  81. package/examples/proof/observability-log-correlation.pl +1061 -0
  82. package/examples/proof/odrl-dpv-fpv-trust-flow.pl +1366 -0
  83. package/examples/proof/odrl-dpv-healthcare-risk-ranked.pl +488 -0
  84. package/examples/proof/odrl-dpv-risk-ranked.pl +637 -0
  85. package/examples/proof/odrl-policy-advanced.pl +705 -0
  86. package/examples/proof/odrl-policy-reasoning.pl +1423 -0
  87. package/examples/proof/odrl-policy.pl +103 -0
  88. package/examples/proof/operational-incident-response.pl +435 -0
  89. package/examples/proof/orbital-transfer-design.pl +288 -0
  90. package/examples/proof/path-discovery.pl +502 -0
  91. package/examples/proof/peano-arithmetic.pl +910 -0
  92. package/examples/proof/peano-calculus.pl +294 -0
  93. package/examples/proof/pell-equation.pl +295 -0
  94. package/examples/proof/pendulum-period.pl +97 -0
  95. package/examples/proof/pi.pl +3 -0
  96. package/examples/proof/pointer-analysis.pl +94 -0
  97. package/examples/proof/polynomial.pl +2487 -0
  98. package/examples/proof/portable-library-overlap.pl +6 -0
  99. package/examples/proof/quadratic-formula.pl +159 -0
  100. package/examples/proof/quine-mccluskey.pl +914 -0
  101. package/examples/proof/radioactive-decay.pl +104 -0
  102. package/examples/proof/rdf12-annotated-claims.pl +263 -0
  103. package/examples/proof/register-allocation.pl +120 -0
  104. package/examples/proof/relational-cube-lookup.pl +15867 -0
  105. package/examples/proof/riemann-hypothesis.pl +148 -0
  106. package/examples/proof/sat-solver-dpll.pl +226 -0
  107. package/examples/proof/scientific-evidence-graph.pl +681 -0
  108. package/examples/proof/send-more-money.pl +252 -0
  109. package/examples/proof/service-impact.pl +151 -0
  110. package/examples/proof/shoelace-polygon-area.pl +161 -0
  111. package/examples/proof/skolem-functions.pl +128 -0
  112. package/examples/proof/statistics-summary.pl +250 -0
  113. package/examples/proof/stirling-bell-numbers.pl +125 -0
  114. package/examples/proof/superdense-coding.pl +118 -0
  115. package/examples/proof/symbiotic-knowledge-graph.pl +1569 -0
  116. package/examples/proof/truth-maintenance-system.pl +466 -0
  117. package/examples/proof/turing.pl +1183 -0
  118. package/examples/proof/type-inference.pl +267 -0
  119. package/examples/proof/vector-similarity.pl +163 -0
  120. package/examples/proof/vulnerability-impact.pl +180 -0
  121. package/examples/proof/wolf-goat-cabbage.pl +339 -0
  122. package/examples/proof/zebra.pl +176 -0
  123. package/package.json +1 -1
  124. package/src/check-proof.js +159 -11
  125. package/test/conformance/NEUMERKEL-LATEST.md +3 -3
  126. package/test/regression/cases-white-box.mjs +38 -0
  127. package/test/run-examples.mjs +7 -111
  128. package/test/run-proof-checking.mjs +28 -5
  129. package/the-art-of-eyeprolog.md +4 -2
@@ -0,0 +1,1349 @@
1
+ scores(case, [0.009282000000000002, 0.008208, 0.00012824999999999997, 0.00156408]).
2
+ evidenceTotal(case, 0.019182330000000004).
3
+ posteriors(case, [0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716]).
4
+ posterior(covid19, 0.48388282341092037).
5
+ posterior(influenza, 0.42789379600913957).
6
+ posterior(allergicRhinitis, 0.006685840562642804).
7
+ posterior(bacterialPneumonia, 0.08153754001729716).
8
+ expectedSuccess(paxlovid, 0.388517401170765).
9
+ expectedSuccess(oseltamivir, 0.28514101258814745).
10
+ expectedSuccess(antihistamine, 0.10026891936485297).
11
+ expectedSuccess(antibiotic, 0.1109525797960936).
12
+ expectedSuccess(supportiveCare, 0.2915119539701381).
13
+ expectedAdverse(paxlovid, 0.1).
14
+ expectedAdverse(oseltamivir, 0.08).
15
+ expectedAdverse(antihistamine, 0.03).
16
+ expectedAdverse(antibiotic, 0.07).
17
+ expectedAdverse(supportiveCare, 0.01).
18
+ utility(paxlovid, 3.5851740117076503).
19
+ utility(oseltamivir, 2.6114101258814744).
20
+ utility(antihistamine, 0.9126891936485296).
21
+ utility(antibiotic, 0.8995257979609361).
22
+ utility(supportiveCare, 2.8851195397013814).
23
+ recommendedTherapy(case, paxlovid).
24
+
25
+ clause(8, diseases(case, [covid19, influenza, allergicRhinitis, bacterialPneumonia]), true).
26
+ clause(9,
27
+ therapies(case, [paxlovid, oseltamivir, supportiveCare, antibiotic, antihistamine]),
28
+ true).
29
+ clause(10,
30
+ evidence(case, [ev(fever, true), ev(dryCough, true), ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)]),
31
+ true).
32
+ clause(11, prior(covid19, 0.05), true).
33
+ clause(12, prior(influenza, 0.03), true).
34
+ clause(13, prior(allergicRhinitis, 0.1), true).
35
+ clause(14, prior(bacterialPneumonia, 0.01), true).
36
+ clause(15, p_given(covid19, fever, 0.7), true).
37
+ clause(16, p_given(covid19, dryCough, 0.65), true).
38
+ clause(17, p_given(covid19, lossOfSmell, 0.4), true).
39
+ clause(18, p_given(covid19, sneezing, 0.15), true).
40
+ clause(19, p_given(covid19, shortBreath, 0.2), true).
41
+ clause(20, p_given(influenza, fever, 0.8), true).
42
+ clause(21, p_given(influenza, dryCough, 0.5), true).
43
+ clause(22, p_given(influenza, lossOfSmell, 0.05), true).
44
+ clause(23, p_given(influenza, sneezing, 0.2), true).
45
+ clause(24, p_given(influenza, shortBreath, 0.1), true).
46
+ clause(25, p_given(allergicRhinitis, fever, 0.05), true).
47
+ clause(26, p_given(allergicRhinitis, dryCough, 0.15), true).
48
+ clause(27, p_given(allergicRhinitis, lossOfSmell, 0.1), true).
49
+ clause(28, p_given(allergicRhinitis, sneezing, 0.8), true).
50
+ clause(29, p_given(allergicRhinitis, shortBreath, 0.05), true).
51
+ clause(30, p_given(bacterialPneumonia, fever, 0.7), true).
52
+ clause(31, p_given(bacterialPneumonia, dryCough, 0.6), true).
53
+ clause(32, p_given(bacterialPneumonia, lossOfSmell, 0.02), true).
54
+ clause(33, p_given(bacterialPneumonia, sneezing, 0.05), true).
55
+ clause(34, p_given(bacterialPneumonia, shortBreath, 0.6), true).
56
+ clause(35, therapy(paxlovid), true).
57
+ clause(36, therapy(oseltamivir), true).
58
+ clause(37, therapy(antihistamine), true).
59
+ clause(38, therapy(antibiotic), true).
60
+ clause(39, therapy(supportiveCare), true).
61
+ clause(40, success_by_disease(paxlovid, [0.75, 0.05, 0.02, 0.05]), true).
62
+ clause(41, success_by_disease(oseltamivir, [0.05, 0.6, 0.02, 0.05]), true).
63
+ clause(42, success_by_disease(antihistamine, [0.1, 0.1, 0.75, 0.05]), true).
64
+ clause(43, success_by_disease(antibiotic, [0.05, 0.05, 0.02, 0.8]), true).
65
+ clause(44, success_by_disease(supportiveCare, [0.3, 0.3, 0.25, 0.2]), true).
66
+ clause(45, adverse(paxlovid, 0.1), true).
67
+ clause(46, adverse(oseltamivir, 0.08), true).
68
+ clause(47, adverse(antihistamine, 0.03), true).
69
+ clause(48, adverse(antibiotic, 0.07), true).
70
+ clause(49, adverse(supportiveCare, 0.01), true).
71
+ clause(50, benefit_weight(10), true).
72
+ clause(51, harm_weight(3), true).
73
+ clause(52,
74
+ factor(var('Disease'), ev(var('Symptom'), true), var('P')),
75
+ p_given(var('Disease'), var('Symptom'), var('P'))).
76
+ clause(53,
77
+ factor(var('Disease'), ev(var('Symptom'), false), var('Q')),
78
+ (p_given(var('Disease'), var('Symptom'), var('P')), var('Q') is 1.0 - var('P'))).
79
+ clause(54, likelihood(anonymous(1), [], 1.0), true).
80
+ clause(55,
81
+ likelihood(var('Disease'), [var('Evidence') | var('Rest')], var('Likelihood')),
82
+ (factor(var('Disease'), var('Evidence'), var('Factor')),
83
+ likelihood(var('Disease'), var('Rest'), var('Taillikelihood')),
84
+ var('Likelihood') is var('Factor') * var('Taillikelihood'))).
85
+ clause(56,
86
+ score(var('Disease'), var('Score')),
87
+ (prior(var('Disease'), var('Prior')),
88
+ evidence(case, var('Evidence')),
89
+ likelihood(var('Disease'), var('Evidence'), var('Likelihood')),
90
+ var('Score') is var('Prior') * var('Likelihood'))).
91
+ clause(57, scores_for([], []), true).
92
+ clause(58,
93
+ scores_for([var('Disease') | var('Restdiseases')], [var('Score') | var('Restscores')]),
94
+ (score(var('Disease'), var('Score')), scores_for(var('Restdiseases'), var('Restscores')))).
95
+ clause(59, score_sum([], 0.0), true).
96
+ clause(60,
97
+ score_sum([var('Value') | var('Rest')], var('Sum')),
98
+ (score_sum(var('Rest'), var('Tailsum')), var('Sum') is var('Value') + var('Tailsum'))).
99
+ clause(61, normalize_scores([], anonymous(1), []), true).
100
+ clause(62,
101
+ normalize_scores([var('Score') | var('Restscores')], var('Total'), [var('Posterior') | var('Restposteriors')]),
102
+ (var('Posterior') is var('Score') / var('Total'),
103
+ normalize_scores(var('Restscores'), var('Total'), var('Restposteriors')))).
104
+ clause(63,
105
+ disease_posterior([var('Disease') | anonymous(1)], [var('Posterior') | anonymous(2)], var('Disease'), var('Posterior')),
106
+ true).
107
+ clause(64,
108
+ disease_posterior([anonymous(1) | var('Restdiseases')], [anonymous(2) | var('Restposteriors')], var('Disease'), var('Posterior')),
109
+ disease_posterior(var('Restdiseases'), var('Restposteriors'), var('Disease'), var('Posterior'))).
110
+ clause(65, dot_product([], [], 0.0), true).
111
+ clause(66,
112
+ dot_product([var('Left') | var('Restleft')], [var('Right') | var('Restright')], var('Sum')),
113
+ (var('Term') is var('Left') * var('Right'),
114
+ dot_product(var('Restleft'), var('Restright'), var('Tailsum')),
115
+ var('Sum') is var('Term') + var('Tailsum'))).
116
+ clause(67,
117
+ expected_success(var('Therapy'), var('Expectedsuccess')),
118
+ (posteriors(case, var('Posteriors')),
119
+ success_by_disease(var('Therapy'), var('Successbydisease')),
120
+ dot_product(var('Posteriors'), var('Successbydisease'), var('Expectedsuccess')))).
121
+ clause(68,
122
+ therapy_utility(var('Therapy'), var('Utility')),
123
+ (expected_success(var('Therapy'), var('Expectedsuccess')),
124
+ adverse(var('Therapy'), var('Adverse')),
125
+ benefit_weight(var('Benefitweight')),
126
+ harm_weight(var('Harmweight')),
127
+ var('Benefit') is var('Benefitweight') * var('Expectedsuccess'),
128
+ var('Harmcost') is var('Harmweight') * var('Adverse'),
129
+ var('Utility') is var('Benefit') - var('Harmcost'))).
130
+ clause(69,
131
+ better_of(var('Therapy1'), var('Therapy2'), var('Therapy1')),
132
+ (therapy_utility(var('Therapy1'), var('Utility1')),
133
+ therapy_utility(var('Therapy2'), var('Utility2')),
134
+ var('Utility1') >= var('Utility2'))).
135
+ clause(70,
136
+ better_of(var('Therapy1'), var('Therapy2'), var('Therapy2')),
137
+ (therapy_utility(var('Therapy1'), var('Utility1')),
138
+ therapy_utility(var('Therapy2'), var('Utility2')),
139
+ var('Utility1') < var('Utility2'))).
140
+ clause(71, best_therapy([var('Therapy')], var('Therapy')), true).
141
+ clause(72,
142
+ best_therapy([var('Head'), var('Next') | var('Rest')], var('Best')),
143
+ (best_therapy([var('Next') | var('Rest')], var('Bestrest')),
144
+ better_of(var('Head'), var('Bestrest'), var('Best')))).
145
+ clause(73,
146
+ scores(case, var('Scores')),
147
+ (diseases(case, var('Diseases')), scores_for(var('Diseases'), var('Scores')))).
148
+ clause(74,
149
+ evidenceTotal(case, var('Total')),
150
+ (scores(case, var('Scores')), score_sum(var('Scores'), var('Total')))).
151
+ clause(75,
152
+ posteriors(case, var('Posteriors')),
153
+ (scores(case, var('Scores')),
154
+ evidenceTotal(case, var('Total')),
155
+ normalize_scores(var('Scores'), var('Total'), var('Posteriors')))).
156
+ clause(76,
157
+ posterior(var('Disease'), var('Posterior')),
158
+ (diseases(case, var('Diseases')),
159
+ posteriors(case, var('Posteriors')),
160
+ disease_posterior(var('Diseases'), var('Posteriors'), var('Disease'), var('Posterior')))).
161
+ clause(77,
162
+ expectedSuccess(var('Therapy'), var('Expectedsuccess')),
163
+ (therapy(var('Therapy')), expected_success(var('Therapy'), var('Expectedsuccess')))).
164
+ clause(78,
165
+ expectedAdverse(var('Therapy'), var('Adverse')),
166
+ (therapy(var('Therapy')), adverse(var('Therapy'), var('Adverse')))).
167
+ clause(79,
168
+ utility(var('Therapy'), var('Utility')),
169
+ (therapy(var('Therapy')), therapy_utility(var('Therapy'), var('Utility')))).
170
+ clause(80,
171
+ recommendedTherapy(case, var('Best')),
172
+ (therapies(case, var('Therapies')), best_therapy(var('Therapies'), var('Best')))).
173
+
174
+ step(scores(case, [0.009282000000000002, 0.008208, 0.00012824999999999997, 0.00156408]),
175
+ rule(73),
176
+ ['Scores' = [0.009282000000000002, 0.008208, 0.00012824999999999997, 0.00156408],
177
+ 'Diseases' = [covid19, influenza, allergicRhinitis, bacterialPneumonia]],
178
+ [diseases(case, [covid19, influenza, allergicRhinitis, bacterialPneumonia]),
179
+ scores_for([covid19, influenza, allergicRhinitis, bacterialPneumonia], [0.009282000000000002, 0.008208, 0.00012824999999999997, 0.00156408])]).
180
+ step(diseases(case, [covid19, influenza, allergicRhinitis, bacterialPneumonia]),
181
+ fact(8),
182
+ [],
183
+ []).
184
+ step(scores_for([covid19, influenza, allergicRhinitis, bacterialPneumonia], [0.009282000000000002, 0.008208, 0.00012824999999999997, 0.00156408]),
185
+ rule(58),
186
+ ['Disease' = covid19,
187
+ 'Restdiseases' = [influenza, allergicRhinitis, bacterialPneumonia],
188
+ 'Score' = 0.009282000000000002,
189
+ 'Restscores' = [0.008208, 0.00012824999999999997, 0.00156408]],
190
+ [score(covid19, 0.009282000000000002),
191
+ scores_for([influenza, allergicRhinitis, bacterialPneumonia], [0.008208, 0.00012824999999999997, 0.00156408])]).
192
+ step(score(covid19, 0.009282000000000002),
193
+ rule(56),
194
+ ['Disease' = covid19,
195
+ 'Score' = 0.009282000000000002,
196
+ 'Prior' = 0.05,
197
+ 'Evidence' = [ev(fever, true), ev(dryCough, true), ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)],
198
+ 'Likelihood' = 0.18564000000000003],
199
+ [prior(covid19, 0.05),
200
+ evidence(case, [ev(fever, true), ev(dryCough, true), ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)]),
201
+ likelihood(covid19, [ev(fever, true), ev(dryCough, true), ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)], 0.18564000000000003),
202
+ 0.009282000000000002 is 0.05 * 0.18564000000000003]).
203
+ step(prior(covid19, 0.05), fact(11), [], []).
204
+ step(evidence(case, [ev(fever, true), ev(dryCough, true), ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)]),
205
+ fact(10),
206
+ [],
207
+ []).
208
+ step(likelihood(covid19, [ev(fever, true), ev(dryCough, true), ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)], 0.18564000000000003),
209
+ rule(55),
210
+ ['Disease' = covid19,
211
+ 'Evidence' = ev(fever, true),
212
+ 'Rest' = [ev(dryCough, true), ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)],
213
+ 'Likelihood' = 0.18564000000000003,
214
+ 'Factor' = 0.7,
215
+ 'Taillikelihood' = 0.26520000000000005],
216
+ [factor(covid19, ev(fever, true), 0.7),
217
+ likelihood(covid19, [ev(dryCough, true), ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)], 0.26520000000000005),
218
+ 0.18564000000000003 is 0.7 * 0.26520000000000005]).
219
+ step(factor(covid19, ev(fever, true), 0.7),
220
+ rule(52),
221
+ ['Disease' = covid19, 'Symptom' = fever, 'P' = 0.7],
222
+ [p_given(covid19, fever, 0.7)]).
223
+ step(p_given(covid19, fever, 0.7), fact(15), [], []).
224
+ step(likelihood(covid19, [ev(dryCough, true), ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)], 0.26520000000000005),
225
+ rule(55),
226
+ ['Disease' = covid19,
227
+ 'Evidence' = ev(dryCough, true),
228
+ 'Rest' = [ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)],
229
+ 'Likelihood' = 0.26520000000000005,
230
+ 'Factor' = 0.65,
231
+ 'Taillikelihood' = 0.40800000000000003],
232
+ [factor(covid19, ev(dryCough, true), 0.65),
233
+ likelihood(covid19, [ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)], 0.40800000000000003),
234
+ 0.26520000000000005 is 0.65 * 0.40800000000000003]).
235
+ step(factor(covid19, ev(dryCough, true), 0.65),
236
+ rule(52),
237
+ ['Disease' = covid19, 'Symptom' = dryCough, 'P' = 0.65],
238
+ [p_given(covid19, dryCough, 0.65)]).
239
+ step(p_given(covid19, dryCough, 0.65), fact(16), [], []).
240
+ step(likelihood(covid19, [ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)], 0.40800000000000003),
241
+ rule(55),
242
+ ['Disease' = covid19,
243
+ 'Evidence' = ev(lossOfSmell, false),
244
+ 'Rest' = [ev(sneezing, false), ev(shortBreath, false)],
245
+ 'Likelihood' = 0.40800000000000003,
246
+ 'Factor' = 0.6,
247
+ 'Taillikelihood' = 0.68],
248
+ [factor(covid19, ev(lossOfSmell, false), 0.6),
249
+ likelihood(covid19, [ev(sneezing, false), ev(shortBreath, false)], 0.68),
250
+ 0.40800000000000003 is 0.6 * 0.68]).
251
+ step(factor(covid19, ev(lossOfSmell, false), 0.6),
252
+ rule(53),
253
+ ['Disease' = covid19, 'Symptom' = lossOfSmell, 'Q' = 0.6, 'P' = 0.4],
254
+ [p_given(covid19, lossOfSmell, 0.4), 0.6 is 1.0 - 0.4]).
255
+ step(p_given(covid19, lossOfSmell, 0.4), fact(17), [], []).
256
+ step(0.6 is 1.0 - 0.4, builtin, [], []).
257
+ step(likelihood(covid19, [ev(sneezing, false), ev(shortBreath, false)], 0.68),
258
+ rule(55),
259
+ ['Disease' = covid19,
260
+ 'Evidence' = ev(sneezing, false),
261
+ 'Rest' = [ev(shortBreath, false)],
262
+ 'Likelihood' = 0.68,
263
+ 'Factor' = 0.85,
264
+ 'Taillikelihood' = 0.8],
265
+ [factor(covid19, ev(sneezing, false), 0.85),
266
+ likelihood(covid19, [ev(shortBreath, false)], 0.8),
267
+ 0.68 is 0.85 * 0.8]).
268
+ step(factor(covid19, ev(sneezing, false), 0.85),
269
+ rule(53),
270
+ ['Disease' = covid19, 'Symptom' = sneezing, 'Q' = 0.85, 'P' = 0.15],
271
+ [p_given(covid19, sneezing, 0.15), 0.85 is 1.0 - 0.15]).
272
+ step(p_given(covid19, sneezing, 0.15), fact(18), [], []).
273
+ step(0.85 is 1.0 - 0.15, builtin, [], []).
274
+ step(likelihood(covid19, [ev(shortBreath, false)], 0.8),
275
+ rule(55),
276
+ ['Disease' = covid19,
277
+ 'Evidence' = ev(shortBreath, false),
278
+ 'Rest' = [],
279
+ 'Likelihood' = 0.8,
280
+ 'Factor' = 0.8,
281
+ 'Taillikelihood' = 1.0],
282
+ [factor(covid19, ev(shortBreath, false), 0.8),
283
+ likelihood(covid19, [], 1.0),
284
+ 0.8 is 0.8 * 1.0]).
285
+ step(factor(covid19, ev(shortBreath, false), 0.8),
286
+ rule(53),
287
+ ['Disease' = covid19, 'Symptom' = shortBreath, 'Q' = 0.8, 'P' = 0.2],
288
+ [p_given(covid19, shortBreath, 0.2), 0.8 is 1.0 - 0.2]).
289
+ step(p_given(covid19, shortBreath, 0.2), fact(19), [], []).
290
+ step(0.8 is 1.0 - 0.2, builtin, [], []).
291
+ step(likelihood(covid19, [], 1.0), fact(54), [], []).
292
+ step(0.8 is 0.8 * 1.0, builtin, [], []).
293
+ step(0.68 is 0.85 * 0.8, builtin, [], []).
294
+ step(0.40800000000000003 is 0.6 * 0.68, builtin, [], []).
295
+ step(0.26520000000000005 is 0.65 * 0.40800000000000003, builtin, [], []).
296
+ step(0.18564000000000003 is 0.7 * 0.26520000000000005, builtin, [], []).
297
+ step(0.009282000000000002 is 0.05 * 0.18564000000000003, builtin, [], []).
298
+ step(scores_for([influenza, allergicRhinitis, bacterialPneumonia], [0.008208, 0.00012824999999999997, 0.00156408]),
299
+ rule(58),
300
+ ['Disease' = influenza,
301
+ 'Restdiseases' = [allergicRhinitis, bacterialPneumonia],
302
+ 'Score' = 0.008208,
303
+ 'Restscores' = [0.00012824999999999997, 0.00156408]],
304
+ [score(influenza, 0.008208),
305
+ scores_for([allergicRhinitis, bacterialPneumonia], [0.00012824999999999997, 0.00156408])]).
306
+ step(score(influenza, 0.008208),
307
+ rule(56),
308
+ ['Disease' = influenza,
309
+ 'Score' = 0.008208,
310
+ 'Prior' = 0.03,
311
+ 'Evidence' = [ev(fever, true), ev(dryCough, true), ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)],
312
+ 'Likelihood' = 0.2736],
313
+ [prior(influenza, 0.03),
314
+ evidence(case, [ev(fever, true), ev(dryCough, true), ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)]),
315
+ likelihood(influenza, [ev(fever, true), ev(dryCough, true), ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)], 0.2736),
316
+ 0.008208 is 0.03 * 0.2736]).
317
+ step(prior(influenza, 0.03), fact(12), [], []).
318
+ step(likelihood(influenza, [ev(fever, true), ev(dryCough, true), ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)], 0.2736),
319
+ rule(55),
320
+ ['Disease' = influenza,
321
+ 'Evidence' = ev(fever, true),
322
+ 'Rest' = [ev(dryCough, true), ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)],
323
+ 'Likelihood' = 0.2736,
324
+ 'Factor' = 0.8,
325
+ 'Taillikelihood' = 0.342],
326
+ [factor(influenza, ev(fever, true), 0.8),
327
+ likelihood(influenza, [ev(dryCough, true), ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)], 0.342),
328
+ 0.2736 is 0.8 * 0.342]).
329
+ step(factor(influenza, ev(fever, true), 0.8),
330
+ rule(52),
331
+ ['Disease' = influenza, 'Symptom' = fever, 'P' = 0.8],
332
+ [p_given(influenza, fever, 0.8)]).
333
+ step(p_given(influenza, fever, 0.8), fact(20), [], []).
334
+ step(likelihood(influenza, [ev(dryCough, true), ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)], 0.342),
335
+ rule(55),
336
+ ['Disease' = influenza,
337
+ 'Evidence' = ev(dryCough, true),
338
+ 'Rest' = [ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)],
339
+ 'Likelihood' = 0.342,
340
+ 'Factor' = 0.5,
341
+ 'Taillikelihood' = 0.684],
342
+ [factor(influenza, ev(dryCough, true), 0.5),
343
+ likelihood(influenza, [ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)], 0.684),
344
+ 0.342 is 0.5 * 0.684]).
345
+ step(factor(influenza, ev(dryCough, true), 0.5),
346
+ rule(52),
347
+ ['Disease' = influenza, 'Symptom' = dryCough, 'P' = 0.5],
348
+ [p_given(influenza, dryCough, 0.5)]).
349
+ step(p_given(influenza, dryCough, 0.5), fact(21), [], []).
350
+ step(likelihood(influenza, [ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)], 0.684),
351
+ rule(55),
352
+ ['Disease' = influenza,
353
+ 'Evidence' = ev(lossOfSmell, false),
354
+ 'Rest' = [ev(sneezing, false), ev(shortBreath, false)],
355
+ 'Likelihood' = 0.684,
356
+ 'Factor' = 0.95,
357
+ 'Taillikelihood' = 0.7200000000000001],
358
+ [factor(influenza, ev(lossOfSmell, false), 0.95),
359
+ likelihood(influenza, [ev(sneezing, false), ev(shortBreath, false)], 0.7200000000000001),
360
+ 0.684 is 0.95 * 0.7200000000000001]).
361
+ step(factor(influenza, ev(lossOfSmell, false), 0.95),
362
+ rule(53),
363
+ ['Disease' = influenza, 'Symptom' = lossOfSmell, 'Q' = 0.95, 'P' = 0.05],
364
+ [p_given(influenza, lossOfSmell, 0.05), 0.95 is 1.0 - 0.05]).
365
+ step(p_given(influenza, lossOfSmell, 0.05), fact(22), [], []).
366
+ step(0.95 is 1.0 - 0.05, builtin, [], []).
367
+ step(likelihood(influenza, [ev(sneezing, false), ev(shortBreath, false)], 0.7200000000000001),
368
+ rule(55),
369
+ ['Disease' = influenza,
370
+ 'Evidence' = ev(sneezing, false),
371
+ 'Rest' = [ev(shortBreath, false)],
372
+ 'Likelihood' = 0.7200000000000001,
373
+ 'Factor' = 0.8,
374
+ 'Taillikelihood' = 0.9],
375
+ [factor(influenza, ev(sneezing, false), 0.8),
376
+ likelihood(influenza, [ev(shortBreath, false)], 0.9),
377
+ 0.7200000000000001 is 0.8 * 0.9]).
378
+ step(factor(influenza, ev(sneezing, false), 0.8),
379
+ rule(53),
380
+ ['Disease' = influenza, 'Symptom' = sneezing, 'Q' = 0.8, 'P' = 0.2],
381
+ [p_given(influenza, sneezing, 0.2), 0.8 is 1.0 - 0.2]).
382
+ step(p_given(influenza, sneezing, 0.2), fact(23), [], []).
383
+ step(likelihood(influenza, [ev(shortBreath, false)], 0.9),
384
+ rule(55),
385
+ ['Disease' = influenza,
386
+ 'Evidence' = ev(shortBreath, false),
387
+ 'Rest' = [],
388
+ 'Likelihood' = 0.9,
389
+ 'Factor' = 0.9,
390
+ 'Taillikelihood' = 1.0],
391
+ [factor(influenza, ev(shortBreath, false), 0.9),
392
+ likelihood(influenza, [], 1.0),
393
+ 0.9 is 0.9 * 1.0]).
394
+ step(factor(influenza, ev(shortBreath, false), 0.9),
395
+ rule(53),
396
+ ['Disease' = influenza, 'Symptom' = shortBreath, 'Q' = 0.9, 'P' = 0.1],
397
+ [p_given(influenza, shortBreath, 0.1), 0.9 is 1.0 - 0.1]).
398
+ step(p_given(influenza, shortBreath, 0.1), fact(24), [], []).
399
+ step(0.9 is 1.0 - 0.1, builtin, [], []).
400
+ step(likelihood(influenza, [], 1.0), fact(54), [], []).
401
+ step(0.9 is 0.9 * 1.0, builtin, [], []).
402
+ step(0.7200000000000001 is 0.8 * 0.9, builtin, [], []).
403
+ step(0.684 is 0.95 * 0.7200000000000001, builtin, [], []).
404
+ step(0.342 is 0.5 * 0.684, builtin, [], []).
405
+ step(0.2736 is 0.8 * 0.342, builtin, [], []).
406
+ step(0.008208 is 0.03 * 0.2736, builtin, [], []).
407
+ step(scores_for([allergicRhinitis, bacterialPneumonia], [0.00012824999999999997, 0.00156408]),
408
+ rule(58),
409
+ ['Disease' = allergicRhinitis,
410
+ 'Restdiseases' = [bacterialPneumonia],
411
+ 'Score' = 0.00012824999999999997,
412
+ 'Restscores' = [0.00156408]],
413
+ [score(allergicRhinitis, 0.00012824999999999997),
414
+ scores_for([bacterialPneumonia], [0.00156408])]).
415
+ step(score(allergicRhinitis, 0.00012824999999999997),
416
+ rule(56),
417
+ ['Disease' = allergicRhinitis,
418
+ 'Score' = 0.00012824999999999997,
419
+ 'Prior' = 0.1,
420
+ 'Evidence' = [ev(fever, true), ev(dryCough, true), ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)],
421
+ 'Likelihood' = 0.0012824999999999998],
422
+ [prior(allergicRhinitis, 0.1),
423
+ evidence(case, [ev(fever, true), ev(dryCough, true), ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)]),
424
+ likelihood(allergicRhinitis, [ev(fever, true), ev(dryCough, true), ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)], 0.0012824999999999998),
425
+ 0.00012824999999999997 is 0.1 * 0.0012824999999999998]).
426
+ step(prior(allergicRhinitis, 0.1), fact(13), [], []).
427
+ step(likelihood(allergicRhinitis, [ev(fever, true), ev(dryCough, true), ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)], 0.0012824999999999998),
428
+ rule(55),
429
+ ['Disease' = allergicRhinitis,
430
+ 'Evidence' = ev(fever, true),
431
+ 'Rest' = [ev(dryCough, true), ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)],
432
+ 'Likelihood' = 0.0012824999999999998,
433
+ 'Factor' = 0.05,
434
+ 'Taillikelihood' = 0.025649999999999992],
435
+ [factor(allergicRhinitis, ev(fever, true), 0.05),
436
+ likelihood(allergicRhinitis, [ev(dryCough, true), ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)], 0.025649999999999992),
437
+ 0.0012824999999999998 is 0.05 * 0.025649999999999992]).
438
+ step(factor(allergicRhinitis, ev(fever, true), 0.05),
439
+ rule(52),
440
+ ['Disease' = allergicRhinitis, 'Symptom' = fever, 'P' = 0.05],
441
+ [p_given(allergicRhinitis, fever, 0.05)]).
442
+ step(p_given(allergicRhinitis, fever, 0.05), fact(25), [], []).
443
+ step(likelihood(allergicRhinitis, [ev(dryCough, true), ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)], 0.025649999999999992),
444
+ rule(55),
445
+ ['Disease' = allergicRhinitis,
446
+ 'Evidence' = ev(dryCough, true),
447
+ 'Rest' = [ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)],
448
+ 'Likelihood' = 0.025649999999999992,
449
+ 'Factor' = 0.15,
450
+ 'Taillikelihood' = 0.17099999999999996],
451
+ [factor(allergicRhinitis, ev(dryCough, true), 0.15),
452
+ likelihood(allergicRhinitis, [ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)], 0.17099999999999996),
453
+ 0.025649999999999992 is 0.15 * 0.17099999999999996]).
454
+ step(factor(allergicRhinitis, ev(dryCough, true), 0.15),
455
+ rule(52),
456
+ ['Disease' = allergicRhinitis, 'Symptom' = dryCough, 'P' = 0.15],
457
+ [p_given(allergicRhinitis, dryCough, 0.15)]).
458
+ step(p_given(allergicRhinitis, dryCough, 0.15), fact(26), [], []).
459
+ step(likelihood(allergicRhinitis, [ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)], 0.17099999999999996),
460
+ rule(55),
461
+ ['Disease' = allergicRhinitis,
462
+ 'Evidence' = ev(lossOfSmell, false),
463
+ 'Rest' = [ev(sneezing, false), ev(shortBreath, false)],
464
+ 'Likelihood' = 0.17099999999999996,
465
+ 'Factor' = 0.9,
466
+ 'Taillikelihood' = 0.18999999999999995],
467
+ [factor(allergicRhinitis, ev(lossOfSmell, false), 0.9),
468
+ likelihood(allergicRhinitis, [ev(sneezing, false), ev(shortBreath, false)], 0.18999999999999995),
469
+ 0.17099999999999996 is 0.9 * 0.18999999999999995]).
470
+ step(factor(allergicRhinitis, ev(lossOfSmell, false), 0.9),
471
+ rule(53),
472
+ ['Disease' = allergicRhinitis, 'Symptom' = lossOfSmell, 'Q' = 0.9, 'P' = 0.1],
473
+ [p_given(allergicRhinitis, lossOfSmell, 0.1), 0.9 is 1.0 - 0.1]).
474
+ step(p_given(allergicRhinitis, lossOfSmell, 0.1), fact(27), [], []).
475
+ step(likelihood(allergicRhinitis, [ev(sneezing, false), ev(shortBreath, false)], 0.18999999999999995),
476
+ rule(55),
477
+ ['Disease' = allergicRhinitis,
478
+ 'Evidence' = ev(sneezing, false),
479
+ 'Rest' = [ev(shortBreath, false)],
480
+ 'Likelihood' = 0.18999999999999995,
481
+ 'Factor' = 0.19999999999999996,
482
+ 'Taillikelihood' = 0.95],
483
+ [factor(allergicRhinitis, ev(sneezing, false), 0.19999999999999996),
484
+ likelihood(allergicRhinitis, [ev(shortBreath, false)], 0.95),
485
+ 0.18999999999999995 is 0.19999999999999996 * 0.95]).
486
+ step(factor(allergicRhinitis, ev(sneezing, false), 0.19999999999999996),
487
+ rule(53),
488
+ ['Disease' = allergicRhinitis, 'Symptom' = sneezing, 'Q' = 0.19999999999999996, 'P' = 0.8],
489
+ [p_given(allergicRhinitis, sneezing, 0.8), 0.19999999999999996 is 1.0 - 0.8]).
490
+ step(p_given(allergicRhinitis, sneezing, 0.8), fact(28), [], []).
491
+ step(0.19999999999999996 is 1.0 - 0.8, builtin, [], []).
492
+ step(likelihood(allergicRhinitis, [ev(shortBreath, false)], 0.95),
493
+ rule(55),
494
+ ['Disease' = allergicRhinitis,
495
+ 'Evidence' = ev(shortBreath, false),
496
+ 'Rest' = [],
497
+ 'Likelihood' = 0.95,
498
+ 'Factor' = 0.95,
499
+ 'Taillikelihood' = 1.0],
500
+ [factor(allergicRhinitis, ev(shortBreath, false), 0.95),
501
+ likelihood(allergicRhinitis, [], 1.0),
502
+ 0.95 is 0.95 * 1.0]).
503
+ step(factor(allergicRhinitis, ev(shortBreath, false), 0.95),
504
+ rule(53),
505
+ ['Disease' = allergicRhinitis, 'Symptom' = shortBreath, 'Q' = 0.95, 'P' = 0.05],
506
+ [p_given(allergicRhinitis, shortBreath, 0.05), 0.95 is 1.0 - 0.05]).
507
+ step(p_given(allergicRhinitis, shortBreath, 0.05), fact(29), [], []).
508
+ step(likelihood(allergicRhinitis, [], 1.0), fact(54), [], []).
509
+ step(0.95 is 0.95 * 1.0, builtin, [], []).
510
+ step(0.18999999999999995 is 0.19999999999999996 * 0.95, builtin, [], []).
511
+ step(0.17099999999999996 is 0.9 * 0.18999999999999995, builtin, [], []).
512
+ step(0.025649999999999992 is 0.15 * 0.17099999999999996, builtin, [], []).
513
+ step(0.0012824999999999998 is 0.05 * 0.025649999999999992, builtin, [], []).
514
+ step(0.00012824999999999997 is 0.1 * 0.0012824999999999998, builtin, [], []).
515
+ step(scores_for([bacterialPneumonia], [0.00156408]),
516
+ rule(58),
517
+ ['Disease' = bacterialPneumonia,
518
+ 'Restdiseases' = [],
519
+ 'Score' = 0.00156408,
520
+ 'Restscores' = []],
521
+ [score(bacterialPneumonia, 0.00156408), scores_for([], [])]).
522
+ step(score(bacterialPneumonia, 0.00156408),
523
+ rule(56),
524
+ ['Disease' = bacterialPneumonia,
525
+ 'Score' = 0.00156408,
526
+ 'Prior' = 0.01,
527
+ 'Evidence' = [ev(fever, true), ev(dryCough, true), ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)],
528
+ 'Likelihood' = 0.156408],
529
+ [prior(bacterialPneumonia, 0.01),
530
+ evidence(case, [ev(fever, true), ev(dryCough, true), ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)]),
531
+ likelihood(bacterialPneumonia, [ev(fever, true), ev(dryCough, true), ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)], 0.156408),
532
+ 0.00156408 is 0.01 * 0.156408]).
533
+ step(prior(bacterialPneumonia, 0.01), fact(14), [], []).
534
+ step(likelihood(bacterialPneumonia, [ev(fever, true), ev(dryCough, true), ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)], 0.156408),
535
+ rule(55),
536
+ ['Disease' = bacterialPneumonia,
537
+ 'Evidence' = ev(fever, true),
538
+ 'Rest' = [ev(dryCough, true), ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)],
539
+ 'Likelihood' = 0.156408,
540
+ 'Factor' = 0.7,
541
+ 'Taillikelihood' = 0.22344],
542
+ [factor(bacterialPneumonia, ev(fever, true), 0.7),
543
+ likelihood(bacterialPneumonia, [ev(dryCough, true), ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)], 0.22344),
544
+ 0.156408 is 0.7 * 0.22344]).
545
+ step(factor(bacterialPneumonia, ev(fever, true), 0.7),
546
+ rule(52),
547
+ ['Disease' = bacterialPneumonia, 'Symptom' = fever, 'P' = 0.7],
548
+ [p_given(bacterialPneumonia, fever, 0.7)]).
549
+ step(p_given(bacterialPneumonia, fever, 0.7), fact(30), [], []).
550
+ step(likelihood(bacterialPneumonia, [ev(dryCough, true), ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)], 0.22344),
551
+ rule(55),
552
+ ['Disease' = bacterialPneumonia,
553
+ 'Evidence' = ev(dryCough, true),
554
+ 'Rest' = [ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)],
555
+ 'Likelihood' = 0.22344,
556
+ 'Factor' = 0.6,
557
+ 'Taillikelihood' = 0.3724],
558
+ [factor(bacterialPneumonia, ev(dryCough, true), 0.6),
559
+ likelihood(bacterialPneumonia, [ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)], 0.3724),
560
+ 0.22344 is 0.6 * 0.3724]).
561
+ step(factor(bacterialPneumonia, ev(dryCough, true), 0.6),
562
+ rule(52),
563
+ ['Disease' = bacterialPneumonia, 'Symptom' = dryCough, 'P' = 0.6],
564
+ [p_given(bacterialPneumonia, dryCough, 0.6)]).
565
+ step(p_given(bacterialPneumonia, dryCough, 0.6), fact(31), [], []).
566
+ step(likelihood(bacterialPneumonia, [ev(lossOfSmell, false), ev(sneezing, false), ev(shortBreath, false)], 0.3724),
567
+ rule(55),
568
+ ['Disease' = bacterialPneumonia,
569
+ 'Evidence' = ev(lossOfSmell, false),
570
+ 'Rest' = [ev(sneezing, false), ev(shortBreath, false)],
571
+ 'Likelihood' = 0.3724,
572
+ 'Factor' = 0.98,
573
+ 'Taillikelihood' = 0.38],
574
+ [factor(bacterialPneumonia, ev(lossOfSmell, false), 0.98),
575
+ likelihood(bacterialPneumonia, [ev(sneezing, false), ev(shortBreath, false)], 0.38),
576
+ 0.3724 is 0.98 * 0.38]).
577
+ step(factor(bacterialPneumonia, ev(lossOfSmell, false), 0.98),
578
+ rule(53),
579
+ ['Disease' = bacterialPneumonia, 'Symptom' = lossOfSmell, 'Q' = 0.98, 'P' = 0.02],
580
+ [p_given(bacterialPneumonia, lossOfSmell, 0.02), 0.98 is 1.0 - 0.02]).
581
+ step(p_given(bacterialPneumonia, lossOfSmell, 0.02), fact(32), [], []).
582
+ step(0.98 is 1.0 - 0.02, builtin, [], []).
583
+ step(likelihood(bacterialPneumonia, [ev(sneezing, false), ev(shortBreath, false)], 0.38),
584
+ rule(55),
585
+ ['Disease' = bacterialPneumonia,
586
+ 'Evidence' = ev(sneezing, false),
587
+ 'Rest' = [ev(shortBreath, false)],
588
+ 'Likelihood' = 0.38,
589
+ 'Factor' = 0.95,
590
+ 'Taillikelihood' = 0.4],
591
+ [factor(bacterialPneumonia, ev(sneezing, false), 0.95),
592
+ likelihood(bacterialPneumonia, [ev(shortBreath, false)], 0.4),
593
+ 0.38 is 0.95 * 0.4]).
594
+ step(factor(bacterialPneumonia, ev(sneezing, false), 0.95),
595
+ rule(53),
596
+ ['Disease' = bacterialPneumonia, 'Symptom' = sneezing, 'Q' = 0.95, 'P' = 0.05],
597
+ [p_given(bacterialPneumonia, sneezing, 0.05), 0.95 is 1.0 - 0.05]).
598
+ step(p_given(bacterialPneumonia, sneezing, 0.05), fact(33), [], []).
599
+ step(likelihood(bacterialPneumonia, [ev(shortBreath, false)], 0.4),
600
+ rule(55),
601
+ ['Disease' = bacterialPneumonia,
602
+ 'Evidence' = ev(shortBreath, false),
603
+ 'Rest' = [],
604
+ 'Likelihood' = 0.4,
605
+ 'Factor' = 0.4,
606
+ 'Taillikelihood' = 1.0],
607
+ [factor(bacterialPneumonia, ev(shortBreath, false), 0.4),
608
+ likelihood(bacterialPneumonia, [], 1.0),
609
+ 0.4 is 0.4 * 1.0]).
610
+ step(factor(bacterialPneumonia, ev(shortBreath, false), 0.4),
611
+ rule(53),
612
+ ['Disease' = bacterialPneumonia, 'Symptom' = shortBreath, 'Q' = 0.4, 'P' = 0.6],
613
+ [p_given(bacterialPneumonia, shortBreath, 0.6), 0.4 is 1.0 - 0.6]).
614
+ step(p_given(bacterialPneumonia, shortBreath, 0.6), fact(34), [], []).
615
+ step(0.4 is 1.0 - 0.6, builtin, [], []).
616
+ step(likelihood(bacterialPneumonia, [], 1.0), fact(54), [], []).
617
+ step(0.4 is 0.4 * 1.0, builtin, [], []).
618
+ step(0.38 is 0.95 * 0.4, builtin, [], []).
619
+ step(0.3724 is 0.98 * 0.38, builtin, [], []).
620
+ step(0.22344 is 0.6 * 0.3724, builtin, [], []).
621
+ step(0.156408 is 0.7 * 0.22344, builtin, [], []).
622
+ step(0.00156408 is 0.01 * 0.156408, builtin, [], []).
623
+ step(scores_for([], []), fact(57), [], []).
624
+ step(evidenceTotal(case, 0.019182330000000004),
625
+ rule(74),
626
+ ['Total' = 0.019182330000000004,
627
+ 'Scores' = [0.009282000000000002, 0.008208, 0.00012824999999999997, 0.00156408]],
628
+ [scores(case, [0.009282000000000002, 0.008208, 0.00012824999999999997, 0.00156408]),
629
+ score_sum([0.009282000000000002, 0.008208, 0.00012824999999999997, 0.00156408], 0.019182330000000004)]).
630
+ step(score_sum([0.009282000000000002, 0.008208, 0.00012824999999999997, 0.00156408], 0.019182330000000004),
631
+ rule(60),
632
+ ['Value' = 0.009282000000000002,
633
+ 'Rest' = [0.008208, 0.00012824999999999997, 0.00156408],
634
+ 'Sum' = 0.019182330000000004,
635
+ 'Tailsum' = 0.00990033],
636
+ [score_sum([0.008208, 0.00012824999999999997, 0.00156408], 0.00990033),
637
+ 0.019182330000000004 is 0.009282000000000002 + 0.00990033]).
638
+ step(score_sum([0.008208, 0.00012824999999999997, 0.00156408], 0.00990033),
639
+ rule(60),
640
+ ['Value' = 0.008208,
641
+ 'Rest' = [0.00012824999999999997, 0.00156408],
642
+ 'Sum' = 0.00990033,
643
+ 'Tailsum' = 0.00169233],
644
+ [score_sum([0.00012824999999999997, 0.00156408], 0.00169233),
645
+ 0.00990033 is 0.008208 + 0.00169233]).
646
+ step(score_sum([0.00012824999999999997, 0.00156408], 0.00169233),
647
+ rule(60),
648
+ ['Value' = 0.00012824999999999997,
649
+ 'Rest' = [0.00156408],
650
+ 'Sum' = 0.00169233,
651
+ 'Tailsum' = 0.00156408],
652
+ [score_sum([0.00156408], 0.00156408), 0.00169233 is 0.00012824999999999997 + 0.00156408]).
653
+ step(score_sum([0.00156408], 0.00156408),
654
+ rule(60),
655
+ ['Value' = 0.00156408, 'Rest' = [], 'Sum' = 0.00156408, 'Tailsum' = 0.0],
656
+ [score_sum([], 0.0), 0.00156408 is 0.00156408 + 0.0]).
657
+ step(score_sum([], 0.0), fact(59), [], []).
658
+ step(0.00156408 is 0.00156408 + 0.0, builtin, [], []).
659
+ step(0.00169233 is 0.00012824999999999997 + 0.00156408, builtin, [], []).
660
+ step(0.00990033 is 0.008208 + 0.00169233, builtin, [], []).
661
+ step(0.019182330000000004 is 0.009282000000000002 + 0.00990033, builtin, [], []).
662
+ step(posteriors(case, [0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716]),
663
+ rule(75),
664
+ ['Posteriors' = [0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716],
665
+ 'Scores' = [0.009282000000000002, 0.008208, 0.00012824999999999997, 0.00156408],
666
+ 'Total' = 0.019182330000000004],
667
+ [scores(case, [0.009282000000000002, 0.008208, 0.00012824999999999997, 0.00156408]),
668
+ evidenceTotal(case, 0.019182330000000004),
669
+ normalize_scores([0.009282000000000002, 0.008208, 0.00012824999999999997, 0.00156408], 0.019182330000000004, [0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716])]).
670
+ step(normalize_scores([0.009282000000000002, 0.008208, 0.00012824999999999997, 0.00156408], 0.019182330000000004, [0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716]),
671
+ rule(62),
672
+ ['Score' = 0.009282000000000002,
673
+ 'Restscores' = [0.008208, 0.00012824999999999997, 0.00156408],
674
+ 'Total' = 0.019182330000000004,
675
+ 'Posterior' = 0.48388282341092037,
676
+ 'Restposteriors' = [0.42789379600913957, 0.006685840562642804, 0.08153754001729716]],
677
+ [0.48388282341092037 is 0.009282000000000002 / 0.019182330000000004,
678
+ normalize_scores([0.008208, 0.00012824999999999997, 0.00156408], 0.019182330000000004, [0.42789379600913957, 0.006685840562642804, 0.08153754001729716])]).
679
+ step(0.48388282341092037 is 0.009282000000000002 / 0.019182330000000004, builtin, [], []).
680
+ step(normalize_scores([0.008208, 0.00012824999999999997, 0.00156408], 0.019182330000000004, [0.42789379600913957, 0.006685840562642804, 0.08153754001729716]),
681
+ rule(62),
682
+ ['Score' = 0.008208,
683
+ 'Restscores' = [0.00012824999999999997, 0.00156408],
684
+ 'Total' = 0.019182330000000004,
685
+ 'Posterior' = 0.42789379600913957,
686
+ 'Restposteriors' = [0.006685840562642804, 0.08153754001729716]],
687
+ [0.42789379600913957 is 0.008208 / 0.019182330000000004,
688
+ normalize_scores([0.00012824999999999997, 0.00156408], 0.019182330000000004, [0.006685840562642804, 0.08153754001729716])]).
689
+ step(0.42789379600913957 is 0.008208 / 0.019182330000000004, builtin, [], []).
690
+ step(normalize_scores([0.00012824999999999997, 0.00156408], 0.019182330000000004, [0.006685840562642804, 0.08153754001729716]),
691
+ rule(62),
692
+ ['Score' = 0.00012824999999999997,
693
+ 'Restscores' = [0.00156408],
694
+ 'Total' = 0.019182330000000004,
695
+ 'Posterior' = 0.006685840562642804,
696
+ 'Restposteriors' = [0.08153754001729716]],
697
+ [0.006685840562642804 is 0.00012824999999999997 / 0.019182330000000004,
698
+ normalize_scores([0.00156408], 0.019182330000000004, [0.08153754001729716])]).
699
+ step(0.006685840562642804 is 0.00012824999999999997 / 0.019182330000000004, builtin, [], []).
700
+ step(normalize_scores([0.00156408], 0.019182330000000004, [0.08153754001729716]),
701
+ rule(62),
702
+ ['Score' = 0.00156408,
703
+ 'Restscores' = [],
704
+ 'Total' = 0.019182330000000004,
705
+ 'Posterior' = 0.08153754001729716,
706
+ 'Restposteriors' = []],
707
+ [0.08153754001729716 is 0.00156408 / 0.019182330000000004,
708
+ normalize_scores([], 0.019182330000000004, [])]).
709
+ step(0.08153754001729716 is 0.00156408 / 0.019182330000000004, builtin, [], []).
710
+ step(normalize_scores([], 0.019182330000000004, []), fact(61), [], []).
711
+ step(posterior(covid19, 0.48388282341092037),
712
+ rule(76),
713
+ ['Disease' = covid19,
714
+ 'Posterior' = 0.48388282341092037,
715
+ 'Diseases' = [covid19, influenza, allergicRhinitis, bacterialPneumonia],
716
+ 'Posteriors' = [0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716]],
717
+ [diseases(case, [covid19, influenza, allergicRhinitis, bacterialPneumonia]),
718
+ posteriors(case, [0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716]),
719
+ disease_posterior([covid19, influenza, allergicRhinitis, bacterialPneumonia], [0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716], covid19, 0.48388282341092037)]).
720
+ step(disease_posterior([covid19, influenza, allergicRhinitis, bacterialPneumonia], [0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716], covid19, 0.48388282341092037),
721
+ fact(63),
722
+ ['Disease' = covid19, 'Posterior' = 0.48388282341092037],
723
+ []).
724
+ step(posterior(influenza, 0.42789379600913957),
725
+ rule(76),
726
+ ['Disease' = influenza,
727
+ 'Posterior' = 0.42789379600913957,
728
+ 'Diseases' = [covid19, influenza, allergicRhinitis, bacterialPneumonia],
729
+ 'Posteriors' = [0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716]],
730
+ [diseases(case, [covid19, influenza, allergicRhinitis, bacterialPneumonia]),
731
+ posteriors(case, [0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716]),
732
+ disease_posterior([covid19, influenza, allergicRhinitis, bacterialPneumonia], [0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716], influenza, 0.42789379600913957)]).
733
+ step(disease_posterior([covid19, influenza, allergicRhinitis, bacterialPneumonia], [0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716], influenza, 0.42789379600913957),
734
+ rule(64),
735
+ ['Restdiseases' = [influenza, allergicRhinitis, bacterialPneumonia],
736
+ 'Restposteriors' = [0.42789379600913957, 0.006685840562642804, 0.08153754001729716],
737
+ 'Disease' = influenza,
738
+ 'Posterior' = 0.42789379600913957],
739
+ [disease_posterior([influenza, allergicRhinitis, bacterialPneumonia], [0.42789379600913957, 0.006685840562642804, 0.08153754001729716], influenza, 0.42789379600913957)]).
740
+ step(disease_posterior([influenza, allergicRhinitis, bacterialPneumonia], [0.42789379600913957, 0.006685840562642804, 0.08153754001729716], influenza, 0.42789379600913957),
741
+ fact(63),
742
+ ['Disease' = influenza, 'Posterior' = 0.42789379600913957],
743
+ []).
744
+ step(posterior(allergicRhinitis, 0.006685840562642804),
745
+ rule(76),
746
+ ['Disease' = allergicRhinitis,
747
+ 'Posterior' = 0.006685840562642804,
748
+ 'Diseases' = [covid19, influenza, allergicRhinitis, bacterialPneumonia],
749
+ 'Posteriors' = [0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716]],
750
+ [diseases(case, [covid19, influenza, allergicRhinitis, bacterialPneumonia]),
751
+ posteriors(case, [0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716]),
752
+ disease_posterior([covid19, influenza, allergicRhinitis, bacterialPneumonia], [0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716], allergicRhinitis, 0.006685840562642804)]).
753
+ step(disease_posterior([covid19, influenza, allergicRhinitis, bacterialPneumonia], [0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716], allergicRhinitis, 0.006685840562642804),
754
+ rule(64),
755
+ ['Restdiseases' = [influenza, allergicRhinitis, bacterialPneumonia],
756
+ 'Restposteriors' = [0.42789379600913957, 0.006685840562642804, 0.08153754001729716],
757
+ 'Disease' = allergicRhinitis,
758
+ 'Posterior' = 0.006685840562642804],
759
+ [disease_posterior([influenza, allergicRhinitis, bacterialPneumonia], [0.42789379600913957, 0.006685840562642804, 0.08153754001729716], allergicRhinitis, 0.006685840562642804)]).
760
+ step(disease_posterior([influenza, allergicRhinitis, bacterialPneumonia], [0.42789379600913957, 0.006685840562642804, 0.08153754001729716], allergicRhinitis, 0.006685840562642804),
761
+ rule(64),
762
+ ['Restdiseases' = [allergicRhinitis, bacterialPneumonia],
763
+ 'Restposteriors' = [0.006685840562642804, 0.08153754001729716],
764
+ 'Disease' = allergicRhinitis,
765
+ 'Posterior' = 0.006685840562642804],
766
+ [disease_posterior([allergicRhinitis, bacterialPneumonia], [0.006685840562642804, 0.08153754001729716], allergicRhinitis, 0.006685840562642804)]).
767
+ step(disease_posterior([allergicRhinitis, bacterialPneumonia], [0.006685840562642804, 0.08153754001729716], allergicRhinitis, 0.006685840562642804),
768
+ fact(63),
769
+ ['Disease' = allergicRhinitis, 'Posterior' = 0.006685840562642804],
770
+ []).
771
+ step(posterior(bacterialPneumonia, 0.08153754001729716),
772
+ rule(76),
773
+ ['Disease' = bacterialPneumonia,
774
+ 'Posterior' = 0.08153754001729716,
775
+ 'Diseases' = [covid19, influenza, allergicRhinitis, bacterialPneumonia],
776
+ 'Posteriors' = [0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716]],
777
+ [diseases(case, [covid19, influenza, allergicRhinitis, bacterialPneumonia]),
778
+ posteriors(case, [0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716]),
779
+ disease_posterior([covid19, influenza, allergicRhinitis, bacterialPneumonia], [0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716], bacterialPneumonia, 0.08153754001729716)]).
780
+ step(disease_posterior([covid19, influenza, allergicRhinitis, bacterialPneumonia], [0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716], bacterialPneumonia, 0.08153754001729716),
781
+ rule(64),
782
+ ['Restdiseases' = [influenza, allergicRhinitis, bacterialPneumonia],
783
+ 'Restposteriors' = [0.42789379600913957, 0.006685840562642804, 0.08153754001729716],
784
+ 'Disease' = bacterialPneumonia,
785
+ 'Posterior' = 0.08153754001729716],
786
+ [disease_posterior([influenza, allergicRhinitis, bacterialPneumonia], [0.42789379600913957, 0.006685840562642804, 0.08153754001729716], bacterialPneumonia, 0.08153754001729716)]).
787
+ step(disease_posterior([influenza, allergicRhinitis, bacterialPneumonia], [0.42789379600913957, 0.006685840562642804, 0.08153754001729716], bacterialPneumonia, 0.08153754001729716),
788
+ rule(64),
789
+ ['Restdiseases' = [allergicRhinitis, bacterialPneumonia],
790
+ 'Restposteriors' = [0.006685840562642804, 0.08153754001729716],
791
+ 'Disease' = bacterialPneumonia,
792
+ 'Posterior' = 0.08153754001729716],
793
+ [disease_posterior([allergicRhinitis, bacterialPneumonia], [0.006685840562642804, 0.08153754001729716], bacterialPneumonia, 0.08153754001729716)]).
794
+ step(disease_posterior([allergicRhinitis, bacterialPneumonia], [0.006685840562642804, 0.08153754001729716], bacterialPneumonia, 0.08153754001729716),
795
+ rule(64),
796
+ ['Restdiseases' = [bacterialPneumonia],
797
+ 'Restposteriors' = [0.08153754001729716],
798
+ 'Disease' = bacterialPneumonia,
799
+ 'Posterior' = 0.08153754001729716],
800
+ [disease_posterior([bacterialPneumonia], [0.08153754001729716], bacterialPneumonia, 0.08153754001729716)]).
801
+ step(disease_posterior([bacterialPneumonia], [0.08153754001729716], bacterialPneumonia, 0.08153754001729716),
802
+ fact(63),
803
+ ['Disease' = bacterialPneumonia, 'Posterior' = 0.08153754001729716],
804
+ []).
805
+ step(expectedSuccess(paxlovid, 0.388517401170765),
806
+ rule(77),
807
+ ['Therapy' = paxlovid, 'Expectedsuccess' = 0.388517401170765],
808
+ [therapy(paxlovid), expected_success(paxlovid, 0.388517401170765)]).
809
+ step(therapy(paxlovid), fact(35), [], []).
810
+ step(expected_success(paxlovid, 0.388517401170765),
811
+ rule(67),
812
+ ['Therapy' = paxlovid,
813
+ 'Expectedsuccess' = 0.388517401170765,
814
+ 'Posteriors' = [0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716],
815
+ 'Successbydisease' = [0.75, 0.05, 0.02, 0.05]],
816
+ [posteriors(case, [0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716]),
817
+ success_by_disease(paxlovid, [0.75, 0.05, 0.02, 0.05]),
818
+ dot_product([0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716], [0.75, 0.05, 0.02, 0.05], 0.388517401170765)]).
819
+ step(success_by_disease(paxlovid, [0.75, 0.05, 0.02, 0.05]), fact(40), [], []).
820
+ step(dot_product([0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716], [0.75, 0.05, 0.02, 0.05], 0.388517401170765),
821
+ rule(66),
822
+ ['Left' = 0.48388282341092037,
823
+ 'Restleft' = [0.42789379600913957, 0.006685840562642804, 0.08153754001729716],
824
+ 'Right' = 0.75,
825
+ 'Restright' = [0.05, 0.02, 0.05],
826
+ 'Sum' = 0.388517401170765,
827
+ 'Term' = 0.3629121175581903,
828
+ 'Tailsum' = 0.025605283612574695],
829
+ [0.3629121175581903 is 0.48388282341092037 * 0.75,
830
+ dot_product([0.42789379600913957, 0.006685840562642804, 0.08153754001729716], [0.05, 0.02, 0.05], 0.025605283612574695),
831
+ 0.388517401170765 is 0.3629121175581903 + 0.025605283612574695]).
832
+ step(0.3629121175581903 is 0.48388282341092037 * 0.75, builtin, [], []).
833
+ step(dot_product([0.42789379600913957, 0.006685840562642804, 0.08153754001729716], [0.05, 0.02, 0.05], 0.025605283612574695),
834
+ rule(66),
835
+ ['Left' = 0.42789379600913957,
836
+ 'Restleft' = [0.006685840562642804, 0.08153754001729716],
837
+ 'Right' = 0.05,
838
+ 'Restright' = [0.02, 0.05],
839
+ 'Sum' = 0.025605283612574695,
840
+ 'Term' = 0.02139468980045698,
841
+ 'Tailsum' = 0.0042105938121177145],
842
+ [0.02139468980045698 is 0.42789379600913957 * 0.05,
843
+ dot_product([0.006685840562642804, 0.08153754001729716], [0.02, 0.05], 0.0042105938121177145),
844
+ 0.025605283612574695 is 0.02139468980045698 + 0.0042105938121177145]).
845
+ step(0.02139468980045698 is 0.42789379600913957 * 0.05, builtin, [], []).
846
+ step(dot_product([0.006685840562642804, 0.08153754001729716], [0.02, 0.05], 0.0042105938121177145),
847
+ rule(66),
848
+ ['Left' = 0.006685840562642804,
849
+ 'Restleft' = [0.08153754001729716],
850
+ 'Right' = 0.02,
851
+ 'Restright' = [0.05],
852
+ 'Sum' = 0.0042105938121177145,
853
+ 'Term' = 0.00013371681125285608,
854
+ 'Tailsum' = 0.004076877000864858],
855
+ [0.00013371681125285608 is 0.006685840562642804 * 0.02,
856
+ dot_product([0.08153754001729716], [0.05], 0.004076877000864858),
857
+ 0.0042105938121177145 is 0.00013371681125285608 + 0.004076877000864858]).
858
+ step(0.00013371681125285608 is 0.006685840562642804 * 0.02, builtin, [], []).
859
+ step(dot_product([0.08153754001729716], [0.05], 0.004076877000864858),
860
+ rule(66),
861
+ ['Left' = 0.08153754001729716,
862
+ 'Restleft' = [],
863
+ 'Right' = 0.05,
864
+ 'Restright' = [],
865
+ 'Sum' = 0.004076877000864858,
866
+ 'Term' = 0.004076877000864858,
867
+ 'Tailsum' = 0.0],
868
+ [0.004076877000864858 is 0.08153754001729716 * 0.05,
869
+ dot_product([], [], 0.0),
870
+ 0.004076877000864858 is 0.004076877000864858 + 0.0]).
871
+ step(0.004076877000864858 is 0.08153754001729716 * 0.05, builtin, [], []).
872
+ step(dot_product([], [], 0.0), fact(65), [], []).
873
+ step(0.004076877000864858 is 0.004076877000864858 + 0.0, builtin, [], []).
874
+ step(0.0042105938121177145 is 0.00013371681125285608 + 0.004076877000864858, builtin, [], []).
875
+ step(0.025605283612574695 is 0.02139468980045698 + 0.0042105938121177145, builtin, [], []).
876
+ step(0.388517401170765 is 0.3629121175581903 + 0.025605283612574695, builtin, [], []).
877
+ step(expectedSuccess(oseltamivir, 0.28514101258814745),
878
+ rule(77),
879
+ ['Therapy' = oseltamivir, 'Expectedsuccess' = 0.28514101258814745],
880
+ [therapy(oseltamivir), expected_success(oseltamivir, 0.28514101258814745)]).
881
+ step(therapy(oseltamivir), fact(36), [], []).
882
+ step(expected_success(oseltamivir, 0.28514101258814745),
883
+ rule(67),
884
+ ['Therapy' = oseltamivir,
885
+ 'Expectedsuccess' = 0.28514101258814745,
886
+ 'Posteriors' = [0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716],
887
+ 'Successbydisease' = [0.05, 0.6, 0.02, 0.05]],
888
+ [posteriors(case, [0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716]),
889
+ success_by_disease(oseltamivir, [0.05, 0.6, 0.02, 0.05]),
890
+ dot_product([0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716], [0.05, 0.6, 0.02, 0.05], 0.28514101258814745)]).
891
+ step(success_by_disease(oseltamivir, [0.05, 0.6, 0.02, 0.05]), fact(41), [], []).
892
+ step(dot_product([0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716], [0.05, 0.6, 0.02, 0.05], 0.28514101258814745),
893
+ rule(66),
894
+ ['Left' = 0.48388282341092037,
895
+ 'Restleft' = [0.42789379600913957, 0.006685840562642804, 0.08153754001729716],
896
+ 'Right' = 0.05,
897
+ 'Restright' = [0.6, 0.02, 0.05],
898
+ 'Sum' = 0.28514101258814745,
899
+ 'Term' = 0.02419414117054602,
900
+ 'Tailsum' = 0.2609468714176014],
901
+ [0.02419414117054602 is 0.48388282341092037 * 0.05,
902
+ dot_product([0.42789379600913957, 0.006685840562642804, 0.08153754001729716], [0.6, 0.02, 0.05], 0.2609468714176014),
903
+ 0.28514101258814745 is 0.02419414117054602 + 0.2609468714176014]).
904
+ step(0.02419414117054602 is 0.48388282341092037 * 0.05, builtin, [], []).
905
+ step(dot_product([0.42789379600913957, 0.006685840562642804, 0.08153754001729716], [0.6, 0.02, 0.05], 0.2609468714176014),
906
+ rule(66),
907
+ ['Left' = 0.42789379600913957,
908
+ 'Restleft' = [0.006685840562642804, 0.08153754001729716],
909
+ 'Right' = 0.6,
910
+ 'Restright' = [0.02, 0.05],
911
+ 'Sum' = 0.2609468714176014,
912
+ 'Term' = 0.25673627760548373,
913
+ 'Tailsum' = 0.0042105938121177145],
914
+ [0.25673627760548373 is 0.42789379600913957 * 0.6,
915
+ dot_product([0.006685840562642804, 0.08153754001729716], [0.02, 0.05], 0.0042105938121177145),
916
+ 0.2609468714176014 is 0.25673627760548373 + 0.0042105938121177145]).
917
+ step(0.25673627760548373 is 0.42789379600913957 * 0.6, builtin, [], []).
918
+ step(0.2609468714176014 is 0.25673627760548373 + 0.0042105938121177145, builtin, [], []).
919
+ step(0.28514101258814745 is 0.02419414117054602 + 0.2609468714176014, builtin, [], []).
920
+ step(expectedSuccess(antihistamine, 0.10026891936485297),
921
+ rule(77),
922
+ ['Therapy' = antihistamine, 'Expectedsuccess' = 0.10026891936485297],
923
+ [therapy(antihistamine), expected_success(antihistamine, 0.10026891936485297)]).
924
+ step(therapy(antihistamine), fact(37), [], []).
925
+ step(expected_success(antihistamine, 0.10026891936485297),
926
+ rule(67),
927
+ ['Therapy' = antihistamine,
928
+ 'Expectedsuccess' = 0.10026891936485297,
929
+ 'Posteriors' = [0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716],
930
+ 'Successbydisease' = [0.1, 0.1, 0.75, 0.05]],
931
+ [posteriors(case, [0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716]),
932
+ success_by_disease(antihistamine, [0.1, 0.1, 0.75, 0.05]),
933
+ dot_product([0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716], [0.1, 0.1, 0.75, 0.05], 0.10026891936485297)]).
934
+ step(success_by_disease(antihistamine, [0.1, 0.1, 0.75, 0.05]), fact(42), [], []).
935
+ step(dot_product([0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716], [0.1, 0.1, 0.75, 0.05], 0.10026891936485297),
936
+ rule(66),
937
+ ['Left' = 0.48388282341092037,
938
+ 'Restleft' = [0.42789379600913957, 0.006685840562642804, 0.08153754001729716],
939
+ 'Right' = 0.1,
940
+ 'Restright' = [0.1, 0.75, 0.05],
941
+ 'Sum' = 0.10026891936485297,
942
+ 'Term' = 0.04838828234109204,
943
+ 'Tailsum' = 0.05188063702376092],
944
+ [0.04838828234109204 is 0.48388282341092037 * 0.1,
945
+ dot_product([0.42789379600913957, 0.006685840562642804, 0.08153754001729716], [0.1, 0.75, 0.05], 0.05188063702376092),
946
+ 0.10026891936485297 is 0.04838828234109204 + 0.05188063702376092]).
947
+ step(0.04838828234109204 is 0.48388282341092037 * 0.1, builtin, [], []).
948
+ step(dot_product([0.42789379600913957, 0.006685840562642804, 0.08153754001729716], [0.1, 0.75, 0.05], 0.05188063702376092),
949
+ rule(66),
950
+ ['Left' = 0.42789379600913957,
951
+ 'Restleft' = [0.006685840562642804, 0.08153754001729716],
952
+ 'Right' = 0.1,
953
+ 'Restright' = [0.75, 0.05],
954
+ 'Sum' = 0.05188063702376092,
955
+ 'Term' = 0.04278937960091396,
956
+ 'Tailsum' = 0.00909125742284696],
957
+ [0.04278937960091396 is 0.42789379600913957 * 0.1,
958
+ dot_product([0.006685840562642804, 0.08153754001729716], [0.75, 0.05], 0.00909125742284696),
959
+ 0.05188063702376092 is 0.04278937960091396 + 0.00909125742284696]).
960
+ step(0.04278937960091396 is 0.42789379600913957 * 0.1, builtin, [], []).
961
+ step(dot_product([0.006685840562642804, 0.08153754001729716], [0.75, 0.05], 0.00909125742284696),
962
+ rule(66),
963
+ ['Left' = 0.006685840562642804,
964
+ 'Restleft' = [0.08153754001729716],
965
+ 'Right' = 0.75,
966
+ 'Restright' = [0.05],
967
+ 'Sum' = 0.00909125742284696,
968
+ 'Term' = 0.005014380421982103,
969
+ 'Tailsum' = 0.004076877000864858],
970
+ [0.005014380421982103 is 0.006685840562642804 * 0.75,
971
+ dot_product([0.08153754001729716], [0.05], 0.004076877000864858),
972
+ 0.00909125742284696 is 0.005014380421982103 + 0.004076877000864858]).
973
+ step(0.005014380421982103 is 0.006685840562642804 * 0.75, builtin, [], []).
974
+ step(0.00909125742284696 is 0.005014380421982103 + 0.004076877000864858, builtin, [], []).
975
+ step(0.05188063702376092 is 0.04278937960091396 + 0.00909125742284696, builtin, [], []).
976
+ step(0.10026891936485297 is 0.04838828234109204 + 0.05188063702376092, builtin, [], []).
977
+ step(expectedSuccess(antibiotic, 0.1109525797960936),
978
+ rule(77),
979
+ ['Therapy' = antibiotic, 'Expectedsuccess' = 0.1109525797960936],
980
+ [therapy(antibiotic), expected_success(antibiotic, 0.1109525797960936)]).
981
+ step(therapy(antibiotic), fact(38), [], []).
982
+ step(expected_success(antibiotic, 0.1109525797960936),
983
+ rule(67),
984
+ ['Therapy' = antibiotic,
985
+ 'Expectedsuccess' = 0.1109525797960936,
986
+ 'Posteriors' = [0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716],
987
+ 'Successbydisease' = [0.05, 0.05, 0.02, 0.8]],
988
+ [posteriors(case, [0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716]),
989
+ success_by_disease(antibiotic, [0.05, 0.05, 0.02, 0.8]),
990
+ dot_product([0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716], [0.05, 0.05, 0.02, 0.8], 0.1109525797960936)]).
991
+ step(success_by_disease(antibiotic, [0.05, 0.05, 0.02, 0.8]), fact(43), [], []).
992
+ step(dot_product([0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716], [0.05, 0.05, 0.02, 0.8], 0.1109525797960936),
993
+ rule(66),
994
+ ['Left' = 0.48388282341092037,
995
+ 'Restleft' = [0.42789379600913957, 0.006685840562642804, 0.08153754001729716],
996
+ 'Right' = 0.05,
997
+ 'Restright' = [0.05, 0.02, 0.8],
998
+ 'Sum' = 0.1109525797960936,
999
+ 'Term' = 0.02419414117054602,
1000
+ 'Tailsum' = 0.08675843862554758],
1001
+ [0.02419414117054602 is 0.48388282341092037 * 0.05,
1002
+ dot_product([0.42789379600913957, 0.006685840562642804, 0.08153754001729716], [0.05, 0.02, 0.8], 0.08675843862554758),
1003
+ 0.1109525797960936 is 0.02419414117054602 + 0.08675843862554758]).
1004
+ step(dot_product([0.42789379600913957, 0.006685840562642804, 0.08153754001729716], [0.05, 0.02, 0.8], 0.08675843862554758),
1005
+ rule(66),
1006
+ ['Left' = 0.42789379600913957,
1007
+ 'Restleft' = [0.006685840562642804, 0.08153754001729716],
1008
+ 'Right' = 0.05,
1009
+ 'Restright' = [0.02, 0.8],
1010
+ 'Sum' = 0.08675843862554758,
1011
+ 'Term' = 0.02139468980045698,
1012
+ 'Tailsum' = 0.06536374882509059],
1013
+ [0.02139468980045698 is 0.42789379600913957 * 0.05,
1014
+ dot_product([0.006685840562642804, 0.08153754001729716], [0.02, 0.8], 0.06536374882509059),
1015
+ 0.08675843862554758 is 0.02139468980045698 + 0.06536374882509059]).
1016
+ step(dot_product([0.006685840562642804, 0.08153754001729716], [0.02, 0.8], 0.06536374882509059),
1017
+ rule(66),
1018
+ ['Left' = 0.006685840562642804,
1019
+ 'Restleft' = [0.08153754001729716],
1020
+ 'Right' = 0.02,
1021
+ 'Restright' = [0.8],
1022
+ 'Sum' = 0.06536374882509059,
1023
+ 'Term' = 0.00013371681125285608,
1024
+ 'Tailsum' = 0.06523003201383773],
1025
+ [0.00013371681125285608 is 0.006685840562642804 * 0.02,
1026
+ dot_product([0.08153754001729716], [0.8], 0.06523003201383773),
1027
+ 0.06536374882509059 is 0.00013371681125285608 + 0.06523003201383773]).
1028
+ step(dot_product([0.08153754001729716], [0.8], 0.06523003201383773),
1029
+ rule(66),
1030
+ ['Left' = 0.08153754001729716,
1031
+ 'Restleft' = [],
1032
+ 'Right' = 0.8,
1033
+ 'Restright' = [],
1034
+ 'Sum' = 0.06523003201383773,
1035
+ 'Term' = 0.06523003201383773,
1036
+ 'Tailsum' = 0.0],
1037
+ [0.06523003201383773 is 0.08153754001729716 * 0.8,
1038
+ dot_product([], [], 0.0),
1039
+ 0.06523003201383773 is 0.06523003201383773 + 0.0]).
1040
+ step(0.06523003201383773 is 0.08153754001729716 * 0.8, builtin, [], []).
1041
+ step(0.06523003201383773 is 0.06523003201383773 + 0.0, builtin, [], []).
1042
+ step(0.06536374882509059 is 0.00013371681125285608 + 0.06523003201383773, builtin, [], []).
1043
+ step(0.08675843862554758 is 0.02139468980045698 + 0.06536374882509059, builtin, [], []).
1044
+ step(0.1109525797960936 is 0.02419414117054602 + 0.08675843862554758, builtin, [], []).
1045
+ step(expectedSuccess(supportiveCare, 0.2915119539701381),
1046
+ rule(77),
1047
+ ['Therapy' = supportiveCare, 'Expectedsuccess' = 0.2915119539701381],
1048
+ [therapy(supportiveCare), expected_success(supportiveCare, 0.2915119539701381)]).
1049
+ step(therapy(supportiveCare), fact(39), [], []).
1050
+ step(expected_success(supportiveCare, 0.2915119539701381),
1051
+ rule(67),
1052
+ ['Therapy' = supportiveCare,
1053
+ 'Expectedsuccess' = 0.2915119539701381,
1054
+ 'Posteriors' = [0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716],
1055
+ 'Successbydisease' = [0.3, 0.3, 0.25, 0.2]],
1056
+ [posteriors(case, [0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716]),
1057
+ success_by_disease(supportiveCare, [0.3, 0.3, 0.25, 0.2]),
1058
+ dot_product([0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716], [0.3, 0.3, 0.25, 0.2], 0.2915119539701381)]).
1059
+ step(success_by_disease(supportiveCare, [0.3, 0.3, 0.25, 0.2]), fact(44), [], []).
1060
+ step(dot_product([0.48388282341092037, 0.42789379600913957, 0.006685840562642804, 0.08153754001729716], [0.3, 0.3, 0.25, 0.2], 0.2915119539701381),
1061
+ rule(66),
1062
+ ['Left' = 0.48388282341092037,
1063
+ 'Restleft' = [0.42789379600913957, 0.006685840562642804, 0.08153754001729716],
1064
+ 'Right' = 0.3,
1065
+ 'Restright' = [0.3, 0.25, 0.2],
1066
+ 'Sum' = 0.2915119539701381,
1067
+ 'Term' = 0.14516484702327612,
1068
+ 'Tailsum' = 0.146347106946862],
1069
+ [0.14516484702327612 is 0.48388282341092037 * 0.3,
1070
+ dot_product([0.42789379600913957, 0.006685840562642804, 0.08153754001729716], [0.3, 0.25, 0.2], 0.146347106946862),
1071
+ 0.2915119539701381 is 0.14516484702327612 + 0.146347106946862]).
1072
+ step(0.14516484702327612 is 0.48388282341092037 * 0.3, builtin, [], []).
1073
+ step(dot_product([0.42789379600913957, 0.006685840562642804, 0.08153754001729716], [0.3, 0.25, 0.2], 0.146347106946862),
1074
+ rule(66),
1075
+ ['Left' = 0.42789379600913957,
1076
+ 'Restleft' = [0.006685840562642804, 0.08153754001729716],
1077
+ 'Right' = 0.3,
1078
+ 'Restright' = [0.25, 0.2],
1079
+ 'Sum' = 0.146347106946862,
1080
+ 'Term' = 0.12836813880274187,
1081
+ 'Tailsum' = 0.017978968144120134],
1082
+ [0.12836813880274187 is 0.42789379600913957 * 0.3,
1083
+ dot_product([0.006685840562642804, 0.08153754001729716], [0.25, 0.2], 0.017978968144120134),
1084
+ 0.146347106946862 is 0.12836813880274187 + 0.017978968144120134]).
1085
+ step(0.12836813880274187 is 0.42789379600913957 * 0.3, builtin, [], []).
1086
+ step(dot_product([0.006685840562642804, 0.08153754001729716], [0.25, 0.2], 0.017978968144120134),
1087
+ rule(66),
1088
+ ['Left' = 0.006685840562642804,
1089
+ 'Restleft' = [0.08153754001729716],
1090
+ 'Right' = 0.25,
1091
+ 'Restright' = [0.2],
1092
+ 'Sum' = 0.017978968144120134,
1093
+ 'Term' = 0.001671460140660701,
1094
+ 'Tailsum' = 0.016307508003459432],
1095
+ [0.001671460140660701 is 0.006685840562642804 * 0.25,
1096
+ dot_product([0.08153754001729716], [0.2], 0.016307508003459432),
1097
+ 0.017978968144120134 is 0.001671460140660701 + 0.016307508003459432]).
1098
+ step(0.001671460140660701 is 0.006685840562642804 * 0.25, builtin, [], []).
1099
+ step(dot_product([0.08153754001729716], [0.2], 0.016307508003459432),
1100
+ rule(66),
1101
+ ['Left' = 0.08153754001729716,
1102
+ 'Restleft' = [],
1103
+ 'Right' = 0.2,
1104
+ 'Restright' = [],
1105
+ 'Sum' = 0.016307508003459432,
1106
+ 'Term' = 0.016307508003459432,
1107
+ 'Tailsum' = 0.0],
1108
+ [0.016307508003459432 is 0.08153754001729716 * 0.2,
1109
+ dot_product([], [], 0.0),
1110
+ 0.016307508003459432 is 0.016307508003459432 + 0.0]).
1111
+ step(0.016307508003459432 is 0.08153754001729716 * 0.2, builtin, [], []).
1112
+ step(0.016307508003459432 is 0.016307508003459432 + 0.0, builtin, [], []).
1113
+ step(0.017978968144120134 is 0.001671460140660701 + 0.016307508003459432, builtin, [], []).
1114
+ step(0.146347106946862 is 0.12836813880274187 + 0.017978968144120134, builtin, [], []).
1115
+ step(0.2915119539701381 is 0.14516484702327612 + 0.146347106946862, builtin, [], []).
1116
+ step(expectedAdverse(paxlovid, 0.1),
1117
+ rule(78),
1118
+ ['Therapy' = paxlovid, 'Adverse' = 0.1],
1119
+ [therapy(paxlovid), adverse(paxlovid, 0.1)]).
1120
+ step(adverse(paxlovid, 0.1), fact(45), [], []).
1121
+ step(expectedAdverse(oseltamivir, 0.08),
1122
+ rule(78),
1123
+ ['Therapy' = oseltamivir, 'Adverse' = 0.08],
1124
+ [therapy(oseltamivir), adverse(oseltamivir, 0.08)]).
1125
+ step(adverse(oseltamivir, 0.08), fact(46), [], []).
1126
+ step(expectedAdverse(antihistamine, 0.03),
1127
+ rule(78),
1128
+ ['Therapy' = antihistamine, 'Adverse' = 0.03],
1129
+ [therapy(antihistamine), adverse(antihistamine, 0.03)]).
1130
+ step(adverse(antihistamine, 0.03), fact(47), [], []).
1131
+ step(expectedAdverse(antibiotic, 0.07),
1132
+ rule(78),
1133
+ ['Therapy' = antibiotic, 'Adverse' = 0.07],
1134
+ [therapy(antibiotic), adverse(antibiotic, 0.07)]).
1135
+ step(adverse(antibiotic, 0.07), fact(48), [], []).
1136
+ step(expectedAdverse(supportiveCare, 0.01),
1137
+ rule(78),
1138
+ ['Therapy' = supportiveCare, 'Adverse' = 0.01],
1139
+ [therapy(supportiveCare), adverse(supportiveCare, 0.01)]).
1140
+ step(adverse(supportiveCare, 0.01), fact(49), [], []).
1141
+ step(utility(paxlovid, 3.5851740117076503),
1142
+ rule(79),
1143
+ ['Therapy' = paxlovid, 'Utility' = 3.5851740117076503],
1144
+ [therapy(paxlovid), therapy_utility(paxlovid, 3.5851740117076503)]).
1145
+ step(therapy_utility(paxlovid, 3.5851740117076503),
1146
+ rule(68),
1147
+ ['Therapy' = paxlovid,
1148
+ 'Utility' = 3.5851740117076503,
1149
+ 'Expectedsuccess' = 0.388517401170765,
1150
+ 'Adverse' = 0.1,
1151
+ 'Benefitweight' = 10,
1152
+ 'Harmweight' = 3,
1153
+ 'Benefit' = 3.88517401170765,
1154
+ 'Harmcost' = 0.30000000000000004],
1155
+ [expected_success(paxlovid, 0.388517401170765),
1156
+ adverse(paxlovid, 0.1),
1157
+ benefit_weight(10),
1158
+ harm_weight(3),
1159
+ 3.88517401170765 is 10 * 0.388517401170765,
1160
+ 0.30000000000000004 is 3 * 0.1,
1161
+ 3.5851740117076503 is 3.88517401170765 - 0.30000000000000004]).
1162
+ step(benefit_weight(10), fact(50), [], []).
1163
+ step(harm_weight(3), fact(51), [], []).
1164
+ step(3.88517401170765 is 10 * 0.388517401170765, builtin, [], []).
1165
+ step(0.30000000000000004 is 3 * 0.1, builtin, [], []).
1166
+ step(3.5851740117076503 is 3.88517401170765 - 0.30000000000000004, builtin, [], []).
1167
+ step(utility(oseltamivir, 2.6114101258814744),
1168
+ rule(79),
1169
+ ['Therapy' = oseltamivir, 'Utility' = 2.6114101258814744],
1170
+ [therapy(oseltamivir), therapy_utility(oseltamivir, 2.6114101258814744)]).
1171
+ step(therapy_utility(oseltamivir, 2.6114101258814744),
1172
+ rule(68),
1173
+ ['Therapy' = oseltamivir,
1174
+ 'Utility' = 2.6114101258814744,
1175
+ 'Expectedsuccess' = 0.28514101258814745,
1176
+ 'Adverse' = 0.08,
1177
+ 'Benefitweight' = 10,
1178
+ 'Harmweight' = 3,
1179
+ 'Benefit' = 2.8514101258814746,
1180
+ 'Harmcost' = 0.24],
1181
+ [expected_success(oseltamivir, 0.28514101258814745),
1182
+ adverse(oseltamivir, 0.08),
1183
+ benefit_weight(10),
1184
+ harm_weight(3),
1185
+ 2.8514101258814746 is 10 * 0.28514101258814745,
1186
+ 0.24 is 3 * 0.08,
1187
+ 2.6114101258814744 is 2.8514101258814746 - 0.24]).
1188
+ step(2.8514101258814746 is 10 * 0.28514101258814745, builtin, [], []).
1189
+ step(0.24 is 3 * 0.08, builtin, [], []).
1190
+ step(2.6114101258814744 is 2.8514101258814746 - 0.24, builtin, [], []).
1191
+ step(utility(antihistamine, 0.9126891936485296),
1192
+ rule(79),
1193
+ ['Therapy' = antihistamine, 'Utility' = 0.9126891936485296],
1194
+ [therapy(antihistamine), therapy_utility(antihistamine, 0.9126891936485296)]).
1195
+ step(therapy_utility(antihistamine, 0.9126891936485296),
1196
+ rule(68),
1197
+ ['Therapy' = antihistamine,
1198
+ 'Utility' = 0.9126891936485296,
1199
+ 'Expectedsuccess' = 0.10026891936485297,
1200
+ 'Adverse' = 0.03,
1201
+ 'Benefitweight' = 10,
1202
+ 'Harmweight' = 3,
1203
+ 'Benefit' = 1.0026891936485296,
1204
+ 'Harmcost' = 0.09],
1205
+ [expected_success(antihistamine, 0.10026891936485297),
1206
+ adverse(antihistamine, 0.03),
1207
+ benefit_weight(10),
1208
+ harm_weight(3),
1209
+ 1.0026891936485296 is 10 * 0.10026891936485297,
1210
+ 0.09 is 3 * 0.03,
1211
+ 0.9126891936485296 is 1.0026891936485296 - 0.09]).
1212
+ step(1.0026891936485296 is 10 * 0.10026891936485297, builtin, [], []).
1213
+ step(0.09 is 3 * 0.03, builtin, [], []).
1214
+ step(0.9126891936485296 is 1.0026891936485296 - 0.09, builtin, [], []).
1215
+ step(utility(antibiotic, 0.8995257979609361),
1216
+ rule(79),
1217
+ ['Therapy' = antibiotic, 'Utility' = 0.8995257979609361],
1218
+ [therapy(antibiotic), therapy_utility(antibiotic, 0.8995257979609361)]).
1219
+ step(therapy_utility(antibiotic, 0.8995257979609361),
1220
+ rule(68),
1221
+ ['Therapy' = antibiotic,
1222
+ 'Utility' = 0.8995257979609361,
1223
+ 'Expectedsuccess' = 0.1109525797960936,
1224
+ 'Adverse' = 0.07,
1225
+ 'Benefitweight' = 10,
1226
+ 'Harmweight' = 3,
1227
+ 'Benefit' = 1.109525797960936,
1228
+ 'Harmcost' = 0.21000000000000002],
1229
+ [expected_success(antibiotic, 0.1109525797960936),
1230
+ adverse(antibiotic, 0.07),
1231
+ benefit_weight(10),
1232
+ harm_weight(3),
1233
+ 1.109525797960936 is 10 * 0.1109525797960936,
1234
+ 0.21000000000000002 is 3 * 0.07,
1235
+ 0.8995257979609361 is 1.109525797960936 - 0.21000000000000002]).
1236
+ step(1.109525797960936 is 10 * 0.1109525797960936, builtin, [], []).
1237
+ step(0.21000000000000002 is 3 * 0.07, builtin, [], []).
1238
+ step(0.8995257979609361 is 1.109525797960936 - 0.21000000000000002, builtin, [], []).
1239
+ step(utility(supportiveCare, 2.8851195397013814),
1240
+ rule(79),
1241
+ ['Therapy' = supportiveCare, 'Utility' = 2.8851195397013814],
1242
+ [therapy(supportiveCare), therapy_utility(supportiveCare, 2.8851195397013814)]).
1243
+ step(therapy_utility(supportiveCare, 2.8851195397013814),
1244
+ rule(68),
1245
+ ['Therapy' = supportiveCare,
1246
+ 'Utility' = 2.8851195397013814,
1247
+ 'Expectedsuccess' = 0.2915119539701381,
1248
+ 'Adverse' = 0.01,
1249
+ 'Benefitweight' = 10,
1250
+ 'Harmweight' = 3,
1251
+ 'Benefit' = 2.915119539701381,
1252
+ 'Harmcost' = 0.03],
1253
+ [expected_success(supportiveCare, 0.2915119539701381),
1254
+ adverse(supportiveCare, 0.01),
1255
+ benefit_weight(10),
1256
+ harm_weight(3),
1257
+ 2.915119539701381 is 10 * 0.2915119539701381,
1258
+ 0.03 is 3 * 0.01,
1259
+ 2.8851195397013814 is 2.915119539701381 - 0.03]).
1260
+ step(2.915119539701381 is 10 * 0.2915119539701381, builtin, [], []).
1261
+ step(0.03 is 3 * 0.01, builtin, [], []).
1262
+ step(2.8851195397013814 is 2.915119539701381 - 0.03, builtin, [], []).
1263
+ step(recommendedTherapy(case, paxlovid),
1264
+ rule(80),
1265
+ ['Best' = paxlovid,
1266
+ 'Therapies' = [paxlovid, oseltamivir, supportiveCare, antibiotic, antihistamine]],
1267
+ [therapies(case, [paxlovid, oseltamivir, supportiveCare, antibiotic, antihistamine]),
1268
+ best_therapy([paxlovid, oseltamivir, supportiveCare, antibiotic, antihistamine], paxlovid)]).
1269
+ step(therapies(case, [paxlovid, oseltamivir, supportiveCare, antibiotic, antihistamine]),
1270
+ fact(9),
1271
+ [],
1272
+ []).
1273
+ step(best_therapy([paxlovid, oseltamivir, supportiveCare, antibiotic, antihistamine], paxlovid),
1274
+ rule(72),
1275
+ ['Head' = paxlovid,
1276
+ 'Next' = oseltamivir,
1277
+ 'Rest' = [supportiveCare, antibiotic, antihistamine],
1278
+ 'Best' = paxlovid,
1279
+ 'Bestrest' = supportiveCare],
1280
+ [best_therapy([oseltamivir, supportiveCare, antibiotic, antihistamine], supportiveCare),
1281
+ better_of(paxlovid, supportiveCare, paxlovid)]).
1282
+ step(best_therapy([oseltamivir, supportiveCare, antibiotic, antihistamine], supportiveCare),
1283
+ rule(72),
1284
+ ['Head' = oseltamivir,
1285
+ 'Next' = supportiveCare,
1286
+ 'Rest' = [antibiotic, antihistamine],
1287
+ 'Best' = supportiveCare,
1288
+ 'Bestrest' = supportiveCare],
1289
+ [best_therapy([supportiveCare, antibiotic, antihistamine], supportiveCare),
1290
+ better_of(oseltamivir, supportiveCare, supportiveCare)]).
1291
+ step(best_therapy([supportiveCare, antibiotic, antihistamine], supportiveCare),
1292
+ rule(72),
1293
+ ['Head' = supportiveCare,
1294
+ 'Next' = antibiotic,
1295
+ 'Rest' = [antihistamine],
1296
+ 'Best' = supportiveCare,
1297
+ 'Bestrest' = antihistamine],
1298
+ [best_therapy([antibiotic, antihistamine], antihistamine),
1299
+ better_of(supportiveCare, antihistamine, supportiveCare)]).
1300
+ step(best_therapy([antibiotic, antihistamine], antihistamine),
1301
+ rule(72),
1302
+ ['Head' = antibiotic,
1303
+ 'Next' = antihistamine,
1304
+ 'Rest' = [],
1305
+ 'Best' = antihistamine,
1306
+ 'Bestrest' = antihistamine],
1307
+ [best_therapy([antihistamine], antihistamine),
1308
+ better_of(antibiotic, antihistamine, antihistamine)]).
1309
+ step(best_therapy([antihistamine], antihistamine), fact(71), ['Therapy' = antihistamine], []).
1310
+ step(better_of(antibiotic, antihistamine, antihistamine),
1311
+ rule(70),
1312
+ ['Therapy1' = antibiotic,
1313
+ 'Therapy2' = antihistamine,
1314
+ 'Utility1' = 0.8995257979609361,
1315
+ 'Utility2' = 0.9126891936485296],
1316
+ [therapy_utility(antibiotic, 0.8995257979609361),
1317
+ therapy_utility(antihistamine, 0.9126891936485296),
1318
+ 0.8995257979609361 < 0.9126891936485296]).
1319
+ step(0.8995257979609361 < 0.9126891936485296, builtin, [], []).
1320
+ step(better_of(supportiveCare, antihistamine, supportiveCare),
1321
+ rule(69),
1322
+ ['Therapy1' = supportiveCare,
1323
+ 'Therapy2' = antihistamine,
1324
+ 'Utility1' = 2.8851195397013814,
1325
+ 'Utility2' = 0.9126891936485296],
1326
+ [therapy_utility(supportiveCare, 2.8851195397013814),
1327
+ therapy_utility(antihistamine, 0.9126891936485296),
1328
+ 2.8851195397013814 >= 0.9126891936485296]).
1329
+ step(2.8851195397013814 >= 0.9126891936485296, builtin, [], []).
1330
+ step(better_of(oseltamivir, supportiveCare, supportiveCare),
1331
+ rule(70),
1332
+ ['Therapy1' = oseltamivir,
1333
+ 'Therapy2' = supportiveCare,
1334
+ 'Utility1' = 2.6114101258814744,
1335
+ 'Utility2' = 2.8851195397013814],
1336
+ [therapy_utility(oseltamivir, 2.6114101258814744),
1337
+ therapy_utility(supportiveCare, 2.8851195397013814),
1338
+ 2.6114101258814744 < 2.8851195397013814]).
1339
+ step(2.6114101258814744 < 2.8851195397013814, builtin, [], []).
1340
+ step(better_of(paxlovid, supportiveCare, paxlovid),
1341
+ rule(69),
1342
+ ['Therapy1' = paxlovid,
1343
+ 'Therapy2' = supportiveCare,
1344
+ 'Utility1' = 3.5851740117076503,
1345
+ 'Utility2' = 2.8851195397013814],
1346
+ [therapy_utility(paxlovid, 3.5851740117076503),
1347
+ therapy_utility(supportiveCare, 2.8851195397013814),
1348
+ 3.5851740117076503 >= 2.8851195397013814]).
1349
+ step(3.5851740117076503 >= 2.8851195397013814, builtin, [], []).