Are these two definitions of base for a topology equivalent? I have some experience with metric spaces, but I never took a dedicated Topology class. I recently encountered the term "base for a topology", and looking on Wikipedia, there seem to be two definitions. The very first line of the article says:

[Definition 1]: In mathematics, a base or basis for the topology $\tau$ of a topological space $(X, \tau)$ is a family $B$ of open subsets of $X$ such that every open set is equal to a union of some sub-family of $B.$

However, the first thing in the "Definition and basic properties" section is:

[Definition 2] A base is a collection $B$ of open subsets of $X$ satisfying the following properties:

*

*The base elements cover $X$.

*Let $B_1$, $B_2$ be base elements and let $I$ be their intersection. Then for each $x$ in $I$, there is a base element $B_3$ containing $x$ such that $B_3$ is subset of $I$.


I believe I have proved these definitions to be equivalent. But I want to make sure I haven't made any hidden assumptions, because I know that unlike metric spaces, General Topology can be very unintuitive for the outsider.
Def 1 $\implies$ Def 2:
Suppose $B$ is a base according to definition 1. Take any two base elements $B_1, B_2$. Their intersection $I$ is an open set, so it is a union of base elements. If $x$ is in $I$, then it is in the union of those base elements, so it is in at least one of them. Therefore $x$ is in a base element which is contained in the intersection.
Def 2 $\implies$ Def 1:
Suppose $B = \{B_i|i \in I\}$ is a base according to definition $2$. Let $U$ be an open set of $X$. The set
$$S = \bigcup_{i \in I}U \cap B_i.$$
is a union of oepn sets, and we claim that $S = B$. It is obvious that $S \subseteq B$. To see the reverse, let $x$ be any element of $B$. Since the base covers $X$, there is a base element $b$ such that $x \in b$. Therefore $x \in U \cap b$, so $x \in S$.
 A: These two definitions are not defining the same thing, so they are not "equivalent".
In definition 1, one is given the set $X$ and the topology $\tau$ on $X$. What is being defined is a basis for the topology $\tau$.
In definition 2, one is given just the set $X$. What is being defined is a basis. Period.
Note the syntactic difference in these two terminologies: definition 1 is relative to a given topology; definition 2 is not relative to anything. (Well... both of them are relative to the given set $X$).
These definitions are connected in the following manner:

Theorem: Given a topology $\tau$, a basis $\mathcal B$ for $\tau$ (as in definition 1) is a basis (definition 2).


Theorem: Given a basis $\mathcal B$ (as in definition 2), there exists a unique topology $\tau$ on $X$ such that $\mathcal B$ is a basis for $\tau$.

A: EDIT: It's been pointed out that your definition is actually a bit off; the proof below assumes a corrected definition, which I assume was just a typo.  Tbh I didn't even notice it haha
Your first part is correct, but the second part has problems.  For example, $S$ is a subset of $X$, but you say that it's equal to $B$, a basis, which is a collection of sets.  Also, every element in $S$ is contained in $U$, but $X$ is not necessarily contained in $U$, so you can't get a base.
The way to do $2 \implies 1$ is suppose $B$ is a basis according to the second definition, and let $U$ be any open set in $X$.  We want to show that it's the union of elements of $B$.  By definition $2$ of a basis, if $x \in U = U \cap U$ then there is an open set $B_x \in B$ such that $x \in B_x \subset U$.  Now $U = \cup B_x$, since each $B_x$ is contained in $U$, but also every point of $U$ is in some $B_x$.  I think you had the right idea, just wrote it down wrong.
A: I will give a counterexample to Definition 2 implying Definition 1.
Consider any basis $\mathcal{B}$ for $\tau$, and take any open $U$ construct the alternate basis $\mathcal{B}_U$ consisting of every set of the form $B\cup U$ for $B$ any set in $B\in\mathcal{B}$.
The collection $\mathcal{B}_U$ is still a basis satisfying Definition 2, but not Definition 1.
