MusewoodsStory

Writing Mathematics in Musewoods
Formation
Analytical Storytelling

Surendra Reddy

Musewoods · Authoring

Write the relationship in plain text. Let Musewoods reveal the mathematics.

Math Expressions give formal relationships a native place beside prose, diagrams, and Viewgraphs while keeping the source document readable.

Authors write AsciiMath. Musewoods transforms it into semantic MathML and renders the mathematical expression in place.

See Math Expressions at work

01

Math Expressions

The source stays readable. The rendered Story becomes mathematical.

Musewoods separates the notation an author writes from the semantic mathematics a reader sees.

Most ideas in Musewoods begin in language. We describe an observation, develop an argument, compare alternatives, or trace relationships through prose. Sometimes, however, another paragraph makes a relationship harder rather than easier to see. A variable, equation, probability, summation, or formal relationship may express the thought more precisely.

Math Expressions exist for those moments. The author writes the expression in AsciiMath, a compact notation that remains understandable in plain text. Musewoods recognizes the Math primitive, transforms the AsciiMath into semantic MathML, and allows the browser to render the resulting mathematical notation.

The important distinction is between what the author writes and what the reader sees.

Consider the simplest example. In the source document, an author writes the following:

{{math: x^2}}

When Musewoods renders the Story, the same source becomes:

x2

The source remains easy to type and inspect, while the rendered expression carries mathematical semantics. This pattern is the foundation of the entire Math Expressions capability.

One expression · two representations

What the author writes

`{{math: x^2}}`

What Musewoods renders

{{math: x^2}}

The same mechanism works with variables and subscripts. The author writes:

{{math: x_i^2}}

Musewoods renders:

xi2

Nothing about the surrounding Story changes. The expression remains inline, but the reader encounters mathematical notation rather than source syntax.

AsciiMath deliberately keeps fractions readable in source form. An author can write:

{{math: (a+b)/(c+d)}}

Musewoods renders:

a+bc+d

The parentheses establish the numerator and denominator groups. The rendering system interprets that structure and presents it as mathematical notation.

Functions follow the same readable convention. The source:

{{math: sqrt(x)}}

renders as:

x

The author never needs to write the corresponding MathML structure.

AsciiMath also provides readable names for common mathematical symbols. The source:

{{math: alpha + beta = gamma}}

renders as:

α+β=γ

This illustrates an important reason for using AsciiMath as the authoring language. Even before rendering, another person reading the Markdown can understand the intended relationship.

Relational expressions work naturally as well. The source:

{{math: x <= y}}

renders as:

x≤y

Likewise:

{{math: x >= 0}}

renders as:

x≥0

These expressions are especially useful when a Story discusses constraints, thresholds, optimization conditions, or formal decision rules.

More structured mathematical notation remains compact in the source. A summation can be authored as:

{{math: sum_(i=1)^n x_i}}

Musewoods renders:

∑i=1nxi

Here _ establishes the lower expression and ^ establishes the upper expression. The AsciiMath source is linear and readable; the rendered form expresses the mathematical hierarchy.

A product follows the same pattern. The source:

{{math: prod_(i=1)^n x_i}}

renders as:

∏i=1nxi

The authoring grammar therefore remains consistent even as the mathematical structure becomes richer.

An integral can be written:

{{math: int_0^1 x^2 dx}}

and Musewoods renders:

∫01x2dx

The source is still recognizable mathematical language. Musewoods performs the transformation rather than requiring the author to think in terms of presentation markup.

The same principle applies to limits. The author writes:

{{math: lim_(x->oo) 1/x}}

Musewoods renders:

limx→∞1x

Here oo represents infinity in AsciiMath, while the rendering layer supplies the appropriate mathematical representation.

Even a compact matrix can remain readable in the Markdown source:

{{math: ((a,b),(c,d))}}

Musewoods renders:

(abcd)

The author is describing mathematical structure rather than manually constructing its visual presentation.

Source → rendered mathematics

A small AsciiMath vocabulary covers a surprisingly large range of everyday notation.

Fraction

`(a+b)/(c+d)` → {{math: (a+b)/(c+d)}}

Power and subscript

`x_i^2` → {{math: x_i^2}}

Square root

`sqrt(x)` → {{math: sqrt(x)}}

Summation

`sum_(i=1)^n x_i` → {{math: sum_(i=1)^n x_i}}

Integral

`int_0^1 x^2 dx` → {{math: int_0^1 x^2 dx}}

Limit

`lim_(x->oo) 1/x` → {{math: lim_(x->oo) 1/x}}

Greek symbols

`alpha + beta = gamma` → {{math: alpha + beta = gamma}}

Matrix

`((a,b),(c,d))` → {{math: ((a,b),(c,d))}}

Inline expressions belong to the flow of a sentence. When a mathematical relationship deserves its own visual space, Musewoods also provides block Math. The authoring form begins with the Math directive :::math, places the AsciiMath expression on the next line, and closes the block with :::.

For example, a block expression can contain Delta V_"system" > sum_(i=1)^n Delta V_i. The block form tells Musewoods that the mathematical relationship should stand apart from the surrounding paragraph rather than participate inline.

Because the current Storyboard grammar interprets colon directives structurally before embedded Math is resolved, this tutorial does not execute a live block Math directive inside the Story itself. The same AsciiMath expression can nevertheless be rendered inline here to show the mathematical result:

ΔVsystem>∑i=1nΔVi

The distinction is temporary and architectural rather than mathematical. Inline and block Math share the same AsciiMath expression language; their difference is how the rendered expression participates in the surrounding document.

Authors write the relationship. Musewoods renders its mathematical form.

02

Beyond notation

Mathematics earns its place when it makes the reasoning easier to inspect.

The purpose of Math Expressions is not to decorate technical writing with equations, but to give formal relationships a native role in the development of an idea.

Consider a simple model of regenerative value. We might begin with the proposition that regenerative value includes economic, ecological, and social dimensions. In source form, the relationship is written:

{{math: V_r = V_e + V_ec + V_s}}

Musewoods renders the relationship as:

Vr=Ve+Vec+Vs

The rendered equation is more than a typographic improvement. It makes the proposed structure explicit enough for the Story to interrogate it. Are these dimensions really additive? Are there interactions among them? Can ecological loss always be compensated by economic gain? The mathematical expression compresses the proposition; the surrounding prose examines whether the proposition deserves to survive.

Now consider a stronger systems hypothesis: coordination across a system may create value beyond the sum of isolated improvements.

The author writes:

{{math: Delta V_"system" > sum_(i=1)^n Delta V_i}}

Musewoods renders:

ΔVsystem>∑i=1nΔVi

Once visible in this form, the relationship becomes easier to challenge. What produces the additional system value? Coordination may reduce friction, improve information flow, expose complementarities, change incentives, or allow decisions to occur at a level that no participant can reach independently.

The equation has not proved the proposition. It has made the proposition visible enough to reason about.

Formal notation can also express uncertainty without manufacturing false precision. Suppose regenerative capacity depends on ecological condition, social capacity, coordination, and time, while the exact relationship remains unknown.

The source can state:

{{math: R = f(E, S, C, t)}}

Musewoods renders:

R=f(E,S,C,t)

This expression says something important without claiming too much. Regenerative capacity R depends on several variables, but the expression does not invent coefficients, assume independence, or pretend that the relationship is necessarily linear.

A Journal might record observations that change our understanding of one variable. A Story can develop the argument surrounding the relationship. A Grove can accumulate and challenge the model over time. A Viewgraph can make the interactions among those variables available for visual reasoning.

Math Expressions are equally useful when reasoning about uncertainty. Bayes' theorem can be authored in readable AsciiMath as:

{{math: P(A|B) = (P(B|A)P(A))/(P(B))}}

Musewoods renders:

P(A|B)=P(B|A)P(A)P(B)

The author remains in Markdown and AsciiMath while the rendering system supplies the mathematical presentation. Notice the denominator's own parentheses around P(B): a / fraction takes exactly one term on each side, so a denominator that is itself a function call needs its own grouping — (P(B)), not a bare P(B) — or only P becomes the denominator while (B) is stranded outside the fraction.

Different relationships ask for different representations

Choose the form according to what the reader needs to understand.

Prose

Use prose for explanation, interpretation, context, assumptions, argument, and consequence.

Math Expressions

Use Math when the relationship is formal, quantitative, algebraic, probabilistic, logical, or otherwise mathematical.

Mermaid

Use Mermaid when topology, sequence, architecture, dependency, state, or process is what needs to become visible.

Viewgraph

Use a Viewgraph when the reader needs to reason visually across a richer structure or system of relationships.

Underneath the authoring experience, Musewoods keeps a deliberate separation between source and rendered representation. AsciiMath is the human-facing authoring language. The Musewoods Math primitive recognizes the expression, the Math adapter transforms it into MathML, the generated representation passes through the rendering and safety boundary, and the browser presents semantic mathematics.

Figure 1

Rendering diagram…

The source therefore remains stable even if rendering technology evolves. sqrt(x) remains the authored expression; the MathML representation is generated. This separation preserves readability for authors while giving Musewoods a semantic mathematical representation for rendering, accessibility, diagnostics, and future system capabilities.

A practical authoring pattern

Establish → Formalize → Interrogate

Begin in prose by establishing the observation or hypothesis. Formalize the relationship with Math when notation makes it more precise. Then return to prose and interrogate what the expression assumes, what mechanisms might produce it, where it could fail, and what evidence would change your understanding.

This sequence prevents mathematics from becoming decoration. The equation participates in the argument because the prose prepares it and then reasons from it.

Prose explains. Math formalizes. Mermaid exposes structure and process. Viewgraphs make relationships available for visual reasoning.