eyelang 1.3.8 → 1.4.0

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 (219) hide show
  1. package/README.md +19 -14
  2. package/SPEC.md +4 -4
  3. package/conformance/expected/core/001_fact_query.out +0 -8
  4. package/conformance/expected/core/002_rule_recursion.out +0 -41
  5. package/conformance/expected/core/003_terms_and_readback.out +0 -104
  6. package/conformance/expected/core/004_conjunction_and_parentheses.out +0 -25
  7. package/conformance/expected/core/005_list_deconstruction.out +0 -32
  8. package/conformance/expected/core/006_comma_formula_data.out +0 -15
  9. package/conformance/expected/core/007_anonymous_variables.out +0 -19
  10. package/conformance/expected/core/008_graphic_atoms.out +0 -24
  11. package/conformance/expected/core/009_comments_and_whitespace.out +0 -30
  12. package/conformance/expected/core/010_variable_scope_and_reuse.out +0 -52
  13. package/conformance/expected/core/011_predicate_arity.out +0 -30
  14. package/conformance/expected/core/012_nested_compound_unification.out +0 -30
  15. package/conformance/expected/core/013_multiple_clauses_order.out +0 -44
  16. package/conformance/expected/core/014_failure_filters_answers.out +0 -19
  17. package/conformance/expected/core/015_improper_list_unification.out +0 -45
  18. package/conformance/expected/core/016_zero_arity_compound.out +0 -15
  19. package/conformance/expected/core/017_three_step_recursion.out +0 -99
  20. package/conformance/expected/core/018_quoted_atom_readback.out +0 -45
  21. package/conformance/expected/core/019_parenthesized_three_conjuncts.out +0 -36
  22. package/conformance/expected/core/020_nested_list_terms.out +0 -30
  23. package/conformance/expected/extension/001_default_derived_output.out +0 -56
  24. package/conformance/expected/extension/002_materialize_focus.out +0 -22
  25. package/conformance/expected/extension/003_arithmetic_and_comparison.out +0 -148
  26. package/conformance/expected/extension/004_strings_and_atoms.out +0 -58
  27. package/conformance/expected/extension/005_lists_aggregation_ordering.out +0 -135
  28. package/conformance/expected/extension/006_formula_terms.out +0 -76
  29. package/conformance/expected/extension/007_negation_once_generators.out +0 -40
  30. package/conformance/expected/extension/008_equality_and_inequality.out +0 -58
  31. package/conformance/expected/extension/009_list_relations.out +0 -73
  32. package/conformance/expected/extension/010_append_splits.out +0 -45
  33. package/conformance/expected/extension/011_matching_and_comparison.out +0 -70
  34. package/conformance/expected/extension/012_memoize_declaration.out +0 -41
  35. package/conformance/expected/extension/013_numeric_functions.out +0 -105
  36. package/conformance/expected/extension/014_between_enumeration.out +0 -45
  37. package/conformance/expected/extension/015_smallest_divisor.out +0 -15
  38. package/conformance/expected/extension/016_negation_filter.out +0 -38
  39. package/conformance/expected/extension/017_once_user_predicate.out +0 -21
  40. package/conformance/expected/extension/018_findall_user_goal.out +0 -15
  41. package/conformance/expected/extension/019_sort_deduplicates_atoms.out +0 -15
  42. package/conformance/expected/extension/020_append_bound_prefix_suffix.out +0 -30
  43. package/conformance/expected/extension/021_nth0_index_generation.out +0 -15
  44. package/conformance/expected/extension/022_set_nth0_edges.out +0 -30
  45. package/conformance/expected/extension/023_select_duplicate_occurrences.out +0 -30
  46. package/conformance/expected/extension/024_not_member_filter.out +0 -19
  47. package/conformance/expected/extension/025_is_list_filter.out +0 -19
  48. package/conformance/expected/extension/026_nested_formula_terms.out +0 -114
  49. package/conformance/expected/extension/027_materialize_excludes_source_fact.out +0 -14
  50. package/conformance/expected/extension/028_numeric_and_lexical_comparison.out +0 -42
  51. package/conformance/expected/extension/029_string_matching_filters.out +0 -38
  52. package/conformance/expected/extension/030_string_and_atom_concat.out +0 -30
  53. package/conformance/expected/extension/031_countall_empty_and_nonempty.out +0 -18
  54. package/conformance/expected/extension/032_sumall_numeric_template.out +0 -8
  55. package/conformance/expected/extension/033_aggregate_min_template.out +0 -8
  56. package/conformance/expected/extension/034_aggregate_max_compound_key.out +0 -8
  57. package/examples/output/access-control-policy.pl +0 -156
  58. package/examples/output/ackermann.pl +0 -1240
  59. package/examples/output/age.pl +0 -69
  60. package/examples/output/aliases-and-namespaces.pl +0 -73
  61. package/examples/output/alignment-demo.pl +0 -862
  62. package/examples/output/allen-interval-calculus.pl +0 -9169
  63. package/examples/output/ancestor.pl +0 -134
  64. package/examples/output/animal.pl +0 -64
  65. package/examples/output/annotation.pl +0 -76
  66. package/examples/output/backward.pl +0 -21
  67. package/examples/output/basic-monadic.pl +0 -22770
  68. package/examples/output/bayes-diagnosis.pl +0 -195
  69. package/examples/output/bayes-therapy.pl +0 -34873
  70. package/examples/output/beam-deflection.pl +0 -222
  71. package/examples/output/blocks-world-planning.pl +0 -1339
  72. package/examples/output/bmi.pl +0 -1903
  73. package/examples/output/braking-safety-worlds.pl +0 -2452
  74. package/examples/output/buck-converter-design.pl +0 -663
  75. package/examples/output/cache-performance.pl +0 -306
  76. package/examples/output/canary-release.pl +0 -167
  77. package/examples/output/cat-koko.pl +0 -83
  78. package/examples/output/clinical-trial-screening.pl +0 -380
  79. package/examples/output/collatz-1000.pl +0 -19000
  80. package/examples/output/combinatorics-findall-sort.pl +0 -56
  81. package/examples/output/competitive-enzyme-kinetics.pl +0 -563
  82. package/examples/output/complex-matrix-stability.pl +0 -250
  83. package/examples/output/complex.pl +0 -653
  84. package/examples/output/composition-of-injective-functions-is-injective.pl +0 -256
  85. package/examples/output/context-association.pl +0 -75
  86. package/examples/output/control-system.pl +0 -328
  87. package/examples/output/cryptarithmetic-send-more-money.pl +0 -168
  88. package/examples/output/cyclic-path.pl +0 -504
  89. package/examples/output/d3-group.pl +0 -56
  90. package/examples/output/dairy-energy-balance.pl +0 -1034
  91. package/examples/output/data-negotiation.pl +0 -75
  92. package/examples/output/deep-taxonomy-10.pl +0 -1235
  93. package/examples/output/deep-taxonomy-100.pl +0 -1235
  94. package/examples/output/deep-taxonomy-1000.pl +0 -1235
  95. package/examples/output/deep-taxonomy-10000.pl +0 -2915
  96. package/examples/output/deep-taxonomy-100000.pl +0 -20240
  97. package/examples/output/delfour.pl +0 -2829
  98. package/examples/output/dense-hamiltonian-cycle.pl +0 -207
  99. package/examples/output/deontic-logic.pl +0 -105
  100. package/examples/output/derived-rule.pl +0 -41
  101. package/examples/output/diamond-property.pl +0 -303
  102. package/examples/output/dijkstra-findall-sort.pl +0 -484
  103. package/examples/output/dijkstra-risk-path.pl +0 -4841
  104. package/examples/output/dijkstra.pl +0 -1336
  105. package/examples/output/dining-philosophers.pl +0 -21646
  106. package/examples/output/dog.pl +0 -30
  107. package/examples/output/drone-corridor-planner.pl +0 -2466
  108. package/examples/output/easter-computus.pl +0 -5690
  109. package/examples/output/electrical-rc-filter.pl +0 -102
  110. package/examples/output/epidemic-policy.pl +0 -760
  111. package/examples/output/equivalence-classes-overlap-implies-same-class.pl +0 -1080
  112. package/examples/output/eulerian-path.pl +0 -383
  113. package/examples/output/ev-range-worlds.pl +0 -2294
  114. package/examples/output/exact-cover-sudoku.pl +0 -396
  115. package/examples/output/existential-rule.pl +0 -38
  116. package/examples/output/exoplanet-validation-worlds.pl +0 -1904
  117. package/examples/output/expression-eval.pl +0 -104
  118. package/examples/output/family-cousins.pl +0 -3852
  119. package/examples/output/fastpow.pl +0 -1064
  120. package/examples/output/fft8-numeric.pl +0 -2556
  121. package/examples/output/fibonacci.pl +0 -2060
  122. package/examples/output/field-nitrogen-balance.pl +0 -1452
  123. package/examples/output/floating-point.pl +0 -151
  124. package/examples/output/four-color-map.pl +0 -191
  125. package/examples/output/fundamental-theorem-arithmetic.pl +0 -1610
  126. package/examples/output/gcd-bezout-identity.pl +0 -1842
  127. package/examples/output/gd-step-certified.pl +0 -32354
  128. package/examples/output/gdpr-compliance.pl +0 -193
  129. package/examples/output/goldbach-1000.pl +0 -17490
  130. package/examples/output/good-cobbler.pl +0 -15
  131. package/examples/output/gps.pl +0 -4166
  132. package/examples/output/graph-reachability.pl +0 -148
  133. package/examples/output/gray-code-counter.pl +0 -835
  134. package/examples/output/greatest-lower-bound-uniqueness.pl +0 -148
  135. package/examples/output/group-inverse-uniqueness.pl +0 -82
  136. package/examples/output/hamiltonian-cycle.pl +0 -102
  137. package/examples/output/hamiltonian-path.pl +0 -14157
  138. package/examples/output/hamming-code.pl +0 -2665
  139. package/examples/output/hanoi.pl +0 -184
  140. package/examples/output/heat-loss.pl +0 -223
  141. package/examples/output/heron-theorem.pl +0 -253
  142. package/examples/output/ideal-gas-law.pl +0 -148
  143. package/examples/output/illegitimate-reasoning.pl +0 -530
  144. package/examples/output/kaprekar.pl +0 -208
  145. package/examples/output/law-of-cosines.pl +0 -165
  146. package/examples/output/least-squares-regression.pl +0 -1447
  147. package/examples/output/list-collection.pl +0 -49
  148. package/examples/output/lldm.pl +0 -17298
  149. package/examples/output/manufacturing-quality-control.pl +0 -562
  150. package/examples/output/matrix.pl +0 -206
  151. package/examples/output/microgrid-dispatch.pl +0 -787
  152. package/examples/output/monkey-bananas.pl +0 -575
  153. package/examples/output/n-queens.pl +0 -2046
  154. package/examples/output/network-sla.pl +0 -282
  155. package/examples/output/newton-raphson.pl +0 -756
  156. package/examples/output/nixon-diamond.pl +0 -176
  157. package/examples/output/odrl-dpv-healthcare-risk-ranked.pl +0 -6148
  158. package/examples/output/odrl-dpv-risk-ranked.pl +0 -12961
  159. package/examples/output/orbital-transfer-design.pl +0 -961
  160. package/examples/output/path-discovery.pl +0 -333
  161. package/examples/output/peano-arithmetic.pl +0 -1432
  162. package/examples/output/peasant.pl +0 -190
  163. package/examples/output/pendulum-period.pl +0 -271
  164. package/examples/output/polynomial.pl +0 -7952
  165. package/examples/output/project-portfolio-optimization.pl +0 -93
  166. package/examples/output/proof-contrapositive.pl +0 -75
  167. package/examples/output/quadratic-formula.pl +0 -454
  168. package/examples/output/quine-mccluskey.pl +0 -188
  169. package/examples/output/radioactive-decay.pl +0 -299
  170. package/examples/output/sat-dpll.pl +0 -121
  171. package/examples/output/security-incident-correlation.pl +0 -267
  172. package/examples/output/service-impact.pl +0 -457
  173. package/examples/output/sieve.pl +0 -19
  174. package/examples/output/skolem-functions.pl +0 -264
  175. package/examples/output/socket-age.pl +0 -31
  176. package/examples/output/socket-family.pl +0 -56
  177. package/examples/output/socrates.pl +0 -36
  178. package/examples/output/statistics-summary.pl +0 -741
  179. package/examples/output/sudoku.pl +0 -38
  180. package/examples/output/superdense-coding.pl +0 -476
  181. package/examples/output/traveling-salesman.pl +0 -284
  182. package/examples/output/turing.pl +0 -2144
  183. package/examples/output/vector-similarity.pl +0 -421
  184. package/examples/output/witch.pl +0 -209
  185. package/examples/output/wolf-goat-cabbage.pl +0 -900
  186. package/examples/output/zebra.pl +0 -401
  187. package/examples/proof/age.pl +71 -0
  188. package/examples/proof/aliases-and-namespaces.pl +78 -0
  189. package/examples/proof/ancestor.pl +140 -0
  190. package/examples/proof/animal.pl +68 -0
  191. package/examples/proof/annotation.pl +80 -0
  192. package/examples/proof/backward.pl +22 -0
  193. package/examples/proof/cat-koko.pl +86 -0
  194. package/examples/proof/data-negotiation.pl +76 -0
  195. package/examples/proof/derived-rule.pl +43 -0
  196. package/examples/proof/dog.pl +31 -0
  197. package/examples/proof/electrical-rc-filter.pl +105 -0
  198. package/examples/proof/existential-rule.pl +40 -0
  199. package/examples/proof/floating-point.pl +160 -0
  200. package/examples/proof/good-cobbler.pl +16 -0
  201. package/examples/proof/group-inverse-uniqueness.pl +84 -0
  202. package/examples/proof/list-collection.pl +52 -0
  203. package/examples/proof/proof-contrapositive.pl +78 -0
  204. package/examples/proof/socket-age.pl +32 -0
  205. package/examples/proof/socket-family.pl +59 -0
  206. package/examples/proof/socrates.pl +38 -0
  207. package/examples/socket-age.pl +4 -4
  208. package/examples/socket-family.pl +4 -4
  209. package/package.json +1 -1
  210. package/playground-worker.mjs +4 -4
  211. package/playground.html +15 -15
  212. package/src/cli.js +10 -10
  213. package/src/index.js +3 -2
  214. package/src/parser.js +130 -1
  215. package/src/program.js +33 -27
  216. package/test/run-all.js +0 -0
  217. package/test/run-conformance.js +0 -0
  218. package/test/run-examples.js +38 -8
  219. package/test/run-regression.js +29 -28
@@ -1,2854 +1,25 @@
1
1
  caseName(case, "delfour").
2
- why(
3
- caseName(case, "delfour"),
4
- proof(
5
- goal(caseName(case, "delfour")),
6
- by(rule("delfour.pl", clause(97))),
7
- bindings([binding("Name", "delfour")]),
8
- uses([
9
- proof(
10
- goal(case_name(case, "delfour")),
11
- by(rule("delfour.pl", clause(37))),
12
- bindings([binding("Name", "delfour")]),
13
- uses([
14
- proof(
15
- goal(case_statement(case, caseName, "delfour")),
16
- by(rule("delfour.pl", clause(32))),
17
- bindings([binding("S", case), binding("P", caseName), binding("O", "delfour"), binding("Formula", (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))]),
18
- uses([
19
- proof(
20
- goal(case_graph(delfourCaseGraph, (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))),
21
- by(fact("delfour.pl", clause(25)))
22
- ),
23
- proof(
24
- goal(formula_binary((caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)), case, caseName, "delfour")),
25
- by(builtin(formula_binary, 4))
26
- )
27
- ])
28
- )
29
- ])
30
- )
31
- ])
32
- )
33
- ).
34
-
35
2
  needsLowSugar(case, true).
36
- why(
37
- needsLowSugar(case, true),
38
- proof(
39
- goal(needsLowSugar(case, true)),
40
- by(rule("delfour.pl", clause(98))),
41
- uses([
42
- proof(
43
- goal(needs_low_sugar(case)),
44
- by(rule("delfour.pl", clause(78))),
45
- uses([
46
- proof(
47
- goal(condition(householdProfile, "Diabetes")),
48
- by(rule("delfour.pl", clause(46))),
49
- bindings([binding("Condition", "Diabetes")]),
50
- uses([
51
- proof(
52
- goal(case_statement(householdProfile, condition, "Diabetes")),
53
- by(rule("delfour.pl", clause(32))),
54
- bindings([binding("S", householdProfile), binding("P", condition), binding("O", "Diabetes"), binding("Formula", (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))]),
55
- uses([
56
- proof(
57
- goal(case_graph(delfourCaseGraph, (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))),
58
- by(fact("delfour.pl", clause(25)))
59
- ),
60
- proof(
61
- goal(formula_binary((caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)), householdProfile, condition, "Diabetes")),
62
- by(builtin(formula_binary, 4))
63
- )
64
- ])
65
- )
66
- ])
67
- )
68
- ])
69
- )
70
- ])
71
- )
72
- ).
73
-
74
3
  derivedFromNeed(insight, "low_sugar").
75
- why(
76
- derivedFromNeed(insight, "low_sugar"),
77
- proof(
78
- goal(derivedFromNeed(insight, "low_sugar")),
79
- by(rule("delfour.pl", clause(99))),
80
- bindings([binding("Need", "low_sugar")]),
81
- uses([
82
- proof(
83
- goal(derived_from_need(insight, "low_sugar")),
84
- by(rule("delfour.pl", clause(79))),
85
- uses([
86
- proof(
87
- goal(needs_low_sugar(case)),
88
- by(rule("delfour.pl", clause(78))),
89
- uses([
90
- proof(
91
- goal(condition(householdProfile, "Diabetes")),
92
- by(rule("delfour.pl", clause(46))),
93
- bindings([binding("Condition", "Diabetes")]),
94
- uses([
95
- proof(
96
- goal(case_statement(householdProfile, condition, "Diabetes")),
97
- by(rule("delfour.pl", clause(32))),
98
- bindings([binding("S", householdProfile), binding("P", condition), binding("O", "Diabetes"), binding("Formula", (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))]),
99
- uses([
100
- proof(
101
- goal(case_graph(delfourCaseGraph, (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))),
102
- by(fact("delfour.pl", clause(25)))
103
- ),
104
- proof(
105
- goal(formula_binary((caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)), householdProfile, condition, "Diabetes")),
106
- by(builtin(formula_binary, 4))
107
- )
108
- ])
109
- )
110
- ])
111
- )
112
- ])
113
- )
114
- ])
115
- )
116
- ])
117
- )
118
- ).
119
-
120
4
  outcome(decision, "Allowed").
121
- why(
122
- outcome(decision, "Allowed"),
123
- proof(
124
- goal(outcome(decision, "Allowed")),
125
- by(rule("delfour.pl", clause(100))),
126
- bindings([binding("Outcome", "Allowed"), binding("_Target", insight)]),
127
- uses([
128
- proof(
129
- goal(decision(decision, "Allowed", insight)),
130
- by(rule("delfour.pl", clause(85))),
131
- uses([
132
- proof(
133
- goal(authorization_allowed(check)),
134
- by(rule("delfour.pl", clause(84))),
135
- bindings([binding("AuthAt", "2025-10-05T20:35:48.907163+00:00"), binding("ExpiresAt", "2025-10-05T22:33:48.907185+00:00")]),
136
- uses([
137
- proof(
138
- goal(permission(policy, odrl_use, insight, "shopping_assist")),
139
- by(rule("delfour.pl", clause(66))),
140
- bindings([binding("Action", odrl_use), binding("Target", insight), binding("Purpose", "shopping_assist")]),
141
- uses([
142
- proof(
143
- goal(policy_statement(policy, odrl_permission, permission(odrl_use, insight, "shopping_assist"))),
144
- by(rule("delfour.pl", clause(34))),
145
- bindings([binding("S", policy), binding("P", odrl_permission), binding("O", permission(odrl_use, insight, "shopping_assist")), binding("Formula", (odrl_permission(policy, permission(odrl_use, insight, "shopping_assist")), odrl_prohibition(policy, prohibition(odrl_distribute, insight, "marketing")), odrl_duty(policy, duty(odrl_delete, "2025-10-05T22:33:48.907185+00:00"))))]),
146
- uses([
147
- proof(
148
- goal(policy_graph(delfourPolicyGraph, (odrl_permission(policy, permission(odrl_use, insight, "shopping_assist")), odrl_prohibition(policy, prohibition(odrl_distribute, insight, "marketing")), odrl_duty(policy, duty(odrl_delete, "2025-10-05T22:33:48.907185+00:00"))))),
149
- by(fact("delfour.pl", clause(28)))
150
- ),
151
- proof(
152
- goal(formula_binary((odrl_permission(policy, permission(odrl_use, insight, "shopping_assist")), odrl_prohibition(policy, prohibition(odrl_distribute, insight, "marketing")), odrl_duty(policy, duty(odrl_delete, "2025-10-05T22:33:48.907185+00:00"))), policy, odrl_permission, permission(odrl_use, insight, "shopping_assist"))),
153
- by(builtin(formula_binary, 4))
154
- )
155
- ])
156
- )
157
- ])
158
- ),
159
- proof(
160
- goal(request_purpose(case, "shopping_assist")),
161
- by(rule("delfour.pl", clause(38))),
162
- bindings([binding("Purpose", "shopping_assist")]),
163
- uses([
164
- proof(
165
- goal(case_statement(case, requestPurpose, "shopping_assist")),
166
- by(rule("delfour.pl", clause(32))),
167
- bindings([binding("S", case), binding("P", requestPurpose), binding("O", "shopping_assist"), binding("Formula", (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))]),
168
- uses([
169
- proof(
170
- goal(case_graph(delfourCaseGraph, (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))),
171
- by(fact("delfour.pl", clause(25)))
172
- ),
173
- proof(
174
- goal(formula_binary((caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)), case, requestPurpose, "shopping_assist")),
175
- by(builtin(formula_binary, 4))
176
- )
177
- ])
178
- )
179
- ])
180
- ),
181
- proof(
182
- goal(scanner_auth_at(case, "2025-10-05T20:35:48.907163+00:00")),
183
- by(rule("delfour.pl", clause(42))),
184
- bindings([binding("Time", "2025-10-05T20:35:48.907163+00:00")]),
185
- uses([
186
- proof(
187
- goal(case_statement(case, scannerAuthAt, "2025-10-05T20:35:48.907163+00:00")),
188
- by(rule("delfour.pl", clause(32))),
189
- bindings([binding("S", case), binding("P", scannerAuthAt), binding("O", "2025-10-05T20:35:48.907163+00:00"), binding("Formula", (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))]),
190
- uses([
191
- proof(
192
- goal(case_graph(delfourCaseGraph, (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))),
193
- by(fact("delfour.pl", clause(25)))
194
- ),
195
- proof(
196
- goal(formula_binary((caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)), case, scannerAuthAt, "2025-10-05T20:35:48.907163+00:00")),
197
- by(builtin(formula_binary, 4))
198
- )
199
- ])
200
- )
201
- ])
202
- ),
203
- proof(
204
- goal(expires_at(insight, "2025-10-05T22:33:48.907185+00:00")),
205
- by(rule("delfour.pl", clause(63))),
206
- bindings([binding("Time", "2025-10-05T22:33:48.907185+00:00")]),
207
- uses([
208
- proof(
209
- goal(insight_statement(insight, expiresAt, "2025-10-05T22:33:48.907185+00:00")),
210
- by(rule("delfour.pl", clause(33))),
211
- bindings([binding("S", insight), binding("P", expiresAt), binding("O", "2025-10-05T22:33:48.907185+00:00"), binding("Formula", (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))]),
212
- uses([
213
- proof(
214
- goal(insight_graph(delfourInsightGraph, (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))),
215
- by(fact("delfour.pl", clause(27)))
216
- ),
217
- proof(
218
- goal(formula_binary((metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")), insight, expiresAt, "2025-10-05T22:33:48.907185+00:00")),
219
- by(builtin(formula_binary, 4))
220
- )
221
- ])
222
- )
223
- ])
224
- ),
225
- proof(
226
- goal(le("2025-10-05T20:35:48.907163+00:00", "2025-10-05T22:33:48.907185+00:00")),
227
- by(builtin(le, 2))
228
- )
229
- ])
230
- )
231
- ])
232
- )
233
- ])
234
- )
235
- ).
236
-
237
5
  target(decision, insight).
238
- why(
239
- target(decision, insight),
240
- proof(
241
- goal(target(decision, insight)),
242
- by(rule("delfour.pl", clause(101))),
243
- bindings([binding("Target", insight), binding("_Outcome", "Allowed")]),
244
- uses([
245
- proof(
246
- goal(decision(decision, "Allowed", insight)),
247
- by(rule("delfour.pl", clause(85))),
248
- uses([
249
- proof(
250
- goal(authorization_allowed(check)),
251
- by(rule("delfour.pl", clause(84))),
252
- bindings([binding("AuthAt", "2025-10-05T20:35:48.907163+00:00"), binding("ExpiresAt", "2025-10-05T22:33:48.907185+00:00")]),
253
- uses([
254
- proof(
255
- goal(permission(policy, odrl_use, insight, "shopping_assist")),
256
- by(rule("delfour.pl", clause(66))),
257
- bindings([binding("Action", odrl_use), binding("Target", insight), binding("Purpose", "shopping_assist")]),
258
- uses([
259
- proof(
260
- goal(policy_statement(policy, odrl_permission, permission(odrl_use, insight, "shopping_assist"))),
261
- by(rule("delfour.pl", clause(34))),
262
- bindings([binding("S", policy), binding("P", odrl_permission), binding("O", permission(odrl_use, insight, "shopping_assist")), binding("Formula", (odrl_permission(policy, permission(odrl_use, insight, "shopping_assist")), odrl_prohibition(policy, prohibition(odrl_distribute, insight, "marketing")), odrl_duty(policy, duty(odrl_delete, "2025-10-05T22:33:48.907185+00:00"))))]),
263
- uses([
264
- proof(
265
- goal(policy_graph(delfourPolicyGraph, (odrl_permission(policy, permission(odrl_use, insight, "shopping_assist")), odrl_prohibition(policy, prohibition(odrl_distribute, insight, "marketing")), odrl_duty(policy, duty(odrl_delete, "2025-10-05T22:33:48.907185+00:00"))))),
266
- by(fact("delfour.pl", clause(28)))
267
- ),
268
- proof(
269
- goal(formula_binary((odrl_permission(policy, permission(odrl_use, insight, "shopping_assist")), odrl_prohibition(policy, prohibition(odrl_distribute, insight, "marketing")), odrl_duty(policy, duty(odrl_delete, "2025-10-05T22:33:48.907185+00:00"))), policy, odrl_permission, permission(odrl_use, insight, "shopping_assist"))),
270
- by(builtin(formula_binary, 4))
271
- )
272
- ])
273
- )
274
- ])
275
- ),
276
- proof(
277
- goal(request_purpose(case, "shopping_assist")),
278
- by(rule("delfour.pl", clause(38))),
279
- bindings([binding("Purpose", "shopping_assist")]),
280
- uses([
281
- proof(
282
- goal(case_statement(case, requestPurpose, "shopping_assist")),
283
- by(rule("delfour.pl", clause(32))),
284
- bindings([binding("S", case), binding("P", requestPurpose), binding("O", "shopping_assist"), binding("Formula", (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))]),
285
- uses([
286
- proof(
287
- goal(case_graph(delfourCaseGraph, (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))),
288
- by(fact("delfour.pl", clause(25)))
289
- ),
290
- proof(
291
- goal(formula_binary((caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)), case, requestPurpose, "shopping_assist")),
292
- by(builtin(formula_binary, 4))
293
- )
294
- ])
295
- )
296
- ])
297
- ),
298
- proof(
299
- goal(scanner_auth_at(case, "2025-10-05T20:35:48.907163+00:00")),
300
- by(rule("delfour.pl", clause(42))),
301
- bindings([binding("Time", "2025-10-05T20:35:48.907163+00:00")]),
302
- uses([
303
- proof(
304
- goal(case_statement(case, scannerAuthAt, "2025-10-05T20:35:48.907163+00:00")),
305
- by(rule("delfour.pl", clause(32))),
306
- bindings([binding("S", case), binding("P", scannerAuthAt), binding("O", "2025-10-05T20:35:48.907163+00:00"), binding("Formula", (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))]),
307
- uses([
308
- proof(
309
- goal(case_graph(delfourCaseGraph, (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))),
310
- by(fact("delfour.pl", clause(25)))
311
- ),
312
- proof(
313
- goal(formula_binary((caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)), case, scannerAuthAt, "2025-10-05T20:35:48.907163+00:00")),
314
- by(builtin(formula_binary, 4))
315
- )
316
- ])
317
- )
318
- ])
319
- ),
320
- proof(
321
- goal(expires_at(insight, "2025-10-05T22:33:48.907185+00:00")),
322
- by(rule("delfour.pl", clause(63))),
323
- bindings([binding("Time", "2025-10-05T22:33:48.907185+00:00")]),
324
- uses([
325
- proof(
326
- goal(insight_statement(insight, expiresAt, "2025-10-05T22:33:48.907185+00:00")),
327
- by(rule("delfour.pl", clause(33))),
328
- bindings([binding("S", insight), binding("P", expiresAt), binding("O", "2025-10-05T22:33:48.907185+00:00"), binding("Formula", (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))]),
329
- uses([
330
- proof(
331
- goal(insight_graph(delfourInsightGraph, (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))),
332
- by(fact("delfour.pl", clause(27)))
333
- ),
334
- proof(
335
- goal(formula_binary((metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")), insight, expiresAt, "2025-10-05T22:33:48.907185+00:00")),
336
- by(builtin(formula_binary, 4))
337
- )
338
- ])
339
- )
340
- ])
341
- ),
342
- proof(
343
- goal(le("2025-10-05T20:35:48.907163+00:00", "2025-10-05T22:33:48.907185+00:00")),
344
- by(builtin(le, 2))
345
- )
346
- ])
347
- )
348
- ])
349
- )
350
- ])
351
- )
352
- ).
353
-
354
6
  scannedProduct(scan, "Classic Tea Biscuits").
355
- why(
356
- scannedProduct(scan, "Classic Tea Biscuits"),
357
- proof(
358
- goal(scannedProduct(scan, "Classic Tea Biscuits")),
359
- by(rule("delfour.pl", clause(102))),
360
- bindings([binding("ProductName", "Classic Tea Biscuits"), binding("Product", prod_BIS_001)]),
361
- uses([
362
- proof(
363
- goal(scanned_product(scan, prod_BIS_001)),
364
- by(rule("delfour.pl", clause(47))),
365
- bindings([binding("Product", prod_BIS_001)]),
366
- uses([
367
- proof(
368
- goal(case_statement(scan, scannedProduct, prod_BIS_001)),
369
- by(rule("delfour.pl", clause(32))),
370
- bindings([binding("S", scan), binding("P", scannedProduct), binding("O", prod_BIS_001), binding("Formula", (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))]),
371
- uses([
372
- proof(
373
- goal(case_graph(delfourCaseGraph, (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))),
374
- by(fact("delfour.pl", clause(25)))
375
- ),
376
- proof(
377
- goal(formula_binary((caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)), scan, scannedProduct, prod_BIS_001)),
378
- by(builtin(formula_binary, 4))
379
- )
380
- ])
381
- )
382
- ])
383
- ),
384
- proof(
385
- goal(product_name(prod_BIS_001, "Classic Tea Biscuits")),
386
- by(rule("delfour.pl", clause(50))),
387
- bindings([binding("Product", prod_BIS_001), binding("Name", "Classic Tea Biscuits"), binding("Products", [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)]), binding("_Id", "prod_BIS_001"), binding("_SugarTenths", 120), binding("_SugarG", 12.0)]),
388
- uses([
389
- proof(
390
- goal(product_catalog(delfourCatalog, [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
391
- by(fact("delfour.pl", clause(26)))
392
- ),
393
- proof(
394
- goal(member(product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
395
- by(builtin(member, 2))
396
- )
397
- ])
398
- )
399
- ])
400
- )
401
- ).
402
-
403
7
  suggestedAlternative(case, prod_BIS_101).
404
- why(
405
- suggestedAlternative(case, prod_BIS_101),
406
- proof(
407
- goal(suggestedAlternative(case, prod_BIS_101)),
408
- by(rule("delfour.pl", clause(103))),
409
- bindings([binding("Alternative", prod_BIS_101)]),
410
- uses([
411
- proof(
412
- goal(suggested_alternative(case, prod_BIS_101)),
413
- by(rule("delfour.pl", clause(90))),
414
- bindings([binding("Candidate", prod_BIS_101), binding("Scanned", prod_BIS_001), binding("ScannedSugar", 120), binding("CandidateSugar", 30)]),
415
- uses([
416
- proof(
417
- goal(scanned_product(scan, prod_BIS_001)),
418
- by(rule("delfour.pl", clause(47))),
419
- bindings([binding("Product", prod_BIS_001)]),
420
- uses([
421
- proof(
422
- goal(case_statement(scan, scannedProduct, prod_BIS_001)),
423
- by(rule("delfour.pl", clause(32))),
424
- bindings([binding("S", scan), binding("P", scannedProduct), binding("O", prod_BIS_001), binding("Formula", (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))]),
425
- uses([
426
- proof(
427
- goal(case_graph(delfourCaseGraph, (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))),
428
- by(fact("delfour.pl", clause(25)))
429
- ),
430
- proof(
431
- goal(formula_binary((caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)), scan, scannedProduct, prod_BIS_001)),
432
- by(builtin(formula_binary, 4))
433
- )
434
- ])
435
- )
436
- ])
437
- ),
438
- proof(
439
- goal(sugar_tenths(prod_BIS_001, 120)),
440
- by(rule("delfour.pl", clause(51))),
441
- bindings([binding("Product", prod_BIS_001), binding("Sugar", 120), binding("Products", [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)]), binding("_Id", "prod_BIS_001"), binding("_Name", "Classic Tea Biscuits"), binding("_SugarG", 12.0)]),
442
- uses([
443
- proof(
444
- goal(product_catalog(delfourCatalog, [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
445
- by(fact("delfour.pl", clause(26)))
446
- ),
447
- proof(
448
- goal(member(product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
449
- by(builtin(member, 2))
450
- )
451
- ])
452
- ),
453
- proof(
454
- goal(product(prod_BIS_101)),
455
- by(rule("delfour.pl", clause(48))),
456
- bindings([binding("Product", prod_BIS_101), binding("Products", [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)]), binding("_Id", "prod_BIS_101"), binding("_Name", "Low-Sugar Tea Biscuits"), binding("_SugarTenths", 30), binding("_SugarG", 3.0)]),
457
- uses([
458
- proof(
459
- goal(product_catalog(delfourCatalog, [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
460
- by(fact("delfour.pl", clause(26)))
461
- ),
462
- proof(
463
- goal(member(product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
464
- by(builtin(member, 2))
465
- )
466
- ])
467
- ),
468
- proof(
469
- goal(sugar_tenths(prod_BIS_101, 30)),
470
- by(rule("delfour.pl", clause(51))),
471
- bindings([binding("Product", prod_BIS_101), binding("Sugar", 30), binding("Products", [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)]), binding("_Id", "prod_BIS_101"), binding("_Name", "Low-Sugar Tea Biscuits"), binding("_SugarG", 3.0)]),
472
- uses([
473
- proof(
474
- goal(product_catalog(delfourCatalog, [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
475
- by(fact("delfour.pl", clause(26)))
476
- ),
477
- proof(
478
- goal(member(product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
479
- by(builtin(member, 2))
480
- )
481
- ])
482
- ),
483
- proof(
484
- goal(gt(120, 30)),
485
- by(builtin(gt, 2))
486
- ),
487
- proof(
488
- goal(not(better_lower_sugar(120, 30))),
489
- by(builtin(not, 1))
490
- )
491
- ])
492
- )
493
- ])
494
- )
495
- ).
496
-
497
8
  suggestedAlternative(banner, "Low-Sugar Tea Biscuits").
498
- why(
499
- suggestedAlternative(banner, "Low-Sugar Tea Biscuits"),
500
- proof(
501
- goal(suggestedAlternative(banner, "Low-Sugar Tea Biscuits")),
502
- by(rule("delfour.pl", clause(106))),
503
- bindings([binding("Name", "Low-Sugar Tea Biscuits")]),
504
- uses([
505
- proof(
506
- goal(banner_suggested_alternative(banner, "Low-Sugar Tea Biscuits")),
507
- by(rule("delfour.pl", clause(91))),
508
- bindings([binding("Name", "Low-Sugar Tea Biscuits"), binding("Alternative", prod_BIS_101)]),
509
- uses([
510
- proof(
511
- goal(banner_note(banner, "High sugar")),
512
- by(rule("delfour.pl", clause(88))),
513
- uses([
514
- proof(
515
- goal(banner_flags_high_sugar(check)),
516
- by(rule("delfour.pl", clause(86))),
517
- bindings([binding("Product", prod_BIS_001), binding("Sugar", 12.0), binding("Threshold", 10.0)]),
518
- uses([
519
- proof(
520
- goal(decision(decision, "Allowed", insight)),
521
- by(rule("delfour.pl", clause(85))),
522
- uses([
523
- proof(
524
- goal(authorization_allowed(check)),
525
- by(rule("delfour.pl", clause(84))),
526
- bindings([binding("AuthAt", "2025-10-05T20:35:48.907163+00:00"), binding("ExpiresAt", "2025-10-05T22:33:48.907185+00:00")]),
527
- uses([
528
- proof(
529
- goal(permission(policy, odrl_use, insight, "shopping_assist")),
530
- by(rule("delfour.pl", clause(66))),
531
- bindings([binding("Action", odrl_use), binding("Target", insight), binding("Purpose", "shopping_assist")]),
532
- uses([
533
- proof(
534
- goal(policy_statement(policy, odrl_permission, permission(odrl_use, insight, "shopping_assist"))),
535
- by(rule("delfour.pl", clause(34))),
536
- bindings([binding("S", policy), binding("P", odrl_permission), binding("O", permission(odrl_use, insight, "shopping_assist")), binding("Formula", (odrl_permission(policy, permission(odrl_use, insight, "shopping_assist")), odrl_prohibition(policy, prohibition(odrl_distribute, insight, "marketing")), odrl_duty(policy, duty(odrl_delete, "2025-10-05T22:33:48.907185+00:00"))))]),
537
- uses([
538
- proof(
539
- goal(policy_graph(delfourPolicyGraph, (odrl_permission(policy, permission(odrl_use, insight, "shopping_assist")), odrl_prohibition(policy, prohibition(odrl_distribute, insight, "marketing")), odrl_duty(policy, duty(odrl_delete, "2025-10-05T22:33:48.907185+00:00"))))),
540
- by(fact("delfour.pl", clause(28)))
541
- ),
542
- proof(
543
- goal(formula_binary((odrl_permission(policy, permission(odrl_use, insight, "shopping_assist")), odrl_prohibition(policy, prohibition(odrl_distribute, insight, "marketing")), odrl_duty(policy, duty(odrl_delete, "2025-10-05T22:33:48.907185+00:00"))), policy, odrl_permission, permission(odrl_use, insight, "shopping_assist"))),
544
- by(builtin(formula_binary, 4))
545
- )
546
- ])
547
- )
548
- ])
549
- ),
550
- proof(
551
- goal(request_purpose(case, "shopping_assist")),
552
- by(rule("delfour.pl", clause(38))),
553
- bindings([binding("Purpose", "shopping_assist")]),
554
- uses([
555
- proof(
556
- goal(case_statement(case, requestPurpose, "shopping_assist")),
557
- by(rule("delfour.pl", clause(32))),
558
- bindings([binding("S", case), binding("P", requestPurpose), binding("O", "shopping_assist"), binding("Formula", (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))]),
559
- uses([
560
- proof(
561
- goal(case_graph(delfourCaseGraph, (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))),
562
- by(fact("delfour.pl", clause(25)))
563
- ),
564
- proof(
565
- goal(formula_binary((caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)), case, requestPurpose, "shopping_assist")),
566
- by(builtin(formula_binary, 4))
567
- )
568
- ])
569
- )
570
- ])
571
- ),
572
- proof(
573
- goal(scanner_auth_at(case, "2025-10-05T20:35:48.907163+00:00")),
574
- by(rule("delfour.pl", clause(42))),
575
- bindings([binding("Time", "2025-10-05T20:35:48.907163+00:00")]),
576
- uses([
577
- proof(
578
- goal(case_statement(case, scannerAuthAt, "2025-10-05T20:35:48.907163+00:00")),
579
- by(rule("delfour.pl", clause(32))),
580
- bindings([binding("S", case), binding("P", scannerAuthAt), binding("O", "2025-10-05T20:35:48.907163+00:00"), binding("Formula", (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))]),
581
- uses([
582
- proof(
583
- goal(case_graph(delfourCaseGraph, (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))),
584
- by(fact("delfour.pl", clause(25)))
585
- ),
586
- proof(
587
- goal(formula_binary((caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)), case, scannerAuthAt, "2025-10-05T20:35:48.907163+00:00")),
588
- by(builtin(formula_binary, 4))
589
- )
590
- ])
591
- )
592
- ])
593
- ),
594
- proof(
595
- goal(expires_at(insight, "2025-10-05T22:33:48.907185+00:00")),
596
- by(rule("delfour.pl", clause(63))),
597
- bindings([binding("Time", "2025-10-05T22:33:48.907185+00:00")]),
598
- uses([
599
- proof(
600
- goal(insight_statement(insight, expiresAt, "2025-10-05T22:33:48.907185+00:00")),
601
- by(rule("delfour.pl", clause(33))),
602
- bindings([binding("S", insight), binding("P", expiresAt), binding("O", "2025-10-05T22:33:48.907185+00:00"), binding("Formula", (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))]),
603
- uses([
604
- proof(
605
- goal(insight_graph(delfourInsightGraph, (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))),
606
- by(fact("delfour.pl", clause(27)))
607
- ),
608
- proof(
609
- goal(formula_binary((metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")), insight, expiresAt, "2025-10-05T22:33:48.907185+00:00")),
610
- by(builtin(formula_binary, 4))
611
- )
612
- ])
613
- )
614
- ])
615
- ),
616
- proof(
617
- goal(le("2025-10-05T20:35:48.907163+00:00", "2025-10-05T22:33:48.907185+00:00")),
618
- by(builtin(le, 2))
619
- )
620
- ])
621
- )
622
- ])
623
- ),
624
- proof(
625
- goal(scanned_product(scan, prod_BIS_001)),
626
- by(rule("delfour.pl", clause(47))),
627
- bindings([binding("Product", prod_BIS_001)]),
628
- uses([
629
- proof(
630
- goal(case_statement(scan, scannedProduct, prod_BIS_001)),
631
- by(rule("delfour.pl", clause(32))),
632
- bindings([binding("S", scan), binding("P", scannedProduct), binding("O", prod_BIS_001), binding("Formula", (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))]),
633
- uses([
634
- proof(
635
- goal(case_graph(delfourCaseGraph, (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))),
636
- by(fact("delfour.pl", clause(25)))
637
- ),
638
- proof(
639
- goal(formula_binary((caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)), scan, scannedProduct, prod_BIS_001)),
640
- by(builtin(formula_binary, 4))
641
- )
642
- ])
643
- )
644
- ])
645
- ),
646
- proof(
647
- goal(sugar_per_serving(prod_BIS_001, 12.0)),
648
- by(rule("delfour.pl", clause(52))),
649
- bindings([binding("Product", prod_BIS_001), binding("Sugar", 12.0), binding("Products", [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)]), binding("_Id", "prod_BIS_001"), binding("_Name", "Classic Tea Biscuits"), binding("_SugarTenths", 120)]),
650
- uses([
651
- proof(
652
- goal(product_catalog(delfourCatalog, [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
653
- by(fact("delfour.pl", clause(26)))
654
- ),
655
- proof(
656
- goal(member(product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
657
- by(builtin(member, 2))
658
- )
659
- ])
660
- ),
661
- proof(
662
- goal(threshold_g(insight, 10.0)),
663
- by(rule("delfour.pl", clause(57))),
664
- bindings([binding("Threshold", 10.0)]),
665
- uses([
666
- proof(
667
- goal(insight_statement(insight, thresholdG, 10.0)),
668
- by(rule("delfour.pl", clause(33))),
669
- bindings([binding("S", insight), binding("P", thresholdG), binding("O", 10.0), binding("Formula", (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))]),
670
- uses([
671
- proof(
672
- goal(insight_graph(delfourInsightGraph, (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))),
673
- by(fact("delfour.pl", clause(27)))
674
- ),
675
- proof(
676
- goal(formula_binary((metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")), insight, thresholdG, 10.0)),
677
- by(builtin(formula_binary, 4))
678
- )
679
- ])
680
- )
681
- ])
682
- ),
683
- proof(
684
- goal(ge(12.0, 10.0)),
685
- by(builtin(ge, 2))
686
- )
687
- ])
688
- )
689
- ])
690
- ),
691
- proof(
692
- goal(suggested_alternative(case, prod_BIS_101)),
693
- by(rule("delfour.pl", clause(90))),
694
- bindings([binding("Candidate", prod_BIS_101), binding("Scanned", prod_BIS_001), binding("ScannedSugar", 120), binding("CandidateSugar", 30)]),
695
- uses([
696
- proof(
697
- goal(scanned_product(scan, prod_BIS_001)),
698
- by(rule("delfour.pl", clause(47))),
699
- bindings([binding("Product", prod_BIS_001)]),
700
- uses([
701
- proof(
702
- goal(case_statement(scan, scannedProduct, prod_BIS_001)),
703
- by(rule("delfour.pl", clause(32))),
704
- bindings([binding("S", scan), binding("P", scannedProduct), binding("O", prod_BIS_001), binding("Formula", (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))]),
705
- uses([
706
- proof(
707
- goal(case_graph(delfourCaseGraph, (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))),
708
- by(fact("delfour.pl", clause(25)))
709
- ),
710
- proof(
711
- goal(formula_binary((caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)), scan, scannedProduct, prod_BIS_001)),
712
- by(builtin(formula_binary, 4))
713
- )
714
- ])
715
- )
716
- ])
717
- ),
718
- proof(
719
- goal(sugar_tenths(prod_BIS_001, 120)),
720
- by(rule("delfour.pl", clause(51))),
721
- bindings([binding("Product", prod_BIS_001), binding("Sugar", 120), binding("Products", [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)]), binding("_Id", "prod_BIS_001"), binding("_Name", "Classic Tea Biscuits"), binding("_SugarG", 12.0)]),
722
- uses([
723
- proof(
724
- goal(product_catalog(delfourCatalog, [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
725
- by(fact("delfour.pl", clause(26)))
726
- ),
727
- proof(
728
- goal(member(product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
729
- by(builtin(member, 2))
730
- )
731
- ])
732
- ),
733
- proof(
734
- goal(product(prod_BIS_101)),
735
- by(rule("delfour.pl", clause(48))),
736
- bindings([binding("Product", prod_BIS_101), binding("Products", [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)]), binding("_Id", "prod_BIS_101"), binding("_Name", "Low-Sugar Tea Biscuits"), binding("_SugarTenths", 30), binding("_SugarG", 3.0)]),
737
- uses([
738
- proof(
739
- goal(product_catalog(delfourCatalog, [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
740
- by(fact("delfour.pl", clause(26)))
741
- ),
742
- proof(
743
- goal(member(product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
744
- by(builtin(member, 2))
745
- )
746
- ])
747
- ),
748
- proof(
749
- goal(sugar_tenths(prod_BIS_101, 30)),
750
- by(rule("delfour.pl", clause(51))),
751
- bindings([binding("Product", prod_BIS_101), binding("Sugar", 30), binding("Products", [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)]), binding("_Id", "prod_BIS_101"), binding("_Name", "Low-Sugar Tea Biscuits"), binding("_SugarG", 3.0)]),
752
- uses([
753
- proof(
754
- goal(product_catalog(delfourCatalog, [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
755
- by(fact("delfour.pl", clause(26)))
756
- ),
757
- proof(
758
- goal(member(product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
759
- by(builtin(member, 2))
760
- )
761
- ])
762
- ),
763
- proof(
764
- goal(gt(120, 30)),
765
- by(builtin(gt, 2))
766
- ),
767
- proof(
768
- goal(not(better_lower_sugar(120, 30))),
769
- by(builtin(not, 1))
770
- )
771
- ])
772
- ),
773
- proof(
774
- goal(product_name(prod_BIS_101, "Low-Sugar Tea Biscuits")),
775
- by(rule("delfour.pl", clause(50))),
776
- bindings([binding("Product", prod_BIS_101), binding("Name", "Low-Sugar Tea Biscuits"), binding("Products", [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)]), binding("_Id", "prod_BIS_101"), binding("_SugarTenths", 30), binding("_SugarG", 3.0)]),
777
- uses([
778
- proof(
779
- goal(product_catalog(delfourCatalog, [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
780
- by(fact("delfour.pl", clause(26)))
781
- ),
782
- proof(
783
- goal(member(product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
784
- by(builtin(member, 2))
785
- )
786
- ])
787
- )
788
- ])
789
- )
790
- ])
791
- )
792
- ).
793
-
794
9
  headline(banner, "Track sugar per serving while you scan").
795
- why(
796
- headline(banner, "Track sugar per serving while you scan"),
797
- proof(
798
- goal(headline(banner, "Track sugar per serving while you scan")),
799
- by(rule("delfour.pl", clause(104))),
800
- bindings([binding("Headline", "Track sugar per serving while you scan")]),
801
- uses([
802
- proof(
803
- goal(banner_headline(banner, "Track sugar per serving while you scan")),
804
- by(rule("delfour.pl", clause(87))),
805
- uses([
806
- proof(
807
- goal(banner_flags_high_sugar(check)),
808
- by(rule("delfour.pl", clause(86))),
809
- bindings([binding("Product", prod_BIS_001), binding("Sugar", 12.0), binding("Threshold", 10.0)]),
810
- uses([
811
- proof(
812
- goal(decision(decision, "Allowed", insight)),
813
- by(rule("delfour.pl", clause(85))),
814
- uses([
815
- proof(
816
- goal(authorization_allowed(check)),
817
- by(rule("delfour.pl", clause(84))),
818
- bindings([binding("AuthAt", "2025-10-05T20:35:48.907163+00:00"), binding("ExpiresAt", "2025-10-05T22:33:48.907185+00:00")]),
819
- uses([
820
- proof(
821
- goal(permission(policy, odrl_use, insight, "shopping_assist")),
822
- by(rule("delfour.pl", clause(66))),
823
- bindings([binding("Action", odrl_use), binding("Target", insight), binding("Purpose", "shopping_assist")]),
824
- uses([
825
- proof(
826
- goal(policy_statement(policy, odrl_permission, permission(odrl_use, insight, "shopping_assist"))),
827
- by(rule("delfour.pl", clause(34))),
828
- bindings([binding("S", policy), binding("P", odrl_permission), binding("O", permission(odrl_use, insight, "shopping_assist")), binding("Formula", (odrl_permission(policy, permission(odrl_use, insight, "shopping_assist")), odrl_prohibition(policy, prohibition(odrl_distribute, insight, "marketing")), odrl_duty(policy, duty(odrl_delete, "2025-10-05T22:33:48.907185+00:00"))))]),
829
- uses([
830
- proof(
831
- goal(policy_graph(delfourPolicyGraph, (odrl_permission(policy, permission(odrl_use, insight, "shopping_assist")), odrl_prohibition(policy, prohibition(odrl_distribute, insight, "marketing")), odrl_duty(policy, duty(odrl_delete, "2025-10-05T22:33:48.907185+00:00"))))),
832
- by(fact("delfour.pl", clause(28)))
833
- ),
834
- proof(
835
- goal(formula_binary((odrl_permission(policy, permission(odrl_use, insight, "shopping_assist")), odrl_prohibition(policy, prohibition(odrl_distribute, insight, "marketing")), odrl_duty(policy, duty(odrl_delete, "2025-10-05T22:33:48.907185+00:00"))), policy, odrl_permission, permission(odrl_use, insight, "shopping_assist"))),
836
- by(builtin(formula_binary, 4))
837
- )
838
- ])
839
- )
840
- ])
841
- ),
842
- proof(
843
- goal(request_purpose(case, "shopping_assist")),
844
- by(rule("delfour.pl", clause(38))),
845
- bindings([binding("Purpose", "shopping_assist")]),
846
- uses([
847
- proof(
848
- goal(case_statement(case, requestPurpose, "shopping_assist")),
849
- by(rule("delfour.pl", clause(32))),
850
- bindings([binding("S", case), binding("P", requestPurpose), binding("O", "shopping_assist"), binding("Formula", (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))]),
851
- uses([
852
- proof(
853
- goal(case_graph(delfourCaseGraph, (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))),
854
- by(fact("delfour.pl", clause(25)))
855
- ),
856
- proof(
857
- goal(formula_binary((caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)), case, requestPurpose, "shopping_assist")),
858
- by(builtin(formula_binary, 4))
859
- )
860
- ])
861
- )
862
- ])
863
- ),
864
- proof(
865
- goal(scanner_auth_at(case, "2025-10-05T20:35:48.907163+00:00")),
866
- by(rule("delfour.pl", clause(42))),
867
- bindings([binding("Time", "2025-10-05T20:35:48.907163+00:00")]),
868
- uses([
869
- proof(
870
- goal(case_statement(case, scannerAuthAt, "2025-10-05T20:35:48.907163+00:00")),
871
- by(rule("delfour.pl", clause(32))),
872
- bindings([binding("S", case), binding("P", scannerAuthAt), binding("O", "2025-10-05T20:35:48.907163+00:00"), binding("Formula", (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))]),
873
- uses([
874
- proof(
875
- goal(case_graph(delfourCaseGraph, (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))),
876
- by(fact("delfour.pl", clause(25)))
877
- ),
878
- proof(
879
- goal(formula_binary((caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)), case, scannerAuthAt, "2025-10-05T20:35:48.907163+00:00")),
880
- by(builtin(formula_binary, 4))
881
- )
882
- ])
883
- )
884
- ])
885
- ),
886
- proof(
887
- goal(expires_at(insight, "2025-10-05T22:33:48.907185+00:00")),
888
- by(rule("delfour.pl", clause(63))),
889
- bindings([binding("Time", "2025-10-05T22:33:48.907185+00:00")]),
890
- uses([
891
- proof(
892
- goal(insight_statement(insight, expiresAt, "2025-10-05T22:33:48.907185+00:00")),
893
- by(rule("delfour.pl", clause(33))),
894
- bindings([binding("S", insight), binding("P", expiresAt), binding("O", "2025-10-05T22:33:48.907185+00:00"), binding("Formula", (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))]),
895
- uses([
896
- proof(
897
- goal(insight_graph(delfourInsightGraph, (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))),
898
- by(fact("delfour.pl", clause(27)))
899
- ),
900
- proof(
901
- goal(formula_binary((metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")), insight, expiresAt, "2025-10-05T22:33:48.907185+00:00")),
902
- by(builtin(formula_binary, 4))
903
- )
904
- ])
905
- )
906
- ])
907
- ),
908
- proof(
909
- goal(le("2025-10-05T20:35:48.907163+00:00", "2025-10-05T22:33:48.907185+00:00")),
910
- by(builtin(le, 2))
911
- )
912
- ])
913
- )
914
- ])
915
- ),
916
- proof(
917
- goal(scanned_product(scan, prod_BIS_001)),
918
- by(rule("delfour.pl", clause(47))),
919
- bindings([binding("Product", prod_BIS_001)]),
920
- uses([
921
- proof(
922
- goal(case_statement(scan, scannedProduct, prod_BIS_001)),
923
- by(rule("delfour.pl", clause(32))),
924
- bindings([binding("S", scan), binding("P", scannedProduct), binding("O", prod_BIS_001), binding("Formula", (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))]),
925
- uses([
926
- proof(
927
- goal(case_graph(delfourCaseGraph, (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))),
928
- by(fact("delfour.pl", clause(25)))
929
- ),
930
- proof(
931
- goal(formula_binary((caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)), scan, scannedProduct, prod_BIS_001)),
932
- by(builtin(formula_binary, 4))
933
- )
934
- ])
935
- )
936
- ])
937
- ),
938
- proof(
939
- goal(sugar_per_serving(prod_BIS_001, 12.0)),
940
- by(rule("delfour.pl", clause(52))),
941
- bindings([binding("Product", prod_BIS_001), binding("Sugar", 12.0), binding("Products", [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)]), binding("_Id", "prod_BIS_001"), binding("_Name", "Classic Tea Biscuits"), binding("_SugarTenths", 120)]),
942
- uses([
943
- proof(
944
- goal(product_catalog(delfourCatalog, [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
945
- by(fact("delfour.pl", clause(26)))
946
- ),
947
- proof(
948
- goal(member(product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
949
- by(builtin(member, 2))
950
- )
951
- ])
952
- ),
953
- proof(
954
- goal(threshold_g(insight, 10.0)),
955
- by(rule("delfour.pl", clause(57))),
956
- bindings([binding("Threshold", 10.0)]),
957
- uses([
958
- proof(
959
- goal(insight_statement(insight, thresholdG, 10.0)),
960
- by(rule("delfour.pl", clause(33))),
961
- bindings([binding("S", insight), binding("P", thresholdG), binding("O", 10.0), binding("Formula", (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))]),
962
- uses([
963
- proof(
964
- goal(insight_graph(delfourInsightGraph, (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))),
965
- by(fact("delfour.pl", clause(27)))
966
- ),
967
- proof(
968
- goal(formula_binary((metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")), insight, thresholdG, 10.0)),
969
- by(builtin(formula_binary, 4))
970
- )
971
- ])
972
- )
973
- ])
974
- ),
975
- proof(
976
- goal(ge(12.0, 10.0)),
977
- by(builtin(ge, 2))
978
- )
979
- ])
980
- )
981
- ])
982
- )
983
- ])
984
- )
985
- ).
986
-
987
10
  note(banner, "High sugar").
988
- why(
989
- note(banner, "High sugar"),
990
- proof(
991
- goal(note(banner, "High sugar")),
992
- by(rule("delfour.pl", clause(105))),
993
- bindings([binding("Note", "High sugar")]),
994
- uses([
995
- proof(
996
- goal(banner_note(banner, "High sugar")),
997
- by(rule("delfour.pl", clause(88))),
998
- uses([
999
- proof(
1000
- goal(banner_flags_high_sugar(check)),
1001
- by(rule("delfour.pl", clause(86))),
1002
- bindings([binding("Product", prod_BIS_001), binding("Sugar", 12.0), binding("Threshold", 10.0)]),
1003
- uses([
1004
- proof(
1005
- goal(decision(decision, "Allowed", insight)),
1006
- by(rule("delfour.pl", clause(85))),
1007
- uses([
1008
- proof(
1009
- goal(authorization_allowed(check)),
1010
- by(rule("delfour.pl", clause(84))),
1011
- bindings([binding("AuthAt", "2025-10-05T20:35:48.907163+00:00"), binding("ExpiresAt", "2025-10-05T22:33:48.907185+00:00")]),
1012
- uses([
1013
- proof(
1014
- goal(permission(policy, odrl_use, insight, "shopping_assist")),
1015
- by(rule("delfour.pl", clause(66))),
1016
- bindings([binding("Action", odrl_use), binding("Target", insight), binding("Purpose", "shopping_assist")]),
1017
- uses([
1018
- proof(
1019
- goal(policy_statement(policy, odrl_permission, permission(odrl_use, insight, "shopping_assist"))),
1020
- by(rule("delfour.pl", clause(34))),
1021
- bindings([binding("S", policy), binding("P", odrl_permission), binding("O", permission(odrl_use, insight, "shopping_assist")), binding("Formula", (odrl_permission(policy, permission(odrl_use, insight, "shopping_assist")), odrl_prohibition(policy, prohibition(odrl_distribute, insight, "marketing")), odrl_duty(policy, duty(odrl_delete, "2025-10-05T22:33:48.907185+00:00"))))]),
1022
- uses([
1023
- proof(
1024
- goal(policy_graph(delfourPolicyGraph, (odrl_permission(policy, permission(odrl_use, insight, "shopping_assist")), odrl_prohibition(policy, prohibition(odrl_distribute, insight, "marketing")), odrl_duty(policy, duty(odrl_delete, "2025-10-05T22:33:48.907185+00:00"))))),
1025
- by(fact("delfour.pl", clause(28)))
1026
- ),
1027
- proof(
1028
- goal(formula_binary((odrl_permission(policy, permission(odrl_use, insight, "shopping_assist")), odrl_prohibition(policy, prohibition(odrl_distribute, insight, "marketing")), odrl_duty(policy, duty(odrl_delete, "2025-10-05T22:33:48.907185+00:00"))), policy, odrl_permission, permission(odrl_use, insight, "shopping_assist"))),
1029
- by(builtin(formula_binary, 4))
1030
- )
1031
- ])
1032
- )
1033
- ])
1034
- ),
1035
- proof(
1036
- goal(request_purpose(case, "shopping_assist")),
1037
- by(rule("delfour.pl", clause(38))),
1038
- bindings([binding("Purpose", "shopping_assist")]),
1039
- uses([
1040
- proof(
1041
- goal(case_statement(case, requestPurpose, "shopping_assist")),
1042
- by(rule("delfour.pl", clause(32))),
1043
- bindings([binding("S", case), binding("P", requestPurpose), binding("O", "shopping_assist"), binding("Formula", (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))]),
1044
- uses([
1045
- proof(
1046
- goal(case_graph(delfourCaseGraph, (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))),
1047
- by(fact("delfour.pl", clause(25)))
1048
- ),
1049
- proof(
1050
- goal(formula_binary((caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)), case, requestPurpose, "shopping_assist")),
1051
- by(builtin(formula_binary, 4))
1052
- )
1053
- ])
1054
- )
1055
- ])
1056
- ),
1057
- proof(
1058
- goal(scanner_auth_at(case, "2025-10-05T20:35:48.907163+00:00")),
1059
- by(rule("delfour.pl", clause(42))),
1060
- bindings([binding("Time", "2025-10-05T20:35:48.907163+00:00")]),
1061
- uses([
1062
- proof(
1063
- goal(case_statement(case, scannerAuthAt, "2025-10-05T20:35:48.907163+00:00")),
1064
- by(rule("delfour.pl", clause(32))),
1065
- bindings([binding("S", case), binding("P", scannerAuthAt), binding("O", "2025-10-05T20:35:48.907163+00:00"), binding("Formula", (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))]),
1066
- uses([
1067
- proof(
1068
- goal(case_graph(delfourCaseGraph, (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))),
1069
- by(fact("delfour.pl", clause(25)))
1070
- ),
1071
- proof(
1072
- goal(formula_binary((caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)), case, scannerAuthAt, "2025-10-05T20:35:48.907163+00:00")),
1073
- by(builtin(formula_binary, 4))
1074
- )
1075
- ])
1076
- )
1077
- ])
1078
- ),
1079
- proof(
1080
- goal(expires_at(insight, "2025-10-05T22:33:48.907185+00:00")),
1081
- by(rule("delfour.pl", clause(63))),
1082
- bindings([binding("Time", "2025-10-05T22:33:48.907185+00:00")]),
1083
- uses([
1084
- proof(
1085
- goal(insight_statement(insight, expiresAt, "2025-10-05T22:33:48.907185+00:00")),
1086
- by(rule("delfour.pl", clause(33))),
1087
- bindings([binding("S", insight), binding("P", expiresAt), binding("O", "2025-10-05T22:33:48.907185+00:00"), binding("Formula", (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))]),
1088
- uses([
1089
- proof(
1090
- goal(insight_graph(delfourInsightGraph, (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))),
1091
- by(fact("delfour.pl", clause(27)))
1092
- ),
1093
- proof(
1094
- goal(formula_binary((metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")), insight, expiresAt, "2025-10-05T22:33:48.907185+00:00")),
1095
- by(builtin(formula_binary, 4))
1096
- )
1097
- ])
1098
- )
1099
- ])
1100
- ),
1101
- proof(
1102
- goal(le("2025-10-05T20:35:48.907163+00:00", "2025-10-05T22:33:48.907185+00:00")),
1103
- by(builtin(le, 2))
1104
- )
1105
- ])
1106
- )
1107
- ])
1108
- ),
1109
- proof(
1110
- goal(scanned_product(scan, prod_BIS_001)),
1111
- by(rule("delfour.pl", clause(47))),
1112
- bindings([binding("Product", prod_BIS_001)]),
1113
- uses([
1114
- proof(
1115
- goal(case_statement(scan, scannedProduct, prod_BIS_001)),
1116
- by(rule("delfour.pl", clause(32))),
1117
- bindings([binding("S", scan), binding("P", scannedProduct), binding("O", prod_BIS_001), binding("Formula", (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))]),
1118
- uses([
1119
- proof(
1120
- goal(case_graph(delfourCaseGraph, (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))),
1121
- by(fact("delfour.pl", clause(25)))
1122
- ),
1123
- proof(
1124
- goal(formula_binary((caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)), scan, scannedProduct, prod_BIS_001)),
1125
- by(builtin(formula_binary, 4))
1126
- )
1127
- ])
1128
- )
1129
- ])
1130
- ),
1131
- proof(
1132
- goal(sugar_per_serving(prod_BIS_001, 12.0)),
1133
- by(rule("delfour.pl", clause(52))),
1134
- bindings([binding("Product", prod_BIS_001), binding("Sugar", 12.0), binding("Products", [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)]), binding("_Id", "prod_BIS_001"), binding("_Name", "Classic Tea Biscuits"), binding("_SugarTenths", 120)]),
1135
- uses([
1136
- proof(
1137
- goal(product_catalog(delfourCatalog, [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
1138
- by(fact("delfour.pl", clause(26)))
1139
- ),
1140
- proof(
1141
- goal(member(product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
1142
- by(builtin(member, 2))
1143
- )
1144
- ])
1145
- ),
1146
- proof(
1147
- goal(threshold_g(insight, 10.0)),
1148
- by(rule("delfour.pl", clause(57))),
1149
- bindings([binding("Threshold", 10.0)]),
1150
- uses([
1151
- proof(
1152
- goal(insight_statement(insight, thresholdG, 10.0)),
1153
- by(rule("delfour.pl", clause(33))),
1154
- bindings([binding("S", insight), binding("P", thresholdG), binding("O", 10.0), binding("Formula", (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))]),
1155
- uses([
1156
- proof(
1157
- goal(insight_graph(delfourInsightGraph, (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))),
1158
- by(fact("delfour.pl", clause(27)))
1159
- ),
1160
- proof(
1161
- goal(formula_binary((metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")), insight, thresholdG, 10.0)),
1162
- by(builtin(formula_binary, 4))
1163
- )
1164
- ])
1165
- )
1166
- ])
1167
- ),
1168
- proof(
1169
- goal(ge(12.0, 10.0)),
1170
- by(builtin(ge, 2))
1171
- )
1172
- ])
1173
- )
1174
- ])
1175
- )
1176
- ])
1177
- )
1178
- ).
1179
-
1180
11
  value(reasonText, "Household requires low-sugar guidance (diabetes in POD). A neutral Insight is scoped to device 'self-scanner', event 'pick_up_scanner', retailer 'Delfour', and expires soon; the policy confines use to shopping assistance.").
1181
- why(
1182
- value(reasonText, "Household requires low-sugar guidance (diabetes in POD). A neutral Insight is scoped to device 'self-scanner', event 'pick_up_scanner', retailer 'Delfour', and expires soon; the policy confines use to shopping assistance."),
1183
- proof(
1184
- goal(value(reasonText, "Household requires low-sugar guidance (diabetes in POD). A neutral Insight is scoped to device 'self-scanner', event 'pick_up_scanner', retailer 'Delfour', and expires soon; the policy confines use to shopping assistance.")),
1185
- by(rule("delfour.pl", clause(107))),
1186
- bindings([binding("Text", "Household requires low-sugar guidance (diabetes in POD). A neutral Insight is scoped to device 'self-scanner', event 'pick_up_scanner', retailer 'Delfour', and expires soon; the policy confines use to shopping assistance.")]),
1187
- uses([
1188
- proof(
1189
- goal(reason_text(reasonText, "Household requires low-sugar guidance (diabetes in POD). A neutral Insight is scoped to device 'self-scanner', event 'pick_up_scanner', retailer 'Delfour', and expires soon; the policy confines use to shopping assistance.")),
1190
- by(fact("delfour.pl", clause(31)))
1191
- )
1192
- ])
1193
- )
1194
- ).
1195
-
1196
12
  alg(signature, "HMAC-SHA256").
1197
- why(
1198
- alg(signature, "HMAC-SHA256"),
1199
- proof(
1200
- goal(alg(signature, "HMAC-SHA256")),
1201
- by(rule("delfour.pl", clause(108))),
1202
- bindings([binding("Alg", "HMAC-SHA256")]),
1203
- uses([
1204
- proof(
1205
- goal(signature_alg(signature, "HMAC-SHA256")),
1206
- by(rule("delfour.pl", clause(72))),
1207
- bindings([binding("Alg", "HMAC-SHA256")]),
1208
- uses([
1209
- proof(
1210
- goal(signature_statement(signature, alg, "HMAC-SHA256")),
1211
- by(rule("delfour.pl", clause(36))),
1212
- bindings([binding("S", signature), binding("P", alg), binding("O", "HMAC-SHA256"), binding("Formula", (alg(signature, "HMAC-SHA256"), keyid(signature, "demo-shared-secret"), created(signature, "2025-10-05T20:33:48.907163+00:00"), payloadHashSha256(signature, "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098"), hmac(signature, "b21d0072d90112a9f820aced0286889f4b6ef92b145e6fdef1011f3bfa4608c2"), hmacVerificationMode(signature, trustedPrecomputedInput)))]),
1213
- uses([
1214
- proof(
1215
- goal(signature_graph(delfourSignatureGraph, (alg(signature, "HMAC-SHA256"), keyid(signature, "demo-shared-secret"), created(signature, "2025-10-05T20:33:48.907163+00:00"), payloadHashSha256(signature, "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098"), hmac(signature, "b21d0072d90112a9f820aced0286889f4b6ef92b145e6fdef1011f3bfa4608c2"), hmacVerificationMode(signature, trustedPrecomputedInput)))),
1216
- by(fact("delfour.pl", clause(30)))
1217
- ),
1218
- proof(
1219
- goal(formula_binary((alg(signature, "HMAC-SHA256"), keyid(signature, "demo-shared-secret"), created(signature, "2025-10-05T20:33:48.907163+00:00"), payloadHashSha256(signature, "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098"), hmac(signature, "b21d0072d90112a9f820aced0286889f4b6ef92b145e6fdef1011f3bfa4608c2"), hmacVerificationMode(signature, trustedPrecomputedInput)), signature, alg, "HMAC-SHA256")),
1220
- by(builtin(formula_binary, 4))
1221
- )
1222
- ])
1223
- )
1224
- ])
1225
- )
1226
- ])
1227
- )
1228
- ).
1229
-
1230
13
  auditEntries(case, 1).
1231
- why(
1232
- auditEntries(case, 1),
1233
- proof(
1234
- goal(auditEntries(case, 1)),
1235
- by(rule("delfour.pl", clause(109))),
1236
- bindings([binding("Count", 1)]),
1237
- uses([
1238
- proof(
1239
- goal(audit_entries(case, 1)),
1240
- by(rule("delfour.pl", clause(45))),
1241
- bindings([binding("Count", 1)]),
1242
- uses([
1243
- proof(
1244
- goal(case_statement(case, auditEntries, 1)),
1245
- by(rule("delfour.pl", clause(32))),
1246
- bindings([binding("S", case), binding("P", auditEntries), binding("O", 1), binding("Formula", (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))]),
1247
- uses([
1248
- proof(
1249
- goal(case_graph(delfourCaseGraph, (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))),
1250
- by(fact("delfour.pl", clause(25)))
1251
- ),
1252
- proof(
1253
- goal(formula_binary((caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)), case, auditEntries, 1)),
1254
- by(builtin(formula_binary, 4))
1255
- )
1256
- ])
1257
- )
1258
- ])
1259
- )
1260
- ])
1261
- )
1262
- ).
1263
-
1264
14
  filesWritten(case, 6).
1265
- why(
1266
- filesWritten(case, 6),
1267
- proof(
1268
- goal(filesWritten(case, 6)),
1269
- by(rule("delfour.pl", clause(110))),
1270
- bindings([binding("Count", 6)]),
1271
- uses([
1272
- proof(
1273
- goal(files_written(case, 6)),
1274
- by(rule("delfour.pl", clause(44))),
1275
- bindings([binding("Count", 6)]),
1276
- uses([
1277
- proof(
1278
- goal(case_statement(case, filesWritten, 6)),
1279
- by(rule("delfour.pl", clause(32))),
1280
- bindings([binding("S", case), binding("P", filesWritten), binding("O", 6), binding("Formula", (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))]),
1281
- uses([
1282
- proof(
1283
- goal(case_graph(delfourCaseGraph, (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))),
1284
- by(fact("delfour.pl", clause(25)))
1285
- ),
1286
- proof(
1287
- goal(formula_binary((caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)), case, filesWritten, 6)),
1288
- by(builtin(formula_binary, 4))
1289
- )
1290
- ])
1291
- )
1292
- ])
1293
- )
1294
- ])
1295
- )
1296
- ).
1297
-
1298
15
  allChecksPass(result, true).
1299
- why(
1300
- allChecksPass(result, true),
1301
- proof(
1302
- goal(allChecksPass(result, true)),
1303
- by(rule("delfour.pl", clause(111))),
1304
- uses([
1305
- proof(
1306
- goal(all_checks_pass(result)),
1307
- by(rule("delfour.pl", clause(96))),
1308
- uses([
1309
- proof(
1310
- goal(signature_verifies(check)),
1311
- by(rule("delfour.pl", clause(81))),
1312
- uses([
1313
- proof(
1314
- goal(hmac_verification_mode(signature, trustedPrecomputedInput)),
1315
- by(rule("delfour.pl", clause(77))),
1316
- bindings([binding("Mode", trustedPrecomputedInput)]),
1317
- uses([
1318
- proof(
1319
- goal(signature_statement(signature, hmacVerificationMode, trustedPrecomputedInput)),
1320
- by(rule("delfour.pl", clause(36))),
1321
- bindings([binding("S", signature), binding("P", hmacVerificationMode), binding("O", trustedPrecomputedInput), binding("Formula", (alg(signature, "HMAC-SHA256"), keyid(signature, "demo-shared-secret"), created(signature, "2025-10-05T20:33:48.907163+00:00"), payloadHashSha256(signature, "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098"), hmac(signature, "b21d0072d90112a9f820aced0286889f4b6ef92b145e6fdef1011f3bfa4608c2"), hmacVerificationMode(signature, trustedPrecomputedInput)))]),
1322
- uses([
1323
- proof(
1324
- goal(signature_graph(delfourSignatureGraph, (alg(signature, "HMAC-SHA256"), keyid(signature, "demo-shared-secret"), created(signature, "2025-10-05T20:33:48.907163+00:00"), payloadHashSha256(signature, "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098"), hmac(signature, "b21d0072d90112a9f820aced0286889f4b6ef92b145e6fdef1011f3bfa4608c2"), hmacVerificationMode(signature, trustedPrecomputedInput)))),
1325
- by(fact("delfour.pl", clause(30)))
1326
- ),
1327
- proof(
1328
- goal(formula_binary((alg(signature, "HMAC-SHA256"), keyid(signature, "demo-shared-secret"), created(signature, "2025-10-05T20:33:48.907163+00:00"), payloadHashSha256(signature, "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098"), hmac(signature, "b21d0072d90112a9f820aced0286889f4b6ef92b145e6fdef1011f3bfa4608c2"), hmacVerificationMode(signature, trustedPrecomputedInput)), signature, hmacVerificationMode, trustedPrecomputedInput)),
1329
- by(builtin(formula_binary, 4))
1330
- )
1331
- ])
1332
- )
1333
- ])
1334
- )
1335
- ])
1336
- ),
1337
- proof(
1338
- goal(payload_hash_matches(check)),
1339
- by(rule("delfour.pl", clause(80))),
1340
- bindings([binding("Digest", "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098")]),
1341
- uses([
1342
- proof(
1343
- goal(envelope_hash(envelope, "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098")),
1344
- by(rule("delfour.pl", clause(71))),
1345
- bindings([binding("Hash", "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098")]),
1346
- uses([
1347
- proof(
1348
- goal(envelope_statement(envelope, hash, "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098")),
1349
- by(rule("delfour.pl", clause(35))),
1350
- bindings([binding("S", envelope), binding("P", hash), binding("O", "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098"), binding("Formula", (insight(envelope, delfourInsightGraph), policy(envelope, delfourPolicyGraph), hash(envelope, "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098")))]),
1351
- uses([
1352
- proof(
1353
- goal(envelope_graph(delfourEnvelopeGraph, (insight(envelope, delfourInsightGraph), policy(envelope, delfourPolicyGraph), hash(envelope, "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098")))),
1354
- by(fact("delfour.pl", clause(29)))
1355
- ),
1356
- proof(
1357
- goal(formula_binary((insight(envelope, delfourInsightGraph), policy(envelope, delfourPolicyGraph), hash(envelope, "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098")), envelope, hash, "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098")),
1358
- by(builtin(formula_binary, 4))
1359
- )
1360
- ])
1361
- )
1362
- ])
1363
- ),
1364
- proof(
1365
- goal(payload_hash_sha256(signature, "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098")),
1366
- by(rule("delfour.pl", clause(75))),
1367
- bindings([binding("Hash", "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098")]),
1368
- uses([
1369
- proof(
1370
- goal(signature_statement(signature, payloadHashSha256, "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098")),
1371
- by(rule("delfour.pl", clause(36))),
1372
- bindings([binding("S", signature), binding("P", payloadHashSha256), binding("O", "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098"), binding("Formula", (alg(signature, "HMAC-SHA256"), keyid(signature, "demo-shared-secret"), created(signature, "2025-10-05T20:33:48.907163+00:00"), payloadHashSha256(signature, "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098"), hmac(signature, "b21d0072d90112a9f820aced0286889f4b6ef92b145e6fdef1011f3bfa4608c2"), hmacVerificationMode(signature, trustedPrecomputedInput)))]),
1373
- uses([
1374
- proof(
1375
- goal(signature_graph(delfourSignatureGraph, (alg(signature, "HMAC-SHA256"), keyid(signature, "demo-shared-secret"), created(signature, "2025-10-05T20:33:48.907163+00:00"), payloadHashSha256(signature, "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098"), hmac(signature, "b21d0072d90112a9f820aced0286889f4b6ef92b145e6fdef1011f3bfa4608c2"), hmacVerificationMode(signature, trustedPrecomputedInput)))),
1376
- by(fact("delfour.pl", clause(30)))
1377
- ),
1378
- proof(
1379
- goal(formula_binary((alg(signature, "HMAC-SHA256"), keyid(signature, "demo-shared-secret"), created(signature, "2025-10-05T20:33:48.907163+00:00"), payloadHashSha256(signature, "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098"), hmac(signature, "b21d0072d90112a9f820aced0286889f4b6ef92b145e6fdef1011f3bfa4608c2"), hmacVerificationMode(signature, trustedPrecomputedInput)), signature, payloadHashSha256, "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098")),
1380
- by(builtin(formula_binary, 4))
1381
- )
1382
- ])
1383
- )
1384
- ])
1385
- )
1386
- ])
1387
- ),
1388
- proof(
1389
- goal(minimization_strips_sensitive_terms(check)),
1390
- by(rule("delfour.pl", clause(82))),
1391
- bindings([binding("Text", "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")]),
1392
- uses([
1393
- proof(
1394
- goal(serialized_lowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")),
1395
- by(rule("delfour.pl", clause(64))),
1396
- bindings([binding("Text", "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")]),
1397
- uses([
1398
- proof(
1399
- goal(insight_statement(insight, serializedLowercase, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")),
1400
- by(rule("delfour.pl", clause(33))),
1401
- bindings([binding("S", insight), binding("P", serializedLowercase), binding("O", "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner"), binding("Formula", (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))]),
1402
- uses([
1403
- proof(
1404
- goal(insight_graph(delfourInsightGraph, (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))),
1405
- by(fact("delfour.pl", clause(27)))
1406
- ),
1407
- proof(
1408
- goal(formula_binary((metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")), insight, serializedLowercase, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")),
1409
- by(builtin(formula_binary, 4))
1410
- )
1411
- ])
1412
- )
1413
- ])
1414
- ),
1415
- proof(
1416
- goal(not_matches("createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner", "diabetes|medical")),
1417
- by(builtin(not_matches, 2))
1418
- )
1419
- ])
1420
- ),
1421
- proof(
1422
- goal(scope_complete(check)),
1423
- by(rule("delfour.pl", clause(83))),
1424
- bindings([binding("_Device", "self-scanner"), binding("_Event", "pick_up_scanner"), binding("_Expiry", "2025-10-05T22:33:48.907185+00:00")]),
1425
- uses([
1426
- proof(
1427
- goal(scope_device(insight, "self-scanner")),
1428
- by(rule("delfour.pl", clause(59))),
1429
- bindings([binding("Device", "self-scanner")]),
1430
- uses([
1431
- proof(
1432
- goal(insight_statement(insight, scopeDevice, "self-scanner")),
1433
- by(rule("delfour.pl", clause(33))),
1434
- bindings([binding("S", insight), binding("P", scopeDevice), binding("O", "self-scanner"), binding("Formula", (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))]),
1435
- uses([
1436
- proof(
1437
- goal(insight_graph(delfourInsightGraph, (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))),
1438
- by(fact("delfour.pl", clause(27)))
1439
- ),
1440
- proof(
1441
- goal(formula_binary((metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")), insight, scopeDevice, "self-scanner")),
1442
- by(builtin(formula_binary, 4))
1443
- )
1444
- ])
1445
- )
1446
- ])
1447
- ),
1448
- proof(
1449
- goal(scope_event(insight, "pick_up_scanner")),
1450
- by(rule("delfour.pl", clause(60))),
1451
- bindings([binding("Event", "pick_up_scanner")]),
1452
- uses([
1453
- proof(
1454
- goal(insight_statement(insight, scopeEvent, "pick_up_scanner")),
1455
- by(rule("delfour.pl", clause(33))),
1456
- bindings([binding("S", insight), binding("P", scopeEvent), binding("O", "pick_up_scanner"), binding("Formula", (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))]),
1457
- uses([
1458
- proof(
1459
- goal(insight_graph(delfourInsightGraph, (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))),
1460
- by(fact("delfour.pl", clause(27)))
1461
- ),
1462
- proof(
1463
- goal(formula_binary((metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")), insight, scopeEvent, "pick_up_scanner")),
1464
- by(builtin(formula_binary, 4))
1465
- )
1466
- ])
1467
- )
1468
- ])
1469
- ),
1470
- proof(
1471
- goal(expires_at(insight, "2025-10-05T22:33:48.907185+00:00")),
1472
- by(rule("delfour.pl", clause(63))),
1473
- bindings([binding("Time", "2025-10-05T22:33:48.907185+00:00")]),
1474
- uses([
1475
- proof(
1476
- goal(insight_statement(insight, expiresAt, "2025-10-05T22:33:48.907185+00:00")),
1477
- by(rule("delfour.pl", clause(33))),
1478
- bindings([binding("S", insight), binding("P", expiresAt), binding("O", "2025-10-05T22:33:48.907185+00:00"), binding("Formula", (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))]),
1479
- uses([
1480
- proof(
1481
- goal(insight_graph(delfourInsightGraph, (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))),
1482
- by(fact("delfour.pl", clause(27)))
1483
- ),
1484
- proof(
1485
- goal(formula_binary((metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")), insight, expiresAt, "2025-10-05T22:33:48.907185+00:00")),
1486
- by(builtin(formula_binary, 4))
1487
- )
1488
- ])
1489
- )
1490
- ])
1491
- )
1492
- ])
1493
- ),
1494
- proof(
1495
- goal(authorization_allowed(check)),
1496
- by(rule("delfour.pl", clause(84))),
1497
- bindings([binding("AuthAt", "2025-10-05T20:35:48.907163+00:00"), binding("ExpiresAt", "2025-10-05T22:33:48.907185+00:00")]),
1498
- uses([
1499
- proof(
1500
- goal(permission(policy, odrl_use, insight, "shopping_assist")),
1501
- by(rule("delfour.pl", clause(66))),
1502
- bindings([binding("Action", odrl_use), binding("Target", insight), binding("Purpose", "shopping_assist")]),
1503
- uses([
1504
- proof(
1505
- goal(policy_statement(policy, odrl_permission, permission(odrl_use, insight, "shopping_assist"))),
1506
- by(rule("delfour.pl", clause(34))),
1507
- bindings([binding("S", policy), binding("P", odrl_permission), binding("O", permission(odrl_use, insight, "shopping_assist")), binding("Formula", (odrl_permission(policy, permission(odrl_use, insight, "shopping_assist")), odrl_prohibition(policy, prohibition(odrl_distribute, insight, "marketing")), odrl_duty(policy, duty(odrl_delete, "2025-10-05T22:33:48.907185+00:00"))))]),
1508
- uses([
1509
- proof(
1510
- goal(policy_graph(delfourPolicyGraph, (odrl_permission(policy, permission(odrl_use, insight, "shopping_assist")), odrl_prohibition(policy, prohibition(odrl_distribute, insight, "marketing")), odrl_duty(policy, duty(odrl_delete, "2025-10-05T22:33:48.907185+00:00"))))),
1511
- by(fact("delfour.pl", clause(28)))
1512
- ),
1513
- proof(
1514
- goal(formula_binary((odrl_permission(policy, permission(odrl_use, insight, "shopping_assist")), odrl_prohibition(policy, prohibition(odrl_distribute, insight, "marketing")), odrl_duty(policy, duty(odrl_delete, "2025-10-05T22:33:48.907185+00:00"))), policy, odrl_permission, permission(odrl_use, insight, "shopping_assist"))),
1515
- by(builtin(formula_binary, 4))
1516
- )
1517
- ])
1518
- )
1519
- ])
1520
- ),
1521
- proof(
1522
- goal(request_purpose(case, "shopping_assist")),
1523
- by(rule("delfour.pl", clause(38))),
1524
- bindings([binding("Purpose", "shopping_assist")]),
1525
- uses([
1526
- proof(
1527
- goal(case_statement(case, requestPurpose, "shopping_assist")),
1528
- by(rule("delfour.pl", clause(32))),
1529
- bindings([binding("S", case), binding("P", requestPurpose), binding("O", "shopping_assist"), binding("Formula", (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))]),
1530
- uses([
1531
- proof(
1532
- goal(case_graph(delfourCaseGraph, (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))),
1533
- by(fact("delfour.pl", clause(25)))
1534
- ),
1535
- proof(
1536
- goal(formula_binary((caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)), case, requestPurpose, "shopping_assist")),
1537
- by(builtin(formula_binary, 4))
1538
- )
1539
- ])
1540
- )
1541
- ])
1542
- ),
1543
- proof(
1544
- goal(scanner_auth_at(case, "2025-10-05T20:35:48.907163+00:00")),
1545
- by(rule("delfour.pl", clause(42))),
1546
- bindings([binding("Time", "2025-10-05T20:35:48.907163+00:00")]),
1547
- uses([
1548
- proof(
1549
- goal(case_statement(case, scannerAuthAt, "2025-10-05T20:35:48.907163+00:00")),
1550
- by(rule("delfour.pl", clause(32))),
1551
- bindings([binding("S", case), binding("P", scannerAuthAt), binding("O", "2025-10-05T20:35:48.907163+00:00"), binding("Formula", (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))]),
1552
- uses([
1553
- proof(
1554
- goal(case_graph(delfourCaseGraph, (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))),
1555
- by(fact("delfour.pl", clause(25)))
1556
- ),
1557
- proof(
1558
- goal(formula_binary((caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)), case, scannerAuthAt, "2025-10-05T20:35:48.907163+00:00")),
1559
- by(builtin(formula_binary, 4))
1560
- )
1561
- ])
1562
- )
1563
- ])
1564
- ),
1565
- proof(
1566
- goal(expires_at(insight, "2025-10-05T22:33:48.907185+00:00")),
1567
- by(rule("delfour.pl", clause(63))),
1568
- bindings([binding("Time", "2025-10-05T22:33:48.907185+00:00")]),
1569
- uses([
1570
- proof(
1571
- goal(insight_statement(insight, expiresAt, "2025-10-05T22:33:48.907185+00:00")),
1572
- by(rule("delfour.pl", clause(33))),
1573
- bindings([binding("S", insight), binding("P", expiresAt), binding("O", "2025-10-05T22:33:48.907185+00:00"), binding("Formula", (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))]),
1574
- uses([
1575
- proof(
1576
- goal(insight_graph(delfourInsightGraph, (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))),
1577
- by(fact("delfour.pl", clause(27)))
1578
- ),
1579
- proof(
1580
- goal(formula_binary((metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")), insight, expiresAt, "2025-10-05T22:33:48.907185+00:00")),
1581
- by(builtin(formula_binary, 4))
1582
- )
1583
- ])
1584
- )
1585
- ])
1586
- ),
1587
- proof(
1588
- goal(le("2025-10-05T20:35:48.907163+00:00", "2025-10-05T22:33:48.907185+00:00")),
1589
- by(builtin(le, 2))
1590
- )
1591
- ])
1592
- ),
1593
- proof(
1594
- goal(banner_flags_high_sugar(check)),
1595
- by(rule("delfour.pl", clause(86))),
1596
- bindings([binding("Product", prod_BIS_001), binding("Sugar", 12.0), binding("Threshold", 10.0)]),
1597
- uses([
1598
- proof(
1599
- goal(decision(decision, "Allowed", insight)),
1600
- by(rule("delfour.pl", clause(85))),
1601
- uses([
1602
- proof(
1603
- goal(authorization_allowed(check)),
1604
- by(rule("delfour.pl", clause(84))),
1605
- bindings([binding("AuthAt", "2025-10-05T20:35:48.907163+00:00"), binding("ExpiresAt", "2025-10-05T22:33:48.907185+00:00")]),
1606
- uses([
1607
- proof(
1608
- goal(permission(policy, odrl_use, insight, "shopping_assist")),
1609
- by(rule("delfour.pl", clause(66))),
1610
- bindings([binding("Action", odrl_use), binding("Target", insight), binding("Purpose", "shopping_assist")]),
1611
- uses([
1612
- proof(
1613
- goal(policy_statement(policy, odrl_permission, permission(odrl_use, insight, "shopping_assist"))),
1614
- by(rule("delfour.pl", clause(34))),
1615
- bindings([binding("S", policy), binding("P", odrl_permission), binding("O", permission(odrl_use, insight, "shopping_assist")), binding("Formula", (odrl_permission(policy, permission(odrl_use, insight, "shopping_assist")), odrl_prohibition(policy, prohibition(odrl_distribute, insight, "marketing")), odrl_duty(policy, duty(odrl_delete, "2025-10-05T22:33:48.907185+00:00"))))]),
1616
- uses([
1617
- proof(
1618
- goal(policy_graph(delfourPolicyGraph, (odrl_permission(policy, permission(odrl_use, insight, "shopping_assist")), odrl_prohibition(policy, prohibition(odrl_distribute, insight, "marketing")), odrl_duty(policy, duty(odrl_delete, "2025-10-05T22:33:48.907185+00:00"))))),
1619
- by(fact("delfour.pl", clause(28)))
1620
- ),
1621
- proof(
1622
- goal(formula_binary((odrl_permission(policy, permission(odrl_use, insight, "shopping_assist")), odrl_prohibition(policy, prohibition(odrl_distribute, insight, "marketing")), odrl_duty(policy, duty(odrl_delete, "2025-10-05T22:33:48.907185+00:00"))), policy, odrl_permission, permission(odrl_use, insight, "shopping_assist"))),
1623
- by(builtin(formula_binary, 4))
1624
- )
1625
- ])
1626
- )
1627
- ])
1628
- ),
1629
- proof(
1630
- goal(request_purpose(case, "shopping_assist")),
1631
- by(rule("delfour.pl", clause(38))),
1632
- bindings([binding("Purpose", "shopping_assist")]),
1633
- uses([
1634
- proof(
1635
- goal(case_statement(case, requestPurpose, "shopping_assist")),
1636
- by(rule("delfour.pl", clause(32))),
1637
- bindings([binding("S", case), binding("P", requestPurpose), binding("O", "shopping_assist"), binding("Formula", (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))]),
1638
- uses([
1639
- proof(
1640
- goal(case_graph(delfourCaseGraph, (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))),
1641
- by(fact("delfour.pl", clause(25)))
1642
- ),
1643
- proof(
1644
- goal(formula_binary((caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)), case, requestPurpose, "shopping_assist")),
1645
- by(builtin(formula_binary, 4))
1646
- )
1647
- ])
1648
- )
1649
- ])
1650
- ),
1651
- proof(
1652
- goal(scanner_auth_at(case, "2025-10-05T20:35:48.907163+00:00")),
1653
- by(rule("delfour.pl", clause(42))),
1654
- bindings([binding("Time", "2025-10-05T20:35:48.907163+00:00")]),
1655
- uses([
1656
- proof(
1657
- goal(case_statement(case, scannerAuthAt, "2025-10-05T20:35:48.907163+00:00")),
1658
- by(rule("delfour.pl", clause(32))),
1659
- bindings([binding("S", case), binding("P", scannerAuthAt), binding("O", "2025-10-05T20:35:48.907163+00:00"), binding("Formula", (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))]),
1660
- uses([
1661
- proof(
1662
- goal(case_graph(delfourCaseGraph, (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))),
1663
- by(fact("delfour.pl", clause(25)))
1664
- ),
1665
- proof(
1666
- goal(formula_binary((caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)), case, scannerAuthAt, "2025-10-05T20:35:48.907163+00:00")),
1667
- by(builtin(formula_binary, 4))
1668
- )
1669
- ])
1670
- )
1671
- ])
1672
- ),
1673
- proof(
1674
- goal(expires_at(insight, "2025-10-05T22:33:48.907185+00:00")),
1675
- by(rule("delfour.pl", clause(63))),
1676
- bindings([binding("Time", "2025-10-05T22:33:48.907185+00:00")]),
1677
- uses([
1678
- proof(
1679
- goal(insight_statement(insight, expiresAt, "2025-10-05T22:33:48.907185+00:00")),
1680
- by(rule("delfour.pl", clause(33))),
1681
- bindings([binding("S", insight), binding("P", expiresAt), binding("O", "2025-10-05T22:33:48.907185+00:00"), binding("Formula", (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))]),
1682
- uses([
1683
- proof(
1684
- goal(insight_graph(delfourInsightGraph, (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))),
1685
- by(fact("delfour.pl", clause(27)))
1686
- ),
1687
- proof(
1688
- goal(formula_binary((metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")), insight, expiresAt, "2025-10-05T22:33:48.907185+00:00")),
1689
- by(builtin(formula_binary, 4))
1690
- )
1691
- ])
1692
- )
1693
- ])
1694
- ),
1695
- proof(
1696
- goal(le("2025-10-05T20:35:48.907163+00:00", "2025-10-05T22:33:48.907185+00:00")),
1697
- by(builtin(le, 2))
1698
- )
1699
- ])
1700
- )
1701
- ])
1702
- ),
1703
- proof(
1704
- goal(scanned_product(scan, prod_BIS_001)),
1705
- by(rule("delfour.pl", clause(47))),
1706
- bindings([binding("Product", prod_BIS_001)]),
1707
- uses([
1708
- proof(
1709
- goal(case_statement(scan, scannedProduct, prod_BIS_001)),
1710
- by(rule("delfour.pl", clause(32))),
1711
- bindings([binding("S", scan), binding("P", scannedProduct), binding("O", prod_BIS_001), binding("Formula", (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))]),
1712
- uses([
1713
- proof(
1714
- goal(case_graph(delfourCaseGraph, (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))),
1715
- by(fact("delfour.pl", clause(25)))
1716
- ),
1717
- proof(
1718
- goal(formula_binary((caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)), scan, scannedProduct, prod_BIS_001)),
1719
- by(builtin(formula_binary, 4))
1720
- )
1721
- ])
1722
- )
1723
- ])
1724
- ),
1725
- proof(
1726
- goal(sugar_per_serving(prod_BIS_001, 12.0)),
1727
- by(rule("delfour.pl", clause(52))),
1728
- bindings([binding("Product", prod_BIS_001), binding("Sugar", 12.0), binding("Products", [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)]), binding("_Id", "prod_BIS_001"), binding("_Name", "Classic Tea Biscuits"), binding("_SugarTenths", 120)]),
1729
- uses([
1730
- proof(
1731
- goal(product_catalog(delfourCatalog, [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
1732
- by(fact("delfour.pl", clause(26)))
1733
- ),
1734
- proof(
1735
- goal(member(product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
1736
- by(builtin(member, 2))
1737
- )
1738
- ])
1739
- ),
1740
- proof(
1741
- goal(threshold_g(insight, 10.0)),
1742
- by(rule("delfour.pl", clause(57))),
1743
- bindings([binding("Threshold", 10.0)]),
1744
- uses([
1745
- proof(
1746
- goal(insight_statement(insight, thresholdG, 10.0)),
1747
- by(rule("delfour.pl", clause(33))),
1748
- bindings([binding("S", insight), binding("P", thresholdG), binding("O", 10.0), binding("Formula", (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))]),
1749
- uses([
1750
- proof(
1751
- goal(insight_graph(delfourInsightGraph, (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))),
1752
- by(fact("delfour.pl", clause(27)))
1753
- ),
1754
- proof(
1755
- goal(formula_binary((metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")), insight, thresholdG, 10.0)),
1756
- by(builtin(formula_binary, 4))
1757
- )
1758
- ])
1759
- )
1760
- ])
1761
- ),
1762
- proof(
1763
- goal(ge(12.0, 10.0)),
1764
- by(builtin(ge, 2))
1765
- )
1766
- ])
1767
- ),
1768
- proof(
1769
- goal(alternative_is_lower_sugar(check)),
1770
- by(rule("delfour.pl", clause(92))),
1771
- bindings([binding("Scanned", prod_BIS_001), binding("ScannedSugar", 120), binding("Alternative", prod_BIS_101), binding("AlternativeSugar", 30)]),
1772
- uses([
1773
- proof(
1774
- goal(scanned_product(scan, prod_BIS_001)),
1775
- by(rule("delfour.pl", clause(47))),
1776
- bindings([binding("Product", prod_BIS_001)]),
1777
- uses([
1778
- proof(
1779
- goal(case_statement(scan, scannedProduct, prod_BIS_001)),
1780
- by(rule("delfour.pl", clause(32))),
1781
- bindings([binding("S", scan), binding("P", scannedProduct), binding("O", prod_BIS_001), binding("Formula", (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))]),
1782
- uses([
1783
- proof(
1784
- goal(case_graph(delfourCaseGraph, (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))),
1785
- by(fact("delfour.pl", clause(25)))
1786
- ),
1787
- proof(
1788
- goal(formula_binary((caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)), scan, scannedProduct, prod_BIS_001)),
1789
- by(builtin(formula_binary, 4))
1790
- )
1791
- ])
1792
- )
1793
- ])
1794
- ),
1795
- proof(
1796
- goal(sugar_tenths(prod_BIS_001, 120)),
1797
- by(rule("delfour.pl", clause(51))),
1798
- bindings([binding("Product", prod_BIS_001), binding("Sugar", 120), binding("Products", [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)]), binding("_Id", "prod_BIS_001"), binding("_Name", "Classic Tea Biscuits"), binding("_SugarG", 12.0)]),
1799
- uses([
1800
- proof(
1801
- goal(product_catalog(delfourCatalog, [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
1802
- by(fact("delfour.pl", clause(26)))
1803
- ),
1804
- proof(
1805
- goal(member(product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
1806
- by(builtin(member, 2))
1807
- )
1808
- ])
1809
- ),
1810
- proof(
1811
- goal(suggested_alternative(case, prod_BIS_101)),
1812
- by(rule("delfour.pl", clause(90))),
1813
- bindings([binding("Candidate", prod_BIS_101), binding("Scanned", prod_BIS_001), binding("ScannedSugar", 120), binding("CandidateSugar", 30)]),
1814
- uses([
1815
- proof(
1816
- goal(scanned_product(scan, prod_BIS_001)),
1817
- by(rule("delfour.pl", clause(47))),
1818
- bindings([binding("Product", prod_BIS_001)]),
1819
- uses([
1820
- proof(
1821
- goal(case_statement(scan, scannedProduct, prod_BIS_001)),
1822
- by(rule("delfour.pl", clause(32))),
1823
- bindings([binding("S", scan), binding("P", scannedProduct), binding("O", prod_BIS_001), binding("Formula", (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))]),
1824
- uses([
1825
- proof(
1826
- goal(case_graph(delfourCaseGraph, (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))),
1827
- by(fact("delfour.pl", clause(25)))
1828
- ),
1829
- proof(
1830
- goal(formula_binary((caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)), scan, scannedProduct, prod_BIS_001)),
1831
- by(builtin(formula_binary, 4))
1832
- )
1833
- ])
1834
- )
1835
- ])
1836
- ),
1837
- proof(
1838
- goal(sugar_tenths(prod_BIS_001, 120)),
1839
- by(rule("delfour.pl", clause(51))),
1840
- bindings([binding("Product", prod_BIS_001), binding("Sugar", 120), binding("Products", [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)]), binding("_Id", "prod_BIS_001"), binding("_Name", "Classic Tea Biscuits"), binding("_SugarG", 12.0)]),
1841
- uses([
1842
- proof(
1843
- goal(product_catalog(delfourCatalog, [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
1844
- by(fact("delfour.pl", clause(26)))
1845
- ),
1846
- proof(
1847
- goal(member(product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
1848
- by(builtin(member, 2))
1849
- )
1850
- ])
1851
- ),
1852
- proof(
1853
- goal(product(prod_BIS_101)),
1854
- by(rule("delfour.pl", clause(48))),
1855
- bindings([binding("Product", prod_BIS_101), binding("Products", [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)]), binding("_Id", "prod_BIS_101"), binding("_Name", "Low-Sugar Tea Biscuits"), binding("_SugarTenths", 30), binding("_SugarG", 3.0)]),
1856
- uses([
1857
- proof(
1858
- goal(product_catalog(delfourCatalog, [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
1859
- by(fact("delfour.pl", clause(26)))
1860
- ),
1861
- proof(
1862
- goal(member(product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
1863
- by(builtin(member, 2))
1864
- )
1865
- ])
1866
- ),
1867
- proof(
1868
- goal(sugar_tenths(prod_BIS_101, 30)),
1869
- by(rule("delfour.pl", clause(51))),
1870
- bindings([binding("Product", prod_BIS_101), binding("Sugar", 30), binding("Products", [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)]), binding("_Id", "prod_BIS_101"), binding("_Name", "Low-Sugar Tea Biscuits"), binding("_SugarG", 3.0)]),
1871
- uses([
1872
- proof(
1873
- goal(product_catalog(delfourCatalog, [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
1874
- by(fact("delfour.pl", clause(26)))
1875
- ),
1876
- proof(
1877
- goal(member(product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
1878
- by(builtin(member, 2))
1879
- )
1880
- ])
1881
- ),
1882
- proof(
1883
- goal(gt(120, 30)),
1884
- by(builtin(gt, 2))
1885
- ),
1886
- proof(
1887
- goal(not(better_lower_sugar(120, 30))),
1888
- by(builtin(not, 1))
1889
- )
1890
- ])
1891
- ),
1892
- proof(
1893
- goal(sugar_tenths(prod_BIS_101, 30)),
1894
- by(rule("delfour.pl", clause(51))),
1895
- bindings([binding("Product", prod_BIS_101), binding("Sugar", 30), binding("Products", [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)]), binding("_Id", "prod_BIS_101"), binding("_Name", "Low-Sugar Tea Biscuits"), binding("_SugarG", 3.0)]),
1896
- uses([
1897
- proof(
1898
- goal(product_catalog(delfourCatalog, [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
1899
- by(fact("delfour.pl", clause(26)))
1900
- ),
1901
- proof(
1902
- goal(member(product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
1903
- by(builtin(member, 2))
1904
- )
1905
- ])
1906
- ),
1907
- proof(
1908
- goal(gt(120, 30)),
1909
- by(builtin(gt, 2))
1910
- )
1911
- ])
1912
- ),
1913
- proof(
1914
- goal(duty_timing_consistent(check)),
1915
- by(rule("delfour.pl", clause(93))),
1916
- bindings([binding("DutyAt", "2025-10-05T20:37:48.907163+00:00"), binding("ExpiresAt", "2025-10-05T22:33:48.907185+00:00")]),
1917
- uses([
1918
- proof(
1919
- goal(scanner_duty_at(case, "2025-10-05T20:37:48.907163+00:00")),
1920
- by(rule("delfour.pl", clause(43))),
1921
- bindings([binding("Time", "2025-10-05T20:37:48.907163+00:00")]),
1922
- uses([
1923
- proof(
1924
- goal(case_statement(case, scannerDutyAt, "2025-10-05T20:37:48.907163+00:00")),
1925
- by(rule("delfour.pl", clause(32))),
1926
- bindings([binding("S", case), binding("P", scannerDutyAt), binding("O", "2025-10-05T20:37:48.907163+00:00"), binding("Formula", (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))]),
1927
- uses([
1928
- proof(
1929
- goal(case_graph(delfourCaseGraph, (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))),
1930
- by(fact("delfour.pl", clause(25)))
1931
- ),
1932
- proof(
1933
- goal(formula_binary((caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)), case, scannerDutyAt, "2025-10-05T20:37:48.907163+00:00")),
1934
- by(builtin(formula_binary, 4))
1935
- )
1936
- ])
1937
- )
1938
- ])
1939
- ),
1940
- proof(
1941
- goal(expires_at(insight, "2025-10-05T22:33:48.907185+00:00")),
1942
- by(rule("delfour.pl", clause(63))),
1943
- bindings([binding("Time", "2025-10-05T22:33:48.907185+00:00")]),
1944
- uses([
1945
- proof(
1946
- goal(insight_statement(insight, expiresAt, "2025-10-05T22:33:48.907185+00:00")),
1947
- by(rule("delfour.pl", clause(33))),
1948
- bindings([binding("S", insight), binding("P", expiresAt), binding("O", "2025-10-05T22:33:48.907185+00:00"), binding("Formula", (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))]),
1949
- uses([
1950
- proof(
1951
- goal(insight_graph(delfourInsightGraph, (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))),
1952
- by(fact("delfour.pl", clause(27)))
1953
- ),
1954
- proof(
1955
- goal(formula_binary((metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")), insight, expiresAt, "2025-10-05T22:33:48.907185+00:00")),
1956
- by(builtin(formula_binary, 4))
1957
- )
1958
- ])
1959
- )
1960
- ])
1961
- ),
1962
- proof(
1963
- goal(le("2025-10-05T20:37:48.907163+00:00", "2025-10-05T22:33:48.907185+00:00")),
1964
- by(builtin(le, 2))
1965
- )
1966
- ])
1967
- ),
1968
- proof(
1969
- goal(marketing_prohibited(check)),
1970
- by(rule("delfour.pl", clause(94))),
1971
- uses([
1972
- proof(
1973
- goal(prohibition(policy, odrl_distribute, insight, "marketing")),
1974
- by(rule("delfour.pl", clause(67))),
1975
- bindings([binding("Action", odrl_distribute), binding("Target", insight), binding("Purpose", "marketing")]),
1976
- uses([
1977
- proof(
1978
- goal(policy_statement(policy, odrl_prohibition, prohibition(odrl_distribute, insight, "marketing"))),
1979
- by(rule("delfour.pl", clause(34))),
1980
- bindings([binding("S", policy), binding("P", odrl_prohibition), binding("O", prohibition(odrl_distribute, insight, "marketing")), binding("Formula", (odrl_permission(policy, permission(odrl_use, insight, "shopping_assist")), odrl_prohibition(policy, prohibition(odrl_distribute, insight, "marketing")), odrl_duty(policy, duty(odrl_delete, "2025-10-05T22:33:48.907185+00:00"))))]),
1981
- uses([
1982
- proof(
1983
- goal(policy_graph(delfourPolicyGraph, (odrl_permission(policy, permission(odrl_use, insight, "shopping_assist")), odrl_prohibition(policy, prohibition(odrl_distribute, insight, "marketing")), odrl_duty(policy, duty(odrl_delete, "2025-10-05T22:33:48.907185+00:00"))))),
1984
- by(fact("delfour.pl", clause(28)))
1985
- ),
1986
- proof(
1987
- goal(formula_binary((odrl_permission(policy, permission(odrl_use, insight, "shopping_assist")), odrl_prohibition(policy, prohibition(odrl_distribute, insight, "marketing")), odrl_duty(policy, duty(odrl_delete, "2025-10-05T22:33:48.907185+00:00"))), policy, odrl_prohibition, prohibition(odrl_distribute, insight, "marketing"))),
1988
- by(builtin(formula_binary, 4))
1989
- )
1990
- ])
1991
- )
1992
- ])
1993
- )
1994
- ])
1995
- ),
1996
- proof(
1997
- goal(files_written_expected(check)),
1998
- by(rule("delfour.pl", clause(95))),
1999
- uses([
2000
- proof(
2001
- goal(files_written(case, 6)),
2002
- by(rule("delfour.pl", clause(44))),
2003
- bindings([binding("Count", 6)]),
2004
- uses([
2005
- proof(
2006
- goal(case_statement(case, filesWritten, 6)),
2007
- by(rule("delfour.pl", clause(32))),
2008
- bindings([binding("S", case), binding("P", filesWritten), binding("O", 6), binding("Formula", (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))]),
2009
- uses([
2010
- proof(
2011
- goal(case_graph(delfourCaseGraph, (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))),
2012
- by(fact("delfour.pl", clause(25)))
2013
- ),
2014
- proof(
2015
- goal(formula_binary((caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)), case, filesWritten, 6)),
2016
- by(builtin(formula_binary, 4))
2017
- )
2018
- ])
2019
- )
2020
- ])
2021
- )
2022
- ])
2023
- )
2024
- ])
2025
- )
2026
- ])
2027
- )
2028
- ).
2029
-
2030
16
  signatureVerifies(check, true).
2031
- why(
2032
- signatureVerifies(check, true),
2033
- proof(
2034
- goal(signatureVerifies(check, true)),
2035
- by(rule("delfour.pl", clause(112))),
2036
- uses([
2037
- proof(
2038
- goal(signature_verifies(check)),
2039
- by(rule("delfour.pl", clause(81))),
2040
- uses([
2041
- proof(
2042
- goal(hmac_verification_mode(signature, trustedPrecomputedInput)),
2043
- by(rule("delfour.pl", clause(77))),
2044
- bindings([binding("Mode", trustedPrecomputedInput)]),
2045
- uses([
2046
- proof(
2047
- goal(signature_statement(signature, hmacVerificationMode, trustedPrecomputedInput)),
2048
- by(rule("delfour.pl", clause(36))),
2049
- bindings([binding("S", signature), binding("P", hmacVerificationMode), binding("O", trustedPrecomputedInput), binding("Formula", (alg(signature, "HMAC-SHA256"), keyid(signature, "demo-shared-secret"), created(signature, "2025-10-05T20:33:48.907163+00:00"), payloadHashSha256(signature, "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098"), hmac(signature, "b21d0072d90112a9f820aced0286889f4b6ef92b145e6fdef1011f3bfa4608c2"), hmacVerificationMode(signature, trustedPrecomputedInput)))]),
2050
- uses([
2051
- proof(
2052
- goal(signature_graph(delfourSignatureGraph, (alg(signature, "HMAC-SHA256"), keyid(signature, "demo-shared-secret"), created(signature, "2025-10-05T20:33:48.907163+00:00"), payloadHashSha256(signature, "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098"), hmac(signature, "b21d0072d90112a9f820aced0286889f4b6ef92b145e6fdef1011f3bfa4608c2"), hmacVerificationMode(signature, trustedPrecomputedInput)))),
2053
- by(fact("delfour.pl", clause(30)))
2054
- ),
2055
- proof(
2056
- goal(formula_binary((alg(signature, "HMAC-SHA256"), keyid(signature, "demo-shared-secret"), created(signature, "2025-10-05T20:33:48.907163+00:00"), payloadHashSha256(signature, "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098"), hmac(signature, "b21d0072d90112a9f820aced0286889f4b6ef92b145e6fdef1011f3bfa4608c2"), hmacVerificationMode(signature, trustedPrecomputedInput)), signature, hmacVerificationMode, trustedPrecomputedInput)),
2057
- by(builtin(formula_binary, 4))
2058
- )
2059
- ])
2060
- )
2061
- ])
2062
- )
2063
- ])
2064
- )
2065
- ])
2066
- )
2067
- ).
2068
-
2069
17
  payloadHashMatches(check, true).
2070
- why(
2071
- payloadHashMatches(check, true),
2072
- proof(
2073
- goal(payloadHashMatches(check, true)),
2074
- by(rule("delfour.pl", clause(113))),
2075
- uses([
2076
- proof(
2077
- goal(payload_hash_matches(check)),
2078
- by(rule("delfour.pl", clause(80))),
2079
- bindings([binding("Digest", "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098")]),
2080
- uses([
2081
- proof(
2082
- goal(envelope_hash(envelope, "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098")),
2083
- by(rule("delfour.pl", clause(71))),
2084
- bindings([binding("Hash", "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098")]),
2085
- uses([
2086
- proof(
2087
- goal(envelope_statement(envelope, hash, "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098")),
2088
- by(rule("delfour.pl", clause(35))),
2089
- bindings([binding("S", envelope), binding("P", hash), binding("O", "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098"), binding("Formula", (insight(envelope, delfourInsightGraph), policy(envelope, delfourPolicyGraph), hash(envelope, "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098")))]),
2090
- uses([
2091
- proof(
2092
- goal(envelope_graph(delfourEnvelopeGraph, (insight(envelope, delfourInsightGraph), policy(envelope, delfourPolicyGraph), hash(envelope, "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098")))),
2093
- by(fact("delfour.pl", clause(29)))
2094
- ),
2095
- proof(
2096
- goal(formula_binary((insight(envelope, delfourInsightGraph), policy(envelope, delfourPolicyGraph), hash(envelope, "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098")), envelope, hash, "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098")),
2097
- by(builtin(formula_binary, 4))
2098
- )
2099
- ])
2100
- )
2101
- ])
2102
- ),
2103
- proof(
2104
- goal(payload_hash_sha256(signature, "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098")),
2105
- by(rule("delfour.pl", clause(75))),
2106
- bindings([binding("Hash", "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098")]),
2107
- uses([
2108
- proof(
2109
- goal(signature_statement(signature, payloadHashSha256, "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098")),
2110
- by(rule("delfour.pl", clause(36))),
2111
- bindings([binding("S", signature), binding("P", payloadHashSha256), binding("O", "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098"), binding("Formula", (alg(signature, "HMAC-SHA256"), keyid(signature, "demo-shared-secret"), created(signature, "2025-10-05T20:33:48.907163+00:00"), payloadHashSha256(signature, "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098"), hmac(signature, "b21d0072d90112a9f820aced0286889f4b6ef92b145e6fdef1011f3bfa4608c2"), hmacVerificationMode(signature, trustedPrecomputedInput)))]),
2112
- uses([
2113
- proof(
2114
- goal(signature_graph(delfourSignatureGraph, (alg(signature, "HMAC-SHA256"), keyid(signature, "demo-shared-secret"), created(signature, "2025-10-05T20:33:48.907163+00:00"), payloadHashSha256(signature, "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098"), hmac(signature, "b21d0072d90112a9f820aced0286889f4b6ef92b145e6fdef1011f3bfa4608c2"), hmacVerificationMode(signature, trustedPrecomputedInput)))),
2115
- by(fact("delfour.pl", clause(30)))
2116
- ),
2117
- proof(
2118
- goal(formula_binary((alg(signature, "HMAC-SHA256"), keyid(signature, "demo-shared-secret"), created(signature, "2025-10-05T20:33:48.907163+00:00"), payloadHashSha256(signature, "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098"), hmac(signature, "b21d0072d90112a9f820aced0286889f4b6ef92b145e6fdef1011f3bfa4608c2"), hmacVerificationMode(signature, trustedPrecomputedInput)), signature, payloadHashSha256, "34ad35638dfd7c67d031eeca8abb235ec24280740f863f3f31cd9d7b6517f098")),
2119
- by(builtin(formula_binary, 4))
2120
- )
2121
- ])
2122
- )
2123
- ])
2124
- )
2125
- ])
2126
- )
2127
- ])
2128
- )
2129
- ).
2130
-
2131
18
  minimizationStripsSensitiveTerms(check, true).
2132
- why(
2133
- minimizationStripsSensitiveTerms(check, true),
2134
- proof(
2135
- goal(minimizationStripsSensitiveTerms(check, true)),
2136
- by(rule("delfour.pl", clause(114))),
2137
- uses([
2138
- proof(
2139
- goal(minimization_strips_sensitive_terms(check)),
2140
- by(rule("delfour.pl", clause(82))),
2141
- bindings([binding("Text", "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")]),
2142
- uses([
2143
- proof(
2144
- goal(serialized_lowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")),
2145
- by(rule("delfour.pl", clause(64))),
2146
- bindings([binding("Text", "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")]),
2147
- uses([
2148
- proof(
2149
- goal(insight_statement(insight, serializedLowercase, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")),
2150
- by(rule("delfour.pl", clause(33))),
2151
- bindings([binding("S", insight), binding("P", serializedLowercase), binding("O", "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner"), binding("Formula", (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))]),
2152
- uses([
2153
- proof(
2154
- goal(insight_graph(delfourInsightGraph, (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))),
2155
- by(fact("delfour.pl", clause(27)))
2156
- ),
2157
- proof(
2158
- goal(formula_binary((metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")), insight, serializedLowercase, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")),
2159
- by(builtin(formula_binary, 4))
2160
- )
2161
- ])
2162
- )
2163
- ])
2164
- ),
2165
- proof(
2166
- goal(not_matches("createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner", "diabetes|medical")),
2167
- by(builtin(not_matches, 2))
2168
- )
2169
- ])
2170
- )
2171
- ])
2172
- )
2173
- ).
2174
-
2175
19
  scopeComplete(check, true).
2176
- why(
2177
- scopeComplete(check, true),
2178
- proof(
2179
- goal(scopeComplete(check, true)),
2180
- by(rule("delfour.pl", clause(115))),
2181
- uses([
2182
- proof(
2183
- goal(scope_complete(check)),
2184
- by(rule("delfour.pl", clause(83))),
2185
- bindings([binding("_Device", "self-scanner"), binding("_Event", "pick_up_scanner"), binding("_Expiry", "2025-10-05T22:33:48.907185+00:00")]),
2186
- uses([
2187
- proof(
2188
- goal(scope_device(insight, "self-scanner")),
2189
- by(rule("delfour.pl", clause(59))),
2190
- bindings([binding("Device", "self-scanner")]),
2191
- uses([
2192
- proof(
2193
- goal(insight_statement(insight, scopeDevice, "self-scanner")),
2194
- by(rule("delfour.pl", clause(33))),
2195
- bindings([binding("S", insight), binding("P", scopeDevice), binding("O", "self-scanner"), binding("Formula", (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))]),
2196
- uses([
2197
- proof(
2198
- goal(insight_graph(delfourInsightGraph, (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))),
2199
- by(fact("delfour.pl", clause(27)))
2200
- ),
2201
- proof(
2202
- goal(formula_binary((metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")), insight, scopeDevice, "self-scanner")),
2203
- by(builtin(formula_binary, 4))
2204
- )
2205
- ])
2206
- )
2207
- ])
2208
- ),
2209
- proof(
2210
- goal(scope_event(insight, "pick_up_scanner")),
2211
- by(rule("delfour.pl", clause(60))),
2212
- bindings([binding("Event", "pick_up_scanner")]),
2213
- uses([
2214
- proof(
2215
- goal(insight_statement(insight, scopeEvent, "pick_up_scanner")),
2216
- by(rule("delfour.pl", clause(33))),
2217
- bindings([binding("S", insight), binding("P", scopeEvent), binding("O", "pick_up_scanner"), binding("Formula", (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))]),
2218
- uses([
2219
- proof(
2220
- goal(insight_graph(delfourInsightGraph, (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))),
2221
- by(fact("delfour.pl", clause(27)))
2222
- ),
2223
- proof(
2224
- goal(formula_binary((metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")), insight, scopeEvent, "pick_up_scanner")),
2225
- by(builtin(formula_binary, 4))
2226
- )
2227
- ])
2228
- )
2229
- ])
2230
- ),
2231
- proof(
2232
- goal(expires_at(insight, "2025-10-05T22:33:48.907185+00:00")),
2233
- by(rule("delfour.pl", clause(63))),
2234
- bindings([binding("Time", "2025-10-05T22:33:48.907185+00:00")]),
2235
- uses([
2236
- proof(
2237
- goal(insight_statement(insight, expiresAt, "2025-10-05T22:33:48.907185+00:00")),
2238
- by(rule("delfour.pl", clause(33))),
2239
- bindings([binding("S", insight), binding("P", expiresAt), binding("O", "2025-10-05T22:33:48.907185+00:00"), binding("Formula", (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))]),
2240
- uses([
2241
- proof(
2242
- goal(insight_graph(delfourInsightGraph, (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))),
2243
- by(fact("delfour.pl", clause(27)))
2244
- ),
2245
- proof(
2246
- goal(formula_binary((metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")), insight, expiresAt, "2025-10-05T22:33:48.907185+00:00")),
2247
- by(builtin(formula_binary, 4))
2248
- )
2249
- ])
2250
- )
2251
- ])
2252
- )
2253
- ])
2254
- )
2255
- ])
2256
- )
2257
- ).
2258
-
2259
20
  authorizationAllowed(check, true).
2260
- why(
2261
- authorizationAllowed(check, true),
2262
- proof(
2263
- goal(authorizationAllowed(check, true)),
2264
- by(rule("delfour.pl", clause(116))),
2265
- uses([
2266
- proof(
2267
- goal(authorization_allowed(check)),
2268
- by(rule("delfour.pl", clause(84))),
2269
- bindings([binding("AuthAt", "2025-10-05T20:35:48.907163+00:00"), binding("ExpiresAt", "2025-10-05T22:33:48.907185+00:00")]),
2270
- uses([
2271
- proof(
2272
- goal(permission(policy, odrl_use, insight, "shopping_assist")),
2273
- by(rule("delfour.pl", clause(66))),
2274
- bindings([binding("Action", odrl_use), binding("Target", insight), binding("Purpose", "shopping_assist")]),
2275
- uses([
2276
- proof(
2277
- goal(policy_statement(policy, odrl_permission, permission(odrl_use, insight, "shopping_assist"))),
2278
- by(rule("delfour.pl", clause(34))),
2279
- bindings([binding("S", policy), binding("P", odrl_permission), binding("O", permission(odrl_use, insight, "shopping_assist")), binding("Formula", (odrl_permission(policy, permission(odrl_use, insight, "shopping_assist")), odrl_prohibition(policy, prohibition(odrl_distribute, insight, "marketing")), odrl_duty(policy, duty(odrl_delete, "2025-10-05T22:33:48.907185+00:00"))))]),
2280
- uses([
2281
- proof(
2282
- goal(policy_graph(delfourPolicyGraph, (odrl_permission(policy, permission(odrl_use, insight, "shopping_assist")), odrl_prohibition(policy, prohibition(odrl_distribute, insight, "marketing")), odrl_duty(policy, duty(odrl_delete, "2025-10-05T22:33:48.907185+00:00"))))),
2283
- by(fact("delfour.pl", clause(28)))
2284
- ),
2285
- proof(
2286
- goal(formula_binary((odrl_permission(policy, permission(odrl_use, insight, "shopping_assist")), odrl_prohibition(policy, prohibition(odrl_distribute, insight, "marketing")), odrl_duty(policy, duty(odrl_delete, "2025-10-05T22:33:48.907185+00:00"))), policy, odrl_permission, permission(odrl_use, insight, "shopping_assist"))),
2287
- by(builtin(formula_binary, 4))
2288
- )
2289
- ])
2290
- )
2291
- ])
2292
- ),
2293
- proof(
2294
- goal(request_purpose(case, "shopping_assist")),
2295
- by(rule("delfour.pl", clause(38))),
2296
- bindings([binding("Purpose", "shopping_assist")]),
2297
- uses([
2298
- proof(
2299
- goal(case_statement(case, requestPurpose, "shopping_assist")),
2300
- by(rule("delfour.pl", clause(32))),
2301
- bindings([binding("S", case), binding("P", requestPurpose), binding("O", "shopping_assist"), binding("Formula", (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))]),
2302
- uses([
2303
- proof(
2304
- goal(case_graph(delfourCaseGraph, (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))),
2305
- by(fact("delfour.pl", clause(25)))
2306
- ),
2307
- proof(
2308
- goal(formula_binary((caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)), case, requestPurpose, "shopping_assist")),
2309
- by(builtin(formula_binary, 4))
2310
- )
2311
- ])
2312
- )
2313
- ])
2314
- ),
2315
- proof(
2316
- goal(scanner_auth_at(case, "2025-10-05T20:35:48.907163+00:00")),
2317
- by(rule("delfour.pl", clause(42))),
2318
- bindings([binding("Time", "2025-10-05T20:35:48.907163+00:00")]),
2319
- uses([
2320
- proof(
2321
- goal(case_statement(case, scannerAuthAt, "2025-10-05T20:35:48.907163+00:00")),
2322
- by(rule("delfour.pl", clause(32))),
2323
- bindings([binding("S", case), binding("P", scannerAuthAt), binding("O", "2025-10-05T20:35:48.907163+00:00"), binding("Formula", (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))]),
2324
- uses([
2325
- proof(
2326
- goal(case_graph(delfourCaseGraph, (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))),
2327
- by(fact("delfour.pl", clause(25)))
2328
- ),
2329
- proof(
2330
- goal(formula_binary((caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)), case, scannerAuthAt, "2025-10-05T20:35:48.907163+00:00")),
2331
- by(builtin(formula_binary, 4))
2332
- )
2333
- ])
2334
- )
2335
- ])
2336
- ),
2337
- proof(
2338
- goal(expires_at(insight, "2025-10-05T22:33:48.907185+00:00")),
2339
- by(rule("delfour.pl", clause(63))),
2340
- bindings([binding("Time", "2025-10-05T22:33:48.907185+00:00")]),
2341
- uses([
2342
- proof(
2343
- goal(insight_statement(insight, expiresAt, "2025-10-05T22:33:48.907185+00:00")),
2344
- by(rule("delfour.pl", clause(33))),
2345
- bindings([binding("S", insight), binding("P", expiresAt), binding("O", "2025-10-05T22:33:48.907185+00:00"), binding("Formula", (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))]),
2346
- uses([
2347
- proof(
2348
- goal(insight_graph(delfourInsightGraph, (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))),
2349
- by(fact("delfour.pl", clause(27)))
2350
- ),
2351
- proof(
2352
- goal(formula_binary((metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")), insight, expiresAt, "2025-10-05T22:33:48.907185+00:00")),
2353
- by(builtin(formula_binary, 4))
2354
- )
2355
- ])
2356
- )
2357
- ])
2358
- ),
2359
- proof(
2360
- goal(le("2025-10-05T20:35:48.907163+00:00", "2025-10-05T22:33:48.907185+00:00")),
2361
- by(builtin(le, 2))
2362
- )
2363
- ])
2364
- )
2365
- ])
2366
- )
2367
- ).
2368
-
2369
21
  bannerFlagsHighSugar(check, true).
2370
- why(
2371
- bannerFlagsHighSugar(check, true),
2372
- proof(
2373
- goal(bannerFlagsHighSugar(check, true)),
2374
- by(rule("delfour.pl", clause(117))),
2375
- uses([
2376
- proof(
2377
- goal(banner_flags_high_sugar(check)),
2378
- by(rule("delfour.pl", clause(86))),
2379
- bindings([binding("Product", prod_BIS_001), binding("Sugar", 12.0), binding("Threshold", 10.0)]),
2380
- uses([
2381
- proof(
2382
- goal(decision(decision, "Allowed", insight)),
2383
- by(rule("delfour.pl", clause(85))),
2384
- uses([
2385
- proof(
2386
- goal(authorization_allowed(check)),
2387
- by(rule("delfour.pl", clause(84))),
2388
- bindings([binding("AuthAt", "2025-10-05T20:35:48.907163+00:00"), binding("ExpiresAt", "2025-10-05T22:33:48.907185+00:00")]),
2389
- uses([
2390
- proof(
2391
- goal(permission(policy, odrl_use, insight, "shopping_assist")),
2392
- by(rule("delfour.pl", clause(66))),
2393
- bindings([binding("Action", odrl_use), binding("Target", insight), binding("Purpose", "shopping_assist")]),
2394
- uses([
2395
- proof(
2396
- goal(policy_statement(policy, odrl_permission, permission(odrl_use, insight, "shopping_assist"))),
2397
- by(rule("delfour.pl", clause(34))),
2398
- bindings([binding("S", policy), binding("P", odrl_permission), binding("O", permission(odrl_use, insight, "shopping_assist")), binding("Formula", (odrl_permission(policy, permission(odrl_use, insight, "shopping_assist")), odrl_prohibition(policy, prohibition(odrl_distribute, insight, "marketing")), odrl_duty(policy, duty(odrl_delete, "2025-10-05T22:33:48.907185+00:00"))))]),
2399
- uses([
2400
- proof(
2401
- goal(policy_graph(delfourPolicyGraph, (odrl_permission(policy, permission(odrl_use, insight, "shopping_assist")), odrl_prohibition(policy, prohibition(odrl_distribute, insight, "marketing")), odrl_duty(policy, duty(odrl_delete, "2025-10-05T22:33:48.907185+00:00"))))),
2402
- by(fact("delfour.pl", clause(28)))
2403
- ),
2404
- proof(
2405
- goal(formula_binary((odrl_permission(policy, permission(odrl_use, insight, "shopping_assist")), odrl_prohibition(policy, prohibition(odrl_distribute, insight, "marketing")), odrl_duty(policy, duty(odrl_delete, "2025-10-05T22:33:48.907185+00:00"))), policy, odrl_permission, permission(odrl_use, insight, "shopping_assist"))),
2406
- by(builtin(formula_binary, 4))
2407
- )
2408
- ])
2409
- )
2410
- ])
2411
- ),
2412
- proof(
2413
- goal(request_purpose(case, "shopping_assist")),
2414
- by(rule("delfour.pl", clause(38))),
2415
- bindings([binding("Purpose", "shopping_assist")]),
2416
- uses([
2417
- proof(
2418
- goal(case_statement(case, requestPurpose, "shopping_assist")),
2419
- by(rule("delfour.pl", clause(32))),
2420
- bindings([binding("S", case), binding("P", requestPurpose), binding("O", "shopping_assist"), binding("Formula", (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))]),
2421
- uses([
2422
- proof(
2423
- goal(case_graph(delfourCaseGraph, (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))),
2424
- by(fact("delfour.pl", clause(25)))
2425
- ),
2426
- proof(
2427
- goal(formula_binary((caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)), case, requestPurpose, "shopping_assist")),
2428
- by(builtin(formula_binary, 4))
2429
- )
2430
- ])
2431
- )
2432
- ])
2433
- ),
2434
- proof(
2435
- goal(scanner_auth_at(case, "2025-10-05T20:35:48.907163+00:00")),
2436
- by(rule("delfour.pl", clause(42))),
2437
- bindings([binding("Time", "2025-10-05T20:35:48.907163+00:00")]),
2438
- uses([
2439
- proof(
2440
- goal(case_statement(case, scannerAuthAt, "2025-10-05T20:35:48.907163+00:00")),
2441
- by(rule("delfour.pl", clause(32))),
2442
- bindings([binding("S", case), binding("P", scannerAuthAt), binding("O", "2025-10-05T20:35:48.907163+00:00"), binding("Formula", (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))]),
2443
- uses([
2444
- proof(
2445
- goal(case_graph(delfourCaseGraph, (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))),
2446
- by(fact("delfour.pl", clause(25)))
2447
- ),
2448
- proof(
2449
- goal(formula_binary((caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)), case, scannerAuthAt, "2025-10-05T20:35:48.907163+00:00")),
2450
- by(builtin(formula_binary, 4))
2451
- )
2452
- ])
2453
- )
2454
- ])
2455
- ),
2456
- proof(
2457
- goal(expires_at(insight, "2025-10-05T22:33:48.907185+00:00")),
2458
- by(rule("delfour.pl", clause(63))),
2459
- bindings([binding("Time", "2025-10-05T22:33:48.907185+00:00")]),
2460
- uses([
2461
- proof(
2462
- goal(insight_statement(insight, expiresAt, "2025-10-05T22:33:48.907185+00:00")),
2463
- by(rule("delfour.pl", clause(33))),
2464
- bindings([binding("S", insight), binding("P", expiresAt), binding("O", "2025-10-05T22:33:48.907185+00:00"), binding("Formula", (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))]),
2465
- uses([
2466
- proof(
2467
- goal(insight_graph(delfourInsightGraph, (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))),
2468
- by(fact("delfour.pl", clause(27)))
2469
- ),
2470
- proof(
2471
- goal(formula_binary((metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")), insight, expiresAt, "2025-10-05T22:33:48.907185+00:00")),
2472
- by(builtin(formula_binary, 4))
2473
- )
2474
- ])
2475
- )
2476
- ])
2477
- ),
2478
- proof(
2479
- goal(le("2025-10-05T20:35:48.907163+00:00", "2025-10-05T22:33:48.907185+00:00")),
2480
- by(builtin(le, 2))
2481
- )
2482
- ])
2483
- )
2484
- ])
2485
- ),
2486
- proof(
2487
- goal(scanned_product(scan, prod_BIS_001)),
2488
- by(rule("delfour.pl", clause(47))),
2489
- bindings([binding("Product", prod_BIS_001)]),
2490
- uses([
2491
- proof(
2492
- goal(case_statement(scan, scannedProduct, prod_BIS_001)),
2493
- by(rule("delfour.pl", clause(32))),
2494
- bindings([binding("S", scan), binding("P", scannedProduct), binding("O", prod_BIS_001), binding("Formula", (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))]),
2495
- uses([
2496
- proof(
2497
- goal(case_graph(delfourCaseGraph, (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))),
2498
- by(fact("delfour.pl", clause(25)))
2499
- ),
2500
- proof(
2501
- goal(formula_binary((caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)), scan, scannedProduct, prod_BIS_001)),
2502
- by(builtin(formula_binary, 4))
2503
- )
2504
- ])
2505
- )
2506
- ])
2507
- ),
2508
- proof(
2509
- goal(sugar_per_serving(prod_BIS_001, 12.0)),
2510
- by(rule("delfour.pl", clause(52))),
2511
- bindings([binding("Product", prod_BIS_001), binding("Sugar", 12.0), binding("Products", [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)]), binding("_Id", "prod_BIS_001"), binding("_Name", "Classic Tea Biscuits"), binding("_SugarTenths", 120)]),
2512
- uses([
2513
- proof(
2514
- goal(product_catalog(delfourCatalog, [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
2515
- by(fact("delfour.pl", clause(26)))
2516
- ),
2517
- proof(
2518
- goal(member(product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
2519
- by(builtin(member, 2))
2520
- )
2521
- ])
2522
- ),
2523
- proof(
2524
- goal(threshold_g(insight, 10.0)),
2525
- by(rule("delfour.pl", clause(57))),
2526
- bindings([binding("Threshold", 10.0)]),
2527
- uses([
2528
- proof(
2529
- goal(insight_statement(insight, thresholdG, 10.0)),
2530
- by(rule("delfour.pl", clause(33))),
2531
- bindings([binding("S", insight), binding("P", thresholdG), binding("O", 10.0), binding("Formula", (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))]),
2532
- uses([
2533
- proof(
2534
- goal(insight_graph(delfourInsightGraph, (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))),
2535
- by(fact("delfour.pl", clause(27)))
2536
- ),
2537
- proof(
2538
- goal(formula_binary((metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")), insight, thresholdG, 10.0)),
2539
- by(builtin(formula_binary, 4))
2540
- )
2541
- ])
2542
- )
2543
- ])
2544
- ),
2545
- proof(
2546
- goal(ge(12.0, 10.0)),
2547
- by(builtin(ge, 2))
2548
- )
2549
- ])
2550
- )
2551
- ])
2552
- )
2553
- ).
2554
-
2555
22
  alternativeIsLowerSugar(check, true).
2556
- why(
2557
- alternativeIsLowerSugar(check, true),
2558
- proof(
2559
- goal(alternativeIsLowerSugar(check, true)),
2560
- by(rule("delfour.pl", clause(118))),
2561
- uses([
2562
- proof(
2563
- goal(alternative_is_lower_sugar(check)),
2564
- by(rule("delfour.pl", clause(92))),
2565
- bindings([binding("Scanned", prod_BIS_001), binding("ScannedSugar", 120), binding("Alternative", prod_BIS_101), binding("AlternativeSugar", 30)]),
2566
- uses([
2567
- proof(
2568
- goal(scanned_product(scan, prod_BIS_001)),
2569
- by(rule("delfour.pl", clause(47))),
2570
- bindings([binding("Product", prod_BIS_001)]),
2571
- uses([
2572
- proof(
2573
- goal(case_statement(scan, scannedProduct, prod_BIS_001)),
2574
- by(rule("delfour.pl", clause(32))),
2575
- bindings([binding("S", scan), binding("P", scannedProduct), binding("O", prod_BIS_001), binding("Formula", (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))]),
2576
- uses([
2577
- proof(
2578
- goal(case_graph(delfourCaseGraph, (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))),
2579
- by(fact("delfour.pl", clause(25)))
2580
- ),
2581
- proof(
2582
- goal(formula_binary((caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)), scan, scannedProduct, prod_BIS_001)),
2583
- by(builtin(formula_binary, 4))
2584
- )
2585
- ])
2586
- )
2587
- ])
2588
- ),
2589
- proof(
2590
- goal(sugar_tenths(prod_BIS_001, 120)),
2591
- by(rule("delfour.pl", clause(51))),
2592
- bindings([binding("Product", prod_BIS_001), binding("Sugar", 120), binding("Products", [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)]), binding("_Id", "prod_BIS_001"), binding("_Name", "Classic Tea Biscuits"), binding("_SugarG", 12.0)]),
2593
- uses([
2594
- proof(
2595
- goal(product_catalog(delfourCatalog, [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
2596
- by(fact("delfour.pl", clause(26)))
2597
- ),
2598
- proof(
2599
- goal(member(product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
2600
- by(builtin(member, 2))
2601
- )
2602
- ])
2603
- ),
2604
- proof(
2605
- goal(suggested_alternative(case, prod_BIS_101)),
2606
- by(rule("delfour.pl", clause(90))),
2607
- bindings([binding("Candidate", prod_BIS_101), binding("Scanned", prod_BIS_001), binding("ScannedSugar", 120), binding("CandidateSugar", 30)]),
2608
- uses([
2609
- proof(
2610
- goal(scanned_product(scan, prod_BIS_001)),
2611
- by(rule("delfour.pl", clause(47))),
2612
- bindings([binding("Product", prod_BIS_001)]),
2613
- uses([
2614
- proof(
2615
- goal(case_statement(scan, scannedProduct, prod_BIS_001)),
2616
- by(rule("delfour.pl", clause(32))),
2617
- bindings([binding("S", scan), binding("P", scannedProduct), binding("O", prod_BIS_001), binding("Formula", (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))]),
2618
- uses([
2619
- proof(
2620
- goal(case_graph(delfourCaseGraph, (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))),
2621
- by(fact("delfour.pl", clause(25)))
2622
- ),
2623
- proof(
2624
- goal(formula_binary((caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)), scan, scannedProduct, prod_BIS_001)),
2625
- by(builtin(formula_binary, 4))
2626
- )
2627
- ])
2628
- )
2629
- ])
2630
- ),
2631
- proof(
2632
- goal(sugar_tenths(prod_BIS_001, 120)),
2633
- by(rule("delfour.pl", clause(51))),
2634
- bindings([binding("Product", prod_BIS_001), binding("Sugar", 120), binding("Products", [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)]), binding("_Id", "prod_BIS_001"), binding("_Name", "Classic Tea Biscuits"), binding("_SugarG", 12.0)]),
2635
- uses([
2636
- proof(
2637
- goal(product_catalog(delfourCatalog, [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
2638
- by(fact("delfour.pl", clause(26)))
2639
- ),
2640
- proof(
2641
- goal(member(product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
2642
- by(builtin(member, 2))
2643
- )
2644
- ])
2645
- ),
2646
- proof(
2647
- goal(product(prod_BIS_101)),
2648
- by(rule("delfour.pl", clause(48))),
2649
- bindings([binding("Product", prod_BIS_101), binding("Products", [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)]), binding("_Id", "prod_BIS_101"), binding("_Name", "Low-Sugar Tea Biscuits"), binding("_SugarTenths", 30), binding("_SugarG", 3.0)]),
2650
- uses([
2651
- proof(
2652
- goal(product_catalog(delfourCatalog, [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
2653
- by(fact("delfour.pl", clause(26)))
2654
- ),
2655
- proof(
2656
- goal(member(product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
2657
- by(builtin(member, 2))
2658
- )
2659
- ])
2660
- ),
2661
- proof(
2662
- goal(sugar_tenths(prod_BIS_101, 30)),
2663
- by(rule("delfour.pl", clause(51))),
2664
- bindings([binding("Product", prod_BIS_101), binding("Sugar", 30), binding("Products", [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)]), binding("_Id", "prod_BIS_101"), binding("_Name", "Low-Sugar Tea Biscuits"), binding("_SugarG", 3.0)]),
2665
- uses([
2666
- proof(
2667
- goal(product_catalog(delfourCatalog, [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
2668
- by(fact("delfour.pl", clause(26)))
2669
- ),
2670
- proof(
2671
- goal(member(product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
2672
- by(builtin(member, 2))
2673
- )
2674
- ])
2675
- ),
2676
- proof(
2677
- goal(gt(120, 30)),
2678
- by(builtin(gt, 2))
2679
- ),
2680
- proof(
2681
- goal(not(better_lower_sugar(120, 30))),
2682
- by(builtin(not, 1))
2683
- )
2684
- ])
2685
- ),
2686
- proof(
2687
- goal(sugar_tenths(prod_BIS_101, 30)),
2688
- by(rule("delfour.pl", clause(51))),
2689
- bindings([binding("Product", prod_BIS_101), binding("Sugar", 30), binding("Products", [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)]), binding("_Id", "prod_BIS_101"), binding("_Name", "Low-Sugar Tea Biscuits"), binding("_SugarG", 3.0)]),
2690
- uses([
2691
- proof(
2692
- goal(product_catalog(delfourCatalog, [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
2693
- by(fact("delfour.pl", clause(26)))
2694
- ),
2695
- proof(
2696
- goal(member(product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), [product(prod_BIS_001, "prod_BIS_001", "Classic Tea Biscuits", 120, 12.0), product(prod_BIS_101, "prod_BIS_101", "Low-Sugar Tea Biscuits", 30, 3.0), product(prod_CHOC_050, "prod_CHOC_050", "Milk Chocolate Bar", 150, 15.0), product(prod_CHOC_150, "prod_CHOC_150", "85% Dark Chocolate", 60, 6.0)])),
2697
- by(builtin(member, 2))
2698
- )
2699
- ])
2700
- ),
2701
- proof(
2702
- goal(gt(120, 30)),
2703
- by(builtin(gt, 2))
2704
- )
2705
- ])
2706
- )
2707
- ])
2708
- )
2709
- ).
2710
-
2711
23
  dutyTimingConsistent(check, true).
2712
- why(
2713
- dutyTimingConsistent(check, true),
2714
- proof(
2715
- goal(dutyTimingConsistent(check, true)),
2716
- by(rule("delfour.pl", clause(119))),
2717
- uses([
2718
- proof(
2719
- goal(duty_timing_consistent(check)),
2720
- by(rule("delfour.pl", clause(93))),
2721
- bindings([binding("DutyAt", "2025-10-05T20:37:48.907163+00:00"), binding("ExpiresAt", "2025-10-05T22:33:48.907185+00:00")]),
2722
- uses([
2723
- proof(
2724
- goal(scanner_duty_at(case, "2025-10-05T20:37:48.907163+00:00")),
2725
- by(rule("delfour.pl", clause(43))),
2726
- bindings([binding("Time", "2025-10-05T20:37:48.907163+00:00")]),
2727
- uses([
2728
- proof(
2729
- goal(case_statement(case, scannerDutyAt, "2025-10-05T20:37:48.907163+00:00")),
2730
- by(rule("delfour.pl", clause(32))),
2731
- bindings([binding("S", case), binding("P", scannerDutyAt), binding("O", "2025-10-05T20:37:48.907163+00:00"), binding("Formula", (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))]),
2732
- uses([
2733
- proof(
2734
- goal(case_graph(delfourCaseGraph, (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))),
2735
- by(fact("delfour.pl", clause(25)))
2736
- ),
2737
- proof(
2738
- goal(formula_binary((caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)), case, scannerDutyAt, "2025-10-05T20:37:48.907163+00:00")),
2739
- by(builtin(formula_binary, 4))
2740
- )
2741
- ])
2742
- )
2743
- ])
2744
- ),
2745
- proof(
2746
- goal(expires_at(insight, "2025-10-05T22:33:48.907185+00:00")),
2747
- by(rule("delfour.pl", clause(63))),
2748
- bindings([binding("Time", "2025-10-05T22:33:48.907185+00:00")]),
2749
- uses([
2750
- proof(
2751
- goal(insight_statement(insight, expiresAt, "2025-10-05T22:33:48.907185+00:00")),
2752
- by(rule("delfour.pl", clause(33))),
2753
- bindings([binding("S", insight), binding("P", expiresAt), binding("O", "2025-10-05T22:33:48.907185+00:00"), binding("Formula", (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))]),
2754
- uses([
2755
- proof(
2756
- goal(insight_graph(delfourInsightGraph, (metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")))),
2757
- by(fact("delfour.pl", clause(27)))
2758
- ),
2759
- proof(
2760
- goal(formula_binary((metric(insight, "sugar_g_per_serving"), thresholdTenths(insight, 100), thresholdDisplay(insight, "10.0"), thresholdG(insight, 10.0), suggestionPolicy(insight, "lower_metric_first_higher_price_ok"), scopeDevice(insight, "self-scanner"), scopeEvent(insight, "pick_up_scanner"), retailer(insight, "Delfour"), createdAt(insight, "2025-10-05T20:33:48.907163+00:00"), expiresAt(insight, "2025-10-05T22:33:48.907185+00:00"), serializedLowercase(insight, "createdat expiresat insight metric sugar_g_per_serving retailer delfour scopedevice self-scanner scopeevent pick_up_scanner")), insight, expiresAt, "2025-10-05T22:33:48.907185+00:00")),
2761
- by(builtin(formula_binary, 4))
2762
- )
2763
- ])
2764
- )
2765
- ])
2766
- ),
2767
- proof(
2768
- goal(le("2025-10-05T20:37:48.907163+00:00", "2025-10-05T22:33:48.907185+00:00")),
2769
- by(builtin(le, 2))
2770
- )
2771
- ])
2772
- )
2773
- ])
2774
- )
2775
- ).
2776
-
2777
24
  marketingProhibited(check, true).
2778
- why(
2779
- marketingProhibited(check, true),
2780
- proof(
2781
- goal(marketingProhibited(check, true)),
2782
- by(rule("delfour.pl", clause(120))),
2783
- uses([
2784
- proof(
2785
- goal(marketing_prohibited(check)),
2786
- by(rule("delfour.pl", clause(94))),
2787
- uses([
2788
- proof(
2789
- goal(prohibition(policy, odrl_distribute, insight, "marketing")),
2790
- by(rule("delfour.pl", clause(67))),
2791
- bindings([binding("Action", odrl_distribute), binding("Target", insight), binding("Purpose", "marketing")]),
2792
- uses([
2793
- proof(
2794
- goal(policy_statement(policy, odrl_prohibition, prohibition(odrl_distribute, insight, "marketing"))),
2795
- by(rule("delfour.pl", clause(34))),
2796
- bindings([binding("S", policy), binding("P", odrl_prohibition), binding("O", prohibition(odrl_distribute, insight, "marketing")), binding("Formula", (odrl_permission(policy, permission(odrl_use, insight, "shopping_assist")), odrl_prohibition(policy, prohibition(odrl_distribute, insight, "marketing")), odrl_duty(policy, duty(odrl_delete, "2025-10-05T22:33:48.907185+00:00"))))]),
2797
- uses([
2798
- proof(
2799
- goal(policy_graph(delfourPolicyGraph, (odrl_permission(policy, permission(odrl_use, insight, "shopping_assist")), odrl_prohibition(policy, prohibition(odrl_distribute, insight, "marketing")), odrl_duty(policy, duty(odrl_delete, "2025-10-05T22:33:48.907185+00:00"))))),
2800
- by(fact("delfour.pl", clause(28)))
2801
- ),
2802
- proof(
2803
- goal(formula_binary((odrl_permission(policy, permission(odrl_use, insight, "shopping_assist")), odrl_prohibition(policy, prohibition(odrl_distribute, insight, "marketing")), odrl_duty(policy, duty(odrl_delete, "2025-10-05T22:33:48.907185+00:00"))), policy, odrl_prohibition, prohibition(odrl_distribute, insight, "marketing"))),
2804
- by(builtin(formula_binary, 4))
2805
- )
2806
- ])
2807
- )
2808
- ])
2809
- )
2810
- ])
2811
- )
2812
- ])
2813
- )
2814
- ).
2815
-
2816
25
  filesWrittenExpected(check, true).
2817
- why(
2818
- filesWrittenExpected(check, true),
2819
- proof(
2820
- goal(filesWrittenExpected(check, true)),
2821
- by(rule("delfour.pl", clause(121))),
2822
- uses([
2823
- proof(
2824
- goal(files_written_expected(check)),
2825
- by(rule("delfour.pl", clause(95))),
2826
- uses([
2827
- proof(
2828
- goal(files_written(case, 6)),
2829
- by(rule("delfour.pl", clause(44))),
2830
- bindings([binding("Count", 6)]),
2831
- uses([
2832
- proof(
2833
- goal(case_statement(case, filesWritten, 6)),
2834
- by(rule("delfour.pl", clause(32))),
2835
- bindings([binding("S", case), binding("P", filesWritten), binding("O", 6), binding("Formula", (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))]),
2836
- uses([
2837
- proof(
2838
- goal(case_graph(delfourCaseGraph, (caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)))),
2839
- by(fact("delfour.pl", clause(25)))
2840
- ),
2841
- proof(
2842
- goal(formula_binary((caseName(case, "delfour"), requestPurpose(case, "shopping_assist"), requestAction(case, odrl_use), phoneCreatedAt(case, "2025-10-05T20:33:48.907163+00:00"), phoneExpiresAt(case, "2025-10-05T22:33:48.907185+00:00"), scannerAuthAt(case, "2025-10-05T20:35:48.907163+00:00"), scannerDutyAt(case, "2025-10-05T20:37:48.907163+00:00"), filesWritten(case, 6), auditEntries(case, 1), condition(householdProfile, "Diabetes"), scannedProduct(scan, prod_BIS_001)), case, filesWritten, 6)),
2843
- by(builtin(formula_binary, 4))
2844
- )
2845
- ])
2846
- )
2847
- ])
2848
- )
2849
- ])
2850
- )
2851
- ])
2852
- )
2853
- ).
2854
-