【发布时间】:2017-05-18 00:13:07
【问题描述】:
我想证明减法不会在 Coq 中通勤,但我被卡住了。我相信我想在 Coq 中证明的语句会写成 forall a b : nat, a <> b -> a - b <> b - a
这是我目前所拥有的证据。
Theorem subtraction_does_not_commute :
forall a b : nat, a <> b -> a - b <> b - a.
Proof.
intros a b C.
unfold not; intro H.
apply C.
我想我可以使用C : a <> b 来反驳目标a = b。
【问题讨论】:
-
我建议你首先证明 WLOG 的
a < b -> a - b <> b -a的引理。您将需要使用归纳法。 -
但是直接证明没有什么特别的困难。
标签: coq coq-tactic