equal
deleted
inserted
replaced
915 Here are some example method definitions: |
915 Here are some example method definitions: |
916 |
916 |
917 \end{description} |
917 \end{description} |
918 *} |
918 *} |
919 |
919 |
920 method_setup my_method1 = {* |
920 method_setup my_method1 = {* |
921 Scan.succeed (K (SIMPLE_METHOD' (fn i: int => no_tac))) |
921 Scan.succeed (K (SIMPLE_METHOD' (fn i: int => no_tac))) |
922 *} "my first method (without any arguments)" |
922 *} "my first method (without any arguments)" |
923 |
923 |
924 method_setup my_method2 = {* |
924 method_setup my_method2 = {* |
925 Scan.succeed (fn ctxt: Proof.context => |
925 Scan.succeed (fn ctxt: Proof.context => |
926 SIMPLE_METHOD' (fn i: int => no_tac)) |
926 SIMPLE_METHOD' (fn i: int => no_tac)) |
927 *} "my second method (with context)" |
927 *} "my second method (with context)" |
928 |
928 |
929 method_setup my_method3 = {* |
929 method_setup my_method3 = {* |
930 Attrib.thms >> (fn thms: thm list => fn ctxt: Proof.context => |
930 Attrib.thms >> (fn thms: thm list => fn ctxt: Proof.context => |
931 SIMPLE_METHOD' (fn i: int => no_tac)) |
931 SIMPLE_METHOD' (fn i: int => no_tac)) |
932 *} "my third method (with theorem arguments and context)" |
932 *} "my third method (with theorem arguments and context)" |
933 |
933 |
934 |
934 |
935 section {* Generalized elimination \label{sec:obtain} *} |
935 section {* Generalized elimination \label{sec:obtain} *} |
936 |
936 |
937 text {* |
937 text {* |
1273 (either using explicit meta-level connectives, or including facts |
1273 (either using explicit meta-level connectives, or including facts |
1274 and parameters separately). This avoids cumbersome encoding of |
1274 and parameters separately). This avoids cumbersome encoding of |
1275 ``strengthened'' inductive statements within the object-logic. |
1275 ``strengthened'' inductive statements within the object-logic. |
1276 |
1276 |
1277 @{rail " |
1277 @{rail " |
1278 @@{method cases} ('(' 'no_simp' ')')? (@{syntax insts} * @'and') rule? |
1278 @@{method cases} ('(' 'no_simp' ')')? \\ |
|
1279 (@{syntax insts} * @'and') rule? |
1279 ; |
1280 ; |
1280 @@{method induct} ('(' 'no_simp' ')')? (definsts * @'and') \\ arbitrary? taking? rule? |
1281 @@{method induct} ('(' 'no_simp' ')')? (definsts * @'and') \\ arbitrary? taking? rule? |
1281 ; |
1282 ; |
1282 @@{method coinduct} @{syntax insts} taking rule? |
1283 @@{method coinduct} @{syntax insts} taking rule? |
1283 ; |
1284 ; |