@stevenvo780/st-lang 4.7.0 → 4.9.0
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/dist/logic/profiles/quantum/index.d.ts +153 -0
- package/dist/logic/profiles/quantum/index.d.ts.map +1 -0
- package/dist/logic/profiles/quantum/index.js +788 -0
- package/dist/logic/profiles/quantum/index.js.map +1 -0
- package/dist/namespaces/reasoning.d.ts +3 -1
- package/dist/namespaces/reasoning.d.ts.map +1 -1
- package/dist/namespaces/reasoning.js +5 -1
- package/dist/namespaces/reasoning.js.map +1 -1
- package/dist/proof-systems/certificate/canonical.d.ts +18 -0
- package/dist/proof-systems/certificate/canonical.d.ts.map +1 -0
- package/dist/proof-systems/certificate/canonical.js +79 -0
- package/dist/proof-systems/certificate/canonical.js.map +1 -0
- package/dist/proof-systems/certificate/generate.d.ts +39 -0
- package/dist/proof-systems/certificate/generate.d.ts.map +1 -0
- package/dist/proof-systems/certificate/generate.js +259 -0
- package/dist/proof-systems/certificate/generate.js.map +1 -0
- package/dist/proof-systems/certificate/index.d.ts +7 -0
- package/dist/proof-systems/certificate/index.d.ts.map +1 -0
- package/dist/proof-systems/certificate/index.js +23 -0
- package/dist/proof-systems/certificate/index.js.map +1 -0
- package/dist/proof-systems/certificate/lfsc.d.ts +15 -0
- package/dist/proof-systems/certificate/lfsc.d.ts.map +1 -0
- package/dist/proof-systems/certificate/lfsc.js +395 -0
- package/dist/proof-systems/certificate/lfsc.js.map +1 -0
- package/dist/proof-systems/certificate/rules.d.ts +8 -0
- package/dist/proof-systems/certificate/rules.d.ts.map +1 -0
- package/dist/proof-systems/certificate/rules.js +369 -0
- package/dist/proof-systems/certificate/rules.js.map +1 -0
- package/dist/proof-systems/certificate/types.d.ts +114 -0
- package/dist/proof-systems/certificate/types.d.ts.map +1 -0
- package/dist/proof-systems/certificate/types.js +18 -0
- package/dist/proof-systems/certificate/types.js.map +1 -0
- package/dist/proof-systems/certificate/verify.d.ts +20 -0
- package/dist/proof-systems/certificate/verify.d.ts.map +1 -0
- package/dist/proof-systems/certificate/verify.js +171 -0
- package/dist/proof-systems/certificate/verify.js.map +1 -0
- package/dist/reasoning/ban-logic/analyze.d.ts +31 -0
- package/dist/reasoning/ban-logic/analyze.d.ts.map +1 -0
- package/dist/reasoning/ban-logic/analyze.js +113 -0
- package/dist/reasoning/ban-logic/analyze.js.map +1 -0
- package/dist/reasoning/ban-logic/index.d.ts +7 -0
- package/dist/reasoning/ban-logic/index.d.ts.map +1 -0
- package/dist/reasoning/ban-logic/index.js +66 -0
- package/dist/reasoning/ban-logic/index.js.map +1 -0
- package/dist/reasoning/ban-logic/protocols.d.ts +54 -0
- package/dist/reasoning/ban-logic/protocols.d.ts.map +1 -0
- package/dist/reasoning/ban-logic/protocols.js +219 -0
- package/dist/reasoning/ban-logic/protocols.js.map +1 -0
- package/dist/reasoning/ban-logic/rules.d.ts +83 -0
- package/dist/reasoning/ban-logic/rules.d.ts.map +1 -0
- package/dist/reasoning/ban-logic/rules.js +409 -0
- package/dist/reasoning/ban-logic/rules.js.map +1 -0
- package/dist/reasoning/ban-logic/terms.d.ts +26 -0
- package/dist/reasoning/ban-logic/terms.d.ts.map +1 -0
- package/dist/reasoning/ban-logic/terms.js +262 -0
- package/dist/reasoning/ban-logic/terms.js.map +1 -0
- package/dist/reasoning/ban-logic/types.d.ts +107 -0
- package/dist/reasoning/ban-logic/types.d.ts.map +1 -0
- package/dist/reasoning/ban-logic/types.js +27 -0
- package/dist/reasoning/ban-logic/types.js.map +1 -0
- package/dist/reasoning/combinatorial-games/index.d.ts +105 -0
- package/dist/reasoning/combinatorial-games/index.d.ts.map +1 -0
- package/dist/reasoning/combinatorial-games/index.js +377 -0
- package/dist/reasoning/combinatorial-games/index.js.map +1 -0
- package/dist/reasoning/differential-privacy/index.d.ts +121 -0
- package/dist/reasoning/differential-privacy/index.d.ts.map +1 -0
- package/dist/reasoning/differential-privacy/index.js +417 -0
- package/dist/reasoning/differential-privacy/index.js.map +1 -0
- package/dist/reasoning/mechanism-design/auctions.d.ts +49 -0
- package/dist/reasoning/mechanism-design/auctions.d.ts.map +1 -0
- package/dist/reasoning/mechanism-design/auctions.js +179 -0
- package/dist/reasoning/mechanism-design/auctions.js.map +1 -0
- package/dist/reasoning/mechanism-design/index.d.ts +5 -0
- package/dist/reasoning/mechanism-design/index.d.ts.map +1 -0
- package/dist/reasoning/mechanism-design/index.js +39 -0
- package/dist/reasoning/mechanism-design/index.js.map +1 -0
- package/dist/reasoning/mechanism-design/myerson.d.ts +64 -0
- package/dist/reasoning/mechanism-design/myerson.d.ts.map +1 -0
- package/dist/reasoning/mechanism-design/myerson.js +253 -0
- package/dist/reasoning/mechanism-design/myerson.js.map +1 -0
- package/dist/reasoning/mechanism-design/types.d.ts +44 -0
- package/dist/reasoning/mechanism-design/types.d.ts.map +1 -0
- package/dist/reasoning/mechanism-design/types.js +22 -0
- package/dist/reasoning/mechanism-design/types.js.map +1 -0
- package/dist/reasoning/mechanism-design/vcg.d.ts +29 -0
- package/dist/reasoning/mechanism-design/vcg.d.ts.map +1 -0
- package/dist/reasoning/mechanism-design/vcg.js +305 -0
- package/dist/reasoning/mechanism-design/vcg.js.map +1 -0
- package/dist/reasoning/probabilistic/distributions.d.ts +44 -0
- package/dist/reasoning/probabilistic/distributions.d.ts.map +1 -0
- package/dist/reasoning/probabilistic/distributions.js +207 -0
- package/dist/reasoning/probabilistic/distributions.js.map +1 -0
- package/dist/reasoning/probabilistic/examples.d.ts +31 -0
- package/dist/reasoning/probabilistic/examples.d.ts.map +1 -0
- package/dist/reasoning/probabilistic/examples.js +85 -0
- package/dist/reasoning/probabilistic/examples.js.map +1 -0
- package/dist/reasoning/probabilistic/index.d.ts +6 -0
- package/dist/reasoning/probabilistic/index.d.ts.map +1 -0
- package/dist/reasoning/probabilistic/index.js +42 -0
- package/dist/reasoning/probabilistic/index.js.map +1 -0
- package/dist/reasoning/probabilistic/inference.d.ts +45 -0
- package/dist/reasoning/probabilistic/inference.d.ts.map +1 -0
- package/dist/reasoning/probabilistic/inference.js +579 -0
- package/dist/reasoning/probabilistic/inference.js.map +1 -0
- package/dist/reasoning/probabilistic/types.d.ts +153 -0
- package/dist/reasoning/probabilistic/types.d.ts.map +1 -0
- package/dist/reasoning/probabilistic/types.js +37 -0
- package/dist/reasoning/probabilistic/types.js.map +1 -0
- package/dist/solver/smt-z3/index.d.ts +3 -0
- package/dist/solver/smt-z3/index.d.ts.map +1 -0
- package/dist/solver/smt-z3/index.js +11 -0
- package/dist/solver/smt-z3/index.js.map +1 -0
- package/dist/solver/smt-z3/types.d.ts +52 -0
- package/dist/solver/smt-z3/types.d.ts.map +1 -0
- package/dist/solver/smt-z3/types.js +6 -0
- package/dist/solver/smt-z3/types.js.map +1 -0
- package/dist/solver/smt-z3/z3-wasm-backend.d.ts +88 -0
- package/dist/solver/smt-z3/z3-wasm-backend.d.ts.map +1 -0
- package/dist/solver/smt-z3/z3-wasm-backend.js +437 -0
- package/dist/solver/smt-z3/z3-wasm-backend.js.map +1 -0
- package/dist/tests/logic/profiles/quantum/quantum.test.d.ts +2 -0
- package/dist/tests/logic/profiles/quantum/quantum.test.d.ts.map +1 -0
- package/dist/tests/logic/profiles/quantum/quantum.test.js +209 -0
- package/dist/tests/logic/profiles/quantum/quantum.test.js.map +1 -0
- package/dist/tests/proof-systems/certificate/certificate.test.d.ts +2 -0
- package/dist/tests/proof-systems/certificate/certificate.test.d.ts.map +1 -0
- package/dist/tests/proof-systems/certificate/certificate.test.js +449 -0
- package/dist/tests/proof-systems/certificate/certificate.test.js.map +1 -0
- package/dist/tests/reasoning/ban-logic/ban-logic.test.d.ts +2 -0
- package/dist/tests/reasoning/ban-logic/ban-logic.test.d.ts.map +1 -0
- package/dist/tests/reasoning/ban-logic/ban-logic.test.js +270 -0
- package/dist/tests/reasoning/ban-logic/ban-logic.test.js.map +1 -0
- package/dist/tests/reasoning/combinatorial-games/combinatorial-games.test.d.ts +2 -0
- package/dist/tests/reasoning/combinatorial-games/combinatorial-games.test.d.ts.map +1 -0
- package/dist/tests/reasoning/combinatorial-games/combinatorial-games.test.js +203 -0
- package/dist/tests/reasoning/combinatorial-games/combinatorial-games.test.js.map +1 -0
- package/dist/tests/reasoning/differential-privacy/differential-privacy.test.d.ts +2 -0
- package/dist/tests/reasoning/differential-privacy/differential-privacy.test.d.ts.map +1 -0
- package/dist/tests/reasoning/differential-privacy/differential-privacy.test.js +388 -0
- package/dist/tests/reasoning/differential-privacy/differential-privacy.test.js.map +1 -0
- package/dist/tests/reasoning/mechanism-design/mechanism-design.test.d.ts +2 -0
- package/dist/tests/reasoning/mechanism-design/mechanism-design.test.d.ts.map +1 -0
- package/dist/tests/reasoning/mechanism-design/mechanism-design.test.js +290 -0
- package/dist/tests/reasoning/mechanism-design/mechanism-design.test.js.map +1 -0
- package/dist/tests/reasoning/probabilistic/probabilistic.test.d.ts +2 -0
- package/dist/tests/reasoning/probabilistic/probabilistic.test.d.ts.map +1 -0
- package/dist/tests/reasoning/probabilistic/probabilistic.test.js +370 -0
- package/dist/tests/reasoning/probabilistic/probabilistic.test.js.map +1 -0
- package/dist/tests/solver/smt-z3/z3-wasm-backend.test.d.ts +2 -0
- package/dist/tests/solver/smt-z3/z3-wasm-backend.test.d.ts.map +1 -0
- package/dist/tests/solver/smt-z3/z3-wasm-backend.test.js +394 -0
- package/dist/tests/solver/smt-z3/z3-wasm-backend.test.js.map +1 -0
- package/dist/tests/tooling/mathlib/mathlib.test.d.ts +2 -0
- package/dist/tests/tooling/mathlib/mathlib.test.d.ts.map +1 -0
- package/dist/tests/tooling/mathlib/mathlib.test.js +214 -0
- package/dist/tests/tooling/mathlib/mathlib.test.js.map +1 -0
- package/dist/tests/tooling/proof-guidance/features.test.d.ts +2 -0
- package/dist/tests/tooling/proof-guidance/features.test.d.ts.map +1 -0
- package/dist/tests/tooling/proof-guidance/features.test.js +72 -0
- package/dist/tests/tooling/proof-guidance/features.test.js.map +1 -0
- package/dist/tests/tooling/proof-guidance/model.test.d.ts +2 -0
- package/dist/tests/tooling/proof-guidance/model.test.d.ts.map +1 -0
- package/dist/tests/tooling/proof-guidance/model.test.js +165 -0
- package/dist/tests/tooling/proof-guidance/model.test.js.map +1 -0
- package/dist/tests/tooling/proof-guidance/search.test.d.ts +2 -0
- package/dist/tests/tooling/proof-guidance/search.test.d.ts.map +1 -0
- package/dist/tests/tooling/proof-guidance/search.test.js +238 -0
- package/dist/tests/tooling/proof-guidance/search.test.js.map +1 -0
- package/dist/tests/type-theory/cubical/cubical.test.d.ts +2 -0
- package/dist/tests/type-theory/cubical/cubical.test.d.ts.map +1 -0
- package/dist/tests/type-theory/cubical/cubical.test.js +207 -0
- package/dist/tests/type-theory/cubical/cubical.test.js.map +1 -0
- package/dist/tests/type-theory/effects/effects.test.d.ts +2 -0
- package/dist/tests/type-theory/effects/effects.test.d.ts.map +1 -0
- package/dist/tests/type-theory/effects/effects.test.js +242 -0
- package/dist/tests/type-theory/effects/effects.test.js.map +1 -0
- package/dist/tooling/mathlib/group.d.ts +27 -0
- package/dist/tooling/mathlib/group.d.ts.map +1 -0
- package/dist/tooling/mathlib/group.js +89 -0
- package/dist/tooling/mathlib/group.js.map +1 -0
- package/dist/tooling/mathlib/index.d.ts +8 -0
- package/dist/tooling/mathlib/index.d.ts.map +1 -0
- package/dist/tooling/mathlib/index.js +40 -0
- package/dist/tooling/mathlib/index.js.map +1 -0
- package/dist/tooling/mathlib/instances.d.ts +29 -0
- package/dist/tooling/mathlib/instances.d.ts.map +1 -0
- package/dist/tooling/mathlib/instances.js +139 -0
- package/dist/tooling/mathlib/instances.js.map +1 -0
- package/dist/tooling/mathlib/lemmas.d.ts +3 -0
- package/dist/tooling/mathlib/lemmas.d.ts.map +1 -0
- package/dist/tooling/mathlib/lemmas.js +72 -0
- package/dist/tooling/mathlib/lemmas.js.map +1 -0
- package/dist/tooling/mathlib/order.d.ts +29 -0
- package/dist/tooling/mathlib/order.d.ts.map +1 -0
- package/dist/tooling/mathlib/order.js +91 -0
- package/dist/tooling/mathlib/order.js.map +1 -0
- package/dist/tooling/mathlib/ring.d.ts +15 -0
- package/dist/tooling/mathlib/ring.d.ts.map +1 -0
- package/dist/tooling/mathlib/ring.js +91 -0
- package/dist/tooling/mathlib/ring.js.map +1 -0
- package/dist/tooling/mathlib/types.d.ts +62 -0
- package/dist/tooling/mathlib/types.d.ts.map +1 -0
- package/dist/tooling/mathlib/types.js +7 -0
- package/dist/tooling/mathlib/types.js.map +1 -0
- package/dist/tooling/proof-guidance/features.d.ts +10 -0
- package/dist/tooling/proof-guidance/features.d.ts.map +1 -0
- package/dist/tooling/proof-guidance/features.js +97 -0
- package/dist/tooling/proof-guidance/features.js.map +1 -0
- package/dist/tooling/proof-guidance/index.d.ts +5 -0
- package/dist/tooling/proof-guidance/index.d.ts.map +1 -0
- package/dist/tooling/proof-guidance/index.js +25 -0
- package/dist/tooling/proof-guidance/index.js.map +1 -0
- package/dist/tooling/proof-guidance/model.d.ts +42 -0
- package/dist/tooling/proof-guidance/model.d.ts.map +1 -0
- package/dist/tooling/proof-guidance/model.js +149 -0
- package/dist/tooling/proof-guidance/model.js.map +1 -0
- package/dist/tooling/proof-guidance/search.d.ts +7 -0
- package/dist/tooling/proof-guidance/search.d.ts.map +1 -0
- package/dist/tooling/proof-guidance/search.js +102 -0
- package/dist/tooling/proof-guidance/search.js.map +1 -0
- package/dist/tooling/proof-guidance/types.d.ts +77 -0
- package/dist/tooling/proof-guidance/types.d.ts.map +1 -0
- package/dist/tooling/proof-guidance/types.js +8 -0
- package/dist/tooling/proof-guidance/types.js.map +1 -0
- package/dist/type-theory/cubical/equality.d.ts +4 -0
- package/dist/type-theory/cubical/equality.d.ts.map +1 -0
- package/dist/type-theory/cubical/equality.js +78 -0
- package/dist/type-theory/cubical/equality.js.map +1 -0
- package/dist/type-theory/cubical/index.d.ts +14 -0
- package/dist/type-theory/cubical/index.d.ts.map +1 -0
- package/dist/type-theory/cubical/index.js +71 -0
- package/dist/type-theory/cubical/index.js.map +1 -0
- package/dist/type-theory/cubical/infer.d.ts +18 -0
- package/dist/type-theory/cubical/infer.d.ts.map +1 -0
- package/dist/type-theory/cubical/infer.js +241 -0
- package/dist/type-theory/cubical/infer.js.map +1 -0
- package/dist/type-theory/cubical/interval.d.ts +12 -0
- package/dist/type-theory/cubical/interval.d.ts.map +1 -0
- package/dist/type-theory/cubical/interval.js +118 -0
- package/dist/type-theory/cubical/interval.js.map +1 -0
- package/dist/type-theory/cubical/normalize.d.ts +5 -0
- package/dist/type-theory/cubical/normalize.d.ts.map +1 -0
- package/dist/type-theory/cubical/normalize.js +191 -0
- package/dist/type-theory/cubical/normalize.js.map +1 -0
- package/dist/type-theory/cubical/path-algebra.d.ts +12 -0
- package/dist/type-theory/cubical/path-algebra.d.ts.map +1 -0
- package/dist/type-theory/cubical/path-algebra.js +109 -0
- package/dist/type-theory/cubical/path-algebra.js.map +1 -0
- package/dist/type-theory/cubical/substitute.d.ts +3 -0
- package/dist/type-theory/cubical/substitute.d.ts.map +1 -0
- package/dist/type-theory/cubical/substitute.js +109 -0
- package/dist/type-theory/cubical/substitute.js.map +1 -0
- package/dist/type-theory/cubical/types.d.ts +77 -0
- package/dist/type-theory/cubical/types.d.ts.map +1 -0
- package/dist/type-theory/cubical/types.js +258 -0
- package/dist/type-theory/cubical/types.js.map +1 -0
- package/dist/type-theory/effects/core.d.ts +27 -0
- package/dist/type-theory/effects/core.d.ts.map +1 -0
- package/dist/type-theory/effects/core.js +79 -0
- package/dist/type-theory/effects/core.js.map +1 -0
- package/dist/type-theory/effects/exception.d.ts +18 -0
- package/dist/type-theory/effects/exception.d.ts.map +1 -0
- package/dist/type-theory/effects/exception.js +59 -0
- package/dist/type-theory/effects/exception.js.map +1 -0
- package/dist/type-theory/effects/index.d.ts +11 -0
- package/dist/type-theory/effects/index.d.ts.map +1 -0
- package/dist/type-theory/effects/index.js +50 -0
- package/dist/type-theory/effects/index.js.map +1 -0
- package/dist/type-theory/effects/reader.d.ts +20 -0
- package/dist/type-theory/effects/reader.d.ts.map +1 -0
- package/dist/type-theory/effects/reader.js +62 -0
- package/dist/type-theory/effects/reader.js.map +1 -0
- package/dist/type-theory/effects/state.d.ts +31 -0
- package/dist/type-theory/effects/state.d.ts.map +1 -0
- package/dist/type-theory/effects/state.js +91 -0
- package/dist/type-theory/effects/state.js.map +1 -0
- package/dist/type-theory/effects/types.d.ts +45 -0
- package/dist/type-theory/effects/types.d.ts.map +1 -0
- package/dist/type-theory/effects/types.js +21 -0
- package/dist/type-theory/effects/types.js.map +1 -0
- package/dist/type-theory/effects/writer.d.ts +30 -0
- package/dist/type-theory/effects/writer.d.ts.map +1 -0
- package/dist/type-theory/effects/writer.js +79 -0
- package/dist/type-theory/effects/writer.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ============================================================
|
|
3
|
+
// ST Proof Guidance — Beam search guiado por el modelo
|
|
4
|
+
//
|
|
5
|
+
// Hill-climbing relajado: en cada paso retenemos los `beamWidth`
|
|
6
|
+
// estados con mejor score acumulado y expandimos solo esos.
|
|
7
|
+
// El score se hereda del modelo (ranking) — el modelo guía qué
|
|
8
|
+
// rama explorar primero.
|
|
9
|
+
// ============================================================
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.guidedSearch = guidedSearch;
|
|
12
|
+
const model_1 = require("./model");
|
|
13
|
+
/**
|
|
14
|
+
* Reconoce un estado "cerrado" — goal vacío o `⊤` o reducido a una
|
|
15
|
+
* hipótesis idéntica. Hook minimalista; el caller puede pasar tácticas
|
|
16
|
+
* que devuelvan estados con goal = '' para indicar QED.
|
|
17
|
+
*/
|
|
18
|
+
function isClosed(state) {
|
|
19
|
+
const goal = state.goal.trim();
|
|
20
|
+
if (goal === '' || goal === '⊤')
|
|
21
|
+
return true;
|
|
22
|
+
if (state.hypotheses.some((h) => h.trim() === goal))
|
|
23
|
+
return true;
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Hash determinístico de un estado para detectar ciclos en el beam.
|
|
28
|
+
* No es criptográfico — sólo evita re-expandir el mismo estado.
|
|
29
|
+
*/
|
|
30
|
+
function stateKey(state) {
|
|
31
|
+
// Hipótesis ordenadas para que {A, B} y {B, A} sean el mismo estado.
|
|
32
|
+
const hyps = state.hypotheses.slice().sort().join('|');
|
|
33
|
+
return `${state.goal.trim()}#${hyps}`;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Beam search guiado por el modelo. `applyTactic` define la semántica
|
|
37
|
+
* de cada táctica — el módulo no asume nada sobre la lógica de fondo.
|
|
38
|
+
*/
|
|
39
|
+
function guidedSearch(initialState, applyTactic, model, candidates, opts = {}) {
|
|
40
|
+
const maxDepth = opts.maxDepth ?? 16;
|
|
41
|
+
const beamWidth = Math.max(1, opts.beamWidth ?? 4);
|
|
42
|
+
const timeoutMs = opts.timeoutMs ?? 5000;
|
|
43
|
+
const maxExploredStates = opts.maxExploredStates ?? 10000;
|
|
44
|
+
const start = Date.now();
|
|
45
|
+
let explored = 0;
|
|
46
|
+
const visited = new Set();
|
|
47
|
+
visited.add(stateKey(initialState));
|
|
48
|
+
if (isClosed(initialState)) {
|
|
49
|
+
return { proof: [], exploredStates: 0, success: true };
|
|
50
|
+
}
|
|
51
|
+
let beam = [{ state: initialState, path: [], cumulativeScore: 0 }];
|
|
52
|
+
for (let depth = 0; depth < maxDepth; depth++) {
|
|
53
|
+
if (Date.now() - start > timeoutMs) {
|
|
54
|
+
return { exploredStates: explored, success: false, reason: 'timeout' };
|
|
55
|
+
}
|
|
56
|
+
if (explored >= maxExploredStates) {
|
|
57
|
+
return { exploredStates: explored, success: false, reason: 'cap' };
|
|
58
|
+
}
|
|
59
|
+
const nextBeam = [];
|
|
60
|
+
for (const node of beam) {
|
|
61
|
+
if (Date.now() - start > timeoutMs) {
|
|
62
|
+
return { exploredStates: explored, success: false, reason: 'timeout' };
|
|
63
|
+
}
|
|
64
|
+
const ranked = (0, model_1.rankTactics)(node.state, model, candidates);
|
|
65
|
+
for (const r of ranked) {
|
|
66
|
+
if (explored >= maxExploredStates)
|
|
67
|
+
break;
|
|
68
|
+
const newState = applyTactic(node.state, r.tactic);
|
|
69
|
+
explored++;
|
|
70
|
+
if (newState === null)
|
|
71
|
+
continue;
|
|
72
|
+
const key = stateKey(newState);
|
|
73
|
+
if (visited.has(key))
|
|
74
|
+
continue;
|
|
75
|
+
visited.add(key);
|
|
76
|
+
const record = {
|
|
77
|
+
tactic: r.tactic,
|
|
78
|
+
beforeState: node.state,
|
|
79
|
+
afterState: newState,
|
|
80
|
+
successful: isClosed(newState),
|
|
81
|
+
};
|
|
82
|
+
const newPath = [...node.path, record];
|
|
83
|
+
if (isClosed(newState)) {
|
|
84
|
+
return { proof: newPath, exploredStates: explored, success: true };
|
|
85
|
+
}
|
|
86
|
+
nextBeam.push({
|
|
87
|
+
state: newState,
|
|
88
|
+
path: newPath,
|
|
89
|
+
cumulativeScore: node.cumulativeScore + r.score,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
if (nextBeam.length === 0) {
|
|
94
|
+
return { exploredStates: explored, success: false, reason: 'exhausted' };
|
|
95
|
+
}
|
|
96
|
+
// Mantener los top-`beamWidth` por score acumulado.
|
|
97
|
+
nextBeam.sort((a, b) => b.cumulativeScore - a.cumulativeScore);
|
|
98
|
+
beam = nextBeam.slice(0, beamWidth);
|
|
99
|
+
}
|
|
100
|
+
return { exploredStates: explored, success: false, reason: 'depth' };
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=search.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../../src/tooling/proof-guidance/search.ts"],"names":[],"mappings":";AAAA,+DAA+D;AAC/D,uDAAuD;AACvD,EAAE;AACF,iEAAiE;AACjE,4DAA4D;AAC5D,+DAA+D;AAC/D,yBAAyB;AACz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C,eAAe,CAAC,CAAC;QAC/D,IAAI,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;IACtC,CAAC;IAED,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;AACvE,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Estado de prueba: goal a demostrar + hipótesis disponibles.
|
|
3
|
+
* `context` opcional para metadatos arbitrarios (nombre del teorema,
|
|
4
|
+
* profile lógico activo, etc.) — el extractor lo ignora hoy pero
|
|
5
|
+
* deja la puerta abierta para features ricas en el futuro.
|
|
6
|
+
*/
|
|
7
|
+
export interface ProofState {
|
|
8
|
+
goal: string;
|
|
9
|
+
hypotheses: string[];
|
|
10
|
+
context?: Record<string, string>;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Registro histórico: una aplicación de táctica con el resultado.
|
|
14
|
+
* `proofDepthRemaining` permite ponderar éxito por proximidad al QED:
|
|
15
|
+
* tácticas que cierran la prueba pesan más que tácticas medias.
|
|
16
|
+
*/
|
|
17
|
+
export interface TacticRecord {
|
|
18
|
+
tactic: string;
|
|
19
|
+
args?: unknown[];
|
|
20
|
+
beforeState: ProofState;
|
|
21
|
+
afterState: ProofState;
|
|
22
|
+
successful: boolean;
|
|
23
|
+
proofDepthRemaining?: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Feature extraída de un estado. `value` es numérico (los booleanos
|
|
27
|
+
* se codifican como 0/1) para que el ranker haga producto interno
|
|
28
|
+
* sin tratos especiales.
|
|
29
|
+
*/
|
|
30
|
+
export interface Feature {
|
|
31
|
+
name: string;
|
|
32
|
+
value: number;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Modelo entrenado. Por cada par (tactic, feature) hay un peso
|
|
36
|
+
* — los lemas también caben aquí porque se tratan como tácticas
|
|
37
|
+
* con nombre `lemma:<id>`.
|
|
38
|
+
*/
|
|
39
|
+
export interface RankingModel {
|
|
40
|
+
features: string[];
|
|
41
|
+
/** key: `${tactic}::${featureName}` → peso aprendido. */
|
|
42
|
+
weights: Map<string, number>;
|
|
43
|
+
/** bias por táctica — base rate cuando todas las features son 0. */
|
|
44
|
+
bias: Map<string, number>;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Resultado de ranking: score sin normalizar, mayor = mejor candidata.
|
|
48
|
+
* No es probabilidad estricta — usar `Math.exp(score) / sum` si se
|
|
49
|
+
* necesita softmax.
|
|
50
|
+
*/
|
|
51
|
+
export interface RankedTactic {
|
|
52
|
+
tactic: string;
|
|
53
|
+
score: number;
|
|
54
|
+
}
|
|
55
|
+
export interface SearchOptions {
|
|
56
|
+
/** Profundidad máxima de la prueba. Default: 16. */
|
|
57
|
+
maxDepth?: number;
|
|
58
|
+
/** Estados a expandir por nivel. Default: 4. */
|
|
59
|
+
beamWidth?: number;
|
|
60
|
+
/** Presupuesto de tiempo en milisegundos. Default: 5000. */
|
|
61
|
+
timeoutMs?: number;
|
|
62
|
+
/** Cap total de estados explorados (defensa contra explosiones). Default: 10000. */
|
|
63
|
+
maxExploredStates?: number;
|
|
64
|
+
}
|
|
65
|
+
export interface SearchResult {
|
|
66
|
+
/** Secuencia de tácticas si encontró prueba; undefined si falló. */
|
|
67
|
+
proof?: TacticRecord[];
|
|
68
|
+
/** Estados expandidos durante la búsqueda (métrica de costo). */
|
|
69
|
+
exploredStates: number;
|
|
70
|
+
/** true si llegó a un goal vacío o reconocido como cerrado. */
|
|
71
|
+
success: boolean;
|
|
72
|
+
/** Razón si no encontró: 'timeout' | 'depth' | 'exhausted'. */
|
|
73
|
+
reason?: 'timeout' | 'depth' | 'exhausted' | 'cap';
|
|
74
|
+
}
|
|
75
|
+
/** Función que aplica una táctica a un estado. null = táctica no aplicable. */
|
|
76
|
+
export type ApplyTactic = (state: ProofState, tactic: string, args?: unknown[]) => ProofState | null;
|
|
77
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/tooling/proof-guidance/types.ts"],"names":[],"mappings":"AAMA;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC;IACjB,WAAW,EAAE,UAAU,CAAC;IACxB,UAAU,EAAE,UAAU,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED;;;;GAIG;AACH,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,yDAAyD;IACzD,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,oEAAoE;IACpE,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC3B;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,aAAa;IAC5B,oDAAoD;IACpD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4DAA4D;IAC5D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oFAAoF;IACpF,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,YAAY;IAC3B,oEAAoE;IACpE,KAAK,CAAC,EAAE,YAAY,EAAE,CAAC;IACvB,iEAAiE;IACjE,cAAc,EAAE,MAAM,CAAC;IACvB,+DAA+D;IAC/D,OAAO,EAAE,OAAO,CAAC;IACjB,+DAA+D;IAC/D,MAAM,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,WAAW,GAAG,KAAK,CAAC;CACpD;AAED,+EAA+E;AAC/E,MAAM,MAAM,WAAW,GAAG,CACxB,KAAK,EAAE,UAAU,EACjB,MAAM,EAAE,MAAM,EACd,IAAI,CAAC,EAAE,OAAO,EAAE,KACb,UAAU,GAAG,IAAI,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ============================================================
|
|
3
|
+
// ST Proof Guidance — Tipos públicos
|
|
4
|
+
// Sistema de ranking de tácticas/lemas con feature extraction
|
|
5
|
+
// simple + aprendizaje supervisado (logistic regression / weighted KNN).
|
|
6
|
+
// ============================================================
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/tooling/proof-guidance/types.ts"],"names":[],"mappings":";AAAA,+DAA+D;AAC/D,qCAAqC;AACrC,8DAA8D;AAC9D,yEAAyE;AACzE,+DAA+D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"equality.d.ts","sourceRoot":"","sources":["../../../src/type-theory/cubical/equality.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAM3C,wBAAgB,cAAc,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,GAAG,OAAO,CAoEtE;AAED,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,GAAG,OAAO,CAE1E"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ============================================================
|
|
3
|
+
// Cubical — α-equivalencia e igualdad definicional (αβ)
|
|
4
|
+
// ============================================================
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.alphaEqCubical = alphaEqCubical;
|
|
7
|
+
exports.alphaBetaEqCubical = alphaBetaEqCubical;
|
|
8
|
+
const normalize_1 = require("./normalize");
|
|
9
|
+
const substitute_1 = require("./substitute");
|
|
10
|
+
let alphaCounter = 0;
|
|
11
|
+
function alphaEqCubical(a, b) {
|
|
12
|
+
if (a.kind !== b.kind)
|
|
13
|
+
return false;
|
|
14
|
+
switch (a.kind) {
|
|
15
|
+
case 'i0':
|
|
16
|
+
case 'i1':
|
|
17
|
+
return true;
|
|
18
|
+
case 'universe':
|
|
19
|
+
return a.level === b.level;
|
|
20
|
+
case 'var':
|
|
21
|
+
case 'iVar':
|
|
22
|
+
return a.name === b.name;
|
|
23
|
+
case 'iNeg':
|
|
24
|
+
return alphaEqCubical(a.arg, b.arg);
|
|
25
|
+
case 'iMin':
|
|
26
|
+
case 'iMax': {
|
|
27
|
+
const bb = b;
|
|
28
|
+
return alphaEqCubical(a.left, bb.left) && alphaEqCubical(a.right, bb.right);
|
|
29
|
+
}
|
|
30
|
+
case 'pathP': {
|
|
31
|
+
const bb = b;
|
|
32
|
+
return (alphaEqCubical(a.family, bb.family) &&
|
|
33
|
+
alphaEqCubical(a.left, bb.left) &&
|
|
34
|
+
alphaEqCubical(a.right, bb.right));
|
|
35
|
+
}
|
|
36
|
+
case 'pLam': {
|
|
37
|
+
const bb = b;
|
|
38
|
+
if (a.bind === bb.bind)
|
|
39
|
+
return alphaEqCubical(a.body, bb.body);
|
|
40
|
+
const fresh = `__αc${alphaCounter++}`;
|
|
41
|
+
return alphaEqCubical((0, substitute_1.substituteCubical)(a.body, a.bind, { kind: 'iVar', name: fresh }), (0, substitute_1.substituteCubical)(bb.body, bb.bind, { kind: 'iVar', name: fresh }));
|
|
42
|
+
}
|
|
43
|
+
case 'pApp': {
|
|
44
|
+
const bb = b;
|
|
45
|
+
return alphaEqCubical(a.path, bb.path) && alphaEqCubical(a.arg, bb.arg);
|
|
46
|
+
}
|
|
47
|
+
case 'glue': {
|
|
48
|
+
const bb = b;
|
|
49
|
+
return alphaEqCubical(a.equiv, bb.equiv) && alphaEqCubical(a.partial, bb.partial);
|
|
50
|
+
}
|
|
51
|
+
case 'pi': {
|
|
52
|
+
const bb = b;
|
|
53
|
+
if (!alphaEqCubical(a.domain, bb.domain))
|
|
54
|
+
return false;
|
|
55
|
+
if (a.bind === bb.bind)
|
|
56
|
+
return alphaEqCubical(a.codomain, bb.codomain);
|
|
57
|
+
const fresh = `__αc${alphaCounter++}`;
|
|
58
|
+
return alphaEqCubical((0, substitute_1.substituteCubical)(a.codomain, a.bind, { kind: 'var', name: fresh }), (0, substitute_1.substituteCubical)(bb.codomain, bb.bind, { kind: 'var', name: fresh }));
|
|
59
|
+
}
|
|
60
|
+
case 'lam': {
|
|
61
|
+
const bb = b;
|
|
62
|
+
if (!alphaEqCubical(a.domain, bb.domain))
|
|
63
|
+
return false;
|
|
64
|
+
if (a.bind === bb.bind)
|
|
65
|
+
return alphaEqCubical(a.body, bb.body);
|
|
66
|
+
const fresh = `__αc${alphaCounter++}`;
|
|
67
|
+
return alphaEqCubical((0, substitute_1.substituteCubical)(a.body, a.bind, { kind: 'var', name: fresh }), (0, substitute_1.substituteCubical)(bb.body, bb.bind, { kind: 'var', name: fresh }));
|
|
68
|
+
}
|
|
69
|
+
case 'app': {
|
|
70
|
+
const bb = b;
|
|
71
|
+
return alphaEqCubical(a.fn, bb.fn) && alphaEqCubical(a.arg, bb.arg);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
function alphaBetaEqCubical(a, b) {
|
|
76
|
+
return alphaEqCubical((0, normalize_1.normalizeCubical)(a), (0, normalize_1.normalizeCubical)(b));
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=equality.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"equality.js","sourceRoot":"","sources":["../../../src/type-theory/cubical/equality.ts"],"names":[],"mappings":";AAAA,+DAA+D;AAC/D,wDAAwD;AACxD,+DAA+D;;AAQ/D,wCAoEC;AAED,gDAEC;AA7ED,2CAA+C;AAC/C,6CAAiD;AAEjD,IAAI,YAAY,GAAG,CAAC,CAAC;AAErB,SAAgB,cAAc,CAAC,CAAc,EAAE,CAAc;IAC3D,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;QAAE,OAAO,KAAK,CAAC;IACpC,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC;QACf,KAAK,IAAI,CAAC;QACV,KAAK,IAAI;YACP,OAAO,IAAI,CAAC;QACd,KAAK,UAAU;YACb,OAAO,CAAC,CAAC,KAAK,KAAM,CAAc,CAAC,KAAK,CAAC;QAC3C,KAAK,KAAK,CAAC;QACX,KAAK,MAAM;YACT,OAAO,CAAC,CAAC,IAAI,KAAM,CAAc,CAAC,IAAI,CAAC;QACzC,KAAK,MAAM;YACT,OAAO,cAAc,CAAC,CAAC,CAAC,GAAG,EAAG,CAAc,CAAC,GAAG,CAAC,CAAC;QACpD,KAAK,MAAM,CAAC;QACZ,KAAK,MAAM,CAAC,CAAC,CAAC;YACZ,MAAM,EAAE,GAAG,CAAa,CAAC;YACzB,OAAO,cAAc,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,cAAc,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC;QAC9E,CAAC;QACD,KAAK,OAAO,CAAC,CAAC,CAAC;YACb,MAAM,EAAE,GAAG,CAAa,CAAC;YACzB,OAAO,CACL,cAAc,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC;gBACn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AAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAClE,CAAC;QACJ,CAAC;QACD,KAAK,KAAK,CAAC,CAAC,CAAC;YACX,MAAM,EAAE,GAAG,CAAa,CAAC;YACzB,OAAO,cAAc,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,cAAc,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC;QACtE,CAAC;IACH,CAAC;AACH,CAAC;AAED,SAAgB,kBAAkB,CAAC,CAAc,EAAE,CAAc;IAC/D,OAAO,cAAc,CAAC,IAAA,4BAAgB,EAAC,CAAC,CAAC,EAAE,IAAA,4BAAgB,EAAC,CAAC,CAAC,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type { CubicalTerm } from './types';
|
|
2
|
+
export { cI0, cI1, cIVar, cIMin, cIMax, cINeg, cPathP, cPLam, cPApp, cGlue, cVar, cUniverse, cPi, cLam, cApp, cArrow, isIntervalExpr, freeVarsCubical, occursFreeCubical, termToStringCubical, } from './types';
|
|
3
|
+
export { substituteCubical } from './substitute';
|
|
4
|
+
export { evalInterval, normalizeInterval } from './interval';
|
|
5
|
+
export type { IntervalValue } from './interval';
|
|
6
|
+
export { reduceStepCubical, normalizeCubical, isNormalCubical } from './normalize';
|
|
7
|
+
export { alphaEqCubical, alphaBetaEqCubical } from './equality';
|
|
8
|
+
export { inferType, checkType, isInferErrorCubical, makeContext, intervalType } from './infer';
|
|
9
|
+
export type { CubicalContext, InferResultCubical } from './infer';
|
|
10
|
+
export { reflPath, pathInverse, pathCompose, glue } from './path-algebra';
|
|
11
|
+
export { normalizeCubical as normalize } from './normalize';
|
|
12
|
+
export { alphaBetaEqCubical as alphaBetaEq, alphaEqCubical as alphaEq } from './equality';
|
|
13
|
+
export { termToStringCubical as termToString } from './types';
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 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|
+
// ============================================================
|
|
3
|
+
// CTT-Lite — Cubical Type Theory (núcleo público)
|
|
4
|
+
// ============================================================
|
|
5
|
+
//
|
|
6
|
+
// Extiende MLTT con:
|
|
7
|
+
// - Intervalo I con conexiones (∧, ∨) e involución (~)
|
|
8
|
+
// - PathP A x y como caminos dependientes en I
|
|
9
|
+
// - λi. t y p @ r (path-abstracción y aplicación)
|
|
10
|
+
// - Reducciones computacionales del intervalo
|
|
11
|
+
// - glue como precursor sintáctico de la computación de ua
|
|
12
|
+
//
|
|
13
|
+
// La diferencia central con HoTT (en /hott/) es que aquí univalence
|
|
14
|
+
// es computacional: transport sobre un path generado por glue puede
|
|
15
|
+
// reducir (en una versión completa de CTT). En este subset se sienta
|
|
16
|
+
// la base sintáctica que permite esa reducción.
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.termToString = exports.alphaEq = exports.alphaBetaEq = exports.normalize = exports.glue = exports.pathCompose = exports.pathInverse = exports.reflPath = exports.intervalType = exports.makeContext = exports.isInferErrorCubical = exports.checkType = exports.inferType = exports.alphaBetaEqCubical = exports.alphaEqCubical = exports.isNormalCubical = exports.normalizeCubical = exports.reduceStepCubical = exports.normalizeInterval = exports.evalInterval = exports.substituteCubical = exports.termToStringCubical = exports.occursFreeCubical = exports.freeVarsCubical = exports.isIntervalExpr = exports.cArrow = exports.cApp = exports.cLam = exports.cPi = exports.cUniverse = exports.cVar = exports.cGlue = exports.cPApp = exports.cPLam = exports.cPathP = exports.cINeg = exports.cIMax = exports.cIMin = exports.cIVar = exports.cI1 = exports.cI0 = void 0;
|
|
19
|
+
var types_1 = require("./types");
|
|
20
|
+
Object.defineProperty(exports, "cI0", { enumerable: true, get: function () { return types_1.cI0; } });
|
|
21
|
+
Object.defineProperty(exports, "cI1", { enumerable: true, get: function () { return types_1.cI1; } });
|
|
22
|
+
Object.defineProperty(exports, "cIVar", { enumerable: true, get: function () { return types_1.cIVar; } });
|
|
23
|
+
Object.defineProperty(exports, "cIMin", { enumerable: true, get: function () { return types_1.cIMin; } });
|
|
24
|
+
Object.defineProperty(exports, "cIMax", { enumerable: true, get: function () { return types_1.cIMax; } });
|
|
25
|
+
Object.defineProperty(exports, "cINeg", { enumerable: true, get: function () { return types_1.cINeg; } });
|
|
26
|
+
Object.defineProperty(exports, "cPathP", { enumerable: true, get: function () { return types_1.cPathP; } });
|
|
27
|
+
Object.defineProperty(exports, "cPLam", { enumerable: true, get: function () { return types_1.cPLam; } });
|
|
28
|
+
Object.defineProperty(exports, "cPApp", { enumerable: true, get: function () { return types_1.cPApp; } });
|
|
29
|
+
Object.defineProperty(exports, "cGlue", { enumerable: true, get: function () { return types_1.cGlue; } });
|
|
30
|
+
Object.defineProperty(exports, "cVar", { enumerable: true, get: function () { return types_1.cVar; } });
|
|
31
|
+
Object.defineProperty(exports, "cUniverse", { enumerable: true, get: function () { return types_1.cUniverse; } });
|
|
32
|
+
Object.defineProperty(exports, "cPi", { enumerable: true, get: function () { return types_1.cPi; } });
|
|
33
|
+
Object.defineProperty(exports, "cLam", { enumerable: true, get: function () { return types_1.cLam; } });
|
|
34
|
+
Object.defineProperty(exports, "cApp", { enumerable: true, get: function () { return types_1.cApp; } });
|
|
35
|
+
Object.defineProperty(exports, "cArrow", { enumerable: true, get: function () { return types_1.cArrow; } });
|
|
36
|
+
Object.defineProperty(exports, "isIntervalExpr", { enumerable: true, get: function () { return types_1.isIntervalExpr; } });
|
|
37
|
+
Object.defineProperty(exports, "freeVarsCubical", { enumerable: true, get: function () { return types_1.freeVarsCubical; } });
|
|
38
|
+
Object.defineProperty(exports, "occursFreeCubical", { enumerable: true, get: function () { return types_1.occursFreeCubical; } });
|
|
39
|
+
Object.defineProperty(exports, "termToStringCubical", { enumerable: true, get: function () { return types_1.termToStringCubical; } });
|
|
40
|
+
var substitute_1 = require("./substitute");
|
|
41
|
+
Object.defineProperty(exports, "substituteCubical", { enumerable: true, get: function () { return substitute_1.substituteCubical; } });
|
|
42
|
+
var interval_1 = require("./interval");
|
|
43
|
+
Object.defineProperty(exports, "evalInterval", { enumerable: true, get: function () { return interval_1.evalInterval; } });
|
|
44
|
+
Object.defineProperty(exports, "normalizeInterval", { enumerable: true, get: function () { return interval_1.normalizeInterval; } });
|
|
45
|
+
var normalize_1 = require("./normalize");
|
|
46
|
+
Object.defineProperty(exports, "reduceStepCubical", { enumerable: true, get: function () { return normalize_1.reduceStepCubical; } });
|
|
47
|
+
Object.defineProperty(exports, "normalizeCubical", { enumerable: true, get: function () { return normalize_1.normalizeCubical; } });
|
|
48
|
+
Object.defineProperty(exports, "isNormalCubical", { enumerable: true, get: function () { return normalize_1.isNormalCubical; } });
|
|
49
|
+
var equality_1 = require("./equality");
|
|
50
|
+
Object.defineProperty(exports, "alphaEqCubical", { enumerable: true, get: function () { return equality_1.alphaEqCubical; } });
|
|
51
|
+
Object.defineProperty(exports, "alphaBetaEqCubical", { enumerable: true, get: function () { return equality_1.alphaBetaEqCubical; } });
|
|
52
|
+
var infer_1 = require("./infer");
|
|
53
|
+
Object.defineProperty(exports, "inferType", { enumerable: true, get: function () { return infer_1.inferType; } });
|
|
54
|
+
Object.defineProperty(exports, "checkType", { enumerable: true, get: function () { return infer_1.checkType; } });
|
|
55
|
+
Object.defineProperty(exports, "isInferErrorCubical", { enumerable: true, get: function () { return infer_1.isInferErrorCubical; } });
|
|
56
|
+
Object.defineProperty(exports, "makeContext", { enumerable: true, get: function () { return infer_1.makeContext; } });
|
|
57
|
+
Object.defineProperty(exports, "intervalType", { enumerable: true, get: function () { return infer_1.intervalType; } });
|
|
58
|
+
var path_algebra_1 = require("./path-algebra");
|
|
59
|
+
Object.defineProperty(exports, "reflPath", { enumerable: true, get: function () { return path_algebra_1.reflPath; } });
|
|
60
|
+
Object.defineProperty(exports, "pathInverse", { enumerable: true, get: function () { return path_algebra_1.pathInverse; } });
|
|
61
|
+
Object.defineProperty(exports, "pathCompose", { enumerable: true, get: function () { return path_algebra_1.pathCompose; } });
|
|
62
|
+
Object.defineProperty(exports, "glue", { enumerable: true, get: function () { return path_algebra_1.glue; } });
|
|
63
|
+
// Alias sin sufijo para uso ergonómico
|
|
64
|
+
var normalize_2 = require("./normalize");
|
|
65
|
+
Object.defineProperty(exports, "normalize", { enumerable: true, get: function () { return normalize_2.normalizeCubical; } });
|
|
66
|
+
var equality_2 = require("./equality");
|
|
67
|
+
Object.defineProperty(exports, "alphaBetaEq", { enumerable: true, get: function () { return equality_2.alphaBetaEqCubical; } });
|
|
68
|
+
Object.defineProperty(exports, "alphaEq", { enumerable: true, get: function () { return equality_2.alphaEqCubical; } });
|
|
69
|
+
var types_2 = require("./types");
|
|
70
|
+
Object.defineProperty(exports, "termToString", { enumerable: true, get: function () { return types_2.termToStringCubical; } });
|
|
71
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/type-theory/cubical/index.ts"],"names":[],"mappings":";AAAA,+DAA+D;AAC/D,kDAAkD;AAClD,+DAA+D;AAC/D,EAAE;AACF,qBAAqB;AACrB,yDAAyD;AACzD,iDAAiD;AACjD,oDAAoD;AACpD,gDAAgD;AAChD,6DAA6D;AAC7D,EAAE;AACF,oEAAoE;AACpE,oEAAoE;AACpE,qEAAqE;AACrE,gDAAgD;;;AAGhD,iCAqBiB;AApBf,4FAAA,GAAG,OAAA;AACH,4FAAA,GAAG,OAAA;AACH,8FAAA,KAAK,OAAA;AACL,8FAAA,KAAK,OAAA;AACL,8FAAA,KAAK,OAAA;AACL,8FAAA,KAAK,OAAA;AACL,+FAAA,MAAM,OAAA;AACN,8FAAA,KAAK,OAAA;AACL,8FAAA,KAAK,OAAA;AACL,8FAAA,KAAK,OAAA;AACL,6FAAA,IAAI,OAAA;AACJ,kGAAA,SAAS,OAAA;AACT,4FAAA,GAAG,OAAA;AACH,6FAAA,IAAI,OAAA;AACJ,6FAAA,IAAI,OAAA;AACJ,+FAAA,MAAM,OAAA;AACN,uGAAA,cAAc,OAAA;AACd,wGAAA,eAAe,OAAA;AACf,0GAAA,iBAAiB,OAAA;AACjB,4GAAA,mBAAmB,OAAA;AAGrB,2CAAiD;AAAxC,+GAAA,iBAAiB,OAAA;AAC1B,uCAA6D;AAApD,wGAAA,YAAY,OAAA;AAAE,6GAAA,iBAAiB,OAAA;AAExC,yCAAmF;AAA1E,8GAAA,iBAAiB,OAAA;AAAE,6GAAA,gBAAgB,OAAA;AAAE,4GAAA,eAAe,OAAA;AAC7D,uCAAgE;AAAvD,0GAAA,cAAc,OAAA;AAAE,8GAAA,kBAAkB,OAAA;AAC3C,iCAA+F;AAAtF,kGAAA,SAAS,OAAA;AAAE,kGAAA,SAAS,OAAA;AAAE,4GAAA,mBAAmB,OAAA;AAAE,oGAAA,WAAW,OAAA;AAAE,qGAAA,YAAY,OAAA;AAE7E,+CAA0E;AAAjE,wGAAA,QAAQ,OAAA;AAAE,2GAAA,WAAW,OAAA;AAAE,2GAAA,WAAW,OAAA;AAAE,oGAAA,IAAI,OAAA;AAEjD,uCAAuC;AACvC,yCAA4D;AAAnD,sGAAA,gBAAgB,OAAa;AACtC,uCAA0F;AAAjF,uGAAA,kBAAkB,OAAe;AAAE,mGAAA,cAAc,OAAW;AACrE,iCAA8D;AAArD,qGAAA,mBAAmB,OAAgB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { CubicalTerm } from './types';
|
|
2
|
+
import { cArrow } from './types';
|
|
3
|
+
export interface CubicalContext {
|
|
4
|
+
termVars: Map<string, CubicalTerm>;
|
|
5
|
+
intervalVars: Set<string>;
|
|
6
|
+
}
|
|
7
|
+
export type InferResultCubical = CubicalTerm | {
|
|
8
|
+
error: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const intervalType: () => CubicalTerm;
|
|
11
|
+
export declare function isInferErrorCubical(r: InferResultCubical): r is {
|
|
12
|
+
error: string;
|
|
13
|
+
};
|
|
14
|
+
export declare function makeContext(): CubicalContext;
|
|
15
|
+
export declare function inferType(term: CubicalTerm, ctx?: CubicalContext): InferResultCubical;
|
|
16
|
+
export declare function checkType(term: CubicalTerm, expected: CubicalTerm, ctx?: CubicalContext): boolean;
|
|
17
|
+
export { cArrow };
|
|
18
|
+
//# sourceMappingURL=infer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"infer.d.ts","sourceRoot":"","sources":["../../../src/type-theory/cubical/infer.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAA0D,MAAM,EAAS,MAAM,SAAS,CAAC;AAKhG,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACnC,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAC3B;AAED,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjE,eAAO,MAAM,YAAY,QAAO,WAA+C,CAAC;AAEhF,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,kBAAkB,GAAG,CAAC,IAAI;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAEjF;AAED,wBAAgB,WAAW,IAAI,cAAc,CAE5C;AAoBD,wBAAgB,SAAS,CACvB,IAAI,EAAE,WAAW,EACjB,GAAG,GAAE,cAA8B,GAClC,kBAAkB,CAgJpB;AAgBD,wBAAgB,SAAS,CACvB,IAAI,EAAE,WAAW,EACjB,QAAQ,EAAE,WAAW,EACrB,GAAG,GAAE,cAA8B,GAClC,OAAO,CAIT;AAGD,OAAO,EAAE,MAAM,EAAE,CAAC"}
|