We are running 2.15 for both WeBWorK and PG. Last git pull was about a month ago.

I snuck into Joy's course as admin and found the question.

Code is below. There are several variables that contain strings, and those strings contain some LaTeX. These render fine if you view the problem, but not in the homework sets editor. So that is probably what's causing the trouble.

I think there's probably a context setting that's missing?

## DBsubject(Abstract algebra)

## DBchapter(Groups)

## DBsection(Subgroups)

## Institution(University of Lethbridge)

## Author(Joy Morris)

## Level(4)

## MO(1)

## KEYWORDS('subgroup proof')

DOCUMENT();

loadMacros("PGessaymacros.pl","PGML.pl");

TEXT(beginproblem());

$showPartialCorrectAnswers = 0;

$choiceArray = ( 0,0,0,0,0);

$rand = random (0,4,1);

$choiceArray[$rand] = 1;

$step1[0] = String("Define the set. `H = \{ a^i | 1 \le i \le 5\}`.");

$step1[1] = "Define the set. `H = \{ a^i | 0 \le i \le 5\}`.";

$step2[0] = "Show `e \in H`. Notice that since `|a|=5` we have `a^5=e`. Therefore `e=a^5` and since `1 \le 5 \le 5` we see that `e \in H` by our definition of `H`.";

$step2[1] = "Show `e \in H`. We see that `e=a \in H` so `e \in H` by our definition of `H`.";

$step3[0] = "Let `x,y` be arbitrary elements of `H`. By definition of `H`, this means that there exist `i,j` with `1 \le i,j \le 5` such that `x=a^i` and `y=a^j`.";

$step3[1] = "Let `x,y` be arbitrary elements of `H`. By definition of `H`, this means that there exist `i,j` with `1 \le i,j \le 5` and `i \neq j` such that `x=a^i` and `y=a^j`.";

$step4[0] = "Deduce that `x^{-1} \in H`. If `i=5` so that `x=a^5=e` then `x^{-1}=e=a^5 \in H` by definition of identity and inverses, since `e \cdot e = e`. Otherwise, `1 \le i \le 4` and we have `x^{-1}=(a^i)^{-1}=a^{-i}`, and since `1 \le i \le 4` we have `-4 \le -i\le -1`. Since `a^5=e`, we have `x^{-1}=a^{-i}=e\cdot a^{-i}=a^{5-i}`, and `1 \le 5-i \le 4`, so again `x^{-1} \in H`.";

$step4[1] = "Deduce that `x^{-1} \in H`. If `i=5` so that `x=a^5=e` then `x^{-1}=e=a^5 \in H` by definition of identity and inverses, since `e \cdot e = e`. Otherwise, `1 \le i \le 4` and we have `x^{-1}=(a^{-i})^{-1}=a^{i}`, and since `1 \le i \le 4` we see that `x^{-1} \in H`.";

$step5[0] = "Deduce that `xy \in H`. We have `xy=a^ia^j=a^{i+j}`. If `1 \le i+j \le 5` then it is immediately clear that `xy \in H`. If `i +j \ge 6` then since `1 \le i,j \le 5` we have `6 \le i+j \le 10`. So `a^{i+j}=a^{5+k}=a^5a^k=a^k` for some `1 \le k \le 5`. Therefore, again we see that `x=a^k \in H`.";

$step5[1] = "Deduce that `xy \in H`. We have `xy=a^ia^j=a^{i+j}`. If `1 \le i+j \le 4` then it is immediately clear that `xy \in H`. If `i +j \ge 5` then since `1 \le i,j \le 4` we have `5 \le i+j \le 8`. So `a^{i+j}=a^{4+k}=a^4a^k=a^k` for some `1 \le k \le 5`. Therefore, again we see that `x=a^k \in H`.";

BEGIN_PGML

Consider the following subgroup proof. Read it carefully. In the box below, write about any errors you find in this proof and explain how to fix them. If you need to use mathematical notation, just do your best to type in what you mean.

Let [` G `] be a group, and let [` a\in G `] with [`|a|=5`]. We will prove that [`H=\{ a,a^2,a^3,a^4,a^5=e\}`] is a subgroup of [`G`].

[$step1[$choiceArray[0]]]

[$step2[$choiceArray[1]]]

[$step3[$choiceArray[2]]]

[$step4[$choiceArray[3]]]

[$step5[$choiceArray[4]]]

By the five-step subgroup test, we have proven that [`H \le G`].

[@ essay_box(5,50) @]*

END_PGML

ANS(essay_cmp());

ENDDOCUMENT();