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
@@ -24,32 +24,32 @@ export default domAssigned(class MetavariableDeclaration {
24
24
  }
25
25
 
26
26
  verify() {
27
- let verified;
27
+ let verifies;
28
28
 
29
29
  const metavariableDeclarationString = this.string; ///
30
30
 
31
31
  this.fileContext.trace(`Verifying the '${metavariableDeclarationString}' metavariable declaration...`);
32
32
 
33
- const metavariableVerified = this.verifyMetavariable(this.metavariable);
33
+ const metavariableVerifies = this.verifyMetavariable(this.metavariable);
34
34
 
35
- if (metavariableVerified) {
35
+ if (metavariableVerifies) {
36
36
  this.fileContext.addMetavariable(this.metavariable);
37
37
 
38
- verified = true;
38
+ verifies = true;
39
39
  }
40
40
 
41
- if (verified) {
41
+ if (verifies) {
42
42
  this.fileContext.debug(`...verified the '${metavariableDeclarationString}' metavariable declaration.`);
43
43
  }
44
44
 
45
- return verified;
45
+ return verifies;
46
46
  }
47
47
 
48
48
  verifyType(type) {
49
- let typeVerified;
49
+ let typeVerifies;
50
50
 
51
51
  if (type === null) {
52
- typeVerified = true;
52
+ typeVerifies = true;
53
53
  } else {
54
54
  const typeName = type.getName(),
55
55
  typeString = type.getString();
@@ -61,19 +61,19 @@ export default domAssigned(class MetavariableDeclaration {
61
61
  if (!typePresent) {
62
62
  this.fileContext.debug(`The '${typeString}' type is not present.`);
63
63
  } else {
64
- typeVerified = true;
64
+ typeVerifies = true;
65
65
  }
66
66
 
67
- if (typeVerified) {
67
+ if (typeVerifies) {
68
68
  this.fileContext.debug(`...verified the '${typeString}' type.`);
69
69
  }
70
70
  }
71
71
 
72
- return typeVerified;
72
+ return typeVerifies;
73
73
  }
74
74
 
75
75
  verifyMetavariable(metavariable) {
76
- let metavariableVerified = false;
76
+ let metavariableVerifies = false;
77
77
 
78
78
  const metavariableString = metavariable.getString();
79
79
 
@@ -92,17 +92,17 @@ export default domAssigned(class MetavariableDeclaration {
92
92
  this.fileContext.debug(`The '${metavariableName}' metavariable is already present.`);
93
93
  } else {
94
94
  const type = metavariable.getType(),
95
- typeVerified = this.verifyType(type);
95
+ typeVerifies = this.verifyType(type);
96
96
 
97
- metavariableVerified = typeVerified; ///
97
+ metavariableVerifies = typeVerifies; ///
98
98
  }
99
99
  }
100
100
 
101
- if (metavariableVerified) {
101
+ if (metavariableVerifies) {
102
102
  this.fileContext.debug(`...verified the '${metavariableString}' metavariable when declared.`);
103
103
  }
104
104
 
105
- return metavariableVerified;
105
+ return metavariableVerifies;
106
106
  }
107
107
 
108
108
  static name = "MetavariableDeclaration";
@@ -0,0 +1,179 @@
1
+ "use strict";
2
+
3
+ import dom from "../../dom";
4
+
5
+ import { objectType } from "../type";
6
+ import { domAssigned } from "../../dom";
7
+ import { stringFromTypeNameNameAndSuperTypes } from "../../utilities/type";
8
+
9
+ export default domAssigned(class SimpleTypeDeclaration {
10
+ constructor(fileContext, string, type) {
11
+ this.fileContext = fileContext;
12
+ this.string = string;
13
+ this.type = type;
14
+ }
15
+
16
+ getFileContext() {
17
+ return this.fileContext;
18
+ }
19
+
20
+ getString() {
21
+ return this.string;
22
+ }
23
+
24
+ getType() {
25
+ return this.type;
26
+ }
27
+
28
+ verify() {
29
+ let verifies = false;
30
+
31
+ const typeDeclarationString = this.getString(); ///
32
+
33
+ this.fileContext.trace(`Verifying the '${typeDeclarationString}' type declaration...`);
34
+
35
+ const typeVerifies = this.verifyType();
36
+
37
+ if (typeVerifies) {
38
+ const superTypesVerify = this.verifySuperTypes();
39
+
40
+ if (superTypesVerify) {
41
+ this.fileContext.addType(this.type);
42
+
43
+ verifies = true;
44
+ }
45
+ }
46
+
47
+ if (verifies) {
48
+ this.fileContext.debug(`...verified the '${typeDeclarationString}' type declaration.`);
49
+ }
50
+
51
+ return verifies;
52
+ }
53
+
54
+ verifyType() {
55
+ let typeVerifies = false;
56
+
57
+ const typeString = this.type.getString();
58
+
59
+ this.fileContext.trace(`Verifying the '${typeString}' type...`);
60
+
61
+ const typeName = this.type.getName(),
62
+ typePresent = this.fileContext.isTypePresentByTypeName(typeName);
63
+
64
+ if (typePresent) {
65
+ this.fileContext.debug(`The type '${typeString}' is already present.`);
66
+ } else {
67
+ typeVerifies = true;
68
+ }
69
+
70
+ if (typeVerifies) {
71
+ this.fileContext.debug(`...verified the '${typeString}' type.`);
72
+ }
73
+
74
+ return typeVerifies;
75
+ }
76
+
77
+ verifySuperType(superType) {
78
+ let superTypeVerifies = false;
79
+
80
+ const superTypeString = superType.getString();
81
+
82
+ this.fileContext.trace(`Verifying the '${superTypeString}' super-type...`);
83
+
84
+ const superTypeName = superType.getName(),
85
+ superTypePresent = this.fileContext.isTypePresentByTypeName(superTypeName);
86
+
87
+ if (superTypePresent) {
88
+ superTypeVerifies = true;
89
+ }
90
+
91
+ if (superTypeVerifies) {
92
+ this.fileContext.debug(`...verified the '${superTypeString}' super-type.`);
93
+ }
94
+
95
+ return superTypeVerifies;
96
+ }
97
+
98
+ verifySuperTypes() {
99
+ let superTypesVerify = false;
100
+
101
+ this.fileContext.trace(`Verifying the super-types...`);
102
+
103
+ let superTypes;
104
+
105
+ superTypes = this.type.getSuperTypes();
106
+
107
+ const superTypesLength = superTypes.length;
108
+
109
+ if (superTypesLength === 0) {
110
+ const superType = objectType; ///
111
+
112
+ superTypes.push(superType);
113
+ }
114
+
115
+ const typeName = this.type.getName(),
116
+ typeBasic = this.type.isBasic(),
117
+ typeString = this.type.getString();
118
+
119
+ if (typeBasic) {
120
+ superTypesVerify = true;
121
+
122
+ this.fileContext.trace(`The '${typeString}' type is basic.`)
123
+ } else {
124
+ const superTypeNames = superTypes.map((superType) => {
125
+ const superTypeName = superType.getName();
126
+
127
+ return superTypeName;
128
+ }),
129
+ superTypeNamesIncludesTypeName = superTypeNames.includes(typeName);
130
+
131
+ if (superTypeNamesIncludesTypeName) {
132
+ this.fileContext.trace(`The '${typeName}' type cannot be a super-type `);
133
+ } else {
134
+ superTypesVerify = superTypes.every((superType) => {
135
+ const superTypeVerifies = this.verifySuperType(superType);
136
+
137
+ if (superTypeVerifies) {
138
+ return true;
139
+ }
140
+ });
141
+
142
+ if (superTypesVerify) {
143
+ superTypes = superTypes.map((superType) => {
144
+ const superTypeName = superType.getName();
145
+
146
+ superType = this.fileContext.findTypeByTypeName(superTypeName);
147
+
148
+ return superType;
149
+ });
150
+
151
+ const string = stringFromTypeNameNameAndSuperTypes(typeName, superTypes);
152
+
153
+ this.type.setString(string);
154
+
155
+ this.type.setSuperTypes(superTypes);
156
+ }
157
+ }
158
+ }
159
+
160
+ if (superTypesVerify) {
161
+ this.fileContext.debug(`...verified the super-types.`);
162
+ }
163
+
164
+ return superTypesVerify;
165
+ }
166
+
167
+ static name = "SimpleTypeDeclaration";
168
+
169
+ static fromSimpleTypeDeclarationNode(simpleTypeDeclarationNode, fileContext) {
170
+ const { Type } = dom,
171
+ type = Type.fromSimpleTypeDeclarationNode(simpleTypeDeclarationNode, fileContext),
172
+ typeName = type.getName(),
173
+ superTypes = type.getSuperTypes(),
174
+ string = stringFromTypeNameNameAndSuperTypes(typeName, superTypes),
175
+ simpleTypeDeclaration = new SimpleTypeDeclaration(fileContext, string, type);
176
+
177
+ return simpleTypeDeclaration;
178
+ }
179
+ });
@@ -24,33 +24,33 @@ export default domAssigned(class VariableDeclaration {
24
24
  }
25
25
 
26
26
  verify() {
27
- let verified = false;
27
+ let verifies = false;
28
28
 
29
29
  const variableDeclarationString = this.getString();
30
30
 
31
31
  this.fileContext.trace(`Verifying the '${variableDeclarationString}' variable declaration...`);
32
32
 
33
- const variableTypeVerified = this.verifyVariableType();
33
+ const variableTypeVerifies = this.verifyVariableType();
34
34
 
35
- if (variableTypeVerified) {
36
- const variableVerified = this.verifyVariable();
35
+ if (variableTypeVerifies) {
36
+ const variableVerifies = this.verifyVariable();
37
37
 
38
- if (variableVerified) {
38
+ if (variableVerifies) {
39
39
  this.fileContext.addVariable(this.variable);
40
40
 
41
- verified = true;
41
+ verifies = true;
42
42
  }
43
43
  }
44
44
 
45
- if (verified) {
45
+ if (verifies) {
46
46
  this.fileContext.debug(`...verified the '${variableDeclarationString}' variable declaration.`);
47
47
  }
48
48
 
49
- return verified;
49
+ return verifies;
50
50
  }
51
51
 
52
52
  verifyVariable() {
53
- let variableVerified = false;
53
+ let variableVerifies = false;
54
54
 
55
55
  const variableString = this.variable.getString();
56
56
 
@@ -62,18 +62,18 @@ export default domAssigned(class VariableDeclaration {
62
62
  if (variablePresent) {
63
63
  this.fileContext.debug(`The '${variableName}' variable is already present.`);
64
64
  } else {
65
- variableVerified = true;
65
+ variableVerifies = true;
66
66
  }
67
67
 
68
- if ( variableVerified) {
68
+ if ( variableVerifies) {
69
69
  this.fileContext.debug(`...verified the '${variableString}' variable.`);
70
70
  }
71
71
 
72
- return variableVerified;
72
+ return variableVerifies;
73
73
  }
74
74
 
75
75
  verifyVariableType() {
76
- let variableTypeVerified = false;
76
+ let variableTypeVerifies = false;
77
77
 
78
78
  let type;
79
79
 
@@ -103,15 +103,15 @@ export default domAssigned(class VariableDeclaration {
103
103
  } else {
104
104
  this.variable.setType(type);
105
105
 
106
- variableTypeVerified = true;
106
+ variableTypeVerifies = true;
107
107
  }
108
108
  }
109
109
 
110
- if (variableTypeVerified) {
110
+ if (variableTypeVerifies) {
111
111
  this.fileContext.debug(`...verified the '${typeString}' type.`);
112
112
  }
113
113
 
114
- return variableTypeVerified;
114
+ return variableTypeVerifies;
115
115
  }
116
116
 
117
117
  static name = "VariableDeclaration";
@@ -48,58 +48,58 @@ export default domAssigned(class Declaration {
48
48
  }
49
49
 
50
50
  verify(assignments, stated, context) {
51
- let verified = false;
51
+ let verifies = false;
52
52
 
53
53
  const declarationString = this.string; ///
54
54
 
55
55
  context.trace(`Verifying the '${declarationString}' declaration...`);
56
56
 
57
- const referenceVerified = this.verifyReference(assignments, stated, context);
57
+ const referenceVerifies = this.verifyReference(assignments, stated, context);
58
58
 
59
- if (referenceVerified) {
60
- const statementVerified = this.verifyStatement(assignments, stated, context);
59
+ if (referenceVerifies) {
60
+ const statementVerifies = this.verifyStatement(assignments, stated, context);
61
61
 
62
- if (statementVerified) {
63
- let verifiedWhenStated = false,
64
- verifiedWhenDerived = false;
62
+ if (statementVerifies) {
63
+ let verifiesWhenStated = false,
64
+ verifiesWhenDerived = false;
65
65
 
66
66
  if (stated) {
67
- verifiedWhenStated = this.verifyWhenStated(assignments, context);
67
+ verifiesWhenStated = this.verifyWhenStated(assignments, context);
68
68
  } else {
69
- verifiedWhenDerived = this.verifyWhenDerived(context);
69
+ verifiesWhenDerived = this.verifyWhenDerived(context);
70
70
  }
71
71
 
72
- if (verifiedWhenStated || verifiedWhenDerived) {
73
- verified = true;
72
+ if (verifiesWhenStated || verifiesWhenDerived) {
73
+ verifies = true;
74
74
  }
75
75
  }
76
76
  }
77
77
 
78
- if (verified) {
78
+ if (verifies) {
79
79
  context.debug(`...verified the '${declarationString}' declaration.`);
80
80
  }
81
81
 
82
- return verified;
82
+ return verifies;
83
83
  }
84
84
 
85
85
  verifyReference(assignments, stated, context) {
86
- let referenceVerified;
86
+ let referenceVerifies;
87
87
 
88
88
  const referenceString = this.reference.getString();
89
89
 
90
90
  context.trace(`Verifying the '${referenceString}' reference...`);
91
91
 
92
- referenceVerified = this.reference.verify(context);
92
+ referenceVerifies = this.reference.verify(context);
93
93
 
94
- if (referenceVerified) {
94
+ if (referenceVerifies) {
95
95
  context.debug(`...verified the '${referenceString}' reference.`);
96
96
  }
97
97
 
98
- return referenceVerified;
98
+ return referenceVerifies;
99
99
  }
100
100
 
101
101
  verifyStatement(assignments, stated, context) {
102
- let statementVerified;
102
+ let statementVerifies;
103
103
 
104
104
  const statementString = this.statement.getString();
105
105
 
@@ -109,17 +109,17 @@ export default domAssigned(class Declaration {
109
109
 
110
110
  assignments = null; ///
111
111
 
112
- statementVerified = this.statement.verify(assignments, stated, context);
112
+ statementVerifies = this.statement.verify(assignments, stated, context);
113
113
 
114
- if (statementVerified) {
114
+ if (statementVerifies) {
115
115
  context.debug(`...verified the '${statementString}' statement.`);
116
116
  }
117
117
 
118
- return statementVerified;
118
+ return statementVerifies;
119
119
  }
120
120
 
121
121
  verifyWhenStated(assignments, context) {
122
- let verifiedWhenStated;
122
+ let verifiesWhenStated;
123
123
 
124
124
  const declarationString = this.string; ///
125
125
 
@@ -128,29 +128,29 @@ export default domAssigned(class Declaration {
128
128
  const metavariablePresent = context.isMetavariablePresentByReference(this.reference);
129
129
 
130
130
  if (metavariablePresent) {
131
- verifiedWhenStated = true;
131
+ verifiesWhenStated = true;
132
132
  } else {
133
133
  const metaLemmaMetatheorems = context.findMetaLemmaMetatheoremsByReference(this.reference),
134
- metaLemmaMetatheoremsUnified = metaLemmaMetatheorems.every((metaLemmaMetatheorem) => {
135
- const metaLemmaMetatheoremUnified = this.unifyMetaLemmaMetatheorem(metaLemmaMetatheorem, context);
134
+ metaLemmaMetatheoremsUnify = metaLemmaMetatheorems.every((metaLemmaMetatheorem) => {
135
+ const metaLemmaMetatheoremUnifies = this.unifyMetaLemmaMetatheorem(metaLemmaMetatheorem, context);
136
136
 
137
- if (metaLemmaMetatheoremUnified) {
137
+ if (metaLemmaMetatheoremUnifies) {
138
138
  return true;
139
139
  }
140
140
  });
141
141
 
142
- verifiedWhenStated = metaLemmaMetatheoremsUnified; ///
142
+ verifiesWhenStated = metaLemmaMetatheoremsUnify; ///
143
143
  }
144
144
 
145
- if (verifiedWhenStated) {
145
+ if (verifiesWhenStated) {
146
146
  context.debug(`...verified the '${declarationString}' stated declaration.`);
147
147
  }
148
148
 
149
- return verifiedWhenStated;
149
+ return verifiesWhenStated;
150
150
  }
151
151
 
152
152
  verifyWhenDerived(context) {
153
- let verifiedWhenDerived;
153
+ let verifiesWhenDerived;
154
154
 
155
155
  const declarationString = this.string; ///
156
156
 
@@ -158,17 +158,17 @@ export default domAssigned(class Declaration {
158
158
 
159
159
  const metaLemmaMetatheoremPresent = context.isMetaLemmaMetatheoremPresentByReference(this.reference);
160
160
 
161
- verifiedWhenDerived = metaLemmaMetatheoremPresent; ///
161
+ verifiesWhenDerived = metaLemmaMetatheoremPresent; ///
162
162
 
163
- if (verifiedWhenDerived) {
163
+ if (verifiesWhenDerived) {
164
164
  context.debug(`...verified the '${declarationString}' derived declaration.`);
165
165
  }
166
166
 
167
- return verifiedWhenDerived;
167
+ return verifiesWhenDerived;
168
168
  }
169
169
 
170
170
  unifyStatement(statement, substitutions, generalContext, specificContext) {
171
- let statementUnified;
171
+ let statementUnifies;
172
172
 
173
173
  const context = generalContext, ///
174
174
  statementString = statement.getString(),
@@ -178,19 +178,19 @@ export default domAssigned(class Declaration {
178
178
 
179
179
  const generalStatement = this.statement,
180
180
  specificStatement = statement, ///
181
- statementUUnifiedIntrinsically = unifyStatementIntrinsically(generalStatement, specificStatement, substitutions, generalContext, specificContext);
181
+ statementUUnifiesIntrinsically = unifyStatementIntrinsically(generalStatement, specificStatement, substitutions, generalContext, specificContext);
182
182
 
183
- statementUnified = statementUUnifiedIntrinsically; ///
183
+ statementUnifies = statementUUnifiesIntrinsically; ///
184
184
 
185
- if (statementUnified) {
185
+ if (statementUnifies) {
186
186
  context.debug(`...unified the '${statementString}' statement with the '${declarationStatementString}' statement.`);
187
187
  }
188
188
 
189
- return statementUnified;
189
+ return statementUnifies;
190
190
  }
191
191
 
192
192
  unifyLabelWithReference(label, substitutions, generalContext, specificContext) {
193
- let labelUnifiedWithReference;
193
+ let labelUnifiesWithReference;
194
194
 
195
195
  const context = generalContext, ///
196
196
  labelString = label.getString(),
@@ -198,19 +198,19 @@ export default domAssigned(class Declaration {
198
198
 
199
199
  context.trace(`Unifying the '${labelString}' label with the '${referenceString}' reference...`);
200
200
 
201
- const labelUnified = this.reference.unifyLabel(label, substitutions, context);
201
+ const labelUnifies = this.reference.unifyLabel(label, substitutions, context);
202
202
 
203
- labelUnifiedWithReference = labelUnified; ///
203
+ labelUnifiesWithReference = labelUnifies; ///
204
204
 
205
- if (labelUnifiedWithReference) {
205
+ if (labelUnifiesWithReference) {
206
206
  context.debug(`...unified the '${labelString}' label with the '${referenceString}' reference.`);
207
207
  }
208
208
 
209
- return labelUnifiedWithReference;
209
+ return labelUnifiesWithReference;
210
210
  }
211
211
 
212
212
  unifyMetaLemmaMetatheorem(metaLemmaMetatheorem, context) {
213
- let metaLemmaMetatheoremUnified;
213
+ let metaLemmaMetatheoremUnifies = false;
214
214
 
215
215
  const declarationString = this.string, ///
216
216
  metaLemmaMetatheoremString = metaLemmaMetatheorem.getString();
@@ -223,26 +223,28 @@ export default domAssigned(class Declaration {
223
223
  labelSubstitutions = Substitutions.fromNothing(),
224
224
  label = metaLemmaMetatheorem.getLabel(),
225
225
  substitutions = labelSubstitutions, ///
226
- labelUnifiedWithReference = this.unifyLabelWithReference(label, substitutions, generalContext, specificContext);
226
+ labelUnifiesWithReference = this.unifyLabelWithReference(label, substitutions, generalContext, specificContext);
227
227
 
228
- if (labelUnifiedWithReference) {
228
+ if (labelUnifiesWithReference) {
229
229
  const statementSubstitutions = Substitutions.fromNothing(),
230
230
  statement = metaLemmaMetatheorem.getStatement(),
231
231
  substitutions = statementSubstitutions, ///
232
- statementUUnified = this.unifyStatement(statement, substitutions, generalContext, specificContext);
232
+ statementUUnifies = this.unifyStatement(statement, substitutions, generalContext, specificContext);
233
233
 
234
- if (statementUUnified) {
235
- const labelSubstitutionsMatchStatementSubstitutions = labelSubstitutions.matchSubstitutions(statementSubstitutions);
234
+ if (statementUUnifies) {
235
+ const labelSubstitutionsCorrelateStatementSubstitutions = labelSubstitutions.correlateSubstitutions(statementSubstitutions);
236
236
 
237
- metaLemmaMetatheoremUnified = labelSubstitutionsMatchStatementSubstitutions; ///
237
+ if (labelSubstitutionsCorrelateStatementSubstitutions) {
238
+ metaLemmaMetatheoremUnifies = true; ///
239
+ }
238
240
  }
239
241
  }
240
242
 
241
- if (metaLemmaMetatheoremUnified) {
243
+ if (metaLemmaMetatheoremUnifies) {
242
244
  context.trace(`...unified the '${metaLemmaMetatheoremString}' meta-lemma or metatheorem with the '${declarationString}' declaration...`);
243
245
  }
244
246
 
245
- return metaLemmaMetatheoremUnified;
247
+ return metaLemmaMetatheoremUnifies;
246
248
  }
247
249
 
248
250
  static name = "Declaration";
@@ -20,7 +20,7 @@ export default domAssigned(class Deduction {
20
20
  }
21
21
 
22
22
  verify(context) {
23
- let verified = false;
23
+ let verifies = false;
24
24
 
25
25
  const deductionString = this.string; ///
26
26
 
@@ -29,22 +29,22 @@ export default domAssigned(class Deduction {
29
29
  if (this.statement !== null) {
30
30
  const stated = true,
31
31
  assignments = null,
32
- statementVerified = this.statement.verify(assignments, stated, context);
32
+ statementVerifies = this.statement.verify(assignments, stated, context);
33
33
 
34
- verified = statementVerified; ///
34
+ verifies = statementVerifies; ///
35
35
  } else {
36
36
  context.debug(`Unable to verify the '${deductionString}' deduction because it is nonsense.`);
37
37
  }
38
38
 
39
- if (verified) {
39
+ if (verifies) {
40
40
  context.debug(`...verified the '${deductionString}' deduction.`);
41
41
  }
42
42
 
43
- return verified;
43
+ return verifies;
44
44
  }
45
45
 
46
46
  unifyStatement(statement, substitutions, generalContext, specificContext) {
47
- let statementUnified;
47
+ let statementUnifies;
48
48
 
49
49
  const deduction = this, ///
50
50
  statementString = statement.getString(),
@@ -52,17 +52,17 @@ export default domAssigned(class Deduction {
52
52
 
53
53
  specificContext.trace(`Unifying the '${statementString}' statement with the '${deductionString}' deduction...`);
54
54
 
55
- statementUnified = this.statement.unifyStatement(statement, substitutions, generalContext, specificContext);
55
+ statementUnifies = this.statement.unifyStatement(statement, substitutions, generalContext, specificContext);
56
56
 
57
- if (statementUnified) {
57
+ if (statementUnifies) {
58
58
  specificContext.debug(`...unified the '${statementString}' statement with the '${deductionString}' deduction.`);
59
59
  }
60
60
 
61
- return statementUnified;
61
+ return statementUnifies;
62
62
  }
63
63
 
64
64
  unifyDeduction(deduction, substitutions, generalContext, specificContext) {
65
- let deductionUnified;
65
+ let deductionUnifies;
66
66
 
67
67
  const context = specificContext, ///
68
68
  specificDeduction = deduction, ///
@@ -72,15 +72,15 @@ export default domAssigned(class Deduction {
72
72
  context.trace(`Unifying the '${specificDeductionString}' deduction with the '${generalDeductionString}' deduction...`);
73
73
 
74
74
  const statement = specificDeduction.getStatement(),
75
- statementUnified = this.unifyStatement(statement, substitutions, generalContext, specificContext);
75
+ statementUnifies = this.unifyStatement(statement, substitutions, generalContext, specificContext);
76
76
 
77
- deductionUnified = statementUnified; ///
77
+ deductionUnifies = statementUnifies; ///
78
78
 
79
- if (deductionUnified) {
79
+ if (deductionUnifies) {
80
80
  context.debug(`...unified the '${specificDeductionString}' deduction with the '${generalDeductionString}' deduction.`);
81
81
  }
82
82
 
83
- return deductionUnified;
83
+ return deductionUnifies;
84
84
  }
85
85
 
86
86
  toJSON() {