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
@@ -26,16 +26,16 @@ export default domAssigned(class Derivation {
26
26
  }
27
27
 
28
28
  verify(substitutions, context) {
29
- let verified;
29
+ let verifies;
30
30
 
31
- verified = this.stepsOrSubproofs.every((stepOrSubproof) => { ///
31
+ verifies = this.stepsOrSubproofs.every((stepOrSubproof) => { ///
32
32
  const assignments = [],
33
- stepOrSubproofVerified = stepOrSubproof.verify(substitutions, assignments, context);
33
+ stepOrSubproofVerifies = stepOrSubproof.verify(substitutions, assignments, context);
34
34
 
35
- if (stepOrSubproofVerified) {
36
- const stepOrSubproofUnified = stepOrSubproof.unify(substitutions, context);
35
+ if (stepOrSubproofVerifies) {
36
+ const stepOrSubproofUnifies = stepOrSubproof.unify(substitutions, context);
37
37
 
38
- if (stepOrSubproofUnified) {
38
+ if (stepOrSubproofUnifies) {
39
39
  const assignmentsAssigned = assignAssignments(assignments, context);
40
40
 
41
41
  if (assignmentsAssigned) {
@@ -47,7 +47,7 @@ export default domAssigned(class Derivation {
47
47
  }
48
48
  });
49
49
 
50
- return verified;
50
+ return verifies;
51
51
  }
52
52
 
53
53
  static name = "Derivation";
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
 
3
3
  import dom from "../dom";
4
+ import equationalUnifier from "../unifier/equantional";
4
5
  import EqualityAssignment from "../assignment/equality";
5
6
  import VariableAssignment from "../assignment/variable";
6
7
 
7
8
  import { domAssigned } from "../dom";
8
- import { unifyEquality } from "../utilities/unification";
9
9
 
10
10
  export default domAssigned(class Equality {
11
11
  constructor(string, leftTerm, rightTerm) {
@@ -45,6 +45,15 @@ export default domAssigned(class Equality {
45
45
  return type;
46
46
  }
47
47
 
48
+ getTerms() {
49
+ const terms = [
50
+ this.leftTerm,
51
+ this.rightTerm
52
+ ];
53
+
54
+ return terms;
55
+ }
56
+
48
57
  isReflexive() {
49
58
  const leftTermString = this.leftTerm.getString(),
50
59
  rightTermString = this.rightTerm.getString(),
@@ -54,114 +63,122 @@ export default domAssigned(class Equality {
54
63
  }
55
64
 
56
65
  isEqual(context) {
57
- const equality = this, ///
58
- equalityUnified = unifyEquality(equality, context),
59
- equal = equalityUnified; ///
66
+ let equal = false;
67
+
68
+ const leftTermNode = this.leftTerm.getNode(),
69
+ rightTermNode = this.rightTerm.getNode(),
70
+ termsEquates = equationalUnifier.equateTerms(leftTermNode, rightTermNode, context);
71
+
72
+ if (termsEquates) {
73
+ equal = true;
74
+ }
60
75
 
61
76
  return equal;
62
77
  }
63
78
 
64
79
  verify(assignments, stated, context) {
65
- let verified = false;
80
+ let verifies = false;
66
81
 
67
82
  const equalityString = this.string; ///
68
83
 
69
84
  context.trace(`Verifying the '${equalityString}' equality...`);
70
85
 
71
- const termsVerified = this.verifyTerms(context);
86
+ const termsVerify = this.verifyTerms(context);
72
87
 
73
- if (termsVerified) {
74
- let verifiedWhenStated = false,
75
- verifiedWhenDerived = false;
88
+ if (termsVerify) {
89
+ let verifiesWhenStated = false,
90
+ verifiesWhenDerived = false;
76
91
 
77
92
  if (stated) {
78
- verifiedWhenStated = this.verifyWhenStated(assignments, context);
93
+ verifiesWhenStated = this.verifyWhenStated(assignments, context);
79
94
  } else {
80
- verifiedWhenDerived = this.verifyWhenDerived(context);
95
+ verifiesWhenDerived = this.verifyWhenDerived(context);
81
96
  }
82
97
 
83
- verified = verifiedWhenStated || verifiedWhenDerived;
98
+ if (verifiesWhenStated || verifiesWhenDerived) {
99
+ verifies = true;
100
+ }
84
101
  }
85
102
 
86
- if (verified) {
87
- this.assign(assignments, context);
103
+ if (verifies) {
104
+
105
+ this.assign(assignments, context);
106
+
88
107
  }
89
108
 
90
- if (verified) {
109
+ if (verifies) {
91
110
  context.debug(`...verified the '${equalityString}' equality.`);
92
111
  }
93
112
 
94
- return verified;
113
+ return verifies;
95
114
  }
96
115
 
97
116
  verifyTerms(context) {
98
- let termsVerified;
117
+ let termsVerify;
99
118
 
100
119
  const equalityString = this.string; ///
101
120
 
102
121
  context.trace(`Verifying the '${equalityString}' equality's terms...`);
103
122
 
104
- const leftTermVerified = this.leftTerm.verify(context, () => {
105
- let verifiedAhead;
123
+ const leftTermVerifies = this.leftTerm.verify(context, () => {
124
+ let verifiesAhead;
106
125
 
107
- const rightTermVerified = this.rightTerm.verify(context, () => {
108
- let verifiedAhead;
126
+ const rightTermVerifies = this.rightTerm.verify(context, () => {
127
+ let verifiesAhead;
109
128
 
110
129
  const leftTermType = this.leftTerm.getType(),
111
130
  rightTermType = this.rightTerm.getType(),
112
131
  leftTermTypeComparableToRightTermType = leftTermType.isComparableTo(rightTermType);
113
132
 
114
- verifiedAhead = leftTermTypeComparableToRightTermType; ///
133
+ verifiesAhead = leftTermTypeComparableToRightTermType; ///
115
134
 
116
- return verifiedAhead;
135
+ return verifiesAhead;
117
136
  });
118
137
 
119
- verifiedAhead = rightTermVerified; ///
138
+ verifiesAhead = rightTermVerifies; ///
120
139
 
121
- return verifiedAhead;
140
+ return verifiesAhead;
122
141
  });
123
142
 
124
- termsVerified = leftTermVerified; ///
143
+ termsVerify = leftTermVerifies; ///
125
144
 
126
- if (termsVerified) {
145
+ if (termsVerify) {
127
146
  context.debug(`...verified the '${equalityString}' equality's terms.`);
128
147
  }
129
148
 
130
- return termsVerified;
149
+ return termsVerify;
131
150
  }
132
151
 
133
152
  verifyWhenStated(assignments, context) {
134
- let verifiedWhenStated;
153
+ let verifiesWhenStated;
135
154
 
136
155
  const equalityString = this.string; ///
137
156
 
138
157
  context.trace(`Verifying the '${equalityString}' stated equality...`);
139
158
 
140
- verifiedWhenStated = true;
159
+ verifiesWhenStated = true;
141
160
 
142
- if (verifiedWhenStated) {
161
+ if (verifiesWhenStated) {
143
162
  context.debug(`...verified the '${equalityString}' stated equality.`);
144
163
  }
145
164
 
146
- return verifiedWhenStated;
165
+ return verifiesWhenStated;
147
166
  }
148
167
 
149
168
  verifyWhenDerived(context) {
150
- let verifiedWhenDerived;
169
+ let verifiesWhenDerived;
151
170
 
152
171
  const equalityString = this.string; ///
153
172
 
154
173
  context.trace(`Verifying the '${equalityString}' derived equality...`);
155
174
 
156
- const equal = this.isEqual(context);
157
-
158
- verifiedWhenDerived = equal; ///
175
+ verifiesWhenDerived = true; ///
159
176
 
160
- if (verifiedWhenDerived) {
177
+ if (verifiesWhenDerived) {
161
178
  context.debug(`...verified the '${equalityString}' derived equality.`);
162
179
  }
163
180
 
164
- return verifiedWhenDerived;
181
+ return verifiesWhenDerived;
165
182
  }
166
183
 
167
184
  assign(assignments, context) {
package/src/dom/error.js CHANGED
@@ -17,13 +17,13 @@ export default domAssigned(class Error {
17
17
  }
18
18
 
19
19
  verify() {
20
- let verified = false;
20
+ let verifies = false;
21
21
 
22
22
  const errorString = this.string; ///
23
23
 
24
24
  this.fileContext.warning(`The '${errorString}' error cannot be verified.`);
25
25
 
26
- return verified;
26
+ return verifies;
27
27
  }
28
28
 
29
29
  static name = "Error";
package/src/dom/frame.js CHANGED
@@ -127,42 +127,42 @@ export default domAssigned(class Frame {
127
127
  }
128
128
 
129
129
  verify(assignments, stated, context) {
130
- let verified = false;
130
+ let verifies = false;
131
131
 
132
132
  const frameString = this.string; ///
133
133
 
134
134
  context.trace(`Verifying the '${frameString}' frame...`);
135
135
 
136
- const declarationsVerified = this.verifyDeclarations(assignments, stated, context);
136
+ const declarationsVerify = this.verifyDeclarations(assignments, stated, context);
137
137
 
138
- if (declarationsVerified) {
139
- const metavariablesVerified = this.verifyMetavariables(assignments, stated, context);
138
+ if (declarationsVerify) {
139
+ const metavariablesVerify = this.verifyMetavariables(assignments, stated, context);
140
140
 
141
- if (metavariablesVerified) {
142
- let verifiedWhenStated = false,
143
- verifiedWhenDerived = false;
141
+ if (metavariablesVerify) {
142
+ let verifiesWhenStated = false,
143
+ verifiesWhenDerived = false;
144
144
 
145
145
  if (stated) {
146
- verifiedWhenStated = this.verifyWhenStated(assignments, context);
146
+ verifiesWhenStated = this.verifyWhenStated(assignments, context);
147
147
  } else {
148
- verifiedWhenDerived = this.verifyWhenDerived(context);
148
+ verifiesWhenDerived = this.verifyWhenDerived(context);
149
149
  }
150
150
 
151
- if (verifiedWhenStated || verifiedWhenDerived) {
152
- verified = true;
151
+ if (verifiesWhenStated || verifiesWhenDerived) {
152
+ verifies = true;
153
153
  }
154
154
  }
155
155
  }
156
156
 
157
- if (verified) {
157
+ if (verifies) {
158
158
  context.debug(`...verified the '${frameString}' frame.`);
159
159
  }
160
160
 
161
- return verified;
161
+ return verifies;
162
162
  }
163
163
 
164
164
  verifyWhenStated(assignments, context) {
165
- let verifiedWhenStated = false;
165
+ let verifiesWhenStated = false;
166
166
 
167
167
  const frameString = this.string; ///
168
168
 
@@ -178,35 +178,35 @@ export default domAssigned(class Frame {
178
178
  if (metavariablesLength > 1) {
179
179
  context.trace(`The '${frameString}' stated frame cannot have more than one metavariable.`);
180
180
  } else {
181
- verifiedWhenStated = true;
181
+ verifiesWhenStated = true;
182
182
  }
183
183
  }
184
184
 
185
- if (verifiedWhenStated) {
185
+ if (verifiesWhenStated) {
186
186
  context.debug(`...verified the '${frameString}' stated frame.`);
187
187
  }
188
188
 
189
- return verifiedWhenStated;
189
+ return verifiesWhenStated;
190
190
  }
191
191
 
192
192
  verifyWhenDerived(context) {
193
- let verifiedWhenDerived;
193
+ let verifiesWhenDerived;
194
194
 
195
195
  const frameString = this.string; ///
196
196
 
197
197
  context.trace(`Verifying the '${frameString}' derived frame...`);
198
198
 
199
- verifiedWhenDerived = true;
199
+ verifiesWhenDerived = true;
200
200
 
201
- if (verifiedWhenDerived) {
201
+ if (verifiesWhenDerived) {
202
202
  context.debug(`...verified the '${frameString}' derived frame.`);
203
203
  }
204
204
 
205
- return verifiedWhenDerived;
205
+ return verifiesWhenDerived;
206
206
  }
207
207
 
208
208
  verifyDeclarations(assignments, stated, context) {
209
- let declarationsVerified = true; ///
209
+ let declarationsVerify = true; ///
210
210
 
211
211
  const declarationsLength = this.declarations.length;
212
212
 
@@ -222,22 +222,22 @@ export default domAssigned(class Frame {
222
222
 
223
223
  assignments = null; ///
224
224
 
225
- declarationsVerified = this.declarations.every((declaration) => {
226
- const declarationVerified = declaration.verify(assignments, stated, context);
225
+ declarationsVerify = this.declarations.every((declaration) => {
226
+ const declarationVerifies = declaration.verify(assignments, stated, context);
227
227
 
228
- return declarationVerified;
228
+ return declarationVerifies;
229
229
  });
230
230
 
231
- if (declarationsVerified) {
231
+ if (declarationsVerify) {
232
232
  context.debug(`...verified the '${declarationsString}' declaration${sOrNothing}.`);
233
233
  }
234
234
  }
235
235
 
236
- return declarationsVerified;
236
+ return declarationsVerify;
237
237
  }
238
238
 
239
239
  verifyMetavariables(assignments, stated, context) {
240
- let metavariablesVerified = true;
240
+ let metavariablesVerify = true;
241
241
 
242
242
  const metavariablesLength = this.metavariables.length;
243
243
 
@@ -249,22 +249,22 @@ export default domAssigned(class Frame {
249
249
 
250
250
  context.trace(`Verifying the '${metavariablesString}' metavariable${sOrNothing}...`);
251
251
 
252
- metavariablesVerified = this.metavariables.every((metavariable) => {
253
- const metavariableVerified = metavariable.verify(context);
252
+ metavariablesVerify = this.metavariables.every((metavariable) => {
253
+ const metavariableVerifies = metavariable.verify(context);
254
254
 
255
- return metavariableVerified;
255
+ return metavariableVerifies;
256
256
  });
257
257
 
258
- if (metavariablesVerified) {
258
+ if (metavariablesVerify) {
259
259
  context.debug(`...verified the '${metavariablesString}' metavariable${sOrNothing}.`);
260
260
  }
261
261
  }
262
262
 
263
- return metavariablesVerified;
263
+ return metavariablesVerify;
264
264
  }
265
265
 
266
266
  verifyGivenMetaType(metaType, assignments, stated, context) {
267
- let verifiedGivenMetaType = false;
267
+ let verifiesGivenMetaType = false;
268
268
 
269
269
  const frameString = this.string, ///
270
270
  metaTypeString = metaType.getString();
@@ -274,16 +274,16 @@ export default domAssigned(class Frame {
274
274
  const metaTypeName = metaType.getName();
275
275
 
276
276
  if (metaTypeName === FRAME_META_TYPE_NAME) {
277
- const verified = this.verify(assignments, stated, context)
277
+ const verifies = this.verify(assignments, stated, context)
278
278
 
279
- verifiedGivenMetaType = verified; ///
279
+ verifiesGivenMetaType = verifies; ///
280
280
  }
281
281
 
282
- if (verifiedGivenMetaType) {
282
+ if (verifiesGivenMetaType) {
283
283
  context.debug(`...verified the '${frameString}' frame given the '${metaTypeString}' meta-type.`);
284
284
  }
285
285
 
286
- return verifiedGivenMetaType;
286
+ return verifiesGivenMetaType;
287
287
  }
288
288
 
289
289
  static name = "Frame";
@@ -29,94 +29,96 @@ export default domAssigned(class Judgement {
29
29
  getMetavariable() { return this.frame.getMetavariable(); }
30
30
 
31
31
  verify(assignments, stated, context) {
32
- let verified = false;
32
+ let verifies = false;
33
33
 
34
34
  const judgementString = this.string; ///
35
35
 
36
36
  context.trace(`Verifying the '${judgementString}' judgement...`);
37
37
 
38
- const frameVerified = this.verifyFrame(assignments, stated, context);
38
+ const frameVerifies = this.verifyFrame(assignments, stated, context);
39
39
 
40
- if (frameVerified) {
41
- const declarationVerified = this.verifyDeclaration(assignments, stated, context);
40
+ if (frameVerifies) {
41
+ const declarationVerifies = this.verifyDeclaration(assignments, stated, context);
42
42
 
43
- if (declarationVerified) {
44
- let verifiedWhenStated = false,
45
- verifiedWhenDerived = false;
43
+ if (declarationVerifies) {
44
+ let verifiesWhenStated = false,
45
+ verifiesWhenDerived = false;
46
46
 
47
47
  if (stated) {
48
- verifiedWhenStated = this.verifyWhenStated(assignments, context);
48
+ verifiesWhenStated = this.verifyWhenStated(assignments, context);
49
49
  } else {
50
- verifiedWhenDerived = this.verifyWhenDerived(context);
50
+ verifiesWhenDerived = this.verifyWhenDerived(context);
51
51
  }
52
52
 
53
- verified = verifiedWhenStated || verifiedWhenDerived;
53
+ if (verifiesWhenStated || verifiesWhenDerived) {
54
+ verifies = true;
55
+ }
54
56
  }
55
57
  }
56
58
 
57
- if (verified) {
59
+ if (verifies) {
58
60
  if (stated) {
59
61
  this.assign(assignments, context);
60
62
  }
61
63
  }
62
64
 
63
- if (verified) {
65
+ if (verifies) {
64
66
  context.debug(`...verified the '${judgementString}' judgement.`);
65
67
  }
66
68
 
67
- return verified;
69
+ return verifies;
68
70
  }
69
71
 
70
72
  verifyFrame(assignments, stated, context) {
71
- let frameVerified;
73
+ let frameVerifies;
72
74
 
73
75
  const frameString = this.frame.getString();
74
76
 
75
77
  context.trace(`Verifying the '${frameString}' frame...`);
76
78
 
77
- frameVerified = this.frame.verify(assignments, stated, context);
79
+ frameVerifies = this.frame.verify(assignments, stated, context);
78
80
 
79
- if (frameVerified) {
81
+ if (frameVerifies) {
80
82
  context.debug(`...verified the '${frameString}' frame.`);
81
83
  }
82
84
 
83
- return frameVerified;
85
+ return frameVerifies;
84
86
  }
85
87
 
86
88
  verifyDeclaration(assignments, stated, context) {
87
- let declarationVerified;
89
+ let declarationVerifies;
88
90
 
89
91
  const declarationString = this.declaration.getString();
90
92
 
91
93
  context.trace(`Verifying the '${declarationString}' declaration...`);
92
94
 
93
- declarationVerified = this.declaration.verify(assignments, stated, context);
95
+ declarationVerifies = this.declaration.verify(assignments, stated, context);
94
96
 
95
- if (declarationVerified) {
97
+ if (declarationVerifies) {
96
98
  context.debug(`...verified the '${declarationString}' declaration.`);
97
99
  }
98
100
 
99
- return declarationVerified;
101
+ return declarationVerifies;
100
102
  }
101
103
 
102
104
  verifyWhenStated(assignments, context) {
103
- let verifiedWhenStated;
105
+ let verifiesWhenStated;
104
106
 
105
107
  const judgementString = this.string; ///
106
108
 
107
109
  context.trace(`Verifying the '${judgementString}' stated judgement...`);
108
110
 
109
- verifiedWhenStated = true;
111
+ verifiesWhenStated = true;
110
112
 
111
- if (verifiedWhenStated) {
113
+ if (verifiesWhenStated) {
112
114
  context.debug(`...verified the '${judgementString}' stated judgement.`);
113
115
  }
114
116
 
115
- return verifiedWhenStated;
117
+ return verifiesWhenStated;
116
118
  }
117
119
 
118
120
  verifyWhenDerived(context) {
119
- let verifiedWhenDerived;
121
+ let verifiesWhenDerived;
120
122
 
121
123
  const judgementString = this.string; ///
122
124
 
@@ -127,13 +129,13 @@ export default domAssigned(class Judgement {
127
129
  substitutions = metaLemmaMetatheorem.getSubstitutions(),
128
130
  substitutionsMatch = this.frame.matchSubstitutions(substitutions, context);
129
131
 
130
- verifiedWhenDerived = substitutionsMatch;
132
+ verifiesWhenDerived = substitutionsMatch;
131
133
 
132
- if (verifiedWhenDerived) {
134
+ if (verifiesWhenDerived) {
133
135
  context.debug(`...verified the '${judgementString}' derived judgement.`);
134
136
  }
135
137
 
136
- return verifiedWhenDerived;
138
+ return verifiesWhenDerived;
137
139
  }
138
140
 
139
141
  assign(assignments, context) {
package/src/dom/label.js CHANGED
@@ -52,7 +52,7 @@ export default domAssigned(class Label {
52
52
  matchMetavariableName(metavariableName) { return this.metavariable.matchMetavariableName(metavariableName); }
53
53
 
54
54
  verify(nameOnly) {
55
- let verified = false;
55
+ let verifies = false;
56
56
 
57
57
  const labelString = this.getString(); ///
58
58
 
@@ -73,14 +73,14 @@ export default domAssigned(class Label {
73
73
  if (labelPresent) {
74
74
  this.fileContext.debug(`The '${labelString}' label is already present.`);
75
75
  } else {
76
- verified = true;
76
+ verifies = true;
77
77
  }
78
78
 
79
- if (verified) {
79
+ if (verifies) {
80
80
  this.fileContext.debug(`...verified the '${labelString}' label.`);
81
81
  }
82
82
 
83
- return verified;
83
+ return verifies;
84
84
  }
85
85
 
86
86
  toJSON() {
package/src/dom/lemma.js CHANGED
@@ -6,7 +6,7 @@ import { domAssigned } from "../dom";
6
6
 
7
7
  export default domAssigned(class Lemma extends TopLevelAssertion {
8
8
  verify() {
9
- let verified;
9
+ let verifies;
10
10
 
11
11
  const lemma = this, ///
12
12
  fileContext = this.getFileContext(),
@@ -16,9 +16,9 @@ export default domAssigned(class Lemma extends TopLevelAssertion {
16
16
  fileContext.trace(`Verifying a lemma...`) :
17
17
  fileContext.trace(`Verifying the '${lemmaString}' lemma...`);
18
18
 
19
- verified = super.verify();
19
+ verifies = super.verify();
20
20
 
21
- if (verified) {
21
+ if (verifies) {
22
22
  const lemma = this; ///
23
23
 
24
24
  fileContext.addLemma(lemma);
@@ -28,7 +28,7 @@ export default domAssigned(class Lemma extends TopLevelAssertion {
28
28
  fileContext.debug(`...verified the '${lemmaString}' lemma.`);
29
29
  }
30
30
 
31
- return verified;
31
+ return verifies;
32
32
  }
33
33
 
34
34
  static name = "Lemma";
@@ -6,7 +6,7 @@ import { domAssigned } from "../dom";
6
6
 
7
7
  export default domAssigned(class MetaLemma extends TopLevelMetaAssertion {
8
8
  verify() {
9
- let verified;
9
+ let verifies;
10
10
 
11
11
  const metaLemma = this, ///
12
12
  fileContext = this.getFileContext(),
@@ -14,9 +14,9 @@ export default domAssigned(class MetaLemma extends TopLevelMetaAssertion {
14
14
 
15
15
  fileContext.trace(`Verifying the '${metaLemmaString}' meta-lemma...`);
16
16
 
17
- verified = super.verify();
17
+ verifies = super.verify();
18
18
 
19
- if (verified) {
19
+ if (verifies) {
20
20
  const metaTheorem = this; ///
21
21
 
22
22
  fileContext.addMetatheorem(metaTheorem);
@@ -24,7 +24,7 @@ export default domAssigned(class MetaLemma extends TopLevelMetaAssertion {
24
24
  fileContext.debug(`...verified the '${metaLemmaString}' meta-lemma.`);
25
25
  }
26
26
 
27
- return verified;
27
+ return verifies;
28
28
  }
29
29
 
30
30
  static name = "MetaLemma";
@@ -6,7 +6,7 @@ import { domAssigned } from "../dom";
6
6
 
7
7
  export default domAssigned(class Metatheorem extends TopLevelMetaAssertion {
8
8
  verify() {
9
- let verified;
9
+ let verifies;
10
10
 
11
11
  const metaLemma = this, ///
12
12
  fileContext = this.getFileContext(),
@@ -14,9 +14,9 @@ export default domAssigned(class Metatheorem extends TopLevelMetaAssertion {
14
14
 
15
15
  fileContext.trace(`Verifying the '${metaLemmaString}' metatheorem...`);
16
16
 
17
- verified = super.verify();
17
+ verifies = super.verify();
18
18
 
19
- if (verified) {
19
+ if (verifies) {
20
20
  const metaTheorem = this; ///
21
21
 
22
22
  fileContext.addMetatheorem(metaTheorem);
@@ -24,7 +24,7 @@ export default domAssigned(class Metatheorem extends TopLevelMetaAssertion {
24
24
  fileContext.debug(`...verified the '${metaLemmaString}' metatheorem.`);
25
25
  }
26
26
 
27
- return verified;
27
+ return verifies;
28
28
  }
29
29
 
30
30
  static name = "Metatheorem";