occam-verify-cli 0.0.1068 → 0.0.1069
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/bin/action/verify.js +3 -2
- package/lib/assertion/subproof.js +3 -3
- package/lib/axiom.js +11 -6
- package/lib/combinator.js +9 -9
- package/lib/conclusion.js +10 -7
- package/lib/conjecture.js +11 -6
- package/lib/consequent.js +10 -7
- package/lib/constructor.js +9 -9
- package/lib/context/file.js +34 -126
- package/lib/context/local.js +16 -5
- package/lib/context/release.js +2 -3
- package/lib/declaration.js +50 -43
- package/lib/equivalence.js +2 -2
- package/lib/frame.js +100 -80
- package/lib/index.js +22 -6
- package/lib/judgement.js +3 -3
- package/lib/label.js +12 -8
- package/lib/lemma.js +12 -12
- package/lib/metaLemma.js +120 -8
- package/lib/metatheorem.js +145 -9
- package/lib/metavariable.js +39 -22
- package/lib/mixins/statement/qualified/unify.js +6 -10
- package/lib/mixins/statement/unify.js +3 -3
- package/lib/mixins/term/unify.js +2 -2
- package/lib/premise.js +12 -8
- package/lib/reference.js +7 -9
- package/lib/rule.js +24 -39
- package/lib/ruleNames.js +1 -5
- package/lib/statement/unqualified.js +9 -8
- package/lib/statement.js +4 -4
- package/lib/substitution/frameForMetavariable.js +30 -26
- package/lib/substitution/statementForMetavariable.js +44 -26
- package/lib/substitution/termForVariable.js +33 -37
- package/lib/substitution.js +24 -21
- package/lib/substitutions.js +7 -1
- package/lib/supposition.js +12 -8
- package/lib/term.js +6 -11
- package/lib/theorem.js +11 -6
- package/lib/topLevelAssertion.js +24 -42
- package/lib/type.js +5 -12
- package/lib/unifier/metaLevel.js +3 -3
- package/lib/unifier/metavariable.js +6 -6
- package/lib/unifier/statementWithCombinator.js +16 -16
- package/lib/unifier/termWithConstructor.js +7 -7
- package/lib/utilities/brackets.js +10 -10
- package/lib/utilities/json.js +493 -0
- package/lib/utilities/node.js +15 -22
- package/lib/utilities/release.js +53 -0
- package/lib/utilities/releaseContext.js +4 -15
- package/lib/utilities/tokens.js +7 -7
- package/lib/variable.js +6 -11
- package/lib/verifier/topLevel.js +5 -5
- package/package.json +1 -1
- package/src/assertion/subproof.js +2 -3
- package/src/axiom.js +14 -6
- package/src/combinator.js +12 -13
- package/src/conclusion.js +12 -9
- package/src/conjecture.js +14 -6
- package/src/consequent.js +12 -9
- package/src/constructor.js +11 -13
- package/src/context/file.js +94 -202
- package/src/context/local.js +8 -6
- package/src/context/release.js +2 -3
- package/src/declaration.js +72 -44
- package/src/equivalence.js +2 -2
- package/src/frame.js +111 -86
- package/src/index.js +17 -1
- package/src/judgement.js +2 -2
- package/src/label.js +15 -10
- package/src/lemma.js +17 -10
- package/src/metaLemma.js +102 -1
- package/src/metatheorem.js +143 -2
- package/src/metavariable.js +50 -30
- package/src/mixins/statement/qualified/unify.js +7 -19
- package/src/mixins/statement/unify.js +2 -2
- package/src/mixins/term/unify.js +1 -1
- package/src/premise.js +18 -10
- package/src/reference.js +7 -11
- package/src/rule.js +33 -57
- package/src/ruleNames.js +0 -1
- package/src/statement/unqualified.js +10 -10
- package/src/statement.js +3 -2
- package/src/substitution/frameForMetavariable.js +39 -33
- package/src/substitution/statementForMetavariable.js +64 -31
- package/src/substitution/termForVariable.js +47 -37
- package/src/substitution.js +18 -16
- package/src/substitutions.js +2 -0
- package/src/supposition.js +18 -10
- package/src/term.js +5 -15
- package/src/theorem.js +14 -6
- package/src/topLevelAssertion.js +38 -64
- package/src/type.js +5 -20
- package/src/unifier/metaLevel.js +2 -2
- package/src/unifier/metavariable.js +5 -5
- package/src/unifier/statementWithCombinator.js +18 -18
- package/src/unifier/termWithConstructor.js +7 -7
- package/src/utilities/brackets.js +5 -5
- package/src/utilities/json.js +551 -0
- package/src/utilities/node.js +15 -26
- package/src/{verify → utilities}/release.js +5 -1
- package/src/utilities/releaseContext.js +2 -2
- package/src/utilities/tokens.js +10 -7
- package/src/variable.js +4 -14
- package/src/verifier/topLevel.js +6 -4
- package/lib/argument.js +0 -106
- package/lib/metaTypes.js +0 -19
- package/lib/unify/statementWithSttaemetnGivenEquivalences.js +0 -45
- package/lib/verify/metaLemma.js +0 -49
- package/lib/verify/metatheorem.js +0 -48
- package/lib/verify/release.js +0 -50
- package/src/argument.js +0 -79
- package/src/metaTypes.js +0 -11
- package/src/unify/statementWithSttaemetnGivenEquivalences.js +0 -51
- package/src/verify/metaLemma.js +0 -72
- package/src/verify/metatheorem.js +0 -67
package/src/verify/metaLemma.js
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { arrayUtilities } from "necessary";
|
|
4
|
-
|
|
5
|
-
import MetaLemma from "../metaLemma";
|
|
6
|
-
// import verifyProof from "../verify/proof";
|
|
7
|
-
import LocalContext from "../context/local";
|
|
8
|
-
import Substitutions from "../substitutions";
|
|
9
|
-
// import verifyConsequent from "../verify/consequent";
|
|
10
|
-
// import verifySuppositions from "../verify/suppositions";
|
|
11
|
-
|
|
12
|
-
import { EMPTY_STRING } from "../constants";
|
|
13
|
-
import { nodeQuery, nodesQuery } from "../utilities/query";
|
|
14
|
-
|
|
15
|
-
const { first } = arrayUtilities;
|
|
16
|
-
|
|
17
|
-
const proofNodeQuery = nodeQuery("/metaLemma/proof!"),
|
|
18
|
-
labelNodesQuery = nodesQuery("/metaLemma/label"),
|
|
19
|
-
consequentNodeQuery = nodeQuery("/metaLemma/consequent!"),
|
|
20
|
-
suppositionsNodeQuery = nodesQuery("/metaLemma/supposition");
|
|
21
|
-
|
|
22
|
-
export default function verifyMetaLemma(metaLemmaNode, fileContext) {
|
|
23
|
-
let metaLemmaVerified = false;
|
|
24
|
-
|
|
25
|
-
const labelNodes = labelNodesQuery(metaLemmaNode),
|
|
26
|
-
labelsString = fileContext.nodesAsString(labelNodes);
|
|
27
|
-
|
|
28
|
-
(labelsString === EMPTY_STRING) ?
|
|
29
|
-
fileContext.trace(`Verifying a meta-lLemma...`, metaLemmaNode) :
|
|
30
|
-
fileContext.trace(`Verifying the '${labelsString}' meta-lLemma...`, metaLemmaNode);
|
|
31
|
-
|
|
32
|
-
const labels = [],
|
|
33
|
-
labelsVerified = verifyLabels(labelNodes, labels, fileContext);
|
|
34
|
-
|
|
35
|
-
if (labelsVerified) {
|
|
36
|
-
const localContext = LocalContext.fromFileContext(fileContext),
|
|
37
|
-
suppositions = [],
|
|
38
|
-
suppositionNodes = suppositionsNodeQuery(metaLemmaNode),
|
|
39
|
-
suppositionsVerified = verifySuppositions(suppositionNodes, suppositions, localContext);
|
|
40
|
-
|
|
41
|
-
if (suppositionsVerified) {
|
|
42
|
-
const consequents = [],
|
|
43
|
-
consequentNode = consequentNodeQuery(metaLemmaNode),
|
|
44
|
-
consequentVerified = verifyConsequent(consequentNode, consequents, localContext);
|
|
45
|
-
|
|
46
|
-
if (consequentVerified) {
|
|
47
|
-
const proofNode = proofNodeQuery(metaLemmaNode),
|
|
48
|
-
firstConsequent = first(consequents),
|
|
49
|
-
consequent = firstConsequent, ///
|
|
50
|
-
statementNode = consequent.getStatementNode(),
|
|
51
|
-
substitutions = Substitutions.fromNothing(),
|
|
52
|
-
proofVerified = verifyProof(proofNode, statementNode, substitutions, localContext);
|
|
53
|
-
|
|
54
|
-
if (proofVerified) {
|
|
55
|
-
const metaLemma = MetaLemma.fromLabelsSuppositionsConsequentSubstitutionsAndFileContext(labels, suppositions, consequent, substitutions, fileContext);
|
|
56
|
-
|
|
57
|
-
fileContext.addMetaLemma(metaLemma);
|
|
58
|
-
|
|
59
|
-
metaLemmaVerified = true;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
if (metaLemmaVerified) {
|
|
66
|
-
(labelsString === EMPTY_STRING) ?
|
|
67
|
-
fileContext.debug(`...verified the meta-lemma.`, metaLemmaNode) :
|
|
68
|
-
fileContext.debug(`...verified the '${labelsString}' meta-lemma.`, metaLemmaNode);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
return metaLemmaVerified;
|
|
72
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { arrayUtilities } from "necessary";
|
|
4
|
-
|
|
5
|
-
// import verifyProof from "../verify/proof";
|
|
6
|
-
import Metatheorem from "../metatheorem";
|
|
7
|
-
import LocalContext from "../context/local";
|
|
8
|
-
import Substitutions from "../substitutions";
|
|
9
|
-
// import verifyConsequent from "../verify/consequent";
|
|
10
|
-
// import verifySuppositions from "../verify/suppositions";
|
|
11
|
-
|
|
12
|
-
import { nodeQuery, nodesQuery } from "../utilities/query";
|
|
13
|
-
|
|
14
|
-
const { first } = arrayUtilities;
|
|
15
|
-
|
|
16
|
-
const labelNodesQuery = nodesQuery("/metatheorem/label"),
|
|
17
|
-
proofNodeQuery = nodeQuery("/metatheorem/proof!"),
|
|
18
|
-
consequentNodeQuery = nodeQuery("/metatheorem/consequent!"),
|
|
19
|
-
suppositionsNodeQuery = nodesQuery("/metatheorem/supposition");
|
|
20
|
-
|
|
21
|
-
export default function verifyMetatheorem(metatheoremNode, fileContext) {
|
|
22
|
-
let metatheoremVerified = false;
|
|
23
|
-
|
|
24
|
-
const labelNodes = labelNodesQuery(metatheoremNode),
|
|
25
|
-
labelsString = fileContext.nodesAsString(labelNodes);
|
|
26
|
-
|
|
27
|
-
fileContext.trace(`Verifying the '${labelsString}' metatheorem...`, metatheoremNode);
|
|
28
|
-
|
|
29
|
-
const labels = [],
|
|
30
|
-
labelsVerified = verifyLabels(labelNodes, labels, fileContext);
|
|
31
|
-
|
|
32
|
-
if (labelsVerified) {
|
|
33
|
-
const localContext = LocalContext.fromFileContext(fileContext),
|
|
34
|
-
suppositions = [],
|
|
35
|
-
suppositionNodes = suppositionsNodeQuery(metatheoremNode),
|
|
36
|
-
suppositionsVerified = verifySuppositions(suppositionNodes, suppositions, localContext);
|
|
37
|
-
|
|
38
|
-
if (suppositionsVerified) {
|
|
39
|
-
const consequents = [],
|
|
40
|
-
consequentNode = consequentNodeQuery(metatheoremNode),
|
|
41
|
-
consequentVerified = verifyConsequent(consequentNode, consequents, localContext);
|
|
42
|
-
|
|
43
|
-
if (consequentVerified) {
|
|
44
|
-
const proofNode = proofNodeQuery(metatheoremNode),
|
|
45
|
-
firstConsequent = first(consequents),
|
|
46
|
-
consequent = firstConsequent, ///
|
|
47
|
-
substitutions = Substitutions.fromNothing(),
|
|
48
|
-
statementNode = consequent.getStatementNode(),
|
|
49
|
-
proofVerified = verifyProof(proofNode, statementNode, substitutions, localContext);
|
|
50
|
-
|
|
51
|
-
if (proofVerified) {
|
|
52
|
-
const metatheorem = Metatheorem.fromLabelsSuppositionsConsequentSubstitutionsAndFileContext(labels, suppositions, consequent, substitutions, fileContext);
|
|
53
|
-
|
|
54
|
-
fileContext.addMetatheorem(metatheorem);
|
|
55
|
-
|
|
56
|
-
metatheoremVerified = true;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
if (metatheoremVerified) {
|
|
63
|
-
fileContext.debug(`...verified the '${labelsString}' metatheorem.`, metatheoremNode);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
return metatheoremVerified;
|
|
67
|
-
}
|