cop一些证明作业

这篇博客探讨了命题逻辑的基本证明技巧,包括反证法、假设、构造和应用等策略。通过一系列的例子,如Ex、Ex1到Ex10,展示了如何使用这些技巧证明复杂的逻辑命题,如蕴含、析取、合取及其相互转换。还涉及到了LEM公理(排中律)在证明中的应用,并展示了如何利用自动推理来解决逻辑问题。
摘要由CSDN通过智能技术生成

(* please use the tactics:
   intros  destruct constructor left right apply assumption absurd 
   to proof the following theorem 
   Remove "Admitted." and complete the proof.
   the tactics auto tauto are forbidden!
*)

Parameters p q r s t : Prop.

Example Ex : ~ p -> (p -> (p -> q)).
Proof.
  intros.
  absurd p.
  assumption.
  apply H1.
Qed.


Example Ex1 :  (p \/ q) -> r -> (p \/ q) /\ r.
Proof.
  intros.
  destruct H.
  -  constructor.
  + left. apply H.
  + apply H0.
  -  constructor.
  + right. apply H.
  + apply H0.
Qed.

Example Ex2 : (p -> q) /\ (r -> s) -> ((p \/ r) -> (q \/ s)) .
Proof.
  intros.
  destruct H.
  - destruct H0.
  constructor.
  apply H.
  apply H0.
  + right.
  apply H1.
  apply H0.
Qed.

Axiom LEM : forall A, A \/ ~A.

Example Ex3 : q -> (p /\ q) \/ (~p /\ q).
Proof.
  intros.
  destruct (LEM p).
  constructor.
  + constructor.
   apply H0. 
   apply H.
  +right. constructor.
   apply H0.
   apply H.
Qed.

Example Ex4: (~p \/ q) -> (p -> q).
Proof.
  intros.
  destruct H.
  + absurd p.
  - apply H; assumption.
  - apply H0;assumption.
  + apply H;assumption.
Qed.


Example Ex4': (p -> q) -> (~p \/ q).
Proof.
  intros.
  destruct (LEM p).
  - right.
    apply H; assumption.
  - left. assumption.
Qed.

Example Ex5: ((p/\q) -> r) -> (r -> s) -> (q /\ ~s) -> ~p.
Proof.
  intros.
  intro.
  destruct H1.
  absurd s.
  - apply H3.
  - apply H0. 
    apply H. 
    + constructor.
      apply H2.
      apply H1.
Qed.

Example Ex6: ~~(p \/ ~p).
Proof.
  intro.
  absurd (p\/~p).  
  - apply H.
  - right. 
    intro. 
    absurd (p\/~p).
    + apply H.
    + left. assumption.
Qed.
  
Example Ex7: ((s -> p) \/ (t -> q)) -> (s -> q) \/ (t -> p).
Proof.
  intros.
  destruct H.
  - destruct (LEM s).
    + right.
      intro. apply H. apply H0.
    + left.
      intro. absurd s. apply H0. apply H1.
  - destruct (LEM t).
    + left.
      intro. apply H. apply H0.
    + right.
      intro. absurd t. apply H0. apply H1.
Qed.


Example Ex8: (forall A, A \/ ~A) -> (forall A B, ~(~A /\ ~B) -> (A \/ B)).
Proof.
  intros. 
  destruct  (H A).
  - left. apply H1.
  - right.
    destruct (H B).
    + assumption.
    + destruct H0.
      constructor. 
      assumption. 
      assumption.
Qed.

Example Ex9:  (forall A B, ~(~A /\ ~B) -> (A \/ B)) -> (forall A, A \/ ~A).
Proof.
  intros.
   destruct (LEM A).
   - left. apply H0.
   - right. apply H0.
Qed.

Lemma PBC: forall A, ~~ A -> A.
Proof.
  intros.
  destruct (LEM A).
  - assumption.
  - absurd (~A); assumption.
Qed.
    
Example Ex10: ((~p\/~q)->(r/\s)) -> (r->t) -> ~t -> p.
Proof.
  intros.
  destruct (LEM p). apply H2.
  absurd t. apply H1. apply H0. destruct H. left. apply H2. apply H.
Qed.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值