occam-verify-cli 1.0.843 → 1.0.848
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 +18 -18
- package/lib/context/branching.js +8 -3
- package/lib/context/ephemeral.js +44 -71
- package/lib/context/file/nominal.js +18 -24
- package/lib/context/synoptic.js +135 -128
- package/lib/context.js +49 -31
- package/lib/element/assertion/contained.js +6 -3
- package/lib/element/assertion/defined.js +11 -4
- package/lib/element/assertion/property.js +6 -3
- package/lib/element/assertion/satisfies.js +6 -3
- package/lib/element/assertion/subproof.js +6 -3
- package/lib/element/assertion/type.js +5 -5
- package/lib/element/assumption/metaLevel.js +12 -10
- package/lib/element/assumption.js +2 -2
- package/lib/element/derivation.js +1 -8
- package/lib/element/equality.js +3 -3
- package/lib/element/equivalence.js +1 -8
- package/lib/element/error.js +1 -8
- package/lib/element/hypothesis.js +2 -2
- package/lib/element/judgement.js +15 -11
- package/lib/element/metaType.js +2 -2
- package/lib/element/metavariable.js +30 -35
- package/lib/element/parameter.js +2 -2
- package/lib/element/procedureCall.js +2 -2
- package/lib/element/procedureReference.js +2 -2
- package/lib/element/proof.js +1 -8
- package/lib/element/proofAssertion/premise.js +4 -3
- package/lib/element/proofAssertion/supposition.js +4 -3
- package/lib/element/section.js +1 -8
- package/lib/element/signature.js +2 -2
- package/lib/element/statement.js +2 -2
- package/lib/element/subDerivation.js +1 -8
- package/lib/element/subproof.js +1 -8
- package/lib/element/substitution/frame.js +20 -6
- package/lib/element/substitution/reference.js +20 -6
- package/lib/element/substitution/statement.js +19 -5
- package/lib/element/substitution/term.js +19 -5
- package/lib/element/substitution.js +12 -7
- package/lib/element/typePrefix.js +2 -2
- package/lib/process/unify.js +7 -2
- package/lib/utilities/element.js +3 -5
- package/lib/utilities/json.js +1 -15
- package/lib/utilities/synoptic.js +126 -0
- package/package.json +1 -1
- package/src/context/bounded.js +23 -23
- package/src/context/branching.js +12 -2
- package/src/context/ephemeral.js +94 -110
- package/src/context/file/nominal.js +18 -34
- package/src/context/synoptic.js +195 -150
- package/src/context.js +66 -42
- package/src/element/assertion/contained.js +8 -3
- package/src/element/assertion/defined.js +15 -4
- package/src/element/assertion/property.js +8 -3
- package/src/element/assertion/satisfies.js +10 -4
- package/src/element/assertion/subproof.js +8 -3
- package/src/element/assertion/type.js +10 -8
- package/src/element/assumption/metaLevel.js +13 -8
- package/src/element/assumption.js +2 -2
- package/src/element/derivation.js +0 -11
- package/src/element/equality.js +3 -3
- package/src/element/equivalence.js +0 -11
- package/src/element/error.js +0 -11
- package/src/element/hypothesis.js +2 -2
- package/src/element/judgement.js +22 -14
- package/src/element/metaType.js +2 -2
- package/src/element/metavariable.js +5 -13
- package/src/element/parameter.js +2 -2
- package/src/element/procedureCall.js +2 -2
- package/src/element/procedureReference.js +2 -2
- package/src/element/proof.js +0 -11
- package/src/element/proofAssertion/premise.js +3 -1
- package/src/element/proofAssertion/supposition.js +3 -1
- package/src/element/section.js +0 -11
- package/src/element/signature.js +2 -2
- package/src/element/statement.js +2 -2
- package/src/element/subDerivation.js +0 -11
- package/src/element/subproof.js +0 -11
- package/src/element/substitution/frame.js +31 -11
- package/src/element/substitution/reference.js +31 -11
- package/src/element/substitution/statement.js +33 -13
- package/src/element/substitution/term.js +31 -11
- package/src/element/substitution.js +16 -11
- package/src/element/typePrefix.js +2 -2
- package/src/process/unify.js +11 -4
- package/src/utilities/element.js +3 -6
- package/src/utilities/json.js +0 -12
- package/src/utilities/synoptic.js +105 -0
|
@@ -5,8 +5,8 @@ import Substitution from "../substitution";
|
|
|
5
5
|
import { define } from "../../elements";
|
|
6
6
|
import { instantiateFrameSubstitution } from "../../process/instantiate";
|
|
7
7
|
import { frameSubstitutionFromFrameSubstitutionNode } from "../../utilities/element";
|
|
8
|
-
import { join, ablate, descend, attempt, instantiate } from "../../utilities/context";
|
|
9
8
|
import { frameSubstitutionStringFromFrameAndMetavariable } from "../../utilities/string";
|
|
9
|
+
import { join, ablate, descend, attempt, serialise, unserialise, instantiate } from "../../utilities/context";
|
|
10
10
|
|
|
11
11
|
export default define(class FrameSubstitution extends Substitution {
|
|
12
12
|
constructor(context, string, node, lineIndex, generalContext, targetFrame, replacementFrame) {
|
|
@@ -184,22 +184,42 @@ export default define(class FrameSubstitution extends Substitution {
|
|
|
184
184
|
|
|
185
185
|
static name = "FrameSubstitution";
|
|
186
186
|
|
|
187
|
+
toJSON() {
|
|
188
|
+
const context = this.getContext();
|
|
189
|
+
|
|
190
|
+
return serialise((context) => {
|
|
191
|
+
const { name } = this.constructor,
|
|
192
|
+
string = this.getString(),
|
|
193
|
+
lineIndex = this.getLineIndex(),
|
|
194
|
+
json = {
|
|
195
|
+
name,
|
|
196
|
+
context,
|
|
197
|
+
string,
|
|
198
|
+
lineIndex
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
return json;
|
|
202
|
+
}, context);
|
|
203
|
+
}
|
|
204
|
+
|
|
187
205
|
static fromJSON(json, context) {
|
|
188
206
|
let frameSubstitutionn = null;
|
|
189
207
|
|
|
190
208
|
const { name } = json;
|
|
191
209
|
|
|
192
210
|
if (this.name === name) {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
211
|
+
unserialise((json, context) => {
|
|
212
|
+
instantiate((context) => {
|
|
213
|
+
const { string, lineIndex } = json,
|
|
214
|
+
frameSubstitutionNode = instantiateFrameSubstitution(string, context),
|
|
215
|
+
node = frameSubstitutionNode, ///
|
|
216
|
+
generalContext = generalContextFromFrameSubstitutionNode(frameSubstitutionNode, context),
|
|
217
|
+
targetFrame = targetFrameFromFrameSubstitutionNode(frameSubstitutionNode, context),
|
|
218
|
+
replacementFrame = replacementFrameFromFrameSubstitutionNode(frameSubstitutionNode, context);
|
|
219
|
+
|
|
220
|
+
frameSubstitutionn = new FrameSubstitution(context, string, node, lineIndex, generalContext, targetFrame, replacementFrame);
|
|
221
|
+
}, context);
|
|
222
|
+
}, json, context);
|
|
203
223
|
}
|
|
204
224
|
|
|
205
225
|
return frameSubstitutionn;
|
|
@@ -4,9 +4,9 @@ import Substitution from "../substitution";
|
|
|
4
4
|
|
|
5
5
|
import { define } from "../../elements";
|
|
6
6
|
import { instantiateReferenceSubstitution } from "../../process/instantiate";
|
|
7
|
-
import { join, descend, ablate, attempt, instantiate } from "../../utilities/context";
|
|
8
7
|
import { referenceSubstitutionFromReferenceSubstitutionNode } from "../../utilities/element";
|
|
9
8
|
import { referenceSubstitutionStringFromReferenceAndMetavariable } from "../../utilities/string";
|
|
9
|
+
import { join, ablate, descend, attempt, serialise, unserialise, instantiate } from "../../utilities/context";
|
|
10
10
|
|
|
11
11
|
export default define(class ReferenceSubstitution extends Substitution {
|
|
12
12
|
constructor(context, string, node, lineIndex, generalContext, targetReference, replacementReference) {
|
|
@@ -191,22 +191,42 @@ export default define(class ReferenceSubstitution extends Substitution {
|
|
|
191
191
|
|
|
192
192
|
static name = "ReferenceSubstitution";
|
|
193
193
|
|
|
194
|
+
toJSON() {
|
|
195
|
+
const context = this.getContext();
|
|
196
|
+
|
|
197
|
+
return serialise((context) => {
|
|
198
|
+
const { name } = this.constructor,
|
|
199
|
+
string = this.getString(),
|
|
200
|
+
lineIndex = this.getLineIndex(),
|
|
201
|
+
json = {
|
|
202
|
+
name,
|
|
203
|
+
context,
|
|
204
|
+
string,
|
|
205
|
+
lineIndex
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
return json;
|
|
209
|
+
}, context);
|
|
210
|
+
}
|
|
211
|
+
|
|
194
212
|
static fromJSON(json, context) {
|
|
195
213
|
let referenceSubstitutionn = null;
|
|
196
214
|
|
|
197
215
|
const { name } = json;
|
|
198
216
|
|
|
199
217
|
if (this.name === name) {
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
218
|
+
unserialise((json, context) => {
|
|
219
|
+
instantiate((context) => {
|
|
220
|
+
const { string, lineIndex } = json,
|
|
221
|
+
referenceSubstitutionNode = instantiateReferenceSubstitution(string, context),
|
|
222
|
+
node = referenceSubstitutionNode, ///
|
|
223
|
+
generalContext = generalContextFromReferenceSubstitutionNode(referenceSubstitutionNode, context),
|
|
224
|
+
targetReference = targetReferenceFromReferenceSubstitutionNode(referenceSubstitutionNode, context),
|
|
225
|
+
replacementReference = replacementReferenceFromReferenceSubstitutionNode(referenceSubstitutionNode, context);
|
|
226
|
+
|
|
227
|
+
referenceSubstitutionn = new ReferenceSubstitution(context, string, node, lineIndex, generalContext, targetReference, replacementReference);
|
|
228
|
+
}, context);
|
|
229
|
+
}, json, context);
|
|
210
230
|
}
|
|
211
231
|
|
|
212
232
|
return referenceSubstitutionn;
|
|
@@ -7,7 +7,7 @@ import { unifySubstitution } from "../../process/unify";
|
|
|
7
7
|
import { stripBracketsFromStatement } from "../../utilities/brackets";
|
|
8
8
|
import { instantiateStatementSubstitution } from "../../process/instantiate";
|
|
9
9
|
import { statementSubstitutionFromStatementSubstitutionNode } from "../../utilities/element";
|
|
10
|
-
import { join, ablate, attempt,
|
|
10
|
+
import { join, ablate, descend, reconcile, attempt, serialise, unserialise, instantiate } from "../../utilities/context";
|
|
11
11
|
import { statementSubstitutionStringFromStatementAndMetavariable, statementSubstitutionStringFromStatementMetavariableAndSubstitution } from "../../utilities/string";
|
|
12
12
|
|
|
13
13
|
export default define(class StatementSubstitution extends Substitution {
|
|
@@ -377,24 +377,44 @@ export default define(class StatementSubstitution extends Substitution {
|
|
|
377
377
|
|
|
378
378
|
static name = "StatementSubstitution";
|
|
379
379
|
|
|
380
|
+
toJSON() {
|
|
381
|
+
const context = this.getContext();
|
|
382
|
+
|
|
383
|
+
return serialise((context) => {
|
|
384
|
+
const { name } = this.constructor,
|
|
385
|
+
string = this.getString(),
|
|
386
|
+
lineIndex = this.getLineIndex(),
|
|
387
|
+
json = {
|
|
388
|
+
name,
|
|
389
|
+
context,
|
|
390
|
+
string,
|
|
391
|
+
lineIndex
|
|
392
|
+
};
|
|
393
|
+
|
|
394
|
+
return json;
|
|
395
|
+
}, context);
|
|
396
|
+
}
|
|
397
|
+
|
|
380
398
|
static fromJSON(json, context) {
|
|
381
399
|
let statementSubstitutionn = null;
|
|
382
400
|
|
|
383
401
|
const { name } = json;
|
|
384
402
|
|
|
385
403
|
if (this.name === name) {
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
404
|
+
unserialise((json, context) => {
|
|
405
|
+
instantiate((context) => {
|
|
406
|
+
const { string, lineIndex } = json,
|
|
407
|
+
statementSubstitutionNode = instantiateStatementSubstitution(string, context),
|
|
408
|
+
node = statementSubstitutionNode, ///
|
|
409
|
+
generalContext = generalContextFromStatementSubstitutionNode(statementSubstitutionNode, context),
|
|
410
|
+
resolved = resolvedFromStatementSubstitutionNode(statementSubstitutionNode, context),
|
|
411
|
+
substitution = substitutionFromStatementSubstitutionNode(statementSubstitutionNode, context),
|
|
412
|
+
targetStatement = targetStatementFromStatementSubstitutionNode(statementSubstitutionNode, context),
|
|
413
|
+
replacementStatement = replacementStatementFromStatementSubstitutionNode(statementSubstitutionNode, context);
|
|
414
|
+
|
|
415
|
+
statementSubstitutionn = new StatementSubstitution(context, string, node, lineIndex, generalContext, resolved, substitution, targetStatement, replacementStatement);
|
|
416
|
+
}, context);
|
|
417
|
+
}, json, context);
|
|
398
418
|
}
|
|
399
419
|
|
|
400
420
|
return statementSubstitutionn;
|
|
@@ -7,7 +7,7 @@ import { stripBracketsFromTerm } from "../../utilities/brackets";
|
|
|
7
7
|
import { instantiateTermSubstitution } from "../../process/instantiate";
|
|
8
8
|
import { termSubstitutionFromTermSubstitutionNode } from "../../utilities/element";
|
|
9
9
|
import { termSubstitutionStringFromTermAndVariable } from "../../utilities/string";
|
|
10
|
-
import { join, ablate, descend, attempt, instantiate } from "../../utilities/context";
|
|
10
|
+
import { join, ablate, descend, attempt, serialise, unserialise, instantiate } from "../../utilities/context";
|
|
11
11
|
|
|
12
12
|
export default define(class TermSubstitution extends Substitution {
|
|
13
13
|
constructor(context, string, node, lineIndex, generalContext, targetTerm, replacementTerm) {
|
|
@@ -195,22 +195,42 @@ export default define(class TermSubstitution extends Substitution {
|
|
|
195
195
|
|
|
196
196
|
static name = "TermSubstitution";
|
|
197
197
|
|
|
198
|
+
toJSON() {
|
|
199
|
+
const context = this.getContext();
|
|
200
|
+
|
|
201
|
+
return serialise((context) => {
|
|
202
|
+
const { name } = this.constructor,
|
|
203
|
+
string = this.getString(),
|
|
204
|
+
lineIndex = this.getLineIndex(),
|
|
205
|
+
json = {
|
|
206
|
+
name,
|
|
207
|
+
context,
|
|
208
|
+
string,
|
|
209
|
+
lineIndex
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
return json;
|
|
213
|
+
}, context);
|
|
214
|
+
}
|
|
215
|
+
|
|
198
216
|
static fromJSON(json, context) {
|
|
199
217
|
let termSubstitutionn = null;
|
|
200
218
|
|
|
201
219
|
const { name } = json;
|
|
202
220
|
|
|
203
221
|
if (this.name === name) {
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
222
|
+
unserialise((json, context) => {
|
|
223
|
+
instantiate((context) => {
|
|
224
|
+
const { string, lineIndex } = json,
|
|
225
|
+
termSubstitutionNode = instantiateTermSubstitution(string, context),
|
|
226
|
+
node = termSubstitutionNode, ///
|
|
227
|
+
generalContext = generalContextFromTermSubstitutionNode(termSubstitutionNode, context),
|
|
228
|
+
targetTerm = targetTermFromTermSubstitutionNode(termSubstitutionNode, context),
|
|
229
|
+
replacementTerm = replacementTermFromTermSubstitutionNode(termSubstitutionNode, context);
|
|
230
|
+
|
|
231
|
+
termSubstitutionn = new TermSubstitution(context, string, node, lineIndex, generalContext, targetTerm, replacementTerm);
|
|
232
|
+
}, context);
|
|
233
|
+
}, json, context);
|
|
214
234
|
}
|
|
215
235
|
|
|
216
236
|
return termSubstitutionn;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { Element } from "occam-languages";
|
|
4
4
|
import { primitiveUtilities } from "occam-furtle";
|
|
5
|
+
import {serialise} from "../utilities/context";
|
|
5
6
|
|
|
6
7
|
const { primitiveFromNode } =primitiveUtilities;
|
|
7
8
|
|
|
@@ -120,7 +121,6 @@ export default class Substitution extends Element {
|
|
|
120
121
|
return substitutionNodeMatches;
|
|
121
122
|
}
|
|
122
123
|
|
|
123
|
-
|
|
124
124
|
findValidSubstitution(context) {
|
|
125
125
|
const substitutionNode = this.getSubstitutionNode(),
|
|
126
126
|
substitution = context.findSubstitutionBySubstitutionNode(substitutionNode),
|
|
@@ -136,15 +136,20 @@ export default class Substitution extends Element {
|
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
toJSON() {
|
|
139
|
-
const
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
139
|
+
const context = this.getContext();
|
|
140
|
+
|
|
141
|
+
return serialise((context) => {
|
|
142
|
+
const { name } = this.constructor,
|
|
143
|
+
string = this.getString(),
|
|
144
|
+
lineIndex = this.getLineIndex(),
|
|
145
|
+
json = {
|
|
146
|
+
name,
|
|
147
|
+
context,
|
|
148
|
+
string,
|
|
149
|
+
lineIndex
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
return json;
|
|
153
|
+
}, context);
|
|
149
154
|
}
|
|
150
155
|
}
|
|
@@ -31,6 +31,8 @@ export default define(class TypePrefix extends Element {
|
|
|
31
31
|
return comparesToTypePrefixName;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
static name = "TypePrefix";
|
|
35
|
+
|
|
34
36
|
toJSON() {
|
|
35
37
|
const string = this.getString(),
|
|
36
38
|
lineIndex = this.getLineIndex(),
|
|
@@ -42,8 +44,6 @@ export default define(class TypePrefix extends Element {
|
|
|
42
44
|
return json;
|
|
43
45
|
}
|
|
44
46
|
|
|
45
|
-
static name = "TypePrefix";
|
|
46
|
-
|
|
47
47
|
static fromJSON(json, context) {
|
|
48
48
|
return instantiate((context) => {
|
|
49
49
|
const { string, lineIndex } = json,
|
package/src/process/unify.js
CHANGED
|
@@ -353,12 +353,19 @@ class MetavariablePass extends ZipPass {
|
|
|
353
353
|
run: (generalTypeNode, specificTermNode, generalContext, specificContext) => {
|
|
354
354
|
let success = false;
|
|
355
355
|
|
|
356
|
+
let context;
|
|
357
|
+
|
|
356
358
|
const typeNode = generalTypeNode, ///
|
|
357
359
|
termNode = specificTermNode, ///
|
|
358
|
-
nominalTypeName = typeNode.getNominalTypeName()
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
360
|
+
nominalTypeName = typeNode.getNominalTypeName();
|
|
361
|
+
|
|
362
|
+
context = generalContext; ///
|
|
363
|
+
|
|
364
|
+
const type = context.findTypeByNominalTypeName(nominalTypeName);
|
|
365
|
+
|
|
366
|
+
context = specificContext; ///
|
|
367
|
+
|
|
368
|
+
const term = context.findTermByTermNode(termNode),
|
|
362
369
|
termType = term.getType(),
|
|
363
370
|
termTypeEqualToOrSubTypeOfGivenTypeType = termType.isEqualToOrSubTypeOf(type);
|
|
364
371
|
|
package/src/utilities/element.js
CHANGED
|
@@ -504,11 +504,8 @@ export function assumptionFromAssumptionNode(assumptionNode, context) {
|
|
|
504
504
|
string = context.nodeAsString(node),
|
|
505
505
|
lineIndex = null,
|
|
506
506
|
reference = referenceFromAssumptionNode(assumptionNode, context),
|
|
507
|
-
statement = statementFromAssumptionNode(assumptionNode, context)
|
|
508
|
-
|
|
509
|
-
context = null;
|
|
510
|
-
|
|
511
|
-
const assumption = new Assumption(context, string, node, lineIndex, reference, statement);
|
|
507
|
+
statement = statementFromAssumptionNode(assumptionNode, context),
|
|
508
|
+
assumption = new Assumption(context, string, node, lineIndex, reference, statement);
|
|
512
509
|
|
|
513
510
|
return assumption;
|
|
514
511
|
}
|
|
@@ -1182,7 +1179,7 @@ export function termFromMetavariableNode(metavariableNode, context) {
|
|
|
1182
1179
|
const termNode = metavariableNode.getTermNode();
|
|
1183
1180
|
|
|
1184
1181
|
if (termNode !== null) {
|
|
1185
|
-
term =
|
|
1182
|
+
term = termFromTermNode(termNode, context);
|
|
1186
1183
|
}
|
|
1187
1184
|
|
|
1188
1185
|
return term;
|
package/src/utilities/json.js
CHANGED
|
@@ -73,12 +73,6 @@ export function frameFromJSON(json, context) {
|
|
|
73
73
|
return frame;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
export function lemmasFromJSON(json, context) {
|
|
77
|
-
const lemmas = [];
|
|
78
|
-
|
|
79
|
-
return lemmas;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
76
|
export function negatedFromJSON(json, context) {
|
|
83
77
|
const { negated } = json;
|
|
84
78
|
|
|
@@ -179,12 +173,6 @@ export function conclusionFromJSON(json, context) {
|
|
|
179
173
|
return conclusion;
|
|
180
174
|
}
|
|
181
175
|
|
|
182
|
-
export function metaLemmasFromJSON(json, context) {
|
|
183
|
-
const metaLemmas = [];
|
|
184
|
-
|
|
185
|
-
return metaLemmas;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
176
|
export function provisionalFromJSON(json, context) {
|
|
189
177
|
const { provisional } = json;
|
|
190
178
|
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { arrayUtilities } from "necessary";
|
|
4
|
+
|
|
5
|
+
const { compress } = arrayUtilities;
|
|
6
|
+
|
|
7
|
+
export function compressTerms(terms) {
|
|
8
|
+
compress(terms, (termA, termB) => {
|
|
9
|
+
const termAComparesToTermB = termA.compareTerm(termB);
|
|
10
|
+
|
|
11
|
+
if (!termAComparesToTermB) {
|
|
12
|
+
return true;
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function compressFrames(frames) {
|
|
18
|
+
compress(frames, (frameA, frameB) => {
|
|
19
|
+
const frameAEqualToFrameB = frameA.isEqualTo(frameB);
|
|
20
|
+
|
|
21
|
+
if (!frameAEqualToFrameB) {
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function compressEqualities(equalities) {
|
|
28
|
+
compress(equalities, (equalityA, equalityB) => {
|
|
29
|
+
const equalityAEqualToEqualityB = equalityA.isEqualTo(equalityB);
|
|
30
|
+
|
|
31
|
+
if (!equalityAEqualToEqualityB) {
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function compressJudgements(judgements) {
|
|
38
|
+
compress(judgements, (judgementA, judgementB) => {
|
|
39
|
+
const judgementAEqualToJudgementB = judgementA.isEqualTo(judgementB);
|
|
40
|
+
|
|
41
|
+
if (!judgementAEqualToJudgementB) {
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function compressAssertions(assertions) {
|
|
48
|
+
compress(assertions, (assertionA, assertionB) => {
|
|
49
|
+
const assertionAEqualToAssertionB = assertionA.isEqualTo(assertionB);
|
|
50
|
+
|
|
51
|
+
if (!assertionAEqualToAssertionB) {
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function compressStatements(statements) {
|
|
58
|
+
compress(statements, (statementA, statementB) => {
|
|
59
|
+
const statementAEqualToStatementB = statementA.isEqualTo(statementB);
|
|
60
|
+
|
|
61
|
+
if (!statementAEqualToStatementB) {
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function compressReferences(references) {
|
|
68
|
+
compress(references, (referenceA, referenceB) => {
|
|
69
|
+
const referenceAEqualToReferenceB = referenceA.isEqualTo(referenceB);
|
|
70
|
+
|
|
71
|
+
if (!referenceAEqualToReferenceB) {
|
|
72
|
+
return true;
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function compressAssumptions(assumptions) {
|
|
78
|
+
compress(assumptions, (assumptionA, assumptionB) => {
|
|
79
|
+
const assumptionAEqualToAssumptionB = assumptionA.isEqualTo(assumptionB);
|
|
80
|
+
|
|
81
|
+
if (!assumptionAEqualToAssumptionB) {
|
|
82
|
+
return true;
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function compressMetavariables(metavariables) {
|
|
88
|
+
compress(metavariables, (metavariableA, metavariableB) => {
|
|
89
|
+
const metavariableAEqualToMetavariableB = metavariableA.isEqualTo(metavariableB);
|
|
90
|
+
|
|
91
|
+
if (!metavariableAEqualToMetavariableB) {
|
|
92
|
+
return true;
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function compressSubstitutions(substitutions) {
|
|
98
|
+
compress(substitutions, (substitutionA, substitutionB) => {
|
|
99
|
+
const substitutionAEqualToSubstitutionB = substitutionA.isEqualTo(substitutionB);
|
|
100
|
+
|
|
101
|
+
if (!substitutionAEqualToSubstitutionB) {
|
|
102
|
+
return true;
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
}
|