簡體   English   中英

如何證明從典型類型到“Prop”的所有函數 P、Q,“forall a, b, P(a) or Q(b) 成立”當且僅當“forall a, P(a), or, forall b, Q (b),持有”?

[英]How to prove for all functions P, Q from typical type to `Prop`, “forall a, b, P(a) or Q(b) holds” iff “forall a, P(a), or, forall b, Q(b), holds”?

Lemma forall_P_Q_a_b_notPa_or_notPb_iff_forall_a_notPa_or_forall_b_notPb : forall (T : Type) (P Q : T->Prop),
  (forall a b, P a \/ Q b) <-> ((forall a, P a) \/ (forall b, Q b))
.
Proof.
  intros. split; intros.
  - admit.
  - destruct H; auto.
Admitted.

我很容易證明了一方,但找不到證明另一方的方法。 由於edestruct ,edestruct 對我不起作用。 我應該如何證明這個定理?

我相信這需要經典邏輯:

Require Import Coq.Logic.Classical.

Lemma forall_P_Q_a_b_notPa_or_notPb_iff_forall_a_notPa_or_forall_b_notPb : forall (T : Type) (P Q : T->Prop),
  (forall a b, P a \/ Q b) <-> ((forall a, P a) \/ (forall b, Q b))
.
Proof.
  intros T P Q. split; intros H.
  - destruct (classic (forall a, P a)) as [HP|HP]; auto. (* Classical reasoning *)
    destruct (not_all_ex_not _ _ HP) as [a Ha]. (* Also here *)
    right; intros b.
    specialize (H a b). tauto.
  - destruct H; auto.
Qed.

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM