occam-verify-cli 0.0.914 → 0.0.916
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/assignment/judgement.js +62 -0
- package/lib/axiomLemmaTheoremConjecture.js +4 -3
- package/lib/conclusion.js +5 -5
- package/lib/context/file.js +7 -7
- package/lib/context/local/intrinsicLevel.js +326 -0
- package/lib/context/local/metaLevel.js +290 -0
- package/lib/judgement.js +87 -0
- package/lib/metaConsequent.js +4 -4
- package/lib/metaLemmaMetatheorem.js +11 -11
- package/lib/metaSupposition.js +7 -7
- package/lib/metavariable.js +5 -5
- package/lib/premise.js +12 -12
- package/lib/rule.js +12 -12
- package/lib/verifier/node/metaLevel.js +214 -0
- package/lib/verifier/node/statementAsCombinator.js +9 -9
- package/lib/verifier/node/termAsConstructor.js +7 -7
- package/lib/verify/axiom.js +3 -3
- package/lib/verify/conclusion.js +7 -7
- package/lib/verify/conjecture.js +3 -3
- package/lib/verify/containedAssertion.js +23 -4
- package/lib/verify/declaration.js +15 -15
- package/lib/verify/definedAssertion.js +18 -4
- package/lib/verify/derivation.js +3 -3
- package/lib/verify/frame.js +19 -19
- package/lib/verify/judgement.js +121 -0
- package/lib/verify/lemma.js +3 -3
- package/lib/verify/metaConsequent.js +7 -7
- package/lib/verify/metaDerivation.js +3 -3
- package/lib/verify/metaLemma.js +6 -6
- package/lib/verify/metaSubDerivation.js +3 -3
- package/lib/verify/metaSubproof.js +7 -6
- package/lib/verify/metaSupposition.js +9 -9
- package/lib/verify/metaSuppositions.js +3 -3
- package/lib/verify/metaproof.js +7 -6
- package/lib/verify/metaproofStep.js +16 -16
- package/lib/verify/metastatement/qualified.js +22 -22
- package/lib/verify/metastatement/unqualified.js +7 -7
- package/lib/verify/metastatement.js +37 -37
- package/lib/verify/metatheorem.js +6 -6
- package/lib/verify/metavariable.js +6 -6
- package/lib/verify/premise.js +9 -9
- package/lib/verify/premises.js +3 -3
- package/lib/verify/proof.js +4 -3
- package/lib/verify/rule.js +6 -6
- package/lib/verify/ruleDerivation.js +3 -3
- package/lib/verify/ruleProof.js +7 -6
- package/lib/verify/ruleProofStep.js +16 -16
- package/lib/verify/ruleSubDerivation.js +3 -3
- package/lib/verify/ruleSubproof.js +7 -6
- package/lib/verify/statement.js +4 -17
- package/lib/verify/subDerivation.js +3 -3
- package/lib/verify/subproof.js +4 -3
- package/lib/verify/termAsConstructor.js +3 -3
- package/lib/verify/theorem.js +4 -4
- package/package.json +2 -2
- package/src/assignment/judgement.js +30 -0
- package/src/axiomLemmaTheoremConjecture.js +4 -2
- package/src/conclusion.js +7 -7
- package/src/context/file.js +5 -5
- package/src/context/{local.js → local/intrinsicLevel.js} +25 -20
- package/src/context/{localMeta.js → local/metaLevel.js} +50 -45
- package/src/{frameAssertion.js → judgement.js} +5 -5
- package/src/metaConsequent.js +7 -7
- package/src/metaLemmaMetatheorem.js +11 -11
- package/src/metaSupposition.js +13 -13
- package/src/metavariable.js +6 -7
- package/src/premise.js +26 -26
- package/src/rule.js +12 -12
- package/src/verifier/node/{metastatement.js → metaLevel.js} +19 -21
- package/src/verifier/node/statementAsCombinator.js +8 -8
- package/src/verifier/node/termAsConstructor.js +6 -6
- package/src/verify/axiom.js +4 -3
- package/src/verify/conclusion.js +5 -6
- package/src/verify/conjecture.js +4 -3
- package/src/verify/containedAssertion.js +24 -3
- package/src/verify/declaration.js +15 -15
- package/src/verify/definedAssertion.js +23 -3
- package/src/verify/derivation.js +2 -2
- package/src/verify/frame.js +18 -18
- package/src/verify/judgement.js +169 -0
- package/src/verify/lemma.js +4 -3
- package/src/verify/metaConsequent.js +5 -6
- package/src/verify/metaDerivation.js +2 -2
- package/src/verify/metaLemma.js +8 -7
- package/src/verify/metaSubDerivation.js +2 -2
- package/src/verify/metaSubproof.js +7 -5
- package/src/verify/metaSupposition.js +7 -8
- package/src/verify/metaSuppositions.js +2 -2
- package/src/verify/metaproof.js +7 -5
- package/src/verify/metaproofStep.js +13 -17
- package/src/verify/metastatement/qualified.js +24 -24
- package/src/verify/metastatement/unqualified.js +6 -6
- package/src/verify/metastatement.js +36 -36
- package/src/verify/metatheorem.js +8 -7
- package/src/verify/metavariable.js +5 -5
- package/src/verify/premise.js +7 -8
- package/src/verify/premises.js +2 -2
- package/src/verify/proof.js +4 -2
- package/src/verify/rule.js +8 -7
- package/src/verify/ruleDerivation.js +2 -2
- package/src/verify/ruleProof.js +7 -5
- package/src/verify/ruleProofStep.js +13 -17
- package/src/verify/ruleSubDerivation.js +2 -2
- package/src/verify/ruleSubproof.js +7 -5
- package/src/verify/statement.js +2 -22
- package/src/verify/subDerivation.js +2 -2
- package/src/verify/subproof.js +4 -2
- package/src/verify/termAsConstructor.js +4 -3
- package/src/verify/theorem.js +5 -4
- package/lib/assignment/frameAssertion.js +0 -62
- package/lib/context/local.js +0 -320
- package/lib/context/localMeta.js +0 -284
- package/lib/frameAssertion.js +0 -87
- package/lib/verifier/node/metastatement.js +0 -214
- package/lib/verify/frameAssertion.js +0 -121
- package/src/assignment/frameAssertion.js +0 -30
- package/src/verify/frameAssertion.js +0 -169
|
@@ -19,7 +19,7 @@ const statementNodeQuery = nodeQuery("/qualifiedStatement|unqualifiedStatement/s
|
|
|
19
19
|
qualifiedMetastatementNodeQuery = nodeQuery("/ruleProofStep|lastRuleProofStep/qualifiedMetastatement!"),
|
|
20
20
|
unqualifiedMetastatementNodeQuery = nodeQuery("/ruleProofStep|lastRuleProofStep/unqualifiedMetastatement!");
|
|
21
21
|
|
|
22
|
-
export default function verifyRuleProofStep(ruleProofStepNode,
|
|
22
|
+
export default function verifyRuleProofStep(ruleProofStepNode, localContext) {
|
|
23
23
|
let ruleProofStepVerified = false;
|
|
24
24
|
|
|
25
25
|
const ruleSubproofNode = ruleSubproofNodeQuery(ruleProofStepNode),
|
|
@@ -33,20 +33,19 @@ export default function verifyRuleProofStep(ruleProofStepNode, localMetaContext)
|
|
|
33
33
|
} else if (ruleSubproofNode !== null) {
|
|
34
34
|
let ruleSubproofVerified;
|
|
35
35
|
|
|
36
|
-
ruleSubproofVerified = verifyRuleSubproof(ruleSubproofNode,
|
|
36
|
+
ruleSubproofVerified = verifyRuleSubproof(ruleSubproofNode, localContext);
|
|
37
37
|
|
|
38
38
|
if (ruleSubproofVerified) {
|
|
39
39
|
const metaproofStep = MetaproofStep.fromRuleSubproofNode(ruleSubproofNode);
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
localContext.addMetaproofStep(metaproofStep);
|
|
42
42
|
|
|
43
43
|
ruleProofStepVerified = true;
|
|
44
44
|
}
|
|
45
45
|
} else if (qualifiedStatementNode !== null) {
|
|
46
46
|
let qualifiedStatementVerified;
|
|
47
47
|
|
|
48
|
-
const assignments = []
|
|
49
|
-
localContext = localMetaContext; ///
|
|
48
|
+
const assignments = [];
|
|
50
49
|
|
|
51
50
|
qualifiedStatementVerified = verifyQualifiedStatement(qualifiedStatementNode, assignments, localContext);
|
|
52
51
|
|
|
@@ -60,7 +59,7 @@ export default function verifyRuleProofStep(ruleProofStepNode, localMetaContext)
|
|
|
60
59
|
const statementNode = statementNodeQuery(qualifiedStatementNode),
|
|
61
60
|
metaproofStep = MetaproofStep.fromStatementNode(statementNode);
|
|
62
61
|
|
|
63
|
-
|
|
62
|
+
localContext.addMetaproofStep(metaproofStep);
|
|
64
63
|
|
|
65
64
|
ruleProofStepVerified = true;
|
|
66
65
|
}
|
|
@@ -68,8 +67,7 @@ export default function verifyRuleProofStep(ruleProofStepNode, localMetaContext)
|
|
|
68
67
|
let unqualifiedStatementVerified;
|
|
69
68
|
|
|
70
69
|
const derived = true,
|
|
71
|
-
assignments = []
|
|
72
|
-
localContext = localMetaContext;
|
|
70
|
+
assignments = [];
|
|
73
71
|
|
|
74
72
|
unqualifiedStatementVerified = verifyUnqualifiedStatement(unqualifiedStatementNode, assignments, derived, localContext);
|
|
75
73
|
|
|
@@ -83,7 +81,7 @@ export default function verifyRuleProofStep(ruleProofStepNode, localMetaContext)
|
|
|
83
81
|
const statementNode = statementNodeQuery(unqualifiedStatementNode),
|
|
84
82
|
metaproofStep = MetaproofStep.fromStatementNode(statementNode);
|
|
85
83
|
|
|
86
|
-
|
|
84
|
+
localContext.addMetaproofStep(metaproofStep);
|
|
87
85
|
|
|
88
86
|
ruleProofStepVerified = unqualifiedStatementVerified; ///
|
|
89
87
|
}
|
|
@@ -93,11 +91,10 @@ export default function verifyRuleProofStep(ruleProofStepNode, localMetaContext)
|
|
|
93
91
|
const assignments = [],
|
|
94
92
|
substitutions = null;
|
|
95
93
|
|
|
96
|
-
qualifiedMetastatementVerified = verifyQualifiedMetastatement(qualifiedMetastatementNode, substitutions, assignments,
|
|
94
|
+
qualifiedMetastatementVerified = verifyQualifiedMetastatement(qualifiedMetastatementNode, substitutions, assignments, localContext);
|
|
97
95
|
|
|
98
96
|
if (qualifiedMetastatementVerified) {
|
|
99
|
-
const
|
|
100
|
-
assignmentAssigned = assignAssignment(assignments, localContext);
|
|
97
|
+
const assignmentAssigned = assignAssignment(assignments, localContext);
|
|
101
98
|
|
|
102
99
|
qualifiedMetastatementVerified = assignmentAssigned; ///
|
|
103
100
|
}
|
|
@@ -106,7 +103,7 @@ export default function verifyRuleProofStep(ruleProofStepNode, localMetaContext)
|
|
|
106
103
|
const metastatementNode = metastatementNodeQuery(qualifiedMetastatementNode),
|
|
107
104
|
metaproofStep = MetaproofStep.fromMetastatementNode(metastatementNode);
|
|
108
105
|
|
|
109
|
-
|
|
106
|
+
localContext.addMetaproofStep(metaproofStep);
|
|
110
107
|
|
|
111
108
|
ruleProofStepVerified = qualifiedMetastatementVerified; ///
|
|
112
109
|
}
|
|
@@ -116,11 +113,10 @@ export default function verifyRuleProofStep(ruleProofStepNode, localMetaContext)
|
|
|
116
113
|
const derived = true,
|
|
117
114
|
assignments = [];
|
|
118
115
|
|
|
119
|
-
unqualifiedMetastatementVerified = verifyUnqualifiedMetastatement(unqualifiedMetastatementNode, assignments, derived,
|
|
116
|
+
unqualifiedMetastatementVerified = verifyUnqualifiedMetastatement(unqualifiedMetastatementNode, assignments, derived, localContext);
|
|
120
117
|
|
|
121
118
|
if (unqualifiedMetastatementVerified) {
|
|
122
|
-
const
|
|
123
|
-
assignmentAssigned = assignAssignment(assignments, localContext);
|
|
119
|
+
const assignmentAssigned = assignAssignment(assignments, localContext);
|
|
124
120
|
|
|
125
121
|
unqualifiedMetastatementVerified = assignmentAssigned; ///
|
|
126
122
|
}
|
|
@@ -129,7 +125,7 @@ export default function verifyRuleProofStep(ruleProofStepNode, localMetaContext)
|
|
|
129
125
|
const metastatementNode = metastatementNodeQuery(unqualifiedMetastatementNode),
|
|
130
126
|
metaproofStep = MetaproofStep.fromMetastatementNode(metastatementNode);
|
|
131
127
|
|
|
132
|
-
|
|
128
|
+
localContext.addMetaproofStep(metaproofStep);
|
|
133
129
|
|
|
134
130
|
ruleProofStepVerified = true;
|
|
135
131
|
}
|
|
@@ -4,14 +4,14 @@ import { nodesQuery } from "../utilities/query";
|
|
|
4
4
|
|
|
5
5
|
const ruleProofStepNodesQuery = nodesQuery("/ruleSubDerivation/ruleProofStep|lastRuleProofStep");
|
|
6
6
|
|
|
7
|
-
export default function verifyRuleSubDerivation(ruleSubDerivationNode,
|
|
7
|
+
export default function verifyRuleSubDerivation(ruleSubDerivationNode, localContext) {
|
|
8
8
|
let ruleSubDerivationVerified;
|
|
9
9
|
|
|
10
10
|
const ruleProofStepNodes = ruleProofStepNodesQuery(ruleSubDerivationNode);
|
|
11
11
|
|
|
12
12
|
ruleSubDerivationVerified = ruleProofStepNodes.every((ruleProofStepNode) => {
|
|
13
13
|
const { verifyRuleProofStep } = verifyRuleSubDerivation,
|
|
14
|
-
ruleProofStepVerified = verifyRuleProofStep(ruleProofStepNode,
|
|
14
|
+
ruleProofStepVerified = verifyRuleProofStep(ruleProofStepNode, localContext);
|
|
15
15
|
|
|
16
16
|
if (ruleProofStepVerified) {
|
|
17
17
|
return true;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import verifyPremises from "../verify/premises";
|
|
4
|
-
import
|
|
4
|
+
import MetaLevelLocalContext from "../context/local/metaLevel";
|
|
5
5
|
import verifyRuleSubDerivation from "../verify/ruleSubDerivation";
|
|
6
6
|
|
|
7
7
|
import { nodeQuery, nodesQuery } from "../utilities/query";
|
|
@@ -9,18 +9,20 @@ import { nodeQuery, nodesQuery } from "../utilities/query";
|
|
|
9
9
|
const premiseNodesQuery = nodesQuery("/ruleSubproof/premise"),
|
|
10
10
|
ruleSubDerivationNodeQuery = nodeQuery("/ruleSubproof/ruleSubDerivation");
|
|
11
11
|
|
|
12
|
-
export default function verifyRuleSubproof(ruleSubproofNode,
|
|
12
|
+
export default function verifyRuleSubproof(ruleSubproofNode, localContext) {
|
|
13
13
|
let ruleSubproofVerified = false;
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
const metaLevelLocalContext = MetaLevelLocalContext.fromLocalContext(localContext);
|
|
16
|
+
|
|
17
|
+
localContext = metaLevelLocalContext; ///
|
|
16
18
|
|
|
17
19
|
const premises = [],
|
|
18
20
|
premiseNodes = premiseNodesQuery(ruleSubproofNode),
|
|
19
|
-
premisesVerified = verifyPremises(premiseNodes, premises,
|
|
21
|
+
premisesVerified = verifyPremises(premiseNodes, premises, localContext);
|
|
20
22
|
|
|
21
23
|
if (premisesVerified) {
|
|
22
24
|
const ruleSubDerivationNode = ruleSubDerivationNodeQuery(ruleSubproofNode),
|
|
23
|
-
ruleSubDerivationVerified = verifyRuleSubDerivation(ruleSubDerivationNode,
|
|
25
|
+
ruleSubDerivationVerified = verifyRuleSubDerivation(ruleSubDerivationNode, localContext);
|
|
24
26
|
|
|
25
27
|
if (ruleSubDerivationVerified) {
|
|
26
28
|
ruleSubproofVerified = true;
|
package/src/verify/statement.js
CHANGED
|
@@ -10,7 +10,6 @@ import statementAgainstCombinatorNodesVerifier from "../verifier/nodes/statement
|
|
|
10
10
|
import { nodeQuery } from "../utilities/query";
|
|
11
11
|
|
|
12
12
|
const equalityNodeQuery = nodeQuery("/statement/equality!"),
|
|
13
|
-
statementNodeQuery = nodeQuery("/containedAssertion/statement!"),
|
|
14
13
|
typeAssertionNodeQuery = nodeQuery("/statement/typeAssertion!"),
|
|
15
14
|
definedAssertionNodeQuery = nodeQuery("/statement/definedAssertion!"),
|
|
16
15
|
containedAssertionNodeQuery = nodeQuery("/statement/containedAssertion!");
|
|
@@ -159,28 +158,9 @@ function verifyStatementAsContainedAssertion(statementNode, assignments, derived
|
|
|
159
158
|
|
|
160
159
|
localContext.trace(`Verifying the '${statementString}' statement as a contained assertion...`, containedAssertionNode);
|
|
161
160
|
|
|
162
|
-
const
|
|
161
|
+
const containedAssertionVerified = verifyContainedAssertion(containedAssertionNode, assignments, derived, localContext);
|
|
163
162
|
|
|
164
|
-
|
|
165
|
-
statementNode = statementNodeQuery(containedAssertionNode); ///
|
|
166
|
-
|
|
167
|
-
const verifyStatementFunctions = [
|
|
168
|
-
verifyStatementAsEquality,
|
|
169
|
-
verifyStatementAgainstCombinators
|
|
170
|
-
];
|
|
171
|
-
|
|
172
|
-
const statementVerified = verifyStatementFunctions.some((verifyStatementFunction) => {
|
|
173
|
-
const derived = false,
|
|
174
|
-
assignments = [],
|
|
175
|
-
statementVerified = verifyStatementFunction(statementNode, assignments, derived, localContext);
|
|
176
|
-
|
|
177
|
-
if (statementVerified) {
|
|
178
|
-
return true;
|
|
179
|
-
}
|
|
180
|
-
});
|
|
181
|
-
|
|
182
|
-
statementVerifiedAsContainedAssertion = statementVerified; ///
|
|
183
|
-
}
|
|
163
|
+
statementVerifiedAsContainedAssertion = containedAssertionVerified; ///
|
|
184
164
|
|
|
185
165
|
if (statementVerifiedAsContainedAssertion) {
|
|
186
166
|
localContext.debug(`...verified the '${statementString}' statement as a contained assertion.`, containedAssertionNode);
|
|
@@ -4,14 +4,14 @@ import { nodesQuery } from "../utilities/query";
|
|
|
4
4
|
|
|
5
5
|
const proofStepNodesQuery = nodesQuery("/subDerivation/proofStep|lastProofStep");
|
|
6
6
|
|
|
7
|
-
export default function verifySubDerivation(subDerivationNode,
|
|
7
|
+
export default function verifySubDerivation(subDerivationNode, localContext) {
|
|
8
8
|
let subDerivationVerified;
|
|
9
9
|
|
|
10
10
|
const proofStepNodes = proofStepNodesQuery(subDerivationNode);
|
|
11
11
|
|
|
12
12
|
subDerivationVerified = proofStepNodes.every((proofStepNode) => {
|
|
13
13
|
const { verifyProofStep } = verifySubDerivation,
|
|
14
|
-
proofStepVerified = verifyProofStep(proofStepNode,
|
|
14
|
+
proofStepVerified = verifyProofStep(proofStepNode, localContext);
|
|
15
15
|
|
|
16
16
|
if (proofStepVerified) {
|
|
17
17
|
return true;
|
package/src/verify/subproof.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import LocalContext from "../context/local";
|
|
4
3
|
import verifySuppositions from "../verify/suppositions";
|
|
5
4
|
import verifySubDerivation from "../verify/subDerivation";
|
|
5
|
+
import IntrinsicLevelLocalContext from "../context/local/intrinsicLevel";
|
|
6
6
|
|
|
7
7
|
import { nodeQuery, nodesQuery } from "../utilities/query";
|
|
8
8
|
|
|
@@ -12,7 +12,9 @@ const suppositionNodesQuery = nodesQuery("/subproof/supposition"),
|
|
|
12
12
|
export default function verifySubproof(subproofNode, localContext) {
|
|
13
13
|
let subproofVerified = false;
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
const intrinsicLevelLocalContext = IntrinsicLevelLocalContext.fromLocalContext(localContext); ///
|
|
16
|
+
|
|
17
|
+
localContext = intrinsicLevelLocalContext; ///
|
|
16
18
|
|
|
17
19
|
const suppositions = [],
|
|
18
20
|
suppositionNodes = suppositionNodesQuery(subproofNode),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import Constructor from "../constructor";
|
|
4
|
-
import
|
|
4
|
+
import IntrinsicLevelLocalContext from "../context/local/intrinsicLevel";
|
|
5
5
|
import termAsConstructorNodeVerifier from "../verifier/node/termAsConstructor";
|
|
6
6
|
|
|
7
7
|
export default function verifyTermAsConstructor(termNode, typeNode, fileContext) {
|
|
@@ -11,9 +11,10 @@ export default function verifyTermAsConstructor(termNode, typeNode, fileContext)
|
|
|
11
11
|
|
|
12
12
|
fileContext.debug(`Verifying the '${termString}' term as a constructor...`, termNode);
|
|
13
13
|
|
|
14
|
-
const
|
|
14
|
+
const intrinsicLevelLocalContext = IntrinsicLevelLocalContext.fromFileContext(fileContext),
|
|
15
|
+
nonTerminalNode = termNode, ///
|
|
15
16
|
childNodes = nonTerminalNode.getChildNodes(),
|
|
16
|
-
localContext =
|
|
17
|
+
localContext = intrinsicLevelLocalContext, ///
|
|
17
18
|
childNodesVerified = termAsConstructorNodeVerifier.verifyChildNodes(childNodes, localContext, () => {
|
|
18
19
|
const verifiedAhead = true;
|
|
19
20
|
|
package/src/verify/theorem.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
import Theorem from "../theorem";
|
|
4
4
|
import verifyProof from "../verify/proof";
|
|
5
|
-
import LocalContext from "../context/local";
|
|
6
5
|
import verifyLabels from "../verify/labels";
|
|
7
6
|
import verifyConsequent from "../verify/consequent";
|
|
8
7
|
import verifySuppositions from "../verify/suppositions";
|
|
8
|
+
import IntrinsicLevelLocalContext from "../context/local/intrinsicLevel";
|
|
9
9
|
|
|
10
10
|
import { first } from "../utilities/array";
|
|
11
11
|
import { nodeQuery, nodesQuery } from "../utilities/query";
|
|
@@ -19,8 +19,7 @@ export default function verifyTheorem(theoremNode, fileContext) {
|
|
|
19
19
|
let theoremVerified = false;
|
|
20
20
|
|
|
21
21
|
const labelNodes = labelNodesQuery(theoremNode),
|
|
22
|
-
labelsString = fileContext.nodesAsString(labelNodes)
|
|
23
|
-
localContext = LocalContext.fromFileContext(fileContext);
|
|
22
|
+
labelsString = fileContext.nodesAsString(labelNodes);
|
|
24
23
|
|
|
25
24
|
fileContext.trace(`Verifying the '${labelsString}' theorem...`, theoremNode);
|
|
26
25
|
|
|
@@ -28,8 +27,10 @@ export default function verifyTheorem(theoremNode, fileContext) {
|
|
|
28
27
|
labelsVerified = verifyLabels(labelNodes, labels, fileContext);
|
|
29
28
|
|
|
30
29
|
if (labelsVerified) {
|
|
31
|
-
const
|
|
30
|
+
const intrinsicLevelLocalContext = IntrinsicLevelLocalContext.fromFileContext(fileContext),
|
|
32
31
|
suppositionNodes = suppositionsNodeQuery(theoremNode),
|
|
32
|
+
suppositions = [],
|
|
33
|
+
localContext = intrinsicLevelLocalContext,
|
|
33
34
|
suppositionsVerified = verifySuppositions(suppositionNodes, suppositions, localContext);
|
|
34
35
|
|
|
35
36
|
if (suppositionsVerified) {
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "default", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return FrameAssertionAssignment;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
function _class_call_check(instance, Constructor) {
|
|
12
|
-
if (!(instance instanceof Constructor)) {
|
|
13
|
-
throw new TypeError("Cannot call a class as a function");
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
function _defineProperties(target, props) {
|
|
17
|
-
for(var i = 0; i < props.length; i++){
|
|
18
|
-
var descriptor = props[i];
|
|
19
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
20
|
-
descriptor.configurable = true;
|
|
21
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
22
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
function _create_class(Constructor, protoProps, staticProps) {
|
|
26
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
27
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
28
|
-
return Constructor;
|
|
29
|
-
}
|
|
30
|
-
var FrameAssertionAssignment = /*#__PURE__*/ function() {
|
|
31
|
-
function FrameAssertionAssignment(frameAssertion) {
|
|
32
|
-
_class_call_check(this, FrameAssertionAssignment);
|
|
33
|
-
this.frameAssertion = frameAssertion;
|
|
34
|
-
}
|
|
35
|
-
_create_class(FrameAssertionAssignment, [
|
|
36
|
-
{
|
|
37
|
-
key: "getFrameAssertion",
|
|
38
|
-
value: function getFrameAssertion() {
|
|
39
|
-
return this.frameAssertion;
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
key: "assign",
|
|
44
|
-
value: function assign(localMetaContext) {
|
|
45
|
-
var frameAssertionAdded = localMetaContext.addFrameAssertion(this.frameAssertion), frameAssertionNode = this.frameAssertion.getNode(), frameAssertionString = localMetaContext.nodeAsString(frameAssertionNode), frameAssertionAssigned = frameAssertionAdded; ///
|
|
46
|
-
frameAssertionAssigned ? localMetaContext.trace("Assigned the '".concat(frameAssertionString, "' frame assertion."), frameAssertionNode) : localMetaContext.debug("Unable to assign the '".concat(frameAssertionString, "' frame assertion."), frameAssertionNode);
|
|
47
|
-
return frameAssertionAssigned;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
], [
|
|
51
|
-
{
|
|
52
|
-
key: "fromFrameAssertion",
|
|
53
|
-
value: function fromFrameAssertion(frameAssertion) {
|
|
54
|
-
var frameAssertionAssignment = new FrameAssertionAssignment(frameAssertion);
|
|
55
|
-
return frameAssertionAssignment;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
]);
|
|
59
|
-
return FrameAssertionAssignment;
|
|
60
|
-
}();
|
|
61
|
-
|
|
62
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9hc3NpZ25tZW50L2ZyYW1lQXNzZXJ0aW9uLmpzIl0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuXG5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