Mathematics in plain text

MATHEMATICS IN PLAIN TEXT (UTF-8)
---------------------------------

## AIMS

- terminal editors
- long-term readability
- grep/search/refactoring
- minimal markup
- vector calculus, tensors, and physics notation
- acceptable behaviour with screen readers

## PRINCIPLES

- structure beats typography
- semantics beat visual compactness
- consistency beats elegance
- Unicode is allowed for symbols, not for structure
- if a notation cannot scale, do not use it at all

## () VS {}

- use ASCII parentheses for grouping
- never use braces {} for mathematical structure
- never rely on spacing for meaning

Correct:
  x^(n+1)
  g_(ik)
  (a+b)*c

Incorrect:
  x^{n+1}
  Aⁱᵢ
  a b c   (ambiguous)

## SUPERSCRIPTS AND SUBSCRIPTS

- use ^ and _ exclusively
- group with parentheses

Correct:
  x^2
  x^(1/2)
  A^i
  A_i
  g_(ij)

Incorrect:
  x²
  x¹⸍²
  Aⁱ
  Aᵢ

- Unicode superscripts/subscripts are DECORATIVE ONLY
- they must never carry mathematical meaning


## ARITHMETIC OPERATORS

ASCII operators are the default:

  +   addition 2 + 2
  -   subtraction 2 - 2
  *   multiplication 2*2
  /   division 2/2

## FRACTIONS AND POWERS

- never use stacked fractions
- never invent superscript division

Correct:
  a/(a+b)
  x^(1/2)
  (p*p)/(2m)

Acceptable shorthand:
  sqrt(x)

Incorrect:
  x¹⸍²
  a·b/c   (ambiguous)


## MULTIPLICATION CONVENTIONS

###  Juxtaposition (restricted use)

Allowed ONLY when:
- scalars only
- no vectors, matrices, or operators
- no ambiguity

Examples:
  ab
  2x
  m v
  ℏω

### General multiplication

Use '*'.

Examples:
  (a+b)*c
  A*B
  f*g

### Dot product (semantic)

Use ONLY when it means an inner product.

Preferred:
  dot(a, b)

Optional symbol:
  a⋅b   (if and only if dot means inner product)

Never use dot as generic multiplication.

### Cross product

  a × b

### Tensor contraction

Use indices only.

  A^i B_i

Never add dots.

## NUMERALS AND DOT

The dot is acceptable ONLY for pure numerals.

Allowed:
  9·4
  2·9

Forbidden once symbols appear:
  a·b
  x·2

Reason: ambiguity explodes outside numerals.

## DIVISION

Inline division uses a tight slash.

Correct:

a/b
(b + c)/d

No spaces around '/'.

## EQUALITY AND RELATIONS

Allowed Unicode relations:
  =  ≠  <  >  ≤  ≥  ⇒  ⇔

These are semantic and screen-reader friendly.


## VECTORS, SCALARS, OPERATORS

Do NOT encode roles typographically.

Roles are defined by CONTEXT and NAMING.

- Scalars: φ, f, ρ
- Vectors: a, b, v, r
- Operators: grad, div, curl
- Magnitude: |v|
- Component: v^i (standard, and use v_i for dual)
- Dot product: |v| = sqrt(v_i v^i)

never use overhead arrows
never use bold

## VECTOR CALCULUS

Treat ∇ as SYNTAX, not as an object.

Correct:
  grad φ
  div v
  curl v

Preferred functional form:
  grad(φ)
  div(v)
  curl(v)

Directional derivative:
  D_v φ
  dot(v, grad φ)

Incorrect:
  ∇ as a vector
  ∇·v (unless you define it explicitly)

## DERIVATIVES

Time derivative:
  d/dt x

Partial derivative:
  ∂/∂t φ
  ∂_i φ

never use Newtonian dots
never overload punctuation

## INDEX NOTATION

Indices are STRUCTURAL.

Rules:
- indices use ASCII letters
- summation is implicit
- positions matter

Examples:
  A^i B_i
  g_(ik) A^i A^k
  ε^(hijk) ε_(hijk)

never use Unicode superscript letters
never rely on visual similarity


## PUNCTUATION AND EQUATIONS

Displayed equations carry NO punctuation.

Correct:

a = b/1000

Incorrect:

a = b/1000.

Inline equations follow the punctuation rules of the sentence.

Example:

If a = b/1000, then a is fixed.

If punctuation seems grammatically required, rewrite the prose.

Preferred pattern:

We obtain:

a = b/1000

Never attach commas or full stops to displayed equations.

## SPACING AROUND OPERATORS

Binary operators take spaces on both sides.

Correct:

a + b = 100
u_i v^i = 0
a − b = c

Incorrect:

a+b=100
a+b = 100

Unary operators bind tightly (no spaces).

Correct:

−a + b = 0
a = −b

Relations and arrows are spaced.

Correct:

a = b ⇒ c = d
x → 0

## ARROWS AND IMPLICATION

Logical implication uses the Unicode double arrow.

Use:

⇒

Example:

a = b ⇒ f(a) = f(b)

ASCII fallback only if necessary:

=>

Simple arrows are for mappings, limits, or evolution.

Use Unicode arrows:

→   mapping or limit
↦   maps to
↔   equivalence

Examples:

f : X → Y
x ↦ f(x)
x → 0

Do NOT use ASCII arrows for implication or mappings.

Avoid:

->
--->
<-->

## SCREEN READERS

- Expect imperfect math support.
- Prioritise structural clarity.
- Avoid typographic hacks.
- Accept that ASCII operators will be read literally.