occam-verify-cli 1.0.809 → 1.0.814
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 +6 -6
- package/lib/context/branching.js +3 -3
- package/lib/context/ephemeral.js +3 -3
- package/lib/context/file/nominal.js +16 -16
- package/lib/context/liminal.js +26 -30
- package/lib/context/synoptic.js +62 -2
- package/lib/context.js +66 -54
- package/lib/element/assertion/defined.js +8 -8
- package/lib/element/assertion/satisfies.js +15 -11
- package/lib/element/assertion.js +5 -5
- package/lib/element/assumption/metaLevel.js +3 -3
- package/lib/element/conclusion.js +11 -8
- package/lib/element/deduction.js +11 -8
- package/lib/element/frame.js +6 -14
- package/lib/element/label.js +5 -8
- package/lib/element/metavariable.js +17 -17
- package/lib/element/procedureCall.js +10 -6
- package/lib/element/proofAssertion/premise.js +27 -27
- package/lib/element/proofAssertion/step.js +25 -5
- package/lib/element/proofAssertion/supposition.js +27 -27
- package/lib/element/proofAssertion.js +10 -10
- package/lib/element/reference.js +9 -13
- package/lib/element/rule.js +41 -43
- package/lib/element/signature.js +4 -4
- package/lib/element/statement.js +35 -45
- package/lib/element/subproof.js +4 -4
- package/lib/element/substitution/frame.js +16 -11
- package/lib/element/substitution/reference.js +15 -10
- package/lib/element/substitution/statement.js +55 -51
- package/lib/element/substitution/term.js +15 -10
- package/lib/element/substitution.js +29 -31
- package/lib/element/term.js +1 -16
- package/lib/element/topLevelAssertion/axiom.js +5 -3
- package/lib/element/topLevelAssertion.js +36 -38
- package/lib/element/variable.js +6 -6
- package/lib/node/frame.js +1 -9
- package/lib/node/statement.js +1 -9
- package/lib/node/term.js +1 -19
- package/lib/process/assign.js +23 -31
- package/lib/utilities/element.js +33 -5
- package/lib/utilities/equivalence.js +4 -4
- package/lib/utilities/equivalences.js +28 -13
- package/lib/utilities/string.js +2 -2
- package/lib/utilities/substitutions.js +16 -15
- package/lib/utilities/unification.js +133 -124
- package/package.json +1 -1
- package/src/context/bounded.js +5 -5
- package/src/context/branching.js +2 -2
- package/src/context/ephemeral.js +2 -2
- package/src/context/file/nominal.js +15 -15
- package/src/context/liminal.js +29 -35
- package/src/context/synoptic.js +81 -1
- package/src/context.js +88 -69
- package/src/element/assertion/defined.js +8 -8
- package/src/element/assertion/satisfies.js +17 -10
- package/src/element/assertion.js +8 -8
- package/src/element/assumption/metaLevel.js +4 -2
- package/src/element/conclusion.js +12 -7
- package/src/element/deduction.js +12 -7
- package/src/element/frame.js +7 -20
- package/src/element/label.js +3 -5
- package/src/element/metavariable.js +27 -27
- package/src/element/procedureCall.js +14 -9
- package/src/element/proofAssertion/premise.js +41 -41
- package/src/element/proofAssertion/step.js +37 -7
- package/src/element/proofAssertion/supposition.js +41 -41
- package/src/element/proofAssertion.js +10 -9
- package/src/element/reference.js +9 -13
- package/src/element/rule.js +57 -61
- package/src/element/signature.js +3 -3
- package/src/element/statement.js +54 -68
- package/src/element/subproof.js +3 -3
- package/src/element/substitution/frame.js +18 -8
- package/src/element/substitution/reference.js +16 -7
- package/src/element/substitution/statement.js +78 -67
- package/src/element/substitution/term.js +15 -6
- package/src/element/substitution.js +38 -41
- package/src/element/term.js +0 -26
- package/src/element/topLevelAssertion/axiom.js +5 -2
- package/src/element/topLevelAssertion.js +49 -53
- package/src/element/variable.js +5 -5
- package/src/node/frame.js +0 -12
- package/src/node/statement.js +0 -12
- package/src/node/term.js +0 -28
- package/src/process/assign.js +35 -46
- package/src/utilities/element.js +32 -4
- package/src/utilities/equivalence.js +3 -4
- package/src/utilities/equivalences.js +29 -17
- package/src/utilities/string.js +2 -2
- package/src/utilities/substitutions.js +17 -15
- package/src/utilities/unification.js +145 -119
|
@@ -8,51 +8,57 @@ import { descend } from "./context";
|
|
|
8
8
|
|
|
9
9
|
const { backwardsSome } = arrayUtilities;
|
|
10
10
|
|
|
11
|
-
async function
|
|
12
|
-
let
|
|
11
|
+
async function unifyStepWithRule(step, context) {
|
|
12
|
+
let stepUnifiesWithRule = false;
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
const qualified = step.isQualified();
|
|
15
|
+
|
|
16
|
+
if (qualified) {
|
|
17
|
+
const reference = step.getReference(),
|
|
18
|
+
rule = context.findRuleByReference(reference);
|
|
16
19
|
|
|
17
20
|
if (rule !== null) {
|
|
18
|
-
const
|
|
19
|
-
|
|
21
|
+
const stepString = step.getString(),
|
|
22
|
+
ruleString = rule.getString();
|
|
20
23
|
|
|
21
|
-
context.trace(`Unifying the '${
|
|
24
|
+
context.trace(`Unifying the '${stepString}' step with the '${ruleString}' rule...`);
|
|
22
25
|
|
|
23
26
|
const subproofOrProofAssertions = context.getSubproofOrProofAssertions(),
|
|
24
|
-
|
|
27
|
+
stepAndSubproofOrProofAssertionsUnify = await rule.unifyStepAndSubproofOrProofAssertions(step, subproofOrProofAssertions, context);
|
|
25
28
|
|
|
26
|
-
if (
|
|
27
|
-
|
|
29
|
+
if (stepAndSubproofOrProofAssertionsUnify) {
|
|
30
|
+
stepUnifiesWithRule = true;
|
|
28
31
|
}
|
|
29
32
|
|
|
30
|
-
if (
|
|
31
|
-
context.debug(`...unified the '${
|
|
33
|
+
if (stepUnifiesWithRule) {
|
|
34
|
+
context.debug(`...unified the '${stepString}' step with the '${ruleString}' rule.`);
|
|
32
35
|
}
|
|
33
36
|
}
|
|
34
37
|
}
|
|
35
38
|
|
|
36
|
-
return
|
|
39
|
+
return stepUnifiesWithRule;
|
|
37
40
|
}
|
|
38
41
|
|
|
39
|
-
async function
|
|
40
|
-
let
|
|
42
|
+
async function unifyStepWithReference(step, context) {
|
|
43
|
+
let stepUnifiesWithReference = false;
|
|
44
|
+
|
|
45
|
+
const qualified = step.isQualified();
|
|
41
46
|
|
|
42
|
-
if (
|
|
43
|
-
const
|
|
47
|
+
if (qualified) {
|
|
48
|
+
const reference = step.getReference(),
|
|
49
|
+
stepString = step.getString(),
|
|
44
50
|
referenceString = reference.getString();
|
|
45
51
|
|
|
46
|
-
context.trace(`Unifying the '${
|
|
52
|
+
context.trace(`Unifying the '${stepString}' step with the '${referenceString}' reference...`);
|
|
47
53
|
|
|
48
54
|
const topLevelAssertion = context.findTopLevelAssertionByReference(reference);
|
|
49
55
|
|
|
50
56
|
if (topLevelAssertion !== null) {
|
|
51
57
|
const subproofOrProofAssertions = context.getSubproofOrProofAssertions(),
|
|
52
|
-
|
|
58
|
+
stepAndSubproofOrProofAssertionsUnify = await topLevelAssertion.unifyStepAndSubproofOrProofAssertions(step, subproofOrProofAssertions, context);
|
|
53
59
|
|
|
54
|
-
if (
|
|
55
|
-
|
|
60
|
+
if (stepAndSubproofOrProofAssertionsUnify) {
|
|
61
|
+
stepUnifiesWithReference = true;
|
|
56
62
|
}
|
|
57
63
|
} else {
|
|
58
64
|
const metaLevel = context.isMetaLevel();
|
|
@@ -60,43 +66,45 @@ async function unifyStatementWithReference(statement, reference, satisfiesAssert
|
|
|
60
66
|
if (metaLevel) {
|
|
61
67
|
descend((context) => {
|
|
62
68
|
const { MetaLevelAssumption } = elements,
|
|
63
|
-
metaLevelAssumption = MetaLevelAssumption.
|
|
69
|
+
metaLevelAssumption = MetaLevelAssumption.fromStep(step, context);
|
|
64
70
|
|
|
65
71
|
metaLevelAssumption.validate(context);
|
|
66
72
|
|
|
67
|
-
|
|
73
|
+
stepUnifiesWithReference = true;
|
|
68
74
|
}, context);
|
|
69
75
|
}
|
|
70
76
|
}
|
|
71
77
|
|
|
72
|
-
if (
|
|
73
|
-
context.debug(`...unified the '${
|
|
78
|
+
if (stepUnifiesWithReference) {
|
|
79
|
+
context.debug(`...unified the '${stepString}' step with the '${referenceString}' reference.`);
|
|
74
80
|
}
|
|
75
81
|
}
|
|
76
82
|
|
|
77
|
-
return
|
|
83
|
+
return stepUnifiesWithReference;
|
|
78
84
|
}
|
|
79
85
|
|
|
80
|
-
async function
|
|
81
|
-
let
|
|
86
|
+
async function unifyStepAsSatisfiesAssertion(step, context) {
|
|
87
|
+
let stepUnifiesAsSatisfiesAssertion = false;
|
|
82
88
|
|
|
83
89
|
const { SatisfiesAssertion } = elements;
|
|
84
90
|
|
|
85
|
-
satisfiesAssertion = SatisfiesAssertion.
|
|
91
|
+
const satisfiesAssertion = SatisfiesAssertion.fromStep(step, context);
|
|
86
92
|
|
|
87
93
|
if (satisfiesAssertion !== null) {
|
|
88
|
-
const
|
|
94
|
+
const stepString = step.getString();
|
|
89
95
|
|
|
90
|
-
context.trace(`Unifying the '${
|
|
96
|
+
context.trace(`Unifying the '${stepString}' step as a satisfies assertion...`);
|
|
91
97
|
|
|
92
98
|
descend((context) => {
|
|
93
99
|
satisfiesAssertion.verifySignature(context);
|
|
94
100
|
}, context);
|
|
95
101
|
|
|
96
|
-
|
|
102
|
+
const unqualified = step.isUnqualified();
|
|
103
|
+
|
|
104
|
+
if (unqualified) {
|
|
97
105
|
const subproofOrProofAssertions = context.getSubproofOrProofAssertions();
|
|
98
106
|
|
|
99
|
-
|
|
107
|
+
stepUnifiesAsSatisfiesAssertion = backwardsSome(subproofOrProofAssertions, (stepsOrSubproof) => {
|
|
100
108
|
const stepOrSubProofUnifiesWIthSatisfiesAssertion = stepsOrSubproof.unifyWithSatisfiesAssertion(satisfiesAssertion, context);
|
|
101
109
|
|
|
102
110
|
if (stepOrSubProofUnifiesWIthSatisfiesAssertion) {
|
|
@@ -104,11 +112,10 @@ async function unifyStatementAsSatisfiesAssertion(statement, reference, satisfie
|
|
|
104
112
|
}
|
|
105
113
|
});
|
|
106
114
|
} else {
|
|
107
|
-
const
|
|
115
|
+
const reference = satisfiesAssertion.getReference(),
|
|
116
|
+
topLevelAssertion = context.findTopLevelAssertionByReference(reference);
|
|
108
117
|
|
|
109
118
|
if (topLevelAssertion !== null) {
|
|
110
|
-
reference = satisfiesAssertion.getReference();
|
|
111
|
-
|
|
112
119
|
const axiom = context.findAxiomByReference(reference);
|
|
113
120
|
|
|
114
121
|
if (axiom !== null) {
|
|
@@ -121,7 +128,7 @@ async function unifyStatementAsSatisfiesAssertion(statement, reference, satisfie
|
|
|
121
128
|
const substitutionsCorrelates = satisfiesAssertion.correlateSubstitutions(substitutions, context);
|
|
122
129
|
|
|
123
130
|
if (substitutionsCorrelates) {
|
|
124
|
-
|
|
131
|
+
stepUnifiesAsSatisfiesAssertion = true;
|
|
125
132
|
}
|
|
126
133
|
}
|
|
127
134
|
} else {
|
|
@@ -133,124 +140,139 @@ async function unifyStatementAsSatisfiesAssertion(statement, reference, satisfie
|
|
|
133
140
|
}
|
|
134
141
|
}
|
|
135
142
|
|
|
136
|
-
if (
|
|
137
|
-
context.debug(`...unified the '${
|
|
143
|
+
if (stepUnifiesAsSatisfiesAssertion) {
|
|
144
|
+
context.debug(`...unified the '${stepString}' step as a satisfies assertion.`);
|
|
138
145
|
}
|
|
139
146
|
}
|
|
140
147
|
|
|
141
|
-
return
|
|
148
|
+
return stepUnifiesAsSatisfiesAssertion;
|
|
142
149
|
}
|
|
143
150
|
|
|
144
|
-
async function
|
|
145
|
-
let
|
|
151
|
+
async function unifyStepWithTopLevelAssertion(step, context) {
|
|
152
|
+
let stepUnifiesWithTopLevelAssertion = false;
|
|
146
153
|
|
|
147
|
-
|
|
148
|
-
|
|
154
|
+
const qualified = step.isQualified();
|
|
155
|
+
|
|
156
|
+
if (qualified) {
|
|
157
|
+
const reference = step.getReference(),
|
|
158
|
+
topLevelAssertion = context.findTopLevelAssertionByReference(reference);
|
|
149
159
|
|
|
150
160
|
if (topLevelAssertion !== null) {
|
|
151
|
-
const
|
|
161
|
+
const stepString = step.getString(),
|
|
152
162
|
topLevelAssertionString = reference.getString();
|
|
153
163
|
|
|
154
|
-
context.trace(`Unifying the '${
|
|
164
|
+
context.trace(`Unifying the '${stepString}' step with the '${topLevelAssertionString}' top level assertion...`);
|
|
155
165
|
|
|
156
166
|
const subproofOrProofAssertions = context.getSubproofOrProofAssertions(),
|
|
157
|
-
|
|
167
|
+
stepAndSubproofOrProofAssertionsUnify = await topLevelAssertion.unifyStepAndSubproofOrProofAssertions(step, subproofOrProofAssertions, context);
|
|
158
168
|
|
|
159
|
-
if (
|
|
160
|
-
|
|
169
|
+
if (stepAndSubproofOrProofAssertionsUnify) {
|
|
170
|
+
stepUnifiesWithTopLevelAssertion = true;
|
|
161
171
|
}
|
|
162
172
|
|
|
163
|
-
if (
|
|
164
|
-
context.debug(`...unified the '${
|
|
173
|
+
if (stepUnifiesWithTopLevelAssertion) {
|
|
174
|
+
context.debug(`...unified the '${stepString}' step with the '${topLevelAssertionString}' top level assertion.`);
|
|
165
175
|
}
|
|
166
176
|
}
|
|
167
177
|
}
|
|
168
178
|
|
|
169
|
-
return
|
|
179
|
+
return stepUnifiesWithTopLevelAssertion;
|
|
170
180
|
}
|
|
171
181
|
|
|
172
|
-
async function
|
|
173
|
-
let
|
|
182
|
+
async function unifyStepAsEquality(step, context) {
|
|
183
|
+
let stepUnifiesAEquality = false;
|
|
174
184
|
|
|
175
|
-
|
|
185
|
+
const unqualified = step.isUnqualified();
|
|
186
|
+
|
|
187
|
+
if (unqualified) {
|
|
176
188
|
const { Equality } = elements,
|
|
189
|
+
statement = step.getStatement(),
|
|
177
190
|
equality = Equality.fromStatement(statement, context);
|
|
178
191
|
|
|
179
192
|
if (equality !== null) {
|
|
180
|
-
const
|
|
193
|
+
const stepString = step.getString();
|
|
181
194
|
|
|
182
|
-
context.trace(`Unifying the '${
|
|
195
|
+
context.trace(`Unifying the '${stepString}' step as an equality...`);
|
|
183
196
|
|
|
184
197
|
const equalityEqual = equality.isEqual(context);
|
|
185
198
|
|
|
186
199
|
if (equalityEqual) {
|
|
187
|
-
|
|
200
|
+
stepUnifiesAEquality = true;
|
|
188
201
|
}
|
|
189
202
|
|
|
190
|
-
if (
|
|
191
|
-
context.debug(`...unified the '${
|
|
203
|
+
if (stepUnifiesAEquality) {
|
|
204
|
+
context.debug(`...unified the '${stepString}' step as an equality.`);
|
|
192
205
|
}
|
|
193
206
|
}
|
|
194
207
|
}
|
|
195
208
|
|
|
196
|
-
return
|
|
209
|
+
return stepUnifiesAEquality;
|
|
197
210
|
}
|
|
198
211
|
|
|
199
|
-
async function
|
|
200
|
-
let
|
|
212
|
+
async function unifyStepAsJudgement(step, context) {
|
|
213
|
+
let stepUnifiesAsJudgement = false;
|
|
214
|
+
|
|
215
|
+
const unqualified = step.isUnqualified();
|
|
201
216
|
|
|
202
|
-
if (
|
|
217
|
+
if (unqualified) {
|
|
203
218
|
const { Judgement } = elements,
|
|
219
|
+
statement = step.getStatement(),
|
|
204
220
|
judgement = Judgement.fromStatement(statement, context);
|
|
205
221
|
|
|
206
222
|
if (judgement !== null) {
|
|
207
|
-
const
|
|
223
|
+
const stepString = step.getString();
|
|
208
224
|
|
|
209
|
-
context.trace(`Unifying the '${
|
|
225
|
+
context.trace(`Unifying the '${stepString}' step as a judgement...`);
|
|
210
226
|
|
|
211
|
-
|
|
227
|
+
stepUnifiesAsJudgement = true;
|
|
212
228
|
|
|
213
|
-
if (
|
|
214
|
-
context.debug(`...unified the '${
|
|
229
|
+
if (stepUnifiesAsJudgement) {
|
|
230
|
+
context.debug(`...unified the '${stepString}' step as a judgement.`);
|
|
215
231
|
}
|
|
216
232
|
}
|
|
217
233
|
}
|
|
218
234
|
|
|
219
|
-
return
|
|
235
|
+
return stepUnifiesAsJudgement;
|
|
220
236
|
}
|
|
221
237
|
|
|
222
|
-
async function
|
|
223
|
-
let
|
|
238
|
+
async function unifyStepAsTypeAssertion(step, context) {
|
|
239
|
+
let stepUnifiesAsTypeAssertion = false;
|
|
240
|
+
|
|
241
|
+
const unqualified = step.isUnqualified();
|
|
224
242
|
|
|
225
|
-
if (
|
|
243
|
+
if (unqualified) {
|
|
226
244
|
const { TypeAssertion } = elements,
|
|
245
|
+
statement = step.getStatement(),
|
|
227
246
|
typeAssertion = TypeAssertion.fromStatement(statement, context);
|
|
228
247
|
|
|
229
248
|
if (typeAssertion !== null) {
|
|
230
|
-
const
|
|
249
|
+
const stepString = step.getString();
|
|
231
250
|
|
|
232
|
-
context.trace(`Unifying the '${
|
|
251
|
+
context.trace(`Unifying the '${stepString}' step as a type assertion...`);
|
|
233
252
|
|
|
234
|
-
|
|
253
|
+
stepUnifiesAsTypeAssertion = true;
|
|
235
254
|
|
|
236
|
-
context.debug(`...unified the '${
|
|
255
|
+
context.debug(`...unified the '${stepString}' step as a type assertion.`);
|
|
237
256
|
}
|
|
238
257
|
}
|
|
239
258
|
|
|
240
|
-
return
|
|
259
|
+
return stepUnifiesAsTypeAssertion;
|
|
241
260
|
}
|
|
242
261
|
|
|
243
|
-
async function
|
|
244
|
-
let
|
|
262
|
+
async function unifyStepAsPropertyAssertion(step, context) {
|
|
263
|
+
let stepUnifiesAsPropertyAssertion = false;
|
|
245
264
|
|
|
246
|
-
|
|
265
|
+
const unqualified = step.isUnqualified();
|
|
266
|
+
|
|
267
|
+
if (unqualified) {
|
|
247
268
|
const { PropertyAssertion } = elements,
|
|
269
|
+
statement = step.getStatement(),
|
|
248
270
|
propertyAssertion = PropertyAssertion.fromStatement(statement, context);
|
|
249
271
|
|
|
250
272
|
if (propertyAssertion !== null) {
|
|
251
|
-
const
|
|
273
|
+
const stepString = step.getString();
|
|
252
274
|
|
|
253
|
-
context.trace(`Unifying the '${
|
|
275
|
+
context.trace(`Unifying the '${stepString}' step as a property assertion...`);
|
|
254
276
|
|
|
255
277
|
const term = propertyAssertion.getTerm(),
|
|
256
278
|
equivalence = context.findEquivalenceByTerm(term);
|
|
@@ -266,75 +288,79 @@ async function unifyStatementAsPropertyAssertion(statement, reference, satisfies
|
|
|
266
288
|
});
|
|
267
289
|
|
|
268
290
|
if (propertyAssertionMatches) {
|
|
269
|
-
|
|
291
|
+
stepUnifiesAsPropertyAssertion = true;
|
|
270
292
|
}
|
|
271
293
|
}
|
|
272
294
|
|
|
273
|
-
if (
|
|
274
|
-
context.debug(`...unified the '${
|
|
295
|
+
if (stepUnifiesAsPropertyAssertion) {
|
|
296
|
+
context.debug(`...unified the '${stepString}' step as a property assertion.`);
|
|
275
297
|
}
|
|
276
298
|
}
|
|
277
299
|
}
|
|
278
300
|
|
|
279
|
-
return
|
|
301
|
+
return stepUnifiesAsPropertyAssertion;
|
|
280
302
|
}
|
|
281
303
|
|
|
282
|
-
async function
|
|
283
|
-
let
|
|
304
|
+
async function unifyStepWithSatisfiesAssertion(step, context) {
|
|
305
|
+
let stepUnifiesWithSatisfiesAssertion = false;
|
|
306
|
+
|
|
307
|
+
const satisfiesAssertion = step.getSatisfiesAssertion();
|
|
284
308
|
|
|
285
309
|
if (satisfiesAssertion !== null) {
|
|
286
|
-
const
|
|
310
|
+
const stepString = step.getString(),
|
|
287
311
|
satisfiesAssertionString = satisfiesAssertion.getString();
|
|
288
312
|
|
|
289
|
-
context.trace(`Unifying the '${
|
|
313
|
+
context.trace(`Unifying the '${stepString}' step with the '${satisfiesAssertionString}' satisfies assertion...`);
|
|
290
314
|
|
|
291
315
|
const subproofOrProofAssertions = context.getSubproofOrProofAssertions(),
|
|
292
|
-
|
|
316
|
+
stepUnifies = satisfiesAssertion.unifyStepAndSubproofOrProofAssertions(step, subproofOrProofAssertions, context);
|
|
293
317
|
|
|
294
|
-
if (
|
|
295
|
-
|
|
318
|
+
if (stepUnifies) {
|
|
319
|
+
stepUnifiesWithSatisfiesAssertion = true;
|
|
296
320
|
}
|
|
297
321
|
|
|
298
|
-
if (
|
|
299
|
-
context.debug(`...unified the '${
|
|
322
|
+
if (stepUnifiesWithSatisfiesAssertion) {
|
|
323
|
+
context.debug(`...unified the '${stepString}' step with the '${satisfiesAssertionString}' satisfies assertion.`);
|
|
300
324
|
}
|
|
301
325
|
}
|
|
302
326
|
|
|
303
|
-
return
|
|
327
|
+
return stepUnifiesWithSatisfiesAssertion;
|
|
304
328
|
}
|
|
305
329
|
|
|
306
|
-
async function
|
|
307
|
-
let
|
|
330
|
+
async function compareStepWithSubproofOrProofAssertions(step, context) {
|
|
331
|
+
let stepComparesToSubproofOrProofAssertions = false;
|
|
332
|
+
|
|
333
|
+
const unqualified = step.isUnqualified();
|
|
308
334
|
|
|
309
|
-
if (
|
|
310
|
-
const
|
|
335
|
+
if (unqualified) {
|
|
336
|
+
const stepString = step.getString();
|
|
311
337
|
|
|
312
|
-
context.trace(`Comparing the '${
|
|
338
|
+
context.trace(`Comparing the '${stepString}' step with the subproofs or proof asssertions...`);
|
|
313
339
|
|
|
314
340
|
const subproofOrProofAssertions = context.getSubproofOrProofAssertions(),
|
|
315
|
-
|
|
341
|
+
comparesToSubproofOrProofAssertions = step.compareSubproofOrProofAssertions(subproofOrProofAssertions, context);
|
|
316
342
|
|
|
317
|
-
if (
|
|
318
|
-
|
|
343
|
+
if (comparesToSubproofOrProofAssertions) {
|
|
344
|
+
stepComparesToSubproofOrProofAssertions = true;
|
|
319
345
|
}
|
|
320
346
|
|
|
321
|
-
if (
|
|
322
|
-
context.debug(`...compared the '${
|
|
347
|
+
if (stepComparesToSubproofOrProofAssertions) {
|
|
348
|
+
context.debug(`...compared the '${stepString}' step with the subproofs or proof asssertions.`);
|
|
323
349
|
}
|
|
324
350
|
}
|
|
325
351
|
|
|
326
|
-
return
|
|
352
|
+
return stepComparesToSubproofOrProofAssertions;
|
|
327
353
|
}
|
|
328
354
|
|
|
329
|
-
export const
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
355
|
+
export const unifySteps = [
|
|
356
|
+
unifyStepWithRule,
|
|
357
|
+
unifyStepWithReference,
|
|
358
|
+
unifyStepAsSatisfiesAssertion,
|
|
359
|
+
unifyStepWithTopLevelAssertion,
|
|
360
|
+
unifyStepAsEquality,
|
|
361
|
+
unifyStepAsJudgement,
|
|
362
|
+
unifyStepAsTypeAssertion,
|
|
363
|
+
unifyStepAsPropertyAssertion,
|
|
364
|
+
unifyStepWithSatisfiesAssertion,
|
|
365
|
+
compareStepWithSubproofOrProofAssertions
|
|
340
366
|
];
|