X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fmatita%2Flibrary%2Flogic%2Fconnectives.ma;h=4cbea3529a7ec983b39f814f1243f1a5f92568ab;hb=4167cea65ca58897d1a3dbb81ff95de5074700cc;hp=dacf542af2d7a6640f933d502b92cdd149ee6e24;hpb=71590f4a0cb620a5e98fee3e8d65670271234532;p=helm.git diff --git a/helm/matita/library/logic/connectives.ma b/helm/matita/library/logic/connectives.ma index dacf542af..4cbea3529 100644 --- a/helm/matita/library/logic/connectives.ma +++ b/helm/matita/library/logic/connectives.ma @@ -28,8 +28,6 @@ definition Not: Prop \to Prop \def (*CSC: the URI must disappear: there is a bug now *) interpretation "logical not" 'not x = (cic:/matita/logic/connectives/Not.con x). -(*CSC: this alias should disappear. It is now required because the notation for Coq is pre-loaded *) -alias symbol "not" (instance 0) = "logical not". theorem absurd : \forall A,C:Prop. A \to \lnot A \to C. intros. elim (H1 H). @@ -42,8 +40,6 @@ inductive And (A,B:Prop) : Prop \def (*CSC: the URI must disappear: there is a bug now *) interpretation "logical and" 'and x y = (cic:/matita/logic/connectives/And.ind#xpointer(1/1) x y). -(*CSC: this alias should disappear. It is now required because the notation for Coq is pre-loaded *) -alias symbol "and" (instance 0) = "logical and". theorem proj1: \forall A,B:Prop. A \land B \to A. intros. elim H. assumption. @@ -58,14 +54,37 @@ inductive Or (A,B:Prop) : Prop \def | or_intror : B \to (Or A B). (*CSC: the URI must disappear: there is a bug now *) -interpretation "logical or" 'or x y = (cic:/matita/logic/connectives/Or.ind#xpointer(1/1) x y). -(*CSC: this alias should disappear. It is now required because the notation for Coq is pre-loaded *) -alias symbol "or" (instance 0) = "logical or". - -definition decidable : Prop \to Prop \def \lambda A:Prop. A \lor \not A. +interpretation "logical or" 'or x y = + (cic:/matita/logic/connectives/Or.ind#xpointer(1/1) x y). + +theorem Or_ind': + \forall A,B:Prop. + \forall P: A \lor B \to Prop. + (\forall p:A. P (or_introl ? ? p)) \to + (\forall q:B. P (or_intror ? ? q)) \to + \forall p:A \lor B. P p. + intros. + apply + (match p return \lambda p.P p with + [(or_introl p) \Rightarrow H p + |(or_intror q) \Rightarrow H1 q]). +qed. + +definition decidable : Prop \to Prop \def \lambda A:Prop. A \lor \lnot A. inductive ex (A:Type) (P:A \to Prop) : Prop \def ex_intro: \forall x:A. P x \to ex A P. +(*CSC: the URI must disappear: there is a bug now *) +interpretation "exists" 'exists \eta.x = + (cic:/matita/logic/connectives/ex.ind#xpointer(1/1) _ x). + +notation < "hvbox(\exists ident i opt (: ty) break . p)" + right associative with precedence 20 +for @{ 'exists ${default + @{\lambda ${ident i} : $ty. $p)} + @{\lambda ${ident i} . $p}}}. + inductive ex2 (A:Type) (P,Q:A \to Prop) : Prop \def ex_intro2: \forall x:A. P x \to Q x \to ex2 A P Q. +