# Bounded Harmonic Conjugate Recovery

Date: 2026-10-29. Status: scoped implementation, mathematical, HTTP, mechanism-
removal, real-data, full default/kahler and example gates passed.
Uncommitted and not deployed. Receipts: HARMONIC_CONJUGATE_RESULTS.md.

## Product boundary

One object contains a real harmonic polynomial, its recovered harmonic
conjugate, and their bounded holomorphic combination on the unit disk. Unlike
the earlier complex-observation interpolator, callers supply only a real field
and the imaginary value at the center. No neural training, statistical fit,
automatic coordinate chart, or inferred holomorphic physics is involved.

This gate supports explicitly represented real polynomials of total degree at
most 32. Sparse omitted terms mean zero, not missing observations. It does NOT
infer a harmonic field from scattered real samples or implement arbitrary
manifolds, annuli, noisy observations, or chart gluing. It is a read-only
`kahler` primitive; the previous interpolation endpoint stays unchanged.

## Mathematics

Input: `u(x,y) = sum c_pq x^p y^q`, read "you of ex, why equals the sum of
c sub p q times ex to the p times why to the q". Check its coefficient
compatibility with the real part of an analytic polynomial. Laplace's operator
is `Delta u = u_xx + u_yy`, read "delta you equals you ex ex plus you why why".

Recover `f(z) = sum a_n z^n`, read "eff of zee equals the sum of a sub n times
zee to the n", by `a_0 = c_00 + i v_0` and, for positive n,
`a_n = c_n0 - i c_(n-1,1)/n`. Here "eye" is the imaginary unit and "vee sub
zero" fixes the otherwise undetermined additive constant of the conjugate.
Expand the recovered polynomial back into real coefficients and compare ALL
input terms, including absent zero terms. Merely reading the x-axis terms is
not a harmonicity test. The returned pair is `u = Re f`, `v = Im f` ("you is
the real part of eff; vee is the imaginary part of eff").

For exact compatible polynomial data this conjugate is unique after v_0 is
fixed. The Cauchy-Riemann identities are `u_x = v_y`, `u_y = -v_x`, pronounced
"you ex equals vee why; you why equals minus vee ex". Both components are
harmonic. Return analytic first/second derivatives together with each value;
they describe the SAME reconstructed polynomial, not independent fits.

The full complex bound is independent of harmonicity. By the maximum-modulus
principle it suffices to bound the unit-circle values of the polynomial. A
triangle upper bound is `sum |a_n|`. A uniform N-point boundary mesh has a
global upper bound `max_mesh |f| + pi L/N`, where `L = sum n |a_n|` bounds the
angular derivative. Read "ell equals the sum of n times the magnitude of a sub
n". Every boundary point lies within pi/N of a mesh point. Add a disclosed
floating-point allowance; sampled values alone are NEVER a global certificate.
Refine N from 64 to 65,536 by doubling. A lower bound above the requested bound
disproves compatibility; an upper bound below it establishes numerical
compatibility; otherwise return unresolved. This is finite-precision evidence,
not directed-rounding interval arithmetic or a formal proof.

References: [harmonic conjugacy](https://ocw.mit.edu/courses/18-112-functions-of-a-complex-variable-fall-2008/414780e0991d20cd338320d3784fae4d_lecture16.pdf),
[maximum modulus](https://dlmf.nist.gov/1.10#v).

## Numerical and input contract

- 1..561 distinct monomials, total degree <=32; finite coefficients and center
  imaginary value. Duplicate powers are refused, not silently summed.
- Three distinct unencrypted numeric fiber fields: two nonnegative integer
  powers (`power_fields[2]`) and one real `coefficient_field`.
- Integers must be exactly representable as binary64; no timestamps, nulls,
  text, ciphertext, or dropped rows. All input terms carry source keys.
- At most 256 interior queries, modulus <=1-1e-8; finite positive bound.
- Compare re-expanded real coefficients exactly in binary64. Nonzero
  reconstruction residual above 1e-12 times max(1, input coefficient L1 norm)
  means non_harmonic; smaller nonzero residual means numerically_unresolved.
  Do not silently project a near-harmonic polynomial onto a harmonic one.
- Report normalized coefficient-Laplacian residual and absolute reconstruction
  residual. Overflow/unsafe arithmetic returns unresolved, without an object.
- Numerical bound allowance: 128 * machine_epsilon * (degree+1) * max(1,L1).
  Bounds too close to decide return unresolved. No clipping or increased bound.
- Status: bounded_holomorphic, non_harmonic, bound_exceeded, or
  numerically_unresolved. Only bounded_holomorphic publishes the object and
  queries. The bound includes the caller's chosen imaginary constant.

## HTTP and object

`POST /v1/bundles/{name}/brain/harmonic_conjugate`:

```json
{
  "power_fields": ["x_power", "y_power"],
  "coefficient_field": "coefficient",
  "conjugate_at_center": 0.0,
  "bound": 1.01,
  "queries": [[0.2, 0.3], [0.7, -0.1]]
}
```

All keys are explicit; unknown keys refused. Snapshot provenance, numeric and
encryption checks, JSON/DHOOM negotiation reuse the prior endpoint's policy.
Output contains ascending complex coefficients of ONE polynomial, its bound,
domain, conjugate normalization, values, first/second complex derivatives,
numerical bound enclosure/method/mesh size, residuals, source rows, bundle
lifetime and revision. No result cache. Missing bundle:404; unsupported input:422.
Same-size edits, deletes, recreation and restart must not reuse stale results.

## Strict TDD gates

1. Behaviorally failing library tests against a compiling stub, then implement.
2. Planted nontrivial mixed real/imaginary polynomial: recover conjugate sign,
   both derivatives, harmonicity and Cauchy-Riemann identities independently.
3. Non-harmonic radial quadratic rejected; near-compatible rounding unresolved;
   duplicates, limits, nonfinite and out-of-domain values refused explicitly.
4. Imaginary normalization changes the full bound without changing real data.
   A cancellation polynomial passes with a mesh bound even when L1 fails.
5. Mechanism removals: bypass real-coefficient validation; remove the global
   mesh correction. Each must make its dedicated gate fail, then restore.
6. HTTP behavioral red/green, source/field/refusal/DHOOM/update/delete/recreate
   gates and route catalog. Full cargo test with/without kahler, example targets.
7. Rebuild, hash-check, start only an owned scratch engine on 127.0.0.1, run
   the real-data gate and stop it. Do not touch the user's release process.

## Real-data go/no-go, declared before running

Reuse all 16,065 original UCI Wine Quality and Combined Cycle Power Plant rows,
all 17 measured numeric fields and the pinned source SHA-256 hashes from the
previous gate. A shared 32-bin histogram produces an empirical probability
generating polynomial. Expand ONLY its real component into sparse real
polynomial coefficient records; never send imaginary function values. Store
integer counts, not separately rounded probabilities, and scale the requested
bound by the record count. This preserves the same normalized problem without
turning coefficient expansion/JSON rounding into a near-harmonic field. This
precision refinement was specified before running the live real-data gate.
The reconstructed complex polynomial is tested against the full empirical
polynomial via an independent direct-power Python oracle at 48 interior points
per field and a dense unit-circle grid. No dataset-specific solver branches.

Predeclared gates: all 17 fields accepted with normalized bound 1.01; all 816
held-out complex values and derivatives, normalized by record count, agree with
the oracle within 1e-8;
recovered imaginary RMSE is <=1e-8 and at least 100x smaller than the zero-
imaginary baseline for every field; normalized returned upper bound <=1.01 and covers
the dense oracle mesh. Report full results, degree, sizes, residuals and latency.
Test a non-harmonic edit, restoration, coherent same-size change, and restart
across all fields. Include nonzero imaginary analytic coefficients via planted
unit fixtures; empirical distributions alone cannot test their sign.

This demonstrates recovery of missing quadrature in analytic distribution
fingerprints from a complete real polynomial representation. The polynomial
assumption supplies information; this is not arbitrary missing-fact recovery,
raw physical prediction, a noise model, or lossless compression of source rows.
No commit/deployment before gates pass. Exact receipts belong in
HARMONIC_CONJUGATE_RESULTS.md.
