<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="stack">
    <name>
      <text>3.2.6 (Direct proof - sum of odd integers)</text>
    </name>
    <questiontext format="moodle_auto_format">
      <text><![CDATA[<p>Prove the following theorem by filling in the blanks</p>

<p><b>Lemma:</b> If \(a,b \in \mathbb{Z}\) and \(a\) and \(b\) are both odd then \(a + b\) is even.
<div class="proof">
<div class="proof-line">
 <div class="proof-num">1.</div>
 <div class="proof-step">Let \(a\) and \(b\) be odd numbers so that 
\[
a = 2k+1 \qquad \mbox{and} \qquad b = 2l+1,
\]
where \(k, l\) are [[input:ansp]] [[validation:ansp]][[feedback:prtp]]</div>
</div>
<div class="proof-line">
 <div class="proof-num">2.</div>
 <div class="proof-step">Then note that the sum \(a + b\) can be expressed as
<p>\(a+ b =\) [[input:ans11]][[validation:ans11]]</p>
<p>\(=\) [[input:ans12]][[validation:ans12]]</p>
<p>\(=\) [[input:ans13]][[validation:ans13]][[feedback:prt1]]</p>
</div>
</div>
<div class="proof-line">
 <div class="proof-num">3.</div>
 <div class="proof-step">Since we have now written the number \(ab\) in the form \(2x \) for some integer \(x\), the number \(a+b\) is odd.</div>
</div>
</div>
</p>

<p>What is the hypothesis of this lemma? [[input:ans2]][[validation:ans2]][[feedback:prt2]]</p>
<p>What is the conclusion of this lemma? [[input:ans3]][[validation:ans3]][[feedback:prt3]]</p>]]></text>
    </questiontext>
    <generalfeedback format="moodle_auto_format">
      <text><![CDATA[<p>In the proof, \(k\) and \(l\) are integers.</p>
<p>The calculation we must perform is 
\[
\begin{align*}
a+ b &= (2k+1)+(2l+1)
\\
&= 2k+2l+2
\\
&=  2(k+l+1)
\end{align*}
\]</p>

<p>The hypothesis is the statement we begin the proof with, in this case it is "\(a\) and \(b\) are odd integers."</p>
<p>The conclusion is the statement we end the proof with, in this case it is "\(a+ b\) is an even integer."</p>]]></text>
    </generalfeedback>
    <defaultgrade>1</defaultgrade>
    <penalty>0.1</penalty>
    <hidden>0</hidden>
    <idnumber/>
    <stackversion>
      <text>2022071300</text>
    </stackversion>
    <questionvariables>
      <text><![CDATA[tac1:[[A, false, "A. real numbers"],  [B, true, "B. integers"], [C, false, "C. rational numbers"], [D, false, "D. natural numbers"], [E, false, "E. odd"], [F, false, "F. even"]];
taa1:dropdown_correct(tac1);

ta11:(2*k+1)+(2*l+1);
ta12: 2*k+2*l+2;
ta13: 2*(k+l+1);

tac2:[[A, false, "A. a, and b are real numbers"],  [B, false, "B. a and b are integers"], [C, false, "C. a+b is an integer"], [D, false, "D. a+b is odd"], [E, true, "E. a and b are odd"], [F, false, "F. a+b is a real number"]];
taa2:dropdown_correct(tac2);

tac3:[[A, false, "A. a, and b are real numbers"],  [B, false, "B. a and b are integers"], [C, true, "C. a+b is an even integer"], [D, false, "D. a+b is odd"], [E, false, "E. a and b are odd"], [F, false, "F. a+b is a real number"]];
taa3:dropdown_correct(tac3);]]></text>
    </questionvariables>
    <specificfeedback format="html">
      <text/>
    </specificfeedback>
    <questionnote format="moodle_auto_format">
      <text/>
    </questionnote>
    <questiondescription format="moodle_auto_format">
      <text/>
    </questiondescription>
    <questionsimplify>1</questionsimplify>
    <assumepositive>0</assumepositive>
    <assumereal>0</assumereal>
    <prtcorrect format="html">
      <text><![CDATA[<span style="font-size: 1.5em; color:green;"><i class="fa fa-check"></i></span> Correct answer, well done.]]></text>
    </prtcorrect>
    <prtpartiallycorrect format="html">
      <text><![CDATA[<span style="font-size: 1.5em; color:orange;"><i class="fa fa-adjust"></i></span> Your answer is partially correct.]]></text>
    </prtpartiallycorrect>
    <prtincorrect format="html">
      <text><![CDATA[<span style="font-size: 1.5em; color:red;"><i class="fa fa-times"></i></span> Incorrect answer.]]></text>
    </prtincorrect>
    <decimals>.</decimals>
    <scientificnotation>*10</scientificnotation>
    <multiplicationsign>none</multiplicationsign>
    <sqrtsign>1</sqrtsign>
    <complexno>i</complexno>
    <inversetrig>cos-1</inversetrig>
    <logicsymbol>lang</logicsymbol>
    <matrixparens>[</matrixparens>
    <isbroken>0</isbroken>
    <variantsselectionseed/>
    <input>
      <name>ans11</name>
      <type>algebraic</type>
      <tans>ta11</tans>
      <boxsize>10</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>3</showvalidation>
      <options/>
    </input>
    <input>
      <name>ans12</name>
      <type>algebraic</type>
      <tans>ta12</tans>
      <boxsize>10</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>3</showvalidation>
      <options/>
    </input>
    <input>
      <name>ans13</name>
      <type>algebraic</type>
      <tans>ta13</tans>
      <boxsize>10</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>3</showvalidation>
      <options/>
    </input>
    <input>
      <name>ans2</name>
      <type>dropdown</type>
      <tans>tac2</tans>
      <boxsize>15</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>3</showvalidation>
      <options/>
    </input>
    <input>
      <name>ans3</name>
      <type>dropdown</type>
      <tans>tac3</tans>
      <boxsize>15</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>3</showvalidation>
      <options/>
    </input>
    <input>
      <name>ansp</name>
      <type>dropdown</type>
      <tans>tac1</tans>
      <boxsize>15</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>3</showvalidation>
      <options/>
    </input>
    <prt>
      <name>prt1</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>EqualComAss</answertest>
        <sans>ans11</sans>
        <tans>ta11</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>0.33333333333333</truescore>
        <truepenalty/>
        <truenextnode>1</truenextnode>
        <trueanswernote>prt1-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty/>
        <falsenextnode>1</falsenextnode>
        <falseanswernote>prt1-1-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
      <node>
        <name>1</name>
        <description/>
        <answertest>EqualComAss</answertest>
        <sans>ans12</sans>
        <tans>ta12</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0.33333333333333</truescore>
        <truepenalty/>
        <truenextnode>2</truenextnode>
        <trueanswernote>prt1-2-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty/>
        <falsenextnode>2</falsenextnode>
        <falseanswernote>prt1-2-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
      <node>
        <name>2</name>
        <description/>
        <answertest>EqualComAss</answertest>
        <sans>ans13</sans>
        <tans>ta13</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0.33333333333333</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt1-3-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt1-3-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <prt>
      <name>prt2</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans2</sans>
        <tans>E</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt2-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt2-1-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <prt>
      <name>prt3</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans3</sans>
        <tans>C</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt3-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt3-1-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <prt>
      <name>prtp</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ansp</sans>
        <tans>B</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prtp-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prtp-1-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <qtest>
      <testcase>1</testcase>
      <description/>
      <testinput>
        <name>ans11</name>
        <value>ta11</value>
      </testinput>
      <testinput>
        <name>ans12</name>
        <value>ta12</value>
      </testinput>
      <testinput>
        <name>ans13</name>
        <value>ta13</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>E</value>
      </testinput>
      <testinput>
        <name>ans3</name>
        <value>C</value>
      </testinput>
      <testinput>
        <name>ansp</name>
        <value>B</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt1-3-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt2</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt2-1-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt3</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt3-1-T</expectedanswernote>
      </expected>
      <expected>
        <name>prtp</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prtp-1-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>2</testcase>
      <description/>
      <testinput>
        <name>ans11</name>
        <value>ta13</value>
      </testinput>
      <testinput>
        <name>ans12</name>
        <value>ta12</value>
      </testinput>
      <testinput>
        <name>ans13</name>
        <value>ta11</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>C</value>
      </testinput>
      <testinput>
        <name>ans3</name>
        <value>E</value>
      </testinput>
      <testinput>
        <name>ansp</name>
        <value>A</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>0.3330000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt1-3-F</expectedanswernote>
      </expected>
      <expected>
        <name>prt2</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt2-1-F</expectedanswernote>
      </expected>
      <expected>
        <name>prt3</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt3-1-F</expectedanswernote>
      </expected>
      <expected>
        <name>prtp</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prtp-1-F</expectedanswernote>
      </expected>
    </qtest>
  </question>
</quiz>
