Repository files navigation

CHARM13

CHARM13 finite-model inspection geometry


Field guide: CHARM13 and budgeted inspection

Positioning

CHARM13 is an engineering system for habitat camouflage evaluation and construction around encrypted volumes, together with a finite-model research program on budgeted adaptive distinguishability of attributed filesystem trees.

It does not introduce a new cipher. Confidentiality of bytes is external L0 (e.g. VeraCrypt). CHARM13 owns cover naturalness, detection, and refuse-on-blown.

LayerRoleOwner
Cryptographic ciphertextSecrecy of contentExternal L0 (VeraCrypt, etc.)
Cover / habitat storyOn-disk narrativeCHARM13 forge + inspect

Most tools stop at the ciphertext. CHARM13 runs construct → measure → refuse.

Full field notes: docs/FIELD_GUIDE.md. Doctrine: docs/MASTER.md. T1 budget: docs/T1_BUDGET.md.

pip install -e .
charm doctor
charm bench
charm forge -o D:\packs\demo -t photo_library --placeholder -s 1024 --force
charm smell D:\packs\demo -t photo_library

Preface (mathematical notes)

These notes develop the comparison between adaptive and nonadaptive observation under a fixed look budget $B$, measured in total variation of transcript laws. The ambient setting is finite. Queries are maps $q\colon W\to Y_q$. Unless otherwise stated they are open: globally addressable, of unit cost, and non-destructive.

The principal quantity is the worst-case additive gap at budget two under active arity at most $K$:

$$ G_2(K)=\sup\bigl(D_2^{\mathrm{ad}}-D_2^{\mathrm{na}}\bigr)=1-\frac1K. $$

The identity is proved inside the frozen model below and is attained by an explicit construction. Whether the package is new relative to the broader literature on sequential testing and costly feature acquisition is left open; the abstract existence of adaptive gains is classical. What is collected here is a closed finite theory: flattening, root-arity, equality classification of the binary extremizer, habitat-shaped closed forms, exact rational certificates, and the consequences for a static detection checklist used as engineering quality control.

We do not claim laboratory (T4) hardness, a new cipher, or a probabilistic interpretation of severity scores.

Contents of the mathematical part.
research/THEOREMS.md (catalog) · research/m5/SEED_THEOREMS.md (proofs) · research/LADDER_MASTER.md (missions M4–M18).


§1. Notation

Let $W$ be a finite set of worlds and let $P,Q$ be probability distributions on $W$. Write $\mu=P-Q$ for the signed mass and

$$ r=\bigl|\{w:\mu(w)\ne 0\}\bigr| $$

for the size of the active support. A policy of budget $B$ is either adaptive (a decision tree of depth at most $B$) or nonadaptive (a fixed collection of at most $B$ queries). The quantities $D_B^{\mathrm{ad}}(P,Q)$ and $D_B^{\mathrm{na}}(P,Q)$ are the respective maximal transcript total variations.


§2. Principal results (OPEN model)

Theorem (Flattening).

If $r\le B+1$, then

$$ D_B^{\mathrm{ad}}(P,Q)=D_B^{\mathrm{na}}(P,Q). $$

In particular, a strict adaptivity gap at budget two requires at least four active worlds.

Theorem (Root-arity and sharp gap).

If every query has active arity at most $K$, then

$$ D_2^{\mathrm{ad}}\le K\,D_2^{\mathrm{na}}, \qquad D_2^{\mathrm{ad}}-D_2^{\mathrm{na}}\le 1-\frac1K. $$

Both bounds are sharp: there exists a finite system with $D_2^{\mathrm{ad}}=1$ and $D_2^{\mathrm{na}}=1/K$. Consequently

$$ \boxed{G_2(K)=1-\dfrac{1}{K}.} $$

Theorem (Binary extremizer).

For $K=2$ the additive gap is at most $1/2$. Among four-world, binary, OPEN systems attaining the bound, the extremal geometry is unique up to the natural symmetries and coincides with the four-world butterfly recorded in the M4/M5 notes.

Remark (Priority).

The sharp seed package is proved in the frozen model. Its literature priority is unresolved. Residual contributions emphasized here are support flattening, the exact root-arity envelope, equality classification, habitat closed forms, and the engineering corollaries in §6.

Identity wall

Signed-measure formalism

Flattening and sharp budget-two law

Address matching construction

Four-world butterfly extremizer

Closed-form board

Budget-2 adaptivity envelope

Gap growth

G2 approaches 1

Dual envelopes

3D Gap_B(k) surface

3D G2(K,r) envelope sketch


§3. Formal apparatus

$$ \mu:=P-Q,\quad \sum_{w\in W}\mu(w)=0,\quad S_\mu=\{w:\mu(w)\ne0\},\quad r=|S_\mu|. $$

$$ V_\mu(\Pi)=\frac12\sum_{C\in\Pi}|\mu(C)| =\mathrm{TV}(\mathrm{Law}_P T,\mathrm{Law}_Q T). $$

Bayes bridge (weighted classification trees):

$$ M(w,0)=\tfrac12 P(w),\; M(w,1)=\tfrac12 Q(w),\qquad V_\mu(\Pi)=1-2R(\Pi), $$

$$ D_B^{\mathrm{ad}}=1-2R_B^{\mathrm{tree}},\qquad D_B^{\mathrm{na}}=1-2R_B^{\mathrm{static}}. $$

Root-arity proof core: $V(\pi)=\sum_{i=1}^k v_i$ and $D_2^{\mathrm{na}}\ge\max_i v_i$, hence

$$ D_2^{\mathrm{ad}}\le K\,D_2^{\mathrm{na}},\qquad D_2^{\mathrm{ad}}-D_2^{\mathrm{na}}\le\Bigl(1-\frac1K\Bigr)D_2^{\mathrm{ad}}\le 1-\frac1K. $$

Matching address family $W_K=\{(i,x):i\le K,\;x\in\{0,1\}^K\}$:

$$ P(i,x)=\frac{\mathbf{1}_{x_i=0}}{K\,2^{K-1}},\quad Q(i,x)=\frac{\mathbf{1}_{x_i=1}}{K\,2^{K-1}},\quad g(i,x)=i,\; b_j(i,x)=x_j. $$

Remark (cyclic gate; pedagogical). The gate $g$ is a closed cyclic menu of $K$ branches. An adaptive policy of budget two names a branch on the cycle, then reads the bit on that branch. A nonadaptive policy may fix at most two queries and obtains total variation $1/K$. When $K=12$, circle-of-fifths labels are a mnemonic only. The matching of upper bound and construction closes the argument: $G_2(K)=1-1/K$. See research/ANALOGUES.md.

Cyclic gate: address construction

Adaptive walk on the cyclic gate

G2(K) approaches 1

Gain-sensitive support bound and open curve:

$$ D_2^{\mathrm{na}}\ge V_0+\max_i g_i,\qquad m\le\min\Bigl\{K,\Big\lfloor\tfrac r2\Big\rfloor\Bigr\}, $$

$$ G_2(K,r)=\sup\bigl\{D_2^{\mathrm{ad}}-D_2^{\mathrm{na}}:\mathrm{arity}\le K,\;|S_\mu|\le r\bigr\}. $$

Known anchors: $G_2(K,r)=0$ for $r\le 3$; $G_2(2,4)=1/2$; $G_2(K,\infty)=1-1/K$. Exact intermediate surface mostly open.

Stability and G2(K,r)

Support-constrained envelope sketch

Full write-up: research/THEOREMS.md · analytic proofs: research/m5/SEED_THEOREMS.md.


§4. Habitat-shaped families

The following closed forms describe filesystem-shaped query geometries. They are applications of the general apparatus, not replacements for the sharp law $G_2(K)$.

$k$-pair (which-then-bit). Uniform random branch; payload bit differs under the two hypotheses; off-branch bits return $\mathtt{na}$. Adaptive with budget two achieves TV $=1$; best nonadaptive suite of budget two achieves $2/k$. Gap $1-2/k\to 1$. Myopic “strongest local check first” never opens with the branch query; ratio $k/2\to\infty$.

All fixed budgets. On the same family, for every $B\ge 2$:

$$ D_B^{\mathrm{ad}}=1,\qquad D_B^{\mathrm{na}}=\frac{\min(B,k)}{k},\qquad \mathrm{Gap}_B(k)\to 1\ (k\to\infty). $$

A fixed-size checklist cannot uniformly bound adaptive risk across branching factors.

Gap for multiple budgets

Habitat closed forms

Parity payloads. Local bit marginals matched; global parity differs per branch. Perfect adaptive separation costs $B^\star_{\mathrm{ad}}=1+m$; perfect nonadaptive separation costs $B^\star_{\mathrm{na}}=k\cdot m$. Ratio unbounded in $k$:

$$ \frac{B^\star_{\mathrm{na}}}{B^\star_{\mathrm{ad}}}=\frac{km}{m+1}\to\infty. $$

Adaptive vs nonadaptive budget race

3D parity budget ratio surface

Capacity zero. Under adaptive inspection with $B\ge 2$ on the $k$-pair family, indistinguishability capacity for any $\varepsilon<1$ is zero. Large branching helps checklists; it does not help against which-then-bit.

Capacity zero under adaptive inspection

Myopic greedy blowup

Myopic greedy unbounded ratio

FamilyRoleGap / separation
Address construction (arity $K$)Extremal law$G_2(K)=1-1/K$
$k$-pairHabitat + greedy scar$1-2/k$ at $B=2$
Parity ($m$-bit)Budget race$B^\star_{\mathrm{ad}}=1+m$ vs $B^\star_{\mathrm{na}}=km$

§5. Certificates and figures

The identities above are accompanied by exact-rational machine checks.

pip install -e .
cd research\m5\EXPERIMENTS
python test_m5_exact.py # G_2(K)=1-1/K, butterfly, support
python test_m5.py # k-pair closed forms + greedy
cd ..\..\ladder
python run_ladder.py
python run_ladder_high.py
cd ..\m4\EXPERIMENTS
python test_certificates.py

On success: for $K=2,\ldots,7$ one has $\mathrm{ad}=1$ and $\mathrm{na}=1/K$; for the $k$-pair family with $k=2,\ldots,12$ one has $\mathrm{na}=2/k$. Figures and animations under assets/figures/ may be regenerated by python assets/render_figures.py and python assets/render_animations.py.


§6. Application: habitat cover construction

Encrypted volumes secure the confidentiality of bytes; they do not, by themselves, secure the narrative those bytes present on disk. The software layer collected in this repository constructs habitat-shaped cover trees, subjects them to a deterministic detection oracle, and refuses emission when the cover is judged blown. The cipher (Layer 0) is external. Cover construction and the refuse rule are internal.

The design may be read as a load path: construction (forge), inspection (charm smell), and a dual refuse gate. Severity aggregation is a monoid on ordinal weights, not a posterior probability of forgery. Laboratory-scale adversaries (T4) are excluded from the sealed claims. Static inspection is a nonadaptive checklist: necessary quality control, not a substitute for the adaptive envelopes of §§2–4.

charm doctor
charm bench
charm templates
charm forge -o D:\packs\demo -t photo_library --placeholder -s 1024 --force
charm smell D:\packs\demo -t photo_library
charm explain score_semantics
charm explain adaptive_t1
charm explain gate_before_local

FORGE → SMELL → REFUSE

Score semantics (binding)

Dual refuse gate

blown_score = 1 − Π_i (1 − w_sev(i)) # bad=0.55, warn=0.25, info=0.05
refused = (∃ finding with severity bad) ∨ (blown_score ≥ 0.6)
FactImplication
Weights are ordinalNot calibrated likelihoods or posteriors
Product is a monoidCommutative severity aggregation, not $\mathbb{P}(\text{generated})$
Dual gateOne bad finding alone scores 0.55 and still refuses
Clean reportNecessary for refuse automation—not a full adaptive T1 bound

Doctrine: docs/T1_BUDGET.md · naturalness: docs/NATURAL.md · master: docs/MASTER.md


§7. Threat model (load cases)

CaseAdversaryClaim
T0Glancing humanStrong on implemented tells
T1Curious technical peer, short sessionImproves cost of casual tells; static inspection is nonadaptive; see docs/T1_BUDGET.md
T2Offline stolen diskCrypto holds if L0 holds; cover may affect prioritization only
T3Compelled passwordNot claimed until CELLAR is complete
T4Laboratory process and timeNo claim.

Habitats

TemplateNarrative
adobe_cacheMedia cache debris (default)
steam_depotLocal depot fragment
vm_diskVM metadata + disk-like blob
photo_libraryManaged library store
sql_backupDatabase dump handoff
docker_cacheOverlay / layer residue
mail_storeMailbox export slice
iso_mirrorInstall media fragment
incomplete_downloadInterrupted transfer
wgs_labOptional sequencing pack habitat
genericUntyped bulk

Naturalness is habitat-relative. Opaque extensions for non-genuine formats. Specialist names require magic and membership. Famous public sample IDs forbidden as decoration. Published checksums must match bytes.


Commands

CommandPurpose
charm forgeBuild habitat tree + optional volume / placeholder
charm smellInspect tree: findings, severity score, dual refuse
charm benchCalibration fixtures (known-bad must blow)
charm explain [code]Finding catalog
charm doctorEnvironment + doctrine pointers
charm templatesList habitats
charm which-vcLocate VeraCrypt

Forge refuses blown covers by default. --i-know is an informed override. --write-seed is off by default. Size ceilings require --unsafe-size when deliberately exceeded.


Research ladder (M4–M18)

BandContent
M4Finite adaptive gap certificates, score hygiene, witnesses
M5Flattening, root-arity, $G_2(K)=1-1/K$, butterfly uniqueness, $k$-pair
M6–M9All-$B$ envelopes, greedy failure, checklist incompleteness, capacity zero
M10–M13Closed forms vs DP, doctrine pack, parity budgets, unbounded separation
M14–M18Nesting, score–LR reversals, query complexity, randomized NA, mega-pack

Reproduce: ladder runners + M4/M5 test suites. Static and animated figures are first-class artifacts of the certificates, not decoration.

Open frontier. Support-constrained curve $G_2(K,r)$; equality for $K>2$; sharp $G_B(K)$ for $B\ge 3$; guarded compilation; Lean formalization of the seed package; completed primary-source collision.


Explicit non-goals

  • Inventing or “improving” ciphers
  • Probability-of-generation marketing for blown_score
  • Operational guidance for concealing material from forensic inspection
  • Exhaustive file-type encyclopedias
  • T4 claims under any packaging
  • Literature-novelty press language for the sharp seed package

§8. Software layout (abbreviated)

charm
├── forge construction sequence + refuse joint
├── smell as-built detection oracle + severity monoid + dual gate
├── props habitat members (decoy trees)
├── caliper size bands / opaque payload policy
├── ecology specialist families + habitat membership
├── forgery seeded identity fields
├── kernel foundation L0 (VeraCrypt create)
├── bench known-bad load tests
└── catalog detail catalog (explain surface)

Process: docs/SKUNKWORKS.md · security: SECURITY.md · field notes: docs/FIELD_GUIDE.md


Colors

Purdue black#000000 / #0A0A0A · old gold#CFB991 · Boiler Up.

Colophon

David Lombardo · MIT License · v0.3.8
github.com/coldbricks/charm13

All mathematical claims are relative to the finite models named in the text. Open questions are listed in the theorem catalog.

About

Notes on budgeted adaptive inspection in finite models. Exact envelopes G2(K)=1-1/K. Certificates. Engineering corollary for habitat cover.

Resources

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Repository files navigation

CHARM13

CHARM13 finite-model inspection geometry


Field guide: CHARM13 and budgeted inspection

Positioning

CHARM13 is an engineering system for habitat camouflage evaluation and construction around encrypted volumes, together with a finite-model research program on budgeted adaptive distinguishability of attributed filesystem trees.

It does not introduce a new cipher. Confidentiality of bytes is external L0 (e.g. VeraCrypt). CHARM13 owns cover naturalness, detection, and refuse-on-blown.

LayerRoleOwner
Cryptographic ciphertextSecrecy of contentExternal L0 (VeraCrypt, etc.)
Cover / habitat storyOn-disk narrativeCHARM13 forge + inspect

Most tools stop at the ciphertext. CHARM13 runs construct → measure → refuse.

Full field notes: docs/FIELD_GUIDE.md. Doctrine: docs/MASTER.md. T1 budget: docs/T1_BUDGET.md.

pip install -e .
charm doctor
charm bench
charm forge -o D:\packs\demo -t photo_library --placeholder -s 1024 --force
charm smell D:\packs\demo -t photo_library

Preface (mathematical notes)

These notes develop the comparison between adaptive and nonadaptive observation under a fixed look budget $B$, measured in total variation of transcript laws. The ambient setting is finite. Queries are maps $q\colon W\to Y_q$. Unless otherwise stated they are open: globally addressable, of unit cost, and non-destructive.

The principal quantity is the worst-case additive gap at budget two under active arity at most $K$:

$$ G_2(K)=\sup\bigl(D_2^{\mathrm{ad}}-D_2^{\mathrm{na}}\bigr)=1-\frac1K. $$

The identity is proved inside the frozen model below and is attained by an explicit construction. Whether the package is new relative to the broader literature on sequential testing and costly feature acquisition is left open; the abstract existence of adaptive gains is classical. What is collected here is a closed finite theory: flattening, root-arity, equality classification of the binary extremizer, habitat-shaped closed forms, exact rational certificates, and the consequences for a static detection checklist used as engineering quality control.

We do not claim laboratory (T4) hardness, a new cipher, or a probabilistic interpretation of severity scores.

Contents of the mathematical part.
research/THEOREMS.md (catalog) · research/m5/SEED_THEOREMS.md (proofs) · research/LADDER_MASTER.md (missions M4–M18).


§1. Notation

Let $W$ be a finite set of worlds and let $P,Q$ be probability distributions on $W$. Write $\mu=P-Q$ for the signed mass and

$$ r=\bigl|\{w:\mu(w)\ne 0\}\bigr| $$

for the size of the active support. A policy of budget $B$ is either adaptive (a decision tree of depth at most $B$) or nonadaptive (a fixed collection of at most $B$ queries). The quantities $D_B^{\mathrm{ad}}(P,Q)$ and $D_B^{\mathrm{na}}(P,Q)$ are the respective maximal transcript total variations.


§2. Principal results (OPEN model)

Theorem (Flattening).

If $r\le B+1$, then

$$ D_B^{\mathrm{ad}}(P,Q)=D_B^{\mathrm{na}}(P,Q). $$

In particular, a strict adaptivity gap at budget two requires at least four active worlds.

Theorem (Root-arity and sharp gap).

If every query has active arity at most $K$, then

$$ D_2^{\mathrm{ad}}\le K\,D_2^{\mathrm{na}}, \qquad D_2^{\mathrm{ad}}-D_2^{\mathrm{na}}\le 1-\frac1K. $$

Both bounds are sharp: there exists a finite system with $D_2^{\mathrm{ad}}=1$ and $D_2^{\mathrm{na}}=1/K$. Consequently

$$ \boxed{G_2(K)=1-\dfrac{1}{K}.} $$

Theorem (Binary extremizer).

For $K=2$ the additive gap is at most $1/2$. Among four-world, binary, OPEN systems attaining the bound, the extremal geometry is unique up to the natural symmetries and coincides with the four-world butterfly recorded in the M4/M5 notes.

Remark (Priority).

The sharp seed package is proved in the frozen model. Its literature priority is unresolved. Residual contributions emphasized here are support flattening, the exact root-arity envelope, equality classification, habitat closed forms, and the engineering corollaries in §6.

Identity wall

Signed-measure formalism

Flattening and sharp budget-two law

Address matching construction

Four-world butterfly extremizer

Closed-form board

Budget-2 adaptivity envelope

Gap growth

G2 approaches 1

Dual envelopes

3D Gap_B(k) surface

3D G2(K,r) envelope sketch


§3. Formal apparatus

$$ \mu:=P-Q,\quad \sum_{w\in W}\mu(w)=0,\quad S_\mu=\{w:\mu(w)\ne0\},\quad r=|S_\mu|. $$

$$ V_\mu(\Pi)=\frac12\sum_{C\in\Pi}|\mu(C)| =\mathrm{TV}(\mathrm{Law}_P T,\mathrm{Law}_Q T). $$

Bayes bridge (weighted classification trees):

$$ M(w,0)=\tfrac12 P(w),\; M(w,1)=\tfrac12 Q(w),\qquad V_\mu(\Pi)=1-2R(\Pi), $$

$$ D_B^{\mathrm{ad}}=1-2R_B^{\mathrm{tree}},\qquad D_B^{\mathrm{na}}=1-2R_B^{\mathrm{static}}. $$

Root-arity proof core: $V(\pi)=\sum_{i=1}^k v_i$ and $D_2^{\mathrm{na}}\ge\max_i v_i$, hence

$$ D_2^{\mathrm{ad}}\le K\,D_2^{\mathrm{na}},\qquad D_2^{\mathrm{ad}}-D_2^{\mathrm{na}}\le\Bigl(1-\frac1K\Bigr)D_2^{\mathrm{ad}}\le 1-\frac1K. $$

Matching address family $W_K=\{(i,x):i\le K,\;x\in\{0,1\}^K\}$:

$$ P(i,x)=\frac{\mathbf{1}_{x_i=0}}{K\,2^{K-1}},\quad Q(i,x)=\frac{\mathbf{1}_{x_i=1}}{K\,2^{K-1}},\quad g(i,x)=i,\; b_j(i,x)=x_j. $$

Remark (cyclic gate; pedagogical). The gate $g$ is a closed cyclic menu of $K$ branches. An adaptive policy of budget two names a branch on the cycle, then reads the bit on that branch. A nonadaptive policy may fix at most two queries and obtains total variation $1/K$. When $K=12$, circle-of-fifths labels are a mnemonic only. The matching of upper bound and construction closes the argument: $G_2(K)=1-1/K$. See research/ANALOGUES.md.

Cyclic gate: address construction

Adaptive walk on the cyclic gate

G2(K) approaches 1

Gain-sensitive support bound and open curve:

$$ D_2^{\mathrm{na}}\ge V_0+\max_i g_i,\qquad m\le\min\Bigl\{K,\Big\lfloor\tfrac r2\Big\rfloor\Bigr\}, $$

$$ G_2(K,r)=\sup\bigl\{D_2^{\mathrm{ad}}-D_2^{\mathrm{na}}:\mathrm{arity}\le K,\;|S_\mu|\le r\bigr\}. $$

Known anchors: $G_2(K,r)=0$ for $r\le 3$; $G_2(2,4)=1/2$; $G_2(K,\infty)=1-1/K$. Exact intermediate surface mostly open.

Stability and G2(K,r)

Support-constrained envelope sketch

Full write-up: research/THEOREMS.md · analytic proofs: research/m5/SEED_THEOREMS.md.


§4. Habitat-shaped families

The following closed forms describe filesystem-shaped query geometries. They are applications of the general apparatus, not replacements for the sharp law $G_2(K)$.

$k$-pair (which-then-bit). Uniform random branch; payload bit differs under the two hypotheses; off-branch bits return $\mathtt{na}$. Adaptive with budget two achieves TV $=1$; best nonadaptive suite of budget two achieves $2/k$. Gap $1-2/k\to 1$. Myopic “strongest local check first” never opens with the branch query; ratio $k/2\to\infty$.

All fixed budgets. On the same family, for every $B\ge 2$:

$$ D_B^{\mathrm{ad}}=1,\qquad D_B^{\mathrm{na}}=\frac{\min(B,k)}{k},\qquad \mathrm{Gap}_B(k)\to 1\ (k\to\infty). $$

A fixed-size checklist cannot uniformly bound adaptive risk across branching factors.

Gap for multiple budgets

Habitat closed forms

Parity payloads. Local bit marginals matched; global parity differs per branch. Perfect adaptive separation costs $B^\star_{\mathrm{ad}}=1+m$; perfect nonadaptive separation costs $B^\star_{\mathrm{na}}=k\cdot m$. Ratio unbounded in $k$:

$$ \frac{B^\star_{\mathrm{na}}}{B^\star_{\mathrm{ad}}}=\frac{km}{m+1}\to\infty. $$

Adaptive vs nonadaptive budget race

3D parity budget ratio surface

Capacity zero. Under adaptive inspection with $B\ge 2$ on the $k$-pair family, indistinguishability capacity for any $\varepsilon<1$ is zero. Large branching helps checklists; it does not help against which-then-bit.

Capacity zero under adaptive inspection

Myopic greedy blowup

Myopic greedy unbounded ratio

FamilyRoleGap / separation
Address construction (arity $K$)Extremal law$G_2(K)=1-1/K$
$k$-pairHabitat + greedy scar$1-2/k$ at $B=2$
Parity ($m$-bit)Budget race$B^\star_{\mathrm{ad}}=1+m$ vs $B^\star_{\mathrm{na}}=km$

§5. Certificates and figures

The identities above are accompanied by exact-rational machine checks.

pip install -e .
cd research\m5\EXPERIMENTS
python test_m5_exact.py # G_2(K)=1-1/K, butterfly, support
python test_m5.py # k-pair closed forms + greedy
cd ..\..\ladder
python run_ladder.py
python run_ladder_high.py
cd ..\m4\EXPERIMENTS
python test_certificates.py

On success: for $K=2,\ldots,7$ one has $\mathrm{ad}=1$ and $\mathrm{na}=1/K$; for the $k$-pair family with $k=2,\ldots,12$ one has $\mathrm{na}=2/k$. Figures and animations under assets/figures/ may be regenerated by python assets/render_figures.py and python assets/render_animations.py.


§6. Application: habitat cover construction

Encrypted volumes secure the confidentiality of bytes; they do not, by themselves, secure the narrative those bytes present on disk. The software layer collected in this repository constructs habitat-shaped cover trees, subjects them to a deterministic detection oracle, and refuses emission when the cover is judged blown. The cipher (Layer 0) is external. Cover construction and the refuse rule are internal.

The design may be read as a load path: construction (forge), inspection (charm smell), and a dual refuse gate. Severity aggregation is a monoid on ordinal weights, not a posterior probability of forgery. Laboratory-scale adversaries (T4) are excluded from the sealed claims. Static inspection is a nonadaptive checklist: necessary quality control, not a substitute for the adaptive envelopes of §§2–4.

charm doctor
charm bench
charm templates
charm forge -o D:\packs\demo -t photo_library --placeholder -s 1024 --force
charm smell D:\packs\demo -t photo_library
charm explain score_semantics
charm explain adaptive_t1
charm explain gate_before_local

FORGE → SMELL → REFUSE

Score semantics (binding)

Dual refuse gate

blown_score = 1 − Π_i (1 − w_sev(i)) # bad=0.55, warn=0.25, info=0.05
refused = (∃ finding with severity bad) ∨ (blown_score ≥ 0.6)
FactImplication
Weights are ordinalNot calibrated likelihoods or posteriors
Product is a monoidCommutative severity aggregation, not $\mathbb{P}(\text{generated})$
Dual gateOne bad finding alone scores 0.55 and still refuses
Clean reportNecessary for refuse automation—not a full adaptive T1 bound

Doctrine: docs/T1_BUDGET.md · naturalness: docs/NATURAL.md · master: docs/MASTER.md


§7. Threat model (load cases)

CaseAdversaryClaim
T0Glancing humanStrong on implemented tells
T1Curious technical peer, short sessionImproves cost of casual tells; static inspection is nonadaptive; see docs/T1_BUDGET.md
T2Offline stolen diskCrypto holds if L0 holds; cover may affect prioritization only
T3Compelled passwordNot claimed until CELLAR is complete
T4Laboratory process and timeNo claim.

Habitats

TemplateNarrative
adobe_cacheMedia cache debris (default)
steam_depotLocal depot fragment
vm_diskVM metadata + disk-like blob
photo_libraryManaged library store
sql_backupDatabase dump handoff
docker_cacheOverlay / layer residue
mail_storeMailbox export slice
iso_mirrorInstall media fragment
incomplete_downloadInterrupted transfer
wgs_labOptional sequencing pack habitat
genericUntyped bulk

Naturalness is habitat-relative. Opaque extensions for non-genuine formats. Specialist names require magic and membership. Famous public sample IDs forbidden as decoration. Published checksums must match bytes.


Commands

CommandPurpose
charm forgeBuild habitat tree + optional volume / placeholder
charm smellInspect tree: findings, severity score, dual refuse
charm benchCalibration fixtures (known-bad must blow)
charm explain [code]Finding catalog
charm doctorEnvironment + doctrine pointers
charm templatesList habitats
charm which-vcLocate VeraCrypt

Forge refuses blown covers by default. --i-know is an informed override. --write-seed is off by default. Size ceilings require --unsafe-size when deliberately exceeded.


Research ladder (M4–M18)

BandContent
M4Finite adaptive gap certificates, score hygiene, witnesses
M5Flattening, root-arity, $G_2(K)=1-1/K$, butterfly uniqueness, $k$-pair
M6–M9All-$B$ envelopes, greedy failure, checklist incompleteness, capacity zero
M10–M13Closed forms vs DP, doctrine pack, parity budgets, unbounded separation
M14–M18Nesting, score–LR reversals, query complexity, randomized NA, mega-pack

Reproduce: ladder runners + M4/M5 test suites. Static and animated figures are first-class artifacts of the certificates, not decoration.

Open frontier. Support-constrained curve $G_2(K,r)$; equality for $K>2$; sharp $G_B(K)$ for $B\ge 3$; guarded compilation; Lean formalization of the seed package; completed primary-source collision.


Explicit non-goals

  • Inventing or “improving” ciphers
  • Probability-of-generation marketing for blown_score
  • Operational guidance for concealing material from forensic inspection
  • Exhaustive file-type encyclopedias
  • T4 claims under any packaging
  • Literature-novelty press language for the sharp seed package

§8. Software layout (abbreviated)

charm
├── forge construction sequence + refuse joint
├── smell as-built detection oracle + severity monoid + dual gate
├── props habitat members (decoy trees)
├── caliper size bands / opaque payload policy
├── ecology specialist families + habitat membership
├── forgery seeded identity fields
├── kernel foundation L0 (VeraCrypt create)
├── bench known-bad load tests
└── catalog detail catalog (explain surface)

Process: docs/SKUNKWORKS.md · security: SECURITY.md · field notes: docs/FIELD_GUIDE.md


Colors

Purdue black#000000 / #0A0A0A · old gold#CFB991 · Boiler Up.

Colophon

David Lombardo · MIT License · v0.3.8
github.com/coldbricks/charm13

All mathematical claims are relative to the finite models named in the text. Open questions are listed in the theorem catalog.

About

Notes on budgeted adaptive inspection in finite models. Exact envelopes G2(K)=1-1/K. Certificates. Engineering corollary for habitat cover.

Resources

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

CHARM13

CHARM13 finite-model inspection geometry


Field guide: CHARM13 and budgeted inspection

Positioning

CHARM13 is an engineering system for habitat camouflage evaluation and construction around encrypted volumes, together with a finite-model research program on budgeted adaptive distinguishability of attributed filesystem trees.

It does not introduce a new cipher. Confidentiality of bytes is external L0 (e.g. VeraCrypt). CHARM13 owns cover naturalness, detection, and refuse-on-blown.

LayerRoleOwner
Cryptographic ciphertextSecrecy of contentExternal L0 (VeraCrypt, etc.)
Cover / habitat storyOn-disk narrativeCHARM13 forge + inspect

Most tools stop at the ciphertext. CHARM13 runs construct → measure → refuse.

Full field notes: docs/FIELD_GUIDE.md. Doctrine: docs/MASTER.md. T1 budget: docs/T1_BUDGET.md.

pip install -e .
charm doctor
charm bench
charm forge -o D:\packs\demo -t photo_library --placeholder -s 1024 --force
charm smell D:\packs\demo -t photo_library

Preface (mathematical notes)

These notes develop the comparison between adaptive and nonadaptive observation under a fixed look budget $B$, measured in total variation of transcript laws. The ambient setting is finite. Queries are maps $q\colon W\to Y_q$. Unless otherwise stated they are open: globally addressable, of unit cost, and non-destructive.

The principal quantity is the worst-case additive gap at budget two under active arity at most $K$:

$$ G_2(K)=\sup\bigl(D_2^{\mathrm{ad}}-D_2^{\mathrm{na}}\bigr)=1-\frac1K. $$

The identity is proved inside the frozen model below and is attained by an explicit construction. Whether the package is new relative to the broader literature on sequential testing and costly feature acquisition is left open; the abstract existence of adaptive gains is classical. What is collected here is a closed finite theory: flattening, root-arity, equality classification of the binary extremizer, habitat-shaped closed forms, exact rational certificates, and the consequences for a static detection checklist used as engineering quality control.

We do not claim laboratory (T4) hardness, a new cipher, or a probabilistic interpretation of severity scores.

Contents of the mathematical part.
research/THEOREMS.md (catalog) · research/m5/SEED_THEOREMS.md (proofs) · research/LADDER_MASTER.md (missions M4–M18).


§1. Notation

Let $W$ be a finite set of worlds and let $P,Q$ be probability distributions on $W$. Write $\mu=P-Q$ for the signed mass and

$$ r=\bigl|\{w:\mu(w)\ne 0\}\bigr| $$

for the size of the active support. A policy of budget $B$ is either adaptive (a decision tree of depth at most $B$) or nonadaptive (a fixed collection of at most $B$ queries). The quantities $D_B^{\mathrm{ad}}(P,Q)$ and $D_B^{\mathrm{na}}(P,Q)$ are the respective maximal transcript total variations.


§2. Principal results (OPEN model)

Theorem (Flattening).

If $r\le B+1$, then

$$ D_B^{\mathrm{ad}}(P,Q)=D_B^{\mathrm{na}}(P,Q). $$

In particular, a strict adaptivity gap at budget two requires at least four active worlds.

Theorem (Root-arity and sharp gap).

If every query has active arity at most $K$, then

$$ D_2^{\mathrm{ad}}\le K\,D_2^{\mathrm{na}}, \qquad D_2^{\mathrm{ad}}-D_2^{\mathrm{na}}\le 1-\frac1K. $$

Both bounds are sharp: there exists a finite system with $D_2^{\mathrm{ad}}=1$ and $D_2^{\mathrm{na}}=1/K$. Consequently

$$ \boxed{G_2(K)=1-\dfrac{1}{K}.} $$

Theorem (Binary extremizer).

For $K=2$ the additive gap is at most $1/2$. Among four-world, binary, OPEN systems attaining the bound, the extremal geometry is unique up to the natural symmetries and coincides with the four-world butterfly recorded in the M4/M5 notes.

Remark (Priority).

The sharp seed package is proved in the frozen model. Its literature priority is unresolved. Residual contributions emphasized here are support flattening, the exact root-arity envelope, equality classification, habitat closed forms, and the engineering corollaries in §6.

Identity wall

Signed-measure formalism

Flattening and sharp budget-two law

Address matching construction

Four-world butterfly extremizer

Closed-form board

Budget-2 adaptivity envelope

Gap growth

G2 approaches 1

Dual envelopes

3D Gap_B(k) surface

3D G2(K,r) envelope sketch


§3. Formal apparatus

$$ \mu:=P-Q,\quad \sum_{w\in W}\mu(w)=0,\quad S_\mu=\{w:\mu(w)\ne0\},\quad r=|S_\mu|. $$

$$ V_\mu(\Pi)=\frac12\sum_{C\in\Pi}|\mu(C)| =\mathrm{TV}(\mathrm{Law}_P T,\mathrm{Law}_Q T). $$

Bayes bridge (weighted classification trees):

$$ M(w,0)=\tfrac12 P(w),\; M(w,1)=\tfrac12 Q(w),\qquad V_\mu(\Pi)=1-2R(\Pi), $$

$$ D_B^{\mathrm{ad}}=1-2R_B^{\mathrm{tree}},\qquad D_B^{\mathrm{na}}=1-2R_B^{\mathrm{static}}. $$

Root-arity proof core: $V(\pi)=\sum_{i=1}^k v_i$ and $D_2^{\mathrm{na}}\ge\max_i v_i$, hence

$$ D_2^{\mathrm{ad}}\le K\,D_2^{\mathrm{na}},\qquad D_2^{\mathrm{ad}}-D_2^{\mathrm{na}}\le\Bigl(1-\frac1K\Bigr)D_2^{\mathrm{ad}}\le 1-\frac1K. $$

Matching address family $W_K=\{(i,x):i\le K,\;x\in\{0,1\}^K\}$:

$$ P(i,x)=\frac{\mathbf{1}_{x_i=0}}{K\,2^{K-1}},\quad Q(i,x)=\frac{\mathbf{1}_{x_i=1}}{K\,2^{K-1}},\quad g(i,x)=i,\; b_j(i,x)=x_j. $$

Remark (cyclic gate; pedagogical). The gate $g$ is a closed cyclic menu of $K$ branches. An adaptive policy of budget two names a branch on the cycle, then reads the bit on that branch. A nonadaptive policy may fix at most two queries and obtains total variation $1/K$. When $K=12$, circle-of-fifths labels are a mnemonic only. The matching of upper bound and construction closes the argument: $G_2(K)=1-1/K$. See research/ANALOGUES.md.

Cyclic gate: address construction

Adaptive walk on the cyclic gate

G2(K) approaches 1

Gain-sensitive support bound and open curve:

$$ D_2^{\mathrm{na}}\ge V_0+\max_i g_i,\qquad m\le\min\Bigl\{K,\Big\lfloor\tfrac r2\Big\rfloor\Bigr\}, $$

$$ G_2(K,r)=\sup\bigl\{D_2^{\mathrm{ad}}-D_2^{\mathrm{na}}:\mathrm{arity}\le K,\;|S_\mu|\le r\bigr\}. $$

Known anchors: $G_2(K,r)=0$ for $r\le 3$; $G_2(2,4)=1/2$; $G_2(K,\infty)=1-1/K$. Exact intermediate surface mostly open.

Stability and G2(K,r)

Support-constrained envelope sketch

Full write-up: research/THEOREMS.md · analytic proofs: research/m5/SEED_THEOREMS.md.


§4. Habitat-shaped families

The following closed forms describe filesystem-shaped query geometries. They are applications of the general apparatus, not replacements for the sharp law $G_2(K)$.

$k$-pair (which-then-bit). Uniform random branch; payload bit differs under the two hypotheses; off-branch bits return $\mathtt{na}$. Adaptive with budget two achieves TV $=1$; best nonadaptive suite of budget two achieves $2/k$. Gap $1-2/k\to 1$. Myopic “strongest local check first” never opens with the branch query; ratio $k/2\to\infty$.

All fixed budgets. On the same family, for every $B\ge 2$:

$$ D_B^{\mathrm{ad}}=1,\qquad D_B^{\mathrm{na}}=\frac{\min(B,k)}{k},\qquad \mathrm{Gap}_B(k)\to 1\ (k\to\infty). $$

A fixed-size checklist cannot uniformly bound adaptive risk across branching factors.

Gap for multiple budgets

Habitat closed forms

Parity payloads. Local bit marginals matched; global parity differs per branch. Perfect adaptive separation costs $B^\star_{\mathrm{ad}}=1+m$; perfect nonadaptive separation costs $B^\star_{\mathrm{na}}=k\cdot m$. Ratio unbounded in $k$:

$$ \frac{B^\star_{\mathrm{na}}}{B^\star_{\mathrm{ad}}}=\frac{km}{m+1}\to\infty. $$

Adaptive vs nonadaptive budget race

3D parity budget ratio surface

Capacity zero. Under adaptive inspection with $B\ge 2$ on the $k$-pair family, indistinguishability capacity for any $\varepsilon<1$ is zero. Large branching helps checklists; it does not help against which-then-bit.

Capacity zero under adaptive inspection

Myopic greedy blowup

Myopic greedy unbounded ratio

FamilyRoleGap / separation
Address construction (arity $K$)Extremal law$G_2(K)=1-1/K$
$k$-pairHabitat + greedy scar$1-2/k$ at $B=2$
Parity ($m$-bit)Budget race$B^\star_{\mathrm{ad}}=1+m$ vs $B^\star_{\mathrm{na}}=km$

§5. Certificates and figures

The identities above are accompanied by exact-rational machine checks.

pip install -e .
cd research\m5\EXPERIMENTS
python test_m5_exact.py # G_2(K)=1-1/K, butterfly, support
python test_m5.py # k-pair closed forms + greedy
cd ..\..\ladder
python run_ladder.py
python run_ladder_high.py
cd ..\m4\EXPERIMENTS
python test_certificates.py

On success: for $K=2,\ldots,7$ one has $\mathrm{ad}=1$ and $\mathrm{na}=1/K$; for the $k$-pair family with $k=2,\ldots,12$ one has $\mathrm{na}=2/k$. Figures and animations under assets/figures/ may be regenerated by python assets/render_figures.py and python assets/render_animations.py.


§6. Application: habitat cover construction

Encrypted volumes secure the confidentiality of bytes; they do not, by themselves, secure the narrative those bytes present on disk. The software layer collected in this repository constructs habitat-shaped cover trees, subjects them to a deterministic detection oracle, and refuses emission when the cover is judged blown. The cipher (Layer 0) is external. Cover construction and the refuse rule are internal.

The design may be read as a load path: construction (forge), inspection (charm smell), and a dual refuse gate. Severity aggregation is a monoid on ordinal weights, not a posterior probability of forgery. Laboratory-scale adversaries (T4) are excluded from the sealed claims. Static inspection is a nonadaptive checklist: necessary quality control, not a substitute for the adaptive envelopes of §§2–4.

charm doctor
charm bench
charm templates
charm forge -o D:\packs\demo -t photo_library --placeholder -s 1024 --force
charm smell D:\packs\demo -t photo_library
charm explain score_semantics
charm explain adaptive_t1
charm explain gate_before_local

FORGE → SMELL → REFUSE

Score semantics (binding)

Dual refuse gate

blown_score = 1 − Π_i (1 − w_sev(i)) # bad=0.55, warn=0.25, info=0.05
refused = (∃ finding with severity bad) ∨ (blown_score ≥ 0.6)
FactImplication
Weights are ordinalNot calibrated likelihoods or posteriors
Product is a monoidCommutative severity aggregation, not $\mathbb{P}(\text{generated})$
Dual gateOne bad finding alone scores 0.55 and still refuses
Clean reportNecessary for refuse automation—not a full adaptive T1 bound

Doctrine: docs/T1_BUDGET.md · naturalness: docs/NATURAL.md · master: docs/MASTER.md


§7. Threat model (load cases)

CaseAdversaryClaim
T0Glancing humanStrong on implemented tells
T1Curious technical peer, short sessionImproves cost of casual tells; static inspection is nonadaptive; see docs/T1_BUDGET.md
T2Offline stolen diskCrypto holds if L0 holds; cover may affect prioritization only
T3Compelled passwordNot claimed until CELLAR is complete
T4Laboratory process and timeNo claim.

Habitats

TemplateNarrative
adobe_cacheMedia cache debris (default)
steam_depotLocal depot fragment
vm_diskVM metadata + disk-like blob
photo_libraryManaged library store
sql_backupDatabase dump handoff
docker_cacheOverlay / layer residue
mail_storeMailbox export slice
iso_mirrorInstall media fragment
incomplete_downloadInterrupted transfer
wgs_labOptional sequencing pack habitat
genericUntyped bulk

Naturalness is habitat-relative. Opaque extensions for non-genuine formats. Specialist names require magic and membership. Famous public sample IDs forbidden as decoration. Published checksums must match bytes.


Commands

CommandPurpose
charm forgeBuild habitat tree + optional volume / placeholder
charm smellInspect tree: findings, severity score, dual refuse
charm benchCalibration fixtures (known-bad must blow)
charm explain [code]Finding catalog
charm doctorEnvironment + doctrine pointers
charm templatesList habitats
charm which-vcLocate VeraCrypt

Forge refuses blown covers by default. --i-know is an informed override. --write-seed is off by default. Size ceilings require --unsafe-size when deliberately exceeded.


Research ladder (M4–M18)

BandContent
M4Finite adaptive gap certificates, score hygiene, witnesses
M5Flattening, root-arity, $G_2(K)=1-1/K$, butterfly uniqueness, $k$-pair
M6–M9All-$B$ envelopes, greedy failure, checklist incompleteness, capacity zero
M10–M13Closed forms vs DP, doctrine pack, parity budgets, unbounded separation
M14–M18Nesting, score–LR reversals, query complexity, randomized NA, mega-pack

Reproduce: ladder runners + M4/M5 test suites. Static and animated figures are first-class artifacts of the certificates, not decoration.

Open frontier. Support-constrained curve $G_2(K,r)$; equality for $K>2$; sharp $G_B(K)$ for $B\ge 3$; guarded compilation; Lean formalization of the seed package; completed primary-source collision.


Explicit non-goals

  • Inventing or “improving” ciphers
  • Probability-of-generation marketing for blown_score
  • Operational guidance for concealing material from forensic inspection
  • Exhaustive file-type encyclopedias
  • T4 claims under any packaging
  • Literature-novelty press language for the sharp seed package

§8. Software layout (abbreviated)

charm
├── forge construction sequence + refuse joint
├── smell as-built detection oracle + severity monoid + dual gate
├── props habitat members (decoy trees)
├── caliper size bands / opaque payload policy
├── ecology specialist families + habitat membership
├── forgery seeded identity fields
├── kernel foundation L0 (VeraCrypt create)
├── bench known-bad load tests
└── catalog detail catalog (explain surface)

Process: docs/SKUNKWORKS.md · security: SECURITY.md · field notes: docs/FIELD_GUIDE.md


Colors

Purdue black#000000 / #0A0A0A · old gold#CFB991 · Boiler Up.

Colophon

David Lombardo · MIT License · v0.3.8
github.com/coldbricks/charm13

All mathematical claims are relative to the finite models named in the text. Open questions are listed in the theorem catalog.

About

Notes on budgeted adaptive inspection in finite models. Exact envelopes G2(K)=1-1/K. Certificates. Engineering corollary for habitat cover.

Resources

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

CHARM13

CHARM13 finite-model inspection geometry


Field guide: CHARM13 and budgeted inspection

Positioning

CHARM13 is an engineering system for habitat camouflage evaluation and construction around encrypted volumes, together with a finite-model research program on budgeted adaptive distinguishability of attributed filesystem trees.

It does not introduce a new cipher. Confidentiality of bytes is external L0 (e.g. VeraCrypt). CHARM13 owns cover naturalness, detection, and refuse-on-blown.

LayerRoleOwner
Cryptographic ciphertextSecrecy of contentExternal L0 (VeraCrypt, etc.)
Cover / habitat storyOn-disk narrativeCHARM13 forge + inspect

Most tools stop at the ciphertext. CHARM13 runs construct → measure → refuse.

Full field notes: docs/FIELD_GUIDE.md. Doctrine: docs/MASTER.md. T1 budget: docs/T1_BUDGET.md.

pip install -e .
charm doctor
charm bench
charm forge -o D:\packs\demo -t photo_library --placeholder -s 1024 --force
charm smell D:\packs\demo -t photo_library

Preface (mathematical notes)

These notes develop the comparison between adaptive and nonadaptive observation under a fixed look budget $B$, measured in total variation of transcript laws. The ambient setting is finite. Queries are maps $q\colon W\to Y_q$. Unless otherwise stated they are open: globally addressable, of unit cost, and non-destructive.

The principal quantity is the worst-case additive gap at budget two under active arity at most $K$:

$$ G_2(K)=\sup\bigl(D_2^{\mathrm{ad}}-D_2^{\mathrm{na}}\bigr)=1-\frac1K. $$

The identity is proved inside the frozen model below and is attained by an explicit construction. Whether the package is new relative to the broader literature on sequential testing and costly feature acquisition is left open; the abstract existence of adaptive gains is classical. What is collected here is a closed finite theory: flattening, root-arity, equality classification of the binary extremizer, habitat-shaped closed forms, exact rational certificates, and the consequences for a static detection checklist used as engineering quality control.

We do not claim laboratory (T4) hardness, a new cipher, or a probabilistic interpretation of severity scores.

Contents of the mathematical part.
research/THEOREMS.md (catalog) · research/m5/SEED_THEOREMS.md (proofs) · research/LADDER_MASTER.md (missions M4–M18).


§1. Notation

Let $W$ be a finite set of worlds and let $P,Q$ be probability distributions on $W$. Write $\mu=P-Q$ for the signed mass and

$$ r=\bigl|\{w:\mu(w)\ne 0\}\bigr| $$

for the size of the active support. A policy of budget $B$ is either adaptive (a decision tree of depth at most $B$) or nonadaptive (a fixed collection of at most $B$ queries). The quantities $D_B^{\mathrm{ad}}(P,Q)$ and $D_B^{\mathrm{na}}(P,Q)$ are the respective maximal transcript total variations.


§2. Principal results (OPEN model)

Theorem (Flattening).

If $r\le B+1$, then

$$ D_B^{\mathrm{ad}}(P,Q)=D_B^{\mathrm{na}}(P,Q). $$

In particular, a strict adaptivity gap at budget two requires at least four active worlds.

Theorem (Root-arity and sharp gap).

If every query has active arity at most $K$, then

$$ D_2^{\mathrm{ad}}\le K\,D_2^{\mathrm{na}}, \qquad D_2^{\mathrm{ad}}-D_2^{\mathrm{na}}\le 1-\frac1K. $$

Both bounds are sharp: there exists a finite system with $D_2^{\mathrm{ad}}=1$ and $D_2^{\mathrm{na}}=1/K$. Consequently

$$ \boxed{G_2(K)=1-\dfrac{1}{K}.} $$

Theorem (Binary extremizer).

For $K=2$ the additive gap is at most $1/2$. Among four-world, binary, OPEN systems attaining the bound, the extremal geometry is unique up to the natural symmetries and coincides with the four-world butterfly recorded in the M4/M5 notes.

Remark (Priority).

The sharp seed package is proved in the frozen model. Its literature priority is unresolved. Residual contributions emphasized here are support flattening, the exact root-arity envelope, equality classification, habitat closed forms, and the engineering corollaries in §6.

Identity wall

Signed-measure formalism

Flattening and sharp budget-two law

Address matching construction

Four-world butterfly extremizer

Closed-form board

Budget-2 adaptivity envelope

Gap growth

G2 approaches 1

Dual envelopes

3D Gap_B(k) surface

3D G2(K,r) envelope sketch


§3. Formal apparatus

$$ \mu:=P-Q,\quad \sum_{w\in W}\mu(w)=0,\quad S_\mu=\{w:\mu(w)\ne0\},\quad r=|S_\mu|. $$

$$ V_\mu(\Pi)=\frac12\sum_{C\in\Pi}|\mu(C)| =\mathrm{TV}(\mathrm{Law}_P T,\mathrm{Law}_Q T). $$

Bayes bridge (weighted classification trees):

$$ M(w,0)=\tfrac12 P(w),\; M(w,1)=\tfrac12 Q(w),\qquad V_\mu(\Pi)=1-2R(\Pi), $$

$$ D_B^{\mathrm{ad}}=1-2R_B^{\mathrm{tree}},\qquad D_B^{\mathrm{na}}=1-2R_B^{\mathrm{static}}. $$

Root-arity proof core: $V(\pi)=\sum_{i=1}^k v_i$ and $D_2^{\mathrm{na}}\ge\max_i v_i$, hence

$$ D_2^{\mathrm{ad}}\le K\,D_2^{\mathrm{na}},\qquad D_2^{\mathrm{ad}}-D_2^{\mathrm{na}}\le\Bigl(1-\frac1K\Bigr)D_2^{\mathrm{ad}}\le 1-\frac1K. $$

Matching address family $W_K=\{(i,x):i\le K,\;x\in\{0,1\}^K\}$:

$$ P(i,x)=\frac{\mathbf{1}_{x_i=0}}{K\,2^{K-1}},\quad Q(i,x)=\frac{\mathbf{1}_{x_i=1}}{K\,2^{K-1}},\quad g(i,x)=i,\; b_j(i,x)=x_j. $$

Remark (cyclic gate; pedagogical). The gate $g$ is a closed cyclic menu of $K$ branches. An adaptive policy of budget two names a branch on the cycle, then reads the bit on that branch. A nonadaptive policy may fix at most two queries and obtains total variation $1/K$. When $K=12$, circle-of-fifths labels are a mnemonic only. The matching of upper bound and construction closes the argument: $G_2(K)=1-1/K$. See research/ANALOGUES.md.

Cyclic gate: address construction

Adaptive walk on the cyclic gate

G2(K) approaches 1

Gain-sensitive support bound and open curve:

$$ D_2^{\mathrm{na}}\ge V_0+\max_i g_i,\qquad m\le\min\Bigl\{K,\Big\lfloor\tfrac r2\Big\rfloor\Bigr\}, $$

$$ G_2(K,r)=\sup\bigl\{D_2^{\mathrm{ad}}-D_2^{\mathrm{na}}:\mathrm{arity}\le K,\;|S_\mu|\le r\bigr\}. $$

Known anchors: $G_2(K,r)=0$ for $r\le 3$; $G_2(2,4)=1/2$; $G_2(K,\infty)=1-1/K$. Exact intermediate surface mostly open.

Stability and G2(K,r)

Support-constrained envelope sketch

Full write-up: research/THEOREMS.md · analytic proofs: research/m5/SEED_THEOREMS.md.


§4. Habitat-shaped families

The following closed forms describe filesystem-shaped query geometries. They are applications of the general apparatus, not replacements for the sharp law $G_2(K)$.

$k$-pair (which-then-bit). Uniform random branch; payload bit differs under the two hypotheses; off-branch bits return $\mathtt{na}$. Adaptive with budget two achieves TV $=1$; best nonadaptive suite of budget two achieves $2/k$. Gap $1-2/k\to 1$. Myopic “strongest local check first” never opens with the branch query; ratio $k/2\to\infty$.

All fixed budgets. On the same family, for every $B\ge 2$:

$$ D_B^{\mathrm{ad}}=1,\qquad D_B^{\mathrm{na}}=\frac{\min(B,k)}{k},\qquad \mathrm{Gap}_B(k)\to 1\ (k\to\infty). $$

A fixed-size checklist cannot uniformly bound adaptive risk across branching factors.

Gap for multiple budgets

Habitat closed forms

Parity payloads. Local bit marginals matched; global parity differs per branch. Perfect adaptive separation costs $B^\star_{\mathrm{ad}}=1+m$; perfect nonadaptive separation costs $B^\star_{\mathrm{na}}=k\cdot m$. Ratio unbounded in $k$:

$$ \frac{B^\star_{\mathrm{na}}}{B^\star_{\mathrm{ad}}}=\frac{km}{m+1}\to\infty. $$

Adaptive vs nonadaptive budget race

3D parity budget ratio surface

Capacity zero. Under adaptive inspection with $B\ge 2$ on the $k$-pair family, indistinguishability capacity for any $\varepsilon<1$ is zero. Large branching helps checklists; it does not help against which-then-bit.

Capacity zero under adaptive inspection

Myopic greedy blowup

Myopic greedy unbounded ratio

FamilyRoleGap / separation
Address construction (arity $K$)Extremal law$G_2(K)=1-1/K$
$k$-pairHabitat + greedy scar$1-2/k$ at $B=2$
Parity ($m$-bit)Budget race$B^\star_{\mathrm{ad}}=1+m$ vs $B^\star_{\mathrm{na}}=km$

§5. Certificates and figures

The identities above are accompanied by exact-rational machine checks.

pip install -e .
cd research\m5\EXPERIMENTS
python test_m5_exact.py # G_2(K)=1-1/K, butterfly, support
python test_m5.py # k-pair closed forms + greedy
cd ..\..\ladder
python run_ladder.py
python run_ladder_high.py
cd ..\m4\EXPERIMENTS
python test_certificates.py

On success: for $K=2,\ldots,7$ one has $\mathrm{ad}=1$ and $\mathrm{na}=1/K$; for the $k$-pair family with $k=2,\ldots,12$ one has $\mathrm{na}=2/k$. Figures and animations under assets/figures/ may be regenerated by python assets/render_figures.py and python assets/render_animations.py.


§6. Application: habitat cover construction

Encrypted volumes secure the confidentiality of bytes; they do not, by themselves, secure the narrative those bytes present on disk. The software layer collected in this repository constructs habitat-shaped cover trees, subjects them to a deterministic detection oracle, and refuses emission when the cover is judged blown. The cipher (Layer 0) is external. Cover construction and the refuse rule are internal.

The design may be read as a load path: construction (forge), inspection (charm smell), and a dual refuse gate. Severity aggregation is a monoid on ordinal weights, not a posterior probability of forgery. Laboratory-scale adversaries (T4) are excluded from the sealed claims. Static inspection is a nonadaptive checklist: necessary quality control, not a substitute for the adaptive envelopes of §§2–4.

charm doctor
charm bench
charm templates
charm forge -o D:\packs\demo -t photo_library --placeholder -s 1024 --force
charm smell D:\packs\demo -t photo_library
charm explain score_semantics
charm explain adaptive_t1
charm explain gate_before_local

FORGE → SMELL → REFUSE

Score semantics (binding)

Dual refuse gate

blown_score = 1 − Π_i (1 − w_sev(i)) # bad=0.55, warn=0.25, info=0.05
refused = (∃ finding with severity bad) ∨ (blown_score ≥ 0.6)
FactImplication
Weights are ordinalNot calibrated likelihoods or posteriors
Product is a monoidCommutative severity aggregation, not $\mathbb{P}(\text{generated})$
Dual gateOne bad finding alone scores 0.55 and still refuses
Clean reportNecessary for refuse automation—not a full adaptive T1 bound

Doctrine: docs/T1_BUDGET.md · naturalness: docs/NATURAL.md · master: docs/MASTER.md


§7. Threat model (load cases)

CaseAdversaryClaim
T0Glancing humanStrong on implemented tells
T1Curious technical peer, short sessionImproves cost of casual tells; static inspection is nonadaptive; see docs/T1_BUDGET.md
T2Offline stolen diskCrypto holds if L0 holds; cover may affect prioritization only
T3Compelled passwordNot claimed until CELLAR is complete
T4Laboratory process and timeNo claim.

Habitats

TemplateNarrative
adobe_cacheMedia cache debris (default)
steam_depotLocal depot fragment
vm_diskVM metadata + disk-like blob
photo_libraryManaged library store
sql_backupDatabase dump handoff
docker_cacheOverlay / layer residue
mail_storeMailbox export slice
iso_mirrorInstall media fragment
incomplete_downloadInterrupted transfer
wgs_labOptional sequencing pack habitat
genericUntyped bulk

Naturalness is habitat-relative. Opaque extensions for non-genuine formats. Specialist names require magic and membership. Famous public sample IDs forbidden as decoration. Published checksums must match bytes.


Commands

CommandPurpose
charm forgeBuild habitat tree + optional volume / placeholder
charm smellInspect tree: findings, severity score, dual refuse
charm benchCalibration fixtures (known-bad must blow)
charm explain [code]Finding catalog
charm doctorEnvironment + doctrine pointers
charm templatesList habitats
charm which-vcLocate VeraCrypt

Forge refuses blown covers by default. --i-know is an informed override. --write-seed is off by default. Size ceilings require --unsafe-size when deliberately exceeded.


Research ladder (M4–M18)

BandContent
M4Finite adaptive gap certificates, score hygiene, witnesses
M5Flattening, root-arity, $G_2(K)=1-1/K$, butterfly uniqueness, $k$-pair
M6–M9All-$B$ envelopes, greedy failure, checklist incompleteness, capacity zero
M10–M13Closed forms vs DP, doctrine pack, parity budgets, unbounded separation
M14–M18Nesting, score–LR reversals, query complexity, randomized NA, mega-pack

Reproduce: ladder runners + M4/M5 test suites. Static and animated figures are first-class artifacts of the certificates, not decoration.

Open frontier. Support-constrained curve $G_2(K,r)$; equality for $K>2$; sharp $G_B(K)$ for $B\ge 3$; guarded compilation; Lean formalization of the seed package; completed primary-source collision.


Explicit non-goals

  • Inventing or “improving” ciphers
  • Probability-of-generation marketing for blown_score
  • Operational guidance for concealing material from forensic inspection
  • Exhaustive file-type encyclopedias
  • T4 claims under any packaging
  • Literature-novelty press language for the sharp seed package

§8. Software layout (abbreviated)

charm
├── forge construction sequence + refuse joint
├── smell as-built detection oracle + severity monoid + dual gate
├── props habitat members (decoy trees)
├── caliper size bands / opaque payload policy
├── ecology specialist families + habitat membership
├── forgery seeded identity fields
├── kernel foundation L0 (VeraCrypt create)
├── bench known-bad load tests
└── catalog detail catalog (explain surface)

Process: docs/SKUNKWORKS.md · security: SECURITY.md · field notes: docs/FIELD_GUIDE.md


Colors

Purdue black#000000 / #0A0A0A · old gold#CFB991 · Boiler Up.

Colophon

David Lombardo · MIT License · v0.3.8
github.com/coldbricks/charm13

All mathematical claims are relative to the finite models named in the text. Open questions are listed in the theorem catalog.

About

Notes on budgeted adaptive inspection in finite models. Exact envelopes G2(K)=1-1/K. Certificates. Engineering corollary for habitat cover.

Resources

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Repository files navigation

CHARM13

CHARM13 finite-model inspection geometry


Field guide: CHARM13 and budgeted inspection

Positioning

CHARM13 is an engineering system for habitat camouflage evaluation and construction around encrypted volumes, together with a finite-model research program on budgeted adaptive distinguishability of attributed filesystem trees.

It does not introduce a new cipher. Confidentiality of bytes is external L0 (e.g. VeraCrypt). CHARM13 owns cover naturalness, detection, and refuse-on-blown.

LayerRoleOwner
Cryptographic ciphertextSecrecy of contentExternal L0 (VeraCrypt, etc.)
Cover / habitat storyOn-disk narrativeCHARM13 forge + inspect

Most tools stop at the ciphertext. CHARM13 runs construct → measure → refuse.

Full field notes: docs/FIELD_GUIDE.md. Doctrine: docs/MASTER.md. T1 budget: docs/T1_BUDGET.md.

pip install -e .
charm doctor
charm bench
charm forge -o D:\packs\demo -t photo_library --placeholder -s 1024 --force
charm smell D:\packs\demo -t photo_library

Preface (mathematical notes)

These notes develop the comparison between adaptive and nonadaptive observation under a fixed look budget $B$, measured in total variation of transcript laws. The ambient setting is finite. Queries are maps $q\colon W\to Y_q$. Unless otherwise stated they are open: globally addressable, of unit cost, and non-destructive.

The principal quantity is the worst-case additive gap at budget two under active arity at most $K$:

$$ G_2(K)=\sup\bigl(D_2^{\mathrm{ad}}-D_2^{\mathrm{na}}\bigr)=1-\frac1K. $$

The identity is proved inside the frozen model below and is attained by an explicit construction. Whether the package is new relative to the broader literature on sequential testing and costly feature acquisition is left open; the abstract existence of adaptive gains is classical. What is collected here is a closed finite theory: flattening, root-arity, equality classification of the binary extremizer, habitat-shaped closed forms, exact rational certificates, and the consequences for a static detection checklist used as engineering quality control.

We do not claim laboratory (T4) hardness, a new cipher, or a probabilistic interpretation of severity scores.

Contents of the mathematical part.
research/THEOREMS.md (catalog) · research/m5/SEED_THEOREMS.md (proofs) · research/LADDER_MASTER.md (missions M4–M18).


§1. Notation

Let $W$ be a finite set of worlds and let $P,Q$ be probability distributions on $W$. Write $\mu=P-Q$ for the signed mass and

$$ r=\bigl|\{w:\mu(w)\ne 0\}\bigr| $$

for the size of the active support. A policy of budget $B$ is either adaptive (a decision tree of depth at most $B$) or nonadaptive (a fixed collection of at most $B$ queries). The quantities $D_B^{\mathrm{ad}}(P,Q)$ and $D_B^{\mathrm{na}}(P,Q)$ are the respective maximal transcript total variations.


§2. Principal results (OPEN model)

Theorem (Flattening).

If $r\le B+1$, then

$$ D_B^{\mathrm{ad}}(P,Q)=D_B^{\mathrm{na}}(P,Q). $$

In particular, a strict adaptivity gap at budget two requires at least four active worlds.

Theorem (Root-arity and sharp gap).

If every query has active arity at most $K$, then

$$ D_2^{\mathrm{ad}}\le K\,D_2^{\mathrm{na}}, \qquad D_2^{\mathrm{ad}}-D_2^{\mathrm{na}}\le 1-\frac1K. $$

Both bounds are sharp: there exists a finite system with $D_2^{\mathrm{ad}}=1$ and $D_2^{\mathrm{na}}=1/K$. Consequently

$$ \boxed{G_2(K)=1-\dfrac{1}{K}.} $$

Theorem (Binary extremizer).

For $K=2$ the additive gap is at most $1/2$. Among four-world, binary, OPEN systems attaining the bound, the extremal geometry is unique up to the natural symmetries and coincides with the four-world butterfly recorded in the M4/M5 notes.

Remark (Priority).

The sharp seed package is proved in the frozen model. Its literature priority is unresolved. Residual contributions emphasized here are support flattening, the exact root-arity envelope, equality classification, habitat closed forms, and the engineering corollaries in §6.

Identity wall

Signed-measure formalism

Flattening and sharp budget-two law

Address matching construction

Four-world butterfly extremizer

Closed-form board

Budget-2 adaptivity envelope

Gap growth

G2 approaches 1

Dual envelopes

3D Gap_B(k) surface

3D G2(K,r) envelope sketch


§3. Formal apparatus

$$ \mu:=P-Q,\quad \sum_{w\in W}\mu(w)=0,\quad S_\mu=\{w:\mu(w)\ne0\},\quad r=|S_\mu|. $$

$$ V_\mu(\Pi)=\frac12\sum_{C\in\Pi}|\mu(C)| =\mathrm{TV}(\mathrm{Law}_P T,\mathrm{Law}_Q T). $$

Bayes bridge (weighted classification trees):

$$ M(w,0)=\tfrac12 P(w),\; M(w,1)=\tfrac12 Q(w),\qquad V_\mu(\Pi)=1-2R(\Pi), $$

$$ D_B^{\mathrm{ad}}=1-2R_B^{\mathrm{tree}},\qquad D_B^{\mathrm{na}}=1-2R_B^{\mathrm{static}}. $$

Root-arity proof core: $V(\pi)=\sum_{i=1}^k v_i$ and $D_2^{\mathrm{na}}\ge\max_i v_i$, hence

$$ D_2^{\mathrm{ad}}\le K\,D_2^{\mathrm{na}},\qquad D_2^{\mathrm{ad}}-D_2^{\mathrm{na}}\le\Bigl(1-\frac1K\Bigr)D_2^{\mathrm{ad}}\le 1-\frac1K. $$

Matching address family $W_K=\{(i,x):i\le K,\;x\in\{0,1\}^K\}$:

$$ P(i,x)=\frac{\mathbf{1}_{x_i=0}}{K\,2^{K-1}},\quad Q(i,x)=\frac{\mathbf{1}_{x_i=1}}{K\,2^{K-1}},\quad g(i,x)=i,\; b_j(i,x)=x_j. $$

Remark (cyclic gate; pedagogical). The gate $g$ is a closed cyclic menu of $K$ branches. An adaptive policy of budget two names a branch on the cycle, then reads the bit on that branch. A nonadaptive policy may fix at most two queries and obtains total variation $1/K$. When $K=12$, circle-of-fifths labels are a mnemonic only. The matching of upper bound and construction closes the argument: $G_2(K)=1-1/K$. See research/ANALOGUES.md.

Cyclic gate: address construction

Adaptive walk on the cyclic gate

G2(K) approaches 1

Gain-sensitive support bound and open curve:

$$ D_2^{\mathrm{na}}\ge V_0+\max_i g_i,\qquad m\le\min\Bigl\{K,\Big\lfloor\tfrac r2\Big\rfloor\Bigr\}, $$

$$ G_2(K,r)=\sup\bigl\{D_2^{\mathrm{ad}}-D_2^{\mathrm{na}}:\mathrm{arity}\le K,\;|S_\mu|\le r\bigr\}. $$

Known anchors: $G_2(K,r)=0$ for $r\le 3$; $G_2(2,4)=1/2$; $G_2(K,\infty)=1-1/K$. Exact intermediate surface mostly open.

Stability and G2(K,r)

Support-constrained envelope sketch

Full write-up: research/THEOREMS.md · analytic proofs: research/m5/SEED_THEOREMS.md.


§4. Habitat-shaped families

The following closed forms describe filesystem-shaped query geometries. They are applications of the general apparatus, not replacements for the sharp law $G_2(K)$.

$k$-pair (which-then-bit). Uniform random branch; payload bit differs under the two hypotheses; off-branch bits return $\mathtt{na}$. Adaptive with budget two achieves TV $=1$; best nonadaptive suite of budget two achieves $2/k$. Gap $1-2/k\to 1$. Myopic “strongest local check first” never opens with the branch query; ratio $k/2\to\infty$.

All fixed budgets. On the same family, for every $B\ge 2$:

$$ D_B^{\mathrm{ad}}=1,\qquad D_B^{\mathrm{na}}=\frac{\min(B,k)}{k},\qquad \mathrm{Gap}_B(k)\to 1\ (k\to\infty). $$

A fixed-size checklist cannot uniformly bound adaptive risk across branching factors.

Gap for multiple budgets

Habitat closed forms

Parity payloads. Local bit marginals matched; global parity differs per branch. Perfect adaptive separation costs $B^\star_{\mathrm{ad}}=1+m$; perfect nonadaptive separation costs $B^\star_{\mathrm{na}}=k\cdot m$. Ratio unbounded in $k$:

$$ \frac{B^\star_{\mathrm{na}}}{B^\star_{\mathrm{ad}}}=\frac{km}{m+1}\to\infty. $$

Adaptive vs nonadaptive budget race

3D parity budget ratio surface

Capacity zero. Under adaptive inspection with $B\ge 2$ on the $k$-pair family, indistinguishability capacity for any $\varepsilon<1$ is zero. Large branching helps checklists; it does not help against which-then-bit.

Capacity zero under adaptive inspection

Myopic greedy blowup

Myopic greedy unbounded ratio

FamilyRoleGap / separation
Address construction (arity $K$)Extremal law$G_2(K)=1-1/K$
$k$-pairHabitat + greedy scar$1-2/k$ at $B=2$
Parity ($m$-bit)Budget race$B^\star_{\mathrm{ad}}=1+m$ vs $B^\star_{\mathrm{na}}=km$

§5. Certificates and figures

The identities above are accompanied by exact-rational machine checks.

pip install -e .
cd research\m5\EXPERIMENTS
python test_m5_exact.py # G_2(K)=1-1/K, butterfly, support
python test_m5.py # k-pair closed forms + greedy
cd ..\..\ladder
python run_ladder.py
python run_ladder_high.py
cd ..\m4\EXPERIMENTS
python test_certificates.py

On success: for $K=2,\ldots,7$ one has $\mathrm{ad}=1$ and $\mathrm{na}=1/K$; for the $k$-pair family with $k=2,\ldots,12$ one has $\mathrm{na}=2/k$. Figures and animations under assets/figures/ may be regenerated by python assets/render_figures.py and python assets/render_animations.py.


§6. Application: habitat cover construction

Encrypted volumes secure the confidentiality of bytes; they do not, by themselves, secure the narrative those bytes present on disk. The software layer collected in this repository constructs habitat-shaped cover trees, subjects them to a deterministic detection oracle, and refuses emission when the cover is judged blown. The cipher (Layer 0) is external. Cover construction and the refuse rule are internal.

The design may be read as a load path: construction (forge), inspection (charm smell), and a dual refuse gate. Severity aggregation is a monoid on ordinal weights, not a posterior probability of forgery. Laboratory-scale adversaries (T4) are excluded from the sealed claims. Static inspection is a nonadaptive checklist: necessary quality control, not a substitute for the adaptive envelopes of §§2–4.

charm doctor
charm bench
charm templates
charm forge -o D:\packs\demo -t photo_library --placeholder -s 1024 --force
charm smell D:\packs\demo -t photo_library
charm explain score_semantics
charm explain adaptive_t1
charm explain gate_before_local

FORGE → SMELL → REFUSE

Score semantics (binding)

Dual refuse gate

blown_score = 1 − Π_i (1 − w_sev(i)) # bad=0.55, warn=0.25, info=0.05
refused = (∃ finding with severity bad) ∨ (blown_score ≥ 0.6)
FactImplication
Weights are ordinalNot calibrated likelihoods or posteriors
Product is a monoidCommutative severity aggregation, not $\mathbb{P}(\text{generated})$
Dual gateOne bad finding alone scores 0.55 and still refuses
Clean reportNecessary for refuse automation—not a full adaptive T1 bound

Doctrine: docs/T1_BUDGET.md · naturalness: docs/NATURAL.md · master: docs/MASTER.md


§7. Threat model (load cases)

CaseAdversaryClaim
T0Glancing humanStrong on implemented tells
T1Curious technical peer, short sessionImproves cost of casual tells; static inspection is nonadaptive; see docs/T1_BUDGET.md
T2Offline stolen diskCrypto holds if L0 holds; cover may affect prioritization only
T3Compelled passwordNot claimed until CELLAR is complete
T4Laboratory process and timeNo claim.

Habitats

TemplateNarrative
adobe_cacheMedia cache debris (default)
steam_depotLocal depot fragment
vm_diskVM metadata + disk-like blob
photo_libraryManaged library store
sql_backupDatabase dump handoff
docker_cacheOverlay / layer residue
mail_storeMailbox export slice
iso_mirrorInstall media fragment
incomplete_downloadInterrupted transfer
wgs_labOptional sequencing pack habitat
genericUntyped bulk

Naturalness is habitat-relative. Opaque extensions for non-genuine formats. Specialist names require magic and membership. Famous public sample IDs forbidden as decoration. Published checksums must match bytes.


Commands

CommandPurpose
charm forgeBuild habitat tree + optional volume / placeholder
charm smellInspect tree: findings, severity score, dual refuse
charm benchCalibration fixtures (known-bad must blow)
charm explain [code]Finding catalog
charm doctorEnvironment + doctrine pointers
charm templatesList habitats
charm which-vcLocate VeraCrypt

Forge refuses blown covers by default. --i-know is an informed override. --write-seed is off by default. Size ceilings require --unsafe-size when deliberately exceeded.


Research ladder (M4–M18)

BandContent
M4Finite adaptive gap certificates, score hygiene, witnesses
M5Flattening, root-arity, $G_2(K)=1-1/K$, butterfly uniqueness, $k$-pair
M6–M9All-$B$ envelopes, greedy failure, checklist incompleteness, capacity zero
M10–M13Closed forms vs DP, doctrine pack, parity budgets, unbounded separation
M14–M18Nesting, score–LR reversals, query complexity, randomized NA, mega-pack

Reproduce: ladder runners + M4/M5 test suites. Static and animated figures are first-class artifacts of the certificates, not decoration.

Open frontier. Support-constrained curve $G_2(K,r)$; equality for $K>2$; sharp $G_B(K)$ for $B\ge 3$; guarded compilation; Lean formalization of the seed package; completed primary-source collision.


Explicit non-goals

  • Inventing or “improving” ciphers
  • Probability-of-generation marketing for blown_score
  • Operational guidance for concealing material from forensic inspection
  • Exhaustive file-type encyclopedias
  • T4 claims under any packaging
  • Literature-novelty press language for the sharp seed package

§8. Software layout (abbreviated)

charm
├── forge construction sequence + refuse joint
├── smell as-built detection oracle + severity monoid + dual gate
├── props habitat members (decoy trees)
├── caliper size bands / opaque payload policy
├── ecology specialist families + habitat membership
├── forgery seeded identity fields
├── kernel foundation L0 (VeraCrypt create)
├── bench known-bad load tests
└── catalog detail catalog (explain surface)

Process: docs/SKUNKWORKS.md · security: SECURITY.md · field notes: docs/FIELD_GUIDE.md


Colors

Purdue black#000000 / #0A0A0A · old gold#CFB991 · Boiler Up.

Colophon

David Lombardo · MIT License · v0.3.8
github.com/coldbricks/charm13

All mathematical claims are relative to the finite models named in the text. Open questions are listed in the theorem catalog.

About

Notes on budgeted adaptive inspection in finite models. Exact envelopes G2(K)=1-1/K. Certificates. Engineering corollary for habitat cover.

Resources

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

CHARM13

CHARM13 finite-model inspection geometry


Field guide: CHARM13 and budgeted inspection

Positioning

CHARM13 is an engineering system for habitat camouflage evaluation and construction around encrypted volumes, together with a finite-model research program on budgeted adaptive distinguishability of attributed filesystem trees.

It does not introduce a new cipher. Confidentiality of bytes is external L0 (e.g. VeraCrypt). CHARM13 owns cover naturalness, detection, and refuse-on-blown.

LayerRoleOwner
Cryptographic ciphertextSecrecy of contentExternal L0 (VeraCrypt, etc.)
Cover / habitat storyOn-disk narrativeCHARM13 forge + inspect

Most tools stop at the ciphertext. CHARM13 runs construct → measure → refuse.

Full field notes: docs/FIELD_GUIDE.md. Doctrine: docs/MASTER.md. T1 budget: docs/T1_BUDGET.md.

pip install -e .
charm doctor
charm bench
charm forge -o D:\packs\demo -t photo_library --placeholder -s 1024 --force
charm smell D:\packs\demo -t photo_library

Preface (mathematical notes)

These notes develop the comparison between adaptive and nonadaptive observation under a fixed look budget $B$, measured in total variation of transcript laws. The ambient setting is finite. Queries are maps $q\colon W\to Y_q$. Unless otherwise stated they are open: globally addressable, of unit cost, and non-destructive.

The principal quantity is the worst-case additive gap at budget two under active arity at most $K$:

$$ G_2(K)=\sup\bigl(D_2^{\mathrm{ad}}-D_2^{\mathrm{na}}\bigr)=1-\frac1K. $$

The identity is proved inside the frozen model below and is attained by an explicit construction. Whether the package is new relative to the broader literature on sequential testing and costly feature acquisition is left open; the abstract existence of adaptive gains is classical. What is collected here is a closed finite theory: flattening, root-arity, equality classification of the binary extremizer, habitat-shaped closed forms, exact rational certificates, and the consequences for a static detection checklist used as engineering quality control.

We do not claim laboratory (T4) hardness, a new cipher, or a probabilistic interpretation of severity scores.

Contents of the mathematical part.
research/THEOREMS.md (catalog) · research/m5/SEED_THEOREMS.md (proofs) · research/LADDER_MASTER.md (missions M4–M18).


§1. Notation

Let $W$ be a finite set of worlds and let $P,Q$ be probability distributions on $W$. Write $\mu=P-Q$ for the signed mass and

$$ r=\bigl|\{w:\mu(w)\ne 0\}\bigr| $$

for the size of the active support. A policy of budget $B$ is either adaptive (a decision tree of depth at most $B$) or nonadaptive (a fixed collection of at most $B$ queries). The quantities $D_B^{\mathrm{ad}}(P,Q)$ and $D_B^{\mathrm{na}}(P,Q)$ are the respective maximal transcript total variations.


§2. Principal results (OPEN model)

Theorem (Flattening).

If $r\le B+1$, then

$$ D_B^{\mathrm{ad}}(P,Q)=D_B^{\mathrm{na}}(P,Q). $$

In particular, a strict adaptivity gap at budget two requires at least four active worlds.

Theorem (Root-arity and sharp gap).

If every query has active arity at most $K$, then

$$ D_2^{\mathrm{ad}}\le K\,D_2^{\mathrm{na}}, \qquad D_2^{\mathrm{ad}}-D_2^{\mathrm{na}}\le 1-\frac1K. $$

Both bounds are sharp: there exists a finite system with $D_2^{\mathrm{ad}}=1$ and $D_2^{\mathrm{na}}=1/K$. Consequently

$$ \boxed{G_2(K)=1-\dfrac{1}{K}.} $$

Theorem (Binary extremizer).

For $K=2$ the additive gap is at most $1/2$. Among four-world, binary, OPEN systems attaining the bound, the extremal geometry is unique up to the natural symmetries and coincides with the four-world butterfly recorded in the M4/M5 notes.

Remark (Priority).

The sharp seed package is proved in the frozen model. Its literature priority is unresolved. Residual contributions emphasized here are support flattening, the exact root-arity envelope, equality classification, habitat closed forms, and the engineering corollaries in §6.

Identity wall

Signed-measure formalism

Flattening and sharp budget-two law

Address matching construction

Four-world butterfly extremizer

Closed-form board

Budget-2 adaptivity envelope

Gap growth

G2 approaches 1

Dual envelopes

3D Gap_B(k) surface

3D G2(K,r) envelope sketch


§3. Formal apparatus

$$ \mu:=P-Q,\quad \sum_{w\in W}\mu(w)=0,\quad S_\mu=\{w:\mu(w)\ne0\},\quad r=|S_\mu|. $$

$$ V_\mu(\Pi)=\frac12\sum_{C\in\Pi}|\mu(C)| =\mathrm{TV}(\mathrm{Law}_P T,\mathrm{Law}_Q T). $$

Bayes bridge (weighted classification trees):

$$ M(w,0)=\tfrac12 P(w),\; M(w,1)=\tfrac12 Q(w),\qquad V_\mu(\Pi)=1-2R(\Pi), $$

$$ D_B^{\mathrm{ad}}=1-2R_B^{\mathrm{tree}},\qquad D_B^{\mathrm{na}}=1-2R_B^{\mathrm{static}}. $$

Root-arity proof core: $V(\pi)=\sum_{i=1}^k v_i$ and $D_2^{\mathrm{na}}\ge\max_i v_i$, hence

$$ D_2^{\mathrm{ad}}\le K\,D_2^{\mathrm{na}},\qquad D_2^{\mathrm{ad}}-D_2^{\mathrm{na}}\le\Bigl(1-\frac1K\Bigr)D_2^{\mathrm{ad}}\le 1-\frac1K. $$

Matching address family $W_K=\{(i,x):i\le K,\;x\in\{0,1\}^K\}$:

$$ P(i,x)=\frac{\mathbf{1}_{x_i=0}}{K\,2^{K-1}},\quad Q(i,x)=\frac{\mathbf{1}_{x_i=1}}{K\,2^{K-1}},\quad g(i,x)=i,\; b_j(i,x)=x_j. $$

Remark (cyclic gate; pedagogical). The gate $g$ is a closed cyclic menu of $K$ branches. An adaptive policy of budget two names a branch on the cycle, then reads the bit on that branch. A nonadaptive policy may fix at most two queries and obtains total variation $1/K$. When $K=12$, circle-of-fifths labels are a mnemonic only. The matching of upper bound and construction closes the argument: $G_2(K)=1-1/K$. See research/ANALOGUES.md.

Cyclic gate: address construction

Adaptive walk on the cyclic gate

G2(K) approaches 1

Gain-sensitive support bound and open curve:

$$ D_2^{\mathrm{na}}\ge V_0+\max_i g_i,\qquad m\le\min\Bigl\{K,\Big\lfloor\tfrac r2\Big\rfloor\Bigr\}, $$

$$ G_2(K,r)=\sup\bigl\{D_2^{\mathrm{ad}}-D_2^{\mathrm{na}}:\mathrm{arity}\le K,\;|S_\mu|\le r\bigr\}. $$

Known anchors: $G_2(K,r)=0$ for $r\le 3$; $G_2(2,4)=1/2$; $G_2(K,\infty)=1-1/K$. Exact intermediate surface mostly open.

Stability and G2(K,r)

Support-constrained envelope sketch

Full write-up: research/THEOREMS.md · analytic proofs: research/m5/SEED_THEOREMS.md.


§4. Habitat-shaped families

The following closed forms describe filesystem-shaped query geometries. They are applications of the general apparatus, not replacements for the sharp law $G_2(K)$.

$k$-pair (which-then-bit). Uniform random branch; payload bit differs under the two hypotheses; off-branch bits return $\mathtt{na}$. Adaptive with budget two achieves TV $=1$; best nonadaptive suite of budget two achieves $2/k$. Gap $1-2/k\to 1$. Myopic “strongest local check first” never opens with the branch query; ratio $k/2\to\infty$.

All fixed budgets. On the same family, for every $B\ge 2$:

$$ D_B^{\mathrm{ad}}=1,\qquad D_B^{\mathrm{na}}=\frac{\min(B,k)}{k},\qquad \mathrm{Gap}_B(k)\to 1\ (k\to\infty). $$

A fixed-size checklist cannot uniformly bound adaptive risk across branching factors.

Gap for multiple budgets

Habitat closed forms

Parity payloads. Local bit marginals matched; global parity differs per branch. Perfect adaptive separation costs $B^\star_{\mathrm{ad}}=1+m$; perfect nonadaptive separation costs $B^\star_{\mathrm{na}}=k\cdot m$. Ratio unbounded in $k$:

$$ \frac{B^\star_{\mathrm{na}}}{B^\star_{\mathrm{ad}}}=\frac{km}{m+1}\to\infty. $$

Adaptive vs nonadaptive budget race

3D parity budget ratio surface

Capacity zero. Under adaptive inspection with $B\ge 2$ on the $k$-pair family, indistinguishability capacity for any $\varepsilon<1$ is zero. Large branching helps checklists; it does not help against which-then-bit.

Capacity zero under adaptive inspection

Myopic greedy blowup

Myopic greedy unbounded ratio

FamilyRoleGap / separation
Address construction (arity $K$)Extremal law$G_2(K)=1-1/K$
$k$-pairHabitat + greedy scar$1-2/k$ at $B=2$
Parity ($m$-bit)Budget race$B^\star_{\mathrm{ad}}=1+m$ vs $B^\star_{\mathrm{na}}=km$

§5. Certificates and figures

The identities above are accompanied by exact-rational machine checks.

pip install -e .
cd research\m5\EXPERIMENTS
python test_m5_exact.py # G_2(K)=1-1/K, butterfly, support
python test_m5.py # k-pair closed forms + greedy
cd ..\..\ladder
python run_ladder.py
python run_ladder_high.py
cd ..\m4\EXPERIMENTS
python test_certificates.py

On success: for $K=2,\ldots,7$ one has $\mathrm{ad}=1$ and $\mathrm{na}=1/K$; for the $k$-pair family with $k=2,\ldots,12$ one has $\mathrm{na}=2/k$. Figures and animations under assets/figures/ may be regenerated by python assets/render_figures.py and python assets/render_animations.py.


§6. Application: habitat cover construction

Encrypted volumes secure the confidentiality of bytes; they do not, by themselves, secure the narrative those bytes present on disk. The software layer collected in this repository constructs habitat-shaped cover trees, subjects them to a deterministic detection oracle, and refuses emission when the cover is judged blown. The cipher (Layer 0) is external. Cover construction and the refuse rule are internal.

The design may be read as a load path: construction (forge), inspection (charm smell), and a dual refuse gate. Severity aggregation is a monoid on ordinal weights, not a posterior probability of forgery. Laboratory-scale adversaries (T4) are excluded from the sealed claims. Static inspection is a nonadaptive checklist: necessary quality control, not a substitute for the adaptive envelopes of §§2–4.

charm doctor
charm bench
charm templates
charm forge -o D:\packs\demo -t photo_library --placeholder -s 1024 --force
charm smell D:\packs\demo -t photo_library
charm explain score_semantics
charm explain adaptive_t1
charm explain gate_before_local

FORGE → SMELL → REFUSE

Score semantics (binding)

Dual refuse gate

blown_score = 1 − Π_i (1 − w_sev(i)) # bad=0.55, warn=0.25, info=0.05
refused = (∃ finding with severity bad) ∨ (blown_score ≥ 0.6)
FactImplication
Weights are ordinalNot calibrated likelihoods or posteriors
Product is a monoidCommutative severity aggregation, not $\mathbb{P}(\text{generated})$
Dual gateOne bad finding alone scores 0.55 and still refuses
Clean reportNecessary for refuse automation—not a full adaptive T1 bound

Doctrine: docs/T1_BUDGET.md · naturalness: docs/NATURAL.md · master: docs/MASTER.md


§7. Threat model (load cases)

CaseAdversaryClaim
T0Glancing humanStrong on implemented tells
T1Curious technical peer, short sessionImproves cost of casual tells; static inspection is nonadaptive; see docs/T1_BUDGET.md
T2Offline stolen diskCrypto holds if L0 holds; cover may affect prioritization only
T3Compelled passwordNot claimed until CELLAR is complete
T4Laboratory process and timeNo claim.

Habitats

TemplateNarrative
adobe_cacheMedia cache debris (default)
steam_depotLocal depot fragment
vm_diskVM metadata + disk-like blob
photo_libraryManaged library store
sql_backupDatabase dump handoff
docker_cacheOverlay / layer residue
mail_storeMailbox export slice
iso_mirrorInstall media fragment
incomplete_downloadInterrupted transfer
wgs_labOptional sequencing pack habitat
genericUntyped bulk

Naturalness is habitat-relative. Opaque extensions for non-genuine formats. Specialist names require magic and membership. Famous public sample IDs forbidden as decoration. Published checksums must match bytes.


Commands

CommandPurpose
charm forgeBuild habitat tree + optional volume / placeholder
charm smellInspect tree: findings, severity score, dual refuse
charm benchCalibration fixtures (known-bad must blow)
charm explain [code]Finding catalog
charm doctorEnvironment + doctrine pointers
charm templatesList habitats
charm which-vcLocate VeraCrypt

Forge refuses blown covers by default. --i-know is an informed override. --write-seed is off by default. Size ceilings require --unsafe-size when deliberately exceeded.


Research ladder (M4–M18)

BandContent
M4Finite adaptive gap certificates, score hygiene, witnesses
M5Flattening, root-arity, $G_2(K)=1-1/K$, butterfly uniqueness, $k$-pair
M6–M9All-$B$ envelopes, greedy failure, checklist incompleteness, capacity zero
M10–M13Closed forms vs DP, doctrine pack, parity budgets, unbounded separation
M14–M18Nesting, score–LR reversals, query complexity, randomized NA, mega-pack

Reproduce: ladder runners + M4/M5 test suites. Static and animated figures are first-class artifacts of the certificates, not decoration.

Open frontier. Support-constrained curve $G_2(K,r)$; equality for $K>2$; sharp $G_B(K)$ for $B\ge 3$; guarded compilation; Lean formalization of the seed package; completed primary-source collision.


Explicit non-goals

  • Inventing or “improving” ciphers
  • Probability-of-generation marketing for blown_score
  • Operational guidance for concealing material from forensic inspection
  • Exhaustive file-type encyclopedias
  • T4 claims under any packaging
  • Literature-novelty press language for the sharp seed package

§8. Software layout (abbreviated)

charm
├── forge construction sequence + refuse joint
├── smell as-built detection oracle + severity monoid + dual gate
├── props habitat members (decoy trees)
├── caliper size bands / opaque payload policy
├── ecology specialist families + habitat membership
├── forgery seeded identity fields
├── kernel foundation L0 (VeraCrypt create)
├── bench known-bad load tests
└── catalog detail catalog (explain surface)

Process: docs/SKUNKWORKS.md · security: SECURITY.md · field notes: docs/FIELD_GUIDE.md


Colors

Purdue black#000000 / #0A0A0A · old gold#CFB991 · Boiler Up.

Colophon

David Lombardo · MIT License · v0.3.8
github.com/coldbricks/charm13

All mathematical claims are relative to the finite models named in the text. Open questions are listed in the theorem catalog.

About

Notes on budgeted adaptive inspection in finite models. Exact envelopes G2(K)=1-1/K. Certificates. Engineering corollary for habitat cover.

Resources

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

CHARM13

CHARM13 finite-model inspection geometry


Field guide: CHARM13 and budgeted inspection

Positioning

CHARM13 is an engineering system for habitat camouflage evaluation and construction around encrypted volumes, together with a finite-model research program on budgeted adaptive distinguishability of attributed filesystem trees.

It does not introduce a new cipher. Confidentiality of bytes is external L0 (e.g. VeraCrypt). CHARM13 owns cover naturalness, detection, and refuse-on-blown.

LayerRoleOwner
Cryptographic ciphertextSecrecy of contentExternal L0 (VeraCrypt, etc.)
Cover / habitat storyOn-disk narrativeCHARM13 forge + inspect

Most tools stop at the ciphertext. CHARM13 runs construct → measure → refuse.

Full field notes: docs/FIELD_GUIDE.md. Doctrine: docs/MASTER.md. T1 budget: docs/T1_BUDGET.md.

pip install -e .
charm doctor
charm bench
charm forge -o D:\packs\demo -t photo_library --placeholder -s 1024 --force
charm smell D:\packs\demo -t photo_library

Preface (mathematical notes)

These notes develop the comparison between adaptive and nonadaptive observation under a fixed look budget $B$, measured in total variation of transcript laws. The ambient setting is finite. Queries are maps $q\colon W\to Y_q$. Unless otherwise stated they are open: globally addressable, of unit cost, and non-destructive.

The principal quantity is the worst-case additive gap at budget two under active arity at most $K$:

$$ G_2(K)=\sup\bigl(D_2^{\mathrm{ad}}-D_2^{\mathrm{na}}\bigr)=1-\frac1K. $$

The identity is proved inside the frozen model below and is attained by an explicit construction. Whether the package is new relative to the broader literature on sequential testing and costly feature acquisition is left open; the abstract existence of adaptive gains is classical. What is collected here is a closed finite theory: flattening, root-arity, equality classification of the binary extremizer, habitat-shaped closed forms, exact rational certificates, and the consequences for a static detection checklist used as engineering quality control.

We do not claim laboratory (T4) hardness, a new cipher, or a probabilistic interpretation of severity scores.

Contents of the mathematical part.
research/THEOREMS.md (catalog) · research/m5/SEED_THEOREMS.md (proofs) · research/LADDER_MASTER.md (missions M4–M18).


§1. Notation

Let $W$ be a finite set of worlds and let $P,Q$ be probability distributions on $W$. Write $\mu=P-Q$ for the signed mass and

$$ r=\bigl|\{w:\mu(w)\ne 0\}\bigr| $$

for the size of the active support. A policy of budget $B$ is either adaptive (a decision tree of depth at most $B$) or nonadaptive (a fixed collection of at most $B$ queries). The quantities $D_B^{\mathrm{ad}}(P,Q)$ and $D_B^{\mathrm{na}}(P,Q)$ are the respective maximal transcript total variations.


§2. Principal results (OPEN model)

Theorem (Flattening).

If $r\le B+1$, then

$$ D_B^{\mathrm{ad}}(P,Q)=D_B^{\mathrm{na}}(P,Q). $$

In particular, a strict adaptivity gap at budget two requires at least four active worlds.

Theorem (Root-arity and sharp gap).

If every query has active arity at most $K$, then

$$ D_2^{\mathrm{ad}}\le K\,D_2^{\mathrm{na}}, \qquad D_2^{\mathrm{ad}}-D_2^{\mathrm{na}}\le 1-\frac1K. $$

Both bounds are sharp: there exists a finite system with $D_2^{\mathrm{ad}}=1$ and $D_2^{\mathrm{na}}=1/K$. Consequently

$$ \boxed{G_2(K)=1-\dfrac{1}{K}.} $$

Theorem (Binary extremizer).

For $K=2$ the additive gap is at most $1/2$. Among four-world, binary, OPEN systems attaining the bound, the extremal geometry is unique up to the natural symmetries and coincides with the four-world butterfly recorded in the M4/M5 notes.

Remark (Priority).

The sharp seed package is proved in the frozen model. Its literature priority is unresolved. Residual contributions emphasized here are support flattening, the exact root-arity envelope, equality classification, habitat closed forms, and the engineering corollaries in §6.

Identity wall

Signed-measure formalism

Flattening and sharp budget-two law

Address matching construction

Four-world butterfly extremizer

Closed-form board

Budget-2 adaptivity envelope

Gap growth

G2 approaches 1

Dual envelopes

3D Gap_B(k) surface

3D G2(K,r) envelope sketch


§3. Formal apparatus

$$ \mu:=P-Q,\quad \sum_{w\in W}\mu(w)=0,\quad S_\mu=\{w:\mu(w)\ne0\},\quad r=|S_\mu|. $$

$$ V_\mu(\Pi)=\frac12\sum_{C\in\Pi}|\mu(C)| =\mathrm{TV}(\mathrm{Law}_P T,\mathrm{Law}_Q T). $$

Bayes bridge (weighted classification trees):

$$ M(w,0)=\tfrac12 P(w),\; M(w,1)=\tfrac12 Q(w),\qquad V_\mu(\Pi)=1-2R(\Pi), $$

$$ D_B^{\mathrm{ad}}=1-2R_B^{\mathrm{tree}},\qquad D_B^{\mathrm{na}}=1-2R_B^{\mathrm{static}}. $$

Root-arity proof core: $V(\pi)=\sum_{i=1}^k v_i$ and $D_2^{\mathrm{na}}\ge\max_i v_i$, hence

$$ D_2^{\mathrm{ad}}\le K\,D_2^{\mathrm{na}},\qquad D_2^{\mathrm{ad}}-D_2^{\mathrm{na}}\le\Bigl(1-\frac1K\Bigr)D_2^{\mathrm{ad}}\le 1-\frac1K. $$

Matching address family $W_K=\{(i,x):i\le K,\;x\in\{0,1\}^K\}$:

$$ P(i,x)=\frac{\mathbf{1}_{x_i=0}}{K\,2^{K-1}},\quad Q(i,x)=\frac{\mathbf{1}_{x_i=1}}{K\,2^{K-1}},\quad g(i,x)=i,\; b_j(i,x)=x_j. $$

Remark (cyclic gate; pedagogical). The gate $g$ is a closed cyclic menu of $K$ branches. An adaptive policy of budget two names a branch on the cycle, then reads the bit on that branch. A nonadaptive policy may fix at most two queries and obtains total variation $1/K$. When $K=12$, circle-of-fifths labels are a mnemonic only. The matching of upper bound and construction closes the argument: $G_2(K)=1-1/K$. See research/ANALOGUES.md.

Cyclic gate: address construction

Adaptive walk on the cyclic gate

G2(K) approaches 1

Gain-sensitive support bound and open curve:

$$ D_2^{\mathrm{na}}\ge V_0+\max_i g_i,\qquad m\le\min\Bigl\{K,\Big\lfloor\tfrac r2\Big\rfloor\Bigr\}, $$

$$ G_2(K,r)=\sup\bigl\{D_2^{\mathrm{ad}}-D_2^{\mathrm{na}}:\mathrm{arity}\le K,\;|S_\mu|\le r\bigr\}. $$

Known anchors: $G_2(K,r)=0$ for $r\le 3$; $G_2(2,4)=1/2$; $G_2(K,\infty)=1-1/K$. Exact intermediate surface mostly open.

Stability and G2(K,r)

Support-constrained envelope sketch

Full write-up: research/THEOREMS.md · analytic proofs: research/m5/SEED_THEOREMS.md.


§4. Habitat-shaped families

The following closed forms describe filesystem-shaped query geometries. They are applications of the general apparatus, not replacements for the sharp law $G_2(K)$.

$k$-pair (which-then-bit). Uniform random branch; payload bit differs under the two hypotheses; off-branch bits return $\mathtt{na}$. Adaptive with budget two achieves TV $=1$; best nonadaptive suite of budget two achieves $2/k$. Gap $1-2/k\to 1$. Myopic “strongest local check first” never opens with the branch query; ratio $k/2\to\infty$.

All fixed budgets. On the same family, for every $B\ge 2$:

$$ D_B^{\mathrm{ad}}=1,\qquad D_B^{\mathrm{na}}=\frac{\min(B,k)}{k},\qquad \mathrm{Gap}_B(k)\to 1\ (k\to\infty). $$

A fixed-size checklist cannot uniformly bound adaptive risk across branching factors.

Gap for multiple budgets

Habitat closed forms

Parity payloads. Local bit marginals matched; global parity differs per branch. Perfect adaptive separation costs $B^\star_{\mathrm{ad}}=1+m$; perfect nonadaptive separation costs $B^\star_{\mathrm{na}}=k\cdot m$. Ratio unbounded in $k$:

$$ \frac{B^\star_{\mathrm{na}}}{B^\star_{\mathrm{ad}}}=\frac{km}{m+1}\to\infty. $$

Adaptive vs nonadaptive budget race

3D parity budget ratio surface

Capacity zero. Under adaptive inspection with $B\ge 2$ on the $k$-pair family, indistinguishability capacity for any $\varepsilon<1$ is zero. Large branching helps checklists; it does not help against which-then-bit.

Capacity zero under adaptive inspection

Myopic greedy blowup

Myopic greedy unbounded ratio

FamilyRoleGap / separation
Address construction (arity $K$)Extremal law$G_2(K)=1-1/K$
$k$-pairHabitat + greedy scar$1-2/k$ at $B=2$
Parity ($m$-bit)Budget race$B^\star_{\mathrm{ad}}=1+m$ vs $B^\star_{\mathrm{na}}=km$

§5. Certificates and figures

The identities above are accompanied by exact-rational machine checks.

pip install -e .
cd research\m5\EXPERIMENTS
python test_m5_exact.py # G_2(K)=1-1/K, butterfly, support
python test_m5.py # k-pair closed forms + greedy
cd ..\..\ladder
python run_ladder.py
python run_ladder_high.py
cd ..\m4\EXPERIMENTS
python test_certificates.py

On success: for $K=2,\ldots,7$ one has $\mathrm{ad}=1$ and $\mathrm{na}=1/K$; for the $k$-pair family with $k=2,\ldots,12$ one has $\mathrm{na}=2/k$. Figures and animations under assets/figures/ may be regenerated by python assets/render_figures.py and python assets/render_animations.py.


§6. Application: habitat cover construction

Encrypted volumes secure the confidentiality of bytes; they do not, by themselves, secure the narrative those bytes present on disk. The software layer collected in this repository constructs habitat-shaped cover trees, subjects them to a deterministic detection oracle, and refuses emission when the cover is judged blown. The cipher (Layer 0) is external. Cover construction and the refuse rule are internal.

The design may be read as a load path: construction (forge), inspection (charm smell), and a dual refuse gate. Severity aggregation is a monoid on ordinal weights, not a posterior probability of forgery. Laboratory-scale adversaries (T4) are excluded from the sealed claims. Static inspection is a nonadaptive checklist: necessary quality control, not a substitute for the adaptive envelopes of §§2–4.

charm doctor
charm bench
charm templates
charm forge -o D:\packs\demo -t photo_library --placeholder -s 1024 --force
charm smell D:\packs\demo -t photo_library
charm explain score_semantics
charm explain adaptive_t1
charm explain gate_before_local

FORGE → SMELL → REFUSE

Score semantics (binding)

Dual refuse gate

blown_score = 1 − Π_i (1 − w_sev(i)) # bad=0.55, warn=0.25, info=0.05
refused = (∃ finding with severity bad) ∨ (blown_score ≥ 0.6)
FactImplication
Weights are ordinalNot calibrated likelihoods or posteriors
Product is a monoidCommutative severity aggregation, not $\mathbb{P}(\text{generated})$
Dual gateOne bad finding alone scores 0.55 and still refuses
Clean reportNecessary for refuse automation—not a full adaptive T1 bound

Doctrine: docs/T1_BUDGET.md · naturalness: docs/NATURAL.md · master: docs/MASTER.md


§7. Threat model (load cases)

CaseAdversaryClaim
T0Glancing humanStrong on implemented tells
T1Curious technical peer, short sessionImproves cost of casual tells; static inspection is nonadaptive; see docs/T1_BUDGET.md
T2Offline stolen diskCrypto holds if L0 holds; cover may affect prioritization only
T3Compelled passwordNot claimed until CELLAR is complete
T4Laboratory process and timeNo claim.

Habitats

TemplateNarrative
adobe_cacheMedia cache debris (default)
steam_depotLocal depot fragment
vm_diskVM metadata + disk-like blob
photo_libraryManaged library store
sql_backupDatabase dump handoff
docker_cacheOverlay / layer residue
mail_storeMailbox export slice
iso_mirrorInstall media fragment
incomplete_downloadInterrupted transfer
wgs_labOptional sequencing pack habitat
genericUntyped bulk

Naturalness is habitat-relative. Opaque extensions for non-genuine formats. Specialist names require magic and membership. Famous public sample IDs forbidden as decoration. Published checksums must match bytes.


Commands

CommandPurpose
charm forgeBuild habitat tree + optional volume / placeholder
charm smellInspect tree: findings, severity score, dual refuse
charm benchCalibration fixtures (known-bad must blow)
charm explain [code]Finding catalog
charm doctorEnvironment + doctrine pointers
charm templatesList habitats
charm which-vcLocate VeraCrypt

Forge refuses blown covers by default. --i-know is an informed override. --write-seed is off by default. Size ceilings require --unsafe-size when deliberately exceeded.


Research ladder (M4–M18)

BandContent
M4Finite adaptive gap certificates, score hygiene, witnesses
M5Flattening, root-arity, $G_2(K)=1-1/K$, butterfly uniqueness, $k$-pair
M6–M9All-$B$ envelopes, greedy failure, checklist incompleteness, capacity zero
M10–M13Closed forms vs DP, doctrine pack, parity budgets, unbounded separation
M14–M18Nesting, score–LR reversals, query complexity, randomized NA, mega-pack

Reproduce: ladder runners + M4/M5 test suites. Static and animated figures are first-class artifacts of the certificates, not decoration.

Open frontier. Support-constrained curve $G_2(K,r)$; equality for $K>2$; sharp $G_B(K)$ for $B\ge 3$; guarded compilation; Lean formalization of the seed package; completed primary-source collision.


Explicit non-goals

  • Inventing or “improving” ciphers
  • Probability-of-generation marketing for blown_score
  • Operational guidance for concealing material from forensic inspection
  • Exhaustive file-type encyclopedias
  • T4 claims under any packaging
  • Literature-novelty press language for the sharp seed package

§8. Software layout (abbreviated)

charm
├── forge construction sequence + refuse joint
├── smell as-built detection oracle + severity monoid + dual gate
├── props habitat members (decoy trees)
├── caliper size bands / opaque payload policy
├── ecology specialist families + habitat membership
├── forgery seeded identity fields
├── kernel foundation L0 (VeraCrypt create)
├── bench known-bad load tests
└── catalog detail catalog (explain surface)

Process: docs/SKUNKWORKS.md · security: SECURITY.md · field notes: docs/FIELD_GUIDE.md


Colors

Purdue black#000000 / #0A0A0A · old gold#CFB991 · Boiler Up.

Colophon

David Lombardo · MIT License · v0.3.8
github.com/coldbricks/charm13

All mathematical claims are relative to the finite models named in the text. Open questions are listed in the theorem catalog.

About

Notes on budgeted adaptive inspection in finite models. Exact envelopes G2(K)=1-1/K. Certificates. Engineering corollary for habitat cover.

Resources

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Repository files navigation

CHARM13

CHARM13 finite-model inspection geometry


Field guide: CHARM13 and budgeted inspection

Positioning

CHARM13 is an engineering system for habitat camouflage evaluation and construction around encrypted volumes, together with a finite-model research program on budgeted adaptive distinguishability of attributed filesystem trees.

It does not introduce a new cipher. Confidentiality of bytes is external L0 (e.g. VeraCrypt). CHARM13 owns cover naturalness, detection, and refuse-on-blown.

LayerRoleOwner
Cryptographic ciphertextSecrecy of contentExternal L0 (VeraCrypt, etc.)
Cover / habitat storyOn-disk narrativeCHARM13 forge + inspect

Most tools stop at the ciphertext. CHARM13 runs construct → measure → refuse.

Full field notes: docs/FIELD_GUIDE.md. Doctrine: docs/MASTER.md. T1 budget: docs/T1_BUDGET.md.

pip install -e .
charm doctor
charm bench
charm forge -o D:\packs\demo -t photo_library --placeholder -s 1024 --force
charm smell D:\packs\demo -t photo_library

Preface (mathematical notes)

These notes develop the comparison between adaptive and nonadaptive observation under a fixed look budget $B$, measured in total variation of transcript laws. The ambient setting is finite. Queries are maps $q\colon W\to Y_q$. Unless otherwise stated they are open: globally addressable, of unit cost, and non-destructive.

The principal quantity is the worst-case additive gap at budget two under active arity at most $K$:

$$ G_2(K)=\sup\bigl(D_2^{\mathrm{ad}}-D_2^{\mathrm{na}}\bigr)=1-\frac1K. $$

The identity is proved inside the frozen model below and is attained by an explicit construction. Whether the package is new relative to the broader literature on sequential testing and costly feature acquisition is left open; the abstract existence of adaptive gains is classical. What is collected here is a closed finite theory: flattening, root-arity, equality classification of the binary extremizer, habitat-shaped closed forms, exact rational certificates, and the consequences for a static detection checklist used as engineering quality control.

We do not claim laboratory (T4) hardness, a new cipher, or a probabilistic interpretation of severity scores.

Contents of the mathematical part.
research/THEOREMS.md (catalog) · research/m5/SEED_THEOREMS.md (proofs) · research/LADDER_MASTER.md (missions M4–M18).


§1. Notation

Let $W$ be a finite set of worlds and let $P,Q$ be probability distributions on $W$. Write $\mu=P-Q$ for the signed mass and

$$ r=\bigl|\{w:\mu(w)\ne 0\}\bigr| $$

for the size of the active support. A policy of budget $B$ is either adaptive (a decision tree of depth at most $B$) or nonadaptive (a fixed collection of at most $B$ queries). The quantities $D_B^{\mathrm{ad}}(P,Q)$ and $D_B^{\mathrm{na}}(P,Q)$ are the respective maximal transcript total variations.


§2. Principal results (OPEN model)

Theorem (Flattening).

If $r\le B+1$, then

$$ D_B^{\mathrm{ad}}(P,Q)=D_B^{\mathrm{na}}(P,Q). $$

In particular, a strict adaptivity gap at budget two requires at least four active worlds.

Theorem (Root-arity and sharp gap).

If every query has active arity at most $K$, then

$$ D_2^{\mathrm{ad}}\le K\,D_2^{\mathrm{na}}, \qquad D_2^{\mathrm{ad}}-D_2^{\mathrm{na}}\le 1-\frac1K. $$

Both bounds are sharp: there exists a finite system with $D_2^{\mathrm{ad}}=1$ and $D_2^{\mathrm{na}}=1/K$. Consequently

$$ \boxed{G_2(K)=1-\dfrac{1}{K}.} $$

Theorem (Binary extremizer).

For $K=2$ the additive gap is at most $1/2$. Among four-world, binary, OPEN systems attaining the bound, the extremal geometry is unique up to the natural symmetries and coincides with the four-world butterfly recorded in the M4/M5 notes.

Remark (Priority).

The sharp seed package is proved in the frozen model. Its literature priority is unresolved. Residual contributions emphasized here are support flattening, the exact root-arity envelope, equality classification, habitat closed forms, and the engineering corollaries in §6.

Identity wall

Signed-measure formalism

Flattening and sharp budget-two law

Address matching construction

Four-world butterfly extremizer

Closed-form board

Budget-2 adaptivity envelope

Gap growth

G2 approaches 1

Dual envelopes

3D Gap_B(k) surface

3D G2(K,r) envelope sketch


§3. Formal apparatus

$$ \mu:=P-Q,\quad \sum_{w\in W}\mu(w)=0,\quad S_\mu=\{w:\mu(w)\ne0\},\quad r=|S_\mu|. $$

$$ V_\mu(\Pi)=\frac12\sum_{C\in\Pi}|\mu(C)| =\mathrm{TV}(\mathrm{Law}_P T,\mathrm{Law}_Q T). $$

Bayes bridge (weighted classification trees):

$$ M(w,0)=\tfrac12 P(w),\; M(w,1)=\tfrac12 Q(w),\qquad V_\mu(\Pi)=1-2R(\Pi), $$

$$ D_B^{\mathrm{ad}}=1-2R_B^{\mathrm{tree}},\qquad D_B^{\mathrm{na}}=1-2R_B^{\mathrm{static}}. $$

Root-arity proof core: $V(\pi)=\sum_{i=1}^k v_i$ and $D_2^{\mathrm{na}}\ge\max_i v_i$, hence

$$ D_2^{\mathrm{ad}}\le K\,D_2^{\mathrm{na}},\qquad D_2^{\mathrm{ad}}-D_2^{\mathrm{na}}\le\Bigl(1-\frac1K\Bigr)D_2^{\mathrm{ad}}\le 1-\frac1K. $$

Matching address family $W_K=\{(i,x):i\le K,\;x\in\{0,1\}^K\}$:

$$ P(i,x)=\frac{\mathbf{1}_{x_i=0}}{K\,2^{K-1}},\quad Q(i,x)=\frac{\mathbf{1}_{x_i=1}}{K\,2^{K-1}},\quad g(i,x)=i,\; b_j(i,x)=x_j. $$

Remark (cyclic gate; pedagogical). The gate $g$ is a closed cyclic menu of $K$ branches. An adaptive policy of budget two names a branch on the cycle, then reads the bit on that branch. A nonadaptive policy may fix at most two queries and obtains total variation $1/K$. When $K=12$, circle-of-fifths labels are a mnemonic only. The matching of upper bound and construction closes the argument: $G_2(K)=1-1/K$. See research/ANALOGUES.md.

Cyclic gate: address construction

Adaptive walk on the cyclic gate

G2(K) approaches 1

Gain-sensitive support bound and open curve:

$$ D_2^{\mathrm{na}}\ge V_0+\max_i g_i,\qquad m\le\min\Bigl\{K,\Big\lfloor\tfrac r2\Big\rfloor\Bigr\}, $$

$$ G_2(K,r)=\sup\bigl\{D_2^{\mathrm{ad}}-D_2^{\mathrm{na}}:\mathrm{arity}\le K,\;|S_\mu|\le r\bigr\}. $$

Known anchors: $G_2(K,r)=0$ for $r\le 3$; $G_2(2,4)=1/2$; $G_2(K,\infty)=1-1/K$. Exact intermediate surface mostly open.

Stability and G2(K,r)

Support-constrained envelope sketch

Full write-up: research/THEOREMS.md · analytic proofs: research/m5/SEED_THEOREMS.md.


§4. Habitat-shaped families

The following closed forms describe filesystem-shaped query geometries. They are applications of the general apparatus, not replacements for the sharp law $G_2(K)$.

$k$-pair (which-then-bit). Uniform random branch; payload bit differs under the two hypotheses; off-branch bits return $\mathtt{na}$. Adaptive with budget two achieves TV $=1$; best nonadaptive suite of budget two achieves $2/k$. Gap $1-2/k\to 1$. Myopic “strongest local check first” never opens with the branch query; ratio $k/2\to\infty$.

All fixed budgets. On the same family, for every $B\ge 2$:

$$ D_B^{\mathrm{ad}}=1,\qquad D_B^{\mathrm{na}}=\frac{\min(B,k)}{k},\qquad \mathrm{Gap}_B(k)\to 1\ (k\to\infty). $$

A fixed-size checklist cannot uniformly bound adaptive risk across branching factors.

Gap for multiple budgets

Habitat closed forms

Parity payloads. Local bit marginals matched; global parity differs per branch. Perfect adaptive separation costs $B^\star_{\mathrm{ad}}=1+m$; perfect nonadaptive separation costs $B^\star_{\mathrm{na}}=k\cdot m$. Ratio unbounded in $k$:

$$ \frac{B^\star_{\mathrm{na}}}{B^\star_{\mathrm{ad}}}=\frac{km}{m+1}\to\infty. $$

Adaptive vs nonadaptive budget race

3D parity budget ratio surface

Capacity zero. Under adaptive inspection with $B\ge 2$ on the $k$-pair family, indistinguishability capacity for any $\varepsilon<1$ is zero. Large branching helps checklists; it does not help against which-then-bit.

Capacity zero under adaptive inspection

Myopic greedy blowup

Myopic greedy unbounded ratio

FamilyRoleGap / separation
Address construction (arity $K$)Extremal law$G_2(K)=1-1/K$
$k$-pairHabitat + greedy scar$1-2/k$ at $B=2$
Parity ($m$-bit)Budget race$B^\star_{\mathrm{ad}}=1+m$ vs $B^\star_{\mathrm{na}}=km$

§5. Certificates and figures

The identities above are accompanied by exact-rational machine checks.

pip install -e .
cd research\m5\EXPERIMENTS
python test_m5_exact.py # G_2(K)=1-1/K, butterfly, support
python test_m5.py # k-pair closed forms + greedy
cd ..\..\ladder
python run_ladder.py
python run_ladder_high.py
cd ..\m4\EXPERIMENTS
python test_certificates.py

On success: for $K=2,\ldots,7$ one has $\mathrm{ad}=1$ and $\mathrm{na}=1/K$; for the $k$-pair family with $k=2,\ldots,12$ one has $\mathrm{na}=2/k$. Figures and animations under assets/figures/ may be regenerated by python assets/render_figures.py and python assets/render_animations.py.


§6. Application: habitat cover construction

Encrypted volumes secure the confidentiality of bytes; they do not, by themselves, secure the narrative those bytes present on disk. The software layer collected in this repository constructs habitat-shaped cover trees, subjects them to a deterministic detection oracle, and refuses emission when the cover is judged blown. The cipher (Layer 0) is external. Cover construction and the refuse rule are internal.

The design may be read as a load path: construction (forge), inspection (charm smell), and a dual refuse gate. Severity aggregation is a monoid on ordinal weights, not a posterior probability of forgery. Laboratory-scale adversaries (T4) are excluded from the sealed claims. Static inspection is a nonadaptive checklist: necessary quality control, not a substitute for the adaptive envelopes of §§2–4.

charm doctor
charm bench
charm templates
charm forge -o D:\packs\demo -t photo_library --placeholder -s 1024 --force
charm smell D:\packs\demo -t photo_library
charm explain score_semantics
charm explain adaptive_t1
charm explain gate_before_local

FORGE → SMELL → REFUSE

Score semantics (binding)

Dual refuse gate

blown_score = 1 − Π_i (1 − w_sev(i)) # bad=0.55, warn=0.25, info=0.05
refused = (∃ finding with severity bad) ∨ (blown_score ≥ 0.6)
FactImplication
Weights are ordinalNot calibrated likelihoods or posteriors
Product is a monoidCommutative severity aggregation, not $\mathbb{P}(\text{generated})$
Dual gateOne bad finding alone scores 0.55 and still refuses
Clean reportNecessary for refuse automation—not a full adaptive T1 bound

Doctrine: docs/T1_BUDGET.md · naturalness: docs/NATURAL.md · master: docs/MASTER.md


§7. Threat model (load cases)

CaseAdversaryClaim
T0Glancing humanStrong on implemented tells
T1Curious technical peer, short sessionImproves cost of casual tells; static inspection is nonadaptive; see docs/T1_BUDGET.md
T2Offline stolen diskCrypto holds if L0 holds; cover may affect prioritization only
T3Compelled passwordNot claimed until CELLAR is complete
T4Laboratory process and timeNo claim.

Habitats

TemplateNarrative
adobe_cacheMedia cache debris (default)
steam_depotLocal depot fragment
vm_diskVM metadata + disk-like blob
photo_libraryManaged library store
sql_backupDatabase dump handoff
docker_cacheOverlay / layer residue
mail_storeMailbox export slice
iso_mirrorInstall media fragment
incomplete_downloadInterrupted transfer
wgs_labOptional sequencing pack habitat
genericUntyped bulk

Naturalness is habitat-relative. Opaque extensions for non-genuine formats. Specialist names require magic and membership. Famous public sample IDs forbidden as decoration. Published checksums must match bytes.


Commands

CommandPurpose
charm forgeBuild habitat tree + optional volume / placeholder
charm smellInspect tree: findings, severity score, dual refuse
charm benchCalibration fixtures (known-bad must blow)
charm explain [code]Finding catalog
charm doctorEnvironment + doctrine pointers
charm templatesList habitats
charm which-vcLocate VeraCrypt

Forge refuses blown covers by default. --i-know is an informed override. --write-seed is off by default. Size ceilings require --unsafe-size when deliberately exceeded.


Research ladder (M4–M18)

BandContent
M4Finite adaptive gap certificates, score hygiene, witnesses
M5Flattening, root-arity, $G_2(K)=1-1/K$, butterfly uniqueness, $k$-pair
M6–M9All-$B$ envelopes, greedy failure, checklist incompleteness, capacity zero
M10–M13Closed forms vs DP, doctrine pack, parity budgets, unbounded separation
M14–M18Nesting, score–LR reversals, query complexity, randomized NA, mega-pack

Reproduce: ladder runners + M4/M5 test suites. Static and animated figures are first-class artifacts of the certificates, not decoration.

Open frontier. Support-constrained curve $G_2(K,r)$; equality for $K>2$; sharp $G_B(K)$ for $B\ge 3$; guarded compilation; Lean formalization of the seed package; completed primary-source collision.


Explicit non-goals

  • Inventing or “improving” ciphers
  • Probability-of-generation marketing for blown_score
  • Operational guidance for concealing material from forensic inspection
  • Exhaustive file-type encyclopedias
  • T4 claims under any packaging
  • Literature-novelty press language for the sharp seed package

§8. Software layout (abbreviated)

charm
├── forge construction sequence + refuse joint
├── smell as-built detection oracle + severity monoid + dual gate
├── props habitat members (decoy trees)
├── caliper size bands / opaque payload policy
├── ecology specialist families + habitat membership
├── forgery seeded identity fields
├── kernel foundation L0 (VeraCrypt create)
├── bench known-bad load tests
└── catalog detail catalog (explain surface)

Process: docs/SKUNKWORKS.md · security: SECURITY.md · field notes: docs/FIELD_GUIDE.md


Colors

Purdue black#000000 / #0A0A0A · old gold#CFB991 · Boiler Up.

Colophon

David Lombardo · MIT License · v0.3.8
github.com/coldbricks/charm13

All mathematical claims are relative to the finite models named in the text. Open questions are listed in the theorem catalog.

About

Notes on budgeted adaptive inspection in finite models. Exact envelopes G2(K)=1-1/K. Certificates. Engineering corollary for habitat cover.

Resources

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages