Are "if" and "iff" interchangeable in definitions? In some books the word "if" is used in definitions and it is not clear if they actually mean "iff" (i.e "if and only if").
I'd like to know if in mathematical literature in general "if" in definitions means "iff".
For example I am reading "Essential topology" and the following definition is written:

In a topological space $T$, a collection $B$ of open subsets of $T$ is said
  to form a basis for the topology on $T$ if every open subset of $T$ can be written as a union of sets in $B$.

Should I assume the converse in such a case?
Should I assume that given a basis $B$ for a topological space, every open set can be written as a union of sets in $B$?
This is just an example, I am not asking specifically about this sentence.
 A: I would say that the use of 'if' in such a sentence should be considered a non-mathematical use of 'if' as opposed to a mathematical if. This is because statements of the form 'x is called y' are meta-mathematical rather than mathematical.
A strict reading of 'if' in its logical meaning often does not make sense.

A function is called 'continuous' if it satisfies ...

Many functions which satisfy the property in question are never and have never been called 'continuous' (because no-one has ever had cause to study, name or classify them). 'Only if' would actually be more appropriate here.
A: As it is a definition, the validity of the property (here "being a basis for the topology") must be defined by it in all cases. So implicitly all cases not mentioned do not have the property.
This convention is even stronger than the "if" meaning "iff" in definitions. Take as example the definition "an integer $p>1$ is called a prime number if it cannot be written as a product $p=ab$ of integers $a,b>1$". This says that $6$ is not a prime number, since $6=2\times 3$; this is an instance of the "iff" meaning in definitions. But it also says implicitly that $1$ is not a prime number, nor $-5$ nor $\pi$ nor $\exp(\pi\mathbf i/3)$ nor $\mathbf{GL}(3,\Bbb R)$, as none of these can be described as integers $p>1$; even a statement with "iff" would in itself not seem to state non-primality of those objects. But since it is a definition, anything that does not match its description is implicitly excluded from the property.
Without this implicit exclusion of cases not mentioned, it would be very hard indeed to give a complete definition of any property. Imagine (assuming the "everything is a set" philosophy) the ugliness of "a set $x$ is called a prime number if $x\in\Bbb Z$ and $x>1$ and ...".
A: As other pointed out, the "only if" part wouldn't make any sense as the process of defining the object is not over yet at the time you read the "only if".
But if it bothers you, you can always reformulate

An object $A$ is said to be new term if $P(A)$.

by

A new term is an object $A$ such that $P(A)$.

In your example, the reformulation would be :

A basis $\mathcal B$ of a topological space $T$ is a collection of open sets of $T$ such that every open set of $T$ is a union of elements of $\mathcal B$.

A: The deeper point here is that regardless whether we write "if" or "if and only if" in a definition, this is not the same as the usual meaning of "if and only if" as a material equivalence.  The material equivalence of two propositions is the assertion that each one independently has a truth value, and the truth values are the same.
In a definition such as 

a natural number $n$ is even if and only if $n$ is a multiple of $2$

we cannot read the "if and only if" as a material equivalence, because the left hand side does not have any truth value until after the definition is made. To view this definition as expressing an equivalence of two statements, we would need to already know that each side of the equivalence statement already has a truth value, but "$n$ is even" is (trivially) undefined before the definition is made. 
Instead of expressing an equivalence, a definition tells us that the defined term is to be viewed as a synonym for the definition: a definition expresses an "is" relationship, not an "is equivalent to" relationship.  For example, if I prove that $8$ is even, I do not need to apply modus ponens and the definition of an even number to conclude that $8$ is a multiple of $2$. Instead, I can directly "apply the definition": proving that "$8$ is even" already proves that "$8$ is a multiple of $2$", because the quoted phrases are synonyms for each other.  One could also say that "$8$ is even" is an abbreviation of "$8$ is a multiple of $2$".  In turn, that latter phrase is an abbreviation for "there is a natural number $m$ with $8=2m$". 
In principle, one can remove all later definitions from an axiomatic theory, so that in the end one is left with synonymous statements that involve only the "undefined terms" of the theory. 
For example, in Hilbert's axiomatic Euclidean plane geometry, there are only three undefined types of objects: point, lines, and planes. Every other statement, such as "the three angles in an equilateral triangle are all congruent", is in fact an abbreviation for a much longer statement about lines and points. This is not to say that the statement is equivalent to the longer statement about lines and points. The statement about angles has no truth value at all in this axiomatic framework except by virtue of its definition. 
A: See Tarski's contribution in his Introduction to Logic and to the Methodology of Deductive Sciences, pt 1 "Elements of Logic. Deductive Method.", §II. "On the Sentential Calculus":

10. Equivalence of sentences
We shall consider one more expression from the field of sentential
calculus. It is one which is comparatively rarely met in everyday
language, namely, the phrase “if, and only if”. If any two
sentences are joined up by this phrase, the result is a compound
sentence called an EQUIVALENCE. The two sentences connected in this
way are referred to as the LEFT and RIGHT SIDE OF THE EQUIVALENCE. By
asserting the equivalence of two sentences, it is intended to exclude
the possibility that one is true and the other false; an equivalence,
therefore, is true if its left and right sides are either both true or
both false, and otherwise the equivalence is false.
The sense of an equivalence can also be characterized in still another
way. If, in a conditional sentence, we interchange antecedent and
consequent, we obtain a new sentence which, in its relation to the
original sentence, is called the CONVERSE SENTENCE (or the CONVERSE OF
THE GIVEN SENTENCE). Let us take, for instance, as the original
sentence the implication:
(I) if $x$ is a positive number, then $2x$ is a positive number;
the converse of this sentence will then be:
(II) if $2x$ is a positive number, then $x$ is a positive number.
As is shown by this example, it occurs that the converse of a true
sentence is true. In order to see, on the other hand, that this is not
a general rule, it is sufficient to replace “$2x$” by “$x^2$” in
(I) and (II); the sentence (I)
will remain true, while the sentence (II) becomes false.
If, now, it happens that two conditional sentences, of which one is
the converse of the other, are both true, then the fact of their
simultaneous truth can also be expressed by joining the antecedent and
consequent of any one of the two sentences by the words “if, and
only if”. Thus, the above two implications—the original sentence
(I) and the converse sentence (II)—may be
replaced by a single sentence:
$x$ is a positive number if, and only if, $2x$ is a positive number
(in which the two sides of the equivalence may yet be interchanged).
There are, incidentally, still a few more possible formulations which
may serve to express the same idea, e.g.:
from: $x$ is a positive number, it follows: $2x$ is a positive number, and conversely;
the conditions that $x$ is a positive number and that $2x$ is a positive number are equivalent with each other;
the condition that $x$ is a positive number is both necessary and sufficient for $2x$ to be a positive number;
for $x$ to be a positive number it is necessary and sufficient that $2x$ be a positive number.
Instead of joining two sentences by the phrase “if, and only if”,
it is therefore, in general, also possible to say that the RELATION OF
CONSEQUENCE holds between these two sentences IN BOTH DIRECTIONS, or
that the two sentences are EQUIVALENT, or, finally, that each of the
two sentences represents a NECESSARY AND SUFFICIENT CONDITION for the
other.

For me Tarski's authority is beyond discussion.
A: I want to add some comments on this topic and in particular regarding Tarski's reference [see Tony Piccolo's answer and Carl Mummert's comments].
Ref to George Tourlakis, Lectures in Logic and Set Theory : Volume 1, Mathematical Logic (2003), I.7. Defined Symbols [page 112-on] :

There are three possible kinds of formal abbreviations, namely, abbreviations of formulas, abbreviations of variable terms (i.e., “objects” that depend on free variables), and abbreviations of constant terms (i.e., “objects” that do not depend on free variables). Correspondingly, we introduce a new nonlogical symbol for a predicate, a function, or a constant in order to accomplish such abbreviations.

I will consider only the predicate case, in order to cope with Tarski's example, i.e. :


$x \le y =_{def} \lnot (x > y)$.


We have that :

if $Q(\overrightarrow{x}_n)$ is some formula, we then can introduce a new predicate symbol “$P$” that stands for $Q$.
Note. In the present description, $Q$ is a syntactic (meta-)variable, while $P$ is a new
  formal predicate symbol.
This entails adding $P$ to [the language] $\mathcal L$ (i.e., to its alphabet $\mathcal V_k$) as a new $n$-ary predicate symbol [obtaining a new language $\mathcal L_1$], and adding 

$P\overrightarrow{x}_n \leftrightarrow Q(\overrightarrow{x}_n) \quad \quad$ (i)

to [the theory] $\Gamma$ as the defining axiom for $P$ [obtaining a new theory $\Gamma_1$].
Suppose that $\mathcal F$ is a formula over $\mathcal L_1$, and that the predicate $P$ whose definition took us from $\mathcal L$ to $\mathcal L_1$, and hence is a symbol of $\mathcal L_1$ but not of $\mathcal L$) occurs in $\mathcal F$ zero or more times. Assume that $P$ has been defined by the axiom (i) above (included in $\Gamma_1$), where $Q$ is a formula over $\mathcal L$.
We eliminate $P$ from $\mathcal F$ by replacing all its occurrences by $Q$. [...] This results to a formula $\mathcal F^*$ over $\mathcal L$.

Now we have two basic (meta)-theorems :

I.7.1 Metatheorem (Elimination of Defined Symbols: I). Let $\Gamma$ be any theory
  over some formal language $\mathcal L$ [page 116] .
(a) Let the formula $Q$ be over $\mathcal L$, and $P$ be a new predicate symbol that extends $\mathcal L$ into $\mathcal L'$ and $\Gamma$ into $\Gamma'$ via the axiom $P\overrightarrow{x}_n \leftrightarrow Q(\overrightarrow{x}_n)$. Then, for any formula $\mathcal F$ over $\mathcal L$, the elimination [of $P$] as above yields a $\mathcal F^*$ over $\mathcal L$ such that :
$\Gamma \vdash \mathcal F \leftrightarrow \mathcal F^*$.
(b) [consider the case of a $n$-ary ($n \ge 0$) function symbol “$f$”, where the case $n=0$ applies to constants].

And :

I.7.3 Metatheorem (Elimination of Defined Symbols: II). Let $\Gamma$ be a theory
  over a language $\mathcal L$ [page 118] .
(a) If $\mathcal L'$ denotes the extension of $\mathcal L$ by the new predicate symbol $P$, and $\Gamma'$ denotes the extension of $\Gamma$ by the addition of the axiom $P\overrightarrow{x}_n \leftrightarrow Q(\overrightarrow{x}_n)$, where $Q$ is a formula over $\mathcal L$, then $\Gamma \vdash \mathcal F$ for any formula $\mathcal F$ over $\mathcal L$ such that $\Gamma ' \vdash \mathcal F$.
(b) [consider the case of a $n$-ary ($n \ge 0$) function symbol “$f$”, where the case $n=0$ applies to constants].

According to this formal treatment of definition, it is the "defining axiom" :


$x \le y \leftrightarrow \lnot (x > y)$


that licenses the use of $\le$ in the "extended" theory.
A: Yes. This is an unfortunate convention but is firmly established.
A: My usual interpretation of this is that the "only if" is implicit. As an example, take the sentence "We call a gadget $A$ a widget if property $P$ holds for $A$", where the sentence is defining the word "widget". Because you just "invented" the word widget, it can only possibly apply to gadgets satisfying property $P$; any gadget that doesn't satisfy this property (or anything that isn't a gadget) cannot be a widget, because you didn't say it was.
So while the statement only gave the "if" statement, the fact that this statement is a definition implies the "only if" statement. (I'm not really claiming to have given a proof of anything, but merely some justification of why the convention is not as crazy or unfortunate as it might appear).
A: Usually, in definitions you will not read iff, since the inverse inclusion makes no sense, for a definition establishes no relationship between two mathematical objects, but instead provides a name to one of both.
A: In a definition, when we say that X is called by the name Y, if it satisfies certain properties, we usually mean that entities in the same universe of discourse and of the same kind as X are not called by the name Y if they do not satisfy those properties.
The predicate is_called(X, "Y") is not a proposition in the domain of discourse; it is in the layer of symbols that are being used to discuss the domain, the "meta-domain", if you will.
Something in the actual domain cannot be put in a logical relationship with 
something in the meta-domain; that is a level violation.
It is never sensible to say:

If a number is divisible by four, it is called "even".

because a definition is expected to be complete, and some numbers that are not divisible by four are also even. If we drop the "called", it's something completely different:

If a number is divisible by four, it is even.

Now the symbol "even" is not being quoted for the purposes of being defined; it is evaluated and replaced by the properties that it denotes, and so we have a logical relationship being expressed purely in the domain of discourse.
So, in a way, the "if" in a definition is related to "if and only if": clearly, a number is not called even if it is not divisible by two, therefore a number is called even if, and only if it is divisible by two. However, it is redundant and verbose. Moreover, definitions which use "if" can always be rewritten into ones which do not use if at all:

Integers divisible by two are called "even". 

We can, and should, use "if and only if", whenever we give a definition in such a way that we are not quoting the name.  Suppose I have never defined what it means to be "even". It is appropriate to say:


*

*Integers can have certain property: they can be called even under certain conditions.

*An integer is even if and only if it is divisible by two.
Here, the iff is necessary, because the second statement isn't asserting itself as a definition of the term. I didn't use the word "called" or similar.
One or more such statements can constitute an implicit definition of the term, when they specify enough rules that every integer can be classified as even or not even.
The use of iff in the second statement above informs the reader, "I am the only rule you need to deduce what set of properties are denoted by the term 'even'".
A: In a definition, the meaning of a new phrase or word is described with the help of known terms. After the definition, "if"  becomes "if and only if".
A: *

*Think about the definition: "All x are A if they are B". 


This actually says that all B's are A. 


*

*Now, think about this: "All x are A if and only if they are B".


This says that all B's are A and all A's are B.


*

*Now, if you say "All x are A if they are B and they are C".


What is told here is if something is both B and C, then it is A. 


*

*Last one, "All x are A if and only if they are B and they are C".


This means, if something is both B and C, they it is A, besides, if something is A, then it is both B and C.
Now what does it actually mean?


*

*$\forall x, x\in B \implies x\in A$ 


This is equivalent to: $B \subset A$


*

*$\forall x, x\in B \iff x\in A$


This is equivalet to: $B = A$


*

*$\forall x, (x\in B \land x\in C) \implies x\in A$


This is equivalent to: $x\in (B\cap C) \implies x\in A$ 
And thus, $(B\cap C) \subset A$


*

*$\forall x(a\in B \land x\in C) \iff x\in A$


And finally what this says is : $(B\cap C) =A$
A: My answer to your question, in short, is: Strictly speaking, no, ‘if’ and ‘iff’ are not interchangeable, but nevertheless there is a very general tacit convention for using ‘if’ in definitions where ‘iff’ is meant.
The Tarski quote referred to by Tony Piccolo establishes (by authority) that using ‘if’ where ‘if, and only if’ is (or should be) meant, is a tacit convention.
The answer by hunter mentions that it is an ‘unfortunate convention’, but gives no justification for judging it unfortunate. I concur with hunter and in this answer give arguments that I feel justify his claim.


*

*A first argument is the fact that you asked this question (and others did as well: there are several duplicates). When the convention would be to use ‘iff’, you would not have asked the question. 

*A second argument is the fact that, in case you stumble upon a text in which the convention is not followed, misinterpretation of that text is possible.

*A third argument is that it limits expressiveness, or at least forces one to find alternate formulations to one that would seem the first to present itself.
This argument requires a bit more explanation: In other answers, it was stressed that the ‘if’ (or ‘iff’) linking definiendum and definiens should not be confused with material implication $\Rightarrow$ (or equivalence $\Leftrightarrow$), but give meaning on a higher level. We also have this distinction with other mathematical terms, ‘equality’ $=$, for example. When equality is used to define an object, many authors use some distinctive variant of $=$ to make this clear, e.g., $:=$ or $\triangleq$; let me use the former. Once $a:=3$, i.e., I have defined $a$ to be $3$, I can state $a=3$, i.e., $a$ is equal to $3$.
Now, of course it is possible to introduce similar notation for $\Rightarrow$ and $\Leftrightarrow$ (and I have come across texts where this was done, but don't ask me for a reference):


*

*Stating $x\in X \mathbin{:\Rightarrow} x/2\in\mathbb{Z}$ means that you've defined (specified) that $X$ only contains even numbers (but not necessarily all of them).

*Stating $x\in X \mathbin{:\Leftrightarrow} x/2\in\mathbb{Z}$ defines $X$ to be the set of even numbers.

*Stating $x\in X \mathbin{:\Leftarrow} x/2\in\mathbb{Z}$ means that you've defined (specified) that $X$ contains at least all even numbers (and possibly other objects).


As in general, using much mathematical notation reduces the readability, so one would like to be able to express the above definition variants using natural language. Two natural pairs of correspondences that present themselves are ($:\Leftrightarrow$, ‘iff’) and ($:\Leftarrow$, ‘if’). As the convention conflates ‘if’ with ‘iff’, the latter pair cannot be used, and alternative, less natural formulations for it have to be found. This is what I meant when stating that the convention limits expressiveness.
One can argue that natural language involving ‘if’ in day-to-day usage is not strict enough for it to be safely used in a more formal mathematical context. This is a valid criticism, but it would also proscribe the usage of ‘if’ in definitions where ‘iff’ is meant (as per Tarski's quote referred to above). The usage of ‘iff’ (or ‘if, and only if’), however, is not affected by this criticism: its verbosity makes it robust against misinterpretation. 
A: There is a logical difference between saying:


*

*The sidewalk is wet if it rained.


*

*"it rained" ⇒ "the sidewalk is wet"



and


*The sidewalk is wet iff it rained.


*

*"the sidewalk is wet" ⇒ "it rained"     &

*"it rained" ⇒ "the sidewalk is wet" (← converse)



("• ⇒ •" meaning "If •, then •.")
(1) means that "it rained" being true is a sufficient but not necessarily the sole condition for "The sidewalk is wet" to be true; other conditions might make it true.
(2) means that "it rained" is the only way "The sidewalk is wet" can be true (necessary & sufficient condition).
So, are "iff" and "if" interchangeable? Not necessarily: 


*

*Given a true iff statement, replacing "iff" with "if" always results in another true statement.("iff" is stronger; it says more; it's a shorthand for two conditional propositions; cf. (1) vs. (2) above.)

*Given a true if statement, replacing "if" with "iff" doesn't necessarily result in another true statement.
The OED's definition of "iff" corroborates what I wrote above:


to introduce a condition that is necessary as well as sufficient, or a statement that is implied by and implies the preceding one.

A: "if" and "iff (if and only if)" have the difference. This difference is about their imperativeness. The "iff" is more imperative than just "if".
The analogous can be found in "needed and sufficient condition". "if" is analogue to "sufficient condition", whereas "iff" is analogue to "needed and sufficient condition".
