无法破坏存在于假设中

Can´t destruct exists in hypothesis

谁能向我解释为什么应用于相同假设(双射 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.

确实你的问题是你需要一个所谓的 "informative definition" for bijective 也就是说,一个你可以提取实际证人的地方,例如:

{ g: B -> A | cancel f g /\ cancel g f }