1187 @@{command case} (caseref | '(' caseref (('_' | @{syntax name}) +) ')') |
1187 @@{command case} (caseref | '(' caseref (('_' | @{syntax name}) +) ')') |
1188 ; |
1188 ; |
1189 caseref: nameref attributes? |
1189 caseref: nameref attributes? |
1190 ; |
1190 ; |
1191 |
1191 |
1192 @@{attribute case_names} (@{syntax name} +) |
1192 @@{attribute case_names} ((@{syntax name} ( '[' (('_' | @{syntax name}) +) ']' ) ? ) +) |
1193 ; |
1193 ; |
1194 @@{attribute case_conclusion} @{syntax name} (@{syntax name} * ) |
1194 @@{attribute case_conclusion} @{syntax name} (@{syntax name} * ) |
1195 ; |
1195 ; |
1196 @@{attribute params} ((@{syntax name} * ) + @'and') |
1196 @@{attribute params} ((@{syntax name} * ) + @'and') |
1197 ; |
1197 ; |
1210 \item @{command "print_cases"} prints all local contexts of the |
1210 \item @{command "print_cases"} prints all local contexts of the |
1211 current state, using Isar proof language notation. |
1211 current state, using Isar proof language notation. |
1212 |
1212 |
1213 \item @{attribute case_names}~@{text "c\<^sub>1 \<dots> c\<^sub>k"} declares names for |
1213 \item @{attribute case_names}~@{text "c\<^sub>1 \<dots> c\<^sub>k"} declares names for |
1214 the local contexts of premises of a theorem; @{text "c\<^sub>1, \<dots>, c\<^sub>k"} |
1214 the local contexts of premises of a theorem; @{text "c\<^sub>1, \<dots>, c\<^sub>k"} |
1215 refers to the \emph{suffix} of the list of premises. |
1215 refers to the \emph{prefix} of the list of premises. Each of the |
|
1216 cases @{text "c\<^isub>i"} can be of the form @{text "c[h\<^isub>1 \<dots> h\<^isub>n]"} where |
|
1217 the @{text "h\<^isub>1 \<dots> h\<^isub>n"} are the names of the hypotheses in case @{text "c\<^isub>i"} |
|
1218 from left to right. |
1216 |
1219 |
1217 \item @{attribute case_conclusion}~@{text "c d\<^sub>1 \<dots> d\<^sub>k"} declares |
1220 \item @{attribute case_conclusion}~@{text "c d\<^sub>1 \<dots> d\<^sub>k"} declares |
1218 names for the conclusions of a named premise @{text c}; here @{text |
1221 names for the conclusions of a named premise @{text c}; here @{text |
1219 "d\<^sub>1, \<dots>, d\<^sub>k"} refers to the prefix of arguments of a logical formula |
1222 "d\<^sub>1, \<dots>, d\<^sub>k"} refers to the prefix of arguments of a logical formula |
1220 built by nesting a binary connective (e.g.\ @{text "\<or>"}). |
1223 built by nesting a binary connective (e.g.\ @{text "\<or>"}). |