I'm introducing Zermelo–Fraenkel axioms in a minimal way: only what is actually needed to introduce real numbers.
In this respect I noticed that I do not need the axiom of foundation nor the axiom of replacement. Instead I define functions as soon as possible, so it is natural to define an infinite set as a set $X$ such that there exists $f\colon X\to X$ injective, but not surjective (Dedekind-infinite) before having natural numbers.
So my statement of the axiom of infinity is: "there exists a (Dedekind-)infinite set". The usual axiom of infinity requires instead the existence of the first infinite ordinal $\omega$. If I have $\omega$ it is not difficult to prove that $\omega$ is Dedekind-infinite.
On the other hand it seems to me that without the replacement axiom it is possible that an infinite set exists even if $\omega$ does not exist. This makes sense to me: why should I suppose the existence of $\omega$ if I don't really need it?
However, this answer states that the equivalence of the two formulations can be obtained only with extensionality, pairs, unions, specification and powers. How can this be achieved?