So I'm doing a question that reads as follows
Build a circuit using the abstract syntax for Prop to test if two inputs are equal. Justify that your circuit is correct.
This is the Prop
in question.
data Prop = FALSE | TRUE | IN String | NOT Prop | OR Prop Prop | AND Prop Prop
Instinctively I am tempted to write AND(IN "A")(IN "B")
and give a truth table to prove it but this seems to simple. Am I missing something?
EDIT: My bad, I ended up making a XNOR gate that solved the problem. I mistook AND for XNOR which was the root cause of the confusion. The solution in the answer field is more elegant than mine so please refer to that.