Two questions I was given and want to make sure my reasoning is correct.
(1) Show that if $p$ is prime in $Z$, then $p$ is prime in $R = \mathbb Z + x \mathbb Q[x]$ (the subring of polynomials with rational coefficients except for the constant term which must be an integer).
So assume $p | a(x)b(x) $ for polynomials $a(x),b(x) \in R$. We write $a(x) = a_0 + a_1x + … + a_nx^n$ and likewise for $b(x)$ where $a_0, b_0 \in Z$ and $a_i, b_i \in Q$ for all $i \geq 1$. Then observe the constant term of the product $a_0b_0$ is an integer and since p is a prime integer, $p|a_0$ or $p|b_0$. WLOG, assume $p|a_0$. Then we can write:
$a(x) = pf(x)$ where $f(x) = \frac{a_0}{p} + \frac{a_1}{p}x + … + \frac{a_n}{p}x^n$ and $f(x) \in R$ since $\frac{a_0}{p} \in Z$ since $p | a_0$. So $p | a(x)$ and we are done.
(2) Show that $f(x) \in R$ is prime provided $f(0) = \pm 1$ and $f(x)$ irreducible in $\mathbb Q[x]$.
Proceed by contradiction. So, assume f(x) is not prime in R. Then it is reducible in $R$ (since $R$ is a domain). To get a contradiction we want to show f(x) is reducible in Q[x]. Let $f(x) = a(x)b(x)$ for some $a(x),b(x) \in R$ be a nontrivial factorization where $a(x), b(x) \ne \pm 1$ (I already proved the units in R are simply $\pm 1$).
To show it's reducible in $Q[x]$ we need only show that neither a(x) nor b(x) is a nonzero rational number (since the units in Q[x] are $Q-\{0\}).$
Clearly neither $a(x)$ nor $b(x)$ can be a non-integer, rational number since $a(x), b(x) \in R$. So then, we just need to rule out that they can be any other non-zero integer besides 1.
But in order for $a_0b_0 = \pm 1$ we must have that $a(x) = \pm 1$ or $b(x) = \pm 1$ which can't occur since $a(x), b(x)$ are not units of $R$.
Thus, $f(x) = a(x)b(x)$ is a nontrivial factorization in $Q[x]$ so $f(x)$ is reducible in $Q[x]$, a contradiction.
First, is this reasoning correct? Second, I tried proving the statement directly to show that is $f(x) | a(x)b(x)$ for $a(x), b(x) \in R$ then $f(x) | a(x)$ or $f(x) | b(x)$ but couldn't get anywhere with that. Is there a way of proving this directly?
I think I'm picking up on a little bit of confusion around the concepts of irreducibility and primeness. Here's a problem sentence at the beginning of your proof of (2): "So, assume f(x) is not prime in R. Then it is reducible in (since is a domain)."
Let me start by mentioning a few points re: irreducibility and primeness.
Proof: $(1)$ Suppose that $a$ is prime and that $a = bc$. By definition of being prime, $a$ necessarily divides $b$ or $c$. If $a \mid b$ then say $ad = b$ and $a = bc = adc$ implies $1 = dc$, so that $c$ was a unit and $a = bc$ was not a reduction of $a$. $(2)$ Check that $x$ is irreducible because $ab = 1$ implies $a,b \in \mathbb{Q}$ or $a,b \notin \mathbb{Q}$. Check that $x$ is not prime because $x \mid (\sqrt{2}x)^2$ and $x \nmid \sqrt{2}x$. $(3)$ Exercise if you're interested. The case for Unique Factorization Domains is even easier.
What I wanted to point out is that your logic in assume $f(x)$ is not prime in $R$. Then it is reducible in $R$ (since $R$ is a domain) is faulty. In fact, you could make this legit by proving that irreducible elements of $R$ are prime, which follows from e.g. the fact that $R$ is even a Bézout domain (finitely generated ideals are principal), but you would need to justify this. Either way, it's not vital to this exercise.
Below is a possible approach which exploits the fact that irreducibles in $\mathbb{Q}[x]$ are prime (hopefully you've encountered the Euclidean Algorithm or Gauss' lemma already so you know something about the structure of $\mathbb{Q}[x]$).
Proof Suppose that $f$ is irreducible in $\mathbb{Q}[x]$. Then $f$ is also prime in $\mathbb{Q}[x]$. We check that $f$ is prime in $R$ too. Indeed, suppose that $f \mid gh$ in $R$. Then without loss of generality $f$ divides $g$ in $\mathbb{Q}[x]$ by primeness, say $f u = g$. Since $f(0) = 1$, we see that the lowest coefficient of $u$ and the lowest coefficient of $g$ are equal. This implies that $fu = g$ is an equation in $R$.
Conversely, if $f$ is reducible in $\mathbb{Q}[x]$, say $f = gh$ with $g,h$ non-units, then $f = \frac{g}{g(0)}\frac{h}{h(0)}$ is a non-trivial factorization of $f$ in $R$. Since it's always the case that reducible implies not prime, we see that $f$ is not prime in $R$.