1234 \<alpha>\<^isub>n"}. |
1234 \<alpha>\<^isub>n"}. |
1235 |
1235 |
1236 \end{description} |
1236 \end{description} |
1237 *} |
1237 *} |
1238 |
1238 |
|
1239 section {* Quotient types *} |
|
1240 |
|
1241 text {* |
|
1242 The quotient package defines a new quotient type given a raw type |
|
1243 and a partial equivalence relation. |
|
1244 It also includes automation for transporting definitions and theorems. |
|
1245 It can automatically produce definitions and theorems on the quotient type, |
|
1246 given the corresponding constants and facts on the raw type. |
|
1247 |
|
1248 \begin{matharray}{rcl} |
|
1249 @{command_def (HOL) "quotient_type"} & : & @{text "local_theory \<rightarrow> proof(prove)"}\\ |
|
1250 @{command_def (HOL) "quotient_definition"} & : & @{text "local_theory \<rightarrow> proof(prove)"}\\ |
|
1251 @{command_def (HOL) "print_quotmaps"} & : & @{text "context \<rightarrow>"}\\ |
|
1252 @{command_def (HOL) "print_quotients"} & : & @{text "context \<rightarrow>"}\\ |
|
1253 @{command_def (HOL) "print_quotconsts"} & : & @{text "context \<rightarrow>"}\\ |
|
1254 \end{matharray} |
|
1255 |
|
1256 @{rail " |
|
1257 @@{command (HOL) quotient_type} (spec + @'and'); |
|
1258 |
|
1259 spec: @{syntax typespec} @{syntax mixfix}? '=' \\ |
|
1260 @{syntax type} '/' ('partial' ':')? @{syntax term}; |
|
1261 "} |
|
1262 |
|
1263 @{rail " |
|
1264 @@{command (HOL) quotient_definition} constdecl? @{syntax thmdecl}? \\ |
|
1265 @{syntax term} 'is' @{syntax term}; |
|
1266 |
|
1267 constdecl: @{syntax name} ('::' @{syntax type})? @{syntax mixfix}? |
|
1268 "} |
|
1269 |
|
1270 \begin{description} |
|
1271 |
|
1272 \item @{command (HOL) "quotient_type"} defines quotient types. |
|
1273 |
|
1274 \item @{command (HOL) "quotient_definition"} defines a constant on the quotient type. |
|
1275 |
|
1276 \item @{command (HOL) "print_quotmaps"} prints quotient map functions. |
|
1277 |
|
1278 \item @{command (HOL) "print_quotients"} prints quotients. |
|
1279 |
|
1280 \item @{command (HOL) "print_quotconsts"} prints quotient constants. |
|
1281 |
|
1282 \end{description} |
|
1283 |
|
1284 *} |
1239 |
1285 |
1240 section {* Arithmetic proof support *} |
1286 section {* Arithmetic proof support *} |
1241 |
1287 |
1242 text {* |
1288 text {* |
1243 \begin{matharray}{rcl} |
1289 \begin{matharray}{rcl} |