【发布时间】:2022-05-10 21:20:57
【问题描述】:
我试图证明以下定理:
Theorem implistImpliesOdd :
forall (n:nat) (l:list nat), implist n l -> Nat.Odd(length l).
其中 implist 如下:
Inductive implist : nat -> list nat -> Prop :=
| GSSingle : forall (n:nat), implist n [n]
| GSPairLeft : forall (a b n:nat) (l:list nat), implist n l -> implist n ([a]++[b]++l)
| GSPairRight : forall (a b n:nat) (l:list nat), implist n l -> implist n (l++[a]++[b]).
在证明过程中,我达到了以下最终目标:
n: nat
l: list nat
a, b: nat
H: implist n (a :: b :: l)
IHl: implist n l -> Nat.Odd (length l)
=======================================
Nat.Odd (length l)
但似乎倒置无法完成这项工作......
我怎样才能证明这个定理?
谢谢您的帮助 !!
【问题讨论】:
标签: coq