User:Inthar/Style guide: Difference between revisions

Inthar (talk | contribs)
Inthar (talk | contribs)
No edit summary
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>.
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.
 
== Math notation ==
This section documents notation that may differ from conventional xen notation or conventional math notation.


=== Variables ===
=== Variables ===
* 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''.
* 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''.
** ''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 abstract scale [[word]]s. For example:
* 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:
** ''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''' is the unison.
* 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).
** 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 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.
** Blackdye is <math>\mathsf{crossset}(\mathrm{Pyth}[5]; 10/9)</math>
** 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 <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>
** <math>[i:j]</math> for <math>[j-i]_i</math> (''i'' is included, ''j'' is excluded)
** <math>[i:]</math> for <math>[\omega]_i.</math>
** <math>[i:]</math> for <math>[\omega]_i</math>
** <math>[:j]</math> for <math>\{j - 1 - n : n \in \mathbb{Z}_{\geq 0}\}</math>
* 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 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]}}.
* The length of a linear, based circular, or free circular word ''s'' is denoted {{len|''s''}} or len(''s'').
* A ''based circular word'' is a function <math> s: \mathbb{Z}/n \to \mathcal{A},</math> where by abuse of notation, ''s''[''i''] is used for {{nowrap|''s''[''i'' mod ''n'']}}. The ''index period'' of a based circular word ''s'' is the minimal <math>p, 1 \le p \le |s|,</math> such that for all ''i'', <math>s[i+p]=s[i].</math> If the index period of ''s'' is equal to the length of ''s'', then ''s'' is called ''primitive''.
* A ''based circular word'' is a function <math> s: \mathbb{Z}/n \to \mathcal{A},</math> where by abuse of notation, ''s''[''i''] is used for {{nowrap|''s''[''i'' mod ''n'']}}. The ''index period'' of a based circular word ''s'' is the minimal <math>p, 1 \le p \le |s|,</math> such that for all ''i'', <math>s[i+p]=s[i].</math> 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 <math>\{x\mapsto s[x], x\mapsto s[x+1], ..., x\mapsto s[x+|s|-1] \}</math> 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 rotation of the based circular word.
* A ''(free) circular word'' is an equivalence class of based circular words equivalent under rotation, i.e. a set of the form <math>\{x\mapsto s[x], x\mapsto s[x+1], ..., x\mapsto s[x+|s|-1] \}</math> 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.
* The length of a linear, based circular, or free circular word ''s'' is denoted {{len|''s''}} or len(''s'').
* For circular words ''s'', if {{nowrap|''i'' &lt; ''j''}} the slice notation {{nowrap|''s''[''i'':''j'']}} denotes the {{nowrap|(''j'' &minus; ''i'')}}-letter word {{nowrap|''s''[''i'']''s''[''i'' + 1]...''s''[''j'' &minus; 1]}}, where all indices are taken mod {{len|''s''}}.
* For circular words ''s'', if {{nowrap|''i'' &lt; ''j''}} the slice notation {{nowrap|''s''[''i'':''j'']}} denotes the {{nowrap|(''j'' &minus; ''i'')}}-letter word {{nowrap|''s''[''i'']''s''[''i'' + 1]...''s''[''j'' &minus; 1]}}, where all indices are taken mod {{len|''s''}}.
* Shifts: If ''s'' is a circular or infinite word, then for <math>k \in \mathbb{Z}, \ \sigma^k(s) = (x \mapsto s[x+k])</math> denotes ''s'' shifted to the left by ''k'' letters.
* Shifts: If ''s'' is a circular or infinite word, then for <math>k \in \mathbb{Z}, \ \sigma^k(s) = (x \mapsto s[x+k])</math> denotes ''s'' shifted to the left by ''k'' letters.
Line 36: Line 35:
=== Miscellaneous ===
=== Miscellaneous ===
* <math>\log</math> with no subscript is base ''e''.
* <math>\log</math> with no subscript is base ''e''.
* Avoid <math>\mathbb{N}.</math> Use <math>\mathbb{Z}_{>0}</math> or <math>\mathbb{Z}_{\ge 0}</math> depending on which is meant.
* <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>s \otimes t</math> denotes the [[cross-set scale|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.
* "''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".
 
== To TeX or not to TeX? ==
{{todo|inline=1| expand}}
 
[[Category:Math]]