coq命題(またはそのようなもの...)から証人を抽出しようとしています。
私は次のようなものを持っています
Parameter atom_fresh_for_list :
forall (xs : list atom), {x : atom | ~ List.In x xs}.
(これは後で証明され、明示的な型でatom
:
Lemma atom_fresh_for_list :
forall (xs : list nat), { n : nat | ~ List.In n xs }.
そのようなものを抽出するにはどうすればよいx
ですか?
ドキュメンテーションによると
そのような (exist xp) から、その証人 x:A を抽出することができます (match などの消去構造を使用)。
しかし、私はこれがどのように機能するのかわかりません....
それはまた言います
A:Type と P:A->Prop を指定すると、構造 {x:A | P x} はタイプです
Parameter C : {x : atom | x \notin xs}
しかし、次のようなことを試してみると、
Error: The term "C" has type "{x : atom | x \notin xs}" which should be Set, Prop or Type.