我使用Coq.Relations
提供的定义,我有以下定义:
Definition joinable (x:A) (y:A) : Prop :=
exists z, (clos_refl_trans A R x z) /\ (clos_refl_trans A R y z).
Notation "X ↓ Y" := (joinable X Y) (at level 70, right associativity).
Notation "X → Y" := (R X Y) (at level 75, right associativity).
Notation "X →* Y" := (clos_refl_trans A R X Y) (at level 75, right associativity).
Notation "X ⇆ Y" := (clos_refl_sym_trans A R X Y) (at level 75, right associativity).
Definition confluent : Prop := forall x y1 y2, (x →* y1 /\ x →* y2) -> (y1↓y2).
Definition semi_confluent : Prop := forall x y1 y2, (x → y1 /\ x →* y2) -> (y1↓y2).
这就是我所拥有的:
Theorem semi_confluent_confluent : semi_confluent -> confluent.
Proof.
unfold confluent, semi_confluent, joinable.
intros. destruct H0. induction H0.
- apply H with (x := x). split. auto. auto.
- exists y2. split. auto. auto.
- admit.
Admitted.
我尝试使用感应:
但似乎我坚持最后一个案例(及物性)。我为最后一个案例尝试了几件事,比如感应(x→* z),但它似乎引导我做了一个无法证明的陈述。
答案 0 :(得分:2)
我认为通过clos_refl_trans_1n
关系上的归纳(它等同于clos_refl_trans
)来证明定理更容易一些。
因为它给了我们两个案例:反身案例和我们实际做出R
- 步骤"我们可以轻松使用半融合属性,这需要R
- 步骤。
我略微改变了confluent
和semi_confluent
的定义,以避免与连词相关的包装/解包。这不会影响任何事情,因为结果在逻辑上等同于原始结果。
我还应该指出,在许多情况下,我们需要在执行归纳之前概括我们的陈述。
Definition confluent : Prop := forall x y1 y2, x →* y1 -> x →* y2 -> (y1↓y2).
Definition semi_confluent : Prop := forall x y1 y2, x → y1 -> x →* y2 -> (y1↓y2).
Hint Constructors clos_refl_trans.
Theorem semi_confluent_confluent : semi_confluent -> confluent.
Proof.
intros Hsemi x y1 y2 Hxy1 Hxy2.
unfold semi_confluent, joinable in *.
generalize dependent y2.
induction (clos_rt_rt1n _ _ _ _ Hxy1) as [| x y1' y1 HRxy1' Hy1'y1 IH]; intros y2 Hxy2.
- now exists y2.
- apply clos_rt1n_rt in Hy1'y1.
specialize (Hsemi x y1' y2 HRxy1' Hxy2) as (z & Hy1'z & Hy2z).
specialize (IH Hy1'y1 z Hy1'z) as (w & Hy1w & Hzw).
exists w.
split; auto.
now apply rt_trans with (y := z).
Qed.