occam-verify-cli 1.0.457 → 1.0.473

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 (161) hide show
  1. package/lib/constants.js +13 -1
  2. package/lib/context/ephemeral.js +270 -0
  3. package/lib/context/file.js +102 -66
  4. package/lib/context/liminal.js +120 -0
  5. package/lib/context/literal.js +92 -0
  6. package/lib/context/nominal.js +15 -1
  7. package/lib/context/release.js +66 -7
  8. package/lib/context/scoped.js +48 -40
  9. package/lib/context/synthetic.js +133 -0
  10. package/lib/element/assertion/contained.js +66 -66
  11. package/lib/element/assertion/defined.js +32 -32
  12. package/lib/element/assertion/property.js +39 -39
  13. package/lib/element/assertion/satisfies.js +22 -22
  14. package/lib/element/assumption.js +5 -8
  15. package/lib/element/conclusion.js +14 -13
  16. package/lib/element/constructor.js +2 -2
  17. package/lib/element/deduction.js +14 -13
  18. package/lib/element/derivation.js +3 -3
  19. package/lib/element/equality.js +5 -5
  20. package/lib/element/equivalence.js +112 -107
  21. package/lib/element/equivalences.js +24 -10
  22. package/lib/element/error.js +3 -3
  23. package/lib/element/frame.js +38 -21
  24. package/lib/element/hypothesis.js +2 -2
  25. package/lib/element/judgement.js +6 -5
  26. package/lib/element/metaType.js +1 -2
  27. package/lib/element/metavariable.js +46 -35
  28. package/lib/element/parameter.js +13 -5
  29. package/lib/element/procedureCall.js +16 -16
  30. package/lib/element/proof.js +14 -13
  31. package/lib/element/proofAssertion/premise.js +41 -30
  32. package/lib/element/proofAssertion/step.js +39 -35
  33. package/lib/element/proofAssertion/supposition.js +43 -32
  34. package/lib/element/proofAssertion.js +19 -5
  35. package/lib/element/propertyRelation.js +2 -2
  36. package/lib/element/reference.js +50 -9
  37. package/lib/element/rule.js +26 -28
  38. package/lib/element/section.js +2 -2
  39. package/lib/element/signature.js +9 -6
  40. package/lib/element/statement.js +44 -31
  41. package/lib/element/subproof.js +18 -17
  42. package/lib/element/substitution/frame.js +83 -46
  43. package/lib/element/substitution/reference.js +101 -19
  44. package/lib/element/substitution/statement.js +122 -75
  45. package/lib/element/substitution/term.js +93 -57
  46. package/lib/element/substitution.js +20 -69
  47. package/lib/element/substitutions.js +49 -34
  48. package/lib/element/term.js +30 -21
  49. package/lib/element/topLevelAssertion/axiom.js +8 -6
  50. package/lib/element/topLevelAssertion/conjecture.js +4 -4
  51. package/lib/element/topLevelAssertion/lemma.js +4 -4
  52. package/lib/element/topLevelAssertion/theorem.js +2 -2
  53. package/lib/element/topLevelAssertion.js +30 -23
  54. package/lib/element/topLevelMetaAssertion/metaLemma.js +2 -2
  55. package/lib/element/topLevelMetaAssertion/metatheorem.js +2 -2
  56. package/lib/element/topLevelMetaAssertion.js +16 -12
  57. package/lib/element/variable.js +30 -22
  58. package/lib/index.js +3 -3
  59. package/lib/main.js +3 -3
  60. package/lib/node/frame.js +2 -2
  61. package/lib/node/metavariable.js +4 -4
  62. package/lib/node/parameter.js +28 -7
  63. package/lib/node/substitution/frame.js +9 -31
  64. package/lib/node/substitution/reference.js +137 -0
  65. package/lib/node/substitution/statement.js +9 -31
  66. package/lib/node/substitution/term.js +9 -23
  67. package/lib/nonTerminalNodeMap.js +3 -2
  68. package/lib/process/instantiate.js +2 -14
  69. package/lib/process/unify.js +5 -5
  70. package/lib/tokenTypes.js +22 -0
  71. package/lib/utilities/context.js +54 -19
  72. package/lib/utilities/element.js +161 -336
  73. package/lib/utilities/instance.js +4 -4
  74. package/lib/utilities/string.js +18 -4
  75. package/lib/utilities/unification.js +24 -18
  76. package/lib/utilities/validation.js +31 -31
  77. package/package.json +2 -2
  78. package/src/constants.js +12 -0
  79. package/src/context/{transient.js → ephemeral.js} +15 -112
  80. package/src/context/file.js +66 -67
  81. package/src/context/liminal.js +67 -0
  82. package/src/context/{fragment.js → literal.js} +17 -4
  83. package/src/context/nominal.js +12 -0
  84. package/src/context/release.js +44 -6
  85. package/src/context/scoped.js +41 -31
  86. package/src/context/synthetic.js +60 -0
  87. package/src/element/assertion/contained.js +49 -47
  88. package/src/element/assertion/defined.js +29 -27
  89. package/src/element/assertion/property.js +35 -35
  90. package/src/element/assertion/satisfies.js +19 -18
  91. package/src/element/assumption.js +4 -10
  92. package/src/element/conclusion.js +16 -19
  93. package/src/element/constructor.js +1 -1
  94. package/src/element/deduction.js +16 -21
  95. package/src/element/derivation.js +2 -2
  96. package/src/element/equality.js +4 -4
  97. package/src/element/equivalence.js +115 -135
  98. package/src/element/equivalences.js +9 -7
  99. package/src/element/error.js +4 -2
  100. package/src/element/frame.js +50 -23
  101. package/src/element/hypothesis.js +1 -1
  102. package/src/element/judgement.js +9 -4
  103. package/src/element/metaType.js +0 -1
  104. package/src/element/metavariable.js +54 -53
  105. package/src/element/parameter.js +10 -5
  106. package/src/element/procedureCall.js +20 -18
  107. package/src/element/proof.js +14 -16
  108. package/src/element/proofAssertion/premise.js +46 -42
  109. package/src/element/proofAssertion/step.js +45 -40
  110. package/src/element/proofAssertion/supposition.js +56 -45
  111. package/src/element/proofAssertion.js +23 -5
  112. package/src/element/propertyRelation.js +1 -1
  113. package/src/element/reference.js +64 -16
  114. package/src/element/rule.js +31 -37
  115. package/src/element/section.js +1 -1
  116. package/src/element/signature.js +8 -8
  117. package/src/element/statement.js +51 -40
  118. package/src/element/subproof.js +16 -18
  119. package/src/element/substitution/frame.js +99 -42
  120. package/src/element/substitution/reference.js +120 -20
  121. package/src/element/substitution/statement.js +160 -89
  122. package/src/element/substitution/term.js +104 -63
  123. package/src/element/substitution.js +16 -58
  124. package/src/element/substitutions.js +43 -41
  125. package/src/element/term.js +37 -32
  126. package/src/element/topLevelAssertion/axiom.js +8 -6
  127. package/src/element/topLevelAssertion/conjecture.js +1 -2
  128. package/src/element/topLevelAssertion/lemma.js +2 -3
  129. package/src/element/topLevelAssertion/theorem.js +1 -1
  130. package/src/element/topLevelAssertion.js +31 -27
  131. package/src/element/topLevelMetaAssertion/metaLemma.js +1 -2
  132. package/src/element/topLevelMetaAssertion/metatheorem.js +1 -2
  133. package/src/element/topLevelMetaAssertion.js +15 -13
  134. package/src/element/variable.js +30 -31
  135. package/src/index.js +2 -1
  136. package/src/main.js +2 -1
  137. package/src/node/frame.js +1 -1
  138. package/src/node/metavariable.js +3 -3
  139. package/src/node/parameter.js +32 -5
  140. package/src/node/substitution/frame.js +6 -32
  141. package/src/node/substitution/reference.js +38 -0
  142. package/src/node/substitution/statement.js +6 -32
  143. package/src/node/substitution/term.js +6 -22
  144. package/src/nonTerminalNodeMap.js +3 -0
  145. package/src/process/instantiate.js +0 -8
  146. package/src/process/unify.js +4 -4
  147. package/src/tokenTypes.js +4 -0
  148. package/src/utilities/context.js +43 -17
  149. package/src/utilities/element.js +187 -401
  150. package/src/utilities/instance.js +3 -3
  151. package/src/utilities/string.js +21 -5
  152. package/src/utilities/unification.js +26 -23
  153. package/src/utilities/validation.js +47 -47
  154. package/lib/context/fragment.js +0 -77
  155. package/lib/context/transient.js +0 -371
  156. package/lib/log.js +0 -150
  157. package/lib/utilities/fragment.js +0 -23
  158. package/lib/utilities/node.js +0 -71
  159. package/src/log.js +0 -118
  160. package/src/utilities/fragment.js +0 -11
  161. package/src/utilities/node.js +0 -85
@@ -6,7 +6,7 @@ import { define } from "../../elements";
6
6
  import { termFromTermAndSubstitutions, frameFromFrameAndSubstitutions, statementFromStatementAndSubstitutions } from "../../utilities/substitutions";
7
7
 
8
8
  export default define(class ContainedAssertion extends Assertion {
9
- constructor(cpontext, string, node, term, frame, negated, statement) {
9
+ constructor(context, string, node, term, frame, negated, statement) {
10
10
  super(context, string, node);
11
11
 
12
12
  this.term = term;
@@ -31,46 +31,47 @@ export default define(class ContainedAssertion extends Assertion {
31
31
  return this.statement;
32
32
  }
33
33
 
34
- verify(assignments, stated, context) {
35
- let verifies = false;
34
+ validate(assignments, stated, context) {
35
+ let validates = false;
36
36
 
37
37
  const containedAssertionString = this.getString(); ///
38
38
 
39
- context.trace(`Verifying the '${containedAssertionString}' contained assertion...`);
39
+ context.trace(`Validating the '${containedAssertionString}' contained assertion...`);
40
40
 
41
41
  const termValidates = this.validateTerm(assignments, stated, context),
42
- frameVerifies = this.verifyFrame(assignments, stated, context),
42
+ frameVerifies = this.validateFrame(assignments, stated, context),
43
43
  statementValidates = this.validateStatement(assignments, stated, context)
44
44
 
45
45
  if (termValidates || frameVerifies || statementValidates) {
46
- let verifiesWhenStated = false,
47
- verifiesWhenDerived = false;
46
+ let validatesWhenStated = false,
47
+ validatesWhenDerived = false;
48
48
 
49
49
  if (stated) {
50
- verifiesWhenStated = this.verifyWhenStated(assignments, context);
50
+ validatesWhenStated = this.validateWhenStated(assignments, context);
51
51
  } else {
52
- verifiesWhenDerived = this.verifyWhenDerived(context);
52
+ validatesWhenDerived = this.validateWhenDerived(context);
53
53
  }
54
54
 
55
- if (verifiesWhenStated || verifiesWhenDerived) {
56
- verifies = true;
55
+ if (validatesWhenStated || validatesWhenDerived) {
56
+ validates = true;
57
57
  }
58
58
  }
59
59
 
60
- if (verifies) {
61
- context.debug(`...verified the '${containedAssertionString}' contained assertion.`);
60
+ if (validates) {
61
+ context.debug(`...validated the '${containedAssertionString}' contained assertion.`);
62
62
  }
63
63
 
64
- return verifies;
64
+ return validates;
65
65
  }
66
66
 
67
67
  validateTerm(assignments, stated, context) {
68
68
  let termValidates = false;
69
69
 
70
70
  if (this.term !== null) {
71
- const termString = this.term.getString();
71
+ const termString = this.term.getString(),
72
+ containedAssertionString = this.getString(); ///
72
73
 
73
- context.trace(`Validating the '${termString}' term...`);
74
+ context.trace(`Validating the '${containedAssertionString}' contained assertino's '${termString}' term...`);
74
75
 
75
76
  const termSingular = this.term.isSingular();
76
77
 
@@ -78,13 +79,13 @@ export default define(class ContainedAssertion extends Assertion {
78
79
  context.debug(`The '${termString}' term is not singular.`);
79
80
  } else {
80
81
  termValidates = this.term.validate(context, () => {
81
- const verifiesAhead = true;
82
+ const validatesAhead = true;
82
83
 
83
- return verifiesAhead;
84
+ return validatesAhead;
84
85
  });
85
86
 
86
87
  if (termValidates) {
87
- context.debug(`...validated the '${termString}' term.`);
88
+ context.debug(`...validated the '${containedAssertionString}' contained assertino's '${termString}' term.`);
88
89
  }
89
90
  }
90
91
  }
@@ -92,13 +93,14 @@ export default define(class ContainedAssertion extends Assertion {
92
93
  return termValidates;
93
94
  }
94
95
 
95
- verifyFrame(assignments, stated, context) {
96
+ validateFrame(assignments, stated, context) {
96
97
  let frameVerifies = false;
97
98
 
98
99
  if (this.frame !== null) {
99
- const frameString = this.frame.getString();
100
+ const frameString = this.frame.getString(),
101
+ containedAssertionString = this.getString(); ///
100
102
 
101
- context.trace(`Verifying the '${frameString}' frame...`);
103
+ context.trace(`Validating the '${containedAssertionString}' contained assertino's '${frameString}' frame...`);
102
104
 
103
105
  const frameSingular = this.frame.isSingular();
104
106
 
@@ -109,10 +111,10 @@ export default define(class ContainedAssertion extends Assertion {
109
111
 
110
112
  assignments = null; ///
111
113
 
112
- frameVerifies = this.frame.verify(assignments, stated, context);
114
+ frameVerifies = this.frame.validate(assignments, stated, context);
113
115
 
114
116
  if (frameVerifies) {
115
- context.debug(`...verified the '${frameString}' frame.`);
117
+ context.debug(`...validated the '${containedAssertionString}' contained assertino's '${frameString}' frame.`);
116
118
  }
117
119
  }
118
120
  }
@@ -142,39 +144,39 @@ export default define(class ContainedAssertion extends Assertion {
142
144
  return statementValidates;
143
145
  }
144
146
 
145
- verifyWhenStated(assignments, context) {
146
- let verifiesWhenStated;
147
+ validateWhenStated(assignments, context) {
148
+ let validatesWhenStated;
147
149
 
148
150
  const containedAssertionString = this.getString(); ///
149
151
 
150
- context.trace(`Verifying the '${containedAssertionString}' stated contained assertion...`);
152
+ context.trace(`Validating the '${containedAssertionString}' stated contained assertion...`);
151
153
 
152
- verifiesWhenStated = true;
154
+ validatesWhenStated = true;
153
155
 
154
- if (verifiesWhenStated) {
155
- context.debug(`...verified the '${containedAssertionString}' stated contained assertion.`);
156
+ if (validatesWhenStated) {
157
+ context.debug(`...validated the '${containedAssertionString}' stated contained assertion.`);
156
158
  }
157
159
 
158
- return verifiesWhenStated;
160
+ return validatesWhenStated;
159
161
  }
160
162
 
161
- verifyWhenDerived(context) {
162
- let verifiesWhenDerived;
163
+ validateWhenDerived(context) {
164
+ let validatesWhenDerived;
163
165
 
164
166
  const containedAssertionString = this.getString(); ///
165
167
 
166
- context.trace(`Verifying the '${containedAssertionString}' derived contained assertion...`);
168
+ context.trace(`Validating the '${containedAssertionString}' derived contained assertion...`);
167
169
 
168
170
  const generalCotnext = null,
169
171
  specificContext = context; ///
170
172
 
171
- verifiesWhenDerived = verifyWhenDerived(this.term, this.frame, this.statement, this.negated, generalCotnext, specificContext);
173
+ validatesWhenDerived = validateWhenDerived(this.term, this.frame, this.statement, this.negated, generalCotnext, specificContext);
172
174
 
173
- if (verifiesWhenDerived) {
174
- context.debug(`...verified the '${containedAssertionString}' derived contained assertion.`);
175
+ if (validatesWhenDerived) {
176
+ context.debug(`...validated the '${containedAssertionString}' derived contained assertion.`);
175
177
  }
176
178
 
177
- return verifiesWhenDerived;
179
+ return validatesWhenDerived;
178
180
  }
179
181
 
180
182
  unifyIndependently(substitutions, generalContext, specificContext) {
@@ -188,9 +190,9 @@ export default define(class ContainedAssertion extends Assertion {
188
190
  const term = termFromTermAndSubstitutions(this.term, substitutions, generalContext, specificContext),
189
191
  frame = frameFromFrameAndSubstitutions(this.frame, substitutions, generalContext, specificContext),
190
192
  statement = statementFromStatementAndSubstitutions(this.statement, substitutions, generalContext, specificContext),
191
- verifiesWhenDerived = verifyWhenDerived(term, frame, statement, this.negated, generalContext, specificContext);
193
+ validatesWhenDerived = validateWhenDerived(term, frame, statement, this.negated, generalContext, specificContext);
192
194
 
193
- unifiesIndependently = verifiesWhenDerived; ///
195
+ unifiesIndependently = validatesWhenDerived; ///
194
196
 
195
197
  if (unifiesIndependently) {
196
198
  context.debug(`...unified the '${containedAssertionString}' contained assertion independently.`);
@@ -202,8 +204,8 @@ export default define(class ContainedAssertion extends Assertion {
202
204
  static name = "ContainedAssertion";
203
205
  });
204
206
 
205
- function verifyWhenDerived(term, frame, statement, negated, generalContext, specificContext) {
206
- let verifiesWhenDerived = false;
207
+ function validateWhenDerived(term, frame, statement, negated, generalContext, specificContext) {
208
+ let validatesWhenDerived = false;
207
209
 
208
210
  const context = specificContext; ///
209
211
 
@@ -212,11 +214,11 @@ function verifyWhenDerived(term, frame, statement, negated, generalContext, spec
212
214
  const termContained = statement.isTermContained(term, context);
213
215
 
214
216
  if (!negated && termContained) {
215
- verifiesWhenDerived = true;
217
+ validatesWhenDerived = true;
216
218
  }
217
219
 
218
220
  if (negated && !termContained) {
219
- verifiesWhenDerived = true;
221
+ validatesWhenDerived = true;
220
222
  }
221
223
  }
222
224
 
@@ -224,14 +226,14 @@ function verifyWhenDerived(term, frame, statement, negated, generalContext, spec
224
226
  const frameContained = statement.isFrameContained(frame, context);
225
227
 
226
228
  if (!negated && frameContained) {
227
- verifiesWhenDerived = true;
229
+ validatesWhenDerived = true;
228
230
  }
229
231
 
230
232
  if (negated && !frameContained) {
231
- verifiesWhenDerived = true;
233
+ validatesWhenDerived = true;
232
234
  }
233
235
  }
234
236
  }
235
237
 
236
- return verifiesWhenDerived;
238
+ return validatesWhenDerived;
237
239
  }
@@ -27,45 +27,46 @@ export default define(class DefinedAssertion extends Assertion {
27
27
  return this.negated;
28
28
  }
29
29
 
30
- verify(assignments, stated, context) {
31
- let verifies = false;
30
+ validate(assignments, stated, context) {
31
+ let validated = false;
32
32
 
33
33
  const definedAssertionString = this.getString(); ///
34
34
 
35
- context.trace(`Verifying the '${definedAssertionString}' defined assertion...`);
35
+ context.trace(`Validating the '${definedAssertionString}' defined assertion...`);
36
36
 
37
37
  const termValidates = this.validateTerm(assignments, stated, context),
38
- frameVerifies = this.verifyFrame(assignments, stated, context);
38
+ frameVerifies = this.validateFrame(assignments, stated, context);
39
39
 
40
40
  if (termValidates || frameVerifies) {
41
41
  let verifiesWhenStated = false,
42
42
  verifiesWhenDerived = false;
43
43
 
44
44
  if (stated) {
45
- verifiesWhenStated = this.verifyWhenStated(assignments, context);
45
+ verifiesWhenStated = this.validateWhenStated(assignments, context);
46
46
  } else {
47
- verifiesWhenDerived = this.verifyWhenDerived(context);
47
+ verifiesWhenDerived = this.validateWhenDerived(context);
48
48
  }
49
49
 
50
50
  if (verifiesWhenStated || verifiesWhenDerived) {
51
- verifies = true;
51
+ validated = true;
52
52
  }
53
53
  }
54
54
 
55
- if (verifies) {
56
- context.debug(`...verified the '${definedAssertionString}' defined assertion.`);
55
+ if (validated) {
56
+ context.debug(`...validated the '${definedAssertionString}' defined assertion.`);
57
57
  }
58
58
 
59
- return verifies;
59
+ return validated;
60
60
  }
61
61
 
62
62
  validateTerm(assignments, stated, context) {
63
63
  let termValidates = false;
64
64
 
65
65
  if (this.term !== null) {
66
- const termString = this.term.getString(); ///
66
+ const termString = this.term.getString(), ///
67
+ definedAssertionString = this.getString(); ///
67
68
 
68
- context.trace(`Validating the '${termString}' term...`);
69
+ context.trace(`Validating the '${definedAssertionString}' defined assertino's '${termString}' term...`);
69
70
 
70
71
  const termSingular = this.term.isSingular();
71
72
 
@@ -79,7 +80,7 @@ export default define(class DefinedAssertion extends Assertion {
79
80
  });
80
81
 
81
82
  if (termValidates) {
82
- context.debug(`...validated the '${termString}' term.`);
83
+ context.debug(`...validated the'${definedAssertionString}' defined assertino's '${termString}' term.`);
83
84
  }
84
85
  }
85
86
  }
@@ -87,13 +88,14 @@ export default define(class DefinedAssertion extends Assertion {
87
88
  return termValidates;
88
89
  }
89
90
 
90
- verifyFrame(assignments, stated, context) {
91
+ validateFrame(assignments, stated, context) {
91
92
  let frameVerifies = false;
92
93
 
93
94
  if (this.frame !== null) {
94
- const frameString = this.frame.getString(); ///
95
+ const frameString = this.frame.getString(), ///
96
+ definedAssertionString = this.getString(); ///
95
97
 
96
- context.trace(`Verifying the '${frameString}' frame...`);
98
+ context.trace(`Validating the'${definedAssertionString}' defined assertino's '${frameString}' frame...`);
97
99
 
98
100
  const frameSingular = this.frame.isSingular();
99
101
 
@@ -104,10 +106,10 @@ export default define(class DefinedAssertion extends Assertion {
104
106
 
105
107
  assignments = null; ///
106
108
 
107
- frameVerifies = this.frame.verify(assignments, stated, context);
109
+ frameVerifies = this.frame.validate(assignments, stated, context);
108
110
 
109
111
  if (frameVerifies) {
110
- context.debug(`...verified the '${frameString}' frame.`);
112
+ context.debug(`...validated the'${definedAssertionString}' defined assertino's '${frameString}' frame.`);
111
113
  }
112
114
  }
113
115
  }
@@ -115,36 +117,36 @@ export default define(class DefinedAssertion extends Assertion {
115
117
  return frameVerifies;
116
118
  }
117
119
 
118
- verifyWhenStated(assignments, context) {
120
+ validateWhenStated(assignments, context) {
119
121
  let verifiesWhenStated;
120
122
 
121
123
  const definedAssertionString = this.getString(); ///
122
124
 
123
- context.trace(`Verifying the '${definedAssertionString}' stated defined assertion...`);
125
+ context.trace(`Validating the '${definedAssertionString}' stated defined assertion...`);
124
126
 
125
127
  verifiesWhenStated = true;
126
128
 
127
129
  if (verifiesWhenStated) {
128
- context.debug(`...verified the '${definedAssertionString}' stated defined assertion.`);
130
+ context.debug(`...validated the '${definedAssertionString}' stated defined assertion.`);
129
131
  }
130
132
 
131
133
  return verifiesWhenStated;
132
134
  }
133
135
 
134
- verifyWhenDerived(context) {
136
+ validateWhenDerived(context) {
135
137
  let verifiesWhenDerived;
136
138
 
137
139
  const definedAssertionString = this.getString(); ///
138
140
 
139
- context.trace(`Verifying the '${definedAssertionString}' derived defined assertion...`);
141
+ context.trace(`Validating the '${definedAssertionString}' derived defined assertion...`);
140
142
 
141
143
  const generalContext = null,
142
144
  specificContext = context; ///
143
145
 
144
- verifiesWhenDerived = verifyWhenDerived(this.term, this.frame, this.negated, generalContext, specificContext);
146
+ verifiesWhenDerived = validateWhenDerived(this.term, this.frame, this.negated, generalContext, specificContext);
145
147
 
146
148
  if (verifiesWhenDerived) {
147
- context.debug(`...verified the '${definedAssertionString}' derived defined assertion.`);
149
+ context.debug(`...validated the '${definedAssertionString}' derived defined assertion.`);
148
150
  }
149
151
 
150
152
  return verifiesWhenDerived;
@@ -160,7 +162,7 @@ export default define(class DefinedAssertion extends Assertion {
160
162
 
161
163
  const term = termFromTermAndSubstitutions(this.term, substitutions, generalContext, specificContext),
162
164
  frame = frameFromFrameAndSubstitutions(this.frame, substitutions, generalContext, specificContext),
163
- verifiesWhenDerived = verifyWhenDerived(term, frame, this.negated, generalContext, specificContext);
165
+ verifiesWhenDerived = validateWhenDerived(term, frame, this.negated, generalContext, specificContext);
164
166
 
165
167
  unifiesIndependently = verifiesWhenDerived; ///
166
168
 
@@ -174,7 +176,7 @@ export default define(class DefinedAssertion extends Assertion {
174
176
  static name = "DefinedAssertion";
175
177
  });
176
178
 
177
- function verifyWhenDerived(term, frame, negated, generalContext, specificContext) {
179
+ function validateWhenDerived(term, frame, negated, generalContext, specificContext) {
178
180
  let verifiesWhenDerived = false;
179
181
 
180
182
  const context = specificContext; ///
@@ -48,45 +48,45 @@ export default define(class PropertyAssertion extends Assertion {
48
48
  return comparesToTermAndPropertyRelation;
49
49
  }
50
50
 
51
- verify(assignments, stated, context) {
52
- let verifies = false;
51
+ validate(assignments, stated, context) {
52
+ let validates = false;
53
53
 
54
54
  const propertyAssertionString = this.getString(); ///
55
55
 
56
- context.trace(`Verifying the '${propertyAssertionString}' property assertion...`);
56
+ context.trace(`Validating the '${propertyAssertionString}' property assertion...`);
57
57
 
58
58
  const termValidates = this.validateTerm(assignments, stated, context);
59
59
 
60
60
  if (termValidates) {
61
- const propertyRelationVerifies = this.verifyPropertyRelation(assignments, stated, context);
61
+ const propertyRelationVerifies = this.validatePropertyRelation(assignments, stated, context);
62
62
 
63
63
  if (propertyRelationVerifies) {
64
- let verifiesWhenStated = false,
65
- verifiesWhenDerived = false;
64
+ let validatesWhenStated = false,
65
+ validatesWhenDerived = false;
66
66
 
67
67
  if (stated) {
68
- verifiesWhenStated = this.verifyWhenStated(assignments, context);
68
+ validatesWhenStated = this.validateWhenStated(assignments, context);
69
69
  } else {
70
- verifiesWhenDerived = this.verifyWhenDerived(context);
70
+ validatesWhenDerived = this.validateWhenDerived(context);
71
71
  }
72
72
 
73
- if (verifiesWhenStated || verifiesWhenDerived) {
74
- verifies = true;
73
+ if (validatesWhenStated || validatesWhenDerived) {
74
+ validates = true;
75
75
  }
76
76
  }
77
77
  }
78
78
 
79
- if (verifies) {
79
+ if (validates) {
80
80
  if (stated) {
81
81
  this.assign(assignments, context);
82
82
  }
83
83
  }
84
84
 
85
- if (verifies) {
86
- context.debug(`...verified the '${propertyAssertionString}' property assertion.`);
85
+ if (validates) {
86
+ context.debug(`...validated the '${propertyAssertionString}' property assertion.`);
87
87
  }
88
88
 
89
- return verifies;
89
+ return validates;
90
90
  }
91
91
 
92
92
  validateTerm(assignments, stated, context) {
@@ -96,10 +96,10 @@ export default define(class PropertyAssertion extends Assertion {
96
96
 
97
97
  context.trace(`Validating the '${termString}' term...`);
98
98
 
99
- termValidates = this.term.verify(context, () => {
100
- const verifiesAhead = true;
99
+ termValidates = this.term.validate(context, () => {
100
+ const validatesAhead = true;
101
101
 
102
- return verifiesAhead;
102
+ return validatesAhead;
103
103
  });
104
104
 
105
105
  if (termValidates) {
@@ -109,52 +109,52 @@ export default define(class PropertyAssertion extends Assertion {
109
109
  return termValidates;
110
110
  }
111
111
 
112
- verifyPropertyRelation(assignments, stated, context) {
112
+ validatePropertyRelation(assignments, stated, context) {
113
113
  let propertyRelationVerifies;
114
114
 
115
115
  const propertyRelationString = this.propertyRelation.getString();
116
116
 
117
- context.trace(`Verifying the '${propertyRelationString}' property relation...`);
117
+ context.trace(`Validating the '${propertyRelationString}' property relation...`);
118
118
 
119
- propertyRelationVerifies = this.propertyRelation.verify(context);
119
+ propertyRelationVerifies = this.propertyRelation.validate(context);
120
120
 
121
121
  if (propertyRelationVerifies) {
122
- context.debug(`...verified the '${propertyRelationString}' property relation.`);
122
+ context.debug(`...validated the '${propertyRelationString}' property relation.`);
123
123
  }
124
124
 
125
125
  return propertyRelationVerifies;
126
126
  }
127
127
 
128
- verifyWhenStated(assignments, context) {
129
- let verifiesWhenStated;
128
+ validateWhenStated(assignments, context) {
129
+ let validatesWhenStated;
130
130
 
131
131
  const propertyAssertionString = this.getString(); ///
132
132
 
133
- context.trace(`Verifying the '${propertyAssertionString}' stated property assertion...`);
133
+ context.trace(`Validating the '${propertyAssertionString}' stated property assertion...`);
134
134
 
135
- verifiesWhenStated = true;
135
+ validatesWhenStated = true;
136
136
 
137
- if (verifiesWhenStated) {
138
- context.debug(`...verified the '${propertyAssertionString}' stated property assertion.`);
137
+ if (validatesWhenStated) {
138
+ context.debug(`...validated the '${propertyAssertionString}' stated property assertion.`);
139
139
  }
140
140
 
141
- return verifiesWhenStated;
141
+ return validatesWhenStated;
142
142
  }
143
143
 
144
- verifyWhenDerived(context) {
145
- let verifiesWhenDerived;
144
+ validateWhenDerived(context) {
145
+ let validatesWhenDerived;
146
146
 
147
147
  const propertyAssertionString = this.getString(); ///
148
148
 
149
- context.trace(`Verifying the '${propertyAssertionString}' derived property assertion...`);
149
+ context.trace(`Validating the '${propertyAssertionString}' derived property assertion...`);
150
150
 
151
- verifiesWhenDerived = true;
151
+ validatesWhenDerived = true;
152
152
 
153
- if (verifiesWhenDerived) {
154
- context.debug(`...verified the '${propertyAssertionString}' derived property assertion.`);
153
+ if (validatesWhenDerived) {
154
+ context.debug(`...validated the '${propertyAssertionString}' derived property assertion.`);
155
155
  }
156
156
 
157
- return verifiesWhenDerived;
157
+ return validatesWhenDerived;
158
158
  }
159
159
 
160
160
  assign(assignments, context) {
@@ -25,40 +25,41 @@ export default define(class SatisfiesAssertion extends Assertion {
25
25
 
26
26
  correlateSubstitutions(substitutions, context) { return this.signature.correlateSubstitutions(substitutions, context); }
27
27
 
28
- verify(assignments, stated, context) {
29
- let verifies = false;
28
+ validate(assignments, stated, context) {
29
+ let validates = false;
30
30
 
31
31
  const satisfiesAssertionString = this.getString(); ///
32
32
 
33
- context.trace(`Verifying the '${satisfiesAssertionString}' satisfies assertion...`);
33
+ context.trace(`Validating the '${satisfiesAssertionString}' satisfies assertion...`);
34
34
 
35
- const signatureVerifies = this.verifySignature(assignments, stated, context);
35
+ const signatureVerifies = this.validateSignature(assignments, stated, context);
36
36
 
37
37
  if (signatureVerifies) {
38
- const referenceVerifies = this.verifyReference(assignments, stated, context);
38
+ const referenceVerifies = this.validateReference(assignments, stated, context);
39
39
 
40
- verifies = referenceVerifies; ///
40
+ validates = referenceVerifies; ///
41
41
  }
42
42
 
43
- if (verifies) {
44
- context.debug(`...verified the '${satisfiesAssertionString}' satisfies assertion.`);
43
+ if (validates) {
44
+ context.debug(`...validated the '${satisfiesAssertionString}' satisfies assertion.`);
45
45
  }
46
46
 
47
- return verifies;
47
+ return validates;
48
48
  }
49
49
 
50
- verifySignature(assignments, stated, context) {
51
- const signatureVerifies = this.signature.verify(context);
50
+ validateSignature(assignments, stated, context) {
51
+ const signatureVerifies = this.signature.validate(context);
52
52
 
53
53
  return signatureVerifies;
54
54
  }
55
55
 
56
- verifyReference(assignments, stated, context) {
56
+ validateReference(assignments, stated, context) {
57
57
  let referenceVerifies = false;
58
58
 
59
- const referenceString = this.reference.getString();
59
+ const referenceString = this.reference.getString(),
60
+ satisfiesAssertionString = this.getString(); ///
60
61
 
61
- context.trace(`Verifying the '${referenceString}' reference...`);
62
+ context.trace(`Validating the '${satisfiesAssertionString}' satisfies assertino's '${referenceString}' reference...`);
62
63
 
63
64
  const axiom = context.findAxiomByReference(this.reference, context);
64
65
 
@@ -71,7 +72,7 @@ export default define(class SatisfiesAssertion extends Assertion {
71
72
  }
72
73
 
73
74
  if (referenceVerifies) {
74
- context.debug(`...verified the '${referenceString}' reference.`);
75
+ context.debug(`...validated the '${satisfiesAssertionString}' satisfies assertino's '${referenceString}' reference.`);
75
76
  }
76
77
 
77
78
  return referenceVerifies;
@@ -85,7 +86,7 @@ export default define(class SatisfiesAssertion extends Assertion {
85
86
 
86
87
  context.trace(`Unifying the '${statementString}' statement with the '${satisfiesAssertionString}' satisfies assertion...`);
87
88
 
88
- this.signature.verify(context);
89
+ this.signature.validate(context);
89
90
 
90
91
  const axiom = context.findAxiomByReference(this.reference),
91
92
  satisfiable = axiom.isSatisfiable();
@@ -95,14 +96,14 @@ export default define(class SatisfiesAssertion extends Assertion {
95
96
 
96
97
  const { Substitutions } = elements;
97
98
 
98
- substitutions = Substitutions.fromNothing();
99
+ substitutions = Substitutions.fromNothing(context);
99
100
 
100
101
  const axiomComparesToSignature = axiom.compareSignature(this.signature, substitutions, context);
101
102
 
102
103
  if (axiomComparesToSignature) {
103
104
  const substitutionsB = substitutions; ///
104
105
 
105
- substitutions = Substitutions.fromNothing();
106
+ substitutions = Substitutions.fromNothing(context);
106
107
 
107
108
  statementUnifies = axiom.unifyStatementAndStepsOrSubproofs(statement, stepsOrSubproofs, substitutions, context);
108
109
 
@@ -140,20 +140,14 @@ export default define(class Assumption extends Element {
140
140
  }
141
141
 
142
142
  validateReferenceAsMetavariable(assignments, stated, context) {
143
- let referenceValidatesAsMetavariable = false;
143
+ let referenceValidatesAsMetavariable;
144
144
 
145
145
  const referenceString = this.reference.getString(),
146
146
  assumptionString = this.getString(); ///
147
147
 
148
148
  context.trace(`Validating the '${assumptionString}' assumption's '${referenceString}' reference as s metavariable...`);
149
149
 
150
- const metavariable = this.reference.getMetavariable(),
151
- metavariableName = metavariable.getName(),
152
- metavariablePresent = context.isMetavariablePresentByMetavariableName(metavariableName);
153
-
154
- if (metavariablePresent) {
155
- referenceValidatesAsMetavariable = true;
156
- }
150
+ referenceValidatesAsMetavariable = this.reference.validateAsMetavariable(context);
157
151
 
158
152
  if (referenceValidatesAsMetavariable) {
159
153
  context.debug(`...validated the '${assumptionString}' assumption's '${referenceString}' reference as a metavariable.`);
@@ -273,13 +267,13 @@ export default define(class Assumption extends Element {
273
267
 
274
268
  const { Substitutions } = elements,
275
269
  specificContext = context, ///
276
- labelSubstitutions = Substitutions.fromNothing(),
270
+ labelSubstitutions = Substitutions.fromNothing(context),
277
271
  label = topLevelMetaAssertion.getLabel(),
278
272
  substitutions = labelSubstitutions, ///
279
273
  labelUnifies = this.unifyLabel(label, substitutions, generalContext, specificContext);
280
274
 
281
275
  if (labelUnifies) {
282
- const statementSubstitutions = Substitutions.fromNothing(),
276
+ const statementSubstitutions = Substitutions.fromNothing(context),
283
277
  statement = topLevelMetaAssertion.getStatement(),
284
278
  substitutions = statementSubstitutions, ///
285
279
  statementUUnifies = this.unifyStatement(statement, substitutions, generalContext, specificContext);