# HG changeset patch # User Cezary Kaliszyk # Date 1264074643 -3600 # Node ID aa960d16570fa6f01c3d4199cd1f2f62480aaee4 # Parent 95ee248b3832ce3ae09efd6ffc45c6b4cbaf836a Lifted Peter's Sigma lemma with Ex1. diff -r 95ee248b3832 -r aa960d16570f FIXME-TODO --- a/FIXME-TODO Thu Jan 21 12:03:47 2010 +0100 +++ b/FIXME-TODO Thu Jan 21 12:50:43 2010 +0100 @@ -64,4 +64,6 @@ as "rconst" That means "qconst :: qty" is not read as a term, but - as two entities. \ No newline at end of file + as two entities. + +- Add syntax for Bexeq, for example "\!!" diff -r 95ee248b3832 -r aa960d16570f Quot/Examples/SigmaEx.thy --- a/Quot/Examples/SigmaEx.thy Thu Jan 21 12:03:47 2010 +0100 +++ b/Quot/Examples/SigmaEx.thy Thu Jan 21 12:50:43 2010 +0100 @@ -188,5 +188,48 @@ apply (lifting tolift') done +lemma tolift'': +"\ fvar. + \ fobj\Respects (op = ===> list_rel (prod_rel (op =) alpha_method) ===> op =). + \ fnvk\Respects (op = ===> alpha_obj ===> op =). + \ fupd\Respects (op = ===> op = ===> alpha_obj ===> op = ===> alpha_method ===> op =). + \ fcns\Respects (op = ===> op = ===> prod_rel (op =) alpha_method ===> list_rel (prod_rel (op =) alpha_method) ===> op =). + \ fnil. + \ fpar\Respects (op = ===> op = ===> alpha_method ===> op =). + \ fsgm\Respects (op = ===> (op = ===> alpha_obj) ===> op =). + + Bexeq (alpha_obj ===> op =) (\hom_o\robj \ 'a . + Bexeq (list_rel (prod_rel (op =) alpha_method) ===> op =) (\hom_d\(char list \ rmethod) list \ 'b. + Bexeq ((prod_rel (op =) alpha_method) ===> op =) (\hom_e\char list \ rmethod \ 'c. + Bexeq (alpha_method ===> op =) (\hom_m\rmethod \ 'd. +( + (\x. hom_o (rVar x) = fvar x) \ + (\d. hom_o (rObj d) = fobj (hom_d d) d) \ + (\a l. hom_o (rInv a l) = fnvk (hom_o a) a l) \ + (\a l m. hom_o (rUpd a l m) = fupd (hom_o a) (hom_m m) a l m) \ + (\e d. hom_d (e # d) = fcns (hom_e e) (hom_d d) e d) \ + (hom_d [] = fnil) \ + (\l m. hom_e (l, m) = fpar (hom_m m) l m) \ + (\x a. hom_m (rSig x a) = fsgm (\y. hom_o ([(x, y)] \ a)) (\y. [(x, y)] \ a)) +) +))))" +sorry + +lemma liftd'': " +\!hom_o. \!hom_d. \!hom_e. \!hom_m. +( + (\x. hom_o (Var x) = fvar x) \ + (\d. hom_o (Obj d) = fobj (hom_d d) d) \ + (\a l. hom_o (Inv a l) = fnvk (hom_o a) a l) \ + (\a l m. hom_o (Upd a l m) = fupd (hom_o a) (hom_m m) a l m) \ + (\e d. hom_d (e # d) = fcns (hom_e e) (hom_d d) e d) \ + (hom_d [] = fnil) \ + (\l m. hom_e (l, m) = fpar (hom_m m) l m) \ + (\x a. hom_m (Sig x a) = fsgm (\y. hom_o ([(x, y)] \ a)) (\y. [(x, y)] \ a)) +)" +apply (lifting tolift'') +done + + end diff -r 95ee248b3832 -r aa960d16570f Unused.thy --- a/Unused.thy Thu Jan 21 12:03:47 2010 +0100 +++ b/Unused.thy Thu Jan 21 12:50:43 2010 +0100 @@ -5,6 +5,10 @@ shows "(QUOT_TRUE l \ y) \ (l = r) \ y" by(auto simp add: QUOT_TRUE_def) +syntax + "Bexeq" :: "id \ ('a \ 'a \ bool) \ ('a \ bool) \ bool" ("(3\!!_\_./ _)" [0, 0, 10] 10) +translations + "\!!x\A. P" == "Bexeq A (%x. P)" (* Atomize infrastructure *)