on master help sign in
Align steps in preorder reasoning example
8684daeNick Drozd
docs/reference/misc.rst+5−5
@@ -115,11 +115,11 @@ Here is an example:
115 import Syntax.PreorderReasoning
115 import Syntax.PreorderReasoning
116 multThree : (a, b, c : Nat) -> a * b * c = c * a * b
116 multThree : (a, b, c : Nat) -> a * b * c = c * a * b
117 multThree a b c =
117 multThree a b c =
118− (a * b * c) ={ sym (multAssociative a b c) }=
118+ (a * b * c) ={ sym (multAssociative a b c) }=
119− (a * (b * c)) ={ cong (multCommutative b c) }=
119+ (a * (b * c)) ={ cong (multCommutative b c) }=
120− (a * (c * b)) ={ multAssociative a c b }=
120+ (a * (c * b)) ={ multAssociative a c b }=
121− (a * c * b) ={ cong {f = (* b)} (multCommutative a c) }=
121+ (a * c * b) ={ cong {f = (* b)} (multCommutative a c) }=
122− (c * a * b) QED
122+ (c * a * b) QED
123
123
124Note that the parentheses are required -- only a simple expression can
124Note that the parentheses are required -- only a simple expression can
125be on the left of ``={ }=`` or ``QED``. Also, when using preorder
125be on the left of ``={ }=`` or ``QED``. Also, when using preorder