Difference between revisions of "Template:MSeq"
From Maths
m |
m (Adding the nomath parameter to allow sequences to be nested) |
||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
{{MSeq/Description}} | {{MSeq/Description}} | ||
− | </noinclude><includeonly>{{#if:{{{nomath|}}}|| | + | </noinclude><includeonly>{{#if:{{{nomath|}}}||[ilmath]}} {{{pre|}}} <!-- |
-->({ <!-- | -->({ <!-- | ||
Line 15: | Line 15: | ||
-->{{#if:{{{in|}}}|\subseteq {{{in}}}|}} <!-- | -->{{#if:{{{in|}}}|\subseteq {{{in}}}|}} <!-- | ||
− | --> {{{post|}}} {{#if:{{{nomath|}}}|| | + | --> {{{post|}}} {{#if:{{{nomath|}}}||[/ilmath]}}<includeonly> |
Latest revision as of 20:13, 20 April 2016
Contents
[hide]Purpose
I very often have to write (An)∞n=1, and sometimes get lazy and just write (An) instead. To solve this I shall introduce this template:
- Template:MSeq - for "Mathematical sequence"
Caveats
- For (An)∞n=1 you must provide A_n for the first parameter, even though it knows the index is n, this is because of subsequences, if we have A_n as the sequence representation, and use j as the index, as in (Anj)∞j=1 this would be rendered as:
- {A_n}_{j}, yielding Anj not Anj (A_{n_j}) as intended.
Parameters
The parameters are ordered (except for the in one)
Parameter | Name | Default | Meaning |
---|---|---|---|
1 | (no named equiv) | A warning about the lack of value | The representative element of the sequence shown in brackets, in (An)∞n=1 is is A_n |
2 | index | n | The indexing variable, used for the "n" in the "n=1" part of (An)∞n=1 |
3 | from | 1 | The starting index of the sequence, eg the "1" in the "n=1" part of (An)∞n=1 |
4 | to | \infty | The end index, eg the "∞" in (An)∞n=1 |
(no index) | in | to say a "sequence in X" means the sequence consists of elements of X, see abuses of the implies-subset relation for more. Represents the "X" in (An)∞n=1⊆X | |
(no index) | pre | Any math-markup preceding the sequence, eg the ∃ in ∃(An)∞n=1 | |
(no index) | post | Any math-markup after the sequence, eg the [Ai<C] in ∀i∈N∃(An)∞n=1⊆X[Ai<C] |
Examples
- {{MSeq|A_k|k}} - (Ak)∞k=1
- {{MSeq|A_k|index=k}} - (Ak)∞k=1
- {{MSeq|A_p|p|5|105|in=\mathbb{Z}_{\ge0} }} - (Ap)105p=5⊆Z≥0
- {{MSeq|A_n|in=X|pre=\forall i\in\mathbb{N}\exists|post=[A_i<C]}} - ∀i∈N∃(An)∞n=1⊆X[Ai<C]