1423 \subsection{Inspecting the context} |
1423 \subsection{Inspecting the context} |
1424 |
1424 |
1425 \indexisarcmd{print-facts}\indexisarcmd{print-binds} |
1425 \indexisarcmd{print-facts}\indexisarcmd{print-binds} |
1426 \indexisarcmd{print-commands}\indexisarcmd{print-syntax} |
1426 \indexisarcmd{print-commands}\indexisarcmd{print-syntax} |
1427 \indexisarcmd{print-methods}\indexisarcmd{print-attributes} |
1427 \indexisarcmd{print-methods}\indexisarcmd{print-attributes} |
1428 \indexisarcmd{thms-containing}\indexisarcmd{thm-deps} |
1428 \indexisarcmd{find-theorems}\indexisarcmd{thm-deps} |
1429 \indexisarcmd{print-theorems} |
1429 \indexisarcmd{print-theorems} |
1430 \begin{matharray}{rcl} |
1430 \begin{matharray}{rcl} |
1431 \isarcmd{print_commands}^* & : & \isarkeep{\cdot} \\ |
1431 \isarcmd{print_commands}^* & : & \isarkeep{\cdot} \\ |
1432 \isarcmd{print_syntax}^* & : & \isarkeep{theory~|~proof} \\ |
1432 \isarcmd{print_syntax}^* & : & \isarkeep{theory~|~proof} \\ |
1433 \isarcmd{print_methods}^* & : & \isarkeep{theory~|~proof} \\ |
1433 \isarcmd{print_methods}^* & : & \isarkeep{theory~|~proof} \\ |
1434 \isarcmd{print_attributes}^* & : & \isarkeep{theory~|~proof} \\ |
1434 \isarcmd{print_attributes}^* & : & \isarkeep{theory~|~proof} \\ |
1435 \isarcmd{print_theorems}^* & : & \isarkeep{theory~|~proof} \\ |
1435 \isarcmd{print_theorems}^* & : & \isarkeep{theory~|~proof} \\ |
1436 \isarcmd{thms_containing}^* & : & \isarkeep{theory~|~proof} \\ |
1436 \isarcmd{find_theorems}^* & : & \isarkeep{theory~|~proof} \\ |
1437 \isarcmd{thms_deps}^* & : & \isarkeep{theory~|~proof} \\ |
1437 \isarcmd{thms_deps}^* & : & \isarkeep{theory~|~proof} \\ |
1438 \isarcmd{print_facts}^* & : & \isarkeep{proof} \\ |
1438 \isarcmd{print_facts}^* & : & \isarkeep{proof} \\ |
1439 \isarcmd{print_binds}^* & : & \isarkeep{proof} \\ |
1439 \isarcmd{print_binds}^* & : & \isarkeep{proof} \\ |
1440 \end{matharray} |
1440 \end{matharray} |
1441 |
1441 |
1442 \railalias{thmscontaining}{thms\_containing} |
1442 \begin{rail} |
1443 \railterm{thmscontaining} |
1443 'find\_theorems' (('(' nat ')')?) (criterion *) |
1444 |
|
1445 \railalias{thmdeps}{thm\_deps} |
|
1446 \railterm{thmdeps} |
|
1447 |
|
1448 \begin{rail} |
|
1449 thmscontaining (('(' nat ')')?) (criterion *) |
|
1450 ; |
1444 ; |
1451 criterion: ('-'?) ('name' ':' nameref | 'intro' | 'elim' | 'dest' | |
1445 criterion: ('-'?) ('name' ':' nameref | 'intro' | 'elim' | 'dest' | |
1452 'simp' ':' term | term) |
1446 'simp' ':' term | term) |
1453 ; |
1447 ; |
1454 thmdeps thmrefs |
1448 'thm\_deps' thmrefs |
1455 ; |
1449 ; |
1456 \end{rail} |
1450 \end{rail} |
1457 |
1451 |
1458 These commands print certain parts of the theory and proof context. Note that |
1452 These commands print certain parts of the theory and proof context. Note that |
1459 there are some further ones available, such as for the set of rules declared |
1453 there are some further ones available, such as for the set of rules declared |
1480 |
1474 |
1481 In interactive mode this actually refers to the theorems left by the last |
1475 In interactive mode this actually refers to the theorems left by the last |
1482 transaction; this allows to inspect the result of advanced definitional |
1476 transaction; this allows to inspect the result of advanced definitional |
1483 packages, such as $\isarkeyword{datatype}$. |
1477 packages, such as $\isarkeyword{datatype}$. |
1484 |
1478 |
1485 \item [$\isarkeyword{thms_containing}~\vec c$] retrieves facts from the theory |
1479 \item [$\isarkeyword{find_theorems}~\vec c$] retrieves facts from the theory |
1486 or proof context matching all of the search criteria $\vec c$. The criterion |
1480 or proof context matching all of the search criteria $\vec c$. The |
1487 $name: s$ selects all theorems that contain $s$ in their fully qualified |
1481 criterion $name: p$ selects all theorems whose fully qualified name matches |
1488 name. The criteria $intro$, $elim$, and $dest$ select theorems that match |
1482 pattern $p$, which may contain ``$*$'' wildcards. The criteria $intro$, |
1489 the current goal as introduction, elimination or destruction rules, |
1483 $elim$, and $dest$ select theorems that match the current goal as |
1490 respectively. The criterion $simp: t$ selects all rewrite rules whose |
1484 introduction, elimination or destruction rules, respectively. The criterion |
1491 left-hand side matches the given term. The criterion term $t$ selects all |
1485 $simp: t$ selects all rewrite rules whose left-hand side matches the given |
1492 theorems that contain the pattern $t$ -- as usual, patterns may contain |
1486 term. The criterion term $t$ selects all theorems that contain the pattern |
1493 occurrences of the dummy ``$\_$'', schematic variables, and type |
1487 $t$ -- as usual, patterns may contain occurrences of the dummy ``$\_$'', |
1494 constraints. |
1488 schematic variables, and type constraints. |
1495 |
1489 |
1496 Criteria can be preceded by ``$-$'' to select theorems that do \emph{not} |
1490 Criteria can be preceded by ``$-$'' to select theorems that do \emph{not} |
1497 match. Note that giving the empty list of criteria yields \emph{all} |
1491 match. Note that giving the empty list of criteria yields \emph{all} |
1498 currently known facts. An optional limit for the number of printed facts |
1492 currently known facts. An optional limit for the number of printed facts |
1499 may be given; the default is 40. |
1493 may be given; the default is 40. |