equal
deleted
inserted
replaced
1192 |
1192 |
1193 section {* Functorial structure of types *} |
1193 section {* Functorial structure of types *} |
1194 |
1194 |
1195 text {* |
1195 text {* |
1196 \begin{matharray}{rcl} |
1196 \begin{matharray}{rcl} |
1197 @{command_def (HOL) "enriched_type"} & : & @{text "local_theory \<rightarrow> proof(prove)"} |
1197 @{command_def (HOL) "functor"} & : & @{text "local_theory \<rightarrow> proof(prove)"} |
1198 \end{matharray} |
1198 \end{matharray} |
1199 |
1199 |
1200 @{rail \<open> |
1200 @{rail \<open> |
1201 @@{command (HOL) enriched_type} (@{syntax name} ':')? @{syntax term} |
1201 @@{command (HOL) functor} (@{syntax name} ':')? @{syntax term} |
1202 \<close>} |
1202 \<close>} |
1203 |
1203 |
1204 \begin{description} |
1204 \begin{description} |
1205 |
1205 |
1206 \item @{command (HOL) "enriched_type"}~@{text "prefix: m"} allows to |
1206 \item @{command (HOL) "functor"}~@{text "prefix: m"} allows to |
1207 prove and register properties about the functorial structure of type |
1207 prove and register properties about the functorial structure of type |
1208 constructors. These properties then can be used by other packages |
1208 constructors. These properties then can be used by other packages |
1209 to deal with those type constructors in certain type constructions. |
1209 to deal with those type constructors in certain type constructions. |
1210 Characteristic theorems are noted in the current local theory. By |
1210 Characteristic theorems are noted in the current local theory. By |
1211 default, they are prefixed with the base name of the type |
1211 default, they are prefixed with the base name of the type |
1373 |
1373 |
1374 \item @{attribute (HOL) quot_thm} declares that a certain theorem |
1374 \item @{attribute (HOL) quot_thm} declares that a certain theorem |
1375 is a quotient extension theorem. Quotient extension theorems |
1375 is a quotient extension theorem. Quotient extension theorems |
1376 allow for quotienting inside container types. Given a polymorphic |
1376 allow for quotienting inside container types. Given a polymorphic |
1377 type that serves as a container, a map function defined for this |
1377 type that serves as a container, a map function defined for this |
1378 container using @{command (HOL) "enriched_type"} and a relation |
1378 container using @{command (HOL) "functor"} and a relation |
1379 map defined for for the container type, the quotient extension |
1379 map defined for for the container type, the quotient extension |
1380 theorem should be @{term "Quotient3 R Abs Rep \<Longrightarrow> Quotient3 |
1380 theorem should be @{term "Quotient3 R Abs Rep \<Longrightarrow> Quotient3 |
1381 (rel_map R) (map Abs) (map Rep)"}. Quotient extension theorems |
1381 (rel_map R) (map Abs) (map Rep)"}. Quotient extension theorems |
1382 are stored in a database and are used all the steps of lifting |
1382 are stored in a database and are used all the steps of lifting |
1383 theorems. |
1383 theorems. |