I am reading "Measure, Integration & Real Analysis" by Sheldon Axler.
The following exercise is Exercise 13 on p.24 in Exercises 2A in this book.
Suppose $\epsilon>0$. Prove that there exists a subset $F$ of $[0,1]$ such that $F$ is closed, every element of $F$ is an irrational number, and $|F|>1-\epsilon$.
I guess the following proposition is true.
There doesn't exist a subset $F$ of $[0,1]$ such that $F$ is closed, every element of $F$ is an irrational number, and $|F|=1$.
Is this proposition true?
My attempt:
Let $F=[0,1]\setminus\mathbb{Q}$.
Then, $1=|[0,1]\geq |F|\geq |[0,1]|-|\mathbb{Q}|=1-0=1.$
So, $|F|=1$.
But $F$ is not closed.
Unless you put a point on it, the whole bit about $F = [0,1] \setminus \mathbb{Q}$ in your attempt doesn't allow you to conclude anything.
Your proposed proposition is true, for the following reason:
Suppose $F \subset [0,1] \setminus \mathbb{Q}$ is closed. Then since $1/2 \not\in F$, there is an open neighborhood $(1/2 - \epsilon, 1/2+\epsilon)$ of $1/2$ which is disjoint from $F$ (and we may assume $0 < \epsilon < 1/2$).
Then $F \subset [0,1/2-\epsilon] \cup [1/2 + \epsilon, 1]$, and since the measure is monotonic, $$|F| \leq \left|[0,1/2-\epsilon] \cup [1/2 + \epsilon, 1]\right| = 1-2\epsilon < 1$$