User:Inthar/Style guide: Difference between revisions

Inthar (talk | contribs)
Inthar (talk | contribs)
Line 15: Line 15:
* For <math>k \in \mathbb{R}</math> and <math>n\in \mathbb{Z}_{>0},</math> <math>[n]_k</math> denotes <math>\{k, k+1, ..., k+n-1\}.</math> I may also use <math>[i:j]</math> for <math>[j-i]_i.</math> For ''n'' = 0, [0]<sub>k</sub> is the empty set.
* For <math>k \in \mathbb{R}</math> and <math>n\in \mathbb{Z}_{>0},</math> <math>[n]_k</math> denotes <math>\{k, k+1, ..., k+n-1\}.</math> I may also use <math>[i:j]</math> for <math>[j-i]_i.</math> For ''n'' = 0, [0]<sub>k</sub> is the empty set.
=== Words ===
=== Words ===
* Zero-indexing is used for 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> ''n'' is called the ''length'' of ''w''. The letter of ''w'' at index ''i'' is denoted ''w''[''i'']. If 0 &le; ''i'' < ''j'' &le; |''w''| &minus; 1, the slice notation ''w''[''i'':''j''] denotes the (''j'' &minus; ''i'')-letter word ''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 letters and <math>n \in \mathbb{Z}_{\ge 0}.</math> ''n'' is called the ''length'' of ''w''. The letter of ''w'' at index ''i'' is denoted ''w''[''i'']. If 0 &le; ''i'' < ''j'' &le; |''w''| &minus; 1, the slice notation ''w''[''i'':''j''] denotes the (''j'' &minus; ''i'')-letter word ''w''[''i'']''w''[''i''+1]...''w''[''j''&minus;1].
* 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 ''s''[''i'' mod ''n'']. The ''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 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 ''s''[''i'' mod ''n'']. The ''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 period of ''s'' is equal to the length of ''s'', then ''s'' is called ''primitive''.