occam-verify-cli 1.0.428 → 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 +121 -28
- 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/{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 +3 -3
- package/lib/process/instantiate.js +8 -39
- package/lib/process/verify.js +22 -29
- package/lib/ruleNames.js +5 -5
- package/lib/utilities/brackets.js +11 -11
- package/lib/utilities/element.js +588 -94
- package/lib/utilities/instance.js +61 -0
- package/lib/utilities/string.js +73 -1
- package/package.json +1 -1
- 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 +4 -16
- package/src/element/equivalences.js +12 -5
- 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/{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 +3 -3
- package/src/process/instantiate.js +4 -36
- package/src/process/verify.js +42 -47
- package/src/ruleNames.js +1 -1
- package/src/utilities/brackets.js +13 -13
- package/src/utilities/element.js +731 -129
- package/src/utilities/instance.js +53 -0
- package/src/utilities/string.js +97 -0
package/src/utilities/element.js
CHANGED
|
@@ -3,9 +3,14 @@
|
|
|
3
3
|
import elements from "../elements";
|
|
4
4
|
|
|
5
5
|
import { baseType } from "../element/type";
|
|
6
|
+
import { instantiateReference } from "../process/instantiate";
|
|
6
7
|
import { equivalenceStringFromTerms,
|
|
7
8
|
subproofStringFromSubproofNode,
|
|
8
|
-
|
|
9
|
+
rulsStringFromLabelsPremisesAndConclusion,
|
|
10
|
+
procedureCallStringFromProcedureReferenceAndParameters,
|
|
11
|
+
sectionStringFromHypothesesAxiomLemmaTheoremAndConjecture,
|
|
12
|
+
metaLemmaMetatheoremStringFromLabelSuppositionsAndDeduction,
|
|
13
|
+
axiomLemmaTheoremConjectureStringFromLabelsSuppositionsAndDeduction } from "../utilities/string";
|
|
9
14
|
|
|
10
15
|
export function typeFromTypeNode(typeNode, context) {
|
|
11
16
|
let type;
|
|
@@ -25,7 +30,7 @@ export function typeFromTypeNode(typeNode, context) {
|
|
|
25
30
|
properties = null,
|
|
26
31
|
provisional = null;
|
|
27
32
|
|
|
28
|
-
type = new Type(string, node, name, prefixName, superTypes, properties, provisional);
|
|
33
|
+
type = new Type(context, string, node, name, prefixName, superTypes, properties, provisional);
|
|
29
34
|
}
|
|
30
35
|
|
|
31
36
|
return type;
|
|
@@ -36,7 +41,7 @@ export function termFromTermNode(termNode, context) {
|
|
|
36
41
|
node = termNode, ///
|
|
37
42
|
string = context.nodeAsString(node),
|
|
38
43
|
type = null,
|
|
39
|
-
term = new Term(string, node, type);
|
|
44
|
+
term = new Term(context, string, node, type);
|
|
40
45
|
|
|
41
46
|
return term;
|
|
42
47
|
}
|
|
@@ -53,7 +58,40 @@ export function stepFromStepNode(stepNode, context) {
|
|
|
53
58
|
return step;
|
|
54
59
|
}
|
|
55
60
|
|
|
56
|
-
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) {
|
|
57
95
|
const { Lemma } = elements,
|
|
58
96
|
axiomLemmaTheoremConjectureNode = lemmaNode, ///
|
|
59
97
|
proof = proofFromAxiomLemmaTheoremConjectureNode(axiomLemmaTheoremConjectureNode, context),
|
|
@@ -62,8 +100,9 @@ export function lemmaromAxiomNode(lemmaNode, context) {
|
|
|
62
100
|
suppositions = suppositionsFromAxiomLemmaTheoremConjectureNode(axiomLemmaTheoremConjectureNode, context),
|
|
63
101
|
signature = signatureFromAxiomLemmaTheoremConjectureNode(axiomLemmaTheoremConjectureNode, context),
|
|
64
102
|
hypotheses = [],
|
|
103
|
+
axiomLemmaTheoremConjectureString = axiomLemmaTheoremConjectureStringFromLabelsSuppositionsAndDeduction(labels, suppositions, deduction),
|
|
65
104
|
node = lemmaNode, ///
|
|
66
|
-
string =
|
|
105
|
+
string = axiomLemmaTheoremConjectureString, ///
|
|
67
106
|
lemma = new Lemma(context, string, node, labels, suppositions, deduction, proof, signature, hypotheses);
|
|
68
107
|
|
|
69
108
|
return lemma;
|
|
@@ -74,7 +113,7 @@ export function frameFromFrameNode(frameNode, context) {
|
|
|
74
113
|
node = frameNode, ///
|
|
75
114
|
string = context.nodeAsString(node),
|
|
76
115
|
assumptions = assumptionsFromFrameNode(frameNode, context),
|
|
77
|
-
frame = new Frame(string, node, assumptions);
|
|
116
|
+
frame = new Frame(context, string, node, assumptions);
|
|
78
117
|
|
|
79
118
|
return frame;
|
|
80
119
|
}
|
|
@@ -84,7 +123,7 @@ export function proofFromProofNode(proofNode, context) {
|
|
|
84
123
|
node = proofNode, ///
|
|
85
124
|
string = null,
|
|
86
125
|
derivation = derivationFromProofNode(proofNode, context),
|
|
87
|
-
proof = new Proof(string, node, derivation);
|
|
126
|
+
proof = new Proof(context, string, node, derivation);
|
|
88
127
|
|
|
89
128
|
return proof;
|
|
90
129
|
}
|
|
@@ -98,14 +137,41 @@ export function axiomFromAxiomNode(axiomNode, context) {
|
|
|
98
137
|
suppositions = suppositionsFromAxiomLemmaTheoremConjectureNode(axiomLemmaTheoremConjectureNode, context),
|
|
99
138
|
signature = signatureFromAxiomLemmaTheoremConjectureNode(axiomLemmaTheoremConjectureNode, context),
|
|
100
139
|
hypotheses = [],
|
|
140
|
+
axiomLemmaTheoremConjectureString = axiomLemmaTheoremConjectureStringFromLabelsSuppositionsAndDeduction(labels, suppositions, deduction),
|
|
101
141
|
node = axiomNode, ///
|
|
102
|
-
string =
|
|
142
|
+
string = axiomLemmaTheoremConjectureString, ///
|
|
103
143
|
axiom = new Axiom(context, string, node, labels, suppositions, deduction, proof, signature, hypotheses);
|
|
104
144
|
|
|
105
145
|
return axiom;
|
|
106
146
|
}
|
|
107
147
|
|
|
108
|
-
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) {
|
|
109
175
|
const { Theorem } = elements,
|
|
110
176
|
axiomLemmaTheoremConjectureNode = theoremNode, ///
|
|
111
177
|
proof = proofFromAxiomLemmaTheoremConjectureNode(axiomLemmaTheoremConjectureNode, context),
|
|
@@ -114,29 +180,14 @@ export function theoremromAxiomNode(theoremNode, context) {
|
|
|
114
180
|
suppositions = suppositionsFromAxiomLemmaTheoremConjectureNode(axiomLemmaTheoremConjectureNode, context),
|
|
115
181
|
signature = signatureFromAxiomLemmaTheoremConjectureNode(axiomLemmaTheoremConjectureNode, context),
|
|
116
182
|
hypotheses = [],
|
|
183
|
+
axiomLemmaTheoremConjectureString = axiomLemmaTheoremConjectureStringFromLabelsSuppositionsAndDeduction(labels, suppositions, deduction),
|
|
117
184
|
node = theoremNode, ///
|
|
118
|
-
string =
|
|
185
|
+
string = axiomLemmaTheoremConjectureString, ///
|
|
119
186
|
theorem = new Theorem(context, string, node, labels, suppositions, deduction, proof, signature, hypotheses);
|
|
120
187
|
|
|
121
188
|
return theorem;
|
|
122
189
|
}
|
|
123
190
|
|
|
124
|
-
export function conjectureromAxiomNode(conjectureNode, context) {
|
|
125
|
-
const { Conjecture } = elements,
|
|
126
|
-
axiomLemmaTheoremConjectureNode = conjectureNode, ///
|
|
127
|
-
proof = proofFromAxiomLemmaTheoremConjectureNode(axiomLemmaTheoremConjectureNode, context),
|
|
128
|
-
labels = labelsFromAxiomLemmaTheoremConjectureNode(axiomLemmaTheoremConjectureNode, context),
|
|
129
|
-
deduction = deductionFromAxiomLemmaTheoremConjectureNode(axiomLemmaTheoremConjectureNode, context),
|
|
130
|
-
suppositions = suppositionsFromAxiomLemmaTheoremConjectureNode(axiomLemmaTheoremConjectureNode, context),
|
|
131
|
-
signature = signatureFromAxiomLemmaTheoremConjectureNode(axiomLemmaTheoremConjectureNode, context),
|
|
132
|
-
hypotheses = [],
|
|
133
|
-
node = conjectureNode, ///
|
|
134
|
-
string = stringFromLabelsSuppositionsAndDeduction(labels, suppositions, deduction),
|
|
135
|
-
conjecture = new Conjecture(context, string, node, labels, suppositions, deduction, proof, signature, hypotheses);
|
|
136
|
-
|
|
137
|
-
return conjecture;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
191
|
export function equalityFromEqualityNode(equalityNode, context) {
|
|
141
192
|
const { Equality } = elements,
|
|
142
193
|
node = equalityNode, ///
|
|
@@ -156,19 +207,19 @@ export function metaTypeFromMetaTypeNode(metaTypeNode, context) {
|
|
|
156
207
|
string = context.nodeAsString(node),
|
|
157
208
|
metaTypeName = metaTypeNode.getMetaTypeName(),
|
|
158
209
|
name = metaTypeName, ///
|
|
159
|
-
metaType = new MetaType(string, node, name);
|
|
210
|
+
metaType = new MetaType(context, string, node, name);
|
|
160
211
|
|
|
161
212
|
return metaType;
|
|
162
213
|
}
|
|
163
214
|
|
|
164
215
|
export function propertyFromPropertyNode(propertyNode, context) {
|
|
165
216
|
const { Property } = elements,
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
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);
|
|
172
223
|
|
|
173
224
|
return property;
|
|
174
225
|
}
|
|
@@ -180,7 +231,7 @@ export function variableFromVariableNode(variableNode, context) {
|
|
|
180
231
|
type = null,
|
|
181
232
|
identifier = identifierFromVarialbeNode(variableNode, context),
|
|
182
233
|
propertyRelations = [],
|
|
183
|
-
variable = new Variable(string, node, type, identifier, propertyRelations);
|
|
234
|
+
variable = new Variable(context, string, node, type, identifier, propertyRelations);
|
|
184
235
|
|
|
185
236
|
return variable;
|
|
186
237
|
}
|
|
@@ -192,7 +243,7 @@ export function subproofFromSubproofNode(subproofNode, context) {
|
|
|
192
243
|
subDerivation = subDerivationFromSubproofNode(subproofNode, context),
|
|
193
244
|
subproofString = subproofStringFromSubproofNode(subproofNode, context),
|
|
194
245
|
string = subproofString, ///
|
|
195
|
-
subproof = new SubProof(string, node, suppositions, subDerivation);
|
|
246
|
+
subproof = new SubProof(context, string, node, suppositions, subDerivation);
|
|
196
247
|
|
|
197
248
|
return subproof;
|
|
198
249
|
}
|
|
@@ -228,7 +279,7 @@ export function statementFromStatementNode(statementNode, context) {
|
|
|
228
279
|
const { Statement } = elements,
|
|
229
280
|
node = statementNode, ///
|
|
230
281
|
string = context.nodeAsString(node),
|
|
231
|
-
statement = new Statement(string, node);
|
|
282
|
+
statement = new Statement(context, string, node);
|
|
232
283
|
|
|
233
284
|
return statement;
|
|
234
285
|
}
|
|
@@ -238,7 +289,7 @@ export function signatureFromSignatureNode(signatureNode, context) {
|
|
|
238
289
|
node = signatureNode, ///
|
|
239
290
|
string = context.nodeAsString(node),
|
|
240
291
|
terms = termsFromSignatureNode(signatureNode, context),
|
|
241
|
-
signature = new Signature(string, node, terms);
|
|
292
|
+
signature = new Signature(context, string, node, terms);
|
|
242
293
|
|
|
243
294
|
return signature;
|
|
244
295
|
}
|
|
@@ -248,17 +299,91 @@ export function referenceFromReferenceNode(referenceNode, context) {
|
|
|
248
299
|
node = referenceNode, ///
|
|
249
300
|
string = context.nodeAsString(node),
|
|
250
301
|
metavariable = metavariableFromReferenceNode(referenceNode, context),
|
|
251
|
-
reference = new Reference(string, node, metavariable);
|
|
302
|
+
reference = new Reference(context, string, node, metavariable);
|
|
252
303
|
|
|
253
304
|
return reference;
|
|
254
305
|
}
|
|
255
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
|
+
|
|
256
381
|
export function conclusinoFromConclusionNode(conclusinoNode, context) {
|
|
257
382
|
const { Conclusion } = elements,
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
383
|
+
node = conclusinoNode, ///
|
|
384
|
+
string = context.nodeAsString(node),
|
|
385
|
+
statement = statementFromConclusionNode(conclusinoNode, context),
|
|
386
|
+
conclusino = new Conclusion(context, string, node, statement);
|
|
262
387
|
|
|
263
388
|
return conclusino;
|
|
264
389
|
}
|
|
@@ -269,7 +394,7 @@ export function assumptionFromAssumptionNode(assumptionNode, context) {
|
|
|
269
394
|
string = context.nodeAsString(node),
|
|
270
395
|
statement = statementFromAssumptionNode(assumptionNode, context),
|
|
271
396
|
reference = referenceFromAssumptionNode(assumptionNode, context),
|
|
272
|
-
assumption = new Assumption(string, node, statement, reference);
|
|
397
|
+
assumption = new Assumption(context, string, node, statement, reference);
|
|
273
398
|
|
|
274
399
|
return assumption;
|
|
275
400
|
}
|
|
@@ -279,7 +404,7 @@ export function derivationFromDerivationNode(derivationNode, context) {
|
|
|
279
404
|
node = derivationNode, ///
|
|
280
405
|
string = null,
|
|
281
406
|
stepsOrSubproofs = stepsOrSubproofsFromDerivationNode(derivationNode, context),
|
|
282
|
-
derivation = new Derivation(string, node, stepsOrSubproofs);
|
|
407
|
+
derivation = new Derivation(context, string, node, stepsOrSubproofs);
|
|
283
408
|
|
|
284
409
|
return derivation;
|
|
285
410
|
}
|
|
@@ -290,11 +415,57 @@ export function typePrefixFromTypePrefixNode(typePrefixNode, context) {
|
|
|
290
415
|
string = context.nodeAsString(node),
|
|
291
416
|
term = termFromTypePrefixNode(typePrefixNode, context),
|
|
292
417
|
type = typeFromTypePrefixNode(typePrefixNode, context),
|
|
293
|
-
typePrefix = new TypePrefix(string, node, term, type);
|
|
418
|
+
typePrefix = new TypePrefix(context, string, node, term, type);
|
|
294
419
|
|
|
295
420
|
return typePrefix;
|
|
296
421
|
}
|
|
297
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
|
+
|
|
298
469
|
export function equivalenceFromEquivalenceNode(equivalenceNode, context) {
|
|
299
470
|
const { Equivalence } = elements,
|
|
300
471
|
node = equivalenceNode, ///
|
|
@@ -306,6 +477,12 @@ export function equivalenceFromEquivalenceNode(equivalenceNode, context) {
|
|
|
306
477
|
return equivalence;
|
|
307
478
|
}
|
|
308
479
|
|
|
480
|
+
export function nameFromProcedureReferenceNode(procedureReferenceNode, context) {
|
|
481
|
+
const name = procedureReferenceNode.getName();
|
|
482
|
+
|
|
483
|
+
return name;
|
|
484
|
+
}
|
|
485
|
+
|
|
309
486
|
export function metavariableFromMetavariableNode(metavariableNode, context) {
|
|
310
487
|
const { Metavariable } = elements,
|
|
311
488
|
node = metavariableNode, ///
|
|
@@ -314,7 +491,7 @@ export function metavariableFromMetavariableNode(metavariableNode, context) {
|
|
|
314
491
|
name = metavariableName, ///
|
|
315
492
|
type = null,
|
|
316
493
|
metaType = null,
|
|
317
|
-
metavariable = new Metavariable(string, node, name, type, metaType);
|
|
494
|
+
metavariable = new Metavariable(context, string, node, name, type, metaType);
|
|
318
495
|
|
|
319
496
|
return metavariable;
|
|
320
497
|
}
|
|
@@ -324,7 +501,7 @@ export function subDerivationFromSubDerivationNode(subDerivationNode, context) {
|
|
|
324
501
|
node = subDerivationNode, ///
|
|
325
502
|
string = null,
|
|
326
503
|
stepsOrSubproofs = stepsOrSubproofsFromSubDerivationNode(subDerivationNode, context),
|
|
327
|
-
subDerivation = new SubDerivation(string, node, stepsOrSubproofs);
|
|
504
|
+
subDerivation = new SubDerivation(context, string, node, stepsOrSubproofs);
|
|
328
505
|
|
|
329
506
|
return subDerivation;
|
|
330
507
|
|
|
@@ -336,11 +513,23 @@ export function typeAssertionFromTypeAssertionNode(typeAssertionNode, context) {
|
|
|
336
513
|
string = context.nodeAsString(node),
|
|
337
514
|
term = termFromTypeAssertionNode(typeAssertionNode, context),
|
|
338
515
|
type = typeFromTypeAssertionNode(typeAssertionNode, context),
|
|
339
|
-
typeAssertion = new TypeAssertion(string, node, term, type);
|
|
516
|
+
typeAssertion = new TypeAssertion(context, string, node, term, type);
|
|
340
517
|
|
|
341
518
|
return typeAssertion;
|
|
342
519
|
}
|
|
343
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
|
+
|
|
344
533
|
export function stepsOrSubproofFromStepOrSubproofNode(stepOrSubproofNode, context) {
|
|
345
534
|
const step = stepFromStepOrSubproofNode(stepOrSubproofNode, context),
|
|
346
535
|
subproof = subproofFromStepOrSubproofNode(stepOrSubproofNode, context),
|
|
@@ -368,7 +557,7 @@ export function definedAssertionFromDefinedAssertionNode(definedAssertionNode, c
|
|
|
368
557
|
negated = definedAssertionNode.isNegated(),
|
|
369
558
|
term = termFromDefinedAssertionNode(definedAssertionNode, context),
|
|
370
559
|
frame = frameFromDefinedAssertionNode(definedAssertionNode, context),
|
|
371
|
-
definedAssertion = new DefinedAssertion(string, node, term, frame, negated);
|
|
560
|
+
definedAssertion = new DefinedAssertion(context, string, node, term, frame, negated);
|
|
372
561
|
|
|
373
562
|
return definedAssertion;
|
|
374
563
|
}
|
|
@@ -379,7 +568,7 @@ export function propertyRelationFromPropertyRelationNode(propertyRelationNode, c
|
|
|
379
568
|
string = context.nodeAsString(node),
|
|
380
569
|
property = propertyFromPropertyRelationNode(propertyRelationNode, context),
|
|
381
570
|
term = termFromPropertyRelationNode(propertyRelationNode, context),
|
|
382
|
-
propertyRelation = new PropertyRelation(string, node, property, term);
|
|
571
|
+
propertyRelation = new PropertyRelation(context, string, node, property, term);
|
|
383
572
|
|
|
384
573
|
return propertyRelation;
|
|
385
574
|
}
|
|
@@ -412,7 +601,7 @@ export function propertyAssertionFromPropertyAssertionNode(propertyAssertionNode
|
|
|
412
601
|
string = context.nodeAsString(node),
|
|
413
602
|
term = termFromPropertyAssertionNode(propertyAssertionNode, context),
|
|
414
603
|
propertyRelation = propertyRelationFromPropertyAssertionNode(propertyAssertionNode, context),
|
|
415
|
-
propertyAssertion = new PropertyAssertion(string, node, term, propertyRelation);
|
|
604
|
+
propertyAssertion = new PropertyAssertion(context, string, node, term, propertyRelation);
|
|
416
605
|
|
|
417
606
|
return propertyAssertion;
|
|
418
607
|
}
|
|
@@ -422,7 +611,7 @@ export function subproofAssertionFromSubproofAssertionNode(subproofAssertionNode
|
|
|
422
611
|
node = subproofAssertionNode, ///
|
|
423
612
|
string = context.nodeAsString(node),
|
|
424
613
|
statements = statementsFromSubproofAssertionNode(subproofAssertionNode, context),
|
|
425
|
-
subproofAssertion = new SubproofAssertion(string, node, statements);
|
|
614
|
+
subproofAssertion = new SubproofAssertion(context, string, node, statements);
|
|
426
615
|
|
|
427
616
|
return subproofAssertion;
|
|
428
617
|
}
|
|
@@ -435,7 +624,7 @@ export function containedAssertionFromContainedAssertionNode(containedAssertionN
|
|
|
435
624
|
term = termFromContainedAssertionNode(containedAssertionNode, context),
|
|
436
625
|
frame = frameFromContainedAssertionNode(containedAssertionNode, context),
|
|
437
626
|
statement = statementFromContainedAssertionNode(containedAssertionNode, context),
|
|
438
|
-
containedAssertion = new ContainedAssertion(string, node, term, frame, negated, statement);
|
|
627
|
+
containedAssertion = new ContainedAssertion(context, string, node, term, frame, negated, statement);
|
|
439
628
|
|
|
440
629
|
return containedAssertion;
|
|
441
630
|
}
|
|
@@ -446,17 +635,27 @@ export function satisfiesAssertionFromSatisfiesAssertionNode(satisfiesAssertionN
|
|
|
446
635
|
string = context.nodeAsString(node),
|
|
447
636
|
signature = signatureFromSatisfiesAssertionNode(satisfiesAssertionNode, context),
|
|
448
637
|
reference = referenceFromSatisfiesAssertionNode(satisfiesAssertionNode, context),
|
|
449
|
-
satisfiesAssertion = new SatisfiesAssertion(string, node, signature, reference);
|
|
638
|
+
satisfiesAssertion = new SatisfiesAssertion(context, string, node, signature, reference);
|
|
450
639
|
|
|
451
640
|
return satisfiesAssertion;
|
|
452
641
|
}
|
|
453
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
|
+
|
|
454
653
|
export function variableDeclarationFromVariableDeclarationNode(variableDeclarationNode, context) {
|
|
455
654
|
const { VariableDeclaration } = elements,
|
|
456
655
|
node = variableDeclarationNode, ///
|
|
457
656
|
string = context.nodeAsString(node),
|
|
458
|
-
|
|
459
|
-
variableDeclaration = new VariableDeclaration(context, string, node,
|
|
657
|
+
variable = variableFromVariableNode(variableDeclarationNode, context),
|
|
658
|
+
variableDeclaration = new VariableDeclaration(context, string, node, variable);
|
|
460
659
|
|
|
461
660
|
return variableDeclaration;
|
|
462
661
|
}
|
|
@@ -492,19 +691,14 @@ export function simpleTypeDeclarationFromSimpleTypeDeclarationNode(simpleTypeDec
|
|
|
492
691
|
return simpleTypeDeclaration;
|
|
493
692
|
}
|
|
494
693
|
|
|
495
|
-
export function statementSubstitutionFromStatementSubstitutionNode(statementSubstitutionNode,
|
|
496
|
-
if (context === undefined) {
|
|
497
|
-
context = substitution; ///
|
|
498
|
-
|
|
499
|
-
substitution = null;
|
|
500
|
-
}
|
|
501
|
-
|
|
694
|
+
export function statementSubstitutionFromStatementSubstitutionNode(statementSubstitutionNode, context) {
|
|
502
695
|
const { StatementSubstitution } = elements,
|
|
503
696
|
node = statementSubstitutionNode, ///
|
|
504
697
|
string = context.nodeAsString(node),
|
|
505
698
|
resolved = true,
|
|
506
699
|
statement = statementFromStatementSubstitutionNode(statementSubstitutionNode, context),
|
|
507
700
|
metavariable = metavariableFromStatementSubstitutionNode(statementSubstitutionNode, context),
|
|
701
|
+
substitution = null,
|
|
508
702
|
statementSubstitution = new StatementSubstitution(context, string, node, resolved, statement, metavariable, substitution);
|
|
509
703
|
|
|
510
704
|
return statementSubstitution;
|
|
@@ -546,12 +740,64 @@ export function metavariableDeclarationFromMetavariableDeclarationNode(metavaria
|
|
|
546
740
|
const { MetavariableDeclaration } = elements,
|
|
547
741
|
node = metavariableDeclarationNode, ///
|
|
548
742
|
string = context.nodeAsString(node),
|
|
549
|
-
|
|
550
|
-
|
|
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);
|
|
551
749
|
|
|
552
750
|
return metavariableDeclaration;
|
|
553
751
|
}
|
|
554
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
|
+
|
|
555
801
|
export function statementFromStepNode(stepNode, context) {
|
|
556
802
|
let statement = null;
|
|
557
803
|
|
|
@@ -576,6 +822,42 @@ export function referenceFromStepNode(stepNode, context) {
|
|
|
576
822
|
return reference;
|
|
577
823
|
}
|
|
578
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
|
+
|
|
579
861
|
export function derivationFromProofNode(proofNode, context) {
|
|
580
862
|
let derivation = null;
|
|
581
863
|
|
|
@@ -588,6 +870,66 @@ export function derivationFromProofNode(proofNode, context) {
|
|
|
588
870
|
return derivation;
|
|
589
871
|
}
|
|
590
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
|
+
|
|
591
933
|
export function termFromTypeAssertionNode(typeAssertionNode, context) {
|
|
592
934
|
let term = null;
|
|
593
935
|
|
|
@@ -612,18 +954,16 @@ export function typeFromTypeAssertionNode(typeAssertionNode, context) {
|
|
|
612
954
|
return type;
|
|
613
955
|
}
|
|
614
956
|
|
|
615
|
-
export function
|
|
616
|
-
let
|
|
957
|
+
export function metavariableFromFrameNode(frameNode, context) {
|
|
958
|
+
let metavariable = null;
|
|
617
959
|
|
|
618
|
-
const
|
|
960
|
+
const metavariableNode = frameNode.getMetavariableNode();
|
|
619
961
|
|
|
620
|
-
if (
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
step = stepFromStepNode(stepNode, context);
|
|
962
|
+
if (metavariableNode !== null) {
|
|
963
|
+
metavariable = metavariableFromMetavariableNode(metavariableNode, context);
|
|
624
964
|
}
|
|
625
965
|
|
|
626
|
-
return
|
|
966
|
+
return metavariable;
|
|
627
967
|
}
|
|
628
968
|
|
|
629
969
|
export function identifierFromVarialbeNode(variableNode, context) {
|
|
@@ -645,6 +985,20 @@ export function statementFromDeductionNode(deductionNode, context) {
|
|
|
645
985
|
return statement;
|
|
646
986
|
}
|
|
647
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
|
+
|
|
648
1002
|
export function statementFromConclusionNode(conclusinoNode, context) {
|
|
649
1003
|
let statement = null;
|
|
650
1004
|
|
|
@@ -672,10 +1026,10 @@ export function statementFromAssumptionNode(assumptionNode, context) {
|
|
|
672
1026
|
export function referenceFromAssumptionNode(assumptionNode, context) {
|
|
673
1027
|
let reference = null;
|
|
674
1028
|
|
|
675
|
-
const
|
|
1029
|
+
const metavariableNode = assumptionNode.getMetavariableNode();
|
|
676
1030
|
|
|
677
|
-
if (
|
|
678
|
-
reference =
|
|
1031
|
+
if (metavariableNode !== null) {
|
|
1032
|
+
reference = referenceFromMetavariableNode(metavariableNode, context);
|
|
679
1033
|
}
|
|
680
1034
|
|
|
681
1035
|
return reference;
|
|
@@ -693,6 +1047,42 @@ export function assumptionFromJudgementNode(judgementNode, context) {
|
|
|
693
1047
|
return assumption;
|
|
694
1048
|
}
|
|
695
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
|
+
|
|
696
1086
|
export function termFromDefinedAssertionNode(definedAssertionNode, context) {
|
|
697
1087
|
let term = null;
|
|
698
1088
|
|
|
@@ -729,6 +1119,20 @@ export function termFromTermSubstitutionNode(termSubstitutionNode, context) {
|
|
|
729
1119
|
return term;
|
|
730
1120
|
}
|
|
731
1121
|
|
|
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
|
+
|
|
732
1136
|
export function subDerivationFromSubproofNode(subproofNode, context) {
|
|
733
1137
|
let subDerviation = null;
|
|
734
1138
|
|
|
@@ -756,10 +1160,10 @@ export function typeAssertinFromStatementNode(statementNode, context) {
|
|
|
756
1160
|
export function metavariableFromReferenceNode(referenceNode, context) {
|
|
757
1161
|
let metavariable = null;
|
|
758
1162
|
|
|
759
|
-
const metavariableNode = referenceNode.
|
|
1163
|
+
const metavariableNode = referenceNode.getMetavariableNode();
|
|
760
1164
|
|
|
761
1165
|
if (metavariableNode !== null) {
|
|
762
|
-
metavariable =
|
|
1166
|
+
metavariable = metavariableFromMetavariableNode(metavariableNode, context);
|
|
763
1167
|
}
|
|
764
1168
|
|
|
765
1169
|
return metavariable;
|
|
@@ -789,18 +1193,6 @@ export function termFromPropertyAssertionNode(propertyAssertionNode, context) {
|
|
|
789
1193
|
return term;
|
|
790
1194
|
}
|
|
791
1195
|
|
|
792
|
-
export function frameFromFrameSubstitutionNode(frameSubstitutionNode, context) {
|
|
793
|
-
let frame = null;
|
|
794
|
-
|
|
795
|
-
const frameNode = frameSubstitutionNode.getFrameNode();
|
|
796
|
-
|
|
797
|
-
if (frameNode !== null) {
|
|
798
|
-
frame = frameFromFrameNode(frameNode, context);
|
|
799
|
-
}
|
|
800
|
-
|
|
801
|
-
return frame;
|
|
802
|
-
}
|
|
803
|
-
|
|
804
1196
|
export function satisfiesAssertionFromStepNode(stepNode, context) {
|
|
805
1197
|
let satisfiesAssertion = null;
|
|
806
1198
|
|
|
@@ -813,6 +1205,48 @@ export function satisfiesAssertionFromStepNode(stepNode, context) {
|
|
|
813
1205
|
return satisfiesAssertion;
|
|
814
1206
|
}
|
|
815
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
|
+
|
|
816
1250
|
export function subproofFromStepOrSubproofNode(subproofOrSubproofNode, context) {
|
|
817
1251
|
let subproof = null;
|
|
818
1252
|
|
|
@@ -839,6 +1273,18 @@ export function termFromContainedAssertionNode(containedAssertionNode, context)
|
|
|
839
1273
|
return term;
|
|
840
1274
|
}
|
|
841
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
|
+
|
|
842
1288
|
export function frameFromContainedAssertionNode(containedAssertionNode, context) {
|
|
843
1289
|
let frame = null;
|
|
844
1290
|
|
|
@@ -875,28 +1321,28 @@ export function variableFromTermSubstitutionNode(termSubstitutionNode, context)
|
|
|
875
1321
|
return variable;
|
|
876
1322
|
}
|
|
877
1323
|
|
|
878
|
-
export function
|
|
879
|
-
let
|
|
1324
|
+
export function procedureCallFromSuppositionNode(suppositionNode, context) {
|
|
1325
|
+
let procedureCall = null;
|
|
880
1326
|
|
|
881
|
-
const
|
|
1327
|
+
const procedureCallNode = suppositionNode.getProcedureCallNode();
|
|
882
1328
|
|
|
883
|
-
if (
|
|
884
|
-
|
|
1329
|
+
if (procedureCallNode !== null) {
|
|
1330
|
+
procedureCall = procedureCallFromProcedureCallNode(procedureCallNode, context);
|
|
885
1331
|
}
|
|
886
1332
|
|
|
887
|
-
return
|
|
1333
|
+
return procedureCall;
|
|
888
1334
|
}
|
|
889
1335
|
|
|
890
|
-
export function
|
|
891
|
-
let
|
|
1336
|
+
export function definedAssertionFromStatementNode(statementNode, context) {
|
|
1337
|
+
let definedAssertion = null;
|
|
892
1338
|
|
|
893
|
-
const
|
|
1339
|
+
const definedAssertionNode = statementNode.getDefinedAssertionNode();
|
|
894
1340
|
|
|
895
|
-
if (
|
|
896
|
-
|
|
1341
|
+
if (definedAssertionNode !== null) {
|
|
1342
|
+
definedAssertion = definedAssertionFromDefinedAssertionNode(definedAssertionNode, context);
|
|
897
1343
|
}
|
|
898
1344
|
|
|
899
|
-
return
|
|
1345
|
+
return definedAssertion;
|
|
900
1346
|
}
|
|
901
1347
|
|
|
902
1348
|
export function termSubstitutionFromStatementNode(statementNode, context) {
|
|
@@ -911,6 +1357,42 @@ export function termSubstitutionFromStatementNode(statementNode, context) {
|
|
|
911
1357
|
return termSubstitution;
|
|
912
1358
|
}
|
|
913
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
|
+
|
|
914
1396
|
export function frameSubstitutionFromStatementNode(statementNode, context) {
|
|
915
1397
|
let frameSubstitution = null;
|
|
916
1398
|
|
|
@@ -958,6 +1440,18 @@ export function subproofAssertionFromStatementNode(statementNode, context) {
|
|
|
958
1440
|
return subproofAssertion;
|
|
959
1441
|
}
|
|
960
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
|
+
|
|
961
1455
|
export function typeFromComplexTypeDeclarationNode(complexTypeDeclarationNode, context) {
|
|
962
1456
|
let type = null;
|
|
963
1457
|
|
|
@@ -970,28 +1464,30 @@ export function typeFromComplexTypeDeclarationNode(complexTypeDeclarationNode, c
|
|
|
970
1464
|
return type;
|
|
971
1465
|
}
|
|
972
1466
|
|
|
973
|
-
export function
|
|
974
|
-
let
|
|
1467
|
+
export function typeFromConstructorDeclarationNode(constructorDeclarationNode, context) {
|
|
1468
|
+
let type;
|
|
975
1469
|
|
|
976
|
-
const
|
|
1470
|
+
const typeNode = constructorDeclarationNode.getTypeNode();
|
|
977
1471
|
|
|
978
|
-
if (
|
|
979
|
-
|
|
1472
|
+
if (typeNode !== null) {
|
|
1473
|
+
type = typeFromTypeNode(typeNode, context);
|
|
1474
|
+
} else {
|
|
1475
|
+
type = baseType;
|
|
980
1476
|
}
|
|
981
1477
|
|
|
982
|
-
return
|
|
1478
|
+
return type;
|
|
983
1479
|
}
|
|
984
1480
|
|
|
985
|
-
export function
|
|
986
|
-
let
|
|
1481
|
+
export function containedAssertionFromStatementNode(statementNode, context) {0
|
|
1482
|
+
let containedAssertion = null;
|
|
987
1483
|
|
|
988
|
-
const
|
|
1484
|
+
const containedAssertionNode = statementNode.getContainedAssertionNode();
|
|
989
1485
|
|
|
990
|
-
if (
|
|
991
|
-
|
|
1486
|
+
if (containedAssertionNode !== null) {
|
|
1487
|
+
containedAssertion = containedAssertionFromContainedAssertionNode(containedAssertionNode, context);
|
|
992
1488
|
}
|
|
993
1489
|
|
|
994
|
-
return
|
|
1490
|
+
return containedAssertion;
|
|
995
1491
|
}
|
|
996
1492
|
|
|
997
1493
|
export function satisfiesAssertionFromStatementNode(statementNode, context) {
|
|
@@ -1006,6 +1502,18 @@ export function satisfiesAssertionFromStatementNode(statementNode, context) {
|
|
|
1006
1502
|
return satisfiesAssertion;
|
|
1007
1503
|
}
|
|
1008
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
|
+
|
|
1009
1517
|
export function propertyFromPropertyDeclarationNode(propertyDeclarationNode, context) {
|
|
1010
1518
|
let property = null;
|
|
1011
1519
|
|
|
@@ -1033,10 +1541,10 @@ export function signatureFromSatisfiesAssertionNode(satisfiesAssertionNode, cont
|
|
|
1033
1541
|
export function referenceFromSatisfiesAssertionNode(satisfiesAssertionNode, context) {
|
|
1034
1542
|
let reference = null;
|
|
1035
1543
|
|
|
1036
|
-
const
|
|
1544
|
+
const metavariableNode = satisfiesAssertionNode.getMetavariableNode();
|
|
1037
1545
|
|
|
1038
|
-
if (
|
|
1039
|
-
reference =
|
|
1546
|
+
if (metavariableNode !== null) {
|
|
1547
|
+
reference = referenceFromMetavariableNode(metavariableNode, context);
|
|
1040
1548
|
}
|
|
1041
1549
|
|
|
1042
1550
|
return reference;
|
|
@@ -1077,6 +1585,18 @@ export function metavariableFromFrameSubstitutionNode(frameSubstitutionNode, con
|
|
|
1077
1585
|
return metavariable;
|
|
1078
1586
|
}
|
|
1079
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
|
+
|
|
1080
1600
|
export function statementFromStatementSubstitutionNode(statementSubstitutionNode, context) {
|
|
1081
1601
|
let statement = null;
|
|
1082
1602
|
|
|
@@ -1101,6 +1621,30 @@ export function referenceFromReferenceSubstitutionNode(referenceSubstitutionNode
|
|
|
1101
1621
|
return reference;
|
|
1102
1622
|
}
|
|
1103
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
|
+
|
|
1104
1648
|
export function typePrefixFromTypePrefixDeclarationNode(typePrefixDeclarationNode, context) {
|
|
1105
1649
|
let typePrefix = null;
|
|
1106
1650
|
|
|
@@ -1140,6 +1684,18 @@ export function metaTypeFromMetavariableDeclarationNode(metavariableDeclarationN
|
|
|
1140
1684
|
return metaType;
|
|
1141
1685
|
}
|
|
1142
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
|
+
|
|
1143
1699
|
export function propertyRelationFromPropertyAssertionNode(propertyAssertionNode, context) {
|
|
1144
1700
|
let propertyRelation = null;
|
|
1145
1701
|
|
|
@@ -1191,18 +1747,6 @@ export function metavariableFromReferenceSubstitutionNode(referenceSubstitutionN
|
|
|
1191
1747
|
return metavariable;
|
|
1192
1748
|
}
|
|
1193
1749
|
|
|
1194
|
-
export function proofFromAxiomLemmaTheoremConjectureNode(axiomLemmaTheoremConjectureNode, context) {
|
|
1195
|
-
let proof = null;
|
|
1196
|
-
|
|
1197
|
-
const proofNode = axiomLemmaTheoremConjectureNode.getProofNode();
|
|
1198
|
-
|
|
1199
|
-
if (proofNode !== null) {
|
|
1200
|
-
proof = proofFromProofNode(proofNode, context);
|
|
1201
|
-
}
|
|
1202
|
-
|
|
1203
|
-
return proof;
|
|
1204
|
-
}
|
|
1205
|
-
|
|
1206
1750
|
export function metavariableFromMetavariableDeclarationNode(metavariableDeclarationNode, context) {
|
|
1207
1751
|
let metavariable = null;
|
|
1208
1752
|
|
|
@@ -1259,6 +1803,16 @@ export function labelsFromLabelNodes(labelNodes, context) {
|
|
|
1259
1803
|
return labels;
|
|
1260
1804
|
}
|
|
1261
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
|
+
|
|
1262
1816
|
export function statementsFromStatementNodes(statementNodes, context) {
|
|
1263
1817
|
const statements = statementNodes.map((statementNode) => {
|
|
1264
1818
|
const statement = statementFromStatementNode(statementNode, context);
|
|
@@ -1288,6 +1842,26 @@ export function superTypesFromSuperTypeNodes(superTypeNodes, context) {
|
|
|
1288
1842
|
return superTypes;
|
|
1289
1843
|
}
|
|
1290
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
|
+
|
|
1291
1865
|
export function assumptionsFromAssumptionNodes(assumptionNodes, context) {
|
|
1292
1866
|
const assumptions = assumptionNodes.map((assumptionNode) => {
|
|
1293
1867
|
const assumption = assumptionFromAssumptionNode(assumptionNode, context);
|
|
@@ -1318,6 +1892,20 @@ export function propertiesFromPropertyDeclarationNodes(propertyDeclarationNodes,
|
|
|
1318
1892
|
return properties;
|
|
1319
1893
|
}
|
|
1320
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
|
+
|
|
1321
1909
|
export function termsFromSignatureNode(signatureNode, context) {
|
|
1322
1910
|
const termNodes = signatureNode.getAssumptionNodes(),
|
|
1323
1911
|
terms = termsFromTermNodes(termNodes, context);
|
|
@@ -1346,6 +1934,13 @@ export function suppositionsFromSubproofNode(subproofNode, context) {
|
|
|
1346
1934
|
return suppositions;
|
|
1347
1935
|
}
|
|
1348
1936
|
|
|
1937
|
+
export function parametersFromProcedureCallNode(procedureCallNode, context) {
|
|
1938
|
+
const parameterNodes = procedureCallNode.getParameterNodes(),
|
|
1939
|
+
parameters = parametersFromParameterNodes(parameterNodes, context);
|
|
1940
|
+
|
|
1941
|
+
return parameters;
|
|
1942
|
+
}
|
|
1943
|
+
|
|
1349
1944
|
export function statementsFromSubproofAssertionNode(subproofAssertionNode, context) {
|
|
1350
1945
|
const statementNodes = subproofAssertionNode.getStatementNodes(),
|
|
1351
1946
|
statements = statementsFromStatementNodes(statementNodes, context);
|
|
@@ -1367,6 +1962,13 @@ export function superTypesFromComplexTypeDeclarationNode(complexTypeDeclarationN
|
|
|
1367
1962
|
return superTypes;
|
|
1368
1963
|
}
|
|
1369
1964
|
|
|
1965
|
+
export function suppositionsFromMetaLemmaMetatheoremNode(metaLemmaMetathoremNode, context) {
|
|
1966
|
+
const suppositionNodes = metaLemmaMetathoremNode.getSuppositionNodes(),
|
|
1967
|
+
suppositions = suppositionsFromSuppositionNodes(suppositionNodes, context);
|
|
1968
|
+
|
|
1969
|
+
return suppositions;
|
|
1970
|
+
}
|
|
1971
|
+
|
|
1370
1972
|
export function labelsFromAxiomLemmaTheoremConjectureNode(axiomLemmaTheoremConjectureNode, context) {
|
|
1371
1973
|
const labelNodes = axiomLemmaTheoremConjectureNode.getLabelNodes(),
|
|
1372
1974
|
labels = labelsFromLabelNodes(labelNodes, context);
|