<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
I'm trying to prove that (==) is reflexive, symmetric, and transitive over the Bools, given this definition:<div><br></div><div><div>(==) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :: Bool -&gt; Bool -&gt; Bool</div><div>x == y &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = &nbsp;(x &amp;&amp; y) || (not x &amp;&amp; not y)</div><div><br></div><div>My question is: &nbsp;are the proofs below for reflexivity and symmetricity rigorous, and what is the proof of transitivity, which eludes me? &nbsp;Thanks.</div><div>&nbsp;</div><div>Theorem (reflexivity): &nbsp;For all x `elem` Bool, x == x.</div><div><br></div><div>Proof:</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp;x == x</div><div>&nbsp;&nbsp;= &nbsp; &nbsp;{definition of "=="}</div><div>&nbsp;&nbsp; &nbsp; &nbsp;(x &amp;&amp; x) || (not x &amp;&amp; not x)</div><div>&nbsp;&nbsp;= &nbsp; &nbsp;{logic (law of the excluded middle)}</div><div>&nbsp;&nbsp; &nbsp; &nbsp;True</div><div><br></div><div>Theorem (symmetricity): &nbsp;For all x, y `elem` Bool, if x == y, then y == x.</div><div><br></div><div>Proof:</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp;x == y</div><div>&nbsp;&nbsp;= &nbsp; &nbsp;{definition of "=="}</div><div>&nbsp;&nbsp; &nbsp; &nbsp;(x &amp;&amp; y) || (not x &amp;&amp; not y)</div><div>&nbsp;&nbsp;= &nbsp; &nbsp;{lemma: &nbsp;"(&amp;&amp;)" is commutative}</div><div>&nbsp;&nbsp; &nbsp; &nbsp;(y &amp;&amp; x) || (not x &amp;&amp; not y)</div><div>&nbsp;&nbsp;= &nbsp; &nbsp;{lemma: &nbsp;"(&amp;&amp;)" is commutative}</div><div>&nbsp;&nbsp; &nbsp; &nbsp;(y &amp;&amp; x) || (not y &amp;&amp; not x)</div><div>&nbsp;&nbsp;= &nbsp; &nbsp;{definition of "=="}</div><div>&nbsp;&nbsp; &nbsp; &nbsp;y == x</div><div><br></div><div>Theorem (transitivity): &nbsp;For all x, y, z `elem` Bool, if x == y, and y == z,</div><div>then x == z.</div><div><br></div><div>Proof: ?</div></div>                                               <br /><hr />Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox. <a href='http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1' target='_new'>Learn more.</a></body>
</html>