@hotdocx/endash-kernel 0.1.0-preview.0 → 0.1.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/LICENSE +9 -1
- package/README.md +24 -2
- package/bin/endash-cli.cjs +4 -0
- package/bin/endash-mcp.cjs +7 -0
- package/browser.d.ts +44 -0
- package/endash-browser.js +698 -0
- package/index.cjs +704 -14
- package/index.d.ts +19 -11
- package/index.mjs +704 -14
- package/node.cjs +116606 -0
- package/node.d.ts +8 -0
- package/node.mjs +53 -0
- package/package.json +51 -7
- package/types/ast.d.ts +964 -0
- package/types/book/book_compiler.d.ts +57 -0
- package/types/book/html_renderer.d.ts +27 -0
- package/types/book/literate_en.d.ts +40 -0
- package/types/book/schema.d.ts +279 -0
- package/types/browser.d.ts +44 -0
- package/types/builders.d.ts +191 -0
- package/types/cache/core_snapshot.d.ts +259 -0
- package/types/cas/bar_hochschild.d.ts +106 -0
- package/types/cas/cotangent_deformation.d.ts +100 -0
- package/types/cas/cyclic_homology.d.ts +100 -0
- package/types/cas/derham_hkr.d.ts +117 -0
- package/types/cas/ext_algebra.d.ts +112 -0
- package/types/cas/groebner_syzygy.d.ts +43 -0
- package/types/cas/hilbert_proj_ag.d.ts +97 -0
- package/types/cas/hnf_snf.d.ts +49 -0
- package/types/cas/lefschetz_weil.d.ts +114 -0
- package/types/cas/localization_cech.d.ts +201 -0
- package/types/cas/matrix.d.ts +45 -0
- package/types/cas/modules_complexes.d.ts +141 -0
- package/types/cas/perm_coset_cgt.d.ts +166 -0
- package/types/cas/poly.d.ts +66 -0
- package/types/cas/reify_proofs.d.ts +104 -0
- package/types/cas/resolutions_spectral_seq.d.ts +193 -0
- package/types/cas/rings.d.ts +70 -0
- package/types/cas/smith_resultant_gauss.d.ts +164 -0
- package/types/cas/theta_stepanov.d.ts +182 -0
- package/types/check.d.ts +65 -0
- package/types/cli/endash_cli.d.ts +19 -0
- package/types/context.d.ts +110 -0
- package/types/duality.d.ts +76 -0
- package/types/elab/elab_ast.d.ts +274 -0
- package/types/elab/elaborate.d.ts +106 -0
- package/types/elab/env.d.ts +170 -0
- package/types/elab/match.d.ts +123 -0
- package/types/elab/pretty.d.ts +14 -0
- package/types/elab/structure.d.ts +46 -0
- package/types/elab/tactics.d.ts +238 -0
- package/types/elab/typeclass.d.ts +31 -0
- package/types/elab/unify.d.ts +166 -0
- package/types/eval.d.ts +28 -0
- package/types/index.d.ts +98 -0
- package/types/kernel_ops.d.ts +196 -0
- package/types/mcp/endash_mcp_server.d.ts +63 -0
- package/types/module/comparator.d.ts +86 -0
- package/types/module/desugar.d.ts +94 -0
- package/types/module/goal_inspector.d.ts +104 -0
- package/types/module/loader.d.ts +105 -0
- package/types/module/node_fs_provider.d.ts +26 -0
- package/types/module/package_builder.d.ts +83 -0
- package/types/module/proof_graph.d.ts +80 -0
- package/types/module/quasiquote.d.ts +37 -0
- package/types/module/stdlib_fresh_builders.d.ts +10 -0
- package/types/module/stdlib_tactic_hooks.d.ts +20 -0
- package/types/parser/lexer.d.ts +12 -0
- package/types/parser/parser.d.ts +78 -0
- package/types/parser/pratt.d.ts +17 -0
- package/types/parser/span.d.ts +26 -0
- package/types/parser/surface_ast.d.ts +501 -0
- package/types/stdlib_types.d.ts +113 -0
- package/types/value.d.ts +942 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parameterized `structure` and `class` Elaborator Macros for `endash`.
|
|
3
|
+
*
|
|
4
|
+
* Compiles non-recursive records and typeclasses (including `extends` parent
|
|
5
|
+
* subobjects and dependent field types) directly to `SigmaGrpd`, `Unit`, and
|
|
6
|
+
* `GlobalEnv` `def`s — requiring ZERO new constructors in the trusted kernel.
|
|
7
|
+
*
|
|
8
|
+
* Nominal Class Tagging:
|
|
9
|
+
* Every `class` (and any `nominal: true` structure) declares an opaque tag
|
|
10
|
+
* constant `C._id : Nat` via `declareTheorem` and prepends a reflexive tag
|
|
11
|
+
* component `_tag : ⟨C._id, p_1, ..., p_m⟩ = ⟨C._id, p_1, ..., p_m⟩` to its
|
|
12
|
+
* Sigma carrier:
|
|
13
|
+
* 1. Nominally distinguishes structurally isomorphic classes (`LT` vs `LE`);
|
|
14
|
+
* 2. Makes class type constructors injective in all parameters during NbE
|
|
15
|
+
* unification (`Functor ?F = Functor List` => `?F = List`);
|
|
16
|
+
* 3. Allows `O(1)` extraction of the head class name from any evaluated `VGrpd`.
|
|
17
|
+
*/
|
|
18
|
+
import { VGrpd } from '../value';
|
|
19
|
+
import { ElabBinder, ElabTerm } from './elab_ast';
|
|
20
|
+
import { ElabEnv, StructureInfo } from './env';
|
|
21
|
+
export interface StructureFieldSpec {
|
|
22
|
+
readonly name: string;
|
|
23
|
+
readonly ty: ElabTerm;
|
|
24
|
+
}
|
|
25
|
+
export interface ParentExtendSpec {
|
|
26
|
+
readonly fieldName?: string;
|
|
27
|
+
readonly className: string;
|
|
28
|
+
readonly ty: ElabTerm;
|
|
29
|
+
}
|
|
30
|
+
export interface DeclareStructureOptions {
|
|
31
|
+
readonly name: string;
|
|
32
|
+
readonly params?: readonly ElabBinder[];
|
|
33
|
+
readonly extends?: readonly ParentExtendSpec[];
|
|
34
|
+
readonly fields: readonly StructureFieldSpec[];
|
|
35
|
+
readonly isClass?: boolean;
|
|
36
|
+
/** Defaults to `true` for classes, `false` for plain structures (`Prod`, `Subtype`). */
|
|
37
|
+
readonly nominal?: boolean;
|
|
38
|
+
readonly ctorName?: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* If `g` is the evaluated `VGrpd` of a nominal `class` / `structure`, extract its
|
|
42
|
+
* exact fully-qualified name in `O(1)` by inspecting its leading `_tag` equation.
|
|
43
|
+
*/
|
|
44
|
+
export declare function extractNominalClassName(rawG: VGrpd): string | undefined;
|
|
45
|
+
export declare function declareStructure(env: ElabEnv, opts: DeclareStructureOptions): StructureInfo;
|
|
46
|
+
export declare function declareClass(env: ElabEnv, opts: Omit<DeclareStructureOptions, 'isClass' | 'nominal'>): StructureInfo;
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Composable Proof-Mode Refiner & Tactics for `endash` (`endash/src/elab/tactics.ts`).
|
|
3
|
+
*
|
|
4
|
+
* Strict Trust Boundary:
|
|
5
|
+
* Every tactic script executes in an untrusted `ProofState` backed by
|
|
6
|
+
* `ElabSession` contextual metavariables and compiles down to a 100%
|
|
7
|
+
* metavariable-free kernel `Term` that is re-verified from scratch by the
|
|
8
|
+
* trusted kernel (`checkTerm` / `declareTheorem`).
|
|
9
|
+
*
|
|
10
|
+
* Supported Tactics (`T.*`):
|
|
11
|
+
* - `intro` / `intros`, `assumption`, `exact`, `refine` (partial term templates
|
|
12
|
+
* with `_` / `?hole` subgoals), `apply`, `have`
|
|
13
|
+
* - `rfl`, `symm`, `trans`, `congrArg`
|
|
14
|
+
* - `split`, `left`, `right`, `exfalso`, `contradiction`, `injection`
|
|
15
|
+
* - `cases` (on `Bool`, `Nat`, `Option`, `Sum`, `Prod`/`Sigma`, `List`, `Empty`,
|
|
16
|
+
* including equation-remembering `cases hEq : expr`)
|
|
17
|
+
* - `induction` (on `Nat` & `List`, supporting `generalizing: [...]`!)
|
|
18
|
+
* - `rw` / `rwSeq` (forward & reverse `eqJ` rewriting in goal or hypotheses)
|
|
19
|
+
* - `simp` / `simpOnly` (fuel-bounded proof-producing `@[simp]` rewriter)
|
|
20
|
+
* - `decide` (NbE evaluation of `[DecidableEq]` / `Decidable P` witnesses)
|
|
21
|
+
*/
|
|
22
|
+
import { Term } from '../ast';
|
|
23
|
+
import { VGrpd, Value } from '../value';
|
|
24
|
+
import { ElabBinder, ElabTerm, Plicity } from './elab_ast';
|
|
25
|
+
import { DefTransparency, ElabDeclInfo, ElabEnv } from './env';
|
|
26
|
+
import { ElabSession, LocalVarEntry } from './unify';
|
|
27
|
+
export interface ProofGoal {
|
|
28
|
+
readonly metaId: number;
|
|
29
|
+
readonly locals: readonly LocalVarEntry[];
|
|
30
|
+
readonly targetTy: VGrpd;
|
|
31
|
+
readonly targetTyTerm?: Term;
|
|
32
|
+
}
|
|
33
|
+
export declare class ProofState {
|
|
34
|
+
readonly session: ElabSession;
|
|
35
|
+
goals: ProofGoal[];
|
|
36
|
+
constructor(session: ElabSession, initialGoals: ProofGoal[]);
|
|
37
|
+
get env(): ElabEnv;
|
|
38
|
+
popCurrentGoal(tacticName: string): ProofGoal;
|
|
39
|
+
solveGoal(goal: ProofGoal, term: Term): void;
|
|
40
|
+
newSubgoal(locals: readonly LocalVarEntry[], targetTy: VGrpd, name?: string, targetTyTerm?: Term): {
|
|
41
|
+
readonly goal: ProofGoal;
|
|
42
|
+
readonly term: Term;
|
|
43
|
+
readonly val: Value;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export type Tactic = (state: ProofState) => void;
|
|
47
|
+
export declare function formatGoal(session: ElabSession, goal: ProofGoal): string;
|
|
48
|
+
export interface ElabTacticTheoremOptions {
|
|
49
|
+
readonly name: string;
|
|
50
|
+
readonly binders?: readonly ElabBinder[];
|
|
51
|
+
readonly ty: ElabTerm;
|
|
52
|
+
readonly proof: Tactic | readonly Tactic[];
|
|
53
|
+
readonly isSimp?: boolean;
|
|
54
|
+
readonly priority?: number;
|
|
55
|
+
readonly asDef?: boolean;
|
|
56
|
+
readonly transparency?: DefTransparency;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Prove a proposition `ty` under leading `binders` using `proof` tactic(s) and
|
|
60
|
+
* register the verified opaque `theorem` in `env`.
|
|
61
|
+
*
|
|
62
|
+
* Just like Lean 4's `theorem foo {α} (xs : List α) : ... := by ...`, all
|
|
63
|
+
* parameters in `binders` are automatically introduced into the initial tactic
|
|
64
|
+
* goal context!
|
|
65
|
+
*/
|
|
66
|
+
export declare function elabTacticTheorem(env: ElabEnv, opts: ElabTacticTheoremOptions): ElabDeclInfo;
|
|
67
|
+
/**
|
|
68
|
+
* Standalone `proveTerm(env, expectedTySurface, tactic)` returning the checked kernel `Term`.
|
|
69
|
+
*/
|
|
70
|
+
export declare function proveTerm(env: ElabEnv, expectedTySurface: ElabTerm, proof: Tactic | readonly Tactic[]): Term;
|
|
71
|
+
export interface CasesOptions {
|
|
72
|
+
readonly eqName?: string;
|
|
73
|
+
readonly false?: Tactic | readonly Tactic[];
|
|
74
|
+
readonly true?: Tactic | readonly Tactic[];
|
|
75
|
+
readonly zero?: Tactic | readonly Tactic[];
|
|
76
|
+
readonly succ?: (predName: string) => Tactic | readonly Tactic[];
|
|
77
|
+
readonly none?: Tactic | readonly Tactic[];
|
|
78
|
+
readonly some?: (valName: string) => Tactic | readonly Tactic[];
|
|
79
|
+
readonly inl?: (valName: string) => Tactic | readonly Tactic[];
|
|
80
|
+
readonly inr?: (valName: string) => Tactic | readonly Tactic[];
|
|
81
|
+
readonly pair?: (fstName: string, sndName: string) => Tactic | readonly Tactic[];
|
|
82
|
+
readonly nil?: Tactic | readonly Tactic[];
|
|
83
|
+
readonly cons?: (headName: string, tailName: string) => Tactic | readonly Tactic[];
|
|
84
|
+
}
|
|
85
|
+
export interface InductionOptions {
|
|
86
|
+
readonly generalizing?: readonly string[];
|
|
87
|
+
readonly zero?: Tactic | readonly Tactic[];
|
|
88
|
+
readonly succ?: (predName: string, ihName: string) => Tactic | readonly Tactic[];
|
|
89
|
+
readonly nil?: Tactic | readonly Tactic[];
|
|
90
|
+
readonly cons?: (headName: string, tailName: string, ihName: string) => Tactic | readonly Tactic[];
|
|
91
|
+
}
|
|
92
|
+
export declare const T: {
|
|
93
|
+
/** Run multiple tactics in sequence. */
|
|
94
|
+
seq: (...tactics: readonly Tactic[]) => Tactic;
|
|
95
|
+
/** Focus the current top goal and require `tac` to solve it completely. */
|
|
96
|
+
focus: (tac: Tactic | readonly Tactic[]) => Tactic;
|
|
97
|
+
/** Introduce one `Pi` binder into the local context. */
|
|
98
|
+
intro: (name?: string, plicity?: Plicity) => Tactic;
|
|
99
|
+
/** Introduce multiple `Pi` binders in order. */
|
|
100
|
+
intros: (...names: readonly string[]) => Tactic;
|
|
101
|
+
/** Solve the goal using an exact matching local hypothesis. */
|
|
102
|
+
assumption: () => Tactic;
|
|
103
|
+
/** Close goal directly with an elaborated term `surface`. */
|
|
104
|
+
exact: (surface: ElabTerm | string) => Tactic;
|
|
105
|
+
/**
|
|
106
|
+
* `refine(template)`: elaborate `template` (which may contain `E.hole()`s!)
|
|
107
|
+
* against the current goal, turning every remaining unsolved non-instance
|
|
108
|
+
* metavariable into a new subgoal in creation order!
|
|
109
|
+
*/
|
|
110
|
+
refine: (template: ElabTerm) => Tactic;
|
|
111
|
+
/**
|
|
112
|
+
* `apply(lemma)`: instantiate `lemma`'s parameters with holes until its
|
|
113
|
+
* codomain unifies with the current goal, turning remaining unsolved
|
|
114
|
+
* non-instance arguments into subgoals!
|
|
115
|
+
*/
|
|
116
|
+
apply: (fnSurface: ElabTerm | string) => Tactic;
|
|
117
|
+
/** Introduce an intermediate lemma `name : tySurface` proved by `subProof`. */
|
|
118
|
+
have: (name: string, tySurface: ElabTerm, subProof: Tactic | readonly Tactic[]) => Tactic;
|
|
119
|
+
/** Close a reflexivity goal `lhs = rhs` when both sides unify in NbE. */
|
|
120
|
+
rfl: () => Tactic;
|
|
121
|
+
/** Replace goal `lhs = rhs` with `rhs = lhs` via `eqSym`. */
|
|
122
|
+
symm: () => Tactic;
|
|
123
|
+
/** Split `x = z` through intermediate `mid` into `x = mid` and `mid = z`. */
|
|
124
|
+
trans: (midSurface: ElabTerm) => Tactic;
|
|
125
|
+
/** Reduce `f x = f y` to `x = y` via `eqAp`. */
|
|
126
|
+
congrArg: (fnSurface: ElabTerm | string) => Tactic;
|
|
127
|
+
/**
|
|
128
|
+
* Function extensionality: reduce `f = g` at `Π (x : A), B x` to `f x = g x`
|
|
129
|
+
* (repeating for each name in `names`, or one binder if `names` is empty).
|
|
130
|
+
*/
|
|
131
|
+
funext: (...names: readonly string[]) => Tactic;
|
|
132
|
+
/**
|
|
133
|
+
* General extensionality (`ext` / `ext x y`):
|
|
134
|
+
* - On function equality `f = g` (`Pi`), peels binders via `funext`;
|
|
135
|
+
* - On `Subtype`, applies `Subtype.ext` when available;
|
|
136
|
+
* - On non-dependent `Prod` / `Sigma`, reduces `(a1, b1) = (a2, b2)` to `a1 = a2` and `b1 = b2`.
|
|
137
|
+
*/
|
|
138
|
+
ext: (...names: readonly string[]) => Tactic;
|
|
139
|
+
/**
|
|
140
|
+
* Multi-argument congruence (`congr` / `congr depth`):
|
|
141
|
+
* Decomposes `f a_1 ... a_k = f b_1 ... b_k` into `a_i = b_i` subgoals for
|
|
142
|
+
* non-convertible arguments using `eqAp` and `eqTrans`.
|
|
143
|
+
*/
|
|
144
|
+
congr: (depth?: number) => Tactic;
|
|
145
|
+
/**
|
|
146
|
+
* Destructuring witness unpack (`obtain ⟨a, b, ...⟩ [: ty] := expr`):
|
|
147
|
+
* Unpacks any `Sigma`, `Prod`, `Subtype`, `TypeEquiv`, or nominal `structure`/`class`
|
|
148
|
+
* witness into named local hypotheses!
|
|
149
|
+
*/
|
|
150
|
+
obtain: (names: readonly string[], exprSurface: ElabTerm | string, tySurface?: ElabTerm) => Tactic;
|
|
151
|
+
/** Discharge the current goal with a tracked `sorry` axiom placeholder (`NC-9a`). */
|
|
152
|
+
sorry: (label?: string) => Tactic;
|
|
153
|
+
/** Invoke a user/AI-registered custom tactic by name (`env.registerCustomTactic`). */
|
|
154
|
+
custom: (name: string, ...args: readonly unknown[]) => Tactic;
|
|
155
|
+
/** Call-by-name definitional reduction respecting `@[simpl_nomatch]` and optional `allow`/`block` lists. */
|
|
156
|
+
cbn: (opts?: {
|
|
157
|
+
readonly allow?: readonly string[];
|
|
158
|
+
readonly block?: readonly string[];
|
|
159
|
+
readonly at?: string;
|
|
160
|
+
}) => Tactic;
|
|
161
|
+
/** Definitional simplification (`dsimp` / `dsimp only [f, g]`). */
|
|
162
|
+
dsimp: (opts?: {
|
|
163
|
+
readonly only?: boolean;
|
|
164
|
+
readonly names?: readonly string[];
|
|
165
|
+
readonly at?: string;
|
|
166
|
+
}) => Tactic;
|
|
167
|
+
/** Explicitly unfold named definitions (including `@[irreducible]` defs) in goal or hypothesis. */
|
|
168
|
+
unfold: (names: readonly string[], opts?: {
|
|
169
|
+
readonly at?: string;
|
|
170
|
+
}) => Tactic;
|
|
171
|
+
/** Split a `Sigma` / `Prod` / `Iff` goal into component subgoals. */
|
|
172
|
+
split: () => Tactic;
|
|
173
|
+
/** Choose left (`inl`) branch of a `Sum` / `Or` goal. */
|
|
174
|
+
left: () => Tactic;
|
|
175
|
+
/** Choose right (`inr`) branch of a `Sum` / `Or` goal. */
|
|
176
|
+
right: () => Tactic;
|
|
177
|
+
/** Change current goal to `Empty` via `emptyElim`. */
|
|
178
|
+
exfalso: () => Tactic;
|
|
179
|
+
/**
|
|
180
|
+
* Close any goal from an inconsistent hypothesis in `locals`:
|
|
181
|
+
* 1. `h : Empty`
|
|
182
|
+
* 2. `h : P` and `hn : P -> Empty` (or `hn : x = x -> Empty`)
|
|
183
|
+
* 3. Constructor clash equalities (`false = true`, `0 = succ _`,
|
|
184
|
+
* `inl _ = inr _`, `[] = _ :: _`, and their symmetries)!
|
|
185
|
+
*/
|
|
186
|
+
contradiction: () => Tactic;
|
|
187
|
+
/**
|
|
188
|
+
* `injection(hypName, outNames?)`: derive constructor argument equalities from
|
|
189
|
+
* `succ m = succ n`, `inl a = inl b`, `inr a = inr b`, or `x :: xs = y :: ys`!
|
|
190
|
+
*/
|
|
191
|
+
injection: (hypName: string, outNames?: readonly string[]) => Tactic;
|
|
192
|
+
/**
|
|
193
|
+
* Case analysis on a local variable or expression (`Bool`, `Nat`, `Option`,
|
|
194
|
+
* `Sum`, `Prod`/`Sigma`, `List`, `Empty`), supporting `eqName` (`cases h : e`).
|
|
195
|
+
*/
|
|
196
|
+
cases: (target: string | ElabTerm, opts: CasesOptions) => Tactic;
|
|
197
|
+
/**
|
|
198
|
+
* Structural induction on `Nat` or `List` variable `varName`, supporting
|
|
199
|
+
* `generalizing: [...]` and automatic generalization of dependent hypotheses!
|
|
200
|
+
*/
|
|
201
|
+
induction: (varName: string, opts: InductionOptions) => Tactic;
|
|
202
|
+
/**
|
|
203
|
+
* Rewrite goal (or hypothesis `opts.at`) using equality lemma/proof `lemma`
|
|
204
|
+
* (forward by default, or RHS -> LHS when `opts.reverse === true`).
|
|
205
|
+
*/
|
|
206
|
+
rw: (lemma: ElabTerm | string, opts?: {
|
|
207
|
+
readonly reverse?: boolean;
|
|
208
|
+
readonly at?: string;
|
|
209
|
+
}) => Tactic;
|
|
210
|
+
/** Execute a sequence of rewrite steps (`[lem1, { sym: lem2 }, ...]`). */
|
|
211
|
+
rwSeq: (steps: readonly (ElabTerm | string | {
|
|
212
|
+
readonly sym: ElabTerm | string;
|
|
213
|
+
readonly at?: string;
|
|
214
|
+
})[]) => Tactic;
|
|
215
|
+
/**
|
|
216
|
+
* Proof-producing fuel-bounded `@[simp]` simplifier (`maxSteps = 80`).
|
|
217
|
+
* Repeatedly rewrites using `extraLemmas` + registered `@[simp]` theorems/defs,
|
|
218
|
+
* then closes via `rfl`, `Unit`, `assumption`, or `contradiction` (unless
|
|
219
|
+
* `onlyRewrite: true`).
|
|
220
|
+
*/
|
|
221
|
+
simp: (extraLemmas?: readonly (ElabTerm | string)[], opts?: {
|
|
222
|
+
readonly maxSteps?: number;
|
|
223
|
+
readonly onlyRewrite?: boolean;
|
|
224
|
+
readonly onlyLemmas?: boolean;
|
|
225
|
+
}) => Tactic;
|
|
226
|
+
/** Simplify using ONLY `extraLemmas` + local equalities (without global `@[simp]` rules). */
|
|
227
|
+
simpOnly: (extraLemmas: readonly (ElabTerm | string)[], opts?: {
|
|
228
|
+
readonly maxSteps?: number;
|
|
229
|
+
readonly onlyRewrite?: boolean;
|
|
230
|
+
}) => Tactic;
|
|
231
|
+
/** Simplify without requiring the goal to be completely closed. */
|
|
232
|
+
simpRw: (extraLemmas?: readonly (ElabTerm | string)[], maxSteps?: number) => Tactic;
|
|
233
|
+
/**
|
|
234
|
+
* Close a decidable ground proposition `P` (or `a = b` / `a ≠ b` via
|
|
235
|
+
* `[DecidableEq α]`) by evaluating its `Decidable` witness via NbE!
|
|
236
|
+
*/
|
|
237
|
+
decide: () => Tactic;
|
|
238
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bounded, Tabled Typeclass Synthesis for `endash`.
|
|
3
|
+
*
|
|
4
|
+
* Implements deterministic backward-chaining typeclass resolution outside the
|
|
5
|
+
* trusted kernel:
|
|
6
|
+
* - Extracts the nominal target class in `O(1)` via `extractNominalClassName`;
|
|
7
|
+
* - Prioritizes innermost local `[inst : C ...]` hypotheses over global `@[instance]`s;
|
|
8
|
+
* - Searches global `@[instance]` providers tier-by-tier in descending priority;
|
|
9
|
+
* - Detects non-convertible equal-priority conflicts (`TYPECLASS_AMBIGUOUS`);
|
|
10
|
+
* - Enforces strict recursion depth (`maxDepth = 32`), search fuel (`maxFuel = 2048`,
|
|
11
|
+
* `TYPECLASS_FUEL_EXHAUSTED`), and ancestor cycle pruning (`TYPECLASS_CYCLE`);
|
|
12
|
+
* - Memoizes closed/ground synthesized instances per search.
|
|
13
|
+
*/
|
|
14
|
+
import { Term } from '../ast';
|
|
15
|
+
import { BunchedContext } from '../context';
|
|
16
|
+
import { VGrpd } from '../value';
|
|
17
|
+
import { ElabEnv } from './env';
|
|
18
|
+
import { ElabSession, LocalVarEntry } from './unify';
|
|
19
|
+
export declare const DEFAULT_MAX_CLASS_DEPTH = 32;
|
|
20
|
+
export declare const DEFAULT_MAX_CLASS_FUEL = 2048;
|
|
21
|
+
export interface LocalInstanceCandidate {
|
|
22
|
+
readonly symId: number;
|
|
23
|
+
readonly name: string;
|
|
24
|
+
readonly ty: VGrpd;
|
|
25
|
+
}
|
|
26
|
+
export declare function synthesizeInstance(env: ElabEnv, ctx: BunchedContext, localInstances: readonly LocalInstanceCandidate[], goalTy: VGrpd, opts?: {
|
|
27
|
+
readonly maxDepth?: number;
|
|
28
|
+
readonly maxFuel?: number;
|
|
29
|
+
readonly parentSession?: ElabSession;
|
|
30
|
+
readonly seedLocals?: readonly LocalVarEntry[];
|
|
31
|
+
}): Term;
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Contextual NbE Pattern Unification, Readback & Zonking for `endash`.
|
|
3
|
+
*
|
|
4
|
+
* Implements higher-order Miller pattern unification over `endash`'s NbE semantic
|
|
5
|
+
* value domain (`Value`, `VGrpd`, `VCat`) completely outside the trusted kernel:
|
|
6
|
+
* - Contextual metavariables `?m` carry negative `VarSym.id = -metaId` during
|
|
7
|
+
* elaboration and evaluate via `etaWrapNeutral` when unsolved or to their
|
|
8
|
+
* semantic `solutionVal` when solved.
|
|
9
|
+
* - `forceVal` / `forceGrpd` / `forceCat` dereference solved metavariables at
|
|
10
|
+
* neutral spine heads and replay stuck eliminators on demand.
|
|
11
|
+
* - `quoteVal` / `quoteGrpd` / `quoteCat` perform typed NbE readback, enforcing
|
|
12
|
+
* occurs checks (`META_OCCURS_CHECK`), bound-variable pattern checks
|
|
13
|
+
* (`META_NOT_PATTERN`), and lexical scope checks (`META_SCOPE_ESCAPE`).
|
|
14
|
+
* - `zonkTerm` / `zonkCatTerm` eliminate every metavariable before handing the
|
|
15
|
+
* resulting explicit `Term` to the trusted kernel `checkTerm`.
|
|
16
|
+
*/
|
|
17
|
+
import { CatTerm, Term, VarSym } from '../ast';
|
|
18
|
+
import { BunchedContext } from '../context';
|
|
19
|
+
import { Env, VCat, VCellSpine, VGrpd, VGrpdWhnf, VNeutral, VPathSpine, Value } from '../value';
|
|
20
|
+
import { Plicity } from './elab_ast';
|
|
21
|
+
import { ElabEnv } from './env';
|
|
22
|
+
export interface LocalVarEntry {
|
|
23
|
+
readonly sym: VarSym;
|
|
24
|
+
readonly plicity: Plicity;
|
|
25
|
+
readonly tyTerm: Term;
|
|
26
|
+
readonly tyVal: VGrpd;
|
|
27
|
+
readonly value: Value;
|
|
28
|
+
readonly isLet: boolean;
|
|
29
|
+
readonly letTerm?: Term;
|
|
30
|
+
/** Leading binder plicities when this local variable has a `Pi` type. */
|
|
31
|
+
readonly innerPlicities?: readonly Plicity[];
|
|
32
|
+
}
|
|
33
|
+
export interface MetaParamSpec {
|
|
34
|
+
readonly origVarId: number;
|
|
35
|
+
readonly paramSym: VarSym;
|
|
36
|
+
readonly origTyTerm: Term;
|
|
37
|
+
readonly domVal: VGrpd;
|
|
38
|
+
}
|
|
39
|
+
export interface MetaEntry {
|
|
40
|
+
readonly id: number;
|
|
41
|
+
readonly name: string;
|
|
42
|
+
readonly metaSym: VarSym;
|
|
43
|
+
readonly params: readonly MetaParamSpec[];
|
|
44
|
+
readonly creationLocals: readonly LocalVarEntry[];
|
|
45
|
+
readonly targetTy: VGrpd;
|
|
46
|
+
readonly teleTy: VGrpd;
|
|
47
|
+
readonly unsolvedVal: Value;
|
|
48
|
+
readonly readOnly?: boolean;
|
|
49
|
+
solutionBody?: Term;
|
|
50
|
+
solutionTerm?: Term;
|
|
51
|
+
solutionVal?: Value;
|
|
52
|
+
}
|
|
53
|
+
export interface PendingInstanceGoal {
|
|
54
|
+
readonly metaId: number;
|
|
55
|
+
readonly locals: readonly LocalVarEntry[];
|
|
56
|
+
readonly goalTy: VGrpd;
|
|
57
|
+
}
|
|
58
|
+
export interface PendingSorryGoal {
|
|
59
|
+
readonly metaId: number;
|
|
60
|
+
readonly locals: readonly LocalVarEntry[];
|
|
61
|
+
readonly label?: string;
|
|
62
|
+
}
|
|
63
|
+
export declare class ElabSession {
|
|
64
|
+
readonly env: ElabEnv;
|
|
65
|
+
readonly metas: Map<number, MetaEntry>;
|
|
66
|
+
readonly namedHoles: Map<string, number>;
|
|
67
|
+
readonly pendingInstances: PendingInstanceGoal[];
|
|
68
|
+
readonly pendingSorries: PendingSorryGoal[];
|
|
69
|
+
solvedMetaCount: number;
|
|
70
|
+
forcedCache: WeakMap<object, object>;
|
|
71
|
+
zonkedBodyCache: Map<number, Term>;
|
|
72
|
+
zonkedTermCache: Map<number, Term>;
|
|
73
|
+
readonly unfoldedIrreducibles: Set<string>;
|
|
74
|
+
readonly wrappedGrpdFn: WeakMap<(arg: Value) => VGrpd, (arg: Value) => VGrpd>;
|
|
75
|
+
readonly wrappedValFn: WeakMap<(arg: Value) => Value, (arg: Value) => Value>;
|
|
76
|
+
private _nextMetaId;
|
|
77
|
+
private _nextProbeLvl;
|
|
78
|
+
allowUnfoldIrreducible(fullName: string): void;
|
|
79
|
+
isIrreducibleUnfolded(fullName: string): boolean;
|
|
80
|
+
isLockedIrreducible(fullName: string): boolean;
|
|
81
|
+
wrapCod(fn: (arg: Value) => VGrpd): (arg: Value) => VGrpd;
|
|
82
|
+
wrapValFn(fn: (arg: Value) => Value): (arg: Value) => Value;
|
|
83
|
+
constructor(env: ElabEnv, parentSession?: ElabSession);
|
|
84
|
+
freshProbeLevel(): number;
|
|
85
|
+
saveSnapshot(): {
|
|
86
|
+
readonly metaIds: ReadonlySet<number>;
|
|
87
|
+
readonly solvedIds: ReadonlySet<number>;
|
|
88
|
+
readonly namedHolesEntries: readonly (readonly [string, number])[];
|
|
89
|
+
readonly pendingInstancesLen: number;
|
|
90
|
+
readonly pendingSorriesLen: number;
|
|
91
|
+
readonly solvedMetaCount: number;
|
|
92
|
+
readonly nextMetaId: number;
|
|
93
|
+
};
|
|
94
|
+
restoreSnapshot(snap: ReturnType<ElabSession['saveSnapshot']>): void;
|
|
95
|
+
/** Build an evaluation `Env` combining globals (`O(1)` shared), metas, and `locals`. */
|
|
96
|
+
buildEvalEnv(locals: readonly LocalVarEntry[]): Env;
|
|
97
|
+
buildBunchedContext(locals: readonly LocalVarEntry[], includeUnsolvedMetas?: boolean): BunchedContext;
|
|
98
|
+
/**
|
|
99
|
+
* Allocate a fresh contextual metavariable `?m[x_1, ..., x_r] : expectedTy`
|
|
100
|
+
* over all non-`let` variables in `locals`.
|
|
101
|
+
*/
|
|
102
|
+
freshMeta(locals: readonly LocalVarEntry[], expectedTy: VGrpd, hintName?: string, expectedTyTerm?: Term): {
|
|
103
|
+
readonly metaId: number;
|
|
104
|
+
readonly term: Term;
|
|
105
|
+
readonly val: Value;
|
|
106
|
+
};
|
|
107
|
+
registerSolution(meta: MetaEntry, extraParams: readonly {
|
|
108
|
+
readonly sym: VarSym;
|
|
109
|
+
readonly domTerm: Term;
|
|
110
|
+
}[], bodyTerm: Term): void;
|
|
111
|
+
solveMetaInCreationScope(metaId: number, termInLocals: Term): void;
|
|
112
|
+
}
|
|
113
|
+
export declare function forceCat(session: ElabSession, cat: VCat): VCat;
|
|
114
|
+
export declare function asGrpdVal(v: Value): VGrpd;
|
|
115
|
+
export declare function forceGrpd(session: ElabSession, rawG: VGrpd): VGrpdWhnf;
|
|
116
|
+
export declare function forcePathSpine(session: ElabSession, spine: VPathSpine): VPathSpine;
|
|
117
|
+
export declare function forceCellSpine(session: ElabSession, spine: VCellSpine): VCellSpine;
|
|
118
|
+
export declare function forceVal(session: ElabSession, v: Value): Value;
|
|
119
|
+
export interface DeltaFilter {
|
|
120
|
+
/** Explicit allow-list (`only [f, g]`); when defined, ONLY listed defs unfold. */
|
|
121
|
+
readonly allow?: ReadonlySet<string>;
|
|
122
|
+
/** Explicit block-list (`-[f, g]`); listed defs NEVER unfold. */
|
|
123
|
+
readonly block?: ReadonlySet<string>;
|
|
124
|
+
/** Constructor-guarded `@[simpl_nomatch]` refolding (`true` for `#probe` and `cbn`). */
|
|
125
|
+
readonly nomatch: boolean;
|
|
126
|
+
/** Unfold a single head layer only (`true` for `unfold f`). */
|
|
127
|
+
readonly singleStepOnly?: boolean;
|
|
128
|
+
}
|
|
129
|
+
export interface QuoteOptions {
|
|
130
|
+
/** When solving `?m`, reject any occurrence of `-solvingMetaId` (`META_OCCURS_CHECK`). */
|
|
131
|
+
readonly solvingMetaId?: number;
|
|
132
|
+
/**
|
|
133
|
+
* When solving `?m[x_1, ..., x_k] = rhs`, maps allowed local `varId -> formalParamSym`.
|
|
134
|
+
* Any positive local `varId` NOT in `allowedPatternVars` (and not a bound binder
|
|
135
|
+
* introduced inside `quote*`) triggers `META_SCOPE_ESCAPE` / `META_NOT_PATTERN`.
|
|
136
|
+
*/
|
|
137
|
+
readonly allowedPatternVars?: ReadonlyMap<number, VarSym>;
|
|
138
|
+
/** Duplicate variables in `?m[x, x]` — valid iff `rhs` does not mention `x`. */
|
|
139
|
+
readonly forbiddenDupVars?: ReadonlySet<number>;
|
|
140
|
+
/** General readback mode: maps in-scope local `varId -> VarSym`. */
|
|
141
|
+
readonly localSymMap?: ReadonlyMap<number, VarSym>;
|
|
142
|
+
/** When true, unfold `v-glued` / `g.glued` definitions during readback (used as tactic WHNF fallback). */
|
|
143
|
+
readonly unfoldGlued?: boolean;
|
|
144
|
+
/** Selective delta-reduction & `@[simpl_nomatch]` filter for `#probe`, `cbn`, `dsimp`, and `unfold`. */
|
|
145
|
+
readonly deltaFilter?: DeltaFilter;
|
|
146
|
+
}
|
|
147
|
+
export declare function quoteCat(session: ElabSession, locals: readonly LocalVarEntry[], rawCat: VCat, opts: QuoteOptions): CatTerm;
|
|
148
|
+
export declare function quoteGrpd(session: ElabSession, locals: readonly LocalVarEntry[], rawGrpd: VGrpd, opts: QuoteOptions): Term;
|
|
149
|
+
export declare function quoteVal(session: ElabSession, locals: readonly LocalVarEntry[], rawTy: VGrpd, rawVal: Value, opts: QuoteOptions): Term;
|
|
150
|
+
export declare function quoteNeutral(session: ElabSession, locals: readonly LocalVarEntry[], ne: VNeutral, opts: QuoteOptions): Term;
|
|
151
|
+
/** Public convenience readback in `locals` scope (used by `match.ts` & `tactics.ts`). */
|
|
152
|
+
export declare function readbackGrpd(session: ElabSession, locals: readonly LocalVarEntry[], g: VGrpd): Term;
|
|
153
|
+
export declare function readbackGrpdUnfolded(session: ElabSession, locals: readonly LocalVarEntry[], g: VGrpd): Term;
|
|
154
|
+
export declare function readbackGrpdOuterUnfolded(session: ElabSession, locals: readonly LocalVarEntry[], rawG: VGrpd): Term;
|
|
155
|
+
export declare function readbackVal(session: ElabSession, locals: readonly LocalVarEntry[], ty: VGrpd, v: Value): Term;
|
|
156
|
+
export declare function readbackValUnfolded(session: ElabSession, locals: readonly LocalVarEntry[], ty: VGrpd, v: Value): Term;
|
|
157
|
+
export declare function readbackGrpdWithDeltaFilter(session: ElabSession, locals: readonly LocalVarEntry[], g: VGrpd, deltaFilter: DeltaFilter): Term;
|
|
158
|
+
export declare function quoteGluedWithFilter(session: ElabSession, locals: readonly LocalVarEntry[], ty: VGrpd, v: Value, deltaFilter: DeltaFilter): Term;
|
|
159
|
+
export declare function readbackCat(session: ElabSession, locals: readonly LocalVarEntry[], cat: VCat): CatTerm;
|
|
160
|
+
export declare function unifyCat(session: ElabSession, locals: readonly LocalVarEntry[], rawC1: VCat, rawC2: VCat): void;
|
|
161
|
+
export declare function unifyGrpd(session: ElabSession, locals: readonly LocalVarEntry[], rawG1: VGrpd, rawG2: VGrpd, allowUniverseSubtyping?: boolean): void;
|
|
162
|
+
export declare function unifyVal(session: ElabSession, locals: readonly LocalVarEntry[], rawTy: VGrpd, rawV1: Value, rawV2: Value): void;
|
|
163
|
+
export declare function substCatVars(cat: CatTerm, map: ReadonlyMap<number, Term>): CatTerm;
|
|
164
|
+
export declare function substTermVars(term: Term, map: ReadonlyMap<number, Term>): Term;
|
|
165
|
+
export declare function zonkCatTerm(session: ElabSession, cat: CatTerm): CatTerm;
|
|
166
|
+
export declare function zonkTerm(session: ElabSession, term: Term): Term;
|
package/types/eval.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NbE Evaluator, Structural Functorial Lifting (`liftBodyToFun`), and
|
|
3
|
+
* Polarized Natural/Displayed Cell Evaluator (`evalNaturalCellTransf`) for `endash`.
|
|
4
|
+
*/
|
|
5
|
+
import { CatTerm, DisplayedBodyTerm, NaturalCellTerm, SigmaPolarity, Term, VarSym } from './ast';
|
|
6
|
+
import { TransfMode } from './duality';
|
|
7
|
+
import { Env, VCat, VFun, VTransf, Value } from './value';
|
|
8
|
+
export declare function extendEnv(env: Env, varId: number, val: Value): Env;
|
|
9
|
+
/**
|
|
10
|
+
* Collect all `global-ref` names referenced inside a kernel AST DAG in O(unique nodes) time.
|
|
11
|
+
*/
|
|
12
|
+
export declare function collectGlobalRefsInTerm(term: Term, out: Set<string>): void;
|
|
13
|
+
export declare function catMentionsVar(cat: CatTerm, varId: number): boolean;
|
|
14
|
+
export declare function termMentionsVar(term: Term, varId: number): boolean;
|
|
15
|
+
export declare function naturalCellMentionsVar(cell: NaturalCellTerm, varId: number): boolean;
|
|
16
|
+
export declare function displayedBodyMentionsVar(body: DisplayedBodyTerm, varId: number): boolean;
|
|
17
|
+
export declare function evalCat(env: Env, cat: CatTerm): VCat;
|
|
18
|
+
export declare function evalTerm(env: Env, term: Term): Value;
|
|
19
|
+
export declare function prodPairFunVal(dom: VCat, fstCat: VCat, sndCat: VCat, fstFun: VFun, sndFun: VFun): VFun;
|
|
20
|
+
export declare function fstFunVal(fstCat: VCat, sndCat: VCat): VFun;
|
|
21
|
+
export declare function sndFunVal(fstCat: VCat, sndCat: VCat): VFun;
|
|
22
|
+
export declare function curryCartFunVal(a: VCat, b: VCat, c: VCat, fun: VFun): VFun;
|
|
23
|
+
export declare function uncurryCartFunVal(a: VCat, b: VCat, c: VCat, fun: VFun): VFun;
|
|
24
|
+
export declare function sigmaFstFunVal(pol: SigmaPolarity, base: VCat, fam: VFun): VFun;
|
|
25
|
+
export declare function sigmaIntroFunVal(pol: SigmaPolarity, base: VCat, fam: VFun, baseObj: Value): VFun;
|
|
26
|
+
export declare function evalLamFunVal(env: Env, sym: VarSym, dom: VCat, cod: VCat, body: Term): VFun;
|
|
27
|
+
export declare function liftBodyToFun(env: Env, sym: VarSym, domCat: VCat, codCat: VCat, body: Term, x0: Value, x1: Value): VFun;
|
|
28
|
+
export declare function evalLamTransfVal(env: Env, mode: TransfMode, sym: VarSym, dom: VCat, cod: VCat, srcFun: VFun, dstFun: VFun, cellBody: NaturalCellTerm): VTransf;
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public API Barrel for `endash` — Standalone Consolidated Direct Proof-Assistant
|
|
3
|
+
* Kernel & Untrusted NbE Elaboration Layer for Functorial Type Theory
|
|
4
|
+
* (`Grpd` + `StrictCat` + `GrayCat`).
|
|
5
|
+
*/
|
|
6
|
+
export * from './duality';
|
|
7
|
+
export * from './ast';
|
|
8
|
+
export * from './value';
|
|
9
|
+
export * from './context';
|
|
10
|
+
export * from './kernel_ops';
|
|
11
|
+
export * from './stdlib_types';
|
|
12
|
+
export * from './eval';
|
|
13
|
+
export * from './check';
|
|
14
|
+
export * from './builders';
|
|
15
|
+
export * from './stdlib/yoneda';
|
|
16
|
+
export * from './stdlib/equiv';
|
|
17
|
+
export * from './stdlib/nat_set';
|
|
18
|
+
export * from './stdlib/walking_end';
|
|
19
|
+
export * from './stdlib/eckmann_hilton_gray';
|
|
20
|
+
export * from './stdlib/adjunction';
|
|
21
|
+
export * from './stdlib/monad_lccc';
|
|
22
|
+
export * from './stdlib/cat1_additive';
|
|
23
|
+
export * from './stdlib/abelian_adjunctions';
|
|
24
|
+
export * from './stdlib/homology_les_snake';
|
|
25
|
+
export * from './stdlib/presented_modules_bridge';
|
|
26
|
+
export * from './stdlib/simplicial_pathout';
|
|
27
|
+
export * from './stdlib/cubical_and_gray_cubes';
|
|
28
|
+
export * from './stdlib/weighted_limits';
|
|
29
|
+
export * from './stdlib/sites_and_sheafification';
|
|
30
|
+
export * from './stdlib/schemes_projective_line';
|
|
31
|
+
export { bz2Cat1Def, bz2NotUnivalentCat1Proof, commRingCat1Def, commRingIsoEquivEqProof, commRingSipTransportUnitProof, daggerCat1G, ensureUnivalentSipGlobals, indiscreteBoolRezkCompletionProof, installUnivalentSipAndDagger, isGauntCat1G, isStrictObjCat1G, isUnivalentCat1G, sipUnivalentCat1Proof, } from './stdlib/univalent_sip_dagger';
|
|
32
|
+
export { ensureGroupoidifyGlobals, groupoidifyAdjunctionNaturalityProof, groupoidifyExtend, groupoidifyLeftTriangleProof, groupoidifyMapTerm, groupoidifyPathReflectionEquivProof, groupoidifyRestrict, groupoidifyRightTriangleProof, groupoidifyUnitEdge, groupoidifyUnitEdgeIsIsoProof, groupoidifyUniversalEquivProof, groupoidifyWalkingArrowEquivUnitProof, groupoidifyWalkingArrowMapEquivProof, groupoidifyWalkingEndEquivCircleProof, groupoidifyWalkingEndNotSetProof, installGroupoidification, isGroupoidGrpdG, } from './stdlib/groupoidification';
|
|
33
|
+
export { circleFreeMapEquivProof, circleLoopStageEquivDef, coneCosliceAdjEquivProof, cosliceCat1, directedSimplexCat, ensureJoinSpectraGlobals, installJoinConesAndSpectra, joinConeApexEquivProof, joinCrossNotIsoProof, joinGroupoidNoBackwardProof, joinMapDataG, joinMapFunTerm, joinOneOneCat, joinOneOneMapEquivProof, joinOpIsoSwapProof, joinUniversalEquivProof, leftAdjointPreservesWeightedColimitsProof, loopPointedG, markedMeridianFibreEquivProof, omegaSpectrumG, opCat1, opFunctor1, pointedCircleMapUniversalEquivProof, pointedEquivG, pointedGrpdG, pointedMapG, shiftOmegaSpectrumFn, weightedCocone1G, weightedColimit1G, } from './stdlib/join_cones_spectra';
|
|
34
|
+
export * from './stdlib/spectra_cohomology';
|
|
35
|
+
export * from './stdlib/smash_and_ext_algebra';
|
|
36
|
+
export * from './stdlib/bar_hochschild_bridge';
|
|
37
|
+
export * from './stdlib/cotangent_bridge';
|
|
38
|
+
export * from './stdlib/cgt_bridge';
|
|
39
|
+
export * from './stdlib/hilbert_ag_bridge';
|
|
40
|
+
export * from './stdlib/derham_bridge';
|
|
41
|
+
export * from './stdlib/cyclic_bridge';
|
|
42
|
+
export * from './stdlib/lefschetz_bridge';
|
|
43
|
+
export * from './stdlib/theta_stepanov_bridge';
|
|
44
|
+
export * from './stdlib/smith_resultant_gauss_bridge';
|
|
45
|
+
export * from './stdlib/stable_infinity_ext';
|
|
46
|
+
export * from './stdlib/spectral_sequences';
|
|
47
|
+
export * from './stdlib/directed_cone_spectra';
|
|
48
|
+
export * from './cache/core_snapshot';
|
|
49
|
+
export * from './module/goal_inspector';
|
|
50
|
+
export * from './module/comparator';
|
|
51
|
+
export * from './module/proof_graph';
|
|
52
|
+
export * from './cas/rings';
|
|
53
|
+
export * from './cas/poly';
|
|
54
|
+
export * from './cas/matrix';
|
|
55
|
+
export * from './cas/hnf_snf';
|
|
56
|
+
export * from './cas/groebner_syzygy';
|
|
57
|
+
export * from './cas/modules_complexes';
|
|
58
|
+
export * from './cas/reify_proofs';
|
|
59
|
+
export * from './cas/localization_cech';
|
|
60
|
+
export * from './cas/resolutions_spectral_seq';
|
|
61
|
+
export * from './cas/ext_algebra';
|
|
62
|
+
export * from './cas/bar_hochschild';
|
|
63
|
+
export * from './cas/cotangent_deformation';
|
|
64
|
+
export * from './cas/perm_coset_cgt';
|
|
65
|
+
export * from './cas/hilbert_proj_ag';
|
|
66
|
+
export * from './cas/derham_hkr';
|
|
67
|
+
export * from './cas/cyclic_homology';
|
|
68
|
+
export * from './cas/lefschetz_weil';
|
|
69
|
+
export * from './cas/theta_stepanov';
|
|
70
|
+
export * from './cas/smith_resultant_gauss';
|
|
71
|
+
export { E, ElabArg, ElabBinder, ElabTerm, EndashElabError, EndashElabErrorCode, Plicity, } from './elab/elab_ast';
|
|
72
|
+
export { CrossRefNamespace, CrossRefTagEntry, ElabDeclInfo, ElabEnv, InstanceEntry, SimpLemmaEntry, StructureFieldMeta, StructureInfo, } from './elab/env';
|
|
73
|
+
export { prettyCat, prettyGrpd, prettyTerm, prettyVal } from './elab/pretty';
|
|
74
|
+
export { ElabSession, LocalVarEntry, MetaEntry, unifyCat, unifyGrpd, unifyVal, zonkTerm, } from './elab/unify';
|
|
75
|
+
export { checkElab, elabAxiom, elabDef, elaborateTerm, elabTheorem, inferElab } from './elab/elaborate';
|
|
76
|
+
export { declareClass, DeclareStructureOptions, declareStructure, } from './elab/structure';
|
|
77
|
+
export { synthesizeInstance } from './elab/typeclass';
|
|
78
|
+
export { compileMatch1, compileMatch2, MType, P, Pat, } from './elab/match';
|
|
79
|
+
export { elabTacticTheorem, ProofGoal, ProofState, T, Tactic } from './elab/tactics';
|
|
80
|
+
export { installPrelude } from './stdlib/prelude';
|
|
81
|
+
export { installNatLemmas } from './stdlib/nat_lemmas';
|
|
82
|
+
export { installList } from './stdlib/list';
|
|
83
|
+
export { installListLemmas } from './stdlib/list_lemmas';
|
|
84
|
+
export { installListFunctorialBridge, listCat, listCatCoreFun, prependArrowListCatTransf, reverseListCatFixedLenFun, reverseTupleFun, reverseTupleInvolutiveTransf, reverseTupleMapListCatTransf, singletonListCatFun, snocTupleFun, tupleCatFam, tupleCatFixed, tupleCatObj, tupleMapFun, } from './stdlib/list_functorial_bridge';
|
|
85
|
+
export { circleLoopSpaceG, installHottCircle, pathCircleCat, pathLeftInvCancel, } from './stdlib/hott_circle';
|
|
86
|
+
export { EndashParseError, EndashParseErrorCode, formatSpan, mergeSpans, mkPos, mkSpan, SourcePos, SourceSpan, } from './parser/span';
|
|
87
|
+
export { Token, tokenize, TokenKind } from './parser/lexer';
|
|
88
|
+
export * from './parser/surface_ast';
|
|
89
|
+
export { infixBindingPowers, OperatorTable } from './parser/pratt';
|
|
90
|
+
export { EndashParser, parseEnExpr, parseEnModule, parseEnTactics } from './parser/parser';
|
|
91
|
+
export { CommandOutput, enRun, executeSurfaceModule, ModuleRunOptions, ModuleRunResult, } from './module/desugar';
|
|
92
|
+
export { ALL_BUILTIN_STDLIB_MODULES, clearEnElaborationMemo, clearNodeEnDiskCache, clearNodeEnDiskCacheStats, CompiledModuleSnapshot, EndashModuleError, EndashModuleErrorCode, EnElaborationMemoEntry, EnElaborationMemoStats, getEnElaborationMemoEntry, getEnElaborationMemoStats, getHostEnDiskCacheProvider, getNodeEnDiskCacheDir, getNodeEnDiskCacheStats, getRegisteredVerifiedEnEnsnapBundle, getRegisteredVerifiedStdlibBundle, HostEnDiskCacheProvider, MemoryModuleProvider, ModuleLoader, ModuleSourceEntry, ModuleSourceProvider, NodeEnDiskCacheStats, NodeFsModuleProvider, registerVerifiedEnEnsnapBundle, registerVerifiedStdlibBundle, scanLeadingImports, setEnElaborationMemoEntry, setHostEnDiskCacheProvider, setHostEnEnsnapBundleProvider, setHostStdlibBundleProvider, setNodeEnDiskCacheDir, withEnElaborationMemoDisabled, withEnEnsnapBundleDisabled, } from './module/loader';
|
|
93
|
+
export { buildEnLibraryEnsnapBundle, buildEnPackage, computeKernelPinSha256, PackageBuildOptions, PackageBuildResult, PackageModuleBuildEntry, sha256Hex, } from './module/package_builder';
|
|
94
|
+
export { assertAxiomFree, en, enExpr, enProve, EnSpliceValue } from './module/quasiquote';
|
|
95
|
+
export * from './book/schema';
|
|
96
|
+
export { extractLiterateEnBlocks, verifyChapterLiterateBlocks, } from './book/literate_en';
|
|
97
|
+
export { checkBookSeries, CheckBookSeriesOptions, compileAndCheckBookSeries, FullCheckedSeriesBundle, LoadedVolumeData, queryBookSeries, slugifyHeading, stripFencedAndInlineCode, } from './book/book_compiler';
|
|
98
|
+
export { buildBookSeriesSite, BuildBookSeriesOptions, escapeHtml, findExternalAssetUrlsInHtml, } from './book/html_renderer';
|