I'm having problems understanding how this works so I'll provide detally explained problem but I'd like if someone could explain it somehow simpler or write it out more step by step than what I'll post here. I'm not actually able to follow how are those theorems got from those derivation rules, what am I swapping in $x$, how the rest follows. Note that English is not my native language and I don't know exact terms as how they are used in English, so I will translate them literally but I believe you'll understand them. Here it goes:
Let $T$ be formal theory $T=(S, Form, Ax, R)$ where $S= \{ $$a, b$$\}$, $Form = S*$, $Ax= \{ $ $a, b$$\}$, $R=$ $\{$ $\alpha $, $\beta $ $\}$ and where derivation rules are $\alpha: $ $\frac{xa}{xab}$ and $\beta:$ $\frac{xb}{xba}$. Describe all theorems of formal theory T.
Solution: Let us show that formula is theorem of theory $T$ if and only if could be get by alternating letters $a$ and $b$.
$\Rightarrow: $ We first prove that, if formula $t$ is theorem, then $t$ could be get by alternating letters $a$ and $b$. We get proof by induction for word lenght, $n=|t|$. Let $e$ be empty word. Then from $a(=ea)$ $\in $ $Ax$, according to derivation rule $\alpha$, it follows that two letter word $ab(=eab)$ is theorem.How $b(=eb)$ $\in $ $Ax$, according to derivation rule $\beta $, we conclude that two letter word $ba(=eba)$ is theorem.
Two letter words $aa$ and $bb$ are not theorems, because they cannot be obtained using derivation rules $\alpha $ and $\beta$ on axioms $a$ and $b$. Let $n$-length words have been obtained by alternating letters $a$ and $b$, $t1=abab...ab(a)$ and $t2=baba...ba(b)$, theorems of formal theory $T$. Expressions in parentheses are included if $n$ is odd number. Let formula $t$ be theorem of $n+1$ lenght and let it begins with letter $a$. Then according to the derivation rules we have that for even number $n$, formula $t$ was obtained from formula $t1$ according to the rule $\beta $. Analogously, according to the derivation rule $\alpha$ and $\beta$ on word $t2$ we prove that claim holds if word $t$ begins with letter $b$. According to that, every theorem of $n+1$ lenght is obtained by alternating letters $a$ and $b$.
$\Leftarrow: $ Let's prove that words obtained by alternating letters $a$ and $b$ are theorems of formal theory $T$. From $a \in Ax$, according to derivation rule $\alpha$, we conclude that two letter word $ab$ is theorem. Analoguously, from $b \in Ax$, acording to derivation rule $\alpha$, we conclude that two word letter $ba$ is theorem. We get three letter words $aba$ by using rule $\beta$ on $ab$ and $bab$ by using $\alpha$ on $ba$. Continuing alternating use of $\alpha$ and $\beta$, we prove that words of n lenght obtained by alternating letters $a$ and $b$ are theorems with following derivation:
$a\vdash_{\alpha} ab \vdash_{\beta} aba \vdash_{\alpha} abab \vdash_{\beta} ... \vdash_{\alpha(\beta)} abab...ab(a)$
and
$b\vdash_{\beta} ba \vdash_{\alpha} bab \vdash_{\beta} baba \vdash_{\alpha} ... \vdash_{\beta(\alpha)} baba...ba(b)$
Expressions in parenthesis are included only if n is odd number.
EDIT:
Let me see if I understood you @Mauro ALLEGRANZA. Regarding $\alpha$ and $\beta$, I shouldn't look at them as a fractions but as a modus ponens, right? So, for $\alpha$, if $xa$ is true, then $xab$ is theorem?
So, when I start, I have only $a$ and $b$ to look up to as a true/not true, I'll probably say it wrong but hear my reasoning, let's say $P$ is a set of "acceptable" theorems or something like that and that at first it consists only of $a$ and $b$, so $P=\{a,b\}$.
So when I start with $e$ (blank word), $\alpha$ and $\beta$ give me $a$ and $b$, which are in $P$ and therefore the result $ab$ from $xab$ and $ba$ from $xba$ are theorems and now $P=\{a, b, ab, ba\}$.
So now I start adding $a$ and $b$. If I plug $a$ into $\alpha$ I get $aa$ which is not in $P$ so $aab$ is not theorem, but if I plug $b$ into $\alpha$ I get $ba$ which is in $P$ so $bab$ is theorem.
Likewise, if I plug $b$ into $\beta$ I get $bb$ which is not in $P$ so $bba$ is not theorem, but if I plug $a$ into $\beta$ I get $ab$ which is in $P$ and so $aba$ is a theorem.
So, now $P=\{a, b, ab, ba, bab, aba\}$. And I continue trying to add letters this way but the only way it will become theorem is if alternating $a$ and $b$ are used. So, now I use induction for the rest.
Is this correct?
You have a language $S$ with two symbols only: $a$ and $b$, and you have two "axioms", i.e. the two initial expressions: $a$ and $b$.
Finally, you have two Production rules, aka: rewriting rules, that receive a string as input (e.g. $ab$) and produce a string as outout ($aba$).
In a nutshell, they amount to: if the given string ends with $a$ add $b$ and if the string ends with $b$ add $a$.
To prove the result you can use induction on length of the string $s$.
Base case: the string $s$ has length $1$ which means that it must be an axiom.
Thus, if $s=a$ we can apply only rule $\alpha$ to produce: $ab$ and if $s=b$ we can apply only rule $\beta$ to produce $ba$.
In both cases, the result is proven.
Now you can easily complete the inductive proof. apply only rule $\alpha$ to produce: $ab$ and if $s=b$ we can apply only rule $\beta$ to produce $ba$.
In both cases, the result is proven.
Now you can easily complete the inductive proof.