occam-verify-cli 1.0.727 → 1.0.730

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.
Files changed (47) hide show
  1. package/lib/context/ephemeral.js +7 -2
  2. package/lib/context/file/nominal.js +5 -1
  3. package/lib/context/liminal.js +11 -2
  4. package/lib/context/scoped.js +39 -4
  5. package/lib/context.js +7 -7
  6. package/lib/element/assumption.js +2 -2
  7. package/lib/element/declaration/metavariable.js +1 -2
  8. package/lib/element/metavariable.js +9 -7
  9. package/lib/element/proofAssertion/premise.js +1 -1
  10. package/lib/element/proofAssertion/step.js +5 -7
  11. package/lib/element/proofAssertion/supposition.js +1 -1
  12. package/lib/element/reference.js +2 -7
  13. package/lib/element/rule.js +5 -5
  14. package/lib/element/subproof.js +26 -11
  15. package/lib/element/substitution/statement.js +32 -30
  16. package/lib/element/substitution.js +1 -25
  17. package/lib/element/topLevelAssertion.js +5 -5
  18. package/lib/element/topLevelMetaAssertion.js +11 -15
  19. package/lib/utilities/context.js +7 -3
  20. package/lib/utilities/element.js +9 -2
  21. package/lib/utilities/json.js +2 -2
  22. package/lib/utilities/statement.js +1 -1
  23. package/lib/utilities/unification.js +14 -1
  24. package/package.json +1 -1
  25. package/src/context/ephemeral.js +9 -1
  26. package/src/context/file/nominal.js +6 -0
  27. package/src/context/liminal.js +16 -1
  28. package/src/context/scoped.js +55 -3
  29. package/src/context.js +9 -9
  30. package/src/element/assumption.js +2 -1
  31. package/src/element/declaration/metavariable.js +0 -1
  32. package/src/element/metavariable.js +10 -7
  33. package/src/element/proofAssertion/premise.js +1 -1
  34. package/src/element/proofAssertion/step.js +10 -13
  35. package/src/element/proofAssertion/supposition.js +1 -1
  36. package/src/element/reference.js +1 -8
  37. package/src/element/rule.js +5 -4
  38. package/src/element/subproof.js +36 -14
  39. package/src/element/substitution/statement.js +34 -32
  40. package/src/element/substitution.js +0 -36
  41. package/src/element/topLevelAssertion.js +5 -4
  42. package/src/element/topLevelMetaAssertion.js +11 -14
  43. package/src/utilities/context.js +8 -2
  44. package/src/utilities/element.js +7 -1
  45. package/src/utilities/json.js +1 -1
  46. package/src/utilities/statement.js +0 -1
  47. package/src/utilities/unification.js +16 -0
@@ -2,6 +2,8 @@
2
2
 
3
3
  import { arrayUtilities } from "necessary";
4
4
 
5
+ import elements from "../elements";
6
+
5
7
  import { equalityFromStatement,
6
8
  judgementFromStatement,
7
9
  typeAssertionFromStatement,
@@ -54,6 +56,20 @@ async function unifyStatementWithReference(statement, reference, satisfiesAssert
54
56
  statementAndSubproofOrProofAssertionsUnify = await topLevelAssertion.unifyStatementAndSubproofOrProofAssertions(statement, subproofOrProofAssertions, context);
55
57
 
56
58
  if (statementAndSubproofOrProofAssertionsUnify) {
59
+ statementUnifiesWithReference = true;
60
+ }
61
+ } else {
62
+ const metaLevelSubstitutions = context.hasMetaLevelSubstitutions();
63
+
64
+ if (metaLevelSubstitutions) {
65
+ const { StatementSubstitution } = elements,
66
+ metavariable = reference.getMetavariable(),
67
+ statementSubstitution = StatementSubstitution.fromStatementAndMetavariable(statement, metavariable, context),
68
+ substitution = statementSubstitution, ///
69
+ metaLevel = true;
70
+
71
+ context.addSubstitution(substitution, metaLevel);
72
+
57
73
  statementUnifiesWithReference = true;
58
74
  }
59
75
  }