MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / rewriteUpperHalfPlane

Function rewriteUpperHalfPlane

scripts/fungrim/gen-reference-doc.ts:208–213  ·  view source on GitHub ↗

* Render the upper half-plane membership `Element(x, HH)` as the explicit part * predicate `Im(x) > 0` — the form the engine actually guards on and that the * assumptions guide documents — rather than the orphan `\mathrm{HH}` glyph. * Only the 2-operand membership is rewritten; the 3-operand set-

(node: unknown)

Source from the content-addressed store, hash-verified

206 * left untouched.
207 */
208function rewriteUpperHalfPlane(node: unknown): unknown {
209 if (!Array.isArray(node)) return node;
210 if (node.length === 3 && node[0] === 'Element' && node[2] === 'HH')
211 return ['Greater', ['Imaginary', rewriteUpperHalfPlane(node[1])], 0];
212 return node.map(rewriteUpperHalfPlane);
213}
214
215function mathjsonToLatex(
216 ce: ReturnType<typeof createEngine>,

Callers 1

mathjsonToLatexFunction · 0.85

Calls 1

mapMethod · 0.65

Tested by

no test coverage detected