From: Enrico Tassi Date: Mon, 27 Sep 2010 23:25:57 +0000 (+0000) Subject: many fixes to setoids for re, 16.1 almost done X-Git-Tag: make_still_working~2822 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=2c486bbea1d6ffb072d0ff83f9df129b7860f3e1;p=helm.git many fixes to setoids for re, 16.1 almost done --- diff --git a/helm/software/matita/nlibrary/depends b/helm/software/matita/nlibrary/depends index 0f936d55e..96eca527f 100644 --- a/helm/software/matita/nlibrary/depends +++ b/helm/software/matita/nlibrary/depends @@ -4,7 +4,7 @@ topology/igft3.ma arithmetics/nat.ma datatypes/bool.ma topology/igft.ma basics/functions.ma Plogic/connectives.ma Plogic/equality.ma nat/compare.ma datatypes/bool.ma nat/order.ma arithmetics/compare.ma arithmetics/nat.ma -datatypes/list-setoids.ma datatypes/list.ma sets/setoids.ma +datatypes/list-setoids.ma datatypes/list.ma sets/setoids.ma sets/setoids1.ma datatypes/list-theory.ma arithmetics/nat.ma datatypes/list.ma logic/pts.ma basics/relations.ma Plogic/connectives.ma diff --git a/helm/software/matita/nlibrary/depends.dot b/helm/software/matita/nlibrary/depends.dot index f3f71b61d..0c9dfbc0f 100644 --- a/helm/software/matita/nlibrary/depends.dot +++ b/helm/software/matita/nlibrary/depends.dot @@ -19,6 +19,7 @@ digraph g { "datatypes/list-setoids.ma" []; "datatypes/list-setoids.ma" -> "datatypes/list.ma" []; "datatypes/list-setoids.ma" -> "sets/setoids.ma" []; + "datatypes/list-setoids.ma" -> "sets/setoids1.ma" []; "datatypes/list-theory.ma" []; "datatypes/list-theory.ma" -> "arithmetics/nat.ma" []; "datatypes/list-theory.ma" -> "datatypes/list.ma" []; diff --git a/helm/software/matita/nlibrary/depends.png b/helm/software/matita/nlibrary/depends.png index 63ad7eab1..f1fbaf2f9 100644 Binary files a/helm/software/matita/nlibrary/depends.png and b/helm/software/matita/nlibrary/depends.png differ diff --git a/helm/software/matita/nlibrary/logic/cprop.ma b/helm/software/matita/nlibrary/logic/cprop.ma index 1efc042ff..20942ecc8 100644 --- a/helm/software/matita/nlibrary/logic/cprop.ma +++ b/helm/software/matita/nlibrary/logic/cprop.ma @@ -48,11 +48,13 @@ ndefinition and_morphism: unary_morphism1 CPROP (unary_morphism1_setoid1 CPROP C [ napply (. Ha^-1) | napply (. Hb^-1) | napply (. Ha) | napply (. Hb)] //. nqed. -unification hint 0 ≔ A,B ⊢ - mk_unary_morphism1 … - (λX.mk_unary_morphism1 … (And X) (prop11 … (and_morphism X))) - (prop11 … and_morphism) - A B ≡ And A B. +unification hint 0 ≔ A,B:CProp[0]; + T ≟ CPROP, + MM ≟ mk_unary_morphism1 … + (λX.mk_unary_morphism1 … (And X) (prop11 … (and_morphism X))) + (prop11 … and_morphism) +(*-------------------------------------------------------------*) ⊢ + fun11 T T (fun11 T (unary_morphism1_setoid1 T T) MM A) B ≡ And A B. (* naxiom daemon: False. @@ -71,12 +73,14 @@ ndefinition or_morphism: unary_morphism1 CPROP (unary_morphism1_setoid1 CPROP CP [ @1; napply (. Ha^-1) | @2; napply (. Hb^-1) | @1; napply (. Ha) | @2; napply (. Hb)] //. nqed. -unification hint 0 ≔ A,B ⊢ - mk_unary_morphism1 … - (λX.mk_unary_morphism1 … (Or X) (prop11 … (or_morphism X))) - (prop11 … or_morphism) - A B ≡ Or A B. - +unification hint 0 ≔ A,B:CProp[0]; + T ≟ CPROP, + MM ≟ mk_unary_morphism1 … + (λX.mk_unary_morphism1 … (Or X) (prop11 … (or_morphism X))) + (prop11 … or_morphism) +(*-------------------------------------------------------------*) ⊢ + fun11 T T (fun11 T (unary_morphism1_setoid1 T T) MM A) B ≡ Or A B. + ndefinition if_morphism: unary_morphism1 CPROP (unary_morphism1_setoid1 CPROP CPROP). napply (mk_binary_morphism1 … (λA,B:CProp[0]. A → B)); #a; #a'; #b; #b'; #Ha; #Hb; @; #H; #x diff --git a/helm/software/matita/nlibrary/re/re-setoids.ma b/helm/software/matita/nlibrary/re/re-setoids.ma index dcf1d85fe..3d8682365 100644 --- a/helm/software/matita/nlibrary/re/re-setoids.ma +++ b/helm/software/matita/nlibrary/re/re-setoids.ma @@ -26,7 +26,12 @@ naxiom admit : Admit. ndefinition if': ∀A,B:CPROP. A = B → A → B. #A B; *; /2/. nqed. -ncoercion if : ∀A,B:CPROP. ∀p:A = B. A → B ≝ if' on _p : eq_rel1 ???? to ∀_:?.?. +ncoercion if : ∀A,B:CPROP. ∀p:A = B. A → B ≝ if' on _p : eq_rel1 ? (eq1 CPROP) ?? to ∀_:?.?. + +ndefinition ifs': ∀S.∀A,B:Ω^S. A = B → ∀x. x ∈ A → x ∈ B. +#S A B; *; /2/. nqed. + +ncoercion ifs : ∀S.∀A,B:Ω^S. ∀p:A = B.∀x. x ∈ A → x ∈ B ≝ ifs' on _p : eq_rel1 ? (eq1 (powerclass_setoid ?))?? to ∀_:?.?. (* XXX move to list-setoids-theory.ma *) @@ -205,6 +210,71 @@ ndefinition cat : ∀A:setoid.∀l1,l2:lang A.lang A ≝ λS.λl1,l2.{ w ∈ list S | ∃w1,w2.w =_0 w1 @ w2 ∧ w1 ∈ l1 ∧ w2 ∈ l2}. interpretation "cat lang" 'pc a b = (cat ? a b). +(* hints for cat *) +nlemma cat_is_morph : ∀A:setoid. (lang A) ⇒_1 (lang A) ⇒_1 (lang A). +#X; napply (mk_binary_morphism1 … (λA,B:lang X.A · B)); +#A1 A2 B1 B2 EA EB; napply ext_set; #x; +ncut (∀y,x:list X.(x ∈ B1) =_1 (x ∈ B2)); ##[ + #_; #y; ncases EA; ncases EB; #h1 h2 h3 h4; @; ##[ napply h1 | napply h2] ##] #YY; +ncut (∀x,y:list X.(x ∈ A1) =_1 (x ∈ A2)); ##[ + #y; #y; ncases EA; ncases EB; #h1 h2 h3 h4; @; ##[ napply h3 | napply h4] ##] #XX; +napply (.=_1 (∑w1, w2. XX w1 w2/ E ; (# ╪_1 E) ╪_1 #)); +napply (.=_1 (∑w1, w2. YY w1 w2/ E ; # ╪_1 E)); //; +nqed. + +nlemma cat_is_ext: ∀A:setoid. (Elang A) → (Elang A) → (Elang A). + #S A B; @ (ext_carr … A · ext_carr … B); (* XXX coercion ext_carr che non funge *) +#x y Exy; +ncut (∀w1,w2.(x == w1@w2) = (y == w1@w2)); ##[ + #w1 w2; @; #H; ##[ napply (.= Exy^-1) | napply (.= Exy)] // ] +#E; @; #H; +##[ napply (. (∑w1,w2. (E w1 w2)^-1 / E ; (E ╪_1 #) ╪_1 #)); napply H; +##| napply (. (∑w1,w2. E w1 w2 / E ; (E ╪_1 #) ╪_1 #)); napply H ] +nqed. + +alias symbol "hint_decl" = "hint_decl_Type1". +unification hint 0 ≔ A : setoid, B,C : Elang A; + AA ≟ LIST A, + R ≟ mk_ext_powerclass ? + (ext_carr ? B · ext_carr ? C) (ext_prop ? (cat_is_ext ? B C)) +(*--------------------------------------------------------------------*) ⊢ + ext_carr AA R ≡ cat A (ext_carr AA B) (ext_carr AA C). + +unification hint 0 ≔ S:setoid, A,B:lang S; + T ≟ powerclass_setoid (list S), + TT ≟ unary_morphism1_setoid1 T T, + MM ≟ mk_unary_morphism1 T TT + (λA:lang S. + mk_unary_morphism1 T T + (λB:lang S.A · B) (prop11 T T (cat_is_morph S A))) + (prop11 T TT (cat_is_morph S)) +(*--------------------------------------------------------------------------*) ⊢ + fun11 T T (fun11 T (unary_morphism1_setoid1 T T) MM A) B ≡ cat S A B. + +nlemma cat_is_ext_morph:∀A:setoid.(Elang A) ⇒_1 (Elang A) ⇒_1 (Elang A). +#A; napply (mk_binary_morphism1 … (cat_is_ext …)); +#x1 x2 y1 y2 Ex Ey; napply (prop11 … (cat_is_morph A)); nassumption. +nqed. + +unification hint 1 ≔ AA : setoid, B,C : Elang AA; + AAS ≟ LIST AA, + T ≟ ext_powerclass_setoid (list AA), + TT ≟ unary_morphism1_setoid1 T T, + R ≟ mk_unary_morphism1 ?? + (λS:Elang AA. + mk_unary_morphism1 ?? + (λS':Elang AA. + mk_ext_powerclass (list AA) (ext_carr ? S · ext_carr ? S') + (ext_prop (list AA) (cat_is_ext AA S S'))) + (prop11 ?? (cat_is_ext_morph AA S))) + (prop11 ?? (cat_is_ext_morph AA)), + BB ≟ ext_carr ? B, + CC ≟ ext_carr ? C +(*------------------------------------------------------*) ⊢ + ext_carr AAS (fun11 T T (fun11 T TT R B) C) ≡ cat AA BB CC. + +(* end hints for cat *) + ndefinition star : ∀A:setoid.∀l:lang A.lang A ≝ λS.λl.{ w ∈ list S | ∃lw.flatten ? lw = w ∧ conjunct ? lw l}. interpretation "star lang" 'pk l = (star ? l). @@ -221,6 +291,75 @@ match r with notation "𝐋 term 70 E" non associative with precedence 75 for @{'L_re $E}. interpretation "in_l" 'L_re E = (L_re ? E). +(* support for 𝐋 as an extensional set *) +ndefinition L_re_is_ext : ∀S:Alpha.∀r:re S.Elang S. +#S r; @(𝐋 r); #w1 w2 E; nelim r; +##[ ##1,2: /2/; @; #defw1; napply (.=_0 (defw1 : [ ] = ?)); //; napply (?^-1); //; +##| #x; @; #defw1; napply (.=_0 (defw1 : [x] = ?)); //; napply (?^-1); //; +##| #e1 e2 H1 H2; (* not shure I shoud Inline *) + @; *; #s1; *; #s2; *; *; #defw1 s1L1 s2L2; + ##[ nlapply (trans … E^-1 defw1); #defw2; + ##| nlapply (trans … E defw1); #defw2; ##] @s1; @s2; /3/; +##| #e1 e2 H1 H2; napply (H1‡H2); (* good! *) +##| #e H; @; *; #l; *; #defw1 Pl; @l; @; //; napply (.=_1 defw1); /2/; ##] +nqed. + +unification hint 0 ≔ S : Alpha,e : re S; + SS ≟ LIST S, + X ≟ mk_ext_powerclass SS (𝐋 e) (ext_prop SS (L_re_is_ext S e)) +(*-----------------------------------------------------------------*)⊢ + ext_carr SS X ≡ L_re S e. + +nlemma L_re_is_morph:∀A:Alpha.(setoid1_of_setoid (re A)) ⇒_1 Ω^(list A). +#A; @; ##[ napply (λr:re A.𝐋 r); ##] #r1; nelim r1; +##[##1,2: #r2; ncases r2; //; ##[##1,6: *|##2,7,5,12,10: #a; *|##3,4,8,9: #a1 a2; *] +##|#x r2; ncases r2; ##[##1,2: *|##4,5: #a1 a2; *|##6: #a; *] #y E; @; #z defz; + ncases z in defz; ##[##1,3: *] #zh ztl; ncases ztl; ##[##2,4: #d dl; *; #_; *] + *; #defx; #_; @; //; napply (?^-1); napply (.= defx^-1); //; napply (?^-1); //; +##|#e1 e2 IH1 IH2 r2; ncases r2; ##[##1,2: *|##5: #a1 a2; *|##3,6: #a1; *] + #f1 f2; *; #E1 E2; nlapply (IH2 … E2); nlapply (IH1 … E1); #H1 H2; + nchange in match (𝐋 (e1 · e2)) with (?·?); + napply (.=_1 (H1 ╪_1 H2)); //; +##|#e1 e2 IH1 IH2 r2; ncases r2; ##[##1,2: *|##4: #a1 a2; *|##3,6: #a1; *] + #f1 f2; *; #E1 E2; nlapply (IH2 … E2); nlapply (IH1 … E1); #H1 H2; + napply (.=_1 H1╪_1H2); //; +##|#r IH r2; ncases r2; ##[##1,2: *|##4,5: #a1 a2; *|##3: #a1; *] + #e; #defe; nlapply (IH e defe); #H; + @; #x; *; #wl; *; #defx Px; @wl; @; //; nelim wl in Px; //; #l ls IH; *; #lr Pr; + ##[ nlapply (ifs' … H … lr) | nlapply (ifs' … H^-1 … lr) ] #le; + @; ##[##1,3: nassumption] /2/; ##] +nqed. + +unification hint 0 ≔ A:Alpha, a:re A; + T ≟ setoid1_of_setoid (RE A), + T1 ≟ LIST A, + T2 ≟ powerclass_setoid T1, + MM ≟ mk_unary_morphism1 ?? + (λa:setoid1_of_setoid (RE A).𝐋 a) (prop11 ?? (L_re_is_morph A)) +(*--------------------------------------------------------------------------*) ⊢ + fun11 T T2 MM a ≡ 𝐋 a. + +nlemma L_re_is_ext_morph:∀A:Alpha.(setoid1_of_setoid (re A)) ⇒_1 𝛀^(list A). +#A; @; ##[ #a; napply (L_re_is_ext ? a); ##] #a b E; @; #x H; +##[ nchange with (x ∈ 𝐋 b); napply (. #╪_1?); + ##[ nchange with (𝐋 b = ?); napply (.= ┼_1 E^-1); napply #| ##skip] + nassumption; +##| nchange with (x ∈ 𝐋 a); napply (. #╪_1?); + ##[ nchange with (𝐋 a = ?); napply (.= ┼_1 E); napply #| ##skip] + nassumption; ##] +nqed. + +unification hint 1 ≔ AA : Alpha, a: re AA; + T ≟ RE AA, T1 ≟ LIST AA, TT ≟ ext_powerclass_setoid T1, + R ≟ mk_unary_morphism1 ?? + (λa:setoid1_of_setoid T. + mk_ext_powerclass ? (𝐋 a) (ext_prop ? (L_re_is_ext AA a))) + (prop11 ?? (L_re_is_ext_morph AA)) +(*------------------------------------------------------*) ⊢ + ext_carr T1 (fun11 (setoid1_of_setoid T) TT R a) ≡ L_re AA a. + +(* end support for 𝐋 as an extensional set *) + ninductive pitem (S: Type[0]) : Type[0] ≝ pz: pitem S | pe: pitem S @@ -278,13 +417,13 @@ unification hint 0 ≔ SS:Alpha; P1 ≟ refl ? (eq0 (PITEM SS)), P2 ≟ sym ? (eq0 (PITEM SS)), P3 ≟ trans ? (eq0 (PITEM SS)), - R ≟ mk_setoid (pitem S) (mk_equivalence_relation (pitem A) (eq_pitem SS) P1 P2 P3) -(*---------------------------*)⊢ + R ≟ mk_setoid (pitem S) + (mk_equivalence_relation (pitem A) (eq_pitem SS) P1 P2 P3) +(*-----------------------------------------------------------------*)⊢ carr R ≡ pitem A. unification hint 0 ≔ S:Alpha,a,b:pitem S; - R ≟ PITEM S, - L ≟ (pitem S) + R ≟ PITEM S, L ≟ (pitem S) (* -------------------------------------------- *) ⊢ eq_pitem S a b ≡ eq_rel L (eq0 R) a b. @@ -332,18 +471,15 @@ ndefinition L_pi_ext : ∀S:Alpha.∀r:pitem S.Elang S. ##| #x; @; *; ##| #x; @; #H; nchange in H with ([?] =_0 ?); ##[ napply ((.=_0 H) E); ##] napply ((.=_0 H) E^-1); -##| #e1 e2 H1 H2; (* - nchange in match (w1 ∈ 𝐋\p (?·?)) with ((∃_.?)∨?); - nchange in match (w2 ∈ 𝐋\p (?·?)) with ((∃_.?)∨?); good! *) +##| #e1 e2 H1 H2; napply (.= (#‡H2)); ncut (∀x1,x2. (w1 = (x1@x2)) = (w2 = (x1@x2)));##[ #x1 x2; @; #X; ##[ napply ((.= E^-1) X) | napply ((.= E) X) ] ##] #X; napply ((∑w1,w2. X w1 w2 / H ; (H╪_1#)╪_1#) ╪_1 #); -##| #e1 e2 H1 H2; napply (H1‡H2); (* good! *) +##| #e1 e2 H1 H2; napply (H1‡H2); ##| #e H; ncut (∀x1,x2.(w1 = (x1@x2)) = (w2 = (x1@x2)));##[ #x1 x2; @; #X; ##[ napply ((.= E^-1) X) | napply ((.= E) X) ] ##] #X; - (* nnormalize in ⊢ (???%%); good! (but a bit too hard) *) napply (∑w1,w2. X w1 w2 / H ; (H╪_1#)╪_1#); ##] nqed. @@ -454,10 +590,7 @@ nqed. (* theorem 16: 2 *) nlemma oplus_cup : ∀S:Alpha.∀e1,e2:pre S.𝐋\p (e1 ⊕ e2) = 𝐋\p e1 ∪ 𝐋\p e2. -#S r1; ncases r1; #e1 b1 r2; ncases r2; #e2 b2; (* oh my! -nwhd in ⊢ (???(??%)?); -nchange in ⊢(???%?) with (𝐋\p (e1 + e2) ∪ ϵ (b1 || b2)); -nchange in ⊢(???(??%?)?) with (𝐋\p (e1) ∪ 𝐋\p (e2)); *) +#S r1; ncases r1; #e1 b1 r2; ncases r2; #e2 b2; napply (.=_1 #╪_1 (epsilon_or ???)); napply (.=_1 (cupA…)^-1); napply (.=_1 (cupA…)╪_1#); @@ -541,6 +674,16 @@ napply (. ((defw1 : [ ] = ?)^-1 ╪_0 #)╪_1#); napply Hw2; nqed. +(* XXX This seems to be a pattern for equations *) +alias symbol "hint_decl" (instance 1) = "hint_decl_CProp2". +unification hint 0 ≔ S : Alpha, x,y: re S; + SS ≟ RE S, + TT ≟ setoid1_of_setoid SS, + T ≟ carr1 TT +(*-----------------------------------------*) ⊢ + eq_re S x y ≡ eq_rel1 T (eq1 TT) x y. +(* XXX the previous hint does not work *) + (* theorem 16: 1 → 3 *) nlemma odot_dot_aux : ∀S:Alpha.∀e1,e2: pre S. 𝐋\p (•(\fst e2)) = 𝐋\p (\fst e2) ∪ 𝐋 |\fst e2| → @@ -555,16 +698,19 @@ nlemma odot_dot_aux : ∀S:Alpha.∀e1,e2: pre S. napply (.=_1 (# ╪_1 (cupC …))); napply (.=_1 (cupA …)); napply (.=_1 (# ╪_1 (cupA …)^-1)); (* XXX slow, but not because of disamb! *) ncut (𝐋\p e2'' ∪ ϵ b2'' = 𝐋\p e2' ∪ 𝐋 |e2'|); ##[ - nchange with (𝐋\p 〈e2'',b2''〉 = 𝐋\p e2' ∪ 𝐋 |e2'|); napply (?^-1); napply (.=_1 th1^-1); //;##] #E; napply (.=_1 (# ╪_1 (E ╪_1 #))); - STOP - - nrewrite > (eta_lp ? e2); - nchange in match (𝐋\p 〈\fst e2,?〉) with (𝐋\p e2'∪ ϵ b2'); - nrewrite > (cup_dotD …); nrewrite > (epsilon_dot…); - nrewrite > (cupC ? (𝐋\p e2')…); nrewrite > (cupA…);nrewrite > (cupA…); - nrewrite < (erase_bull S e2') in ⊢ (???(??%?)); //; + napply (?^-1); + napply (.=_1 (cup_dotD …) ╪_1 #); + napply (.=_1 (# ╪_1 (epsilon_dot …)) ╪_1 #); + napply (?^-1); + napply (.=_1 # ╪_1 ((cupC …) ╪_1 #)); + napply (.=_1 (cupA …)^-1); + napply (.=_1 (cupA …)^-1 ╪_1 #); + napply (.=_1 (cupA …)); + nlapply (erase_bull S e2'); #XX; + napply (.=_1 (((# ╪_1 (┼_1 ?) )╪_1 #)╪_1 #)); ##[##2: napply XX; ##| ##skip] + //; ##| ncases e2; #e2' b2'; nchange in match (〈e1',false〉⊙?) with 〈?,?〉; nchange in match (𝐋\p ?) with (?∪?); nchange in match (𝐋\p (e1'·?)) with (?∪?); diff --git a/helm/software/matita/nlibrary/sets/setoids1.ma b/helm/software/matita/nlibrary/sets/setoids1.ma index 48b7d3fcc..068334183 100644 --- a/helm/software/matita/nlibrary/sets/setoids1.ma +++ b/helm/software/matita/nlibrary/sets/setoids1.ma @@ -35,12 +35,19 @@ ndefinition setoid1_of_setoid: setoid → setoid1. #s; @ (carr s); @ (eq0…) (refl…) (sym…) (trans…); nqed. - +alias symbol "hint_decl" = "hint_decl_CProp2". alias symbol "hint_decl" (instance 1) = "hint_decl_Type2". -unification hint 0 ≔ A,x,y +unification hint 0 ≔ A,x,y; + T ≟ carr A, + R ≟ setoid1_of_setoid A, + T1 ≟ carr1 R +(*-----------------------------------------------*) ⊢ + eq_rel T (eq0 A) x y ≡ eq_rel1 T1 (eq1 R) x y. + +unification hint 0 ≔ A; + R ≟ setoid1_of_setoid A (*-----------------------------------------------*) ⊢ - eq_rel ? (eq0 A) x y ≡ eq_rel1 ? (eq1 (setoid1_of_setoid A)) x y. -(* XXX capire come mai questa hint non funziona se porto su (setoid1_of_setoid A) *) + carr A ≡ carr1 R. interpretation "setoid1 eq" 'eq t x y = (eq_rel1 ? (eq1 t) x y). interpretation "setoid eq" 'eq t x y = (eq_rel ? (eq0 t) x y). diff --git a/helm/software/matita/nlibrary/sets/sets.ma b/helm/software/matita/nlibrary/sets/sets.ma index aae969ed2..d547fbbbf 100644 --- a/helm/software/matita/nlibrary/sets/sets.ma +++ b/helm/software/matita/nlibrary/sets/sets.ma @@ -148,7 +148,7 @@ nqed. (* hints for ∩ *) nlemma intersect_is_ext: ∀A. 𝛀^A → 𝛀^A → 𝛀^A. #S A B; @ (A ∩ B); #x y Exy; @; *; #H1 H2; @; -##[##1,2: napply (. Exy^-1‡#); nassumption; +##[##1,2: napply (. Exy^-1╪_1#); nassumption; ##|##3,4: napply (. Exy‡#); nassumption] nqed. @@ -166,11 +166,12 @@ nqed. alias symbol "hint_decl" = "hint_decl_Type1". unification hint 0 ≔ A : Type[0], B,C : Ω^A; + T ≟ powerclass_setoid A, R ≟ mk_unary_morphism1 ?? (λS. mk_unary_morphism1 ?? (λS'.S ∩ S') (prop11 ?? (intersect_is_morph A S))) (prop11 ?? (intersect_is_morph A)) (*------------------------------------------------------------------------*) ⊢ - fun11 ?? (fun11 ?? R B) C ≡ intersect A B C. + fun11 T T (fun11 T (unary_morphism1_setoid1 T T) R B) C ≡ intersect A B C. interpretation "prop21 ext" 'prop2 l r = (prop11 (ext_powerclass_setoid ?) @@ -222,11 +223,12 @@ unification hint 0 ≔ ext_carr A R ≡ union ? (ext_carr ? B) (ext_carr ? C). unification hint 0 ≔ S:Type[0], A,B:Ω^S; + T ≟ powerclass_setoid S, MM ≟ mk_unary_morphism1 ?? (λA.mk_unary_morphism1 ?? (λB.A ∪ B) (prop11 ?? (union_is_morph S A))) (prop11 ?? (union_is_morph S)) (*--------------------------------------------------------------------------*) ⊢ - fun11 ?? (fun11 ?? MM A) B ≡ A ∪ B. + fun11 T T (fun11 T (unary_morphism1_setoid1 T T) MM A) B ≡ A ∪ B. nlemma union_is_ext_morph:∀A.𝛀^A ⇒_1 𝛀^A ⇒_1 𝛀^A. #A; napply (mk_binary_morphism1 … (union_is_ext …)); @@ -271,11 +273,12 @@ unification hint 0 ≔ ext_carr A R ≡ substract ? (ext_carr ? B) (ext_carr ? C). unification hint 0 ≔ S:Type[0], A,B:Ω^S; + T ≟ powerclass_setoid S, MM ≟ mk_unary_morphism1 ?? (λA.mk_unary_morphism1 ?? (λB.A - B) (prop11 ?? (substract_is_morph S A))) (prop11 ?? (substract_is_morph S)) (*--------------------------------------------------------------------------*) ⊢ - fun11 ?? (fun11 ?? MM A) B ≡ A - B. + fun11 T T (fun11 T (unary_morphism1_setoid1 T T) MM A) B ≡ A - B. nlemma substract_is_ext_morph:∀A.𝛀^A ⇒_1 𝛀^A ⇒_1 𝛀^A. #A; napply (mk_binary_morphism1 … (substract_is_ext …)); @@ -312,10 +315,11 @@ unification hint 0 ≔ A : setoid, a:A; ext_carr A R ≡ singleton A a. unification hint 0 ≔ A:setoid, a:A; + T ≟ setoid1_of_setoid A, MM ≟ mk_unary_morphism1 ?? (λa:setoid1_of_setoid A.{(a)}) (prop11 ?? (single_is_morph A)) (*--------------------------------------------------------------------------*) ⊢ - fun11 ?? MM a ≡ {(a)}. + fun11 T (powerclass_setoid A) MM a ≡ {(a)}. nlemma single_is_ext_morph:∀A:setoid.(setoid1_of_setoid A) ⇒_1 𝛀^A. #A; @; ##[ #a; napply (single_is_ext ? a); ##] #a b E; @; #x; /3/; nqed.