User:Inthar/Math style guide: Difference between revisions

From Xenharmonic Reference
mNo edit summary
 
(54 intermediate revisions by the same user not shown)
Line 1: Line 1:
This document is a style guide. Pages are not required to follow it, but any page that does should link to this page using <code>{{<nowiki />User:Inthar/Template:Notation}}</code>. It documents notation that may differ from conventional xen notation or conventional math notation.
This document is a style guide for technical articles. Pages are not required to follow it, but any page that does should link to this page using <code>{{<nowiki />User:Inthar/Template:Notation}}</code>. It documents notation that may differ from conventional xen notation or conventional math notation.


=== Variables ===
== Basic musical objects ==
* Capital italicized Latin letters may denote scales written cumulatively: i.e. with ''S''(0) = '''0''' and ''S''(''i'' + ''p'') = '''E''' + ''S''(''i'') (''p'' = length, '''E''' = equave) for every ''i''.
* A ''chord'' is a nonempty finite subset of pitch space (which may be represented as <math>\mathbb{R}</math>), modulo pitch transposition (which may be represented as addition if <math>\mathbb{R}</math> is used).
* A ''scale'' is a nonempty discrete subset of pitch space invariant under transposition by a chosen equave <math>E\in \mathbb{R}_{>0},</math> modulo transposition.
* The ''period'' of a scale is the smallest positive <math>p</math> such that the scale is invariant under transposition by <math>p.</math>
* A ''based scale'' is a scale with a chosen basepoint, called the ''tonic''. By discreteness and the natural ordering on the reals, a based scale can be written as (an equivalence class of) a strictly increasing function <math>S: \mathbb{Z} \to \mathbb{R}</math> such that <math>\cdots < S(-1) < S(0) < S(1) < \cdots</math> where the image of <math>S</math> is the scale and <math>S(0)</math> is the tonic which we may assume to be 0.
* A ''mode'' is an equivalence class of based scales for a given scale that become equal after projecting pitch space onto pitch class space modulo the scale's period (not necessarily the equave).
 
== Variables ==
* Capital italicized Latin letters may denote based scales written cumulatively: i.e. with ''S''(0) = 0 and ''S''(''i'' + ''p'') = ''E'' + ''S''(''i'') (''p'' = length, ''E'' = equave) for every ''i''.
** ''S''(''n'') = 100''n'' cents
** ''S''(''n'') = 100''n'' cents
* Lowercase italicized Latin letters may denote (rotational equivalence classes of) scales written as steps, or scale words written as functions of the given arguments. For example:
* Lowercase italicized Latin letters may denote any real number. They may also denote (rotational equivalence classes of) based scales written as steps, or scale words written as functions of the given arguments. For example:
** ''s''('''a''', '''b''', '''c''') = '''abacaba'''
** ''s''('''a''', '''b''', '''c''') = '''abacaba'''
** <math>\sum_{n=a}^{b-1}s(n) = S(b)-S(a) \ \text{if} \ s(n) := S(n+1)-S(n)</math>
** <math>\sum_{n=a}^{b-1}s(n) = S(b)-S(a) \ \text{if} \ s(n) := S(n+1)-S(n)</math>
* Bolded variables denote interval sizes (especially letters of scale words) and elements of lattices. This is optional, but may be used for visual clarity, particularly in pages with more mathematical notation. '''0''' indicates the unison (so start from '''1''' if you want to name abstract letters after integers).
* Bolded variables denote abstract letters of scale words (ideally not specific sizes) and elements of free modules. This is optional, but may be used for visual clarity, particularly in pages with more mathematical notation.
** 5'''L'''&nbsp;2'''s'''
** 5'''L'''&nbsp;2'''s'''
* Sans serif function names are scale constructions, or more generally functions named more verbosely than is typical for conventional math notation. The page should define any sans-serif functions clearly, as it should any notation not specifically stated on this page.
* Sans serif text in typeset equations are scale constructions, or more generally variables and functions named more verbosely than is typical for conventional math notation. On XenBase, you should generally prefer verbose names for scale constructions; when using shorthand, define the shorthand clearly and use the same shorthand consistently.
** Blackdye is <math>\mathsf{cross_set}(\mathrm{Pyth}[5]; 10/9)</math>


=== Sets ===
== Sets ==
* For conciseness the following notation is provided for ranges. For <math>x \in \mathbb{R}</math> and <math>n\in \mathbb{Z}_{>0},</math> <math>[n]_x</math> denotes the ''n''-element set <math>\{x, x+1, ..., x+n-1\}.</math> [0]<sub>x</sub> is the empty set, and [ω]<sub>''x''</sub> is the set <math>\{x + n : n \in \mathbb{Z}_{\geq 0}\}.</math> You may also use:
* For conciseness the following notation is provided for ranges. For <math>x \in \mathbb{R}</math> and <math>n\in \mathbb{Z}_{>0},</math> <math>[n]_x</math> denotes the ''n''-element set <math>\{x, x+1, ..., x+n-1\}.</math> [0]<sub>x</sub> is the empty set, and [ω]<sub>''x''</sub> is the set <math>\{x + n : n \in \mathbb{Z}_{\geq 0}\}.</math> You may also use:
** <math>[i:j]</math> for <math>[j-i]_i</math> (''i'' is included, ''j'' is excluded)
** <math>[i:j]</math> for <math>[j-i]_i</math> (''i'' is included, ''j'' is excluded)
Line 19: Line 25:
* Avoid <math>\mathbb{N}.</math> Use <math>\mathbb{Z}_{>0}</math> or <math>\mathbb{Z}_{\ge 0}</math> depending on which is meant.
* Avoid <math>\mathbb{N}.</math> Use <math>\mathbb{Z}_{>0}</math> or <math>\mathbb{Z}_{\ge 0}</math> depending on which is meant.


=== Words ===
== Words ==
* Zero-indexing is used for word indices.
* Zero-indexing is used for word indices.
* A ''(linear) word'' is a function <math>w : [n]_0 \to \mathcal{A}</math> where <math>\mathcal{A}</math> is a set (of elements usually called ''letters'') and <math>n \in \mathbb{Z}_{\ge 0}</math> or {{nowrap|''n'' {{=}} &infin;}}. ''n'' is called the ''length'' of ''w''. The letter of ''w'' at index ''i'' is denoted ''w''[''i'']. If {{nowrap|0 &le; ''i'' &lt; ''j'' &le; {{!}}''w''{{!}} &minus; 1}}, the slice notation {{nowrap|''w''[''i'':''j'']}} denotes the {{nowrap|(''j'' &minus; ''i'')}}-letter word {{nowrap|''w''[''i'']''w''[''i'' + 1]...''w''[''j'' &minus; 1]}}.
* A ''(linear) word'' is a function <math>w : [n]_0 \to \mathcal{A}</math> where <math>\mathcal{A}</math> is a set (of elements usually called ''letters'') and <math>n \in \mathbb{Z}_{\ge 0}</math> or {{nowrap|''n'' {{=}} &infin;}}. ''n'' is called the ''length'' of ''w''. The letter of ''w'' at index ''i'' is denoted ''w''[''i'']. If {{nowrap|0 &le; ''i'' &lt; ''j'' &le; {{!}}''w''{{!}} &minus; 1}}, the slice notation {{nowrap|''w''[''i'':''j'']}} denotes the {{nowrap|(''j'' &minus; ''i'')}}-letter word {{nowrap|''w''[''i'']''w''[''i'' + 1]...''w''[''j'' &minus; 1]}}.
Line 29: Line 35:
* Substitution: If ''w'' is a linear or based circular word in '''X''' and possibly other letters, and ''u'' is a based circular word, then <math>\mathsf{subst}(w, \mathbf{X}, u)</math> denotes the word ''w'' but with the ''i''th occurrence of '''X''' replaced with ''u''[''i''] (for {{nowrap|''i'' &ge; 0}}).
* Substitution: If ''w'' is a linear or based circular word in '''X''' and possibly other letters, and ''u'' is a based circular word, then <math>\mathsf{subst}(w, \mathbf{X}, u)</math> denotes the word ''w'' but with the ''i''th occurrence of '''X''' replaced with ''u''[''i''] (for {{nowrap|''i'' &ge; 0}}).


=== Algebra ===
== Algebra ==
* <math>\mathrm{JI}( p_1, ..., p_r )</math> is the ''p''<sub>1</sub>.[...].''p''<sub>''r''</sub> subgroup, the subgroup of <math>(\mathbb{R}_{>0}, \cdot)</math> generated by rationals <math>p_1, ..., p_r.</math> For not-necessarily-JI generators, <math>\mathrm{Mul}(p_1, ..., p_r)</math> is used.
* <math>\mathrm{Mul}( p_1, ..., p_r )</math> is the ''p''<sub>1</sub>.[...].''p''<sub>''r''</sub> subgroup, the subgroup of <math>(\mathbb{R}_{>0}, \cdot)</math> generated by positive reals <math>p_1, ..., p_r.</math> You may also use this notation for any multiplicative abelian group, including [[erac]] groups.
* If ''R'' is a commutative ring with 1, <math>R^r\langle a_1, ..., a_r\rangle</math> is the rank-''r'' free ''R''-module generated by basis elements <math>a_1, ..., a_r.</math> Ordered tuples in such modules are assumed to be in the given basis. Example: <math>\mathbf{m} + 3\mathbf{s} = (0,1,3) \in \mathbb{Z}^3\langle \mathbf{L}, \mathbf{m}, \mathbf{s}\rangle</math>
* If ''R'' is a commutative ring with 1, <math>R^r\langle a_1, ..., a_r\rangle</math> is the rank-''r'' free ''R''-module generated by basis elements <math>a_1, ..., a_r.</math> Ordered tuples in such modules are assumed to be in the given basis. Example: <math>\mathbf{m} + 3\mathbf{s} = (0,1,3) \in \mathbb{Z}^3\langle \mathbf{L}, \mathbf{m}, \mathbf{s}\rangle</math>


=== Miscellaneous ===
== Miscellaneous ==
* <math>\log</math> with no subscript is base ''e''.
* <math>\log</math> with no subscript is base ''e''.
* <math>s \otimes t</math> denotes the [[cross-set]] of scales ''s'' and ''t''. <math>s^{\otimes 0} = \{\mathbf{0}\}, s^{\otimes n + 1} = s \otimes s^{\otimes n}</math> is the ''n''-fold iterated cross-set.
* <math>C_1 \ \mathsf{by} \ C_2</math> denotes the [[cross-set]] of two chords or two scales with commensurable periods. <math>C^{\mathsf{by} \ 0} = \{0\}, C^{\mathsf{by} \ n + 1} = C \ \mathsf{by} \ C^{\mathsf{by}\ n}</math> is the ''n''-fold iterated cross-set.
* "''p'', lest ''q''" is shorthand for "''p'', for otherwise ''q'', which is a contradiction".
* "''p'', lest ''q''" is shorthand for "''p'', for otherwise ''q'', which is a contradiction".
* In typeset math, use <math>{}^{>}p, {}^{<}p, {}^{\times}p, {}^{\times <}p, ...</math> for elements with eracs. If necessary for clarity, use <math>p\epsilon, p\epsilon^{-1}, ...</math> where <math>\epsilon > 0</math> is a formal variable representing the erac.

Latest revision as of 23:29, 29 December 2025

This document is a style guide for technical articles. Pages are not required to follow it, but any page that does should link to this page using {{User:Inthar/Template:Notation}}. It documents notation that may differ from conventional xen notation or conventional math notation.

Basic musical objects

  • A chord is a nonempty finite subset of pitch space (which may be represented as ), modulo pitch transposition (which may be represented as addition if is used).
  • A scale is a nonempty discrete subset of pitch space invariant under transposition by a chosen equave E>0, modulo transposition.
  • The period of a scale is the smallest positive p such that the scale is invariant under transposition by p.
  • A based scale is a scale with a chosen basepoint, called the tonic. By discreteness and the natural ordering on the reals, a based scale can be written as (an equivalence class of) a strictly increasing function S: such that <S(1)<S(0)<S(1)< where the image of S is the scale and S(0) is the tonic which we may assume to be 0.
  • A mode is an equivalence class of based scales for a given scale that become equal after projecting pitch space onto pitch class space modulo the scale's period (not necessarily the equave).

Variables

  • Capital italicized Latin letters may denote based scales written cumulatively: i.e. with S(0) = 0 and S(i + p) = E + S(i) (p = length, E = equave) for every i.
    • S(n) = 100n cents
  • Lowercase italicized Latin letters may denote any real number. They may also denote (rotational equivalence classes of) based scales written as steps, or scale words written as functions of the given arguments. For example:
    • s(a, b, c) = abacaba
    • n=ab1s(n)=S(b)S(a) if s(n):=S(n+1)S(n)
  • Bolded variables denote abstract letters of scale words (ideally not specific sizes) and elements of free modules. This is optional, but may be used for visual clarity, particularly in pages with more mathematical notation.
    • 5L 2s
  • Sans serif text in typeset equations are scale constructions, or more generally variables and functions named more verbosely than is typical for conventional math notation. On XenBase, you should generally prefer verbose names for scale constructions; when using shorthand, define the shorthand clearly and use the same shorthand consistently.

Sets

  • For conciseness the following notation is provided for ranges. For x and n>0, [n]x denotes the n-element set {x,x+1,...,x+n1}. [0]x is the empty set, and [ω]x is the set {x+n:n0}. You may also use:
    • [i:j] for [ji]i (i is included, j is excluded)
    • [i:] for [ω]i
    • [:j] for {j1n:n0}
  • Avoid . Use >0 or 0 depending on which is meant.

Words

  • Zero-indexing is used for word indices.
  • A (linear) word is a function w:[n]0𝒜 where 𝒜 is a set (of elements usually called letters) and n0 or n = ∞. n is called the length of w. The letter of w at index i is denoted w[i]. If 0 ≤ i < j ≤ |w| − 1, the slice notation w[i:j] denotes the (ji)-letter word w[i]w[i + 1]...w[j − 1].
  • The length of a linear, based circular, or free circular word s is denoted |s| or len(s).
  • A based circular word is a function s:/n𝒜, where by abuse of notation, s[i] is used for s[i mod n]. The index period of a based circular word s is the minimal p,1p|s|, such that for all i, s[i+p]=s[i]. If the index period of s is equal to the length of s, then s is called primitive.
  • A (free) circular word is an equivalence class of based circular words equivalent under rotation, i.e. a set of the form {xs[x],xs[x+1],...,xs[x+|s|1]} for s a based circular word. Equivalently, a free circular word is an equivalence class of linear words of the same length under conjugacy. A based circular word may be called a mode of the corresponding free circular word or a mode/rotation of another based circular word.
  • For circular words s, if i < j the slice notation s[i:j] denotes the (ji)-letter word s[i]s[i + 1]...s[j − 1], where all indices are taken mod |s|.
  • Shifts: If s is a circular or infinite word, then for k, σk(s)=(xs[x+k]) denotes s shifted to the left by k letters.
  • Substitution: If w is a linear or based circular word in X and possibly other letters, and u is a based circular word, then subst(w,𝐗,u) denotes the word w but with the ith occurrence of X replaced with u[i] (for i ≥ 0).

Algebra

  • Mul(p1,...,pr) is the p1.[...].pr subgroup, the subgroup of (>0,) generated by positive reals p1,...,pr. You may also use this notation for any multiplicative abelian group, including erac groups.
  • If R is a commutative ring with 1, Rra1,...,ar is the rank-r free R-module generated by basis elements a1,...,ar. Ordered tuples in such modules are assumed to be in the given basis. Example: 𝐦+3𝐬=(0,1,3)3𝐋,𝐦,𝐬

Miscellaneous

  • log with no subscript is base e.
  • C1 by C2 denotes the cross-set of two chords or two scales with commensurable periods. Cby 0={0},Cby n+1=C by Cby n is the n-fold iterated cross-set.
  • "p, lest q" is shorthand for "p, for otherwise q, which is a contradiction".
  • In typeset math, use >p,<p,×p,×<p,... for elements with eracs. If necessary for clarity, use pϵ,pϵ1,... where ϵ>0 is a formal variable representing the erac.