Galois theory - permutations of roots In all the texts on Galois theory I've looked at so far, when they talk about permutations of roots, they begin by giving an example of relations satisfied by the roots, show that these relations still hold after certain permutations are applied to the roots, then generalise this by saying that any relation satisfied by the roots will still hold after this permutation is applied to it. I don't understand how this generalisation is justified. 
For example, consider the polynomial $x^2-4x+1=0$. Its roots are $2+\sqrt3$ and $2-\sqrt3$. These roots satisfy the relations $AB=1$ and $A+B=4$. In either of these equations, swapping A and B gives another true equation. My problem is that they will then say 'therefore any algebraic equation with rational coefficients relating A and B is still true if A and B are swapped and the Galois group of the polynomial is a cyclic group of order 2 (since the permutations that leaves the equations unchanged are a swap and the identity)'. How does it follow from two examples that all possible algebraic equations involving A and B are unchanged when A and B are swapped? 

[Turning my comments into an answer]
You're totally right that it doesn't follow in any obvious way.  When texts say things like this, they are just giving an informal overview of how Galois theory works, and are not being completely rigorous yet.
Consider for instance the polynomial $x^2−1$. Its roots are $A=1$ and $B=−1$, which satisfy $AB=−1$ and $A+B=0$, and these are invariant under swapping $A$ and $B$. But it is not true you can swap $A$ and $B$ in an arbitrary polynomial equation with rational coefficients (for instance, $A=1$ is true and has rational coefficients, but $B=1$ is false). So it's definitely NOT correct to deduce this in your example without doing more work and using some special facts about the polynomial.
The typical way you justify a statement like this rigorously is by looking at extension fields and using some ring theory.  For instance, in your example, you can consider the field $\mathbb{Q}(A)$.  Since the polynomial $x^2-4x+1$ is irreducible over $\mathbb{Q}$ (this is the step that doesn't work for $x^2-1$), there is an isomorphism $f:\mathbb{Q}[x]/(x^2-4x+1)\to\mathbb{Q}(A)$ sending $x$ to $A$.  But there is also an isomorphism $g:\mathbb{Q}[x]/(x^2-4x+1)\to\mathbb{Q}(B)$ sending $x$ to $B$ by the same reasoning.  The composition $h=g\circ f^{-1}:\mathbb{Q}(A)\to\mathbb{Q}(B)$ is then an isomorphism sending $A$ to $B$.  But in fact $\mathbb{Q}(A)=\mathbb{Q}(B)$ in this case, so $h$ is an automorphism of $\mathbb{Q}(A)$ sending $A$ to $B$.  You can show that $h$ also sends $B$ to $A$, so it swaps them.  Now if $p(x,y)$ is a polynomial with rational coefficients such that $p(A,B)=0$, we find that $$0=h(0)=h(p(A,B))=p(h(A),h(B))=p(B,A).$$  That is, the equation $p(A,B)=0$ remains true when you swap $A$ and $B$.
