visualproof 0.4.1 → 0.4.2

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.
@@ -39,6 +39,21 @@ export function nonStandardAxiom(g, i) {
39
39
  export function needsReview(g, d, i) {
40
40
  return nonStandardAxiom(g, i) || !trusted(d, g.nodes[i].name, g.nodes[i].module, g.isExt(i));
41
41
  }
42
+ /** What set `s` holds besides `skip`, as a TCB's size counts it (TCBSpec decision 7): `counted`,
43
+ * what needs review; `trusted`, the rest, told apart and never added in. The panel's counts and
44
+ * the selection bar's (ViewSpec decision 14) count so. */
45
+ export function trustSplit(g, d, s, skip = -1) {
46
+ let counted = 0, t = 0;
47
+ for (let j = 0; j < s.length; j++) {
48
+ if (!s[j] || j === skip)
49
+ continue;
50
+ if (needsReview(g, d, j))
51
+ counted++;
52
+ else
53
+ t++;
54
+ }
55
+ return { counted, trusted: t };
56
+ }
42
57
  /** What `root`'s review holds, its review set (`reviewScope`), in the graph's numbering. */
43
58
  export function reviewSet(g, d, root) {
44
59
  return evaluate(reviewScope(g.nodes[root].name), { g, review: d });
@@ -3040,6 +3040,18 @@ function inTargets(g2, targets) {
3040
3040
  function nonStandardAxiom(g2, i2) {
3041
3041
  return g2.nodes[i2].kind === "axiom" && !STANDARD_AXIOMS.includes(g2.nodes[i2].name);
3042
3042
  }
3043
+ function needsReview(g2, d2, i2) {
3044
+ return nonStandardAxiom(g2, i2) || !trusted(d2, g2.nodes[i2].name, g2.nodes[i2].module, g2.isExt(i2));
3045
+ }
3046
+ function trustSplit(g2, d2, s2, skip = -1) {
3047
+ let counted = 0, t2 = 0;
3048
+ for (let j2 = 0; j2 < s2.length; j2++) {
3049
+ if (!s2[j2] || j2 === skip) continue;
3050
+ if (needsReview(g2, d2, j2)) counted++;
3051
+ else t2++;
3052
+ }
3053
+ return { counted, trusted: t2 };
3054
+ }
3043
3055
  function reviewSet(g2, d2, root) {
3044
3056
  return evaluate(reviewScope(g2.nodes[root].name), { g: g2, review: d2 });
3045
3057
  }
@@ -12234,6 +12246,7 @@ function editorAnchor(href) {
12234
12246
 
12235
12247
  // src/web/src/panel.ts
12236
12248
  var PANEL_SECTIONS = { why: "p-why", stats: "p-stats", axioms: "p-axioms", tcb: "p-tcb" };
12249
+ var TRUSTED_TITLE = "Trusted without review, and not counted: what a trusted prefix covers (Mathlib, Lean's own by default), and the standard axioms";
12237
12250
  function banner(f2) {
12238
12251
  if (!f2) return "";
12239
12252
  const when = f2.builtAt ? new Date(f2.builtAt).toLocaleString() : "";
@@ -12352,18 +12365,16 @@ var Panel = class {
12352
12365
  const tcb = g2.reach([i2], SITE_STMT | SITE_BODY, "out");
12353
12366
  const deps = g2.reach([i2], ALL_SITES, "out");
12354
12367
  const apps = g2.reach([i2], ALL_SITES, "in");
12355
- const count2 = (s2) => {
12356
- let p2 = 0, x2 = 0;
12357
- for (let j2 = 0; j2 < s2.length; j2++) if (s2[j2] && j2 !== i2) g2.isExt(j2) ? x2++ : p2++;
12358
- return [p2, x2];
12359
- };
12360
- const [tcbP, tcbX] = count2(tcb);
12361
- const [depP, depX] = count2(deps);
12362
- const [appP] = count2(apps);
12368
+ const d2 = this.hooks.reviewData();
12369
+ const inTcb = trustSplit(g2, d2, tcb, i2);
12370
+ const used = trustSplit(g2, d2, deps, i2);
12371
+ const n3 = (x2) => x2.toLocaleString();
12372
+ let appP = 0;
12373
+ for (let j2 = 0; j2 < apps.length; j2++) if (apps[j2] && j2 !== i2 && !g2.isExt(j2)) appP++;
12363
12374
  const axioms = g2.axiomsOf(i2);
12364
12375
  const groups = /* @__PURE__ */ new Map();
12365
12376
  for (let j2 = 0; j2 < tcb.length; j2++) {
12366
- if (!tcb[j2] || j2 === i2 || g2.isExt(j2)) continue;
12377
+ if (!tcb[j2] || j2 === i2 || !needsReview(g2, d2, j2)) continue;
12367
12378
  const k2 = g2.nodes[j2].kind;
12368
12379
  if (!groups.has(k2)) groups.set(k2, []);
12369
12380
  groups.get(k2).push(j2);
@@ -12371,7 +12382,7 @@ var Panel = class {
12371
12382
  const order = ["axiom", "opaque", "structure", "class", "inductive", "def", "abbrev", "instance", "notation", "theorem"];
12372
12383
  const tcbList = [...groups.entries()].sort((a3, b2) => order.indexOf(a3[0]) - order.indexOf(b2[0])).map(([k2, xs]) => {
12373
12384
  xs.sort((a3, b2) => g2.nodes[a3].name < g2.nodes[b2].name ? -1 : 1);
12374
- return `<div class="grp"><div class="grp-h"><span class="dot k-${k2}"></span>${k2} <span class="muted">${xs.length}</span></div>` + xs.map((j2) => `<button class="row rv-${markOf(this.hooks.reviewData(), g2.nodes[j2].name, g2.nodes[j2].module, false, g2.nodes[j2].hash)}" data-go="${j2}" title="Go to ${escapeHtml(g2.nodes[j2].name)}">${escapeHtml(g2.nodes[j2].name)}</button>`).join("") + `</div>`;
12385
+ return `<div class="grp"><div class="grp-h"><span class="dot k-${k2}"></span>${k2} <span class="muted">${xs.length}</span></div>` + xs.map((j2) => `<button class="row rv-${markOf(d2, g2.nodes[j2].name, g2.nodes[j2].module, g2.isExt(j2), g2.nodes[j2].hash)}" data-go="${j2}" title="Go to ${escapeHtml(g2.nodes[j2].name)}">${escapeHtml(g2.nodes[j2].name)}</button>`).join("") + `</div>`;
12375
12386
  }).join("");
12376
12387
  const listOrder = this.hooks.listOrder();
12377
12388
  const keyOnly = listOrder === "key";
@@ -12413,11 +12424,11 @@ var Panel = class {
12413
12424
  ${this.hooks.links?.(i2) ?? ""}
12414
12425
  ${this.box.html(i2, true, tcb)}
12415
12426
  ${why ? part(PANEL_SECTIONS.why, "Why in the TCB", "", () => why) : ""}
12416
- ${part(PANEL_SECTIONS.stats, "Counts", `${tcbP} in TCB \xB7 ${depP} uses \xB7 ${appP} used by`, () => `
12427
+ ${part(PANEL_SECTIONS.stats, "Counts", `${n3(inTcb.counted)} in TCB \xB7 ${n3(used.counted)} uses \xB7 ${n3(appP)} used by`, () => `
12417
12428
  <div class="stats">
12418
- <div class="stat"><div class="n grad-tcb">${tcbP}</div><div class="l">in TCB<br><span class="muted">+${tcbX} external</span></div></div>
12419
- <div class="stat"><div class="n grad-dep">${depP}</div><div class="l">uses<br><span class="muted">+${depX} external</span></div></div>
12420
- <div class="stat"><div class="n grad-app">${appP}</div><div class="l">used by</div></div>
12429
+ <div class="stat"><div class="n grad-tcb">${n3(inTcb.counted)}</div><div class="l">in TCB<br><span class="muted" title="${TRUSTED_TITLE}">+${n3(inTcb.trusted)} trusted</span></div></div>
12430
+ <div class="stat"><div class="n grad-dep">${n3(used.counted)}</div><div class="l">uses<br><span class="muted" title="${TRUSTED_TITLE}">+${n3(used.trusted)} trusted</span></div></div>
12431
+ <div class="stat"><div class="n grad-app">${n3(appP)}</div><div class="l">used by</div></div>
12421
12432
  </div>`)}
12422
12433
  ${part(
12423
12434
  PANEL_SECTIONS.axioms,
@@ -12427,7 +12438,7 @@ var Panel = class {
12427
12438
  () => `<div class="axioms">${axioms.length ? axioms.map((a3) => `<span class="chip ${nonStd.includes(a3) ? "bad" : ""}">${escapeHtml(a3)}</span>`).join("") : `<span class="muted">none</span>`}</div>`
12428
12439
  )}
12429
12440
  ${notationHtml(g2, i2)}
12430
- ${tcbP ? part(PANEL_SECTIONS.tcb, "Its TCB", `${tcbP}${queue === null ? "" : keyOnly ? " \xB7 key declarations" : inOrder ? " \xB7 in review order" : " \xB7 by kind"}`, () => `<div class="sec-tcb p-order">${orderSwitch}</div><div class="tcb-list">${inOrder ? queue : tcbList}</div>`, { id: "checks", title: "What a TCB is: the film's chapter on the ways to check" }) : ""}
12441
+ ${inTcb.counted ? part(PANEL_SECTIONS.tcb, "Its TCB", `${inTcb.counted}${queue === null ? "" : keyOnly ? " \xB7 key declarations" : inOrder ? " \xB7 in review order" : " \xB7 by kind"}`, () => `<div class="sec-tcb p-order">${orderSwitch}</div><div class="tcb-list">${inOrder ? queue : tcbList}</div>`, { id: "checks", title: "What a TCB is: the film's chapter on the ways to check" }) : ""}
12431
12442
  `;
12432
12443
  this.el.classList.add("open");
12433
12444
  if (!same2) this.el.scrollTop = 0;
@@ -19097,7 +19108,7 @@ var TOUR = [
19097
19108
  {
19098
19109
  id: "checks",
19099
19110
  title: "Three ways to check",
19100
- text: "<b>Selection</b>: the statement alone, least effort. <b>Keys</b>: the few that carry the meaning. <b>TCB</b>: all it rests on, most effort, most confidence. The counts say what each costs.",
19111
+ text: "<b>Selection</b>: the statement alone, least effort. <b>Keys</b>: the few that carry the meaning. <b>TCB</b>: all it rests on, most effort, most confidence. The counts say what each costs, the trusted apart.",
19101
19112
  about: ["#lightup [data-mode=plain]", "#rests-steps [data-mode=keys]", "#rests-steps [data-mode=tcb]", "key:2"],
19102
19113
  showMe: "tcb-three",
19103
19114
  // tcb-first: the reader's own click selects, under Rests on · TCB, a theorem whose TCB lights
@@ -20122,6 +20133,40 @@ function besideSide(btn, el) {
20122
20133
  }
20123
20134
 
20124
20135
  // src/web/src/guide.ts
20136
+ function restsOnCounts(g2, d2, self2, lit) {
20137
+ let read2 = 0, assumed = 0, proofs = 0, keys = 0;
20138
+ for (let j2 = 0; j2 < g2.n; j2++) {
20139
+ if (j2 === self2) continue;
20140
+ if (!lit.tcb?.[j2]) {
20141
+ if (lit.uses?.[j2]) proofs++;
20142
+ continue;
20143
+ }
20144
+ if (!needsReview(g2, d2, j2)) assumed++;
20145
+ else read2++;
20146
+ if (lit.keys?.[j2]) keys++;
20147
+ }
20148
+ const at = self2 >= 0 && lit.tcb?.[self2] ? needsReview(g2, d2, self2) ? "read" : "trusted" : null;
20149
+ return { self: at, read: read2, assumed, proofs, keys };
20150
+ }
20151
+ function tcbText(r2) {
20152
+ const n3 = (x2) => x2.toLocaleString();
20153
+ const proofs = r2.proofs ? ` What its proofs alone use, ${n3(r2.proofs)} more, is not lit: the proofs are Lean's to check.` : "";
20154
+ if (!r2.read && !r2.assumed) return `Its <b>TCB</b> is itself alone: its statement rests on nothing but Lean.${proofs}`;
20155
+ const decls = (x2) => `${n3(x2)} declaration${x2 === 1 ? "" : "s"}`;
20156
+ const readThem = r2.read ? ` To trust it, read ${r2.read === 1 ? "that one" : `those ${n3(r2.read)}`}.` : "";
20157
+ if (r2.self === "read") {
20158
+ const one2 = r2.assumed === 1;
20159
+ const trusted3 = r2.assumed ? ` The ${one2 ? "one" : n3(r2.assumed)} trusted, as Mathlib is, light${one2 ? "s" : ""} too, and ${one2 ? "is" : "are"} assumed.` : "";
20160
+ if (!r2.read) return `Its <b>TCB</b> lights it alone to read: the ${one2 ? "one" : n3(r2.assumed)} it rests on ${one2 ? "is" : "are"} trusted, as Mathlib is, and assumed.${proofs}`;
20161
+ return `Its <b>TCB</b> lights ${n3(r2.read + 1)}: it, and ${decls(r2.read)} to read \u2014 definitions, axioms, the project's notation.${trusted3}${readThem}${proofs}`;
20162
+ }
20163
+ const trusted2 = r2.assumed + (r2.self === "trusted" ? 1 : 0);
20164
+ return `Its <b>TCB</b> lights ${r2.read ? `${decls(r2.read)} to read` : "nothing to read"}, and ${n3(trusted2)} trusted${r2.self === "trusted" ? ", it among them" : ""}, as Mathlib is, and assumed.${readThem}${proofs}`;
20165
+ }
20166
+ function keysText(r2) {
20167
+ const of = `Of the ${r2.read.toLocaleString()} declaration${r2.read === 1 ? "" : "s"} to read, `;
20168
+ return r2.keys === 1 ? `${of}the one the review marked <b>key</b>: what carries its meaning. Read it first.` : `${of}the ${r2.keys.toLocaleString()} the review marked <b>key</b>: the few that carry its meaning. Read them first.`;
20169
+ }
20125
20170
  var $2 = (sel) => document.querySelector(sel);
20126
20171
  function welcomeOf(o2) {
20127
20172
  if (o2.guided || o2.welcomed) return "none";
@@ -20613,7 +20658,7 @@ var Guide = class {
20613
20658
  const ring = (step2) => () => (phone ? around("#panel") : around(step2)) ?? board();
20614
20659
  const lit = (step2) => () => {
20615
20660
  const b2 = board();
20616
- const m3 = phone ? null : around(step2);
20661
+ const m3 = phone ? null : around(step2, "#selbar .sb-n");
20617
20662
  if (!m3) return b2;
20618
20663
  const l2 = Math.min(b2.left, m3.left), t2 = Math.min(b2.top, m3.top);
20619
20664
  return new DOMRect(l2, t2, Math.max(b2.right, m3.right) - l2, Math.max(b2.bottom, m3.bottom) - t2);
@@ -20635,15 +20680,8 @@ var Guide = class {
20635
20680
  this.hooks.setTool("tcb");
20636
20681
  this.hooks.frameLit();
20637
20682
  },
20638
- // the numbers add up to the selection bar's: the theorem, what is to be read, what is assumed
20639
- text: () => {
20640
- const lit2 = r2.read + r2.assumed;
20641
- const assumed = r2.assumed ? `${r2.assumed} trusted, as Mathlib is, and assumed` : "";
20642
- const proofs = r2.proofs ? ` What its proofs alone use, ${r2.proofs} more, is not lit: the proofs are Lean's to check.` : "";
20643
- if (!lit2) return `Its <b>TCB</b> is itself alone: its statement rests on nothing but Lean.${proofs}`;
20644
- if (!r2.read) return `Its <b>TCB</b> lights ${lit2} besides it, all ${r2.assumed === 1 ? "of it " : ""}trusted, as Mathlib is, and assumed: nothing of the project's to read.${proofs}`;
20645
- return `Its <b>TCB</b> lights ${lit2} besides it: ${r2.read} to read \u2014 definitions, axioms, the project's notation \u2014${assumed ? ` and ${assumed}` : ""}. To trust it, read ${r2.read === 1 ? "that one" : `those ${r2.read}`}.${proofs}`;
20646
- },
20683
+ // the numbers are the selection bar's: the theorem and what is to be read, what is trusted
20684
+ text: () => tcbText(r2),
20647
20685
  at: lit("#rests-steps [data-mode=tcb]")
20648
20686
  },
20649
20687
  {
@@ -20653,7 +20691,7 @@ var Guide = class {
20653
20691
  this.hooks.setTool(r2.keys ? "keys" : "tcb");
20654
20692
  this.hooks.frameLit();
20655
20693
  },
20656
- text: () => r2.keys ? r2.keys === 1 ? `Of those ${r2.read + r2.assumed}, the one the review marked <b>key</b>: what carries its meaning. Read it first.` : `Of those ${r2.read + r2.assumed}, the ${r2.keys} the review marked <b>key</b>: the few that carry its meaning. Read them first.` : ro || this.hooks.snapshot() ? "None is marked <b>key</b> yet: the review marks the few of a target's TCB that carry its meaning." : phone ? "None is marked <b>key</b> yet. On a target's view, its panel's \u25C7 Mark as key marks the few that carry its meaning." : "None is marked <b>key</b> yet. On a view focused on a target, <kbd>k</kbd> marks the few of its TCB that carry its meaning.",
20694
+ text: () => r2.keys ? keysText(r2) : ro || this.hooks.snapshot() ? "None is marked <b>key</b> yet: the review marks the few of a target's TCB that carry its meaning." : phone ? "None is marked <b>key</b> yet. On a target's view, its panel's \u25C7 Mark as key marks the few that carry its meaning." : "None is marked <b>key</b> yet. On a view focused on a target, <kbd>k</kbd> marks the few of its TCB that carry its meaning.",
20657
20695
  at: () => r2.keys ? lit("#rests-steps [data-mode=keys]")() : ring("#rests-steps [data-mode=keys]")()
20658
20696
  }
20659
20697
  ];
@@ -21580,7 +21618,7 @@ var SelectionBar = class {
21580
21618
  return !this.el.hidden;
21581
21619
  }
21582
21620
  /** The picks, the one the panel tells of (its index, or -1), how many declarations are lit on the
21583
- * board, and whether Zoom in has a view to open that is not this one: one holding something,
21621
+ * board, the trusted apart, and whether Zoom in has a view to open that is not this one: one holding something,
21584
21622
  * and not just what this board holds (shared/board.ts, zoomScope). */
21585
21623
  render(picks, panel, lit, zoom, key = null) {
21586
21624
  this.el.hidden = !picks.length;
@@ -21589,12 +21627,12 @@ var SelectionBar = class {
21589
21627
  return;
21590
21628
  }
21591
21629
  const esc2 = escapeHtml;
21592
- const why = lit ? "This board holds just what is lit already" : "Nothing selected is on this board";
21630
+ const why = lit.counted + lit.trusted ? "This board holds just what is lit already" : "Nothing selected is on this board";
21593
21631
  const chips = picks.map((p2, k2) => {
21594
21632
  const words = pickWords(p2);
21595
21633
  return `<span class="sb-chip t-${p2.tool}${k2 === panel ? " on" : ""}" title="${esc2(printQuery(p2.q))}"><button class="sb-go" data-show="${k2}"${p2.root ? ` title="Show ${esc2(words)}"` : " disabled"}>${esc2(words)}</button><button class="sb-x" data-rm="${k2}" title="Take it out" aria-label="Take ${esc2(words)} out">\xD7</button></span>`;
21596
21634
  }).join("");
21597
- this.el.innerHTML = `<span class="sb-chips">${chips}</span><span class="sb-meta"><span class="sb-n" title="Declarations lit on this board">${lit.toLocaleString()} lit</span>` + (this.hooks.canOpenViews() ? `<button class="sb-btn" data-zoom${zoom ? ` title="Open a view of what is selected, laid out on its own, in a tab"` : ` disabled title="${why}"`}>Zoom in</button>` : "") + (key ? `<button class="sb-btn sb-key" data-mark-keys${key.fresh ? ` title="${esc2(`Mark the ${key.fresh} declaration${key.fresh === 1 ? "" : "s"} you clicked as key for ${key.target}`)}"` : ` disabled title="${esc2(key.already ? `What you clicked is key for ${key.target} already` : `Nothing you clicked is in ${key.target}'s review besides the target`)}"`}>\u25C6 Mark selected as key${key.fresh > 1 ? ` (${key.fresh})` : ""}</button>` : "") + `<button class="sb-btn" data-clear title="Select nothing (Esc)">Clear</button></span>`;
21635
+ this.el.innerHTML = `<span class="sb-chips">${chips}</span><span class="sb-meta"><span class="sb-n"><span title="Declarations lit on this board that are not trusted">${lit.counted.toLocaleString()} lit</span>` + (lit.trusted ? `<span class="sb-trusted" title="Trusted declarations lit too: assumed without review, and not counted \u2014 what a trusted prefix covers, and the standard axioms"> \xB7 +${lit.trusted.toLocaleString()} trusted</span>` : "") + `</span>` + (this.hooks.canOpenViews() ? `<button class="sb-btn" data-zoom${zoom ? ` title="Open a view of what is selected, laid out on its own, in a tab"` : ` disabled title="${why}"`}>Zoom in</button>` : "") + (key ? `<button class="sb-btn sb-key" data-mark-keys${key.fresh ? ` title="${esc2(`Mark the ${key.fresh} declaration${key.fresh === 1 ? "" : "s"} you clicked as key for ${key.target}`)}"` : ` disabled title="${esc2(key.already ? `What you clicked is key for ${key.target} already` : `Nothing you clicked is in ${key.target}'s review besides the target`)}"`}>\u25C6 Mark selected as key${key.fresh > 1 ? ` (${key.fresh})` : ""}</button>` : "") + `<button class="sb-btn" data-clear title="Select nothing (Esc)">Clear</button></span>`;
21598
21636
  }
21599
21637
  };
21600
21638
 
@@ -23198,7 +23236,7 @@ function offsetIn(root, node, off) {
23198
23236
  }
23199
23237
 
23200
23238
  // src/web/src/reload.ts
23201
- var PAGE_VERSION = true ? "0.4.1" : null;
23239
+ var PAGE_VERSION = true ? "0.4.2" : null;
23202
23240
  var KEY4 = "visualproof:reload";
23203
23241
  var FOR_KEY2 = "visualproof:reloaded-for";
23204
23242
  var FRESH_MS = 10 * 6e4;
@@ -53428,7 +53466,8 @@ async function boot() {
53428
53466
  review = { ...review, rev: c3.rev, problems: c3.problems, error: problemsText(c3.problems) };
53429
53467
  reviewChanged();
53430
53468
  };
53431
- const renderSelBar = (q2 = selectionQuery(picks), lit = q2 && litOn(q2)) => selBar.render(picks, picks.findIndex((p2) => !!shown && sameShown(shownOf(p2), shown)), lit?.count ?? 0, zoomOf(q2, lit) !== null, keyMarking());
53469
+ const litCount = (lit) => lit ? trustSplit(vg(), boardReview(), lit.set) : { counted: 0, trusted: 0 };
53470
+ const renderSelBar = (q2 = selectionQuery(picks), lit = q2 && litOn(q2)) => selBar.render(picks, picks.findIndex((p2) => !!shown && sameShown(shownOf(p2), shown)), litCount(lit), zoomOf(q2, lit) !== null, keyMarking());
53432
53471
  const apply = () => {
53433
53472
  const G2 = vg();
53434
53473
  syncFocus();
@@ -55070,20 +55109,8 @@ ${n3.note.text.slice(0, 200)}`)) return;
55070
55109
  const q2 = selectionQuery([declPick(tool, name, keysFor({ decl: name }))]);
55071
55110
  return q2 ? litOn(q2).set : null;
55072
55111
  };
55073
- const tcb = lit("tcb"), uses = lit("deps"), keys = lit("keys");
55074
- const self2 = toView(i2);
55075
- let read2 = 0, assumed = 0, proofs = 0, k2 = 0;
55076
- for (let j2 = 0; j2 < G2.n; j2++) {
55077
- if (j2 === self2) continue;
55078
- if (keys?.[j2]) k2++;
55079
- if (!tcb?.[j2]) {
55080
- if (uses?.[j2]) proofs++;
55081
- continue;
55082
- }
55083
- if (trusted(d2, G2.nodes[j2].name, G2.nodes[j2].module, G2.isExt(j2))) assumed++;
55084
- else read2++;
55085
- }
55086
- return { name: g2.nodes[i2].display ?? name.split(".").pop(), read: read2, assumed, proofs, keys: k2, target: isTarget(name) };
55112
+ const counts2 = restsOnCounts(G2, d2, toView(i2), { tcb: lit("tcb"), uses: lit("deps"), keys: lit("keys") });
55113
+ return { name: g2.nodes[i2].display ?? name.split(".").pop(), ...counts2, target: isTarget(name) };
55087
55114
  };
55088
55115
  const showMe = (action) => {
55089
55116
  const i2 = tourExample();
@@ -39,9 +39,10 @@ Everything about one declaration; here `include=print` while Lean loads:
39
39
  a personal link, `by` their name now; `recordedBy`: typed for `by` by that person, at one screen
40
40
  (theirs all the same); `trustedBy`: covering prefixes, or `["standard axiom"]`.
41
41
  - `editedSinceCompiled`: file differs from what was compiled (null outside the project); `keyFor`,
42
- `inTcbOf`: targets it is key for, whose TCB holds it; `usesDirect`, `usedBy.direct`: what it
43
- refers to by name, what refers to it (`uses`, `users` list them); `usedBy.all`: all reaching it,
44
- proofs included.
42
+ `inTcbOf`: targets it is key for, whose TCB holds it; `tcbSize`: its TCB besides it, by where,
43
+ trusted included (a TCB's size leaves them out: `tcb`'s `needReview`, `trustedNotCounted`);
44
+ `usesDirect`, `usedBy.direct`: what it refers to by name, what refers to it (`uses`, `users` list
45
+ them); `usedBy.all`: all reaching it, proofs included.
45
46
 
46
47
  **`include`**: comma-separated parts, each answered under its name as its endpoint would. `uses`,
47
48
  `users` take `offset`, `limit`, `where` from the query; `print` takes `proofs`; `describe` and
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "visualproof",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "type": "module",
5
5
  "description": "See a Lean codebase's declaration graph and the TCB of its theorems.",
6
6
  "license": "Apache-2.0",