X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Flib%2Fbasics%2Fdeqsets.ma;h=c17db5dc0cb4b1e899ae76533a686ad5322fb450;hb=cfccf434a57e10848d74d06674af4ec9cef0f0ca;hp=dc0044edc08efed553791e47ab5862e989a9350f;hpb=7d58d5dc7f897622f2010326023b17c6592d5f03;p=helm.git diff --git a/matita/matita/lib/basics/deqsets.ma b/matita/matita/lib/basics/deqsets.ma index dc0044edc..c17db5dc0 100644 --- a/matita/matita/lib/basics/deqsets.ma +++ b/matita/matita/lib/basics/deqsets.ma @@ -14,11 +14,12 @@ include "basics/bool.ma". (****** DeqSet: a set with a decidbale equality ******) -record DeqSet : Type[1] ≝ { carr :> Type[0]; +record DeqSet : Type[1] ≝ { + carr :> Type[0]; eqb: carr → carr → bool; eqb_true: ∀x,y. (eqb x y = true) ↔ (x = y) }. - + notation "a == b" non associative with precedence 45 for @{ 'eqb $a $b }. interpretation "eqb" 'eqb a b = (eqb ? a b). @@ -114,6 +115,7 @@ unification hint 0 ≔ T,a1,a2; (* ---------------------------------------- *) ⊢ eq_option T a1 a2 ≡ eqb X a1 a2. + (* pairs *) definition eq_pairs ≝ λA,B:DeqSet.λp1,p2:A×B.(\fst p1 == \fst p2) ∧ (\snd p1 == \snd p2). @@ -206,7 +208,8 @@ qed. definition DeqSig ≝ λA:DeqSet.λP:A→Prop. mk_DeqSet (Σx:A.P x) (eq_sigma A P) (eq_sigma_true A P). - + +(* unification hint 0 ≔ C,P; T ≟ carr C, X ≟ DeqSig C P @@ -217,4 +220,4 @@ unification hint 0 ≔ T,P,p1,p2; X ≟ DeqSig T P (* ---------------------------------------- *) ⊢ eq_sigma T P p1 p2 ≡ eqb X p1 p2. - +*)