Difference between revisions of "Template:MSeq/Description"
From Maths
(Created page with "==Purpose== I very often have to write {{M|1=(A_n)_{n=1}^\infty}}, and sometimes get lazy and just write {{M|(A_n)}} instead. To solve this I shall introduce this template: *...") |
m (Adding example, documenting pre and post) |
||
(One intermediate revision by the same user not shown) | |||
Line 2: | Line 2: | ||
I very often have to write {{M|1=(A_n)_{n=1}^\infty}}, and sometimes get lazy and just write {{M|(A_n)}} instead. To solve this I shall introduce this template: | I very often have to write {{M|1=(A_n)_{n=1}^\infty}}, and sometimes get lazy and just write {{M|(A_n)}} instead. To solve this I shall introduce this template: | ||
* Template:MSeq - for "Mathematical sequence" | * Template:MSeq - for "Mathematical sequence" | ||
+ | ==Caveats== | ||
+ | # For {{MSeq|A_n}} you must provide {{C|A_n}} for the first parameter, even though it knows the index is {{C|n}}, this is because of subsequences, if we have {{C|A_n}} as the sequence representation, and use {{C|j}} as the index, as in {{MSeq|A_{n_j}|j|1|\infty}} this would be rendered as: | ||
+ | #* {{C|{A_n}_{j}<nowiki/>}}, yielding {{M|{A_n}_j}} not {{M|A_{n_j} }} ({{C|A_{n_j}<nowiki/>}}) as intended. | ||
+ | ==Parameters== | ||
+ | The parameters are ordered (except for the {{C|in}} one) | ||
+ | {| class="wikitable" border="1" | ||
+ | |- | ||
+ | ! 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 {{MSeq|A_n}} is is {{C|A_n}} | ||
+ | |- | ||
+ | ! 2 | ||
+ | | {{C|index}} | ||
+ | | {{C|n}} | ||
+ | | The indexing variable, used for the "{{M|n}}" in the "{{M|1=n=1}}" part of {{MSeq|A_n}} | ||
+ | |- | ||
+ | ! 3 | ||
+ | | {{C|from}} | ||
+ | | {{C|1}} | ||
+ | | The starting index of the sequence, eg the "1" in the "{{M|1=n=1}}" part of {{MSeq|A_n}} | ||
+ | |- | ||
+ | ! 4 | ||
+ | | {{C|to}} | ||
+ | | {{C|\infty}} | ||
+ | | The end index, eg the "{{M|\infty}}" in {{MSeq|A_n}} | ||
+ | |- | ||
+ | ! ''(no index)'' | ||
+ | | {{C|in}} | ||
+ | | to say a "sequence in {{M|X}}" means the sequence consists of elements of {{M|X}}, see [[abuses of the implies-subset relation]] for more.<br/>Represents the "{{M|\mathcal{X} }}" in {{MSeq|A_n|in=\mathcal{X} }} | ||
+ | |- | ||
+ | ! ''(no index)'' | ||
+ | | {{C|pre}} | ||
+ | | Any math-markup preceding the sequence, eg the {{M|\exists}} in {{MSeq|A_n|pre=\exists}} | ||
+ | |- | ||
+ | ! ''(no index)'' | ||
+ | | {{C|post}} | ||
+ | | Any math-markup ''after'' the sequence, eg the {{M|[A_i<C]}} in {{MSeq|A_n|in=X|pre=\forall i\in\mathbb{N}\exists|post=[A_i<C]}} | ||
+ | |} | ||
+ | ==Examples== | ||
+ | * {{C|<nowiki>{{MSeq|A_k|k}}</nowiki>}} - {{MSeq|A_k|k}} | ||
+ | * {{C|<nowiki>{{MSeq|A_k|index=k}}</nowiki>}} - {{MSeq|A_k|index=k}} | ||
+ | * {{C|<nowiki>{{MSeq|A_p|p|5|105|in=\mathbb{Z}_{\ge0} }}</nowiki>}} - {{MSeq|A_p|p|5|105|in=\mathbb{Z}_{\ge0} }} | ||
+ | * {{C|<nowiki>{{MSeq|A_n|in=X|pre=\forall i\in\mathbb{N}\exists|post=[A_i<C]}}</nowiki>}} - {{MSeq|A_n|in=X|pre=\forall i\in\mathbb{N}\exists|post=[A_i<C]}} |
Latest revision as of 03:02, 8 April 2016
Contents
Purpose
I very often have to write [ilmath](A_n)_{n=1}^\infty[/ilmath], and sometimes get lazy and just write [ilmath](A_n)[/ilmath] instead. To solve this I shall introduce this template:
- Template:MSeq - for "Mathematical sequence"
Caveats
- For [ilmath] ({ A_n })_{ n = 1 }^{ \infty } [/ilmath] 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 [ilmath] ({ A_{n_j} })_{ j = 1 }^{ \infty } [/ilmath] this would be rendered as:
- {A_n}_{j}, yielding [ilmath]{A_n}_j[/ilmath] not [ilmath]A_{n_j} [/ilmath] (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 [ilmath] ({ A_n })_{ n = 1 }^{ \infty } [/ilmath] is is A_n |
2 | index | n | The indexing variable, used for the "[ilmath]n[/ilmath]" in the "[ilmath]n=1[/ilmath]" part of [ilmath] ({ A_n })_{ n = 1 }^{ \infty } [/ilmath] |
3 | from | 1 | The starting index of the sequence, eg the "1" in the "[ilmath]n=1[/ilmath]" part of [ilmath] ({ A_n })_{ n = 1 }^{ \infty } [/ilmath] |
4 | to | \infty | The end index, eg the "[ilmath]\infty[/ilmath]" in [ilmath] ({ A_n })_{ n = 1 }^{ \infty } [/ilmath] |
(no index) | in | to say a "sequence in [ilmath]X[/ilmath]" means the sequence consists of elements of [ilmath]X[/ilmath], see abuses of the implies-subset relation for more. Represents the "[ilmath]\mathcal{X} [/ilmath]" in [ilmath] ({ A_n })_{ n = 1 }^{ \infty }\subseteq \mathcal{X} [/ilmath] | |
(no index) | pre | Any math-markup preceding the sequence, eg the [ilmath]\exists[/ilmath] in [ilmath] \exists ({ A_n })_{ n = 1 }^{ \infty } [/ilmath] | |
(no index) | post | Any math-markup after the sequence, eg the [ilmath][A_i<C][/ilmath] in [ilmath] \forall i\in\mathbb{N}\exists ({ A_n })_{ n = 1 }^{ \infty }\subseteq X [A_i<C] [/ilmath] |
Examples
- {{MSeq|A_k|k}} - [ilmath] ({ A_k })_{ k = 1 }^{ \infty } [/ilmath]
- {{MSeq|A_k|index=k}} - [ilmath] ({ A_k })_{ k = 1 }^{ \infty } [/ilmath]
- {{MSeq|A_p|p|5|105|in=\mathbb{Z}_{\ge0} }} - [ilmath] ({ A_p })_{ p = 5 }^{ 105 }\subseteq \mathbb{Z}_{\ge0} [/ilmath]
- {{MSeq|A_n|in=X|pre=\forall i\in\mathbb{N}\exists|post=[A_i<C]}} - [ilmath] \forall i\in\mathbb{N}\exists ({ A_n })_{ n = 1 }^{ \infty }\subseteq X [A_i<C] [/ilmath]