occam-verify-cli 1.0.842 → 1.0.847

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 (87) hide show
  1. package/lib/context/bounded.js +18 -18
  2. package/lib/context/branching.js +8 -3
  3. package/lib/context/ephemeral.js +44 -71
  4. package/lib/context/file/nominal.js +18 -24
  5. package/lib/context/synoptic.js +135 -128
  6. package/lib/context.js +49 -31
  7. package/lib/element/assertion/contained.js +6 -3
  8. package/lib/element/assertion/defined.js +11 -4
  9. package/lib/element/assertion/property.js +6 -3
  10. package/lib/element/assertion/satisfies.js +6 -3
  11. package/lib/element/assertion/subproof.js +6 -3
  12. package/lib/element/assertion/type.js +5 -5
  13. package/lib/element/assumption/metaLevel.js +12 -10
  14. package/lib/element/assumption.js +2 -2
  15. package/lib/element/derivation.js +1 -8
  16. package/lib/element/equality.js +3 -3
  17. package/lib/element/equivalence.js +1 -8
  18. package/lib/element/error.js +1 -8
  19. package/lib/element/hypothesis.js +2 -2
  20. package/lib/element/judgement.js +15 -11
  21. package/lib/element/metaType.js +2 -2
  22. package/lib/element/metavariable.js +30 -35
  23. package/lib/element/parameter.js +2 -2
  24. package/lib/element/procedureCall.js +2 -2
  25. package/lib/element/procedureReference.js +2 -2
  26. package/lib/element/proof.js +1 -8
  27. package/lib/element/proofAssertion/premise.js +4 -3
  28. package/lib/element/proofAssertion/supposition.js +4 -3
  29. package/lib/element/section.js +1 -8
  30. package/lib/element/signature.js +2 -2
  31. package/lib/element/statement.js +2 -2
  32. package/lib/element/subDerivation.js +1 -8
  33. package/lib/element/subproof.js +1 -8
  34. package/lib/element/substitution/frame.js +20 -6
  35. package/lib/element/substitution/reference.js +20 -6
  36. package/lib/element/substitution/statement.js +19 -5
  37. package/lib/element/substitution/term.js +19 -5
  38. package/lib/element/substitution.js +12 -7
  39. package/lib/element/typePrefix.js +2 -2
  40. package/lib/process/unify.js +7 -2
  41. package/lib/utilities/element.js +3 -5
  42. package/lib/utilities/json.js +1 -15
  43. package/lib/utilities/synoptic.js +126 -0
  44. package/package.json +1 -1
  45. package/src/context/bounded.js +23 -23
  46. package/src/context/branching.js +12 -2
  47. package/src/context/ephemeral.js +94 -110
  48. package/src/context/file/nominal.js +18 -34
  49. package/src/context/synoptic.js +195 -150
  50. package/src/context.js +66 -42
  51. package/src/element/assertion/contained.js +8 -3
  52. package/src/element/assertion/defined.js +15 -4
  53. package/src/element/assertion/property.js +8 -3
  54. package/src/element/assertion/satisfies.js +10 -4
  55. package/src/element/assertion/subproof.js +8 -3
  56. package/src/element/assertion/type.js +10 -8
  57. package/src/element/assumption/metaLevel.js +13 -8
  58. package/src/element/assumption.js +2 -2
  59. package/src/element/derivation.js +0 -11
  60. package/src/element/equality.js +3 -3
  61. package/src/element/equivalence.js +0 -11
  62. package/src/element/error.js +0 -11
  63. package/src/element/hypothesis.js +2 -2
  64. package/src/element/judgement.js +22 -14
  65. package/src/element/metaType.js +2 -2
  66. package/src/element/metavariable.js +5 -13
  67. package/src/element/parameter.js +2 -2
  68. package/src/element/procedureCall.js +2 -2
  69. package/src/element/procedureReference.js +2 -2
  70. package/src/element/proof.js +0 -11
  71. package/src/element/proofAssertion/premise.js +3 -1
  72. package/src/element/proofAssertion/supposition.js +3 -1
  73. package/src/element/section.js +0 -11
  74. package/src/element/signature.js +2 -2
  75. package/src/element/statement.js +2 -2
  76. package/src/element/subDerivation.js +0 -11
  77. package/src/element/subproof.js +0 -11
  78. package/src/element/substitution/frame.js +31 -11
  79. package/src/element/substitution/reference.js +31 -11
  80. package/src/element/substitution/statement.js +33 -13
  81. package/src/element/substitution/term.js +31 -11
  82. package/src/element/substitution.js +16 -11
  83. package/src/element/typePrefix.js +2 -2
  84. package/src/process/unify.js +11 -4
  85. package/src/utilities/element.js +3 -6
  86. package/src/utilities/json.js +0 -12
  87. 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
- instantiate((context) => {
194
- const { string, lineIndex } = json,
195
- frameSubstitutionNode = instantiateFrameSubstitution(string, context),
196
- node = frameSubstitutionNode, ///
197
- generalContext = generalContextFromFrameSubstitutionNode(frameSubstitutionNode, context),
198
- targetFrame = targetFrameFromFrameSubstitutionNode(frameSubstitutionNode, context),
199
- replacementFrame = replacementFrameFromFrameSubstitutionNode(frameSubstitutionNode, context);
200
-
201
- frameSubstitutionn = new FrameSubstitution(context, string, node, lineIndex, generalContext, targetFrame, replacementFrame);
202
- }, context);
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
- instantiate((context) => {
201
- const { string, lineIndex } = json,
202
- referenceSubstitutionNode = instantiateReferenceSubstitution(string, context),
203
- node = referenceSubstitutionNode, ///
204
- generalContext = generalContextFromReferenceSubstitutionNode(referenceSubstitutionNode, context),
205
- targetReference = targetReferenceFromReferenceSubstitutionNode(referenceSubstitutionNode, context),
206
- replacementReference = replacementReferenceFromReferenceSubstitutionNode(referenceSubstitutionNode, context);
207
-
208
- referenceSubstitutionn = new ReferenceSubstitution(context, string, node, lineIndex, generalContext, targetReference, replacementReference);
209
- }, context);
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, descend, reconcile, instantiate } from "../../utilities/context";
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
- instantiate((context) => {
387
- const { string, lineIndex } = json,
388
- statementSubstitutionNode = instantiateStatementSubstitution(string, context),
389
- node = statementSubstitutionNode, ///
390
- generalContext = generalContextFromStatementSubstitutionNode(statementSubstitutionNode, context),
391
- resolved = resolvedFromStatementSubstitutionNode(statementSubstitutionNode, context),
392
- substitution = substitutionFromStatementSubstitutionNode(statementSubstitutionNode, context),
393
- targetStatement = targetStatementFromStatementSubstitutionNode(statementSubstitutionNode, context),
394
- replacementStatement = replacementStatementFromStatementSubstitutionNode(statementSubstitutionNode, context);
395
-
396
- statementSubstitutionn = new StatementSubstitution(context, string, node, lineIndex, generalContext, resolved, substitution, targetStatement, replacementStatement);
397
- }, context);
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
- instantiate((context) => {
205
- const { string, lineIndex } = json,
206
- termSubstitutionNode = instantiateTermSubstitution(string, context),
207
- node = termSubstitutionNode, ///
208
- generalContext = generalContextFromTermSubstitutionNode(termSubstitutionNode, context),
209
- targetTerm = targetTermFromTermSubstitutionNode(termSubstitutionNode, context),
210
- replacementTerm = replacementTermFromTermSubstitutionNode(termSubstitutionNode, context);
211
-
212
- termSubstitutionn = new TermSubstitution(context, string, node, lineIndex, generalContext, targetTerm, replacementTerm);
213
- }, context);
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 { name } = this.constructor,
140
- string = this.getString(),
141
- lineIndex = this.getLineIndex(),
142
- json = {
143
- name,
144
- string,
145
- lineIndex
146
- };
147
-
148
- return json;
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,
@@ -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
- type = generalContext.findTypeByNominalTypeName(nominalTypeName),
360
- context = specificContext, ///
361
- term = context.findTermByTermNode(termNode),
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
 
@@ -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 = context.findTermByTermNode(termNode);
1182
+ term = termFromTermNode(termNode, context);
1186
1183
  }
1187
1184
 
1188
1185
  return term;
@@ -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
+ }