occam-verify-cli 1.0.913 → 1.0.920
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.
- package/lib/context/bounded.js +1 -4
- package/lib/element/assertion/signature.js +37 -31
- package/lib/element/deduction.js +1 -14
- package/lib/element/proofAssertion/step.js +27 -40
- package/lib/element/signature.js +26 -59
- package/lib/element/subproof.js +1 -23
- package/lib/element/topLevelAssertion/axiom.js +71 -100
- package/lib/element/topLevelAssertion.js +13 -36
- package/lib/node/proofAssertion/step.js +5 -5
- package/lib/node/qualification.js +4 -4
- package/lib/node/statement.js +4 -4
- package/lib/process/unify.js +21 -5
- package/lib/utilities/context.js +6 -1
- package/lib/utilities/element.js +3 -3
- package/lib/utilities/equivalences.js +1 -13
- package/lib/utilities/unification.js +95 -116
- package/package.json +4 -4
- package/src/context/bounded.js +1 -3
- package/src/element/assertion/signature.js +47 -34
- package/src/element/deduction.js +0 -25
- package/src/element/proofAssertion/step.js +36 -59
- package/src/element/signature.js +37 -91
- package/src/element/subproof.js +0 -35
- package/src/element/topLevelAssertion/axiom.js +95 -131
- package/src/element/topLevelAssertion.js +11 -45
- package/src/node/proofAssertion/step.js +4 -4
- package/src/node/qualification.js +3 -3
- package/src/node/statement.js +3 -3
- package/src/process/unify.js +28 -3
- package/src/utilities/context.js +6 -0
- package/src/utilities/element.js +2 -2
- package/src/utilities/equivalences.js +0 -12
- package/src/utilities/unification.js +117 -145
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import Assertion from "../assertion";
|
|
4
4
|
|
|
5
5
|
import { define } from "../../elements";
|
|
6
|
-
import { instantiate } from "../../utilities/context";
|
|
6
|
+
import { join, reconcile, instantiate } from "../../utilities/context";
|
|
7
7
|
import { instantiateSignatureAssertion } from "../../process/instantiate";
|
|
8
8
|
import { signatureFromSignatureAssertionNode, referenceFromSignatureAssertionNode, signatureAssertionFromStatementNode } from "../../utilities/element";
|
|
9
9
|
|
|
@@ -30,10 +30,6 @@ export default define(class SignatureAssertion extends Assertion {
|
|
|
30
30
|
return signatureAssertionNode;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
compareSubstitutions(substitutions, context) { return this.signature.compareSubstitutions(substitutions, context); }
|
|
34
|
-
|
|
35
|
-
correlateSubstitutions(substitutions, context) { return this.signature.correlateSubstitutions(substitutions, context); }
|
|
36
|
-
|
|
37
33
|
validate(context) {
|
|
38
34
|
let signatureAssertion = null;
|
|
39
35
|
|
|
@@ -118,7 +114,7 @@ export default define(class SignatureAssertion extends Assertion {
|
|
|
118
114
|
const satisfiable = axiom.isSatisfiable();
|
|
119
115
|
|
|
120
116
|
if (satisfiable) {
|
|
121
|
-
const signatureUnifies =
|
|
117
|
+
const signatureUnifies = this.unifySignature(context);
|
|
122
118
|
|
|
123
119
|
if (signatureUnifies) {
|
|
124
120
|
this.reference = reference;
|
|
@@ -130,7 +126,6 @@ export default define(class SignatureAssertion extends Assertion {
|
|
|
130
126
|
|
|
131
127
|
context.debug(`The '${axiomString}' axiom is not satisfiable.`);
|
|
132
128
|
}
|
|
133
|
-
|
|
134
129
|
} else {
|
|
135
130
|
const referencdString = reference.getString();
|
|
136
131
|
|
|
@@ -145,46 +140,64 @@ export default define(class SignatureAssertion extends Assertion {
|
|
|
145
140
|
return referenceVerifies;
|
|
146
141
|
}
|
|
147
142
|
|
|
148
|
-
|
|
149
|
-
let
|
|
143
|
+
unifySignature(context) {
|
|
144
|
+
let signatureUnifies;
|
|
145
|
+
|
|
146
|
+
const signatureAssertionString = this.getString(); ///
|
|
147
|
+
|
|
148
|
+
context.trace(`Unifying the '${signatureAssertionString}' signature assertion's signature...`);
|
|
150
149
|
|
|
151
|
-
const
|
|
152
|
-
signatureAssertionString = this.getString(); ///
|
|
150
|
+
const axiom = context.findAxiomByReference(this.reference);
|
|
153
151
|
|
|
154
|
-
context
|
|
152
|
+
context = this.signature.getContext();
|
|
153
|
+
|
|
154
|
+
reconcile((context) => {
|
|
155
|
+
signatureUnifies = axiom.unifySignature(this.signature, context);
|
|
156
|
+
}, context);
|
|
157
|
+
|
|
158
|
+
if (signatureUnifies) {
|
|
159
|
+
context.debug(`...unified the '${signatureAssertionString}' signature assertion's signature.`);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
return signatureUnifies;
|
|
163
|
+
}
|
|
155
164
|
|
|
156
|
-
|
|
165
|
+
async unifyTopLevelAssertion(topLevelAssertion, context) {
|
|
166
|
+
let topLevelAssertionUnifies;
|
|
157
167
|
|
|
158
168
|
const axiom = context.findAxiomByReference(this.reference),
|
|
159
|
-
|
|
169
|
+
signatureContext = this.signature.getContext(),
|
|
170
|
+
specificContext = signatureContext; ///
|
|
160
171
|
|
|
161
|
-
|
|
162
|
-
const
|
|
172
|
+
await join(async (specificContext) => {
|
|
173
|
+
const context = specificContext; ///
|
|
163
174
|
|
|
164
|
-
|
|
165
|
-
|
|
175
|
+
await reconcile(async (context) => {
|
|
176
|
+
axiom.unifySignature(this.signature, context);
|
|
166
177
|
|
|
167
|
-
|
|
178
|
+
topLevelAssertionUnifies = await axiom.unifyTopLevelAssertion(topLevelAssertion, context);
|
|
179
|
+
}, context);
|
|
180
|
+
}, specificContext, context);
|
|
168
181
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
substitutionsCorrelate = substitutionsA.correlateSubstitutions(substitutionsB);
|
|
182
|
+
return topLevelAssertionUnifies;
|
|
183
|
+
}
|
|
172
184
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
substitutionsBString = substitutionsB.asString();
|
|
185
|
+
async unifyStepAndSubproofOrProofAssertions(step, subproofOrProofAssertions, context) {
|
|
186
|
+
let stepAndSubproofOrProofAssertionsUnify;
|
|
176
187
|
|
|
177
|
-
|
|
188
|
+
const axiom = context.findAxiomByReference(this.reference),
|
|
189
|
+
signatureContext = this.signature.getContext(),
|
|
190
|
+
specificContext = signatureContext; ///
|
|
178
191
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
}
|
|
192
|
+
await join(async (specificContext) => {
|
|
193
|
+
const context = specificContext; ///
|
|
184
194
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
195
|
+
await reconcile(async (context) => {
|
|
196
|
+
axiom.unifySignature(this.signature, context);
|
|
197
|
+
|
|
198
|
+
stepAndSubproofOrProofAssertionsUnify = await axiom.unifyStepAndSubproofOrProofAssertions(step, subproofOrProofAssertions, context);
|
|
199
|
+
}, context);
|
|
200
|
+
}, specificContext, context);
|
|
188
201
|
|
|
189
202
|
return stepAndSubproofOrProofAssertionsUnify;
|
|
190
203
|
}
|
package/src/element/deduction.js
CHANGED
|
@@ -130,31 +130,6 @@ export default define(class Deduction extends Element {
|
|
|
130
130
|
return stepUnifies;
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
unifyDeduction(deduction, substitutions, generalContext, specificContext) {
|
|
134
|
-
let deductionUnifies = false;
|
|
135
|
-
|
|
136
|
-
const context = specificContext, ///
|
|
137
|
-
generalDeduction = this, ///
|
|
138
|
-
specificDeduction = deduction, ///
|
|
139
|
-
generalDeductionString = generalDeduction.getString(),
|
|
140
|
-
specificDeductionString = specificDeduction.getString();
|
|
141
|
-
|
|
142
|
-
context.trace(`Unifying the '${specificDeductionString}' deduction with the '${generalDeductionString}' deduction...`);
|
|
143
|
-
|
|
144
|
-
const statement = specificDeduction.getStatement(),
|
|
145
|
-
statementUnifies = this.unifyStatement(statement, substitutions, generalContext, specificContext);
|
|
146
|
-
|
|
147
|
-
if (statementUnifies) {
|
|
148
|
-
deductionUnifies = true;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
if (deductionUnifies) {
|
|
152
|
-
context.debug(`...unified the '${specificDeductionString}' deduction with the '${generalDeductionString}' deduction.`);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
return deductionUnifies;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
133
|
toJSON() {
|
|
159
134
|
const context = this.getContext();
|
|
160
135
|
|
|
@@ -50,7 +50,7 @@ export default define(class Step extends ProofAssertion {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
isQualified() {
|
|
53
|
-
const qualified = (this.reference !== null);
|
|
53
|
+
const qualified = ((this.reference !== null) || (this.signatureAssertion !== null));
|
|
54
54
|
|
|
55
55
|
return qualified;
|
|
56
56
|
}
|
|
@@ -164,29 +164,6 @@ export default define(class Step extends ProofAssertion {
|
|
|
164
164
|
return validates;
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
-
validateReference(context) {
|
|
168
|
-
let referenceValidates = true; ///
|
|
169
|
-
|
|
170
|
-
if (this.reference !== null) {
|
|
171
|
-
const stepString = this.getString(), ///
|
|
172
|
-
referenceString = this.reference.getString();
|
|
173
|
-
|
|
174
|
-
context.trace(`Validating the '${stepString}' step's '${referenceString}' reference... `);
|
|
175
|
-
|
|
176
|
-
const reference = this.reference.validate(context);
|
|
177
|
-
|
|
178
|
-
if (reference === null) {
|
|
179
|
-
referenceValidates = false;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
if (referenceValidates) {
|
|
183
|
-
context.debug(`...validated the '${stepString}' step's '${referenceString}' reference. `);
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
return referenceValidates;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
167
|
validateStatement(context) {
|
|
191
168
|
let statementValidates = false;
|
|
192
169
|
|
|
@@ -211,8 +188,35 @@ export default define(class Step extends ProofAssertion {
|
|
|
211
188
|
return statementValidates;
|
|
212
189
|
}
|
|
213
190
|
|
|
191
|
+
validateReference(context) {
|
|
192
|
+
let referenceValidates = false;
|
|
193
|
+
|
|
194
|
+
if (this.reference !== null) {
|
|
195
|
+
const stepString = this.getString(), ///
|
|
196
|
+
referenceString = this.reference.getString();
|
|
197
|
+
|
|
198
|
+
context.trace(`Validating the '${stepString}' step's '${referenceString}' reference... `);
|
|
199
|
+
|
|
200
|
+
const reference = this.reference.validate(context);
|
|
201
|
+
|
|
202
|
+
if (reference !== null) {
|
|
203
|
+
this.reference = reference;
|
|
204
|
+
|
|
205
|
+
referenceValidates = true;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
if (referenceValidates) {
|
|
209
|
+
context.debug(`...validated the '${stepString}' step's '${referenceString}' reference. `);
|
|
210
|
+
}
|
|
211
|
+
} else {
|
|
212
|
+
referenceValidates = true;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
return referenceValidates;
|
|
216
|
+
}
|
|
217
|
+
|
|
214
218
|
validateSignatureAssertion(context) {
|
|
215
|
-
let signatureAssertionValidates =
|
|
219
|
+
let signatureAssertionValidates = false;
|
|
216
220
|
|
|
217
221
|
if (this.signatureAssertion !== null) {
|
|
218
222
|
const stepString = this.getString(), ///
|
|
@@ -222,13 +226,17 @@ export default define(class Step extends ProofAssertion {
|
|
|
222
226
|
|
|
223
227
|
const signatureAssertion = this.signatureAssertion.validate(context);
|
|
224
228
|
|
|
225
|
-
if (signatureAssertion
|
|
226
|
-
|
|
229
|
+
if (signatureAssertion !== null) {
|
|
230
|
+
this.signatureAssertion = signatureAssertion;
|
|
231
|
+
|
|
232
|
+
signatureAssertionValidates = true;
|
|
227
233
|
}
|
|
228
234
|
|
|
229
235
|
if (signatureAssertionValidates) {
|
|
230
|
-
context.debug(`...
|
|
236
|
+
context.debug(`...validated the '${stepString}' step's '${signatureAssertionString}' signature assertion. `);
|
|
231
237
|
}
|
|
238
|
+
} else {
|
|
239
|
+
signatureAssertionValidates = true;
|
|
232
240
|
}
|
|
233
241
|
|
|
234
242
|
return signatureAssertionValidates;
|
|
@@ -264,36 +272,5 @@ export default define(class Step extends ProofAssertion {
|
|
|
264
272
|
return unifies;
|
|
265
273
|
}
|
|
266
274
|
|
|
267
|
-
unifyWithSignatureAssertion(signatureAssertion, context) {
|
|
268
|
-
let unifiesWithSignatureAssertion = false;
|
|
269
|
-
|
|
270
|
-
const stepString = this.getString(), ///
|
|
271
|
-
signatureAssertionString = signatureAssertion.getString();
|
|
272
|
-
|
|
273
|
-
context.trace(`Unifying the '${stepString}' step with the '${signatureAssertionString}' signature assertion...`);
|
|
274
|
-
|
|
275
|
-
const reference = signatureAssertion.getReference(),
|
|
276
|
-
axiom = context.findAxiomByReference(reference);
|
|
277
|
-
|
|
278
|
-
if (axiom !== null) {
|
|
279
|
-
const step = this, ///
|
|
280
|
-
stepUnifies = axiom.unifyStep(step, context);
|
|
281
|
-
|
|
282
|
-
if (stepUnifies) {
|
|
283
|
-
const substitutionsCompare = signatureAssertion.compareSubstitutions(context);
|
|
284
|
-
|
|
285
|
-
if (substitutionsCompare) {
|
|
286
|
-
unifiesWithSignatureAssertion = true;
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
if (unifiesWithSignatureAssertion) {
|
|
292
|
-
context.debug(`...unified the '${stepString}' step with the '${signatureAssertionString}' signature assertion.`);
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
return unifiesWithSignatureAssertion;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
275
|
static name = "Step";
|
|
299
276
|
});
|
package/src/element/signature.js
CHANGED
|
@@ -6,9 +6,9 @@ import { arrayUtilities } from "necessary";
|
|
|
6
6
|
import { define } from "../elements";
|
|
7
7
|
import { instantiateSignature } from "../process/instantiate";
|
|
8
8
|
import { signatureFromSignatureNode } from "../utilities/element";
|
|
9
|
-
import { attempt, reconcile, serialise, unserialise, instantiate
|
|
9
|
+
import { join, ablate, attempt, reconcile, serialise, unserialise, instantiate } from "../utilities/context";
|
|
10
10
|
|
|
11
|
-
const { match
|
|
11
|
+
const { match } = arrayUtilities;
|
|
12
12
|
|
|
13
13
|
export default define(class Signature extends Element {
|
|
14
14
|
constructor(context, string, node, lineIndex, terms) {
|
|
@@ -173,48 +173,52 @@ export default define(class Signature extends Element {
|
|
|
173
173
|
return termsValidate
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
-
unifySignature(signature,
|
|
177
|
-
let signatureUnifies
|
|
176
|
+
unifySignature(signature, generalContext, specificContext) {
|
|
177
|
+
let signatureUnifies;
|
|
178
178
|
|
|
179
|
-
const
|
|
179
|
+
const context = specificContext, ///
|
|
180
|
+
generalSignature = this,
|
|
180
181
|
specificSignature = signature, ///
|
|
181
182
|
generalSignatureString = generalSignature.getString(),
|
|
182
183
|
specificSignatureString = specificSignature.getString();
|
|
183
184
|
|
|
184
185
|
context.trace(`Unifying the '${specificSignatureString}' signature with the '${generalSignatureString}' signature...`);
|
|
185
186
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
187
|
+
const generalSignatureTerms = generalSignature.getTerms(),
|
|
188
|
+
specificSignatureTerms = specificSignature.getTerms(),
|
|
189
|
+
generalSignatureContext = generalSignature.getContext(),
|
|
190
|
+
specificSignatureContext = specificSignature.getContext(),
|
|
191
|
+
generalTerms = generalSignatureTerms, ///
|
|
192
|
+
specificTerms = specificSignatureTerms, ///
|
|
193
|
+
generalContexts = [
|
|
194
|
+
generalSignatureContext,
|
|
195
|
+
generalContext
|
|
196
|
+
],
|
|
197
|
+
specificContexts = [
|
|
198
|
+
specificSignatureContext,
|
|
199
|
+
specificContext
|
|
200
|
+
];
|
|
201
|
+
|
|
202
|
+
join((generalContext) => {
|
|
203
|
+
join((specificContext) => {
|
|
204
|
+
signatureUnifies = match(generalTerms, specificTerms, (generalTerm, specificTerm) => {
|
|
205
|
+
let termUnifies;
|
|
206
|
+
|
|
207
|
+
reconcile((specificContext) => {
|
|
208
|
+
termUnifies = generalTerm.unifyTerm(specificTerm, generalContext, specificContext);
|
|
209
|
+
|
|
210
|
+
if (termUnifies) {
|
|
211
|
+
specificContext.commit();
|
|
212
|
+
}
|
|
213
|
+
}, specificContext);
|
|
207
214
|
|
|
208
215
|
if (termUnifies) {
|
|
209
|
-
|
|
216
|
+
return true;
|
|
210
217
|
}
|
|
211
|
-
}
|
|
218
|
+
});
|
|
219
|
+
}, ...specificContexts);
|
|
220
|
+
}, ...generalContexts);
|
|
212
221
|
|
|
213
|
-
if (termUnifies) {
|
|
214
|
-
return true;
|
|
215
|
-
}
|
|
216
|
-
});
|
|
217
|
-
}, specificContext);
|
|
218
222
|
|
|
219
223
|
if (signatureUnifies) {
|
|
220
224
|
context.debug(`...unified the '${specificSignatureString}' signature with the '${generalSignatureString}' signature.`);
|
|
@@ -223,64 +227,6 @@ export default define(class Signature extends Element {
|
|
|
223
227
|
return signatureUnifies;
|
|
224
228
|
}
|
|
225
229
|
|
|
226
|
-
compareSubstitutions(substitutions, context) {
|
|
227
|
-
let substitutionsCompares = false;
|
|
228
|
-
|
|
229
|
-
const signatureString = this.getString(), ///
|
|
230
|
-
substitutionsString = substitutions.asString();
|
|
231
|
-
|
|
232
|
-
context.trace(`Comparing the '${substitutionsString}' substitutions against the '${signatureString}' signature...`);
|
|
233
|
-
|
|
234
|
-
const array = substitutions.getArray(),
|
|
235
|
-
compares = compare(this.terms, array, (term, substitution) => {
|
|
236
|
-
const substitutionTerm = substitution.getTerm(),
|
|
237
|
-
substitutionTermEqualToTerm = substitutionTerm.isEqualTo(term);
|
|
238
|
-
|
|
239
|
-
if (substitutionTermEqualToTerm) {
|
|
240
|
-
return true;
|
|
241
|
-
}
|
|
242
|
-
});
|
|
243
|
-
|
|
244
|
-
if (compares) {
|
|
245
|
-
substitutionsCompares = true;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
if (substitutionsCompares) {
|
|
249
|
-
context.debug(`...compared the '${substitutionsString}' substitutions against the '${signatureString}' signature.`);
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
return substitutionsCompares;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
correlateSubstitutions(substitutions, context) {
|
|
256
|
-
let substitutionsCorrelates = false;
|
|
257
|
-
|
|
258
|
-
const signatureString = this.getString(), ///
|
|
259
|
-
substitutionsString = substitutions.asString();
|
|
260
|
-
|
|
261
|
-
context.trace(`Correlating the '${substitutionsString}' substitutions against the '${signatureString}' signature...`);
|
|
262
|
-
|
|
263
|
-
const array = substitutions.getArray(),
|
|
264
|
-
correlates = correlate(this.terms, array, (term, substitution) => {
|
|
265
|
-
const substitutionTerm = substitution.getTerm(),
|
|
266
|
-
substitutionTermEqualToTerm = substitutionTerm.isEqualTo(term);
|
|
267
|
-
|
|
268
|
-
if (substitutionTermEqualToTerm) {
|
|
269
|
-
return true;
|
|
270
|
-
}
|
|
271
|
-
});
|
|
272
|
-
|
|
273
|
-
if (correlates) {
|
|
274
|
-
substitutionsCorrelates = true;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
if (substitutionsCorrelates) {
|
|
278
|
-
context.debug(`...correlated the '${substitutionsString}' substitutions against the '${signatureString}' signature.`);
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
return substitutionsCorrelates;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
230
|
static name = "Signature";
|
|
285
231
|
|
|
286
232
|
toJSON() {
|
package/src/element/subproof.js
CHANGED
|
@@ -112,40 +112,5 @@ export default define(class Subproof extends Element {
|
|
|
112
112
|
return subDerivationVerifies;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
unifyWithSignatureAssertion(signatureAssertion, context) {
|
|
116
|
-
let unifiesWithSignatureAssertion = false;
|
|
117
|
-
|
|
118
|
-
const subproofString = this.getString(), ///
|
|
119
|
-
signatureAssertionString = signatureAssertion.getString();
|
|
120
|
-
|
|
121
|
-
context.trace(`Unifying the '${subproofString}' subproof with the '${signatureAssertionString}' signature assertion...`)
|
|
122
|
-
|
|
123
|
-
const reference = signatureAssertion.getReference(),
|
|
124
|
-
axiom = context.findAxiomByReference(reference);
|
|
125
|
-
|
|
126
|
-
if (axiom !== null) {
|
|
127
|
-
const axiomSatisfiable = axiom.isSatisfiable();
|
|
128
|
-
|
|
129
|
-
if (axiomSatisfiable) {
|
|
130
|
-
const subproof = this, ///
|
|
131
|
-
statementUnifies = axiom.unifySubproof(subproof, context);
|
|
132
|
-
|
|
133
|
-
if (statementUnifies) {
|
|
134
|
-
const substitutionsCompare = signatureAssertion.compareSubstitutions(substitutions, context);
|
|
135
|
-
|
|
136
|
-
if (substitutionsCompare) {
|
|
137
|
-
unifiesWithSignatureAssertion = true;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
if (unifiesWithSignatureAssertion) {
|
|
144
|
-
context.debug(`...unified the '${subproofString}' subproof with the '${signatureAssertionString}' signature assertion.`)
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
return unifiesWithSignatureAssertion;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
115
|
static name = "Subproof";
|
|
151
116
|
});
|