X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Flib%2Fhints_declaration.ma;h=7dd0800d75b49b36cd151da0adbfa54d8bcc2ac8;hb=37905ef451d98f0c857d62876fdbe12f0ee8ccaf;hp=bcbfed4f3a47d5f01e47296c437b28cc48273f61;hpb=53452958508001e7af3090695b619fe92135fb9e;p=helm.git diff --git a/matita/matita/lib/hints_declaration.ma b/matita/matita/lib/hints_declaration.ma index bcbfed4f3..7dd0800d7 100644 --- a/matita/matita/lib/hints_declaration.ma +++ b/matita/matita/lib/hints_declaration.ma @@ -56,6 +56,23 @@ notation > "≔ (list0 ( (list1 (ident x) sep , ) opt (: T) ) sep ,) opt (; (lis } }}. +(* it seems unbelivable, but it works! *) +notation > "≔ (list0 ( (list1 (ident x) sep , ) opt (: T) ) sep ,) opt (; (list1 (ident U ≟ term 19 V ) sep ,)) ⊢ term 19 Px ≡≡ term 19 Py" + with precedence 90 + for @{ ${ fold right + @{ ${ default + @{ ${ fold right + @{ 'hint_decl2 $Px $Py } + rec acc1 @{ let ( ${ident U} : ?) ≝ $V in $acc1} } } + @{ 'hint_decl2 $Px $Py } + } + } + rec acc @{ + ${ fold right @{ $acc } rec acc2 + @{ ∀${ident x}:${ default @{ $T } @{ ? } }.$acc2 } } + } + }}. + include "basics/pts.ma". definition hint_declaration_Type0 ≝ λA:Type[0] .λa,b:A.Prop. @@ -65,29 +82,30 @@ definition hint_declaration_CProp0 ≝ λA:CProp[0].λa,b:A.Prop. definition hint_declaration_CProp1 ≝ λA:CProp[1].λa,b:A.Prop. definition hint_declaration_CProp2 ≝ λa,b:CProp[2].Prop. -interpretation "hint_decl_Type2" 'hint_decl a b = (hint_declaration_Type2 a b). -interpretation "hint_decl_CProp2" 'hint_decl a b = (hint_declaration_CProp2 a b). +interpretation "hint_decl_Type2" 'hint_decl2 a b = (hint_declaration_Type2 a b). +interpretation "hint_decl_CProp2" 'hint_decl2 a b = (hint_declaration_CProp2 a b). interpretation "hint_decl_Type1" 'hint_decl a b = (hint_declaration_Type1 ? a b). interpretation "hint_decl_CProp1" 'hint_decl a b = (hint_declaration_CProp1 ? a b). interpretation "hint_decl_CProp0" 'hint_decl a b = (hint_declaration_CProp0 ? a b). interpretation "hint_decl_Type0" 'hint_decl a b = (hint_declaration_Type0 ? a b). -(* Non uniform coercions support -record lock2 (S : Type[2]) (s : S) : Type[3] ≝ { - force2 : Type[2]; - lift2 : force2 +(* Non uniform coercions support +record solution2 (S : Type[2]) (s : S) : Type[3] ≝ { + target2 : Type[2]; + result2 : target2 }. -record lock1 (S : Type[1]) (s : S) : Type[2] ≝ { - force1 : Type[1]; - lift1 : force1 +record solution1 (S : Type[1]) (s : S) : Type[2] ≝ { + target1 : Type[1]; + result1 : target1 }. -coercion zzzlift1 : ∀S:Type[1].∀s:S.∀l:lock1 S s. force1 S s l ≝ lift1 - on s : ? to force1 ???. +coercion nonunifcoerc1 : ∀S:Type[1].∀s:S.∀l:solution1 S s. target1 S s l ≝ result1 + on s : ? to target1 ???. -coercion zzzlift2 : ∀S:Type[2].∀s:S.∀l:lock2 S s. force2 S s l ≝ lift2 - on s : ? to force2 ???. +coercion nonunifcoerc2 : ∀S:Type[2].∀s:S.∀l:solution2 S s. target2 S s l ≝ result2 + on s : ? to target2 ???. +*) (* Example of a non uniform coercion declaration @@ -99,9 +117,8 @@ coercion zzzlift2 : ∀S:Type[2].∀s:S.∀l:lock2 S s. force2 S s l ≝ lift2 unification hint 0 ≔ R : setoid; MR ≟ carr R, - lock ≟ mk_lock1 Type[0] MR setoid R + sol ≟ mk_solution1 Type[0] MR setoid R (* ---------------------------------------- *) ⊢ - setoid ≡ force1 ? MR lock. + setoid ≡ target1 ? MR sol. *) -*) \ No newline at end of file