【发布时间】:2024-01-10 09:02:01
【问题描述】:
假设我有一个非常简单的归纳类型:
Inductive ind : Set :=
| ind0 : ind
| ind1 : ind -> ind.
我想证明某些值是不存在的。具体来说,不能有没有充分根据的价值观:~exists i, i = ind1 i。
我在互联网上四处张望了一下,但一无所获。我能写:
Fixpoint depth (i : ind) : nat :=
match i with
| ind0 => 0
| ind1 i2 => 1 + depth i2
end.
Goal ~exists i, i = ind1 i.
Proof.
intro. inversion_clear H.
remember (depth x) as d.
induction d.
rewrite H0 in Heqd; simpl in Heqd. discriminate.
rewrite H0 in Heqd; simpl in Heqd. injection Heqd. assumption.
Qed.
可行,但看起来真的丑陋且不一般。
【问题讨论】: