# HG changeset patch # User Cezary Kaliszyk # Date 1275715582 -7200 # Node ID b0b2198040d731fb6f4769640f2d7aef44b3863b # Parent ea7c3f21d6df3be9524a92076fedf871d15bc4c2 qpaper diff -r ea7c3f21d6df -r b0b2198040d7 Quotient-Paper/Paper.thy --- a/Quotient-Paper/Paper.thy Wed Jun 02 14:24:16 2010 +0200 +++ b/Quotient-Paper/Paper.thy Sat Jun 05 07:26:22 2010 +0200 @@ -1,3 +1,4 @@ +(* How to change the notation for \ \ meta-level implications? *) (*<*) theory Paper @@ -6,12 +7,18 @@ "../Nominal/FSet" begin +print_syntax + notation (latex output) rel_conj ("_ OOO _" [53, 53] 52) and - fun_map ("_ ---> _" [51, 51] 50) + "op -->" (infix "\" 100) +and + "==>" (infix "\" 100) and - fun_rel ("_ ===> _" [51, 51] 50) + fun_map (infix "\" 51) +and + fun_rel (infix "\" 51) and list_eq (infix "\" 50) (* Not sure if we want this notation...? *) @@ -208,8 +215,8 @@ \item @{text "REP(\\<^isub>1, \\<^isub>2)"} = @{text "id"} \item @{text "ABS(\, \)"} = @{text "id"} \item @{text "REP(\, \)"} = @{text "id"} - \item @{text "ABS(\\<^isub>1\\\<^isub>2,\\<^isub>1\\\<^isub>2)"} = @{text "REP(\\<^isub>1,\\<^isub>1) ---> ABS(\\<^isub>2,\\<^isub>2)"} - \item @{text "REP(\\<^isub>1\\\<^isub>2,\\<^isub>1\\\<^isub>2)"} = @{text "ABS(\\<^isub>1,\\<^isub>1) ---> REP(\\<^isub>2,\\<^isub>2)"} + \item @{text "ABS(\\<^isub>1\\\<^isub>2,\\<^isub>1\\\<^isub>2)"} = @{text "REP(\\<^isub>1,\\<^isub>1) \ ABS(\\<^isub>2,\\<^isub>2)"} + \item @{text "REP(\\<^isub>1\\\<^isub>2,\\<^isub>1\\\<^isub>2)"} = @{text "ABS(\\<^isub>1,\\<^isub>1) \ REP(\\<^isub>2,\\<^isub>2)"} \item @{text "ABS((\\<^isub>1,\,\\<^isub>n))\, (\\<^isub>1,\,\\<^isub>n))\)"} = @{text "(map \) (ABS(\\<^isub>1,\\<^isub>1)) \ (ABS(\\<^isub>n,\\<^isub>n))"} \item @{text "REP((\\<^isub>1,\,\\<^isub>n))\, (\\<^isub>1,\,\\<^isub>n))\)"} = @{text "(map \) (REP(\\<^isub>1,\\<^isub>1)) \ (REP(\\<^isub>n,\\<^isub>n))"} \item @{text "ABS((\\<^isub>1,\,\\<^isub>n))\\<^isub>1, (\\<^isub>1,\,\\<^isub>m))\\<^isub>2)"} = @{text "Abs_\\<^isub>2 \ (map \\<^isub>1) (ABS(\\<^isub>1,\\<^isub>1) \ (ABS(\\<^isub>p,\\<^isub>p)"} provided @{text "\ \\<^isub>2 = (\\<^isub>1\\\<^isub>p)\\<^isub>1 \ \s. s(\s\\<^isub>1)=\s\\<^isub>1 \ s(\s\\<^isub>2)=\s\\<^isub>2"} @@ -217,8 +224,9 @@ \end{itemize} Apart from the last 2 points the definition is same as the one implemented in - in Homeier's HOL package, below is the definition of @{term fconcat} - that shows the last points: + in Homeier's HOL package. Adding composition in last two cases is necessary + for compositional quotients. We ilustrate the different behaviour of the + definition by showing the derived definition of @{term fconcat}: @{thm fconcat_def[no_vars]} @@ -247,7 +255,7 @@ @{thm [display] append_rsp[no_vars]} \noindent - Which after unfolding @{term "op ===>"} is equivalent to: + Which after unfolding @{term "op \"} is equivalent to: @{thm [display] append_rsp_unfolded[no_vars]} @@ -363,7 +371,7 @@ We first define the statement of the regularized theorem based on the original theorem and the goal theorem. Then we define the statement of the injected theorem, based on the regularized - theorem and the goal. We then show the 3 proofs as all three + theorem and the goal. We then show the 3 proofs, as all three can be performed independently from each other. *} @@ -418,10 +426,46 @@ *} -subsection {* Proof of Regularization *} +subsection {* Proof procedure *} + +(* In the below the type-guiding 'QuotTrue' assumption is removed; since we + present in a paper a version with typed-variables it is not necessary *) text {* - Example of non-regularizable theorem ($0 = 1$). + + With the above definitions of @{text "REG"} and @{text "INJ"} we can show + how the proof is performed. The first step is always the application of + of the following lemma: + + @{term "[|A; A --> B; B = C; C = D|] ==> D"} + + With @{text A} instantiated to the original raw theorem, + @{text B} instantiated to @{text "REG(A)"}, + @{text C} instantiated to @{text "INJ(REG(A))"}, + and @{text D} instantiated to the statement of the lifted theorem. + The first assumption can be immediately discharged using the original + theorem and the three left subgoals are exactly the subgoals of regularization, + injection and cleaning. The three can be proved independently by the + framework and in case there are non-solved subgoals they can be left + to the user. + + The injection and cleaning subgoals are always solved if the appropriate + respectfulness and preservation theorems are given. It is not the case + with regularization; sometimes a theorem given by the user does not + imply a regularized version and a stronger one needs to be proved. This + is outside of the scope of the quotient package, so the user is then left + with such obligations. As an example lets see the simplest possible + non-liftable theorem for integers: When we want to prove @{term "0 \ 1"} + on integers the fact that @{term "\ (0, 0) = (1, 0)"} is not enough. It + only shows that particular items in the equivalence classes are not equal, + a more general statement saying that the classes are not equal is necessary. +*} + +subsection {* Proving Regularization *} + +text {* + Isabelle provides + Separtion of regularization from injection thanks to the following 2 lemmas: