]> matita.cs.unibo.it Git - helm.git/blob - matita/library/logic/coimplication.ma
tagged 0.5.0-rc1
[helm.git] / matita / library / logic / coimplication.ma
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 set "baseuri" "cic:/matita/logic/coimplication".
16
17 include "logic/connectives.ma".
18
19 definition Iff : Prop \to Prop \to Prop \def
20    \lambda A,B. (A \to B) \land (B \to A).
21    
22  (*CSC: the URI must disappear: there is a bug now *)
23 interpretation "logical iff" 'iff x y = (cic:/matita/logic/coimplication/Iff.con x y).
24
25 notation > "hvbox(a break \liff b)" 
26   left associative with precedence 25
27 for @{ 'iff $a $b }.
28
29 notation < "hvbox(a break \leftrightarrow b)" 
30   left associative with precedence 25
31 for @{ 'iff $a $b }.
32
33 theorem iff_intro: \forall A,B. (A \to B) \to (B \to A) \to (A \liff B).
34  unfold Iff. intros. split; intros; autobatch.
35 qed.
36
37 theorem iff_refl: \forall A. A \liff A.
38  intros. apply iff_intro; intros; autobatch.
39 qed.
40
41 theorem iff_sym: \forall A,B. A \liff B \to B \liff A.
42  intros. elim H. apply iff_intro[assumption|assumption]
43 qed.
44
45 theorem iff_trans: \forall A,B,C. A \liff B \to B \liff C \to A \liff C.
46  intros. elim H. elim H1. apply iff_intro;intros;autobatch.
47 qed.