EDIT:
For clarification, a word from the alphabet $\sum$ is defined as a finite sequence of characters.
Let $\sum = \{a, b\}$. We define a language $\mathcal{L}$ over $\sum$ as follows:
- $\varepsilon$ belongs to $\mathcal{L}$
- If $x \in \mathcal{L}$, then $abxb$ also belongs to $\mathcal{L}$
- If $x \in \mathcal{L}$, then $bxba$ also belongs to $\mathcal{L}$
- If $x,y \in \mathcal{L}$, then $xy$ also belongs to $\mathcal{L}$
Prove by structural induction that all worlds in $\mathcal{L}$ contain twice as many $b$'s than $a$'s
Progress so far:
If I understand the method presented in a lecture, then first we consider 1. as the base case.
$\varepsilon$ represents the empty word, i.e no $a$'s or $b$'s are contained. since $2 \cdot 0 = 0$, it may be concluded that 1 is true.
then the remaining points can be considered as part of the inductive step.
if we set from 2. to be the empty word from part 1, we see that 2. is true. then 2. will continue to be true no matter how many times we repeat this step. The same applies for 3.
for 4. if $x,y$ both have twice as many $a$'s or $b$'s, then it should follow that writing them together maintains this condition.
Have I got the right idea? Could this solution be formalized a little better?