有人会向我解释为什么应用于同一假设(双射f)的相同策略(破坏)在第一个引理而不是第二个引理中起作用?另外,我该怎么办才能解决它?我想这与在第二个引理的声明中混合Prop和Type有关,但我不明白这里到底发生了什么。提前谢谢。
Require Import Setoid.
Definition injective {A B: Type} (f: A->B) :=
forall x y: A, f x = f y -> x = y.
Definition bijective {A B: Type} (f: A->B) :=
exists g: B->A, (forall x: A, g (f x) = x) /\ (forall y: B, f (g y) = y).
Definition decidable (t: Type): Type:=
(forall x y: t, {x=y}+{x<>y}).
Lemma bijective_to_injective:
forall t1 t2: Type,
forall f: t1 -> t2,
bijective f -> injective f.
Proof.
intros t1 t2 f H1.
destruct H1 as [g [H1 H2]]. (* <--- WORKS HERE *)
intros x y H3.
rewrite <- H1.
rewrite <- H1 at 1.
rewrite H3.
reflexivity.
Qed.
Lemma bijective_dec:
forall t1 t2: Type,
forall f: t1 -> t2,
bijective f ->
decidable t1 ->
decidable t2.
Proof.
intros t1 t2 f H1 H2 x y.
destruct H1 as [g [H1 H2]]. (* <--- DOESN´T WORK HERE *)
Qed.
答案 0 :(得分:3)
确实,你的问题是你需要一个所谓的信息定义&#34;对于bijective
,也就是说,您可以提取实际证人,例如:
{ g: B -> A | cancel f g /\ cancel g f }