occam-verify-cli 1.0.220 → 1.0.224

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/context/file.js +19 -19
  2. package/lib/context/local.js +5 -43
  3. package/lib/context/release.js +11 -11
  4. package/lib/dom/assertion/contained.js +44 -44
  5. package/lib/dom/assertion/defined.js +40 -40
  6. package/lib/dom/assertion/property.js +37 -35
  7. package/lib/dom/assertion/satisfies.js +26 -25
  8. package/lib/dom/assertion/subproof.js +16 -16
  9. package/lib/dom/assertion/type.js +34 -32
  10. package/lib/dom/axiom.js +52 -52
  11. package/lib/dom/combinator/bracketed.js +5 -5
  12. package/lib/dom/combinator.js +6 -6
  13. package/lib/dom/conclusion.js +10 -10
  14. package/lib/dom/conjecture.js +5 -5
  15. package/lib/dom/constructor/bracketed.js +12 -12
  16. package/lib/dom/constructor.js +9 -9
  17. package/lib/dom/declaration/combinator.js +11 -11
  18. package/lib/dom/declaration/complexType.js +133 -63
  19. package/lib/dom/declaration/constructor.js +17 -17
  20. package/lib/dom/declaration/metavariable.js +17 -17
  21. package/lib/dom/declaration/simpleType.js +229 -0
  22. package/lib/dom/declaration/variable.js +17 -17
  23. package/lib/dom/declaration.js +54 -52
  24. package/lib/dom/deduction.js +15 -15
  25. package/lib/dom/derivation.js +8 -8
  26. package/lib/dom/equality.js +49 -34
  27. package/lib/dom/error.js +3 -3
  28. package/lib/dom/frame.js +38 -38
  29. package/lib/dom/judgement.js +31 -29
  30. package/lib/dom/label.js +5 -5
  31. package/lib/dom/lemma.js +5 -5
  32. package/lib/dom/metaLemma.js +5 -5
  33. package/lib/dom/metatheorem.js +5 -5
  34. package/lib/dom/metavariable.js +55 -55
  35. package/lib/dom/premise.js +36 -34
  36. package/lib/dom/procedureCall.js +9 -9
  37. package/lib/dom/proof.js +6 -6
  38. package/lib/dom/propertyRelation.js +18 -18
  39. package/lib/dom/reference.js +28 -28
  40. package/lib/dom/rule.js +63 -48
  41. package/lib/dom/signature.js +17 -17
  42. package/lib/dom/statement.js +36 -36
  43. package/lib/dom/step.js +32 -35
  44. package/lib/dom/subDerivation.js +8 -8
  45. package/lib/dom/subproof.js +27 -30
  46. package/lib/dom/substitution/statement.js +7 -7
  47. package/lib/dom/substitution/term.js +2 -16
  48. package/lib/dom/substitution.js +1 -15
  49. package/lib/dom/supposition.js +39 -39
  50. package/lib/dom/term.js +15 -15
  51. package/lib/dom/theorem.js +5 -5
  52. package/lib/dom/topLevelAssertion.js +60 -71
  53. package/lib/dom/topLevelMetaAssertion.js +28 -20
  54. package/lib/dom/type.js +18 -24
  55. package/lib/dom/variable.js +16 -16
  56. package/lib/equivalence.js +54 -33
  57. package/lib/equivalences.js +57 -101
  58. package/lib/index.js +2 -2
  59. package/lib/mixins/statement/verify.js +52 -52
  60. package/lib/mixins/step/unify.js +79 -61
  61. package/lib/mixins/term/verify.js +17 -17
  62. package/lib/substitutions.js +7 -7
  63. package/lib/unifier/equantional.js +170 -0
  64. package/lib/unifier/intrinsicLevel.js +8 -8
  65. package/lib/unifier/metaLevel.js +21 -21
  66. package/lib/unifier/metavariable.js +9 -9
  67. package/lib/unifier/statementWithCombinator.js +18 -18
  68. package/lib/unifier/termWithConstructor.js +10 -10
  69. package/lib/unifier.js +41 -41
  70. package/lib/utilities/brackets.js +2 -2
  71. package/lib/utilities/release.js +18 -17
  72. package/lib/utilities/subproof.js +2 -2
  73. package/lib/utilities/type.js +2 -2
  74. package/lib/utilities/unification.js +28 -34
  75. package/lib/verifier/combinator.js +14 -14
  76. package/lib/verifier/constructor.js +18 -18
  77. package/lib/verifier/topLevel.js +38 -38
  78. package/lib/verifier.js +30 -30
  79. package/package.json +1 -1
  80. package/src/context/file.js +18 -18
  81. package/src/context/local.js +5 -48
  82. package/src/context/release.js +11 -11
  83. package/src/dom/assertion/contained.js +46 -46
  84. package/src/dom/assertion/defined.js +41 -41
  85. package/src/dom/assertion/property.js +37 -35
  86. package/src/dom/assertion/satisfies.js +26 -25
  87. package/src/dom/assertion/subproof.js +15 -15
  88. package/src/dom/assertion/type.js +34 -32
  89. package/src/dom/axiom.js +56 -54
  90. package/src/dom/combinator/bracketed.js +4 -4
  91. package/src/dom/combinator.js +5 -5
  92. package/src/dom/conclusion.js +9 -9
  93. package/src/dom/conjecture.js +4 -4
  94. package/src/dom/constructor/bracketed.js +11 -11
  95. package/src/dom/constructor.js +8 -8
  96. package/src/dom/declaration/combinator.js +10 -10
  97. package/src/dom/declaration/complexType.js +129 -64
  98. package/src/dom/declaration/constructor.js +16 -16
  99. package/src/dom/declaration/metavariable.js +16 -16
  100. package/src/dom/declaration/simpleType.js +179 -0
  101. package/src/dom/declaration/variable.js +16 -16
  102. package/src/dom/declaration.js +54 -52
  103. package/src/dom/deduction.js +14 -14
  104. package/src/dom/derivation.js +7 -7
  105. package/src/dom/equality.js +55 -38
  106. package/src/dom/error.js +2 -2
  107. package/src/dom/frame.js +38 -38
  108. package/src/dom/judgement.js +31 -29
  109. package/src/dom/label.js +4 -4
  110. package/src/dom/lemma.js +4 -4
  111. package/src/dom/metaLemma.js +4 -4
  112. package/src/dom/metatheorem.js +4 -4
  113. package/src/dom/metavariable.js +54 -54
  114. package/src/dom/premise.js +35 -33
  115. package/src/dom/procedureCall.js +8 -8
  116. package/src/dom/proof.js +5 -5
  117. package/src/dom/propertyRelation.js +17 -17
  118. package/src/dom/reference.js +27 -27
  119. package/src/dom/rule.js +72 -49
  120. package/src/dom/signature.js +15 -15
  121. package/src/dom/statement.js +34 -34
  122. package/src/dom/step.js +42 -48
  123. package/src/dom/subDerivation.js +7 -7
  124. package/src/dom/subproof.js +30 -40
  125. package/src/dom/substitution/statement.js +6 -6
  126. package/src/dom/substitution/term.js +1 -19
  127. package/src/dom/substitution.js +0 -13
  128. package/src/dom/supposition.js +38 -38
  129. package/src/dom/term.js +14 -14
  130. package/src/dom/theorem.js +4 -4
  131. package/src/dom/topLevelAssertion.js +62 -81
  132. package/src/dom/topLevelMetaAssertion.js +35 -20
  133. package/src/dom/type.js +23 -33
  134. package/src/dom/variable.js +16 -15
  135. package/src/equivalence.js +69 -46
  136. package/src/equivalences.js +53 -115
  137. package/src/index.js +1 -1
  138. package/src/mixins/statement/verify.js +51 -51
  139. package/src/mixins/step/unify.js +88 -67
  140. package/src/mixins/term/verify.js +16 -16
  141. package/src/substitutions.js +5 -6
  142. package/src/unifier/equantional.js +90 -0
  143. package/src/unifier/intrinsicLevel.js +7 -7
  144. package/src/unifier/metaLevel.js +20 -21
  145. package/src/unifier/metavariable.js +8 -8
  146. package/src/unifier/statementWithCombinator.js +17 -17
  147. package/src/unifier/termWithConstructor.js +9 -9
  148. package/src/unifier.js +40 -40
  149. package/src/utilities/brackets.js +1 -1
  150. package/src/utilities/release.js +18 -18
  151. package/src/utilities/subproof.js +1 -1
  152. package/src/utilities/type.js +1 -1
  153. package/src/utilities/unification.js +27 -37
  154. package/src/verifier/combinator.js +13 -13
  155. package/src/verifier/constructor.js +17 -17
  156. package/src/verifier/topLevel.js +41 -41
  157. package/src/verifier.js +29 -29
  158. package/lib/dom/declaration/type.js +0 -209
  159. package/lib/unifier/equality.js +0 -155
  160. package/src/dom/declaration/type.js +0 -150
  161. package/src/unifier/equality.js +0 -70
@@ -44,45 +44,45 @@ export default domAssigned(class Reference {
44
44
  matchMetavariableName(metavariableName) { return this.metavariable.matchMetavariableName(metavariableName); }
45
45
 
46
46
  verify(context) {
47
- let verified = false;
47
+ let verifies = false;
48
48
 
49
49
  const referenceString = this.getString(); ///
50
50
 
51
51
  context.trace(`Verifying the '${referenceString}' reference...`);
52
52
 
53
- if (!verified) {
54
- const metavariableVerified = this.verifyMetavariable(context);
53
+ if (!verifies) {
54
+ const metavariableVerifies = this.verifyMetavariable(context);
55
55
 
56
- verified = metavariableVerified; ///
56
+ verifies = metavariableVerifies; ///
57
57
  }
58
58
 
59
- if (!verified) {
59
+ if (!verifies) {
60
60
  const reference = this, ///
61
61
  labelPresent = context.isLabelPresentByReference(reference);
62
62
 
63
- verified = labelPresent; ///
63
+ verifies = labelPresent; ///
64
64
  }
65
65
 
66
- if (verified) {
66
+ if (verifies) {
67
67
  context.debug(`...verified the '${referenceString}' reference.`);
68
68
  }
69
69
 
70
- return verified;
70
+ return verifies;
71
71
  }
72
72
 
73
73
  verifyMetavariable(context) {
74
- let metavariableVerified;
74
+ let metavariableVerifies;
75
75
 
76
76
  const metaType = referenceMetaType, ///
77
- metavariableVerifiedGivenMetaType = this.metavariable.verifyGivenMetaType(metaType, context);
77
+ metavariableVerifiesGivenMetaType = this.metavariable.verifyGivenMetaType(metaType, context);
78
78
 
79
- metavariableVerified = metavariableVerifiedGivenMetaType; ///
79
+ metavariableVerifies = metavariableVerifiesGivenMetaType; ///
80
80
 
81
- return metavariableVerified;
81
+ return metavariableVerifies;
82
82
  }
83
83
 
84
84
  unifyLabel(label, substitutions, context) {
85
- let labelUnified;
85
+ let labelUnifies;
86
86
 
87
87
  const reference = this, ///
88
88
  labelString = label.getString(),
@@ -96,19 +96,19 @@ export default domAssigned(class Reference {
96
96
  labelMetavariable = label.getMetavariable(),
97
97
  generalMetavariable = this.metavariable, ///
98
98
  specificMetavariable = labelMetavariable, ///
99
- metavariableUnifiedIntrinsically = unifyMetavariableIntrinsically(generalMetavariable, specificMetavariable, substitutions, generalContext, specificContext);
99
+ metavariableUnifiesIntrinsically = unifyMetavariableIntrinsically(generalMetavariable, specificMetavariable, substitutions, generalContext, specificContext);
100
100
 
101
- labelUnified = metavariableUnifiedIntrinsically; ///
101
+ labelUnifies = metavariableUnifiesIntrinsically; ///
102
102
 
103
- if (labelUnified) {
103
+ if (labelUnifies) {
104
104
  context.debug(`...unified the '${labelString}' label with the '${referenceString}' reference.`);
105
105
  }
106
106
 
107
- return labelUnified;
107
+ return labelUnifies;
108
108
  }
109
109
 
110
110
  unifyMetavariable(metavariable, context) {
111
- let metavariableUnified;
111
+ let metavariableUnifies;
112
112
 
113
113
  const reference = this, ///
114
114
  metavariableString = metavariable.getString(),
@@ -122,19 +122,19 @@ export default domAssigned(class Reference {
122
122
  specificContext = fileContext, ///
123
123
  generalMetavariable = this.metavariable, ///
124
124
  specificMetavariable = metavariable, ///
125
- metavariableUnifiedIntrinsically = unifyMetavariableIntrinsically(generalMetavariable, specificMetavariable, substitutions, generalContext, specificContext);
125
+ metavariableUnifiesIntrinsically = unifyMetavariableIntrinsically(generalMetavariable, specificMetavariable, substitutions, generalContext, specificContext);
126
126
 
127
- metavariableUnified = metavariableUnifiedIntrinsically; ///
127
+ metavariableUnifies = metavariableUnifiesIntrinsically; ///
128
128
 
129
- if (metavariableUnified) {
129
+ if (metavariableUnifies) {
130
130
  context.debug(`...unified the '${metavariableString}' metavariable with the '${referenceString}' reference.`);
131
131
  }
132
132
 
133
- return metavariableUnified;
133
+ return metavariableUnifies;
134
134
  }
135
135
 
136
136
  unifyMetaLemmaMetatheorem(metaLemmaMetatheorem, context) {
137
- let metaLemmaMetatheoremUnified;
137
+ let metaLemmaMetatheoremUnifies;
138
138
 
139
139
  const reference = this, ///
140
140
  referenceString = reference.getString(),
@@ -144,15 +144,15 @@ export default domAssigned(class Reference {
144
144
 
145
145
  const label = metaLemmaMetatheorem.getLabel(),
146
146
  substitutions = Substitutions.fromNothing(),
147
- labelUnified = this.unifyLabel(label, substitutions, context);
147
+ labelUnifies = this.unifyLabel(label, substitutions, context);
148
148
 
149
- metaLemmaMetatheoremUnified = labelUnified; ///
149
+ metaLemmaMetatheoremUnifies = labelUnifies; ///
150
150
 
151
- if (metaLemmaMetatheoremUnified) {
151
+ if (metaLemmaMetatheoremUnifies) {
152
152
  context.trace(`...unified the '${metaLemmaMetatheoremString}' meta-lemma or metatheorem with the '${referenceString}' reference.`);
153
153
  }
154
154
 
155
- return metaLemmaMetatheoremUnified;
155
+ return metaLemmaMetatheoremUnifies;
156
156
  }
157
157
 
158
158
  toJSON() {
package/src/dom/rule.js CHANGED
@@ -64,137 +64,145 @@ export default domAssigned(class Rule {
64
64
  }
65
65
 
66
66
  unifyStatementAndStepsOrSubproofs(statement, stepsOrSubproofs, context) {
67
- let statementAndStepsOrSubproofsUnified = false;
67
+ let statementAndStepsOrSubproofsUnify = false;
68
68
 
69
69
  const localContext = LocalContext.fromFileContext(this.fileContext),
70
70
  generalContext = localContext, ///
71
71
  specificContext = context; ///
72
72
 
73
73
  const substitutions = Substitutions.fromNothing(),
74
- statementUnifiedWithConclusion = this.unifyStatementWithConclusion(statement, substitutions, generalContext, specificContext);
74
+ statementUnifiesWithConclusion = this.unifyStatementWithConclusion(statement, substitutions, generalContext, specificContext);
75
75
 
76
- if (statementUnifiedWithConclusion) {
77
- const stepsOrSubproofsUnifiedWithPremises = this.unifyStepsOrSubproofsWithPremises(stepsOrSubproofs, substitutions, generalContext, specificContext);
76
+ if (statementUnifiesWithConclusion) {
77
+ const stepsOrSubproofsUnifyWithPremises = this.unifyStepsOrSubproofsWithPremises(stepsOrSubproofs, substitutions, generalContext, specificContext);
78
78
 
79
- if (stepsOrSubproofsUnifiedWithPremises) {
79
+ if (stepsOrSubproofsUnifyWithPremises) {
80
80
  const substitutionsResolved = substitutions.areResolved();
81
81
 
82
- statementAndStepsOrSubproofsUnified = substitutionsResolved; ///
82
+ if (substitutionsResolved) {
83
+ statementAndStepsOrSubproofsUnify = true;
84
+ }
83
85
  }
84
86
  }
85
87
 
86
- return statementAndStepsOrSubproofsUnified;
88
+ return statementAndStepsOrSubproofsUnify;
87
89
  }
88
90
 
89
91
  unifyStatementWithConclusion(statement, substitutions, generalContext, specificContext) {
90
- let statementUnifiedWithConclusion;
92
+ let statementUnifiesWithConclusion = false;
91
93
 
92
- const statementUnified = this.conclusion.unifyStatement(statement, substitutions, generalContext, specificContext);
94
+ const statementUnifies = this.conclusion.unifyStatement(statement, substitutions, generalContext, specificContext);
93
95
 
94
- statementUnifiedWithConclusion = statementUnified; ///
96
+ if (statementUnifies) {
97
+ statementUnifiesWithConclusion = true;
98
+ }
95
99
 
96
- return statementUnifiedWithConclusion;
100
+ return statementUnifiesWithConclusion;
97
101
  }
98
102
 
99
103
  unifyStepsOrSubproofsWithPremises(stepsOrSubproofs, substitutions, generalContext, specificContext) {
100
104
  stepsOrSubproofs = reverse(stepsOrSubproofs); ///
101
105
 
102
- const stepsOrSubproofsUnifiedWithPremises = backwardsEvery(this.premises, (premise) => {
103
- const stepUnifiedWithPremise = this.unifyStepsOrSubproofsWithPremise(stepsOrSubproofs, premise, substitutions, generalContext, specificContext);
106
+ const stepsOrSubproofsUnifyWithPremises = backwardsEvery(this.premises, (premise) => {
107
+ const stepUnifiesWithPremise = this.unifyStepsOrSubproofsWithPremise(stepsOrSubproofs, premise, substitutions, generalContext, specificContext);
104
108
 
105
- if (stepUnifiedWithPremise) {
109
+ if (stepUnifiesWithPremise) {
106
110
  return true;
107
111
  }
108
112
  });
109
113
 
110
- return stepsOrSubproofsUnifiedWithPremises;
114
+ return stepsOrSubproofsUnifyWithPremises;
111
115
  }
112
116
 
113
117
  unifyStepsOrSubproofsWithPremise(stepsOrSubproofs, premise, substitutions, generalContext, specificContext) {
114
- let stepsOrSubproofsUnifiedWithPremise =false;
118
+ let stepsOrSubproofsUnifyWithPremise = false;
119
+
120
+ if (!stepsOrSubproofsUnifyWithPremise) {
121
+ const context = specificContext, ///
122
+ premiseUnifiesIndependently = premise.unifyIndependently(substitutions, context);
115
123
 
116
- const context = specificContext, ///
117
- premiseUnifiedIndependently = premise.unifyIndependently(substitutions, context);
124
+ if (premiseUnifiesIndependently) {
125
+ stepsOrSubproofsUnifyWithPremise = true;
126
+ }
127
+ }
118
128
 
119
- if (premiseUnifiedIndependently) {
120
- stepsOrSubproofsUnifiedWithPremise = true;
121
- } else {
129
+ if (!stepsOrSubproofsUnifyWithPremise) {
122
130
  const stepOrSubproof = extract(stepsOrSubproofs, (stepOrSubproof) => {
123
- const stepOrSubproofUnified = premise.unifyStepOrSubproof(stepOrSubproof, substitutions, generalContext, specificContext);
131
+ const stepOrSubproofUnifies = premise.unifyStepOrSubproof(stepOrSubproof, substitutions, generalContext, specificContext);
124
132
 
125
- if (stepOrSubproofUnified) {
133
+ if (stepOrSubproofUnifies) {
126
134
  return true;
127
135
  }
128
136
  }) || null;
129
137
 
130
138
  if (stepOrSubproof !== null) {
131
- stepsOrSubproofsUnifiedWithPremise = true;
139
+ stepsOrSubproofsUnifyWithPremise = true;
132
140
  }
133
141
  }
134
142
 
135
- return stepsOrSubproofsUnifiedWithPremise;
143
+ return stepsOrSubproofsUnifyWithPremise;
136
144
  }
137
145
 
138
146
  verify() {
139
- let verified = false;
147
+ let verifies = false;
140
148
 
141
149
  const ruleString = this.string; ///
142
150
 
143
151
  this.fileContext.trace(`Verifying the '${ruleString}' rule...`);
144
152
 
145
- const labelsVerified = this.verifyLabels();
153
+ const labelsVerify = this.verifyLabels();
146
154
 
147
- if (labelsVerified) {
155
+ if (labelsVerify) {
148
156
  const context = LocalContext.fromFileContext(this.fileContext),
149
- premisesVerified = this.premises.every((premise) => {
150
- const premiseVerified = premise.verify(context);
157
+ premisesVerify = this.premises.every((premise) => {
158
+ const premiseVerifies = premise.verify(context);
151
159
 
152
- if (premiseVerified) {
160
+ if (premiseVerifies) {
153
161
  return true;
154
162
  }
155
163
  });
156
164
 
157
- if (premisesVerified) {
158
- const conclusionVerified = this.conclusion.verify(context);
165
+ if (premisesVerify) {
166
+ const conclusionVerifies = this.conclusion.verify(context);
159
167
 
160
- if (conclusionVerified) {
161
- let proofVerified = true; ///
168
+ if (conclusionVerifies) {
169
+ let proofVerifies = true; ///
162
170
 
163
171
  if (this.proof !== null) {
164
172
  const substitutions = Substitutions.fromNothing();
165
173
 
166
- proofVerified = this.proof.verify(substitutions, this.conclusion, context);
174
+ proofVerifies = this.proof.verify(substitutions, this.conclusion, context);
167
175
  }
168
176
 
169
- if (proofVerified) {
177
+ if (proofVerifies) {
170
178
  const rule = this; ///
171
179
 
172
180
  this.fileContext.addRule(rule);
173
181
 
174
- verified = true;
182
+ verifies = true;
175
183
  }
176
184
  }
177
185
  }
178
186
  }
179
187
 
180
- if (verified) {
188
+ if (verifies) {
181
189
  this.fileContext.debug(`...verified the '${ruleString}' rule.`);
182
190
  }
183
191
 
184
- return verified;
192
+ return verifies;
185
193
  }
186
194
 
187
195
  verifyLabels() {
188
- const labelsVerified = this.labels.every((label) => {
196
+ const labelsVerify = this.labels.every((label) => {
189
197
  const nameOnly = true,
190
- labelVerified = label.verify(nameOnly);
198
+ labelVerifies = label.verify(nameOnly);
191
199
 
192
- if (labelVerified) {
200
+ if (labelVerifies) {
193
201
  return true;
194
202
  }
195
203
  });
196
204
 
197
- return labelsVerified;
205
+ return labelsVerify;
198
206
  }
199
207
 
200
208
  toJSON() {
@@ -222,7 +230,7 @@ export default domAssigned(class Rule {
222
230
  labels = labelsFromJSON(json, fileContext),
223
231
  premises = premisesFromJSON(json, fileContext),
224
232
  conclusion = conclusionFromJSON(json, fileContext),
225
- string = stringFromLabelsAndConclusion(labels, conclusion);
233
+ string = stringFromLabelsPremisesAndConclusion(labels, premises, conclusion);
226
234
 
227
235
  rule = new Rule(fileContext, string, labels, premises, conclusion, proof);
228
236
 
@@ -234,7 +242,7 @@ export default domAssigned(class Rule {
234
242
  labels = labelsFromRuleNode(ruleNode, fileContext),
235
243
  premises = premisesFromRuleNode(ruleNode, fileContext),
236
244
  conclusion = conclusionFromRuleNode(ruleNode, fileContext),
237
- string = stringFromLabelsAndConclusion(labels, conclusion),
245
+ string = stringFromLabelsPremisesAndConclusion(labels, premises, conclusion),
238
246
  rule = new Rule(fileContext, string, labels, premises, conclusion, proof);
239
247
 
240
248
  return rule;
@@ -281,10 +289,25 @@ function conclusionFromRuleNode(ruleNode, fileContext) {
281
289
  return conclusion;
282
290
  }
283
291
 
284
- function stringFromLabelsAndConclusion(labels, conclusion) {
285
- const conclusionString = conclusion.getString(),
292
+ function premisesStringFromPremises(premises) {
293
+ const premisesString = premises.reduce((premisesString, premise) => {
294
+ const premiseString = premise.getString();
295
+
296
+ premisesString = (premisesString !== null) ?
297
+ `${premisesString}, ${premiseString}` :
298
+ premiseString; ///
299
+
300
+ return premisesString;
301
+ }, null);
302
+
303
+ return premisesString;
304
+ }
305
+
306
+ function stringFromLabelsPremisesAndConclusion(labels, premises, conclusion) {
307
+ const premisesString = premisesStringFromPremises(premises),
308
+ conclusionString = conclusion.getString(),
286
309
  labelsString = labelsStringFromLabels(labels),
287
- string = `${labelsString} :: ${conclusionString}`;
310
+ string = `${labelsString} :: [${premisesString}] ... ${conclusionString}`;
288
311
 
289
312
  return string;
290
313
  }
@@ -25,29 +25,29 @@ export default domAssigned(class Signature {
25
25
  }
26
26
 
27
27
  verify(context) {
28
- let verified;
28
+ let verifies;
29
29
 
30
30
  const signatureString = this.string;
31
31
 
32
32
  context.trace(`Verifying the ${signatureString} signature...`);
33
33
 
34
- verified = this.terms.every((term) => {
35
- const termVerified = term.verify(context, () => {
36
- const verifiedAhead = true;
34
+ verifies = this.terms.every((term) => {
35
+ const termVerifies = term.verify(context, () => {
36
+ const verifiesAhead = true;
37
37
 
38
- return verifiedAhead;
38
+ return verifiesAhead;
39
39
  });
40
40
 
41
- if (termVerified) {
41
+ if (termVerifies) {
42
42
  return true;
43
43
  }
44
44
  });
45
45
 
46
- if (verified) {
46
+ if (verifies) {
47
47
  context.debug(`...verified the ${signatureString} signature.`);
48
48
  }
49
49
 
50
- return verified;
50
+ return verifies;
51
51
  }
52
52
 
53
53
  match(signature, substitutions, generalContext, specificContext) {
@@ -87,13 +87,13 @@ export default domAssigned(class Signature {
87
87
  return matches;
88
88
  }
89
89
 
90
- matchSubstitutions(substitutions, context) {
91
- let substitutionsMatch;
90
+ correlateSubstitutions(substitutions, context) {
91
+ let substitutionsCorrelates;
92
92
 
93
93
  const signatureString = this.string,
94
94
  substitutionsString = substitutions.asString();
95
95
 
96
- context.trace(`Matching the '${substitutionsString}' substitutions against the ${signatureString} signature...`);
96
+ context.trace(`Correlating the '${substitutionsString}' substitutions against the ${signatureString} signature...`);
97
97
 
98
98
  const array = substitutions.getArray(),
99
99
  correlates = correlate(this.terms, array, (term, substitution) => {
@@ -105,13 +105,13 @@ export default domAssigned(class Signature {
105
105
  }
106
106
  });
107
107
 
108
- substitutionsMatch = correlates; ///
108
+ substitutionsCorrelates = correlates; ///
109
109
 
110
- if (substitutionsMatch) {
111
- context.debug(`...matched the '${substitutionsString}' substitutions against the ${signatureString} signature.`);
110
+ if (substitutionsCorrelates) {
111
+ context.debug(`...correlated the '${substitutionsString}' substitutions against the ${signatureString} signature.`);
112
112
  }
113
113
 
114
- return substitutionsMatch;
114
+ return substitutionsCorrelates;
115
115
  }
116
116
 
117
117
  toJSON() {
@@ -96,30 +96,30 @@ export default domAssigned(class Statement {
96
96
  }
97
97
 
98
98
  verify(assignments, stated, context) {
99
- let verified;
99
+ let verifies;
100
100
 
101
101
  const statementString = this.string; ///
102
102
 
103
103
  context.trace(`Verifying the '${statementString}' statement...`);
104
104
 
105
- verified = verifyMixins.some((verifyMixin) => {
105
+ verifies = verifyMixins.some((verifyMixin) => {
106
106
  const statement = this, ///
107
- verified = verifyMixin(statement, assignments, stated, context);
107
+ verifies = verifyMixin(statement, assignments, stated, context);
108
108
 
109
- if (verified) {
109
+ if (verifies) {
110
110
  return true;
111
111
  }
112
112
  });
113
113
 
114
- if (verified) {
114
+ if (verifies) {
115
115
  context.debug(`...verified the '${statementString}' statement.`);
116
116
  }
117
117
 
118
- return verified;
118
+ return verifies;
119
119
  }
120
120
 
121
121
  verifyGivenMetaType(metaType, assignments, stated, context) {
122
- let verifiedGivenMetaType = false;
122
+ let verifiesGivenMetaType = false;
123
123
 
124
124
  const metaTypeString = metaType.getString(),
125
125
  statementString = this.string; ///
@@ -129,20 +129,20 @@ export default domAssigned(class Statement {
129
129
  const metaTypeName = metaType.getName();
130
130
 
131
131
  if (metaTypeName === STATEMENT_META_TYPE_NAME) {
132
- const verified = this.verify(assignments, stated, context)
132
+ const verifies = this.verify(assignments, stated, context)
133
133
 
134
- verifiedGivenMetaType = verified; ///
134
+ verifiesGivenMetaType = verifies; ///
135
135
  }
136
136
 
137
- if (verifiedGivenMetaType) {
137
+ if (verifiesGivenMetaType) {
138
138
  context.debug(`...verified the '${statementString}' statement given the '${metaTypeString}' meta-type.`);
139
139
  }
140
140
 
141
- return verifiedGivenMetaType;
141
+ return verifiesGivenMetaType;
142
142
  }
143
143
 
144
144
  unifySubproof(subproof, substitutions, generalContext, specificContext) {
145
- let subproofUnified = false;
145
+ let subproofUnifies = false;
146
146
 
147
147
  const context = specificContext, ///
148
148
  statement = this, ///
@@ -157,26 +157,26 @@ export default domAssigned(class Statement {
157
157
  const subproofStatements = subproof.getStatements(),
158
158
  subproofAssertionStatements = subproofAssertion.getStatements();
159
159
 
160
- subproofUnified = match(subproofAssertionStatements, subproofStatements, (subproofAssertionStatement, subproofStatement) => {
160
+ subproofUnifies = match(subproofAssertionStatements, subproofStatements, (subproofAssertionStatement, subproofStatement) => {
161
161
  const generalStatement = subproofAssertionStatement, ///
162
162
  specificStatement = subproofStatement, ///
163
- statementUnified = unifyStatement(generalStatement, specificStatement, substitutions, generalContext, specificContext);
163
+ statementUnifies = unifyStatement(generalStatement, specificStatement, substitutions, generalContext, specificContext);
164
164
 
165
- if (statementUnified) {
165
+ if (statementUnifies) {
166
166
  return true;
167
167
  }
168
168
  });
169
169
 
170
- if (subproofUnified) {
170
+ if (subproofUnifies) {
171
171
  specificContext.debug(`...unified the '${subproofString}' subproof with the '${subproofAssertionString}' subproof assertion.`);
172
172
  }
173
173
  }
174
174
 
175
- return subproofUnified;
175
+ return subproofUnifies;
176
176
  }
177
177
 
178
178
  unifyStatement(statement, substitutions, generalContext, specificContext) {
179
- let statementUnified;
179
+ let statementUnifies;
180
180
 
181
181
  const generalStatement = this, ///
182
182
  specificStatement = statement, ///
@@ -185,17 +185,17 @@ export default domAssigned(class Statement {
185
185
 
186
186
  specificContext.trace(`Unifying the '${specificStatementString}' statement with the '${generalStatementString}' statement...`);
187
187
 
188
- statementUnified = unifyStatement(generalStatement, specificStatement, substitutions, generalContext, specificContext);
188
+ statementUnifies = unifyStatement(generalStatement, specificStatement, substitutions, generalContext, specificContext);
189
189
 
190
- if (statementUnified) {
190
+ if (statementUnifies) {
191
191
  specificContext.debug(`...unified the '${specificStatementString}' statement with the '${generalStatementString}' statement.`);
192
192
  }
193
193
 
194
- return statementUnified;
194
+ return statementUnifies;
195
195
  }
196
196
 
197
197
  unifyIndependently(substitutions, context) {
198
- let unifiedIndependently = false;
198
+ let unifiesIndependently = false;
199
199
 
200
200
  const statement = this, ///
201
201
  statementString = this.string; ///
@@ -206,37 +206,37 @@ export default domAssigned(class Statement {
206
206
  containedAssertion = containedAssertionFromStatement(statement, context);
207
207
 
208
208
  if (definedAssertion !== null) {
209
- const definedAssertionUnifiedIndependently = definedAssertion.unifyIndependently(substitutions, context);
209
+ const definedAssertionUnifiesIndependently = definedAssertion.unifyIndependently(substitutions, context);
210
210
 
211
- unifiedIndependently = definedAssertionUnifiedIndependently; ///
211
+ unifiesIndependently = definedAssertionUnifiesIndependently; ///
212
212
  }
213
213
 
214
214
  if (containedAssertion !== null) {
215
- const containedAssertionUnifiedIndependently = containedAssertion.unifyIndependently(substitutions, context);
215
+ const containedAssertionUnifiesIndependently = containedAssertion.unifyIndependently(substitutions, context);
216
216
 
217
- unifiedIndependently = containedAssertionUnifiedIndependently; ///
217
+ unifiesIndependently = containedAssertionUnifiesIndependently; ///
218
218
  }
219
219
 
220
- if (unifiedIndependently) {
220
+ if (unifiesIndependently) {
221
221
  context.debug(`...unified the '${statementString}' statement independently.`);
222
222
  }
223
223
 
224
- return unifiedIndependently;
224
+ return unifiesIndependently;
225
225
  }
226
226
 
227
- unifyWithStepsOrSubproofs(stepsOrSubproofs, context) {
228
- let unifiedWithSteps;
227
+ equateWithStepsOrSubproofs(stepsOrSubproofs, context) {
228
+ let equatesWithStepsOrSubproofs;
229
229
 
230
- unifiedWithSteps = backwardsSome(stepsOrSubproofs, (stepOrSubproof) => {
230
+ equatesWithStepsOrSubproofs = backwardsSome(stepsOrSubproofs, (stepOrSubproof) => {
231
231
  const statement = this, ///
232
- statementUnified = stepOrSubproof.unifyStatement(statement, context);
232
+ statementUnifies = stepOrSubproof.equateWithStatement(statement, context);
233
233
 
234
- if (statementUnified) {
234
+ if (statementUnifies) {
235
235
  return true;
236
236
  }
237
237
  });
238
238
 
239
- return unifiedWithSteps;
239
+ return equatesWithStepsOrSubproofs;
240
240
  }
241
241
 
242
242
  toJSON() {