occam-verify-cli 1.0.427 → 1.0.436
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/file.js +1 -1
- package/lib/element/assertion.js +115 -24
- package/lib/element/assumption.js +120 -20
- package/lib/element/axiomLemmaTheoremConjecture.js +118 -30
- package/lib/element/conclusion.js +113 -25
- package/lib/element/declaration.js +112 -37
- package/lib/element/deduction.js +112 -66
- package/lib/element/derivation.js +114 -5
- package/lib/element/equality.js +119 -26
- package/lib/element/equivalence.js +129 -40
- package/lib/element/equivalences.js +122 -7
- package/lib/element/error.js +115 -32
- package/lib/element/frame.js +119 -59
- package/lib/element/hypothesis.js +115 -27
- package/lib/element/judgement.js +120 -33
- package/lib/element/label.js +116 -63
- package/lib/element/lemma.js +1 -9
- package/lib/element/metaLemma.js +1 -8
- package/lib/element/metaLemmaMetatheorem.js +117 -29
- package/lib/element/metaType.js +68 -61
- package/lib/element/metatheorem.js +1 -8
- package/lib/element/metavariable.js +122 -93
- package/lib/element/parameter.js +120 -20
- package/lib/element/premise.js +114 -35
- package/lib/element/procedureCall.js +117 -99
- package/lib/element/procedureReference.js +120 -20
- package/lib/element/proof.js +111 -55
- package/lib/element/property.js +121 -35
- package/lib/element/propertyRelation.js +116 -72
- package/lib/element/reference.js +120 -70
- package/lib/element/rule.js +116 -41
- package/lib/element/section.js +114 -133
- package/lib/element/signature.js +120 -20
- package/lib/element/statement/combinator/bracketed.js +4 -9
- package/lib/element/statement.js +110 -125
- package/lib/element/step.js +115 -27
- package/lib/element/subDerivation.js +111 -43
- package/lib/element/subproof.js +115 -20
- package/lib/element/substitution.js +115 -31
- package/lib/element/substitutions.js +120 -6
- package/lib/element/supposition.js +114 -35
- package/lib/element/term/constructor/bracketed.js +4 -8
- package/lib/element/term.js +111 -98
- package/lib/element/theorem.js +1 -8
- package/lib/element/type.js +71 -91
- package/lib/element/typePrefix.js +120 -20
- package/lib/element/variable.js +116 -111
- package/lib/element.js +67 -0
- package/lib/node/equivalence.js +116 -0
- package/lib/node/{nonsense.js → equivalences.js} +10 -10
- package/lib/node/frame.js +11 -5
- package/lib/node/procedureReference.js +6 -6
- package/lib/node/statement.js +11 -5
- package/lib/node/term.js +8 -1
- package/lib/nonTerminalNodeMap.js +5 -4
- package/lib/process/instantiate.js +13 -38
- package/lib/process/verify.js +22 -29
- package/lib/ruleNames.js +9 -5
- package/lib/utilities/brackets.js +11 -11
- package/lib/utilities/element.js +606 -99
- package/lib/utilities/instance.js +61 -0
- package/lib/utilities/string.js +87 -34
- package/package.json +6 -6
- package/src/context/file.js +1 -1
- package/src/element/assertion.js +4 -16
- package/src/element/assumption.js +5 -12
- package/src/element/axiomLemmaTheoremConjecture.js +4 -16
- package/src/element/conclusion.js +4 -16
- package/src/element/declaration.js +4 -16
- package/src/element/deduction.js +5 -19
- package/src/element/derivation.js +5 -2
- package/src/element/equality.js +4 -16
- package/src/element/equivalence.js +25 -37
- package/src/element/equivalences.js +12 -6
- package/src/element/error.js +4 -24
- package/src/element/frame.js +5 -56
- package/src/element/hypothesis.js +6 -23
- package/src/element/judgement.js +5 -30
- package/src/element/label.js +8 -19
- package/src/element/lemma.js +0 -7
- package/src/element/metaLemma.js +0 -7
- package/src/element/metaLemmaMetatheorem.js +4 -16
- package/src/element/metaType.js +23 -64
- package/src/element/metatheorem.js +0 -7
- package/src/element/metavariable.js +6 -94
- package/src/element/parameter.js +10 -18
- package/src/element/premise.js +4 -31
- package/src/element/procedureCall.js +5 -77
- package/src/element/procedureReference.js +7 -17
- package/src/element/proof.js +5 -17
- package/src/element/property.js +8 -30
- package/src/element/propertyRelation.js +5 -33
- package/src/element/reference.js +8 -72
- package/src/element/rule.js +4 -41
- package/src/element/section.js +4 -129
- package/src/element/signature.js +7 -13
- package/src/element/statement/combinator/bracketed.js +3 -9
- package/src/element/statement.js +3 -126
- package/src/element/step.js +4 -16
- package/src/element/subDerivation.js +5 -3
- package/src/element/subproof.js +5 -12
- package/src/element/substitution.js +4 -24
- package/src/element/substitutions.js +6 -2
- package/src/element/supposition.js +4 -31
- package/src/element/term/constructor/bracketed.js +4 -9
- package/src/element/term.js +6 -59
- package/src/element/theorem.js +0 -7
- package/src/element/type.js +9 -104
- package/src/element/typePrefix.js +8 -13
- package/src/element/variable.js +6 -109
- package/src/element.js +29 -0
- package/src/node/equivalence.js +16 -0
- package/src/node/{nonsense.js → equivalences.js} +2 -2
- package/src/node/frame.js +10 -5
- package/src/node/procedureReference.js +4 -4
- package/src/node/statement.js +10 -5
- package/src/node/term.js +7 -0
- package/src/nonTerminalNodeMap.js +7 -4
- package/src/process/instantiate.js +8 -36
- package/src/process/verify.js +42 -47
- package/src/ruleNames.js +2 -1
- package/src/utilities/brackets.js +13 -13
- package/src/utilities/element.js +760 -139
- package/src/utilities/instance.js +53 -0
- package/src/utilities/string.js +118 -59
package/src/utilities/element.js
CHANGED
|
@@ -3,8 +3,14 @@
|
|
|
3
3
|
import elements from "../elements";
|
|
4
4
|
|
|
5
5
|
import { baseType } from "../element/type";
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
6
|
+
import { instantiateReference } from "../process/instantiate";
|
|
7
|
+
import { equivalenceStringFromTerms,
|
|
8
|
+
subproofStringFromSubproofNode,
|
|
9
|
+
rulsStringFromLabelsPremisesAndConclusion,
|
|
10
|
+
procedureCallStringFromProcedureReferenceAndParameters,
|
|
11
|
+
sectionStringFromHypothesesAxiomLemmaTheoremAndConjecture,
|
|
12
|
+
metaLemmaMetatheoremStringFromLabelSuppositionsAndDeduction,
|
|
13
|
+
axiomLemmaTheoremConjectureStringFromLabelsSuppositionsAndDeduction } from "../utilities/string";
|
|
8
14
|
|
|
9
15
|
export function typeFromTypeNode(typeNode, context) {
|
|
10
16
|
let type;
|
|
@@ -24,7 +30,7 @@ export function typeFromTypeNode(typeNode, context) {
|
|
|
24
30
|
properties = null,
|
|
25
31
|
provisional = null;
|
|
26
32
|
|
|
27
|
-
type = new Type(string, node, name, prefixName, superTypes, properties, provisional);
|
|
33
|
+
type = new Type(context, string, node, name, prefixName, superTypes, properties, provisional);
|
|
28
34
|
}
|
|
29
35
|
|
|
30
36
|
return type;
|
|
@@ -35,7 +41,7 @@ export function termFromTermNode(termNode, context) {
|
|
|
35
41
|
node = termNode, ///
|
|
36
42
|
string = context.nodeAsString(node),
|
|
37
43
|
type = null,
|
|
38
|
-
term = new Term(string, node, type);
|
|
44
|
+
term = new Term(context, string, node, type);
|
|
39
45
|
|
|
40
46
|
return term;
|
|
41
47
|
}
|
|
@@ -52,7 +58,40 @@ export function stepFromStepNode(stepNode, context) {
|
|
|
52
58
|
return step;
|
|
53
59
|
}
|
|
54
60
|
|
|
55
|
-
export function
|
|
61
|
+
export function ruleFromRuleNode(ruleNode, context) {
|
|
62
|
+
const { Rule } = elements,
|
|
63
|
+
proof = proofFromRuleNode(ruleNode, context),
|
|
64
|
+
labels = labelsFromRuleNode(ruleNode, context),
|
|
65
|
+
premises = premisesFromRuleNode(ruleNode, context),
|
|
66
|
+
conclusion = conclusionFromRuleNode(ruleNode, context),
|
|
67
|
+
ruleString = rulsStringFromLabelsPremisesAndConclusion(labels, premises, conclusion),
|
|
68
|
+
node = ruleNode, ///
|
|
69
|
+
string = ruleString, ///
|
|
70
|
+
rule = new Rule(context, string, node, labels, premises, conclusion, proof);
|
|
71
|
+
|
|
72
|
+
return rule;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function labelFromLabelNode(labelNode, context) {
|
|
76
|
+
const { Label } = elements,
|
|
77
|
+
node = labelNode, ///
|
|
78
|
+
string = context.nodeAsString(node),
|
|
79
|
+
metavariable = metavariableFromLabelNode(labelNode, context),
|
|
80
|
+
label = new Label(context, string, node, metavariable);
|
|
81
|
+
|
|
82
|
+
return label;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function errorFromErrorNode(errorNode, context) {
|
|
86
|
+
const { Error } = elements,
|
|
87
|
+
node = errorNode, ///
|
|
88
|
+
string = context.nodeAsString(node),
|
|
89
|
+
error = new Error(context, string, node);
|
|
90
|
+
|
|
91
|
+
return error;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export function lemmaFromLemmaNode(lemmaNode, context) {
|
|
56
95
|
const { Lemma } = elements,
|
|
57
96
|
axiomLemmaTheoremConjectureNode = lemmaNode, ///
|
|
58
97
|
proof = proofFromAxiomLemmaTheoremConjectureNode(axiomLemmaTheoremConjectureNode, context),
|
|
@@ -61,8 +100,9 @@ export function lemmaromAxiomNode(lemmaNode, context) {
|
|
|
61
100
|
suppositions = suppositionsFromAxiomLemmaTheoremConjectureNode(axiomLemmaTheoremConjectureNode, context),
|
|
62
101
|
signature = signatureFromAxiomLemmaTheoremConjectureNode(axiomLemmaTheoremConjectureNode, context),
|
|
63
102
|
hypotheses = [],
|
|
103
|
+
axiomLemmaTheoremConjectureString = axiomLemmaTheoremConjectureStringFromLabelsSuppositionsAndDeduction(labels, suppositions, deduction),
|
|
64
104
|
node = lemmaNode, ///
|
|
65
|
-
string =
|
|
105
|
+
string = axiomLemmaTheoremConjectureString, ///
|
|
66
106
|
lemma = new Lemma(context, string, node, labels, suppositions, deduction, proof, signature, hypotheses);
|
|
67
107
|
|
|
68
108
|
return lemma;
|
|
@@ -73,7 +113,7 @@ export function frameFromFrameNode(frameNode, context) {
|
|
|
73
113
|
node = frameNode, ///
|
|
74
114
|
string = context.nodeAsString(node),
|
|
75
115
|
assumptions = assumptionsFromFrameNode(frameNode, context),
|
|
76
|
-
frame = new Frame(string, node, assumptions);
|
|
116
|
+
frame = new Frame(context, string, node, assumptions);
|
|
77
117
|
|
|
78
118
|
return frame;
|
|
79
119
|
}
|
|
@@ -83,7 +123,7 @@ export function proofFromProofNode(proofNode, context) {
|
|
|
83
123
|
node = proofNode, ///
|
|
84
124
|
string = null,
|
|
85
125
|
derivation = derivationFromProofNode(proofNode, context),
|
|
86
|
-
proof = new Proof(string, node, derivation);
|
|
126
|
+
proof = new Proof(context, string, node, derivation);
|
|
87
127
|
|
|
88
128
|
return proof;
|
|
89
129
|
}
|
|
@@ -97,14 +137,41 @@ export function axiomFromAxiomNode(axiomNode, context) {
|
|
|
97
137
|
suppositions = suppositionsFromAxiomLemmaTheoremConjectureNode(axiomLemmaTheoremConjectureNode, context),
|
|
98
138
|
signature = signatureFromAxiomLemmaTheoremConjectureNode(axiomLemmaTheoremConjectureNode, context),
|
|
99
139
|
hypotheses = [],
|
|
140
|
+
axiomLemmaTheoremConjectureString = axiomLemmaTheoremConjectureStringFromLabelsSuppositionsAndDeduction(labels, suppositions, deduction),
|
|
100
141
|
node = axiomNode, ///
|
|
101
|
-
string =
|
|
142
|
+
string = axiomLemmaTheoremConjectureString, ///
|
|
102
143
|
axiom = new Axiom(context, string, node, labels, suppositions, deduction, proof, signature, hypotheses);
|
|
103
144
|
|
|
104
145
|
return axiom;
|
|
105
146
|
}
|
|
106
147
|
|
|
107
|
-
export function
|
|
148
|
+
export function sectionFromSectionNode(sectionNode, context) {
|
|
149
|
+
const hypothesisNodes = sectionNode.getHypothesisNodes(),
|
|
150
|
+
hypotheses = hypothesesFromHypothesisNodes(hypothesisNodes, context),
|
|
151
|
+
axiom = axiomFromSectionNode(sectionNode, context),
|
|
152
|
+
lemma = lemmaFromSectionNode(sectionNode, context),
|
|
153
|
+
theorem = theoremFromSectionNode(sectionNode, context),
|
|
154
|
+
conjecture = conjectureFromSectionNode(sectionNode, context),
|
|
155
|
+
sectionString = sectionStringFromHypothesesAxiomLemmaTheoremAndConjecture(hypotheses, axiom, lemma, theorem, conjecture, context),
|
|
156
|
+
node = sectionNode, ///
|
|
157
|
+
string = sectionString, ///
|
|
158
|
+
section = new Section(context, string, node, hypotheses, axiom, lemma, theorem, conjecture);
|
|
159
|
+
|
|
160
|
+
return section;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export function premiseFromPremiseNode(premiseNode, context) {
|
|
164
|
+
const { Premise } = elements,
|
|
165
|
+
node = premiseNode, ///
|
|
166
|
+
string = context.nodeAsString(node),
|
|
167
|
+
statement = statementFromPremiseNode(premiseNode, context),
|
|
168
|
+
procedureCall = procedureCallFromPremiseNode(premiseNode, context),
|
|
169
|
+
premise = new Premise(context, string, node, statement, procedureCall);
|
|
170
|
+
|
|
171
|
+
return premise
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export function theoremFromTheoremNode(theoremNode, context) {
|
|
108
175
|
const { Theorem } = elements,
|
|
109
176
|
axiomLemmaTheoremConjectureNode = theoremNode, ///
|
|
110
177
|
proof = proofFromAxiomLemmaTheoremConjectureNode(axiomLemmaTheoremConjectureNode, context),
|
|
@@ -113,29 +180,14 @@ export function theoremromAxiomNode(theoremNode, context) {
|
|
|
113
180
|
suppositions = suppositionsFromAxiomLemmaTheoremConjectureNode(axiomLemmaTheoremConjectureNode, context),
|
|
114
181
|
signature = signatureFromAxiomLemmaTheoremConjectureNode(axiomLemmaTheoremConjectureNode, context),
|
|
115
182
|
hypotheses = [],
|
|
183
|
+
axiomLemmaTheoremConjectureString = axiomLemmaTheoremConjectureStringFromLabelsSuppositionsAndDeduction(labels, suppositions, deduction),
|
|
116
184
|
node = theoremNode, ///
|
|
117
|
-
string =
|
|
185
|
+
string = axiomLemmaTheoremConjectureString, ///
|
|
118
186
|
theorem = new Theorem(context, string, node, labels, suppositions, deduction, proof, signature, hypotheses);
|
|
119
187
|
|
|
120
188
|
return theorem;
|
|
121
189
|
}
|
|
122
190
|
|
|
123
|
-
export function conjectureromAxiomNode(conjectureNode, context) {
|
|
124
|
-
const { Conjecture } = elements,
|
|
125
|
-
axiomLemmaTheoremConjectureNode = conjectureNode, ///
|
|
126
|
-
proof = proofFromAxiomLemmaTheoremConjectureNode(axiomLemmaTheoremConjectureNode, context),
|
|
127
|
-
labels = labelsFromAxiomLemmaTheoremConjectureNode(axiomLemmaTheoremConjectureNode, context),
|
|
128
|
-
deduction = deductionFromAxiomLemmaTheoremConjectureNode(axiomLemmaTheoremConjectureNode, context),
|
|
129
|
-
suppositions = suppositionsFromAxiomLemmaTheoremConjectureNode(axiomLemmaTheoremConjectureNode, context),
|
|
130
|
-
signature = signatureFromAxiomLemmaTheoremConjectureNode(axiomLemmaTheoremConjectureNode, context),
|
|
131
|
-
hypotheses = [],
|
|
132
|
-
node = conjectureNode, ///
|
|
133
|
-
string = stringFromLabelsSuppositionsAndDeduction(labels, suppositions, deduction),
|
|
134
|
-
conjecture = new Conjecture(context, string, node, labels, suppositions, deduction, proof, signature, hypotheses);
|
|
135
|
-
|
|
136
|
-
return conjecture;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
191
|
export function equalityFromEqualityNode(equalityNode, context) {
|
|
140
192
|
const { Equality } = elements,
|
|
141
193
|
node = equalityNode, ///
|
|
@@ -155,19 +207,19 @@ export function metaTypeFromMetaTypeNode(metaTypeNode, context) {
|
|
|
155
207
|
string = context.nodeAsString(node),
|
|
156
208
|
metaTypeName = metaTypeNode.getMetaTypeName(),
|
|
157
209
|
name = metaTypeName, ///
|
|
158
|
-
metaType = new MetaType(string, node, name);
|
|
210
|
+
metaType = new MetaType(context, string, node, name);
|
|
159
211
|
|
|
160
212
|
return metaType;
|
|
161
213
|
}
|
|
162
214
|
|
|
163
215
|
export function propertyFromPropertyNode(propertyNode, context) {
|
|
164
216
|
const { Property } = elements,
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
217
|
+
node = propertyNode, ///
|
|
218
|
+
string = context.nodeAsString(node),
|
|
219
|
+
propertyName = propertyNode.getPropertyName(),
|
|
220
|
+
nominalTypeName = null,
|
|
221
|
+
name = propertyName, ///
|
|
222
|
+
property = new Property(context, string, node, name, nominalTypeName);
|
|
171
223
|
|
|
172
224
|
return property;
|
|
173
225
|
}
|
|
@@ -179,7 +231,7 @@ export function variableFromVariableNode(variableNode, context) {
|
|
|
179
231
|
type = null,
|
|
180
232
|
identifier = identifierFromVarialbeNode(variableNode, context),
|
|
181
233
|
propertyRelations = [],
|
|
182
|
-
variable = new Variable(string, node, type, identifier, propertyRelations);
|
|
234
|
+
variable = new Variable(context, string, node, type, identifier, propertyRelations);
|
|
183
235
|
|
|
184
236
|
return variable;
|
|
185
237
|
}
|
|
@@ -191,7 +243,7 @@ export function subproofFromSubproofNode(subproofNode, context) {
|
|
|
191
243
|
subDerivation = subDerivationFromSubproofNode(subproofNode, context),
|
|
192
244
|
subproofString = subproofStringFromSubproofNode(subproofNode, context),
|
|
193
245
|
string = subproofString, ///
|
|
194
|
-
subproof = new SubProof(string, node, suppositions, subDerivation);
|
|
246
|
+
subproof = new SubProof(context, string, node, suppositions, subDerivation);
|
|
195
247
|
|
|
196
248
|
return subproof;
|
|
197
249
|
}
|
|
@@ -227,7 +279,7 @@ export function statementFromStatementNode(statementNode, context) {
|
|
|
227
279
|
const { Statement } = elements,
|
|
228
280
|
node = statementNode, ///
|
|
229
281
|
string = context.nodeAsString(node),
|
|
230
|
-
statement = new Statement(string, node);
|
|
282
|
+
statement = new Statement(context, string, node);
|
|
231
283
|
|
|
232
284
|
return statement;
|
|
233
285
|
}
|
|
@@ -237,7 +289,7 @@ export function signatureFromSignatureNode(signatureNode, context) {
|
|
|
237
289
|
node = signatureNode, ///
|
|
238
290
|
string = context.nodeAsString(node),
|
|
239
291
|
terms = termsFromSignatureNode(signatureNode, context),
|
|
240
|
-
signature = new Signature(string, node, terms);
|
|
292
|
+
signature = new Signature(context, string, node, terms);
|
|
241
293
|
|
|
242
294
|
return signature;
|
|
243
295
|
}
|
|
@@ -247,17 +299,91 @@ export function referenceFromReferenceNode(referenceNode, context) {
|
|
|
247
299
|
node = referenceNode, ///
|
|
248
300
|
string = context.nodeAsString(node),
|
|
249
301
|
metavariable = metavariableFromReferenceNode(referenceNode, context),
|
|
250
|
-
reference = new Reference(string, node, metavariable);
|
|
302
|
+
reference = new Reference(context, string, node, metavariable);
|
|
251
303
|
|
|
252
304
|
return reference;
|
|
253
305
|
}
|
|
254
306
|
|
|
307
|
+
export function conjectureroConjectureNode(conjectureNode, context) {
|
|
308
|
+
const { Conjecture } = elements,
|
|
309
|
+
axiomLemmaTheoremConjectureNode = conjectureNode, ///
|
|
310
|
+
proof = proofFromAxiomLemmaTheoremConjectureNode(axiomLemmaTheoremConjectureNode, context),
|
|
311
|
+
labels = labelsFromAxiomLemmaTheoremConjectureNode(axiomLemmaTheoremConjectureNode, context),
|
|
312
|
+
deduction = deductionFromAxiomLemmaTheoremConjectureNode(axiomLemmaTheoremConjectureNode, context),
|
|
313
|
+
suppositions = suppositionsFromAxiomLemmaTheoremConjectureNode(axiomLemmaTheoremConjectureNode, context),
|
|
314
|
+
signature = signatureFromAxiomLemmaTheoremConjectureNode(axiomLemmaTheoremConjectureNode, context),
|
|
315
|
+
hypotheses = [],
|
|
316
|
+
axiomLemmaTheoremConjectureString = axiomLemmaTheoremConjectureStringFromLabelsSuppositionsAndDeduction(labels, suppositions, deduction),
|
|
317
|
+
node = conjectureNode, ///
|
|
318
|
+
string = axiomLemmaTheoremConjectureString, ///
|
|
319
|
+
conjecture = new Conjecture(context, string, node, labels, suppositions, deduction, proof, signature, hypotheses);
|
|
320
|
+
|
|
321
|
+
return conjecture;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
export function judgementFromJudgementNode(judgementNode, context) {
|
|
325
|
+
const { Judgement } = elements,
|
|
326
|
+
node = judgementNode, ///
|
|
327
|
+
string = context.nodeAsString(node),
|
|
328
|
+
frame = frameFromJudgementNode(judgementNode, context),
|
|
329
|
+
assumption = assumptionFromJudgementNode(judgementNode, context),
|
|
330
|
+
judgement = new Judgement(context, string, node, frame, assumption);
|
|
331
|
+
|
|
332
|
+
return judgement;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
export function metaLemmaFromMetaLemmaNode(metaLemmaNode, context) {
|
|
336
|
+
const { MetaLemma } = elements,
|
|
337
|
+
metaLemmaMetathoremNode = metaLemmaNode, ///
|
|
338
|
+
proof = proofFromMetaLemmaMetatheoremNode(metaLemmaMetathoremNode, context),
|
|
339
|
+
label = labelFromMetaLemmaMetatheoremNode(metaLemmaMetathoremNode, context),
|
|
340
|
+
deduction = deductionFromMetaLemmaMetatheoremNode(metaLemmaMetathoremNode, context),
|
|
341
|
+
suppositions = suppositionsFromMetaLemmaMetatheoremNode(metaLemmaMetathoremNode, context),
|
|
342
|
+
substitutions = null,
|
|
343
|
+
node = metaLemmaNode, ///
|
|
344
|
+
string = metaLemmaMetatheoremStringFromLabelSuppositionsAndDeduction(label, suppositions, deduction),
|
|
345
|
+
metaLemma = new MetaLemma(context, string, node, label, suppositions, deduction, proof, substitutions);
|
|
346
|
+
|
|
347
|
+
return metaLemma;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
export function parameterFromParameterNode(parameterNode, context) {
|
|
351
|
+
const { Parameter } = elements,
|
|
352
|
+
node = parameterNode, ///
|
|
353
|
+
string = context.nodeAsString(node),
|
|
354
|
+
parameterName = parameterNode.getParameterName(),
|
|
355
|
+
name = parameterName, ///
|
|
356
|
+
parameter = new Parameter(context, string, node, name);
|
|
357
|
+
|
|
358
|
+
return parameter;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
export function hypothesisFromHypothesisNode(hypotheseNode, context) {
|
|
362
|
+
const { Hypothsis } = elements,
|
|
363
|
+
node = hypotheseNode, ///
|
|
364
|
+
string = context.nodeAsString(node),
|
|
365
|
+
statement = statementFromHypothesisNode(hypotheseNode, context),
|
|
366
|
+
parameter = new Hypothsis(context, string, node, statement);
|
|
367
|
+
|
|
368
|
+
return parameter;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
export function conclusionFromConclusionNode(conclusionNode, context) {
|
|
372
|
+
const { Conclusion } = elements,
|
|
373
|
+
node = conclusionNode, ///
|
|
374
|
+
string = context.nodeAsString(node),
|
|
375
|
+
statement = statementFromConclusionNode(conclusionNode, context),
|
|
376
|
+
conclusion = new Conclusion(context, string, node, statement);
|
|
377
|
+
|
|
378
|
+
return conclusion;
|
|
379
|
+
}
|
|
380
|
+
|
|
255
381
|
export function conclusinoFromConclusionNode(conclusinoNode, context) {
|
|
256
382
|
const { Conclusion } = elements,
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
383
|
+
node = conclusinoNode, ///
|
|
384
|
+
string = context.nodeAsString(node),
|
|
385
|
+
statement = statementFromConclusionNode(conclusinoNode, context),
|
|
386
|
+
conclusino = new Conclusion(context, string, node, statement);
|
|
261
387
|
|
|
262
388
|
return conclusino;
|
|
263
389
|
}
|
|
@@ -268,7 +394,7 @@ export function assumptionFromAssumptionNode(assumptionNode, context) {
|
|
|
268
394
|
string = context.nodeAsString(node),
|
|
269
395
|
statement = statementFromAssumptionNode(assumptionNode, context),
|
|
270
396
|
reference = referenceFromAssumptionNode(assumptionNode, context),
|
|
271
|
-
assumption = new Assumption(string, node, statement, reference);
|
|
397
|
+
assumption = new Assumption(context, string, node, statement, reference);
|
|
272
398
|
|
|
273
399
|
return assumption;
|
|
274
400
|
}
|
|
@@ -278,7 +404,7 @@ export function derivationFromDerivationNode(derivationNode, context) {
|
|
|
278
404
|
node = derivationNode, ///
|
|
279
405
|
string = null,
|
|
280
406
|
stepsOrSubproofs = stepsOrSubproofsFromDerivationNode(derivationNode, context),
|
|
281
|
-
derivation = new Derivation(string, node, stepsOrSubproofs);
|
|
407
|
+
derivation = new Derivation(context, string, node, stepsOrSubproofs);
|
|
282
408
|
|
|
283
409
|
return derivation;
|
|
284
410
|
}
|
|
@@ -289,11 +415,74 @@ export function typePrefixFromTypePrefixNode(typePrefixNode, context) {
|
|
|
289
415
|
string = context.nodeAsString(node),
|
|
290
416
|
term = termFromTypePrefixNode(typePrefixNode, context),
|
|
291
417
|
type = typeFromTypePrefixNode(typePrefixNode, context),
|
|
292
|
-
typePrefix = new TypePrefix(string, node, term, type);
|
|
418
|
+
typePrefix = new TypePrefix(context, string, node, term, type);
|
|
293
419
|
|
|
294
420
|
return typePrefix;
|
|
295
421
|
}
|
|
296
422
|
|
|
423
|
+
export function metatheoremFromMetaLemmaNode(metatheoremNode, context) {
|
|
424
|
+
const { Metatehorem } = elements,
|
|
425
|
+
metaLemmaMetathoremNode = metatheoremNode, ///
|
|
426
|
+
proof = proofFromMetaLemmaMetatheoremNode(metaLemmaMetathoremNode, context),
|
|
427
|
+
label = labelFromMetaLemmaMetatheoremNode(metaLemmaMetathoremNode, context),
|
|
428
|
+
deduction = deductionFromMetaLemmaMetatheoremNode(metaLemmaMetathoremNode, context),
|
|
429
|
+
suppositions = suppositionsFromMetaLemmaMetatheoremNode(metaLemmaMetathoremNode, context),
|
|
430
|
+
substitutions = null,
|
|
431
|
+
node = metaLemmaNode, ///
|
|
432
|
+
string = metaLemmaMetatheoremStringFromLabelSuppositionsAndDeduction(label, suppositions, deduction),
|
|
433
|
+
metatheorem = new Metatehorem(context, string, node, label, suppositions, deduction, proof, substitutions);
|
|
434
|
+
|
|
435
|
+
return metatheorem;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
export function referenceFromMetavariableNode(metavariableNode, context) {
|
|
439
|
+
const metavariableString = context.nodeAsString(metavariableNode),
|
|
440
|
+
referenceString = metavariableString, ///
|
|
441
|
+
string = referenceString, ///
|
|
442
|
+
referenceNode = instantiateReference(string, context),
|
|
443
|
+
reference = referenceFromReferenceNode(referenceNode, context);
|
|
444
|
+
|
|
445
|
+
return reference;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
export function hyppothesisFromHypothesisNode(hypothesisNode, context) {
|
|
449
|
+
const { Hypothesis } = elements,
|
|
450
|
+
node = hypothesisNode, ///
|
|
451
|
+
string = context.nodeAsString(node),
|
|
452
|
+
statement = statementFromHypothesisNode(hypothesisNode, context),
|
|
453
|
+
hypothesis = new Hypothesis(context, string, node, statement);
|
|
454
|
+
|
|
455
|
+
return hypothesis
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
export function suppositionFromSuppositionNode(suppositionNode, context) {
|
|
459
|
+
const { Supposition } = elements,
|
|
460
|
+
node = suppositionNode, ///
|
|
461
|
+
string = context.nodeAsString(node),
|
|
462
|
+
statement = statementFromSuppositionNode(suppositionNode, context),
|
|
463
|
+
procedureCall = procedureCallFromSuppositionNode(suppositionNode, context),
|
|
464
|
+
supposition = new Supposition(context, string, node, statement, procedureCall);
|
|
465
|
+
|
|
466
|
+
return supposition
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
export function equivalenceFromEquivalenceNode(equivalenceNode, context) {
|
|
470
|
+
const { Equivalence } = elements,
|
|
471
|
+
node = equivalenceNode, ///
|
|
472
|
+
terms = termsFromEquivalenceNode(equivalenceNode, context),
|
|
473
|
+
equivalenceString = equivalenceStringFromTerms(terms),
|
|
474
|
+
string = equivalenceString, ///
|
|
475
|
+
equivalence = new Equivalence(context, string, node, terms);
|
|
476
|
+
|
|
477
|
+
return equivalence;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
export function nameFromProcedureReferenceNode(procedureReferenceNode, context) {
|
|
481
|
+
const name = procedureReferenceNode.getName();
|
|
482
|
+
|
|
483
|
+
return name;
|
|
484
|
+
}
|
|
485
|
+
|
|
297
486
|
export function metavariableFromMetavariableNode(metavariableNode, context) {
|
|
298
487
|
const { Metavariable } = elements,
|
|
299
488
|
node = metavariableNode, ///
|
|
@@ -302,7 +491,7 @@ export function metavariableFromMetavariableNode(metavariableNode, context) {
|
|
|
302
491
|
name = metavariableName, ///
|
|
303
492
|
type = null,
|
|
304
493
|
metaType = null,
|
|
305
|
-
metavariable = new Metavariable(string, node, name, type, metaType);
|
|
494
|
+
metavariable = new Metavariable(context, string, node, name, type, metaType);
|
|
306
495
|
|
|
307
496
|
return metavariable;
|
|
308
497
|
}
|
|
@@ -312,7 +501,7 @@ export function subDerivationFromSubDerivationNode(subDerivationNode, context) {
|
|
|
312
501
|
node = subDerivationNode, ///
|
|
313
502
|
string = null,
|
|
314
503
|
stepsOrSubproofs = stepsOrSubproofsFromSubDerivationNode(subDerivationNode, context),
|
|
315
|
-
subDerivation = new SubDerivation(string, node, stepsOrSubproofs);
|
|
504
|
+
subDerivation = new SubDerivation(context, string, node, stepsOrSubproofs);
|
|
316
505
|
|
|
317
506
|
return subDerivation;
|
|
318
507
|
|
|
@@ -324,11 +513,23 @@ export function typeAssertionFromTypeAssertionNode(typeAssertionNode, context) {
|
|
|
324
513
|
string = context.nodeAsString(node),
|
|
325
514
|
term = termFromTypeAssertionNode(typeAssertionNode, context),
|
|
326
515
|
type = typeFromTypeAssertionNode(typeAssertionNode, context),
|
|
327
|
-
typeAssertion = new TypeAssertion(string, node, term, type);
|
|
516
|
+
typeAssertion = new TypeAssertion(context, string, node, term, type);
|
|
328
517
|
|
|
329
518
|
return typeAssertion;
|
|
330
519
|
}
|
|
331
520
|
|
|
521
|
+
export function procedureCallFromProcedureCallNode(procedureCallNode, context) {
|
|
522
|
+
const { ProcedureCall } = elements,
|
|
523
|
+
parameters = parametersFromProcedureCallNode(procedureCallNode, context),
|
|
524
|
+
procedureReference = procedureReferenceFromProcedureCallNode(procedureCallNode, context),
|
|
525
|
+
procedureCallString = procedureCallStringFromProcedureReferenceAndParameters(procedureReference, parameters),
|
|
526
|
+
node = procedureCallNode, ///
|
|
527
|
+
string = procedureCallString, ///
|
|
528
|
+
procedureCall = new ProcedureCall(context, string, node, parameters, procedureReference);
|
|
529
|
+
|
|
530
|
+
return procedureCall;
|
|
531
|
+
}
|
|
532
|
+
|
|
332
533
|
export function stepsOrSubproofFromStepOrSubproofNode(stepOrSubproofNode, context) {
|
|
333
534
|
const step = stepFromStepOrSubproofNode(stepOrSubproofNode, context),
|
|
334
535
|
subproof = subproofFromStepOrSubproofNode(stepOrSubproofNode, context),
|
|
@@ -356,7 +557,7 @@ export function definedAssertionFromDefinedAssertionNode(definedAssertionNode, c
|
|
|
356
557
|
negated = definedAssertionNode.isNegated(),
|
|
357
558
|
term = termFromDefinedAssertionNode(definedAssertionNode, context),
|
|
358
559
|
frame = frameFromDefinedAssertionNode(definedAssertionNode, context),
|
|
359
|
-
definedAssertion = new DefinedAssertion(string, node, term, frame, negated);
|
|
560
|
+
definedAssertion = new DefinedAssertion(context, string, node, term, frame, negated);
|
|
360
561
|
|
|
361
562
|
return definedAssertion;
|
|
362
563
|
}
|
|
@@ -367,7 +568,7 @@ export function propertyRelationFromPropertyRelationNode(propertyRelationNode, c
|
|
|
367
568
|
string = context.nodeAsString(node),
|
|
368
569
|
property = propertyFromPropertyRelationNode(propertyRelationNode, context),
|
|
369
570
|
term = termFromPropertyRelationNode(propertyRelationNode, context),
|
|
370
|
-
propertyRelation = new PropertyRelation(string, node, property, term);
|
|
571
|
+
propertyRelation = new PropertyRelation(context, string, node, property, term);
|
|
371
572
|
|
|
372
573
|
return propertyRelation;
|
|
373
574
|
}
|
|
@@ -400,7 +601,7 @@ export function propertyAssertionFromPropertyAssertionNode(propertyAssertionNode
|
|
|
400
601
|
string = context.nodeAsString(node),
|
|
401
602
|
term = termFromPropertyAssertionNode(propertyAssertionNode, context),
|
|
402
603
|
propertyRelation = propertyRelationFromPropertyAssertionNode(propertyAssertionNode, context),
|
|
403
|
-
propertyAssertion = new PropertyAssertion(string, node, term, propertyRelation);
|
|
604
|
+
propertyAssertion = new PropertyAssertion(context, string, node, term, propertyRelation);
|
|
404
605
|
|
|
405
606
|
return propertyAssertion;
|
|
406
607
|
}
|
|
@@ -410,7 +611,7 @@ export function subproofAssertionFromSubproofAssertionNode(subproofAssertionNode
|
|
|
410
611
|
node = subproofAssertionNode, ///
|
|
411
612
|
string = context.nodeAsString(node),
|
|
412
613
|
statements = statementsFromSubproofAssertionNode(subproofAssertionNode, context),
|
|
413
|
-
subproofAssertion = new SubproofAssertion(string, node, statements);
|
|
614
|
+
subproofAssertion = new SubproofAssertion(context, string, node, statements);
|
|
414
615
|
|
|
415
616
|
return subproofAssertion;
|
|
416
617
|
}
|
|
@@ -423,7 +624,7 @@ export function containedAssertionFromContainedAssertionNode(containedAssertionN
|
|
|
423
624
|
term = termFromContainedAssertionNode(containedAssertionNode, context),
|
|
424
625
|
frame = frameFromContainedAssertionNode(containedAssertionNode, context),
|
|
425
626
|
statement = statementFromContainedAssertionNode(containedAssertionNode, context),
|
|
426
|
-
containedAssertion = new ContainedAssertion(string, node, term, frame, negated, statement);
|
|
627
|
+
containedAssertion = new ContainedAssertion(context, string, node, term, frame, negated, statement);
|
|
427
628
|
|
|
428
629
|
return containedAssertion;
|
|
429
630
|
}
|
|
@@ -434,17 +635,27 @@ export function satisfiesAssertionFromSatisfiesAssertionNode(satisfiesAssertionN
|
|
|
434
635
|
string = context.nodeAsString(node),
|
|
435
636
|
signature = signatureFromSatisfiesAssertionNode(satisfiesAssertionNode, context),
|
|
436
637
|
reference = referenceFromSatisfiesAssertionNode(satisfiesAssertionNode, context),
|
|
437
|
-
satisfiesAssertion = new SatisfiesAssertion(string, node, signature, reference);
|
|
638
|
+
satisfiesAssertion = new SatisfiesAssertion(context, string, node, signature, reference);
|
|
438
639
|
|
|
439
640
|
return satisfiesAssertion;
|
|
440
641
|
}
|
|
441
642
|
|
|
643
|
+
export function procedureReferenceFromProcedureReferenceNode(procedureReferenceNode, context) {
|
|
644
|
+
const { ProcedureReference } = elements,
|
|
645
|
+
node = procedureReferenceNode, ///
|
|
646
|
+
string = context.nodeAsString(node),
|
|
647
|
+
name = nameFromProcedureReferenceNode(procedureReferenceNode, context),
|
|
648
|
+
variableDeclaration = new ProcedureReference(context, string, node, name);
|
|
649
|
+
|
|
650
|
+
return variableDeclaration;
|
|
651
|
+
}
|
|
652
|
+
|
|
442
653
|
export function variableDeclarationFromVariableDeclarationNode(variableDeclarationNode, context) {
|
|
443
654
|
const { VariableDeclaration } = elements,
|
|
444
655
|
node = variableDeclarationNode, ///
|
|
445
656
|
string = context.nodeAsString(node),
|
|
446
|
-
|
|
447
|
-
variableDeclaration = new VariableDeclaration(context, string, node,
|
|
657
|
+
variable = variableFromVariableNode(variableDeclarationNode, context),
|
|
658
|
+
variableDeclaration = new VariableDeclaration(context, string, node, variable);
|
|
448
659
|
|
|
449
660
|
return variableDeclaration;
|
|
450
661
|
}
|
|
@@ -480,19 +691,14 @@ export function simpleTypeDeclarationFromSimpleTypeDeclarationNode(simpleTypeDec
|
|
|
480
691
|
return simpleTypeDeclaration;
|
|
481
692
|
}
|
|
482
693
|
|
|
483
|
-
export function statementSubstitutionFromStatementSubstitutionNode(statementSubstitutionNode,
|
|
484
|
-
if (context === undefined) {
|
|
485
|
-
context = substitution; ///
|
|
486
|
-
|
|
487
|
-
substitution = null;
|
|
488
|
-
}
|
|
489
|
-
|
|
694
|
+
export function statementSubstitutionFromStatementSubstitutionNode(statementSubstitutionNode, context) {
|
|
490
695
|
const { StatementSubstitution } = elements,
|
|
491
696
|
node = statementSubstitutionNode, ///
|
|
492
697
|
string = context.nodeAsString(node),
|
|
493
698
|
resolved = true,
|
|
494
699
|
statement = statementFromStatementSubstitutionNode(statementSubstitutionNode, context),
|
|
495
700
|
metavariable = metavariableFromStatementSubstitutionNode(statementSubstitutionNode, context),
|
|
701
|
+
substitution = null,
|
|
496
702
|
statementSubstitution = new StatementSubstitution(context, string, node, resolved, statement, metavariable, substitution);
|
|
497
703
|
|
|
498
704
|
return statementSubstitution;
|
|
@@ -534,12 +740,64 @@ export function metavariableDeclarationFromMetavariableDeclarationNode(metavaria
|
|
|
534
740
|
const { MetavariableDeclaration } = elements,
|
|
535
741
|
node = metavariableDeclarationNode, ///
|
|
536
742
|
string = context.nodeAsString(node),
|
|
537
|
-
|
|
538
|
-
|
|
743
|
+
metaType = metaTypeFromMetavariableDeclarationNode(metavariableDeclarationNode, context),
|
|
744
|
+
metavariable = metavariableFromMetavariableDeclarationNode(metavariableDeclarationNode, context);
|
|
745
|
+
|
|
746
|
+
metavariable.setMetaType(metaType);
|
|
747
|
+
|
|
748
|
+
const metavariableDeclaration = new MetavariableDeclaration(context, string, node, metavariable);
|
|
539
749
|
|
|
540
750
|
return metavariableDeclaration;
|
|
541
751
|
}
|
|
542
752
|
|
|
753
|
+
export function proofFromRuleNode(ruleNode, context) {
|
|
754
|
+
let proof = null;
|
|
755
|
+
|
|
756
|
+
const proofNode = ruleNode.getProofNode();
|
|
757
|
+
|
|
758
|
+
if (proofNode !== null) {
|
|
759
|
+
proof = proofFromProofNode(proofNode, context);
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
return proof;
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
export function axiomFromSectionNode(sectionNode, context) {
|
|
766
|
+
let axiom = null;
|
|
767
|
+
|
|
768
|
+
const axiomNode = sectionNode.getAxiomNode();
|
|
769
|
+
|
|
770
|
+
if (axiomNode !== null) {
|
|
771
|
+
axiom = axiomFromAxiomNode(axiomNode, context);
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
return axiom;
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
export function lemmaFromSectionNode(sectionNode, context) {
|
|
778
|
+
let lemma = null;
|
|
779
|
+
|
|
780
|
+
const lemmaNode = sectionNode.getLemmaNode();
|
|
781
|
+
|
|
782
|
+
if (lemmaNode !== null) {
|
|
783
|
+
lemma = lemmaFromLemmaNode(lemmaNode, context);
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
return lemma;
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
export function variableFromTermNode(termNode, context) {
|
|
790
|
+
let variable = null;
|
|
791
|
+
|
|
792
|
+
const variableNode = termNode.getVariableNode();
|
|
793
|
+
|
|
794
|
+
if (variableNode !== null) {
|
|
795
|
+
variable = variableFromVariableNode(variableNode, context);
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
return variable;
|
|
799
|
+
}
|
|
800
|
+
|
|
543
801
|
export function statementFromStepNode(stepNode, context) {
|
|
544
802
|
let statement = null;
|
|
545
803
|
|
|
@@ -564,6 +822,42 @@ export function referenceFromStepNode(stepNode, context) {
|
|
|
564
822
|
return reference;
|
|
565
823
|
}
|
|
566
824
|
|
|
825
|
+
export function conclusionFromRuleNode(ruleNode, context) {
|
|
826
|
+
let conclusion = null;
|
|
827
|
+
|
|
828
|
+
const conclusionNode = ruleNode.getConclusionNode();
|
|
829
|
+
|
|
830
|
+
if (conclusionNode !== null) {
|
|
831
|
+
conclusion = conclusionFromConclusionNode(conclusionNode, context);
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
return conclusion;
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
export function theoremFromSectionNode(sectionNode, context) {
|
|
838
|
+
let theorem = null;
|
|
839
|
+
|
|
840
|
+
const theoremNode = sectionNode.getTheoremNode();
|
|
841
|
+
|
|
842
|
+
if (theoremNode !== null) {
|
|
843
|
+
theorem = theoremFromTheoremNode(theoremNode, context);
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
return theorem;
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
export function frameFromJudgementNode(judgementNode, context) {
|
|
850
|
+
let frame = null;
|
|
851
|
+
|
|
852
|
+
const frameNode = judgementNode.getFrameNode();
|
|
853
|
+
|
|
854
|
+
if (frameNode !== null) {
|
|
855
|
+
frame = frameFromFrameNode(frameNode, context);
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
return frame;
|
|
859
|
+
}
|
|
860
|
+
|
|
567
861
|
export function derivationFromProofNode(proofNode, context) {
|
|
568
862
|
let derivation = null;
|
|
569
863
|
|
|
@@ -576,6 +870,66 @@ export function derivationFromProofNode(proofNode, context) {
|
|
|
576
870
|
return derivation;
|
|
577
871
|
}
|
|
578
872
|
|
|
873
|
+
export function statementFromPremiseNode(premiseNode, context) {
|
|
874
|
+
let statement = null;
|
|
875
|
+
|
|
876
|
+
const statementNode = premiseNode.getStatementNode();
|
|
877
|
+
|
|
878
|
+
if (statementNode !== null) {
|
|
879
|
+
statement = statementFromStatementNode(statementNode, context);
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
return statement;
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
export function metavariableFromLabelNode(labelNode, context) {
|
|
886
|
+
let metavariable = null;
|
|
887
|
+
|
|
888
|
+
const metavariableNode = labelNode.getMetavariableNode();
|
|
889
|
+
|
|
890
|
+
if (metavariableNode !== null) {
|
|
891
|
+
metavariable = metavariableFromMetavariableNode(metavariableNode, context);
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
return metavariable;
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
export function conjectureFromSectionNode(sectionNode, context) {
|
|
898
|
+
let conjecture = null;
|
|
899
|
+
|
|
900
|
+
const conjectureNode = sectionNode.getConjectureNode();
|
|
901
|
+
|
|
902
|
+
if (conjectureNode !== null) {
|
|
903
|
+
conjecture = conjectureFromConjectureNode(conjectureNode, context);
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
return conjecture;
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
export function conclusionFromPremiseNode(premiseNode, context) {
|
|
910
|
+
let conclusion = null;
|
|
911
|
+
|
|
912
|
+
const conclusionNode = premiseNode.getConclusionNode();
|
|
913
|
+
|
|
914
|
+
if (conclusionNode !== null) {
|
|
915
|
+
conclusion = conclusionFromConclusionNode(conclusionNode, context);
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
return conclusion;
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
export function judgementFomStatementNode(statementNode, context) {
|
|
922
|
+
let judgement = null;
|
|
923
|
+
|
|
924
|
+
const judgementNode = statementNode.getJudgementNode();
|
|
925
|
+
|
|
926
|
+
if (judgementNode !== null) {
|
|
927
|
+
judgement = judgementFromJudgementNode(judgementNode, context);
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
return judgement;
|
|
931
|
+
}
|
|
932
|
+
|
|
579
933
|
export function termFromTypeAssertionNode(typeAssertionNode, context) {
|
|
580
934
|
let term = null;
|
|
581
935
|
|
|
@@ -600,18 +954,16 @@ export function typeFromTypeAssertionNode(typeAssertionNode, context) {
|
|
|
600
954
|
return type;
|
|
601
955
|
}
|
|
602
956
|
|
|
603
|
-
export function
|
|
604
|
-
let
|
|
605
|
-
|
|
606
|
-
const stepOrSubproofNodeStepNode = stepOrSubproofNode.isStepNode();
|
|
957
|
+
export function metavariableFromFrameNode(frameNode, context) {
|
|
958
|
+
let metavariable = null;
|
|
607
959
|
|
|
608
|
-
|
|
609
|
-
const stepNode = stepOrSubproofNode; ///
|
|
960
|
+
const metavariableNode = frameNode.getMetavariableNode();
|
|
610
961
|
|
|
611
|
-
|
|
962
|
+
if (metavariableNode !== null) {
|
|
963
|
+
metavariable = metavariableFromMetavariableNode(metavariableNode, context);
|
|
612
964
|
}
|
|
613
965
|
|
|
614
|
-
return
|
|
966
|
+
return metavariable;
|
|
615
967
|
}
|
|
616
968
|
|
|
617
969
|
export function identifierFromVarialbeNode(variableNode, context) {
|
|
@@ -633,6 +985,20 @@ export function statementFromDeductionNode(deductionNode, context) {
|
|
|
633
985
|
return statement;
|
|
634
986
|
}
|
|
635
987
|
|
|
988
|
+
export function stepFromStepOrSubproofNode(stepOrSubproofNode, context) {
|
|
989
|
+
let step = null;
|
|
990
|
+
|
|
991
|
+
const stepOrSubproofNodeStepNode = stepOrSubproofNode.isStepNode();
|
|
992
|
+
|
|
993
|
+
if (stepOrSubproofNodeStepNode) {
|
|
994
|
+
const stepNode = stepOrSubproofNode; ///
|
|
995
|
+
|
|
996
|
+
step = stepFromStepNode(stepNode, context);
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
return step;
|
|
1000
|
+
}
|
|
1001
|
+
|
|
636
1002
|
export function statementFromConclusionNode(conclusinoNode, context) {
|
|
637
1003
|
let statement = null;
|
|
638
1004
|
|
|
@@ -660,10 +1026,10 @@ export function statementFromAssumptionNode(assumptionNode, context) {
|
|
|
660
1026
|
export function referenceFromAssumptionNode(assumptionNode, context) {
|
|
661
1027
|
let reference = null;
|
|
662
1028
|
|
|
663
|
-
const
|
|
1029
|
+
const metavariableNode = assumptionNode.getMetavariableNode();
|
|
664
1030
|
|
|
665
|
-
if (
|
|
666
|
-
reference =
|
|
1031
|
+
if (metavariableNode !== null) {
|
|
1032
|
+
reference = referenceFromMetavariableNode(metavariableNode, context);
|
|
667
1033
|
}
|
|
668
1034
|
|
|
669
1035
|
return reference;
|
|
@@ -681,6 +1047,42 @@ export function assumptionFromJudgementNode(judgementNode, context) {
|
|
|
681
1047
|
return assumption;
|
|
682
1048
|
}
|
|
683
1049
|
|
|
1050
|
+
export function statementFromHypothesisNode(hypothesisNode, context) {
|
|
1051
|
+
let statement = null;
|
|
1052
|
+
|
|
1053
|
+
const statementNode = hypothesisNode.getStatementNode();
|
|
1054
|
+
|
|
1055
|
+
if (statementNode !== null) {
|
|
1056
|
+
statement = statementFromStatementNode(statementNode, context);
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
return statement;
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
export function procedureCallFromPremiseNode(premiseNode, context) {
|
|
1063
|
+
let procedureCall = null;
|
|
1064
|
+
|
|
1065
|
+
const procedureCallNode = premiseNode.getProcedureCallNode();
|
|
1066
|
+
|
|
1067
|
+
if (procedureCallNode !== null) {
|
|
1068
|
+
procedureCall = procedureCallFromProcedureCallNode(procedureCallNode, context);
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
return procedureCall;
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
export function statementFromSuppositionNode(suppositionNode, context) {
|
|
1075
|
+
let statement = null;
|
|
1076
|
+
|
|
1077
|
+
const statementNode = suppositionNode.getStatementNode();
|
|
1078
|
+
|
|
1079
|
+
if (statementNode !== null) {
|
|
1080
|
+
statement = statementFromStatementNode(statementNode, context);
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
return statement; ///
|
|
1084
|
+
}
|
|
1085
|
+
|
|
684
1086
|
export function termFromDefinedAssertionNode(definedAssertionNode, context) {
|
|
685
1087
|
let term = null;
|
|
686
1088
|
|
|
@@ -717,8 +1119,22 @@ export function termFromTermSubstitutionNode(termSubstitutionNode, context) {
|
|
|
717
1119
|
return term;
|
|
718
1120
|
}
|
|
719
1121
|
|
|
720
|
-
export function
|
|
721
|
-
let
|
|
1122
|
+
export function metavariableFromStatementNode(statementNode, context) {
|
|
1123
|
+
let metavariable = null;
|
|
1124
|
+
|
|
1125
|
+
const singularMetavariableNode = statementNode.getSingularMetavariableNode();
|
|
1126
|
+
|
|
1127
|
+
if (singularMetavariableNode !== null) {
|
|
1128
|
+
const metavariableNode = singularMetavariableNode; ///
|
|
1129
|
+
|
|
1130
|
+
metavariable = metavariableFromMetavariableNode(metavariableNode, context);
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
return metavariable;
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
export function subDerivationFromSubproofNode(subproofNode, context) {
|
|
1137
|
+
let subDerviation = null;
|
|
722
1138
|
|
|
723
1139
|
const subDerivationNode = subproofNode.getSubDerivationNode();
|
|
724
1140
|
|
|
@@ -744,10 +1160,10 @@ export function typeAssertinFromStatementNode(statementNode, context) {
|
|
|
744
1160
|
export function metavariableFromReferenceNode(referenceNode, context) {
|
|
745
1161
|
let metavariable = null;
|
|
746
1162
|
|
|
747
|
-
const metavariableNode = referenceNode.
|
|
1163
|
+
const metavariableNode = referenceNode.getMetavariableNode();
|
|
748
1164
|
|
|
749
1165
|
if (metavariableNode !== null) {
|
|
750
|
-
metavariable =
|
|
1166
|
+
metavariable = metavariableFromMetavariableNode(metavariableNode, context);
|
|
751
1167
|
}
|
|
752
1168
|
|
|
753
1169
|
return metavariable;
|
|
@@ -777,18 +1193,6 @@ export function termFromPropertyAssertionNode(propertyAssertionNode, context) {
|
|
|
777
1193
|
return term;
|
|
778
1194
|
}
|
|
779
1195
|
|
|
780
|
-
export function frameFromFrameSubstitutionNode(frameSubstitutionNode, context) {
|
|
781
|
-
let frame = null;
|
|
782
|
-
|
|
783
|
-
const frameNode = frameSubstitutionNode.getFrameNode();
|
|
784
|
-
|
|
785
|
-
if (frameNode !== null) {
|
|
786
|
-
frame = frameFromFrameNode(frameNode, context);
|
|
787
|
-
}
|
|
788
|
-
|
|
789
|
-
return frame;
|
|
790
|
-
}
|
|
791
|
-
|
|
792
1196
|
export function satisfiesAssertionFromStepNode(stepNode, context) {
|
|
793
1197
|
let satisfiesAssertion = null;
|
|
794
1198
|
|
|
@@ -801,6 +1205,48 @@ export function satisfiesAssertionFromStepNode(stepNode, context) {
|
|
|
801
1205
|
return satisfiesAssertion;
|
|
802
1206
|
}
|
|
803
1207
|
|
|
1208
|
+
export function parameterNameFromParameterNode(parameterNode, context) {
|
|
1209
|
+
const parameterName = parameterNode.getParameterName();
|
|
1210
|
+
|
|
1211
|
+
return parameterName;
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1214
|
+
export function metavariableFromAssumptionNode(assumptionNode, context) {
|
|
1215
|
+
let metavariable = null;
|
|
1216
|
+
|
|
1217
|
+
const metavariableNode = assumptionNode.getMetavariableNode();
|
|
1218
|
+
|
|
1219
|
+
if (metavariableNode !== null) {
|
|
1220
|
+
metavariable = metavariableFromMetavariableNode(metavariableNode, context);
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
return metavariable;
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1226
|
+
export function referenceFromProcedureCallNode(procedureCallNode, context) {
|
|
1227
|
+
let reference = null;
|
|
1228
|
+
|
|
1229
|
+
const referenceNode = procedureCallNode.getReferenceNode();
|
|
1230
|
+
|
|
1231
|
+
if (referenceNode !== null) {
|
|
1232
|
+
reference = referenceFromReferenceNode(referenceNode, context);
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
return reference;
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
export function frameFromFrameSubstitutionNode(frameSubstitutionNode, context) {
|
|
1239
|
+
let frame = null;
|
|
1240
|
+
|
|
1241
|
+
const frameNode = frameSubstitutionNode.getFrameNode();
|
|
1242
|
+
|
|
1243
|
+
if (frameNode !== null) {
|
|
1244
|
+
frame = frameFromFrameNode(frameNode, context);
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
return frame;
|
|
1248
|
+
}
|
|
1249
|
+
|
|
804
1250
|
export function subproofFromStepOrSubproofNode(subproofOrSubproofNode, context) {
|
|
805
1251
|
let subproof = null;
|
|
806
1252
|
|
|
@@ -827,6 +1273,18 @@ export function termFromContainedAssertionNode(containedAssertionNode, context)
|
|
|
827
1273
|
return term;
|
|
828
1274
|
}
|
|
829
1275
|
|
|
1276
|
+
export function typeFromPropertyDeclarationNode(propertyDeclarationNode, context) {
|
|
1277
|
+
let type = null;
|
|
1278
|
+
|
|
1279
|
+
const typeNode = propertyDeclarationNode.getTypeNode();
|
|
1280
|
+
|
|
1281
|
+
if (typeNode !== null) {
|
|
1282
|
+
type = typeFromTypeNode(typeNode, context);
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
return type;
|
|
1286
|
+
}
|
|
1287
|
+
|
|
830
1288
|
export function frameFromContainedAssertionNode(containedAssertionNode, context) {
|
|
831
1289
|
let frame = null;
|
|
832
1290
|
|
|
@@ -863,28 +1321,28 @@ export function variableFromTermSubstitutionNode(termSubstitutionNode, context)
|
|
|
863
1321
|
return variable;
|
|
864
1322
|
}
|
|
865
1323
|
|
|
866
|
-
export function
|
|
867
|
-
let
|
|
1324
|
+
export function procedureCallFromSuppositionNode(suppositionNode, context) {
|
|
1325
|
+
let procedureCall = null;
|
|
868
1326
|
|
|
869
|
-
const
|
|
1327
|
+
const procedureCallNode = suppositionNode.getProcedureCallNode();
|
|
870
1328
|
|
|
871
|
-
if (
|
|
872
|
-
|
|
1329
|
+
if (procedureCallNode !== null) {
|
|
1330
|
+
procedureCall = procedureCallFromProcedureCallNode(procedureCallNode, context);
|
|
873
1331
|
}
|
|
874
1332
|
|
|
875
|
-
return
|
|
1333
|
+
return procedureCall;
|
|
876
1334
|
}
|
|
877
1335
|
|
|
878
|
-
export function
|
|
879
|
-
let
|
|
1336
|
+
export function definedAssertionFromStatementNode(statementNode, context) {
|
|
1337
|
+
let definedAssertion = null;
|
|
880
1338
|
|
|
881
|
-
const
|
|
1339
|
+
const definedAssertionNode = statementNode.getDefinedAssertionNode();
|
|
882
1340
|
|
|
883
|
-
if (
|
|
884
|
-
|
|
1341
|
+
if (definedAssertionNode !== null) {
|
|
1342
|
+
definedAssertion = definedAssertionFromDefinedAssertionNode(definedAssertionNode, context);
|
|
885
1343
|
}
|
|
886
1344
|
|
|
887
|
-
return
|
|
1345
|
+
return definedAssertion;
|
|
888
1346
|
}
|
|
889
1347
|
|
|
890
1348
|
export function termSubstitutionFromStatementNode(statementNode, context) {
|
|
@@ -899,6 +1357,42 @@ export function termSubstitutionFromStatementNode(statementNode, context) {
|
|
|
899
1357
|
return termSubstitution;
|
|
900
1358
|
}
|
|
901
1359
|
|
|
1360
|
+
export function proofFromMetaLemmaMetatheoremNode(metaLemmaMetathoremNode, context) {
|
|
1361
|
+
let proof = null;
|
|
1362
|
+
|
|
1363
|
+
const proofNode = metaLemmaMetathoremNode.getProofNode();
|
|
1364
|
+
|
|
1365
|
+
if (proofNode !== null) {
|
|
1366
|
+
proof = proofFromProofNode(proofNode, context);
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1369
|
+
return proof;
|
|
1370
|
+
}
|
|
1371
|
+
|
|
1372
|
+
export function labelFromMetaLemmaMetatheoremNode(metaLemmaMetathoremNode, context) {
|
|
1373
|
+
let label = null;
|
|
1374
|
+
|
|
1375
|
+
const labelNode = metaLemmaMetathoremNode.getLabelNode();
|
|
1376
|
+
|
|
1377
|
+
if (labelNode !== null) {
|
|
1378
|
+
label = labelFromLabelNode(labelNode, context);
|
|
1379
|
+
}
|
|
1380
|
+
|
|
1381
|
+
return label;
|
|
1382
|
+
}
|
|
1383
|
+
|
|
1384
|
+
export function typeFromSimpleTypeDeclarationNode(simpleTypeDeclarationNode, context) {
|
|
1385
|
+
let type = null;
|
|
1386
|
+
|
|
1387
|
+
const typeNode = simpleTypeDeclarationNode.getTypeNode();
|
|
1388
|
+
|
|
1389
|
+
if (typeNode !== null) {
|
|
1390
|
+
type = typeFromTypeNode(typeNode, context);
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1393
|
+
return type;
|
|
1394
|
+
}
|
|
1395
|
+
|
|
902
1396
|
export function frameSubstitutionFromStatementNode(statementNode, context) {
|
|
903
1397
|
let frameSubstitution = null;
|
|
904
1398
|
|
|
@@ -946,6 +1440,18 @@ export function subproofAssertionFromStatementNode(statementNode, context) {
|
|
|
946
1440
|
return subproofAssertion;
|
|
947
1441
|
}
|
|
948
1442
|
|
|
1443
|
+
export function termFromConstructorDeclarationNode(constructorDeclarationNode, context) {
|
|
1444
|
+
let term = null;
|
|
1445
|
+
|
|
1446
|
+
const termNode = constructorDeclarationNode.getTermNode();
|
|
1447
|
+
|
|
1448
|
+
if (termNode !== null) {
|
|
1449
|
+
term = termFromTermNode(termNode, context);
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
return term;
|
|
1453
|
+
}
|
|
1454
|
+
|
|
949
1455
|
export function typeFromComplexTypeDeclarationNode(complexTypeDeclarationNode, context) {
|
|
950
1456
|
let type = null;
|
|
951
1457
|
|
|
@@ -958,28 +1464,30 @@ export function typeFromComplexTypeDeclarationNode(complexTypeDeclarationNode, c
|
|
|
958
1464
|
return type;
|
|
959
1465
|
}
|
|
960
1466
|
|
|
961
|
-
export function
|
|
962
|
-
let
|
|
1467
|
+
export function typeFromConstructorDeclarationNode(constructorDeclarationNode, context) {
|
|
1468
|
+
let type;
|
|
963
1469
|
|
|
964
|
-
const
|
|
1470
|
+
const typeNode = constructorDeclarationNode.getTypeNode();
|
|
965
1471
|
|
|
966
|
-
if (
|
|
967
|
-
|
|
1472
|
+
if (typeNode !== null) {
|
|
1473
|
+
type = typeFromTypeNode(typeNode, context);
|
|
1474
|
+
} else {
|
|
1475
|
+
type = baseType;
|
|
968
1476
|
}
|
|
969
1477
|
|
|
970
|
-
return
|
|
1478
|
+
return type;
|
|
971
1479
|
}
|
|
972
1480
|
|
|
973
|
-
export function
|
|
974
|
-
let
|
|
1481
|
+
export function containedAssertionFromStatementNode(statementNode, context) {0
|
|
1482
|
+
let containedAssertion = null;
|
|
975
1483
|
|
|
976
|
-
const
|
|
1484
|
+
const containedAssertionNode = statementNode.getContainedAssertionNode();
|
|
977
1485
|
|
|
978
|
-
if (
|
|
979
|
-
|
|
1486
|
+
if (containedAssertionNode !== null) {
|
|
1487
|
+
containedAssertion = containedAssertionFromContainedAssertionNode(containedAssertionNode, context);
|
|
980
1488
|
}
|
|
981
1489
|
|
|
982
|
-
return
|
|
1490
|
+
return containedAssertion;
|
|
983
1491
|
}
|
|
984
1492
|
|
|
985
1493
|
export function satisfiesAssertionFromStatementNode(statementNode, context) {
|
|
@@ -994,6 +1502,18 @@ export function satisfiesAssertionFromStatementNode(statementNode, context) {
|
|
|
994
1502
|
return satisfiesAssertion;
|
|
995
1503
|
}
|
|
996
1504
|
|
|
1505
|
+
export function statementFromContainedAssertionNode(containedAssertionNode, context) {
|
|
1506
|
+
let statement = null;
|
|
1507
|
+
|
|
1508
|
+
const statementNode = containedAssertionNode.getStatementNode();
|
|
1509
|
+
|
|
1510
|
+
if (statementNode !== null) {
|
|
1511
|
+
statement = statementFromStatementNode(statementNode, context);
|
|
1512
|
+
}
|
|
1513
|
+
|
|
1514
|
+
return statement;
|
|
1515
|
+
}
|
|
1516
|
+
|
|
997
1517
|
export function propertyFromPropertyDeclarationNode(propertyDeclarationNode, context) {
|
|
998
1518
|
let property = null;
|
|
999
1519
|
|
|
@@ -1021,10 +1541,10 @@ export function signatureFromSatisfiesAssertionNode(satisfiesAssertionNode, cont
|
|
|
1021
1541
|
export function referenceFromSatisfiesAssertionNode(satisfiesAssertionNode, context) {
|
|
1022
1542
|
let reference = null;
|
|
1023
1543
|
|
|
1024
|
-
const
|
|
1544
|
+
const metavariableNode = satisfiesAssertionNode.getMetavariableNode();
|
|
1025
1545
|
|
|
1026
|
-
if (
|
|
1027
|
-
reference =
|
|
1546
|
+
if (metavariableNode !== null) {
|
|
1547
|
+
reference = referenceFromMetavariableNode(metavariableNode, context);
|
|
1028
1548
|
}
|
|
1029
1549
|
|
|
1030
1550
|
return reference;
|
|
@@ -1065,6 +1585,18 @@ export function metavariableFromFrameSubstitutionNode(frameSubstitutionNode, con
|
|
|
1065
1585
|
return metavariable;
|
|
1066
1586
|
}
|
|
1067
1587
|
|
|
1588
|
+
export function deductionFromMetaLemmaMetatheoremNode(metaLemmaMetathoremNode, context) {
|
|
1589
|
+
let deduction = null;
|
|
1590
|
+
|
|
1591
|
+
const deductionNode = metaLemmaMetathoremNode.getDeductionNode();
|
|
1592
|
+
|
|
1593
|
+
if (deductionNode !== null) {
|
|
1594
|
+
deduction = deductionFromDeductionNode(deductionNode, context);
|
|
1595
|
+
}
|
|
1596
|
+
|
|
1597
|
+
return deduction;
|
|
1598
|
+
}
|
|
1599
|
+
|
|
1068
1600
|
export function statementFromStatementSubstitutionNode(statementSubstitutionNode, context) {
|
|
1069
1601
|
let statement = null;
|
|
1070
1602
|
|
|
@@ -1089,6 +1621,30 @@ export function referenceFromReferenceSubstitutionNode(referenceSubstitutionNode
|
|
|
1089
1621
|
return reference;
|
|
1090
1622
|
}
|
|
1091
1623
|
|
|
1624
|
+
export function statementFromCombinatorDeclarationNode(combinatorDeclarationNode, context) {
|
|
1625
|
+
let statement = null;
|
|
1626
|
+
|
|
1627
|
+
const statementNode = combinatorDeclarationNode.getStatementNode();
|
|
1628
|
+
|
|
1629
|
+
if (statementNode !== null) {
|
|
1630
|
+
statement = statementFromStatementNode(statementNode, context);
|
|
1631
|
+
}
|
|
1632
|
+
|
|
1633
|
+
return statement;
|
|
1634
|
+
}
|
|
1635
|
+
|
|
1636
|
+
export function procedureReferenceFromProcedureCallNode(procedureCallNode, context) {
|
|
1637
|
+
let procedureReference = null;
|
|
1638
|
+
|
|
1639
|
+
const procedureReferenceNode = procedureCallNode.getProcedureReferenceNode();
|
|
1640
|
+
|
|
1641
|
+
if (procedureReferenceNode !== null) {
|
|
1642
|
+
procedureReference = procedureReferenceFromProcedureReferenceNode(procedureReferenceNode, context);
|
|
1643
|
+
}
|
|
1644
|
+
|
|
1645
|
+
return procedureReference;
|
|
1646
|
+
}
|
|
1647
|
+
|
|
1092
1648
|
export function typePrefixFromTypePrefixDeclarationNode(typePrefixDeclarationNode, context) {
|
|
1093
1649
|
let typePrefix = null;
|
|
1094
1650
|
|
|
@@ -1128,6 +1684,18 @@ export function metaTypeFromMetavariableDeclarationNode(metavariableDeclarationN
|
|
|
1128
1684
|
return metaType;
|
|
1129
1685
|
}
|
|
1130
1686
|
|
|
1687
|
+
export function proofFromAxiomLemmaTheoremConjectureNode(axiomLemmaTheoremConjectureNode, context) {
|
|
1688
|
+
let proof = null;
|
|
1689
|
+
|
|
1690
|
+
const proofNode = axiomLemmaTheoremConjectureNode.getProofNode();
|
|
1691
|
+
|
|
1692
|
+
if (proofNode !== null) {
|
|
1693
|
+
proof = proofFromProofNode(proofNode, context);
|
|
1694
|
+
}
|
|
1695
|
+
|
|
1696
|
+
return proof;
|
|
1697
|
+
}
|
|
1698
|
+
|
|
1131
1699
|
export function propertyRelationFromPropertyAssertionNode(propertyAssertionNode, context) {
|
|
1132
1700
|
let propertyRelation = null;
|
|
1133
1701
|
|
|
@@ -1179,18 +1747,6 @@ export function metavariableFromReferenceSubstitutionNode(referenceSubstitutionN
|
|
|
1179
1747
|
return metavariable;
|
|
1180
1748
|
}
|
|
1181
1749
|
|
|
1182
|
-
export function proofFromAxiomLemmaTheoremConjectureNode(axiomLemmaTheoremConjectureNode, context) {
|
|
1183
|
-
let proof = null;
|
|
1184
|
-
|
|
1185
|
-
const proofNode = axiomLemmaTheoremConjectureNode.getProofNode();
|
|
1186
|
-
|
|
1187
|
-
if (proofNode !== null) {
|
|
1188
|
-
proof = proofFromProofNode(proofNode, context);
|
|
1189
|
-
}
|
|
1190
|
-
|
|
1191
|
-
return proof;
|
|
1192
|
-
}
|
|
1193
|
-
|
|
1194
1750
|
export function metavariableFromMetavariableDeclarationNode(metavariableDeclarationNode, context) {
|
|
1195
1751
|
let metavariable = null;
|
|
1196
1752
|
|
|
@@ -1227,13 +1783,6 @@ export function signatureFromAxiomLemmaTheoremConjectureNode(axiomLemmaTheoremCo
|
|
|
1227
1783
|
return signature;
|
|
1228
1784
|
}
|
|
1229
1785
|
|
|
1230
|
-
export function suppositionsFromAxiomLemmaTheoremConjectureNode(axiomLemmaTheoremConjectureNode, context) {
|
|
1231
|
-
const suppositionNodes = axiomLemmaTheoremConjectureNode.getSuppositionNodes(),
|
|
1232
|
-
suppositions = suppositionsFromSuppositionNodes(suppositionNodes, context);
|
|
1233
|
-
|
|
1234
|
-
return suppositions;
|
|
1235
|
-
}
|
|
1236
|
-
|
|
1237
1786
|
export function termsFromTermNodes(termNodes, context) {
|
|
1238
1787
|
const terms = termNodes.map((termNode) => {
|
|
1239
1788
|
const term = termFromTermNode(termNode, context);
|
|
@@ -1254,6 +1803,16 @@ export function labelsFromLabelNodes(labelNodes, context) {
|
|
|
1254
1803
|
return labels;
|
|
1255
1804
|
}
|
|
1256
1805
|
|
|
1806
|
+
export function premisesFromPremiseNodes(premiseNodes, context) {
|
|
1807
|
+
const premises = premiseNodes.map((premiseNode) => {
|
|
1808
|
+
const premise = premiseFromPremiseNode(premiseNode, context);
|
|
1809
|
+
|
|
1810
|
+
return premise;
|
|
1811
|
+
});
|
|
1812
|
+
|
|
1813
|
+
return premises;
|
|
1814
|
+
}
|
|
1815
|
+
|
|
1257
1816
|
export function statementsFromStatementNodes(statementNodes, context) {
|
|
1258
1817
|
const statements = statementNodes.map((statementNode) => {
|
|
1259
1818
|
const statement = statementFromStatementNode(statementNode, context);
|
|
@@ -1283,6 +1842,26 @@ export function superTypesFromSuperTypeNodes(superTypeNodes, context) {
|
|
|
1283
1842
|
return superTypes;
|
|
1284
1843
|
}
|
|
1285
1844
|
|
|
1845
|
+
export function parametersFromParameterNodes(parameterNodes, context) {
|
|
1846
|
+
const parameters = parameterNodes.map((parameterNode) => {
|
|
1847
|
+
const parameter = parameterFromParameterNode(parameterNode, context);
|
|
1848
|
+
|
|
1849
|
+
return parameter;
|
|
1850
|
+
});
|
|
1851
|
+
|
|
1852
|
+
return parameters;
|
|
1853
|
+
}
|
|
1854
|
+
|
|
1855
|
+
export function hypothesesFromHypothesisNodes(hypothesisNodes, context) {
|
|
1856
|
+
const hypotheses = hypothesisNodes.map((hypotheseNode) => {
|
|
1857
|
+
const hypothesis = hypothesisFromHypothesisNode(hypotheseNode, context);
|
|
1858
|
+
|
|
1859
|
+
return hypothesis;
|
|
1860
|
+
});
|
|
1861
|
+
|
|
1862
|
+
return hypotheses;
|
|
1863
|
+
}
|
|
1864
|
+
|
|
1286
1865
|
export function assumptionsFromAssumptionNodes(assumptionNodes, context) {
|
|
1287
1866
|
const assumptions = assumptionNodes.map((assumptionNode) => {
|
|
1288
1867
|
const assumption = assumptionFromAssumptionNode(assumptionNode, context);
|
|
@@ -1313,6 +1892,20 @@ export function propertiesFromPropertyDeclarationNodes(propertyDeclarationNodes,
|
|
|
1313
1892
|
return properties;
|
|
1314
1893
|
}
|
|
1315
1894
|
|
|
1895
|
+
export function labelsFromRuleNode(ruleNode, context) {
|
|
1896
|
+
const labelNodes = ruleNode.getLabelNodes(),
|
|
1897
|
+
labels = labelsFromLabelNodes(labelNodes, context);
|
|
1898
|
+
|
|
1899
|
+
return labels;
|
|
1900
|
+
}
|
|
1901
|
+
|
|
1902
|
+
export function premisesFromRuleNode(ruleNode, context) {
|
|
1903
|
+
const premiseNodes = ruleNode.getPremiseNodes(),
|
|
1904
|
+
premises = premisesFromPremiseNodes(premiseNodes, context);
|
|
1905
|
+
|
|
1906
|
+
return premises;
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1316
1909
|
export function termsFromSignatureNode(signatureNode, context) {
|
|
1317
1910
|
const termNodes = signatureNode.getAssumptionNodes(),
|
|
1318
1911
|
terms = termsFromTermNodes(termNodes, context);
|
|
@@ -1327,6 +1920,13 @@ export function assumptionsFromFrameNode(frameNode, context) {
|
|
|
1327
1920
|
return assumptions;
|
|
1328
1921
|
}
|
|
1329
1922
|
|
|
1923
|
+
export function termsFromEquivalenceNode(equivalenceNode, context) {
|
|
1924
|
+
const termNodes = equivalenceNode.getTermNodes(),
|
|
1925
|
+
terms = termsFromTermNodes(termNodes, context);
|
|
1926
|
+
|
|
1927
|
+
return terms;
|
|
1928
|
+
}
|
|
1929
|
+
|
|
1330
1930
|
export function suppositionsFromSubproofNode(subproofNode, context) {
|
|
1331
1931
|
const suppositionNodes = subproofNode.getSuppositionNodes(),
|
|
1332
1932
|
suppositions = suppositionsFromSuppositionNodes(suppositionNodes, context);
|
|
@@ -1334,6 +1934,13 @@ export function suppositionsFromSubproofNode(subproofNode, context) {
|
|
|
1334
1934
|
return suppositions;
|
|
1335
1935
|
}
|
|
1336
1936
|
|
|
1937
|
+
export function parametersFromProcedureCallNode(procedureCallNode, context) {
|
|
1938
|
+
const parameterNodes = procedureCallNode.getParameterNodes(),
|
|
1939
|
+
parameters = parametersFromParameterNodes(parameterNodes, context);
|
|
1940
|
+
|
|
1941
|
+
return parameters;
|
|
1942
|
+
}
|
|
1943
|
+
|
|
1337
1944
|
export function statementsFromSubproofAssertionNode(subproofAssertionNode, context) {
|
|
1338
1945
|
const statementNodes = subproofAssertionNode.getStatementNodes(),
|
|
1339
1946
|
statements = statementsFromStatementNodes(statementNodes, context);
|
|
@@ -1355,6 +1962,13 @@ export function superTypesFromComplexTypeDeclarationNode(complexTypeDeclarationN
|
|
|
1355
1962
|
return superTypes;
|
|
1356
1963
|
}
|
|
1357
1964
|
|
|
1965
|
+
export function suppositionsFromMetaLemmaMetatheoremNode(metaLemmaMetathoremNode, context) {
|
|
1966
|
+
const suppositionNodes = metaLemmaMetathoremNode.getSuppositionNodes(),
|
|
1967
|
+
suppositions = suppositionsFromSuppositionNodes(suppositionNodes, context);
|
|
1968
|
+
|
|
1969
|
+
return suppositions;
|
|
1970
|
+
}
|
|
1971
|
+
|
|
1358
1972
|
export function labelsFromAxiomLemmaTheoremConjectureNode(axiomLemmaTheoremConjectureNode, context) {
|
|
1359
1973
|
const labelNodes = axiomLemmaTheoremConjectureNode.getLabelNodes(),
|
|
1360
1974
|
labels = labelsFromLabelNodes(labelNodes, context);
|
|
@@ -1362,6 +1976,13 @@ export function labelsFromAxiomLemmaTheoremConjectureNode(axiomLemmaTheoremConje
|
|
|
1362
1976
|
return labels;
|
|
1363
1977
|
}
|
|
1364
1978
|
|
|
1979
|
+
export function suppositionsFromAxiomLemmaTheoremConjectureNode(axiomLemmaTheoremConjectureNode, context) {
|
|
1980
|
+
const suppositionNodes = axiomLemmaTheoremConjectureNode.getSuppositionNodes(),
|
|
1981
|
+
suppositions = suppositionsFromSuppositionNodes(suppositionNodes, context);
|
|
1982
|
+
|
|
1983
|
+
return suppositions;
|
|
1984
|
+
}
|
|
1985
|
+
|
|
1365
1986
|
|
|
1366
1987
|
|
|
1367
1988
|
|