$\newcommand{\card}{\operatorname{card}}$Let $X$, $Y$ be finite sets. If $X$ and $Y$ are disjoint, i've proven that $\card(X\cup Y) + \card(X\cap Y) = \card(X)+\card(Y).$
I'm actually trying to prove this result for $X$ and $Y$ not disjoint. Here's my attempt:
Notation: $I_n = \{x\in N: 1\leq x \leq n \}$.
Suppose that $X$ and $Y$ has $k$ elements in common. Ie, $\card(X\cap Y)=k$. Since $X$ and $Y$ are finite, there exists $f:I_n \rightarrow X$ and $g:I_m \rightarrow Y$ bijections. Hence, $\card(X)=n$ and $\card(Y)=m$. Let $\varphi: I_{n+m-k} \rightarrow X\cup Y$ such that $\varphi(x)=f(x)$ if $1\leq x \leq m$ and $\varphi(x+m)=g(x)$ if $m Is it correct?