Basis for a topology
The message provided is:
 Need to add: A function is continuous if and only if the preimage of every basis element is open  Alec (talk) 18:35, 17 December 2016 (UTC)
Contents
Definition
Let [ilmath](X,\mathcal{ J })[/ilmath] be a topological space and let [ilmath]\mathcal{B}\in\mathcal{P}(\mathcal{P}(X))[/ilmath] be any collection of subsets of [ilmath]X[/ilmath]^{[Note 1]}. We say [ilmath]\mathcal{B} [/ilmath] is a basis for the topology [ilmath]\mathcal{J} [/ilmath] if both of the following are satisfied:
 [ilmath]\forall B\in\mathcal{B}[B\in\mathcal{J}][/ilmath]  every element of [ilmath]\mathcal{B} [/ilmath] is an open set of [ilmath](X,\mathcal{ J })[/ilmath]
 [ilmath]\forall U\in\mathcal{J}\exists\{B_\alpha\}_{\alpha\in I}\subseteq\mathcal{B}[\bigcup_{\alpha\in I}B_\alpha=U][/ilmath]  every open set in [ilmath](X,\mathcal{ J })[/ilmath] is the union of some arbitrary family of basis elements^{[Note 2]}
The elements of [ilmath]\mathcal{B} [/ilmath] are called basis elements.
Basis criterion
Let [ilmath](X,\mathcal{ J })[/ilmath] be a topological space and let [ilmath]\mathcal{B}\in\mathcal{P}(\mathcal{P}(X))[/ilmath] be a topological basis for [ilmath](X,\mathcal{ J })[/ilmath]. Then^{[1]}:
 [ilmath]\forall U\in\mathcal{P}(X)\big[U\in\mathcal{J}\iff\underbrace{\forall p\in U\exists B\in\mathcal{B}[p\in B\subseteq U]}_{\text{basis criterion} }\big][/ilmath]^{[Note 3]}
If a subset [ilmath]U[/ilmath] of [ilmath]X[/ilmath] satisfies^{[Note 4]} [ilmath]\forall p\in U\exists B\in\mathcal{B}[p\in B\subseteq U][/ilmath] we say it satisfies the basis criterion with respect to [ilmath]\mathcal{B} [/ilmath]^{[1]}
Topology generated by a basis
Let [ilmath]X[/ilmath] be a set and let [ilmath]\mathcal{B}\in\mathcal{P}(\mathcal{P}(X))[/ilmath] be any collection of subsets of [ilmath]X[/ilmath], then:
 [ilmath](X,\{\bigcup\mathcal{A}\ \vert\ \mathcal{A}\in\mathcal{P}(\mathcal{B})\})[/ilmath] is a topological space with [ilmath]\mathcal{B} [/ilmath] being a basis for the topology [ilmath]\{\bigcup\mathcal{A}\ \vert\ \mathcal{A}\in\mathcal{P}(\mathcal{B})\}[/ilmath]
 we have both of the following conditions:
 [ilmath]\bigcup\mathcal{B}=X[/ilmath] (or equivalently: [ilmath]\forall x\in X\exists B\in\mathcal{B}[x\in B][/ilmath]^{[Note 5]}) and
 [ilmath]\forall U,V\in\mathcal{B}\big[U\cap V\neq\emptyset\implies \forall x\in U\cap V\exists B\in\mathcal{B}[x\in W\wedge W\subseteq U\cap V]\big][/ilmath]^{[Note 6]}
 Caveat:[ilmath]\forall U,V\in\mathcal{B}\ \forall x\in U\cap V\ \exists W\in\mathcal{B}[x\in W\subseteq U\cap V][/ilmath] is commonly said or written; however it is wrong, this is slightly beyond just abuse of notation.^{[Note 7]}
See also
Notes
 ↑ We could say something else instead of [ilmath]\mathcal{B}\in\mathcal{P}(\mathcal{P}(X))[/ilmath]:
 Let [ilmath]\mathcal{B}\in\mathcal{P}(\mathcal{J})[/ilmath]  so [ilmath]\mathcal{B} [/ilmath] is explicitly a collection of open sets, then we could drop condition [ilmath]1[/ilmath]. Or!
 Let [ilmath]\mathcal{B}\subseteq\mathcal{J} [/ilmath]. But it is our convention to not say "let [ilmath]A\subseteq B[/ilmath]" but "let [ilmath]A\in\mathcal{P}(B)[/ilmath]" instead. To emphasise that the powerset is possibly in play.
That is a weird way of saying if we have a structure (eg topological space, measurable space, so forth) say [ilmath](A,\mathcal{B})[/ilmath] we usually deal with (collections of) subsets of [ilmath]A[/ilmath] and specify they must be in [ilmath]\mathcal{B} [/ilmath].  ↑ The elements of [ilmath]\mathcal{B} [/ilmath] are called basis elements. This is mentioned later in the article
 ↑ Note that when we write [ilmath]p\in B\subseteq U[/ilmath] we actually mean [ilmath]p\in B\wedge B\subseteq U[/ilmath]. This is a very slight abuse of notation and the meaning of what is written should be obvious to all without this note
 ↑ This means "if a [ilmath]U\in\mathcal{P}(X)[/ilmath] satisfies...
 ↑ By the impliessubset relation [ilmath]\forall x\in X\exists B\in\mathcal{B}[x\in B][/ilmath] really means [ilmath]X\subseteq\bigcup\mathcal{B} [/ilmath], as we only require that all elements of [ilmath]X[/ilmath] be in the union. Not that all elements of the union are in [ilmath]X[/ilmath]. However:
 [ilmath]\mathcal{B}\in\mathcal{P}(\mathcal{P}(X))[/ilmath] by definition. So clearly (or after some thought) the reader should be happy that [ilmath]\mathcal{B} [/ilmath] contains only subsets of [ilmath]X[/ilmath] and he should see that we cannot as a result have an element in one of these subsets that is not in [ilmath]X[/ilmath].
 We then use Union of subsets is a subset of the union (with [ilmath]B_\alpha:\eq X[/ilmath]) to see that [ilmath]\bigcup\mathcal{B}\subseteq X[/ilmath]  as required.
 ↑ We could of course write:
 [ilmath]\forall U,V\in\mathcal{B}\ \forall x\in \bigcup\mathcal{B}\ \exists W\in\mathcal{B}[(x\in U\cap V)\implies(x\in W\wedge W\subseteq U\cap V)][/ilmath]
 ↑ Suppose that [ilmath]U,V\in\mathcal{B} [/ilmath] are given but disjoint, then there are no [ilmath]x\in U\cap V[/ilmath] to speak of, and [ilmath]x\in W[/ilmath] may be vacuously satisfied by the absence of an [ilmath]X[/ilmath], however:
 [ilmath]x\in W\subseteq U\cap V[/ilmath] is taken to mean [ilmath]x\in W[/ilmath] and [ilmath]W\subseteq U\cap V[/ilmath], so we must still show [ilmath]\exists W\in\mathcal{B}[W\subseteq U\cap V][/ilmath]
 This is not always possible as [ilmath]W[/ilmath] would have to be [ilmath]\emptyset[/ilmath] for this to hold! We do not require [ilmath]\emptyset\in\mathcal{B} [/ilmath] (as for example in the metric topology)
 [ilmath]x\in W\subseteq U\cap V[/ilmath] is taken to mean [ilmath]x\in W[/ilmath] and [ilmath]W\subseteq U\cap V[/ilmath], so we must still show [ilmath]\exists W\in\mathcal{B}[W\subseteq U\cap V][/ilmath]
References
 ↑ ^{1.0} ^{1.1} Introduction to Topological Manifolds  John M. Lee

OLD PAGE
Definition
Let [ilmath]X[/ilmath] be a set. A basis for a topology on [ilmath]X[/ilmath] is a collection of subsets of [ilmath]X[/ilmath], [ilmath]\mathcal{B}\subseteq\mathcal{P}(X)[/ilmath] such that^{[1]}:
 [ilmath]\forall x\in X\exists B\in\mathcal{B}[x\in B][/ilmath]  every element of [ilmath]X[/ilmath] belongs to at least one basis element.
 [ilmath]\forall B_1,B_2\in\mathcal{B},x\in X\ \exists B_3\in\mathcal{B}[x\in B_1\cap B_2\implies(x\in B_3\wedge B_3\subseteq B_1\cap B_2)][/ilmath]^{[Note 1]}  if any 2 basis elements have non empty intersection, there is a basis element within that intersection containing each point in it.
Note that:
 The elements of [ilmath]\mathcal{B} [/ilmath] are called basis elements^{[1]}
Topology generated by [ilmath]\mathcal{B} [/ilmath]
If [ilmath]\mathcal{B} [/ilmath] is such a basis for [ilmath]X[/ilmath], we define the topology [ilmath]\mathcal{J} [/ilmath] generated by [ilmath]\mathcal{B} [/ilmath]^{[1]} as follows:
 A subset of [ilmath]X[/ilmath], [ilmath]U\subseteq X[/ilmath] is considered open (equivalently, [ilmath]U\in\mathcal{J} [/ilmath]) if:
 [ilmath]\forall x\in U\exists B\in\mathcal{B}[x\in B\wedge B\subseteq U][/ilmath]^{[Note 2]}
Claim: This [ilmath]\mathcal{(J)} [/ilmath] is indeed a topology
TODO: Do this, see page 81 in Munkres  shouldn't be hard!
See also
Notes
 ↑ This is a great example of a hiding ifandonlyif, note that:
 [ilmath](x\in B_3\wedge B_3\subseteq B_1\cap B_2)\implies x\in B_1\cap B_2[/ilmath] (by the impliessubset relation) so we have:
 [ilmath](x\in B_3\wedge B_3\subseteq B_1\cap B_2)\implies x\in B_1\cap B_2\implies(x\in B_3\wedge B_3\subseteq B_1\cap B_2)[/ilmath]
 Thus [ilmath](x\in B_3\wedge B_3\subseteq B_1\cap B_2)\iff x\in B_1\cap B_2[/ilmath]
 [ilmath](x\in B_3\wedge B_3\subseteq B_1\cap B_2)\implies x\in B_1\cap B_2[/ilmath] (by the impliessubset relation) so we have:
 ↑ Note that each basis element is itself is open. This is because [ilmath]U[/ilmath] is considered open if forall x, there is a basis element containing [ilmath]x[/ilmath] with that basis element [ilmath]\subseteq U[/ilmath], if [ilmath]U[/ilmath] is itself a basis element, it clearly satisfies this as [ilmath]B\subseteq B[/ilmath]
TODO: Make this into a claim
References
 ↑ ^{1.0} ^{1.1} ^{1.2} Topology  Second Edition  James R. Munkres