interpretation "empty" 'empty_r = (z ?).
notation > "'lang' S" non associative with precedence 90 for @{ Ξ©^(list $S) }.
-notation > "'Elang' S" non associative with precedence 90 for @{ π^(list $S) }.
+notation > "'Elang' S" non associative with precedence 90 for @{ π^(LIST $S) }.
(* setoid support for re *)
(*-----------------------------------------------------------------------*) β’
carr X β‘ re T.
-unification hint 0 β A:Alpha,a,b:re A;
+unification hint 0 β A:Alpha, a,b:re (carr (acarr A));
R β eq0 (RE A),
- L β re A
+ L β re (carr (acarr A))
(* -------------------------------------------- *) β’
eq_re A a b β‘ eq_rel L R a b.
+
+(* XXX This seems to be a pattern for equations in setoid(0) *)
+unification hint 0 β AA;
+ A β carr (acarr AA),
+ R β setoid1_of_setoid (RE AA)
+(*-----------------------------------------------*) β’
+ re A β‘ carr1 R.
+
+alias symbol "hint_decl" (instance 1) = "hint_decl_CProp2".
+unification hint 0 β S : Alpha, x,y: re (carr (acarr S));
+ SS β RE S,
+ TT β setoid1_of_setoid SS,
+ T β carr1 TT
+(*-----------------------------------------*) β’
+ eq_re S x y β‘ eq_rel1 T (eq1 TT) x y.
+(* contructors are morphisms *)
nlemma c_is_morph : βA:Alpha.(re A) β_0 (re A) β_0 (re A).
-#A; napply (mk_binary_morphism β¦ (Ξ»s1,s2:re A. s1 Β· s2));
-#a; nelim a;
-##[##1,2: #a' b b'; ncases a'; nnormalize; /2/ by conj;
-##|#x a' b b'; ncases a'; /2/ by conj;
-##|##4,5: #r1 r2 IH1 IH2 a'; ncases a'; nnormalize; /2/ by conj;
-##|#r IH a'; ncases a'; nnormalize; /2/ by conj; ##]
-nqed.
+#A; napply (mk_binary_morphism β¦ (Ξ»s1,s2:re A. s1 Β· s2)); #a; nelim a; /2/ by conj; nqed.
(* XXX This is the good format for hints about morphisms, fix the others *)
alias symbol "hint_decl" (instance 1) = "hint_decl_Type0".
-unification hint 0 β S:Alpha, A,B:re S;
- MM β mk_unary_morphism ??
- (Ξ»A:re S.mk_unary_morphism ?? (Ξ»B.A Β· B) (prop1 ?? (c_is_morph S A)))
- (prop1 ?? (c_is_morph S)),
+unification hint 0 β S:Alpha, A,B:re (carr (acarr S));
+ SS β carr (acarr S),
+ MM β mk_unary_morphism ?? (Ξ»A.
+ mk_unary_morphism ??
+ (Ξ»B.A Β· B) (prop1 ?? (fun1 ?? (c_is_morph S) A)))
+ (prop1 ?? (c_is_morph S)),
T β RE S
(*--------------------------------------------------------------------------*) β’
- fun1 T T (fun1 T (unary_morph_setoid T T) MM A) B β‘ A Β· B.
+ fun1 T T (fun1 T (unary_morph_setoid T T) MM A) B β‘ c SS A B.
nlemma o_is_morph : βA:Alpha.(re A) β_0 (re A) β_0 (re A).
-#A; napply (mk_binary_morphism β¦ (Ξ»s1,s2:re A. s1 + s2));
-#a; nelim a;
-##[##1,2: #a' b b'; ncases a'; nnormalize; /2/ by conj;
-##|#x a' b b'; ncases a'; /2/ by conj;
-##|##4,5: #r1 r2 IH1 IH2 a'; ncases a'; nnormalize; /2/ by conj;
-##|#r IH a'; ncases a'; nnormalize; /2/ by conj; ##]
-nqed.
+#A; napply (mk_binary_morphism β¦ (Ξ»s1,s2:re A. s1 + s2)); #a; nelim a; /2/ by conj; nqed.
+
+unification hint 0 β S:Alpha, A,B:re (carr (acarr S));
+ SS β carr (acarr S),
+ MM β mk_unary_morphism ?? (Ξ»A.
+ mk_unary_morphism ??
+ (Ξ»B.A + B) (prop1 ?? (fun1 ?? (o_is_morph S) A)))
+ (prop1 ?? (o_is_morph S)),
+ T β RE S
+(*--------------------------------------------------------------------------*) β’
+ fun1 T T (fun1 T (unary_morph_setoid T T) MM A) B β‘ o SS A B.
-unification hint 0 β S:Alpha, A,B:re S;
- MM β mk_unary_morphism ??
- (Ξ»A:re S.mk_unary_morphism ?? (Ξ»B.A + B) (prop1 ?? (o_is_morph S A)))
- (prop1 ?? (o_is_morph S)),
+nlemma k_is_morph : βA:Alpha.(re A) β_0 (re A).
+#A; @(Ξ»s1:re A. s1^* ); #a; nelim a; /2/ by conj; nqed.
+
+unification hint 0 β S:Alpha, A:re (carr (acarr S));
+ SS β carr (acarr S),
+ MM β mk_unary_morphism ?? (Ξ»B.B^* ) (prop1 ?? (k_is_morph S)),
T β RE S
(*--------------------------------------------------------------------------*) β’
- fun1 T T (fun1 T (unary_morph_setoid T T) MM A) B β‘ A + B.
+ fun1 T T MM A β‘ k SS A.
+
+nlemma s_is_morph : βA:Alpha.A β_0 (re A).
+#A; @(Ξ»s1:A. s ? s1 ); #x y E; //; nqed.
+
+unification hint 0 β S:Alpha, a: carr (acarr S);
+ SS β carr (acarr S),
+ MM β mk_unary_morphism ?? (Ξ»b.s ? b ) (prop1 ?? (s_is_morph S)),
+ T β RE S, T1 β acarr S
+(*--------------------------------------------------------------------------*) β’
+ fun1 T1 T MM a β‘ s SS a.
(* end setoids support for re *)
nqed.
alias symbol "hint_decl" = "hint_decl_Type1".
-unification hint 0 β A : setoid, B,C : Elang A;
+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).
+ BB β ext_carr AA B,
+ CC β ext_carr AA C,
+ R β mk_ext_powerclass AA
+ (cat A (ext_carr AA B) (ext_carr AA C))
+ (ext_prop AA (cat_is_ext A B C))
+(*----------------------------------------------------------*) β’
+ ext_carr AA R β‘ cat A BB CC.
-unification hint 0 β S:setoid, A,B:lang S;
- T β powerclass_setoid (list S),
+unification hint 0 β S:setoid, A,B:lang (carr S);
+ T β powerclass_setoid (list (carr S)),
MM β mk_unary_morphism1 T (unary_morphism1_setoid1 T T)
- (Ξ»A:lang S.
+ (Ξ»A:lang (carr S).
mk_unary_morphism1 T T
- (Ξ»B:lang S.cat S A B) (prop11 T T (cat_is_morph S A)))
+ (Ξ»B:lang (carr S).cat S A B)
+ (prop11 T T (fun11 ?? (cat_is_morph S) A)))
(prop11 T (unary_morphism1_setoid1 T T) (cat_is_morph S))
(*--------------------------------------------------------------------------*) β’
fun11 T T (fun11 T (unary_morphism1_setoid1 T T) MM A) B β‘ cat S A B.
unification hint 1 β AA : setoid, B,C : Elang AA;
AAS β LIST AA,
- T β ext_powerclass_setoid (list AA),
- R β mk_unary_morphism1 T (unary_morphism1_setoid1 T T)
- (Ξ»S:Elang AA.
- mk_unary_morphism1 T T
- (Ξ»S':Elang AA.
- mk_ext_powerclass (list AA) (cat AA (ext_carr ? S) (ext_carr ? S'))
- (ext_prop (list AA) (cat_is_ext AA S S')))
- (prop11 T T (cat_is_ext_morph AA S)))
- (prop11 T (unary_morphism1_setoid1 T T) (cat_is_ext_morph AA)),
+ T β ext_powerclass_setoid AAS,
+ R β mk_unary_morphism1 T (unary_morphism1_setoid1 T T) (Ξ»X:Elang AA.
+ mk_unary_morphism1 T T (Ξ»Y:Elang AA.
+ mk_ext_powerclass AAS
+ (cat AA (ext_carr ? X) (ext_carr ? Y))
+ (ext_prop AAS (cat_is_ext AA X Y)))
+ (prop11 T T (fun11 ?? (cat_is_ext_morph AA) X)))
+ (prop11 T (unary_morphism1_setoid1 T T) (cat_is_ext_morph AA)),
BB β ext_carr ? B,
CC β ext_carr ? C
(*------------------------------------------------------*) β’
Ξ»S.Ξ»l.{ w β list S | βlw.flatten ? lw = w β§ conjunct ? lw l}.
interpretation "star lang" 'pk l = (star ? l).
+(* hints for star *)
+nlemma star_is_morph : βA:setoid. (lang A) β_1 (lang A).
+#X; @(Ξ»A:lang X.A^* ); #a1 a2 E; @; #x; *; #wl; *; #defx Px; @wl; @; //;
+nelim wl in Px; //; #s tl IH; *; #a1s a1tl; /4/; nqed.
+
+nlemma star_is_ext: βA:setoid. (Elang A) β (Elang A).
+ #S A; @ ((ext_carr β¦ A) ^* ); #w1 w2 E; @; *; #wl; *; #defw1 Pwl;
+ @wl; @; //; napply (.=_0 defw1); /2/; nqed.
+
+alias symbol "hint_decl" = "hint_decl_Type1".
+unification hint 0 β A : setoid, B : Elang A;
+ AA β LIST A,
+ BB β ext_carr AA B,
+ R β mk_ext_powerclass ?
+ ((ext_carr ? B)^* ) (ext_prop ? (star_is_ext ? B))
+(*--------------------------------------------------------------------*) β’
+ ext_carr AA R β‘ star A BB.
+
+unification hint 0 β S:setoid, A:lang (carr S);
+ T β powerclass_setoid (list (carr S)),
+ MM β mk_unary_morphism1 T T
+ (Ξ»B:lang (carr S).star S B) (prop11 T T (star_is_morph S))
+(*--------------------------------------------------------------------------*) β’
+ fun11 T T MM A β‘ star S A.
+
+nlemma star_is_ext_morph:βA:setoid.(Elang A) β_1 (Elang A).
+#A; @(star_is_ext β¦);
+#x1 x2 Ex; napply (prop11 β¦ (star_is_morph A)); nassumption.
+nqed.
+
+unification hint 1 β AA : setoid, B : Elang AA;
+ AAS β LIST AA,
+ T β ext_powerclass_setoid AAS,
+ R β mk_unary_morphism1 T T
+ (Ξ»S:Elang AA.
+ mk_ext_powerclass AAS (star AA (ext_carr ? S))
+ (ext_prop AAS (star_is_ext AA S)))
+ (prop11 T T (star_is_ext_morph AA)),
+ BB β ext_carr ? B
+(*------------------------------------------------------*) β’
+ ext_carr AAS (fun11 T T R B) β‘ star AA BB.
+
+(* end hints for star *)
+
notation > "π term 70 E" non associative with precedence 75 for @{L_re ? $E}.
nlet rec L_re (S : Alpha) (r : re S) on r : lang S β
match r with
##| #e H; @; *; #l; *; #defw1 Pl; @l; @; //; napply (.=_1 defw1); /2/; ##]
nqed.
-unification hint 0 β S : Alpha,e : re S;
- SS β LIST S,
+unification hint 0 β S : Alpha,e : re (carr (acarr S));
+ SS β LIST (acarr S),
X β mk_ext_powerclass SS (π e) (ext_prop SS (L_re_is_ext S e))
(*-----------------------------------------------------------------*)β’
ext_carr SS X β‘ L_re S e.
@; ##[##1,3: nassumption] /2/; ##]
nqed.
-unification hint 0 β A:Alpha, a:re A;
+unification hint 0 β A:Alpha, a:re (carr (acarr A));
T β setoid1_of_setoid (RE A),
- T1 β LIST A,
- T2 β powerclass_setoid T1,
+ T2 β powerclass_setoid (list (carr (acarr A))),
MM β mk_unary_morphism1 ??
- (Ξ»a:setoid1_of_setoid (RE A).π a) (prop11 ?? (L_re_is_morph A))
+ (Ξ»a:carr1 (setoid1_of_setoid (RE A)).π a) (prop11 ?? (L_re_is_morph A))
(*--------------------------------------------------------------------------*) β’
- fun11 T T2 MM a β‘ π a.
+ fun11 T T2 MM a β‘ L_re 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;
##| napply (. (# βͺ_1 ?)); ##[##3: napply H |##2: ##skip ] napply (EL^-1)]
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))
+unification hint 1 β AA : Alpha, a: re (carr (acarr AA));
+ T β RE AA, T1 β LIST (acarr AA), T2 β setoid1_of_setoid T,
+ TT β ext_powerclass_setoid T1,
+ R β mk_unary_morphism1 T2 TT
+ (Ξ»a:carr1 (setoid1_of_setoid T).
+ mk_ext_powerclass T1 (π a) (ext_prop T1 (L_re_is_ext AA a)))
+ (prop11 T2 TT (L_re_is_ext_morph AA))
(*------------------------------------------------------*) β’
ext_carr T1 (fun11 (setoid1_of_setoid T) TT R a) β‘ L_re AA a.
P1 β refl ? (eq0 (PITEM SS)),
P2 β sym ? (eq0 (PITEM SS)),
P3 β trans ? (eq0 (PITEM SS)),
- R β mk_setoid (pitem S)
+ R β mk_setoid (pitem (carr 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)
+unification hint 0 β S:Alpha,a,b:pitem (carr (acarr S));
+ R β PITEM S, L β pitem (carr (acarr S))
(* -------------------------------------------- *) β’
eq_pitem S a b β‘ eq_rel L (eq0 R) a b.
##]
nqed.
-unification hint 0 β S : Alpha,e : pitem S;
- SS β (list S),
- X β (mk_ext_powerclass SS (π\p e) (ext_prop SS (L_pi_ext S e)))
+unification hint 0 β S : Alpha,e : pitem (carr (acarr S));
+ SS β LIST (acarr S),
+ X β mk_ext_powerclass SS (π\p e) (ext_prop SS (L_pi_ext S e))
(*-----------------------------------------------------------------*)β’
ext_carr SS X β‘ π\p e.
notation < "Ο΅ b" non associative with precedence 90 for @{'app_epsilon $b}.
interpretation "epsilon lang" 'app_epsilon b = (epsilon ? b).
+(* hints for epsilon *)
+nlemma epsilon_is_morph : βA:Alpha. (setoid1_of_setoid bool) β_1 (lang A).
+#X; @; ##[#b; napply(Ο΅ b)] #a1 a2; ncases a1; ncases a2; //; *; nqed.
+
+nlemma epsilon_is_ext: βA:Alpha. (setoid1_of_setoid bool) β (Elang A).
+ #S b; @(Ο΅ b); #w1 w2 E; ncases b; @; ##[##3,4:*]
+nchange in match (w1 β Ο΅ true) with ([] =_0 w1);
+nchange in match (w2 β Ο΅ true) with ([] =_0 w2); #H; napply (.= H); /2/;
+nqed.
+
+alias symbol "hint_decl" = "hint_decl_Type1".
+unification hint 0 β A : Alpha, B : bool;
+ AA β LIST (acarr A),
+ R β mk_ext_powerclass ?
+ (Ο΅ B) (ext_prop ? (epsilon_is_ext ? B))
+(*--------------------------------------------------------------------*) β’
+ ext_carr AA R β‘ epsilon A B.
+
+unification hint 0 β S:Alpha, A:bool;
+ B β setoid1_of_setoid BOOL,
+ T β powerclass_setoid (list (carr (acarr S))),
+ MM β mk_unary_morphism1 B T
+ (Ξ»B.Ο΅ B) (prop11 B T (epsilon_is_morph S))
+(*--------------------------------------------------------------------------*) β’
+ fun11 B T MM A β‘ epsilon S A.
+
+nlemma epsilon_is_ext_morph:βA:Alpha. (setoid1_of_setoid bool) β_1 (Elang A).
+#A; @(epsilon_is_ext β¦);
+#x1 x2 Ex; napply (prop11 β¦ (epsilon_is_morph A)); nassumption.
+nqed.
+
+unification hint 1 β AA : Alpha, B : bool;
+ AAS β LIST (acarr AA),
+ BB β setoid1_of_setoid BOOL,
+ T β ext_powerclass_setoid AAS,
+ R β mk_unary_morphism1 BB T
+ (Ξ»S.
+ mk_ext_powerclass AAS (epsilon AA S)
+ (ext_prop AAS (epsilon_is_ext AA S)))
+ (prop11 BB T (epsilon_is_ext_morph AA))
+(*------------------------------------------------------*) β’
+ ext_carr AAS (fun11 BB T R B) β‘ epsilon AA B.
+
+(* end hints for epsilon *)
+
ndefinition L_pr β Ξ»S : Alpha.Ξ»p:pre S. π\p\ (\fst p) βͺ Ο΅ (\snd p).
interpretation "L_pr" 'L_pi E = (L_pr ? E).
nlemma subW : βS.βa,b:Ξ©^S.βw.w β (a - b) β w β a.
#S a b w; nnormalize; *; //; nqed.
+alias symbol "eclose" (instance 3) = "eclose".
nlemma erase_bull : βS:Alpha.βa:pitem S. |\fst (β’a)| = |a|.
#S a; nelim a; // by {};
##[ #e1 e2 IH1 IH2;
- napply (?^-1);
+ napply (?^-1);
napply (.=_0 (IH1^-1)βͺ_0 (IH2^-1));
nchange in match (β’(e1 Β· ?)) with (?β?);
ncases (β’e1); #e3 b; ncases b; ##[ nnormalize; ncases (β’e2); /3/ by refl, conj]
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.
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]
+ napply (.=_1 (((# βͺ_1 (βΌ_1 (erase_bull S e2')) )βͺ_1 #)βͺ_1 #));
//;
##| ncases e2; #e2' b2'; nchange in match (π\p ?) with (?βͺ?βͺ?);
napply (.=_1 (cupAβ¦));
//]
nqed.
-STOP
+
nlemma sub_dot_star :
- βS.βX:word S β Prop.βb. (X - Ο΅ b) Β· X^* βͺ {[]} = X^*.
-#S X b; napply extP; #w; @;
-##[ *; ##[##2: nnormalize; #defw; nrewrite < defw; @[]; @; //]
+ βS:Alpha.βX:Elang S.βb. (X - Ο΅ b) Β· (ext_carr β¦ X)^* βͺ {[]} = (ext_carr β¦ X)^*.
+#S X b; napply ext_set; #w; @;
+##[ *; ##[##2: #defw; @[]; @; //]
*; #w1; *; #w2; *; *; #defw sube; *; #lw; *; #flx cj;
- @ (w1 :: lw); nrewrite < defw; nrewrite < flx; @; //;
+ @ (w1 :: lw); @; ##[ napply (.=_0 # βͺ_0 flx); napply (?^-1); //]
@; //; napply (subW β¦ sube);
-##| *; #wl; *; #defw Pwl; nrewrite < defw; nelim wl in Pwl; ##[ #_; @2; //]
- #w' wl' IH; *; #Pw' IHp; nlapply (IH IHp); *;
- ##[ *; #w1; *; #w2; *; *; #defwl' H1 H2;
- @; ncases b in H1; #H1;
- ##[##2: nrewrite > (sub0β¦); @w'; @(w1@w2);
- nrewrite > (associative_append ? w' w1 w2);
- nrewrite > defwl'; @; ##[@;//] @(wl'); @; //;
- ##| ncases w' in Pw';
- ##[ #ne; @w1; @w2; nrewrite > defwl'; @; //; @; //;
- ##| #x xs Px; @(x::xs); @(w1@w2);
- nrewrite > (defwl'); @; ##[@; //; @; //; @; nnormalize; #; ndestruct]
- @wl'; @; //; ##] ##]
- ##| #wlnil; nchange in match (flatten ? (w'::wl')) with (w' @ flatten ? wl');
- nrewrite < (wlnil); nrewrite > (append_nilβ¦); ncases b;
- ##[ ncases w' in Pw'; /2/; #x xs Pxs; @; @(x::xs); @([]);
- nrewrite > (append_nilβ¦); @; ##[ @; //;@; //; nnormalize; @; #; ndestruct]
- @[]; @; //;
- ##| @; @w'; @[]; nrewrite > (append_nilβ¦); @; ##[##2: @[]; @; //]
- @; //; @; //; @; *;##]##]##]
+##| *; #wl; *; #defw Pwl; napply (. (defw^-1 βͺ_1 #));
+ nelim wl in Pwl; /2/;
+ #s tl IH; *; #Xs Ptl; ncases s in Xs; ##[ #; napply IH; //] #x xs Xxxs;
+ @; @(x :: xs); @(flatten ? tl); @;
+ ##[ @; ##[ napply #] @; ##[nassumption] ncases b; *; ##]
+ nelim tl in Ptl; ##[ #; @[]; /2/] #w ws IH; *; #Xw Pws; @(w :: ws); @; ##[ napply #]
+ @; //;##]
nqed.
(* theorem 16: 1 *)
alias symbol "in_pl" (instance 23) = "in_pl".
alias symbol "in_pl" (instance 5) = "in_pl".
alias symbol "eclose" (instance 21) = "eclose".
-ntheorem bull_cup : βS:Alpha. βe:pitem S. π\p (β’e) = π\p e βͺ π .|e|.
+ntheorem bull_cup : βS:Alpha. βe:pitem S. π\p (β’e) = π\p e βͺ π |e|.
#S e; nelim e; //;
- ##[ #a; napply extP; #w; nnormalize; @; *; /3/ by or_introl, or_intror;
- ##| #a; napply extP; #w; nnormalize; @; *; /3/ by or_introl; *;
+ ##[ #a; napply ext_set; #w; @; *; /3/ by or_introl, or_intror;
+ ##| #a; napply ext_set; #w; @; *; /3/ by or_introl; *;
##| #e1 e2 IH1 IH2;
- nchange in β’ (??(??(%))?) with (β’e1 β β©e2,falseβͺ);
- nrewrite > (odot_dot_aux S (β’e1) β©e2,falseβͺ IH2);
- nrewrite > (IH1 β¦); nrewrite > (cup_dotD β¦);
- nrewrite > (cupA β¦); nrewrite > (cupC ?? (π\p ?) β¦);
- nchange in match (π\p β©?,?βͺ) with (π\p e2 βͺ {}); nrewrite > (cup0 β¦);
- nrewrite < (erase_dot β¦); nrewrite < (cupA β¦); //;
+ nchange in match (β’(e1Β·e2)) with (β’e1 β β©e2,falseβͺ);
+ napply (.=_1 (odot_dot_aux ?? β©e2,falseβͺ IH2));
+ napply (.=_1 (IH1 βͺ_1 #) βͺ_1 #);
+ napply (.=_1 (cup_dotD β¦) βͺ_1 #);
+ napply (.=_1 (cupA β¦));
+ napply (.=_1 # βͺ_1 ((erase_dot ???)^-1 βͺ_1 (cup0 ??)));
+ napply (.=_1 # βͺ_1 (cupCβ¦));
+ napply (.=_1 (cupA β¦)^-1); //;
##| #e1 e2 IH1 IH2;
- nchange in match (β’(?+?)) with (β’e1 β β’e2); nrewrite > (oplus_cup β¦);
- nrewrite > (IH1 β¦); nrewrite > (IH2 β¦); nrewrite > (cupA β¦);
- nrewrite > (cupC ? (π\p e2)β¦);nrewrite < (cupA ??? (π\p e2)β¦);
- nrewrite > (cupC ?? (π\p e2)β¦); nrewrite < (cupA β¦);
- nrewrite < (erase_plus β¦); //.
+ nchange in match (β’(?+?)) with (β’e1 β β’e2);
+ napply (.=_1 (oplus_cup β¦));
+ napply (.=_1 IH1 βͺ_1 IH2);
+ napply (.=_1 (cupA β¦));
+ napply (.=_1 # βͺ_1 (# βͺ_1 (cupCβ¦)));
+ napply (.=_1 # βͺ_1 (cupA ????)^-1);
+ napply (.=_1 # βͺ_1 (cupCβ¦));
+ napply (.=_1 (cupA ????)^-1);
+ napply (.=_1 # βͺ_1 (erase_plus ???)^-1); //;
##| #e; nletin e' β (\fst (β’e)); nletin b' β (\snd (β’e)); #IH;
- nchange in match (π\p ?) with (π\p β©e'^*,trueβͺ);
+ nchange in match (π\p ?) with (π\p β©e'^*,trueβͺ);
nchange in match (π\p ?) with (π\p (e'^* ) βͺ {[ ]});
- nchange in β’ (??(??%?)?) with (π\p e' Β· π .|e'|^* );
- nrewrite > (erase_bullβ¦e);
- nrewrite > (erase_star β¦);
- nrewrite > (?: π\p e' = π\p e βͺ (π .|e| - Ο΅ b')); ##[##2:
- nchange in IH : (??%?) with (π\p e' βͺ Ο΅ b'); ncases b' in IH;
- ##[ #IH; nrewrite > (cup_subβ¦); //; nrewrite < IH;
- nrewrite < (cup_subβ¦); //; nrewrite > (subKβ¦); nrewrite > (cup0β¦);//;
- ##| nrewrite > (sub0 β¦); #IH; nrewrite < IH; nrewrite > (cup0 β¦);//; ##]##]
- nrewrite > (cup_dotDβ¦); nrewrite > (cupAβ¦);
- nrewrite > (?: ((?Β·?)βͺ{[]} = π .|e^*|)); //;
- nchange in match (π .|e^*|) with ((π. |e|)^* ); napply sub_dot_star;##]
- nqed.
+ (* nwhd in match (π\p e'^* ); (* XXX bug uncertain *) *)
+ nchange in β’ (???(??%?)?) with (π\p e' Β· ?);
+ napply (.=_1 (# βͺ_1 (βΌ_1 (βΌ_0 (erase_bull S e)))) βͺ_1 #);
+ napply (.=_1 (# βͺ_1 (erase_star β¦)) βͺ_1 #);
+ ncut ( π\p e' = π\p e βͺ (π |e| - Ο΅ b')); ##[
+ nchange in IH : (???%?) with (π\p e' βͺ Ο΅ b'); ncases b' in IH;
+ ##[ #IH; napply (?^-1); napply (.=_1 (cup_sub β¦ (not_epsilon_lpβ¦)));
+ napply (.=_1 (IH^-1 βͺ_1 #));
+ alias symbol "invert" = "setoid1 symmetry".
+ (* XXX too slow if ambiguous, since it tries with a ? (takes 12s) then
+ tries with sym0 and fails immediately, then with sym1 that is OK *)
+ napply (.=_1 (cup_sub β¦(not_epsilon_lp β¦))^-1);
+ napply (.=_1 # βͺ_1 (subKβ¦)); napply (.=_1 (cup0β¦)); //;
+ ##| #IH; napply (?^-1); napply (.=_1 # βͺ_1 (sub0 β¦));
+ napply (.=_1 IH^-1); napply (.=_1 (cup0 β¦)); //; ##]##] #EE;
+ napply (.=_1 (EE βͺ_1 #) βͺ_1 #);
+ napply (.=_1 (cup_dotDβ¦) βͺ_1 #);
+ napply (.=_1 (cupAβ¦));
+ napply (.=_1 # βͺ_1 (sub_dot_starβ¦)); //; ##]
+nqed.
+
+STOP
(* theorem 16: 3 *)
nlemma odot_dot: