Quotient-Paper/Paper.thy
changeset 2231 01d08af79f01
parent 2230 fec38b7ceeb3
child 2232 f49b5dfabd59
equal deleted inserted replaced
2230:fec38b7ceeb3 2231:01d08af79f01
   222   will present a formal definition of our aggregate abstraction and
   222   will present a formal definition of our aggregate abstraction and
   223   representation functions (this definition was omitted in \cite{Homeier05}). 
   223   representation functions (this definition was omitted in \cite{Homeier05}). 
   224   They generate definitions, like the one above for @{text "\<Union>"}, 
   224   They generate definitions, like the one above for @{text "\<Union>"}, 
   225   according to the type of the raw constant and the type
   225   according to the type of the raw constant and the type
   226   of the quotient constant. This means we also have to extend the notions
   226   of the quotient constant. This means we also have to extend the notions
   227   of \emph{respectfulness} and \emph{preservation} from Homeier 
   227   of \emph{aggregate relation}, \emph{respectfulness} and \emph{preservation}
   228   \cite{Homeier05}.
   228   from Homeier \cite{Homeier05}.
   229 
   229 
   230   We will also address the criticism by Paulson \cite{Paulson06} cited at the
   230   We will also address the criticism by Paulson \cite{Paulson06} cited at the
   231   beginning of this section about having to collect theorems that are lifted from the raw
   231   beginning of this section about having to collect theorems that are lifted from the raw
   232   level to the quotient level. Our quotient package is the first one that is modular so that it
   232   level to the quotient level. Our quotient package is the first one that is modular so that it
   233   allows to lift single theorems separately. This has the advantage for the
   233   allows to lift single theorems separately. This has the advantage for the
   361   and applies @{term "map rep_fset"} composed with @{term rep_fset} to
   361   and applies @{term "map rep_fset"} composed with @{term rep_fset} to
   362   its input, obtaining a list of lists, passes the result to @{term concat}
   362   its input, obtaining a list of lists, passes the result to @{term concat}
   363   obtaining a list and applies @{term abs_fset} obtaining the composed
   363   obtaining a list and applies @{term abs_fset} obtaining the composed
   364   finite set.
   364   finite set.
   365 
   365 
   366   {\it we can compactify the term by noticing that map id\ldots id = id}
   366   For every type map function we require the property that @{term "map id = id"}.
       
   367   With this we can compactify the term, removing the identity mappings,
       
   368   obtaining a definition that is the same as the one privided by Homeier
       
   369   in the cases where the internal type does not change.
   367 
   370 
   368   {\it we should be able to prove}
   371   {\it we should be able to prove}
   369 
   372 
   370   \begin{lemma}
   373   \begin{lemma}
   371   If @{text "ABS (\<sigma>, \<tau>)"} returns some abstraction function @{text "Abs"} 
   374   If @{text "ABS (\<sigma>, \<tau>)"} returns some abstraction function @{text "Abs"} 
   579 
   582 
   580   With the above definitions of @{text "REG"} and @{text "INJ"} we can show
   583   With the above definitions of @{text "REG"} and @{text "INJ"} we can show
   581   how the proof is performed. The first step is always the application of
   584   how the proof is performed. The first step is always the application of
   582   of the following lemma:
   585   of the following lemma:
   583 
   586 
   584   @{term "[|A; A --> B; B = C; C = D|] ==> D"}
   587   @{term [display, indent=10] "[|A; A --> B; B = C; C = D|] ==> D"}
   585 
   588 
   586   With @{text A} instantiated to the original raw theorem, 
   589   With @{text A} instantiated to the original raw theorem, 
   587        @{text B} instantiated to @{text "REG(A)"},
   590        @{text B} instantiated to @{text "REG(A)"},
   588        @{text C} instantiated to @{text "INJ(REG(A))"},
   591        @{text C} instantiated to @{text "INJ(REG(A))"},
   589    and @{text D} instantiated to the statement of the lifted theorem.
   592    and @{text D} instantiated to the statement of the lifted theorem.
   615   the versions for the universal quantifier. For the existential quantifier
   618   the versions for the universal quantifier. For the existential quantifier
   616   and abstraction they are analogous with some symmetry.
   619   and abstraction they are analogous with some symmetry.
   617 
   620 
   618   First, bounded universal quantifiers can be removed on the right:
   621   First, bounded universal quantifiers can be removed on the right:
   619 
   622 
   620   @{thm [display] ball_reg_right[no_vars]}
   623   @{thm [display, indent=10] ball_reg_right[no_vars]}
   621 
   624 
   622   They can be removed anywhere if the relation is an equivalence relation:
   625   They can be removed anywhere if the relation is an equivalence relation:
   623 
   626 
   624   @{thm [display] ball_reg_eqv[no_vars]}
   627   @{thm [display, indent=10] ball_reg_eqv[no_vars]}
   625 
   628 
   626   And finally it can be removed anywhere if @{term R2} is an equivalence relation, then:
   629   And finally it can be removed anywhere if @{term R2} is an equivalence relation, then:
   627   \[
   630 
   628   @{thm (rhs) ball_reg_eqv_range[no_vars]} = @{thm (lhs) ball_reg_eqv_range[no_vars]}
   631   @{thm [display, indent=10] (concl) ball_reg_eqv_range[no_vars]}
   629   \]
   632 
   630 
   633   The last theorem is new in comparison with Homeier's package, there the
   631   The last theorem is new in comparison with Homeier's package; it allows separating
   634   injection procedure would be used to prove goals with such shape, and there
   632   regularization from injection.
   635   the equivalence assumption would be useful. We use it directly also for
       
   636   composed relations where the range type is a type for which we know an
       
   637   equivalence theorem. This allows separating regularization from injection.
   633 
   638 
   634 *}
   639 *}
   635 
   640 
   636 (*
   641 (*
   637   @{thm (rhs) bex_reg_eqv_range[no_vars]} = @{thm (lhs) bex_reg_eqv_range[no_vars]}
   642   @{thm bex_reg_eqv_range[no_vars]}
   638   @{thm [display] bex_reg_left[no_vars]}
   643   @{thm [display] bex_reg_left[no_vars]}
   639   @{thm [display] bex1_bexeq_reg[no_vars]}
   644   @{thm [display] bex1_bexeq_reg[no_vars]}
   640   @{thm [display] bex_reg_eqv[no_vars]}
   645   @{thm [display] bex_reg_eqv[no_vars]}
   641   @{thm [display] babs_reg_eqv[no_vars]}
   646   @{thm [display] babs_reg_eqv[no_vars]}
   642   @{thm [display] babs_simp[no_vars]}
   647   @{thm [display] babs_simp[no_vars]}