@stevenvo780/st-lang 4.9.0 → 4.11.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/natural-deduction-nk/formula.d.ts +18 -0
- package/dist/logic/profiles/natural-deduction-nk/formula.d.ts.map +1 -0
- package/dist/logic/profiles/natural-deduction-nk/formula.js +102 -0
- package/dist/logic/profiles/natural-deduction-nk/formula.js.map +1 -0
- package/dist/logic/profiles/natural-deduction-nk/index.d.ts +5 -0
- package/dist/logic/profiles/natural-deduction-nk/index.d.ts.map +1 -0
- package/dist/logic/profiles/natural-deduction-nk/index.js +28 -0
- package/dist/logic/profiles/natural-deduction-nk/index.js.map +1 -0
- package/dist/logic/profiles/natural-deduction-nk/prover.d.ts +49 -0
- package/dist/logic/profiles/natural-deduction-nk/prover.d.ts.map +1 -0
- package/dist/logic/profiles/natural-deduction-nk/prover.js +557 -0
- package/dist/logic/profiles/natural-deduction-nk/prover.js.map +1 -0
- package/dist/logic/profiles/natural-deduction-nk/types.d.ts +48 -0
- package/dist/logic/profiles/natural-deduction-nk/types.d.ts.map +1 -0
- package/dist/logic/profiles/natural-deduction-nk/types.js +35 -0
- package/dist/logic/profiles/natural-deduction-nk/types.js.map +1 -0
- package/dist/proof-systems/distributed-exchange/index.d.ts +101 -0
- package/dist/proof-systems/distributed-exchange/index.d.ts.map +1 -0
- package/dist/proof-systems/distributed-exchange/index.js +408 -0
- package/dist/proof-systems/distributed-exchange/index.js.map +1 -0
- package/dist/reasoning/automata/dfa.d.ts +17 -0
- package/dist/reasoning/automata/dfa.d.ts.map +1 -0
- package/dist/reasoning/automata/dfa.js +276 -0
- package/dist/reasoning/automata/dfa.js.map +1 -0
- package/dist/reasoning/automata/index.d.ts +8 -0
- package/dist/reasoning/automata/index.d.ts.map +1 -0
- package/dist/reasoning/automata/index.js +64 -0
- package/dist/reasoning/automata/index.js.map +1 -0
- package/dist/reasoning/automata/languages.d.ts +10 -0
- package/dist/reasoning/automata/languages.d.ts.map +1 -0
- package/dist/reasoning/automata/languages.js +78 -0
- package/dist/reasoning/automata/languages.js.map +1 -0
- package/dist/reasoning/automata/nfa.d.ts +8 -0
- package/dist/reasoning/automata/nfa.d.ts.map +1 -0
- package/dist/reasoning/automata/nfa.js +122 -0
- package/dist/reasoning/automata/nfa.js.map +1 -0
- package/dist/reasoning/automata/pda.d.ts +10 -0
- package/dist/reasoning/automata/pda.d.ts.map +1 -0
- package/dist/reasoning/automata/pda.js +169 -0
- package/dist/reasoning/automata/pda.js.map +1 -0
- package/dist/reasoning/automata/regex.d.ts +6 -0
- package/dist/reasoning/automata/regex.d.ts.map +1 -0
- package/dist/reasoning/automata/regex.js +259 -0
- package/dist/reasoning/automata/regex.js.map +1 -0
- package/dist/reasoning/automata/types.d.ts +69 -0
- package/dist/reasoning/automata/types.d.ts.map +1 -0
- package/dist/reasoning/automata/types.js +29 -0
- package/dist/reasoning/automata/types.js.map +1 -0
- package/dist/reasoning/computability/index.d.ts +239 -0
- package/dist/reasoning/computability/index.d.ts.map +1 -0
- package/dist/reasoning/computability/index.js +851 -0
- package/dist/reasoning/computability/index.js.map +1 -0
- package/dist/reasoning/graph-theory/index.d.ts +63 -0
- package/dist/reasoning/graph-theory/index.d.ts.map +1 -0
- package/dist/reasoning/graph-theory/index.js +1043 -0
- package/dist/reasoning/graph-theory/index.js.map +1 -0
- package/dist/reasoning/group-presentation/cayley.d.ts +8 -0
- package/dist/reasoning/group-presentation/cayley.d.ts.map +1 -0
- package/dist/reasoning/group-presentation/cayley.js +38 -0
- package/dist/reasoning/group-presentation/cayley.js.map +1 -0
- package/dist/reasoning/group-presentation/index.d.ts +8 -0
- package/dist/reasoning/group-presentation/index.d.ts.map +1 -0
- package/dist/reasoning/group-presentation/index.js +36 -0
- package/dist/reasoning/group-presentation/index.js.map +1 -0
- package/dist/reasoning/group-presentation/standard-groups.d.ts +6 -0
- package/dist/reasoning/group-presentation/standard-groups.d.ts.map +1 -0
- package/dist/reasoning/group-presentation/standard-groups.js +93 -0
- package/dist/reasoning/group-presentation/standard-groups.js.map +1 -0
- package/dist/reasoning/group-presentation/todd-coxeter.d.ts +10 -0
- package/dist/reasoning/group-presentation/todd-coxeter.d.ts.map +1 -0
- package/dist/reasoning/group-presentation/todd-coxeter.js +362 -0
- package/dist/reasoning/group-presentation/todd-coxeter.js.map +1 -0
- package/dist/reasoning/group-presentation/types.d.ts +7 -0
- package/dist/reasoning/group-presentation/types.d.ts.map +1 -0
- package/dist/reasoning/group-presentation/types.js +22 -0
- package/dist/reasoning/group-presentation/types.js.map +1 -0
- package/dist/reasoning/group-presentation/words.d.ts +10 -0
- package/dist/reasoning/group-presentation/words.d.ts.map +1 -0
- package/dist/reasoning/group-presentation/words.js +109 -0
- package/dist/reasoning/group-presentation/words.js.map +1 -0
- package/dist/reasoning/number-theory/crt.d.ts +9 -0
- package/dist/reasoning/number-theory/crt.d.ts.map +1 -0
- package/dist/reasoning/number-theory/crt.js +39 -0
- package/dist/reasoning/number-theory/crt.js.map +1 -0
- package/dist/reasoning/number-theory/diophantine.d.ts +10 -0
- package/dist/reasoning/number-theory/diophantine.d.ts.map +1 -0
- package/dist/reasoning/number-theory/diophantine.js +87 -0
- package/dist/reasoning/number-theory/diophantine.js.map +1 -0
- package/dist/reasoning/number-theory/factorization.d.ts +12 -0
- package/dist/reasoning/number-theory/factorization.d.ts.map +1 -0
- package/dist/reasoning/number-theory/factorization.js +136 -0
- package/dist/reasoning/number-theory/factorization.js.map +1 -0
- package/dist/reasoning/number-theory/gcd.d.ts +8 -0
- package/dist/reasoning/number-theory/gcd.d.ts.map +1 -0
- package/dist/reasoning/number-theory/gcd.js +51 -0
- package/dist/reasoning/number-theory/gcd.js.map +1 -0
- package/dist/reasoning/number-theory/index.d.ts +9 -0
- package/dist/reasoning/number-theory/index.d.ts.map +1 -0
- package/dist/reasoning/number-theory/index.js +46 -0
- package/dist/reasoning/number-theory/index.js.map +1 -0
- package/dist/reasoning/number-theory/modular.d.ts +6 -0
- package/dist/reasoning/number-theory/modular.d.ts.map +1 -0
- package/dist/reasoning/number-theory/modular.js +75 -0
- package/dist/reasoning/number-theory/modular.js.map +1 -0
- package/dist/reasoning/number-theory/primality.d.ts +6 -0
- package/dist/reasoning/number-theory/primality.d.ts.map +1 -0
- package/dist/reasoning/number-theory/primality.js +144 -0
- package/dist/reasoning/number-theory/primality.js.map +1 -0
- package/dist/reasoning/number-theory/symbols.d.ts +3 -0
- package/dist/reasoning/number-theory/symbols.d.ts.map +1 -0
- package/dist/reasoning/number-theory/symbols.js +57 -0
- package/dist/reasoning/number-theory/symbols.js.map +1 -0
- package/dist/reasoning/real-analysis/index.d.ts +127 -0
- package/dist/reasoning/real-analysis/index.d.ts.map +1 -0
- package/dist/reasoning/real-analysis/index.js +638 -0
- package/dist/reasoning/real-analysis/index.js.map +1 -0
- package/dist/reasoning/topology/index.d.ts +41 -0
- package/dist/reasoning/topology/index.d.ts.map +1 -0
- package/dist/reasoning/topology/index.js +739 -0
- package/dist/reasoning/topology/index.js.map +1 -0
- package/dist/tests/logic/profiles/natural-deduction-nk/nk.test.d.ts +2 -0
- package/dist/tests/logic/profiles/natural-deduction-nk/nk.test.d.ts.map +1 -0
- package/dist/tests/logic/profiles/natural-deduction-nk/nk.test.js +288 -0
- package/dist/tests/logic/profiles/natural-deduction-nk/nk.test.js.map +1 -0
- package/dist/tests/proof-systems/distributed-exchange/distributed-exchange.test.d.ts +2 -0
- package/dist/tests/proof-systems/distributed-exchange/distributed-exchange.test.d.ts.map +1 -0
- package/dist/tests/proof-systems/distributed-exchange/distributed-exchange.test.js +328 -0
- package/dist/tests/proof-systems/distributed-exchange/distributed-exchange.test.js.map +1 -0
- package/dist/tests/reasoning/automata/automata.test.d.ts +2 -0
- package/dist/tests/reasoning/automata/automata.test.d.ts.map +1 -0
- package/dist/tests/reasoning/automata/automata.test.js +310 -0
- package/dist/tests/reasoning/automata/automata.test.js.map +1 -0
- package/dist/tests/reasoning/computability/computability.test.d.ts +2 -0
- package/dist/tests/reasoning/computability/computability.test.d.ts.map +1 -0
- package/dist/tests/reasoning/computability/computability.test.js +246 -0
- package/dist/tests/reasoning/computability/computability.test.js.map +1 -0
- package/dist/tests/reasoning/graph-theory/graph-theory.test.d.ts +2 -0
- package/dist/tests/reasoning/graph-theory/graph-theory.test.d.ts.map +1 -0
- package/dist/tests/reasoning/graph-theory/graph-theory.test.js +363 -0
- package/dist/tests/reasoning/graph-theory/graph-theory.test.js.map +1 -0
- package/dist/tests/reasoning/group-presentation/group-presentation.test.d.ts +2 -0
- package/dist/tests/reasoning/group-presentation/group-presentation.test.d.ts.map +1 -0
- package/dist/tests/reasoning/group-presentation/group-presentation.test.js +229 -0
- package/dist/tests/reasoning/group-presentation/group-presentation.test.js.map +1 -0
- package/dist/tests/reasoning/number-theory/number-theory.test.d.ts +2 -0
- package/dist/tests/reasoning/number-theory/number-theory.test.d.ts.map +1 -0
- package/dist/tests/reasoning/number-theory/number-theory.test.js +170 -0
- package/dist/tests/reasoning/number-theory/number-theory.test.js.map +1 -0
- package/dist/tests/reasoning/real-analysis/real-analysis.test.d.ts +2 -0
- package/dist/tests/reasoning/real-analysis/real-analysis.test.d.ts.map +1 -0
- package/dist/tests/reasoning/real-analysis/real-analysis.test.js +197 -0
- package/dist/tests/reasoning/real-analysis/real-analysis.test.js.map +1 -0
- package/dist/tests/reasoning/topology/topology.test.d.ts +2 -0
- package/dist/tests/reasoning/topology/topology.test.d.ts.map +1 -0
- package/dist/tests/reasoning/topology/topology.test.js +327 -0
- package/dist/tests/reasoning/topology/topology.test.js.map +1 -0
- package/dist/tests/tooling/exporters/coq-v2/coq-v2-exporter.test.d.ts +2 -0
- package/dist/tests/tooling/exporters/coq-v2/coq-v2-exporter.test.d.ts.map +1 -0
- package/dist/tests/tooling/exporters/coq-v2/coq-v2-exporter.test.js +411 -0
- package/dist/tests/tooling/exporters/coq-v2/coq-v2-exporter.test.js.map +1 -0
- package/dist/tests/tooling/exporters/lean4/lean4-exporter.test.d.ts +2 -0
- package/dist/tests/tooling/exporters/lean4/lean4-exporter.test.d.ts.map +1 -0
- package/dist/tests/tooling/exporters/lean4/lean4-exporter.test.js +473 -0
- package/dist/tests/tooling/exporters/lean4/lean4-exporter.test.js.map +1 -0
- package/dist/tests/tooling/lemma-library/lemma-library.test.d.ts +2 -0
- package/dist/tests/tooling/lemma-library/lemma-library.test.d.ts.map +1 -0
- package/dist/tests/tooling/lemma-library/lemma-library.test.js +197 -0
- package/dist/tests/tooling/lemma-library/lemma-library.test.js.map +1 -0
- package/dist/tests/tooling/provenance/ledger.test.d.ts +2 -0
- package/dist/tests/tooling/provenance/ledger.test.d.ts.map +1 -0
- package/dist/tests/tooling/provenance/ledger.test.js +545 -0
- package/dist/tests/tooling/provenance/ledger.test.js.map +1 -0
- package/dist/tooling/exporters/coq-v2/index.d.ts +68 -0
- package/dist/tooling/exporters/coq-v2/index.d.ts.map +1 -0
- package/dist/tooling/exporters/coq-v2/index.js +692 -0
- package/dist/tooling/exporters/coq-v2/index.js.map +1 -0
- package/dist/tooling/exporters/lean4/index.d.ts +47 -0
- package/dist/tooling/exporters/lean4/index.d.ts.map +1 -0
- package/dist/tooling/exporters/lean4/index.js +423 -0
- package/dist/tooling/exporters/lean4/index.js.map +1 -0
- package/dist/tooling/lemma-library/apply.d.ts +9 -0
- package/dist/tooling/lemma-library/apply.d.ts.map +1 -0
- package/dist/tooling/lemma-library/apply.js +94 -0
- package/dist/tooling/lemma-library/apply.js.map +1 -0
- package/dist/tooling/lemma-library/arithmetic.d.ts +3 -0
- package/dist/tooling/lemma-library/arithmetic.d.ts.map +1 -0
- package/dist/tooling/lemma-library/arithmetic.js +176 -0
- package/dist/tooling/lemma-library/arithmetic.js.map +1 -0
- package/dist/tooling/lemma-library/firstorder.d.ts +3 -0
- package/dist/tooling/lemma-library/firstorder.d.ts.map +1 -0
- package/dist/tooling/lemma-library/firstorder.js +136 -0
- package/dist/tooling/lemma-library/firstorder.js.map +1 -0
- package/dist/tooling/lemma-library/index.d.ts +13 -0
- package/dist/tooling/lemma-library/index.d.ts.map +1 -0
- package/dist/tooling/lemma-library/index.js +32 -0
- package/dist/tooling/lemma-library/index.js.map +1 -0
- package/dist/tooling/lemma-library/library.d.ts +34 -0
- package/dist/tooling/lemma-library/library.d.ts.map +1 -0
- package/dist/tooling/lemma-library/library.js +126 -0
- package/dist/tooling/lemma-library/library.js.map +1 -0
- package/dist/tooling/lemma-library/modal.d.ts +3 -0
- package/dist/tooling/lemma-library/modal.d.ts.map +1 -0
- package/dist/tooling/lemma-library/modal.js +138 -0
- package/dist/tooling/lemma-library/modal.js.map +1 -0
- package/dist/tooling/lemma-library/propositional.d.ts +3 -0
- package/dist/tooling/lemma-library/propositional.d.ts.map +1 -0
- package/dist/tooling/lemma-library/propositional.js +265 -0
- package/dist/tooling/lemma-library/propositional.js.map +1 -0
- package/dist/tooling/lemma-library/set-theory.d.ts +3 -0
- package/dist/tooling/lemma-library/set-theory.d.ts.map +1 -0
- package/dist/tooling/lemma-library/set-theory.js +134 -0
- package/dist/tooling/lemma-library/set-theory.js.map +1 -0
- package/dist/tooling/lemma-library/standard.d.ts +3 -0
- package/dist/tooling/lemma-library/standard.d.ts.map +1 -0
- package/dist/tooling/lemma-library/standard.js +27 -0
- package/dist/tooling/lemma-library/standard.js.map +1 -0
- package/dist/tooling/lemma-library/tfidf.d.ts +5 -0
- package/dist/tooling/lemma-library/tfidf.d.ts.map +1 -0
- package/dist/tooling/lemma-library/tfidf.js +100 -0
- package/dist/tooling/lemma-library/tfidf.js.map +1 -0
- package/dist/tooling/lemma-library/tokenize.d.ts +2 -0
- package/dist/tooling/lemma-library/tokenize.d.ts.map +1 -0
- package/dist/tooling/lemma-library/tokenize.js +74 -0
- package/dist/tooling/lemma-library/tokenize.js.map +1 -0
- package/dist/tooling/lemma-library/types.d.ts +53 -0
- package/dist/tooling/lemma-library/types.d.ts.map +1 -0
- package/dist/tooling/lemma-library/types.js +10 -0
- package/dist/tooling/lemma-library/types.js.map +1 -0
- package/dist/tooling/provenance/index.d.ts +3 -0
- package/dist/tooling/provenance/index.d.ts.map +1 -0
- package/dist/tooling/provenance/index.js +16 -0
- package/dist/tooling/provenance/index.js.map +1 -0
- package/dist/tooling/provenance/ledger.d.ts +89 -0
- package/dist/tooling/provenance/ledger.d.ts.map +1 -0
- package/dist/tooling/provenance/ledger.js +439 -0
- package/dist/tooling/provenance/ledger.js.map +1 -0
- package/dist/tooling/provenance/types.d.ts +70 -0
- package/dist/tooling/provenance/types.d.ts.map +1 -0
- package/dist/tooling/provenance/types.js +14 -0
- package/dist/tooling/provenance/types.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ============================================================
|
|
3
|
+
// tryApplyLemma — pattern matching simple goal ↔ lema
|
|
4
|
+
//
|
|
5
|
+
// Heurística: tokeniza el goal y cada lema, busca aquellos cuyo
|
|
6
|
+
// "esqueleto" estructural (símbolos lógicos) sea subsequence del
|
|
7
|
+
// goal, y propone sustituciones de las metavariables (P, Q, R, …,
|
|
8
|
+
// φ, ψ, x, y, z, a, b, c, n, m) al primer no-variable encontrado
|
|
9
|
+
// en posición correspondiente.
|
|
10
|
+
// ============================================================
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.tryApplyLemma = tryApplyLemma;
|
|
13
|
+
const tokenize_1 = require("./tokenize");
|
|
14
|
+
const METAVAR_PATTERN = /^[a-zA-Zφψχ]$/;
|
|
15
|
+
function isMetavar(tok) {
|
|
16
|
+
return METAVAR_PATTERN.test(tok);
|
|
17
|
+
}
|
|
18
|
+
function structuralSkeleton(tokens) {
|
|
19
|
+
return tokens.filter((t) => !isMetavar(t));
|
|
20
|
+
}
|
|
21
|
+
function isSubsequence(needle, haystack) {
|
|
22
|
+
let i = 0;
|
|
23
|
+
for (const h of haystack) {
|
|
24
|
+
if (i < needle.length && h === needle[i])
|
|
25
|
+
i++;
|
|
26
|
+
}
|
|
27
|
+
return i === needle.length;
|
|
28
|
+
}
|
|
29
|
+
function tryUnify(pattern, goal) {
|
|
30
|
+
const subs = new Map();
|
|
31
|
+
let gi = 0;
|
|
32
|
+
for (let pi = 0; pi < pattern.length; pi++) {
|
|
33
|
+
const ptok = pattern[pi];
|
|
34
|
+
if (ptok === undefined)
|
|
35
|
+
return undefined;
|
|
36
|
+
if (isMetavar(ptok)) {
|
|
37
|
+
// captura el siguiente token del goal o un grupo balanceado mínimo
|
|
38
|
+
if (gi >= goal.length)
|
|
39
|
+
return undefined;
|
|
40
|
+
const captured = goal[gi];
|
|
41
|
+
if (captured === undefined)
|
|
42
|
+
return undefined;
|
|
43
|
+
const existing = subs.get(ptok);
|
|
44
|
+
if (existing !== undefined && existing !== captured)
|
|
45
|
+
return undefined;
|
|
46
|
+
subs.set(ptok, captured);
|
|
47
|
+
gi++;
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
// avanza hasta el primer match exacto del símbolo
|
|
51
|
+
while (gi < goal.length && goal[gi] !== ptok)
|
|
52
|
+
gi++;
|
|
53
|
+
if (gi >= goal.length)
|
|
54
|
+
return undefined;
|
|
55
|
+
gi++;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return subs;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Devuelve los lemas de `library` cuyo esqueleto estructural es
|
|
62
|
+
* subsequence del goal. Si se encuentra el más específico (mayor
|
|
63
|
+
* cantidad de tokens estructurales), añade las sustituciones.
|
|
64
|
+
*/
|
|
65
|
+
function tryApplyLemma(goal, library) {
|
|
66
|
+
const goalTokens = (0, tokenize_1.tokenize)(goal);
|
|
67
|
+
const goalSkeleton = structuralSkeleton(goalTokens);
|
|
68
|
+
if (goalSkeleton.length === 0)
|
|
69
|
+
return { applicable: [] };
|
|
70
|
+
const applicable = [];
|
|
71
|
+
for (const lemma of library.all()) {
|
|
72
|
+
const lemmaTokens = (0, tokenize_1.tokenize)(lemma.statement);
|
|
73
|
+
const lemmaSkeleton = structuralSkeleton(lemmaTokens);
|
|
74
|
+
if (lemmaSkeleton.length === 0)
|
|
75
|
+
continue;
|
|
76
|
+
if (isSubsequence(lemmaSkeleton, goalSkeleton)) {
|
|
77
|
+
applicable.push({ lemma, skeleton: lemmaSkeleton });
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
applicable.sort((a, b) => b.skeleton.length - a.skeleton.length);
|
|
81
|
+
let substitutions;
|
|
82
|
+
if (applicable.length > 0) {
|
|
83
|
+
const top = applicable[0];
|
|
84
|
+
if (top !== undefined) {
|
|
85
|
+
const lemmaTokens = (0, tokenize_1.tokenize)(top.lemma.statement);
|
|
86
|
+
substitutions = tryUnify(lemmaTokens, goalTokens);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return {
|
|
90
|
+
applicable: applicable.map((a) => a.lemma),
|
|
91
|
+
substitutions,
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=apply.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply.js","sourceRoot":"","sources":["../../../src/tooling/lemma-library/apply.ts"],"names":[],"mappings":";AAAA,+DAA+D;AAC/D,sDAAsD;AACtD,EAAE;AACF,gEAAgE;AAChE,iEAAiE;AACjE,kEAAkE;AAClE,iEAAiE;AACjE,+BAA+B;AAC/B,+DAA+D;;AAsD/D,sCA8BC;AAhFD,yCAAsC;AAEtC,MAAM,eAAe,GAAG,eAAe,CAAC;AAExC,SAAS,SAAS,CAAC,GAAW;IAC5B,OAAO,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACnC,CAAC;AAED,SAAS,kBAAkB,CAAC,MAAgB;IAC1C,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;AAC7C,CAAC;AAED,SAAS,aAAa,CAAC,MAAgB,EAAE,QAAk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IAAA,mBAAQ,EAAC,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;YAClD,aAAa,GAAG,QAAQ,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;QACpD,CAAC;IACH,CAAC;IAED,OAAO;QACL,UAAU,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;QAC1C,aAAa;KACd,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arithmetic.d.ts","sourceRoot":"","sources":["../../../src/tooling/lemma-library/arithmetic.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,eAAO,MAAM,iBAAiB,EAAE,YAAY,EAuK3C,CAAC"}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ============================================================
|
|
3
|
+
// Lemas curados — Aritmética de Peano (~20)
|
|
4
|
+
// Conmutatividad, asociatividad, distributividad, inducción.
|
|
5
|
+
// ============================================================
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.ARITHMETIC_LEMMAS = void 0;
|
|
8
|
+
exports.ARITHMETIC_LEMMAS = [
|
|
9
|
+
{
|
|
10
|
+
id: 'arith.add-zero-right',
|
|
11
|
+
name: 'Right additive identity',
|
|
12
|
+
statement: '∀n. n + 0 = n',
|
|
13
|
+
domain: 'arithmetic',
|
|
14
|
+
tags: ['peano', 'identity', 'addition', 'naturals'],
|
|
15
|
+
difficulty: 'trivial',
|
|
16
|
+
isAxiom: true,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
id: 'arith.add-zero-left',
|
|
20
|
+
name: 'Left additive identity',
|
|
21
|
+
statement: '∀n. 0 + n = n',
|
|
22
|
+
domain: 'arithmetic',
|
|
23
|
+
tags: ['peano', 'identity', 'addition', 'naturals', 'induction'],
|
|
24
|
+
difficulty: 'easy',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: 'arith.add-succ-right',
|
|
28
|
+
name: 'Successor on the right of +',
|
|
29
|
+
statement: '∀m n. m + S(n) = S(m + n)',
|
|
30
|
+
domain: 'arithmetic',
|
|
31
|
+
tags: ['peano', 'successor', 'addition', 'naturals'],
|
|
32
|
+
difficulty: 'trivial',
|
|
33
|
+
isAxiom: true,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: 'arith.add-succ-left',
|
|
37
|
+
name: 'Successor on the left of +',
|
|
38
|
+
statement: '∀m n. S(m) + n = S(m + n)',
|
|
39
|
+
domain: 'arithmetic',
|
|
40
|
+
tags: ['peano', 'successor', 'addition', 'naturals', 'induction'],
|
|
41
|
+
difficulty: 'easy',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: 'arith.add-commutative',
|
|
45
|
+
name: 'Commutativity of addition',
|
|
46
|
+
statement: '∀m n. m + n = n + m',
|
|
47
|
+
domain: 'arithmetic',
|
|
48
|
+
tags: ['peano', 'commutativity', 'addition', 'naturals', 'induction'],
|
|
49
|
+
difficulty: 'medium',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: 'arith.add-associative',
|
|
53
|
+
name: 'Associativity of addition',
|
|
54
|
+
statement: '∀a b c. (a + b) + c = a + (b + c)',
|
|
55
|
+
domain: 'arithmetic',
|
|
56
|
+
tags: ['peano', 'associativity', 'addition', 'naturals', 'induction'],
|
|
57
|
+
difficulty: 'medium',
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: 'arith.mul-zero-right',
|
|
61
|
+
name: 'Right multiplicative annihilator',
|
|
62
|
+
statement: '∀n. n · 0 = 0',
|
|
63
|
+
domain: 'arithmetic',
|
|
64
|
+
tags: ['peano', 'zero', 'multiplication', 'naturals'],
|
|
65
|
+
difficulty: 'trivial',
|
|
66
|
+
isAxiom: true,
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
id: 'arith.mul-zero-left',
|
|
70
|
+
name: 'Left multiplicative annihilator',
|
|
71
|
+
statement: '∀n. 0 · n = 0',
|
|
72
|
+
domain: 'arithmetic',
|
|
73
|
+
tags: ['peano', 'zero', 'multiplication', 'naturals', 'induction'],
|
|
74
|
+
difficulty: 'easy',
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: 'arith.mul-one-right',
|
|
78
|
+
name: 'Right multiplicative identity',
|
|
79
|
+
statement: '∀n. n · 1 = n',
|
|
80
|
+
domain: 'arithmetic',
|
|
81
|
+
tags: ['peano', 'identity', 'multiplication', 'naturals'],
|
|
82
|
+
difficulty: 'easy',
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
id: 'arith.mul-one-left',
|
|
86
|
+
name: 'Left multiplicative identity',
|
|
87
|
+
statement: '∀n. 1 · n = n',
|
|
88
|
+
domain: 'arithmetic',
|
|
89
|
+
tags: ['peano', 'identity', 'multiplication', 'naturals', 'induction'],
|
|
90
|
+
difficulty: 'easy',
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
id: 'arith.mul-commutative',
|
|
94
|
+
name: 'Commutativity of multiplication',
|
|
95
|
+
statement: '∀m n. m · n = n · m',
|
|
96
|
+
domain: 'arithmetic',
|
|
97
|
+
tags: ['peano', 'commutativity', 'multiplication', 'naturals', 'induction'],
|
|
98
|
+
difficulty: 'medium',
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
id: 'arith.mul-associative',
|
|
102
|
+
name: 'Associativity of multiplication',
|
|
103
|
+
statement: '∀a b c. (a · b) · c = a · (b · c)',
|
|
104
|
+
domain: 'arithmetic',
|
|
105
|
+
tags: ['peano', 'associativity', 'multiplication', 'naturals', 'induction'],
|
|
106
|
+
difficulty: 'medium',
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
id: 'arith.mul-distributes-add',
|
|
110
|
+
name: 'Distributivity of · over +',
|
|
111
|
+
statement: '∀a b c. a · (b + c) = a · b + a · c',
|
|
112
|
+
domain: 'arithmetic',
|
|
113
|
+
tags: ['peano', 'distributivity', 'multiplication', 'addition', 'naturals', 'induction'],
|
|
114
|
+
difficulty: 'medium',
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
id: 'arith.add-cancel-left',
|
|
118
|
+
name: 'Left cancellation of addition',
|
|
119
|
+
statement: '∀a b c. a + b = a + c → b = c',
|
|
120
|
+
domain: 'arithmetic',
|
|
121
|
+
tags: ['peano', 'cancellation', 'addition', 'naturals', 'induction'],
|
|
122
|
+
difficulty: 'medium',
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
id: 'arith.succ-injective',
|
|
126
|
+
name: 'Successor is injective',
|
|
127
|
+
statement: '∀m n. S(m) = S(n) → m = n',
|
|
128
|
+
domain: 'arithmetic',
|
|
129
|
+
tags: ['peano', 'successor', 'injective', 'naturals'],
|
|
130
|
+
difficulty: 'trivial',
|
|
131
|
+
isAxiom: true,
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
id: 'arith.succ-not-zero',
|
|
135
|
+
name: 'Successor never equals zero',
|
|
136
|
+
statement: '∀n. ¬(S(n) = 0)',
|
|
137
|
+
domain: 'arithmetic',
|
|
138
|
+
tags: ['peano', 'successor', 'zero', 'naturals'],
|
|
139
|
+
difficulty: 'trivial',
|
|
140
|
+
isAxiom: true,
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
id: 'arith.induction',
|
|
144
|
+
name: 'Mathematical induction',
|
|
145
|
+
statement: '(φ(0) ∧ ∀n. (φ(n) → φ(S(n)))) → ∀n. φ(n)',
|
|
146
|
+
domain: 'arithmetic',
|
|
147
|
+
tags: ['peano', 'induction', 'naturals', 'schema'],
|
|
148
|
+
difficulty: 'hard',
|
|
149
|
+
isAxiom: true,
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
id: 'arith.le-reflexive',
|
|
153
|
+
name: 'Reflexivity of ≤',
|
|
154
|
+
statement: '∀n. n ≤ n',
|
|
155
|
+
domain: 'arithmetic',
|
|
156
|
+
tags: ['peano', 'order', 'reflexivity', 'naturals'],
|
|
157
|
+
difficulty: 'trivial',
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
id: 'arith.le-transitive',
|
|
161
|
+
name: 'Transitivity of ≤',
|
|
162
|
+
statement: '∀a b c. a ≤ b ∧ b ≤ c → a ≤ c',
|
|
163
|
+
domain: 'arithmetic',
|
|
164
|
+
tags: ['peano', 'order', 'transitivity', 'naturals'],
|
|
165
|
+
difficulty: 'easy',
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
id: 'arith.le-antisymmetric',
|
|
169
|
+
name: 'Antisymmetry of ≤',
|
|
170
|
+
statement: '∀a b. a ≤ b ∧ b ≤ a → a = b',
|
|
171
|
+
domain: 'arithmetic',
|
|
172
|
+
tags: ['peano', 'order', 'antisymmetry', 'naturals'],
|
|
173
|
+
difficulty: 'easy',
|
|
174
|
+
},
|
|
175
|
+
];
|
|
176
|
+
//# sourceMappingURL=arithmetic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arithmetic.js","sourceRoot":"","sources":["../../../src/tooling/lemma-library/arithmetic.ts"],"names":[],"mappings":";AAAA,+DAA+D;AAC/D,4CAA4C;AAC5C,6DAA6D;AAC7D,+DAA+D;;;AAIlD,QAAA,iBAAiB,GAAmB;IAC/C;QACE,EAAE,EAAE,sBAAsB;QAC1B,IAAI,EAAE,yBAAyB;QAC/B,SAAS,EAAE,eAAe;QAC1B,MAAM,EAAE,YAAY;QACpB,IAAI,EAAE,CAAC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC;QACnD,UAAU,EAAE,SAAS;QACrB,OAAO,EAAE,IAAI;KACd;IACD;QACE,EAAE,EAAE,qBAAqB;QACzB,IAAI,EAAE,wBAAwB;QAC9B,SAAS,EAAE,eAAe;QAC1B,MAAM,EAAE,YAAY;QACpB,IAAI,EAAE,CAAC,OAAO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E,SAAS;KACtB;IACD;QACE,EAAE,EAAE,qBAAqB;QACzB,IAAI,EAAE,mBAAmB;QACzB,SAAS,EAAE,+BAA+B;QAC1C,MAAM,EAAE,YAAY;QACpB,IAAI,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,UAAU,CAAC;QACpD,UAAU,EAAE,MAAM;KACnB;IACD;QACE,EAAE,EAAE,wBAAwB;QAC5B,IAAI,EAAE,mBAAmB;QACzB,SAAS,EAAE,6BAA6B;QACxC,MAAM,EAAE,YAAY;QACpB,IAAI,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,UAAU,CAAC;QACpD,UAAU,EAAE,MAAM;KACnB;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"firstorder.d.ts","sourceRoot":"","sources":["../../../src/tooling/lemma-library/firstorder.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,eAAO,MAAM,iBAAiB,EAAE,YAAY,EA+H3C,CAAC"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ============================================================
|
|
3
|
+
// Lemas curados — Lógica de primer orden (~15)
|
|
4
|
+
// Cuantificadores: introducción, eliminación, dualidades.
|
|
5
|
+
// ============================================================
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.FIRSTORDER_LEMMAS = void 0;
|
|
8
|
+
exports.FIRSTORDER_LEMMAS = [
|
|
9
|
+
{
|
|
10
|
+
id: 'fol.universal-instantiation',
|
|
11
|
+
name: 'Universal instantiation',
|
|
12
|
+
statement: '∀x. φ(x) → φ(t)',
|
|
13
|
+
domain: 'firstorder',
|
|
14
|
+
tags: ['universal', 'instantiation', 'elimination', 'classical', 'intuitionistic'],
|
|
15
|
+
difficulty: 'easy',
|
|
16
|
+
isAxiom: true,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
id: 'fol.existential-introduction',
|
|
20
|
+
name: 'Existential introduction',
|
|
21
|
+
statement: 'φ(t) → ∃x. φ(x)',
|
|
22
|
+
domain: 'firstorder',
|
|
23
|
+
tags: ['existential', 'introduction', 'classical', 'intuitionistic'],
|
|
24
|
+
difficulty: 'easy',
|
|
25
|
+
isAxiom: true,
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: 'fol.generalization',
|
|
29
|
+
name: 'Universal generalization',
|
|
30
|
+
statement: '⊢ φ(x) ⇒ ⊢ ∀x. φ(x)',
|
|
31
|
+
domain: 'firstorder',
|
|
32
|
+
tags: ['universal', 'generalization', 'introduction', 'rule'],
|
|
33
|
+
difficulty: 'easy',
|
|
34
|
+
isAxiom: true,
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
id: 'fol.forall-and',
|
|
38
|
+
name: 'Universal distributes over conjunction',
|
|
39
|
+
statement: '∀x. (φ(x) ∧ ψ(x)) ↔ (∀x. φ(x)) ∧ (∀x. ψ(x))',
|
|
40
|
+
domain: 'firstorder',
|
|
41
|
+
tags: ['universal', 'conjunction', 'distribution'],
|
|
42
|
+
difficulty: 'medium',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
id: 'fol.exists-or',
|
|
46
|
+
name: 'Existential distributes over disjunction',
|
|
47
|
+
statement: '∃x. (φ(x) ∨ ψ(x)) ↔ (∃x. φ(x)) ∨ (∃x. ψ(x))',
|
|
48
|
+
domain: 'firstorder',
|
|
49
|
+
tags: ['existential', 'disjunction', 'distribution'],
|
|
50
|
+
difficulty: 'medium',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
id: 'fol.duality-forall',
|
|
54
|
+
name: 'Quantifier duality (∀)',
|
|
55
|
+
statement: '∀x. φ(x) ↔ ¬∃x. ¬φ(x)',
|
|
56
|
+
domain: 'firstorder',
|
|
57
|
+
tags: ['duality', 'universal', 'existential', 'negation', 'classical'],
|
|
58
|
+
difficulty: 'medium',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
id: 'fol.duality-exists',
|
|
62
|
+
name: 'Quantifier duality (∃)',
|
|
63
|
+
statement: '∃x. φ(x) ↔ ¬∀x. ¬φ(x)',
|
|
64
|
+
domain: 'firstorder',
|
|
65
|
+
tags: ['duality', 'universal', 'existential', 'negation', 'classical'],
|
|
66
|
+
difficulty: 'medium',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
id: 'fol.not-forall',
|
|
70
|
+
name: 'Negation of universal',
|
|
71
|
+
statement: '¬∀x. φ(x) ↔ ∃x. ¬φ(x)',
|
|
72
|
+
domain: 'firstorder',
|
|
73
|
+
tags: ['negation', 'universal', 'existential', 'classical'],
|
|
74
|
+
difficulty: 'medium',
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: 'fol.not-exists',
|
|
78
|
+
name: 'Negation of existential',
|
|
79
|
+
statement: '¬∃x. φ(x) ↔ ∀x. ¬φ(x)',
|
|
80
|
+
domain: 'firstorder',
|
|
81
|
+
tags: ['negation', 'universal', 'existential', 'classical', 'intuitionistic'],
|
|
82
|
+
difficulty: 'medium',
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
id: 'fol.swap-forall',
|
|
86
|
+
name: 'Universal commutes with itself',
|
|
87
|
+
statement: '∀x ∀y. φ(x,y) ↔ ∀y ∀x. φ(x,y)',
|
|
88
|
+
domain: 'firstorder',
|
|
89
|
+
tags: ['commutativity', 'universal'],
|
|
90
|
+
difficulty: 'easy',
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
id: 'fol.swap-exists',
|
|
94
|
+
name: 'Existential commutes with itself',
|
|
95
|
+
statement: '∃x ∃y. φ(x,y) ↔ ∃y ∃x. φ(x,y)',
|
|
96
|
+
domain: 'firstorder',
|
|
97
|
+
tags: ['commutativity', 'existential'],
|
|
98
|
+
difficulty: 'easy',
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
id: 'fol.exists-forall-implies-forall-exists',
|
|
102
|
+
name: '∃∀ → ∀∃',
|
|
103
|
+
statement: '(∃y ∀x. φ(x,y)) → (∀x ∃y. φ(x,y))',
|
|
104
|
+
domain: 'firstorder',
|
|
105
|
+
tags: ['quantifier-order', 'universal', 'existential'],
|
|
106
|
+
difficulty: 'medium',
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
id: 'fol.equality-reflexive',
|
|
110
|
+
name: 'Reflexivity of equality',
|
|
111
|
+
statement: '∀x. x = x',
|
|
112
|
+
domain: 'firstorder',
|
|
113
|
+
tags: ['equality', 'reflexivity'],
|
|
114
|
+
difficulty: 'trivial',
|
|
115
|
+
isAxiom: true,
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
id: 'fol.equality-substitution',
|
|
119
|
+
name: 'Substitution of equals',
|
|
120
|
+
statement: '∀x y. x = y → (φ(x) ↔ φ(y))',
|
|
121
|
+
domain: 'firstorder',
|
|
122
|
+
tags: ['equality', 'substitution', 'leibniz'],
|
|
123
|
+
difficulty: 'easy',
|
|
124
|
+
isAxiom: true,
|
|
125
|
+
references: ['Leibniz, indiscernibility'],
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
id: 'fol.equality-symmetric',
|
|
129
|
+
name: 'Symmetry of equality',
|
|
130
|
+
statement: '∀x y. x = y → y = x',
|
|
131
|
+
domain: 'firstorder',
|
|
132
|
+
tags: ['equality', 'symmetry'],
|
|
133
|
+
difficulty: 'trivial',
|
|
134
|
+
},
|
|
135
|
+
];
|
|
136
|
+
//# sourceMappingURL=firstorder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"firstorder.js","sourceRoot":"","sources":["../../../src/tooling/lemma-library/firstorder.ts"],"names":[],"mappings":";AAAA,+DAA+D;AAC/D,+CAA+C;AAC/C,0DAA0D;AAC1D,+DAA+D;;;AAIlD,QAAA,iBAAiB,GAAmB;IAC/C;QACE,EAAE,EAAE,6BAA6B;QACjC,IAAI,EAAE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AkB,EAAE,WAAW,EAAE,aAAa,CAAC;QACtD,UAAU,EAAE,QAAQ;KACrB;IACD;QACE,EAAE,EAAE,wBAAwB;QAC5B,IAAI,EAAE,yBAAyB;QAC/B,SAAS,EAAE,WAAW;QACtB,MAAM,EAAE,YAAY;QACpB,IAAI,EAAE,CAAC,UAAU,EAAE,aAAa,CAAC;QACjC,UAAU,EAAE,SAAS;QACrB,OAAO,EAAE,IAAI;KACd;IACD;QACE,EAAE,EAAE,2BAA2B;QAC/B,IAAI,EAAE,wBAAwB;QAC9B,SAAS,EAAE,6BAA6B;QACxC,MAAM,EAAE,YAAY;QACpB,IAAI,EAAE,CAAC,UAAU,EAAE,cAAc,EAAE,SAAS,CAAC;QAC7C,UAAU,EAAE,MAAM;QAClB,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,CAAC,2BAA2B,CAAC;KAC1C;IACD;QACE,EAAE,EAAE,wBAAwB;QAC5B,IAAI,EAAE,sBAAsB;QAC5B,SAAS,EAAE,qBAAqB;QAChC,MAAM,EAAE,YAAY;QACpB,IAAI,EAAE,CAAC,UAAU,EAAE,UAAU,CAAC;QAC9B,UAAU,EAAE,SAAS;KACtB;CACF,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type { CuratedLemma, LemmaDomain, LemmaDifficulty, LemmaApplicationResult, SemanticSearchHit, TfIdfDocument, TfIdfIndex, } from './types';
|
|
2
|
+
export { LemmaLibrary } from './library';
|
|
3
|
+
export type { SearchOptions } from './library';
|
|
4
|
+
export { buildIndex, semanticSearch } from './tfidf';
|
|
5
|
+
export { tryApplyLemma } from './apply';
|
|
6
|
+
export { tokenize } from './tokenize';
|
|
7
|
+
export { PROPOSITIONAL_LEMMAS } from './propositional';
|
|
8
|
+
export { ARITHMETIC_LEMMAS } from './arithmetic';
|
|
9
|
+
export { SET_THEORY_LEMMAS } from './set-theory';
|
|
10
|
+
export { MODAL_LEMMAS } from './modal';
|
|
11
|
+
export { FIRSTORDER_LEMMAS } from './firstorder';
|
|
12
|
+
export { standardLibrary } from './standard';
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tooling/lemma-library/index.ts"],"names":[],"mappings":"AAQA,YAAY,EACV,YAAY,EACZ,WAAW,EACX,eAAe,EACf,sBAAsB,EACtB,iBAAiB,EACjB,aAAa,EACb,UAAU,GACX,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,YAAY,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ============================================================
|
|
3
|
+
// ST Lemma Library — entrypoint público.
|
|
4
|
+
//
|
|
5
|
+
// Biblioteca curada de lemas pre-probados (proposicional, primer
|
|
6
|
+
// orden, modal, aritmética, conjuntos) + búsqueda TF-IDF + intento
|
|
7
|
+
// de aplicación automática contra un goal.
|
|
8
|
+
// ============================================================
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.standardLibrary = exports.FIRSTORDER_LEMMAS = exports.MODAL_LEMMAS = exports.SET_THEORY_LEMMAS = exports.ARITHMETIC_LEMMAS = exports.PROPOSITIONAL_LEMMAS = exports.tokenize = exports.tryApplyLemma = exports.semanticSearch = exports.buildIndex = exports.LemmaLibrary = void 0;
|
|
11
|
+
var library_1 = require("./library");
|
|
12
|
+
Object.defineProperty(exports, "LemmaLibrary", { enumerable: true, get: function () { return library_1.LemmaLibrary; } });
|
|
13
|
+
var tfidf_1 = require("./tfidf");
|
|
14
|
+
Object.defineProperty(exports, "buildIndex", { enumerable: true, get: function () { return tfidf_1.buildIndex; } });
|
|
15
|
+
Object.defineProperty(exports, "semanticSearch", { enumerable: true, get: function () { return tfidf_1.semanticSearch; } });
|
|
16
|
+
var apply_1 = require("./apply");
|
|
17
|
+
Object.defineProperty(exports, "tryApplyLemma", { enumerable: true, get: function () { return apply_1.tryApplyLemma; } });
|
|
18
|
+
var tokenize_1 = require("./tokenize");
|
|
19
|
+
Object.defineProperty(exports, "tokenize", { enumerable: true, get: function () { return tokenize_1.tokenize; } });
|
|
20
|
+
var propositional_1 = require("./propositional");
|
|
21
|
+
Object.defineProperty(exports, "PROPOSITIONAL_LEMMAS", { enumerable: true, get: function () { return propositional_1.PROPOSITIONAL_LEMMAS; } });
|
|
22
|
+
var arithmetic_1 = require("./arithmetic");
|
|
23
|
+
Object.defineProperty(exports, "ARITHMETIC_LEMMAS", { enumerable: true, get: function () { return arithmetic_1.ARITHMETIC_LEMMAS; } });
|
|
24
|
+
var set_theory_1 = require("./set-theory");
|
|
25
|
+
Object.defineProperty(exports, "SET_THEORY_LEMMAS", { enumerable: true, get: function () { return set_theory_1.SET_THEORY_LEMMAS; } });
|
|
26
|
+
var modal_1 = require("./modal");
|
|
27
|
+
Object.defineProperty(exports, "MODAL_LEMMAS", { enumerable: true, get: function () { return modal_1.MODAL_LEMMAS; } });
|
|
28
|
+
var firstorder_1 = require("./firstorder");
|
|
29
|
+
Object.defineProperty(exports, "FIRSTORDER_LEMMAS", { enumerable: true, get: function () { return firstorder_1.FIRSTORDER_LEMMAS; } });
|
|
30
|
+
var standard_1 = require("./standard");
|
|
31
|
+
Object.defineProperty(exports, "standardLibrary", { enumerable: true, get: function () { return standard_1.standardLibrary; } });
|
|
32
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tooling/lemma-library/index.ts"],"names":[],"mappings":";AAAA,+DAA+D;AAC/D,yCAAyC;AACzC,EAAE;AACF,iEAAiE;AACjE,mEAAmE;AACnE,2CAA2C;AAC3C,+DAA+D;;;AAY/D,qCAAyC;AAAhC,uGAAA,YAAY,OAAA;AAGrB,iCAAqD;AAA5C,mGAAA,UAAU,OAAA;AAAE,uGAAA,cAAc,OAAA;AACnC,iCAAwC;AAA/B,sGAAA,aAAa,OAAA;AACtB,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AAEjB,iDAAuD;AAA9C,qHAAA,oBAAoB,OAAA;AAC7B,2CAAiD;AAAxC,+GAAA,iBAAiB,OAAA;AAC1B,2CAAiD;AAAxC,+GAAA,iBAAiB,OAAA;AAC1B,iCAAuC;AAA9B,qGAAA,YAAY,OAAA;AACrB,2CAAiD;AAAxC,+GAAA,iBAAiB,OAAA;AAE1B,uCAA6C;AAApC,2GAAA,eAAe,OAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { CuratedLemma, LemmaDifficulty } from './types';
|
|
2
|
+
export interface SearchOptions {
|
|
3
|
+
domain?: string;
|
|
4
|
+
limit?: number;
|
|
5
|
+
}
|
|
6
|
+
export declare class LemmaLibrary {
|
|
7
|
+
private byId;
|
|
8
|
+
private byDomainIndex;
|
|
9
|
+
private byTagIndex;
|
|
10
|
+
private byDifficultyIndex;
|
|
11
|
+
add(lemma: CuratedLemma): void;
|
|
12
|
+
get(id: string): CuratedLemma | undefined;
|
|
13
|
+
byDomain(domain: string): CuratedLemma[];
|
|
14
|
+
byTag(tag: string): CuratedLemma[];
|
|
15
|
+
byDifficulty(d: LemmaDifficulty): CuratedLemma[];
|
|
16
|
+
all(): CuratedLemma[];
|
|
17
|
+
size(): number;
|
|
18
|
+
/**
|
|
19
|
+
* Búsqueda por palabra clave: tokeniza la query, asigna score a
|
|
20
|
+
* cada lema según matches en name (peso 3), tags (peso 2) y
|
|
21
|
+
* statement (peso 1). Si `opts.domain` está, filtra antes.
|
|
22
|
+
* Devuelve los top `opts.limit` (default 20).
|
|
23
|
+
*/
|
|
24
|
+
search(query: string, opts?: SearchOptions): CuratedLemma[];
|
|
25
|
+
/**
|
|
26
|
+
* Recupera lemas similares al dado, ranqueados por overlap de
|
|
27
|
+
* tokens en statement (peso 2) + tags (peso 1). Excluye al propio
|
|
28
|
+
* lema. Default k = 5.
|
|
29
|
+
*/
|
|
30
|
+
similar(lemma: CuratedLemma, k?: number): CuratedLemma[];
|
|
31
|
+
private indexSet;
|
|
32
|
+
private resolve;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=library.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"library.d.ts","sourceRoot":"","sources":["../../../src/tooling/lemma-library/library.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAG7D,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,qBAAa,YAAY;IACvB,OAAO,CAAC,IAAI,CAAwC;IACpD,OAAO,CAAC,aAAa,CAAuC;IAC5D,OAAO,CAAC,UAAU,CAAuC;IACzD,OAAO,CAAC,iBAAiB,CAAgD;IAEzE,GAAG,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI;IAY9B,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS;IAIzC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,EAAE;IAIxC,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,EAAE;IAIlC,YAAY,CAAC,CAAC,EAAE,eAAe,GAAG,YAAY,EAAE;IAIhD,GAAG,IAAI,YAAY,EAAE;IAIrB,IAAI,IAAI,MAAM;IAId;;;;;OAKG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,GAAE,aAAkB,GAAG,YAAY,EAAE;IAsB/D;;;;OAIG;IACH,OAAO,CAAC,KAAK,EAAE,YAAY,EAAE,CAAC,SAAI,GAAG,YAAY,EAAE;IAoBnD,OAAO,CAAC,QAAQ;IAShB,OAAO,CAAC,OAAO;CAShB"}
|