Template:MSeq

From Maths
Revision as of 20:13, 20 April 2016 by Alec (Talk | contribs) (Adding the nomath parameter to allow sequences to be nested)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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

  1. 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]