我将证明的内容简化为一些陈述,即两个不同的单例集的交集是空的,但无法证明这一看似简单的事实。
我已经浏览了Ensembles,Powerset Facts,Constructive Sets之类的库,但是找不到任何有用的东西。
Require Import Coq.Sets.Ensembles.
Require Import Coq.Strings.String.
Example x: string := "x".
Example y: string := "y".
Lemma ex:
Intersection string (Singleton string x)
(Singleton string y) = Empty_set string.
Proof.
???
答案 0 :(得分:2)
关键是使用可扩展性公理:
Require Import Coq.Sets.Ensembles.
Require Import Coq.Strings.String.
Example x: string := "x".
Example y: string := "y".
Lemma ex:
Intersection string (Singleton string x)
(Singleton string y) = Empty_set string.
Proof.
apply Extensionality_Ensembles. split.
- intros _ [b Ha Hb].
inversion Ha. inversion Hb. unfold x, y in *. congruence.
- now intros _ [].
Qed.