Is my definition of functions correct? I'm planning to tackle all my work by learning all the definitions and statements relevant to my subjects by rewriting them in my own style. Below, I've stating the definition of a function in my own way using quantifiers. Can you please tell me if writing in this way is ok and correct? and if it makes logical sense? My work on self-teaching maths has never had the chance to be criticised which doesn't make me as confident as I would like. Also, is learning topics in maths by working with the definitions and important statements first by applying examples, non-examples, counter-examples first, then reading all relevant information in-between and the proofs later a better method of study? 
Definition
Let $X$ and $Y$ be sets. A function or mapping $f$ from a set $X$ to a set $Y$, denoted $f:X\rightarrow Y$, is a rule such that $\forall{x}\in{X}, \exists{y}\in{Y}$ s.t $y=f(x)$.
 A: While your definition encapsulates the "spirit" of the definition, it is not correct. A more formal and proper definition abandons the ambiguity of "rule:"

Let $X$ and $Y$ be sets. A function or mapping $f$ from a set $X$ to a set $Y$, denoted $f:X\rightarrow Y$, assigns to each $x \in X$ a single element $f(x) \in Y$, denoted $x \mapsto f(x)$.

That's all that's really necessary. 
You could alternatively use $y$ in lieu of $f(x)$, but the latter notation more clearly denotes $f(x)$ as being the image of $x$ under $f$ in my opinion.
A: Your definition of function is wrong in the first place because it carries a circular reference, hence is no definition. 
If $f$ is yet to be defined then also $f(x)$ is yet to be defined and something that is not defined already cannot be used in a definition (unless it is some primitive notion that has no definition at all).
You cannot define function $f$ by means of $f$ or something depending on $f$ (in your case $f(x)$) itself.

A correct definition is: 


*

*Function $f$ from set $X$ to set $Y$ is a subset of $X\times Y$ such that for every $x\in X$ there is exactly one $y\in Y$ with $\langle x,y\rangle\in f$.


Here $f$ is defined by means of cartesian product and ordered pair, which are supposed to be defined already.
