X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fmatita%2Fcontribs%2Fdama%2Fdama%2Fcprop_connectives.ma;h=9e0e4b5fbb8e19c245c707d29f931923e91f2579;hb=7e33e23e18dc5d008b3b3dc0052aa4d7b236415e;hp=b42eaf61b8394972857496d3e342e123200f0dac;hpb=3c1ca5620048ad842144fba291f8bc5f0dca7061;p=helm.git diff --git a/helm/software/matita/contribs/dama/dama/cprop_connectives.ma b/helm/software/matita/contribs/dama/dama/cprop_connectives.ma index b42eaf61b..9e0e4b5fb 100644 --- a/helm/software/matita/contribs/dama/dama/cprop_connectives.ma +++ b/helm/software/matita/contribs/dama/dama/cprop_connectives.ma @@ -39,13 +39,29 @@ notation < "a ∧ b ∧ c ∧ d" left associative with precedence 35 for @{'and4 interpretation "constructive quaternary and" 'and4 x y z t = (Conj4 x y z t). +coinductive product (A,B:Type) : Type ≝ pair : ∀a:A.∀b:B.product A B. + +notation "a \times b" left associative with precedence 70 for @{'product $a $b}. +interpretation "prod" 'product a b = (product a b). + +definition first : ∀A.∀P.A × P → A ≝ λA,P,s.match s with [pair x _ ⇒ x]. +definition second : ∀A.∀P.A × P → P ≝ λA,P,s.match s with [pair _ y ⇒ y]. + +interpretation "pair pi1" 'pi1 = (first _ _). +interpretation "pair pi2" 'pi2 = (second _ _). +interpretation "pair pi1" 'pi1a x = (first _ _ x). +interpretation "pair pi2" 'pi2a x = (second _ _ x). +interpretation "pair pi1" 'pi1b x y = (first _ _ x y). +interpretation "pair pi2" 'pi2b x y = (second _ _ x y). + +notation "hvbox(\langle a, break b\rangle)" left associative with precedence 70 for @{ 'pair $a $b}. +interpretation "pair" 'pair a b = (pair _ _ a b). + inductive exT (A:Type) (P:A→CProp) : CProp ≝ ex_introT: ∀w:A. P w → exT A P. interpretation "CProp exists" 'exists \eta.x = (exT _ x). - -inductive exT23 (A:Type) (P:A→CProp) (Q:A→CProp) (R:A→A→CProp) : CProp ≝ - ex_introT23: ∀w,p:A. P w → Q p → R w p → exT23 A P Q R. +interpretation "dependent pair" 'pair a b = (ex_introT _ _ a b). notation < "'fst' \nbsp x" non associative with precedence 90 for @{'pi1a $x}. notation < "'snd' \nbsp x" non associative with precedence 90 for @{'pi2a $x}. @@ -65,6 +81,9 @@ interpretation "exT snd" 'pi2 = (pi2exT _ _). interpretation "exT snd" 'pi2a x = (pi2exT _ _ x). interpretation "exT snd" 'pi2b x y = (pi2exT _ _ x y). +inductive exT23 (A:Type) (P:A→CProp) (Q:A→CProp) (R:A→A→CProp) : CProp ≝ + ex_introT23: ∀w,p:A. P w → Q p → R w p → exT23 A P Q R. + definition pi1exT23 ≝ λA,P,Q,R.λx:exT23 A P Q R.match x with [ex_introT23 x _ _ _ _ ⇒ x]. definition pi2exT23 ≝ @@ -93,4 +112,3 @@ definition antisymmetric ≝ λA:Type.λR:A→A→CProp.λeq:A→A→Prop.∀x:A definition reflexive ≝ λA:Type.λR:A→A→CProp.∀x:A.R x x. definition transitive ≝ λA:Type.λR:A→A→CProp.∀x,y,z:A.R x y → R y z → R x z. -