I have two sets $A$ and $B$, where $B \subset A$ and I want to describe a new set $C$, which is consists of pairs $(i,j)$ under two conditions:
- $(i,j) \in C$ only if $ \space i,j \in A$
- $(i,i) \not \in C$ if $\space i \in B$.
My notation for this set is: $$C = \{(i,j)|i,j \in A, (i=j\in B)\}$$ I have used this notation because I don't know the correct notation and based on the comments / answer, this is wrong. Therefore, please go my above description for the properties of the set and not by this attempt to describe the set using set notation.
How do I formally describe the set $C$ in a way that is correct?
As discussed in the comments, the notation that you are looking for is:
$$ C = (A \times A) \setminus \Delta_B \space \space \text{ where } \space \Delta_B = \{ (i,i) | i \in B \}$$
In plain English, this is the set containing all pairs of elements of $A$ excluding pairs of the same number which are also contained within the subset $B$.
In set notation, the correct way to write this is
$$ C = \{ (i,j) \in (A \times A) \space | \space (i,i) \not \in B \}$$
One other thing worth mentioning is the notation that you use in the original question:
This is not correct. The vertical line means "such that" and the comma means "and". Therefore, this notation means that this describes the set of all pairs $i,j \in A$ and if $i=j$, then it will only be in the set if $i \in B$ - which is almost the opposite of what you wanted.
You could adjust your notation slightly to describe $C$ in an equivalent way by replacing "$\in$" with $"\not \in$". This isn't the most precise way of describing the set (the characterization that I gave above is slightly more precise), but this would still be fine and means the same thing.