src/Doc/Isar_Ref/HOL_Specific.thy
changeset 61459 5f2ddeb15c06
parent 61458 987533262fc2
child 61477 e467ae7aa808
equal deleted inserted replaced
61458:987533262fc2 61459:5f2ddeb15c06
   593   The mandatory @{text mode} argument specifies the mode of operation
   593   The mandatory @{text mode} argument specifies the mode of operation
   594   of the command, which directly corresponds to a complete partial
   594   of the command, which directly corresponds to a complete partial
   595   order on the result type. By default, the following modes are
   595   order on the result type. By default, the following modes are
   596   defined:
   596   defined:
   597 
   597 
   598   \begin{description}
   598     \<^descr> @{text option} defines functions that map into the @{type
   599 
       
   600     \item @{text option} defines functions that map into the @{type
       
   601     option} type. Here, the value @{term None} is used to model a
   599     option} type. Here, the value @{term None} is used to model a
   602     non-terminating computation. Monotonicity requires that if @{term
   600     non-terminating computation. Monotonicity requires that if @{term
   603     None} is returned by a recursive call, then the overall result must
   601     None} is returned by a recursive call, then the overall result must
   604     also be @{term None}. This is best achieved through the use of the
   602     also be @{term None}. This is best achieved through the use of the
   605     monadic operator @{const "Option.bind"}.
   603     monadic operator @{const "Option.bind"}.
   606 
   604 
   607     \item @{text tailrec} defines functions with an arbitrary result
   605     \<^descr> @{text tailrec} defines functions with an arbitrary result
   608     type and uses the slightly degenerated partial order where @{term
   606     type and uses the slightly degenerated partial order where @{term
   609     "undefined"} is the bottom element.  Now, monotonicity requires that
   607     "undefined"} is the bottom element.  Now, monotonicity requires that
   610     if @{term undefined} is returned by a recursive call, then the
   608     if @{term undefined} is returned by a recursive call, then the
   611     overall result must also be @{term undefined}. In practice, this is
   609     overall result must also be @{term undefined}. In practice, this is
   612     only satisfied when each recursive call is a tail call, whose result
   610     only satisfied when each recursive call is a tail call, whose result
   613     is directly returned. Thus, this mode of operation allows the
   611     is directly returned. Thus, this mode of operation allows the
   614     definition of arbitrary tail-recursive functions.
   612     definition of arbitrary tail-recursive functions.
   615 
       
   616   \end{description}
       
   617 
   613 
   618   Experienced users may define new modes by instantiating the locale
   614   Experienced users may define new modes by instantiating the locale
   619   @{const "partial_function_definitions"} appropriately.
   615   @{const "partial_function_definitions"} appropriately.
   620 
   616 
   621   \<^descr> @{attribute (HOL) partial_function_mono} declares rules for
   617   \<^descr> @{attribute (HOL) partial_function_mono} declares rules for
  1343   \<close>}
  1339   \<close>}
  1344 
  1340 
  1345   \<^descr> @{command (HOL) "setup_lifting"} Sets up the Lifting package to work
  1341   \<^descr> @{command (HOL) "setup_lifting"} Sets up the Lifting package to work
  1346   with a user-defined type. The command supports two modes.
  1342   with a user-defined type. The command supports two modes.
  1347 
  1343 
  1348   \begin{enumerate}
  1344     \<^enum> The first one is a low-level mode when the user must provide as a
  1349 
       
  1350     \item The first one is a low-level mode when the user must provide as a
       
  1351     first argument of @{command (HOL) "setup_lifting"} a quotient theorem
  1345     first argument of @{command (HOL) "setup_lifting"} a quotient theorem
  1352     @{term "Quotient R Abs Rep T"}. The package configures a transfer rule for
  1346     @{term "Quotient R Abs Rep T"}. The package configures a transfer rule for
  1353     equality, a domain transfer rules and sets up the @{command_def (HOL)
  1347     equality, a domain transfer rules and sets up the @{command_def (HOL)
  1354     "lift_definition"} command to work with the abstract type. An optional
  1348     "lift_definition"} command to work with the abstract type. An optional
  1355     theorem @{term "reflp R"}, which certifies that the equivalence relation R
  1349     theorem @{term "reflp R"}, which certifies that the equivalence relation R
  1359     to generate a stronger transfer rule for equality.
  1353     to generate a stronger transfer rule for equality.
  1360 
  1354 
  1361     Users generally will not prove the @{text Quotient} theorem manually for
  1355     Users generally will not prove the @{text Quotient} theorem manually for
  1362     new types, as special commands exist to automate the process.
  1356     new types, as special commands exist to automate the process.
  1363 
  1357 
  1364     \item When a new subtype is defined by @{command (HOL) typedef}, @{command
  1358     \<^enum> When a new subtype is defined by @{command (HOL) typedef}, @{command
  1365     (HOL) "lift_definition"} can be used in its second mode, where only the
  1359     (HOL) "lift_definition"} can be used in its second mode, where only the
  1366     @{term type_definition} theorem @{term "type_definition Rep Abs A"} is
  1360     @{term type_definition} theorem @{term "type_definition Rep Abs A"} is
  1367     used as an argument of the command. The command internally proves the
  1361     used as an argument of the command. The command internally proves the
  1368     corresponding @{term Quotient} theorem and registers it with @{command
  1362     corresponding @{term Quotient} theorem and registers it with @{command
  1369     (HOL) setup_lifting} using its first mode.
  1363     (HOL) setup_lifting} using its first mode.
  1370 
       
  1371   \end{enumerate}
       
  1372 
  1364 
  1373   For quotients, the command @{command (HOL) quotient_type} can be used. The
  1365   For quotients, the command @{command (HOL) quotient_type} can be used. The
  1374   command defines a new quotient type and similarly to the previous case,
  1366   command defines a new quotient type and similarly to the previous case,
  1375   the corresponding Quotient theorem is proved and registered by @{command
  1367   the corresponding Quotient theorem is proved and registered by @{command
  1376   (HOL) setup_lifting}.
  1368   (HOL) setup_lifting}.
  1421   In this case, an extension of @{command (HOL) "lift_definition"} can be
  1413   In this case, an extension of @{command (HOL) "lift_definition"} can be
  1422   invoked by specifying the flag @{text "code_dt"}. This extension enables
  1414   invoked by specifying the flag @{text "code_dt"}. This extension enables
  1423   code execution through series of internal type and lifting definitions if
  1415   code execution through series of internal type and lifting definitions if
  1424   the return type @{text "\<tau>"} meets the following inductive conditions:
  1416   the return type @{text "\<tau>"} meets the following inductive conditions:
  1425 
  1417 
  1426   \begin{description}
  1418     \<^descr> @{text "\<tau>"} is a type variable
  1427 
  1419 
  1428     \item @{text "\<tau>"} is a type variable
  1420     \<^descr> @{text "\<tau> = \<tau>\<^sub>1 \<dots> \<tau>\<^sub>n \<kappa>"},
  1429 
       
  1430     \item @{text "\<tau> = \<tau>\<^sub>1 \<dots> \<tau>\<^sub>n \<kappa>"},
       
  1431     where @{text "\<kappa>"} is an abstract type constructor and @{text "\<tau>\<^sub>1 \<dots> \<tau>\<^sub>n"}
  1421     where @{text "\<kappa>"} is an abstract type constructor and @{text "\<tau>\<^sub>1 \<dots> \<tau>\<^sub>n"}
  1432     do not contain abstract types (i.e.\ @{typ "int dlist"} is allowed whereas
  1422     do not contain abstract types (i.e.\ @{typ "int dlist"} is allowed whereas
  1433     @{typ "int dlist dlist"} not)
  1423     @{typ "int dlist dlist"} not)
  1434 
  1424 
  1435     \item @{text "\<tau> = \<tau>\<^sub>1 \<dots> \<tau>\<^sub>n \<kappa>"}, @{text "\<kappa>"} is a type constructor that
  1425     \<^descr> @{text "\<tau> = \<tau>\<^sub>1 \<dots> \<tau>\<^sub>n \<kappa>"}, @{text "\<kappa>"} is a type constructor that
  1436     was defined as a (co)datatype whose constructor argument types do not
  1426     was defined as a (co)datatype whose constructor argument types do not
  1437     contain either non-free datatypes or the function type.
  1427     contain either non-free datatypes or the function type.
  1438 
       
  1439   \end{description}
       
  1440 
  1428 
  1441   Integration with [@{attribute code} equation]: For total quotients,
  1429   Integration with [@{attribute code} equation]: For total quotients,
  1442   @{command (HOL) "lift_definition"} uses @{text f.abs_eq} as a code
  1430   @{command (HOL) "lift_definition"} uses @{text f.abs_eq} as a code
  1443   equation.
  1431   equation.
  1444 
  1432 
  1876   fixed number of random assignments in the search space, or exploring
  1864   fixed number of random assignments in the search space, or exploring
  1877   the search space symbolically using narrowing.  By default,
  1865   the search space symbolically using narrowing.  By default,
  1878   quickcheck uses exhaustive testing.  A number of configuration
  1866   quickcheck uses exhaustive testing.  A number of configuration
  1879   options are supported for @{command (HOL) "quickcheck"}, notably:
  1867   options are supported for @{command (HOL) "quickcheck"}, notably:
  1880 
  1868 
  1881     \begin{description}
  1869     \<^descr>[@{text tester}] specifies which testing approach to apply.
  1882 
       
  1883     \item[@{text tester}] specifies which testing approach to apply.
       
  1884     There are three testers, @{text exhaustive}, @{text random}, and
  1870     There are three testers, @{text exhaustive}, @{text random}, and
  1885     @{text narrowing}.  An unknown configuration option is treated as
  1871     @{text narrowing}.  An unknown configuration option is treated as
  1886     an argument to tester, making @{text "tester ="} optional.  When
  1872     an argument to tester, making @{text "tester ="} optional.  When
  1887     multiple testers are given, these are applied in parallel.  If no
  1873     multiple testers are given, these are applied in parallel.  If no
  1888     tester is specified, quickcheck uses the testers that are set
  1874     tester is specified, quickcheck uses the testers that are set
  1889     active, i.e.\ configurations @{attribute
  1875     active, i.e.\ configurations @{attribute
  1890     quickcheck_exhaustive_active}, @{attribute
  1876     quickcheck_exhaustive_active}, @{attribute
  1891     quickcheck_random_active}, @{attribute
  1877     quickcheck_random_active}, @{attribute
  1892     quickcheck_narrowing_active} are set to true.
  1878     quickcheck_narrowing_active} are set to true.
  1893 
  1879 
  1894     \item[@{text size}] specifies the maximum size of the search space
  1880     \<^descr>[@{text size}] specifies the maximum size of the search space
  1895     for assignment values.
  1881     for assignment values.
  1896 
  1882 
  1897     \item[@{text genuine_only}] sets quickcheck only to return genuine
  1883     \<^descr>[@{text genuine_only}] sets quickcheck only to return genuine
  1898     counterexample, but not potentially spurious counterexamples due
  1884     counterexample, but not potentially spurious counterexamples due
  1899     to underspecified functions.
  1885     to underspecified functions.
  1900 
  1886 
  1901     \item[@{text abort_potential}] sets quickcheck to abort once it
  1887     \<^descr>[@{text abort_potential}] sets quickcheck to abort once it
  1902     found a potentially spurious counterexample and to not continue
  1888     found a potentially spurious counterexample and to not continue
  1903     to search for a further genuine counterexample.
  1889     to search for a further genuine counterexample.
  1904     For this option to be effective, the @{text genuine_only} option
  1890     For this option to be effective, the @{text genuine_only} option
  1905     must be set to false.
  1891     must be set to false.
  1906 
  1892 
  1907     \item[@{text eval}] takes a term or a list of terms and evaluates
  1893     \<^descr>[@{text eval}] takes a term or a list of terms and evaluates
  1908     these terms under the variable assignment found by quickcheck.
  1894     these terms under the variable assignment found by quickcheck.
  1909     This option is currently only supported by the default
  1895     This option is currently only supported by the default
  1910     (exhaustive) tester.
  1896     (exhaustive) tester.
  1911 
  1897 
  1912     \item[@{text iterations}] sets how many sets of assignments are
  1898     \<^descr>[@{text iterations}] sets how many sets of assignments are
  1913     generated for each particular size.
  1899     generated for each particular size.
  1914 
  1900 
  1915     \item[@{text no_assms}] specifies whether assumptions in
  1901     \<^descr>[@{text no_assms}] specifies whether assumptions in
  1916     structured proofs should be ignored.
  1902     structured proofs should be ignored.
  1917 
  1903 
  1918     \item[@{text locale}] specifies how to process conjectures in
  1904     \<^descr>[@{text locale}] specifies how to process conjectures in
  1919     a locale context, i.e.\ they can be interpreted or expanded.
  1905     a locale context, i.e.\ they can be interpreted or expanded.
  1920     The option is a whitespace-separated list of the two words
  1906     The option is a whitespace-separated list of the two words
  1921     @{text interpret} and @{text expand}. The list determines the
  1907     @{text interpret} and @{text expand}. The list determines the
  1922     order they are employed. The default setting is to first use
  1908     order they are employed. The default setting is to first use
  1923     interpretations and then test the expanded conjecture.
  1909     interpretations and then test the expanded conjecture.
  1924     The option is only provided as attribute declaration, but not
  1910     The option is only provided as attribute declaration, but not
  1925     as parameter to the command.
  1911     as parameter to the command.
  1926 
  1912 
  1927     \item[@{text timeout}] sets the time limit in seconds.
  1913     \<^descr>[@{text timeout}] sets the time limit in seconds.
  1928 
  1914 
  1929     \item[@{text default_type}] sets the type(s) generally used to
  1915     \<^descr>[@{text default_type}] sets the type(s) generally used to
  1930     instantiate type variables.
  1916     instantiate type variables.
  1931 
  1917 
  1932     \item[@{text report}] if set quickcheck reports how many tests
  1918     \<^descr>[@{text report}] if set quickcheck reports how many tests
  1933     fulfilled the preconditions.
  1919     fulfilled the preconditions.
  1934 
  1920 
  1935     \item[@{text use_subtype}] if set quickcheck automatically lifts
  1921     \<^descr>[@{text use_subtype}] if set quickcheck automatically lifts
  1936     conjectures to registered subtypes if possible, and tests the
  1922     conjectures to registered subtypes if possible, and tests the
  1937     lifted conjecture.
  1923     lifted conjecture.
  1938 
  1924 
  1939     \item[@{text quiet}] if set quickcheck does not output anything
  1925     \<^descr>[@{text quiet}] if set quickcheck does not output anything
  1940     while testing.
  1926     while testing.
  1941 
  1927 
  1942     \item[@{text verbose}] if set quickcheck informs about the current
  1928     \<^descr>[@{text verbose}] if set quickcheck informs about the current
  1943     size and cardinality while testing.
  1929     size and cardinality while testing.
  1944 
  1930 
  1945     \item[@{text expect}] can be used to check if the user's
  1931     \<^descr>[@{text expect}] can be used to check if the user's
  1946     expectation was met (@{text no_expectation}, @{text
  1932     expectation was met (@{text no_expectation}, @{text
  1947     no_counterexample}, or @{text counterexample}).
  1933     no_counterexample}, or @{text counterexample}).
  1948 
  1934 
  1949     \end{description}
       
  1950 
       
  1951   These option can be given within square brackets.
  1935   These option can be given within square brackets.
  1952 
  1936 
  1953   Using the following type classes, the testers generate values and convert
  1937   Using the following type classes, the testers generate values and convert
  1954   them back into Isabelle terms for displaying counterexamples.
  1938   them back into Isabelle terms for displaying counterexamples.
  1955 
  1939 
  1956     \begin{description}
  1940     \<^descr>[@{text exhaustive}] The parameters of the type classes @{class exhaustive}
  1957 
  1941     and @{class full_exhaustive} implement the testing. They take a
  1958     \item[@{text exhaustive}] The parameters of the type classes @{class exhaustive}
  1942     testing function as a parameter, which takes a value of type @{typ "'a"}
  1959       and @{class full_exhaustive} implement the testing. They take a
  1943     and optionally produces a counterexample, and a size parameter for the test values.
  1960       testing function as a parameter, which takes a value of type @{typ "'a"}
  1944     In @{class full_exhaustive}, the testing function parameter additionally
  1961       and optionally produces a counterexample, and a size parameter for the test values.
  1945     expects a lazy term reconstruction in the type @{typ Code_Evaluation.term}
  1962       In @{class full_exhaustive}, the testing function parameter additionally
  1946     of the tested value.
  1963       expects a lazy term reconstruction in the type @{typ Code_Evaluation.term}
  1947 
  1964       of the tested value.
  1948     The canonical implementation for @{text exhaustive} testers calls the given
  1965 
  1949     testing function on all values up to the given size and stops as soon
  1966       The canonical implementation for @{text exhaustive} testers calls the given
  1950     as a counterexample is found.
  1967       testing function on all values up to the given size and stops as soon
  1951 
  1968       as a counterexample is found.
  1952     \<^descr>[@{text random}] The operation @{const Quickcheck_Random.random}
  1969 
  1953     of the type class @{class random} generates a pseudo-random
  1970     \item[@{text random}] The operation @{const Quickcheck_Random.random}
  1954     value of the given size and a lazy term reconstruction of the value
  1971       of the type class @{class random} generates a pseudo-random
  1955     in the type @{typ Code_Evaluation.term}. A pseudo-randomness generator
  1972       value of the given size and a lazy term reconstruction of the value
  1956     is defined in theory @{theory Random}.
  1973       in the type @{typ Code_Evaluation.term}. A pseudo-randomness generator
  1957 
  1974       is defined in theory @{theory Random}.
  1958     \<^descr>[@{text narrowing}] implements Haskell's Lazy Smallcheck @{cite "runciman-naylor-lindblad"}
  1975 
  1959     using the type classes @{class narrowing} and @{class partial_term_of}.
  1976     \item[@{text narrowing}] implements Haskell's Lazy Smallcheck @{cite "runciman-naylor-lindblad"}
  1960     Variables in the current goal are initially represented as symbolic variables.
  1977       using the type classes @{class narrowing} and @{class partial_term_of}.
  1961     If the execution of the goal tries to evaluate one of them, the test engine
  1978       Variables in the current goal are initially represented as symbolic variables.
  1962     replaces it with refinements provided by @{const narrowing}.
  1979       If the execution of the goal tries to evaluate one of them, the test engine
  1963     Narrowing views every value as a sum-of-products which is expressed using the operations
  1980       replaces it with refinements provided by @{const narrowing}.
  1964     @{const Quickcheck_Narrowing.cons} (embedding a value),
  1981       Narrowing views every value as a sum-of-products which is expressed using the operations
  1965     @{const Quickcheck_Narrowing.apply} (product) and @{const Quickcheck_Narrowing.sum} (sum).
  1982       @{const Quickcheck_Narrowing.cons} (embedding a value),
  1966     The refinement should enable further evaluation of the goal.
  1983       @{const Quickcheck_Narrowing.apply} (product) and @{const Quickcheck_Narrowing.sum} (sum).
  1967 
  1984       The refinement should enable further evaluation of the goal.
  1968     For example, @{const narrowing} for the list type @{typ "'a :: narrowing list"}
  1985 
  1969     can be recursively defined as
  1986       For example, @{const narrowing} for the list type @{typ "'a :: narrowing list"}
  1970     @{term "Quickcheck_Narrowing.sum (Quickcheck_Narrowing.cons [])
  1987       can be recursively defined as
  1971               (Quickcheck_Narrowing.apply
  1988       @{term "Quickcheck_Narrowing.sum (Quickcheck_Narrowing.cons [])
       
  1989                 (Quickcheck_Narrowing.apply
  1972                 (Quickcheck_Narrowing.apply
  1990                   (Quickcheck_Narrowing.apply
  1973                   (Quickcheck_Narrowing.cons (op #))
  1991                     (Quickcheck_Narrowing.cons (op #))
  1974                   narrowing)
  1992                     narrowing)
  1975                 narrowing)"}.
  1993                   narrowing)"}.
  1976     If a symbolic variable of type @{typ "_ list"} is evaluated, it is replaced by (i)~the empty
  1994       If a symbolic variable of type @{typ "_ list"} is evaluated, it is replaced by (i)~the empty
  1977     list @{term "[]"} and (ii)~by a non-empty list whose head and tail can then be recursively
  1995       list @{term "[]"} and (ii)~by a non-empty list whose head and tail can then be recursively
  1978     refined if needed.
  1996       refined if needed.
  1979 
  1997 
  1980     To reconstruct counterexamples, the operation @{const partial_term_of} transforms
  1998       To reconstruct counterexamples, the operation @{const partial_term_of} transforms
  1981     @{text narrowing}'s deep representation of terms to the type @{typ Code_Evaluation.term}.
  1999       @{text narrowing}'s deep representation of terms to the type @{typ Code_Evaluation.term}.
  1982     The deep representation models symbolic variables as
  2000       The deep representation models symbolic variables as
  1983     @{const Quickcheck_Narrowing.Narrowing_variable}, which are normally converted to
  2001       @{const Quickcheck_Narrowing.Narrowing_variable}, which are normally converted to
  1984     @{const Code_Evaluation.Free}, and refined values as
  2002       @{const Code_Evaluation.Free}, and refined values as
  1985     @{term "Quickcheck_Narrowing.Narrowing_constructor i args"}, where @{term "i :: integer"}
  2003       @{term "Quickcheck_Narrowing.Narrowing_constructor i args"}, where @{term "i :: integer"}
  1986     denotes the index in the sum of refinements. In the above example for lists,
  2004       denotes the index in the sum of refinements. In the above example for lists,
  1987     @{term "0"} corresponds to @{term "[]"} and @{term "1"}
  2005       @{term "0"} corresponds to @{term "[]"} and @{term "1"}
  1988     to @{term "op #"}.
  2006       to @{term "op #"}.
  1989 
  2007 
  1990     The command @{command (HOL) "code_datatype"} sets up @{const partial_term_of}
  2008       The command @{command (HOL) "code_datatype"} sets up @{const partial_term_of}
  1991     such that the @{term "i"}-th refinement is interpreted as the @{term "i"}-th constructor,
  2009       such that the @{term "i"}-th refinement is interpreted as the @{term "i"}-th constructor,
  1992     but it does not ensures consistency with @{const narrowing}.
  2010       but it does not ensures consistency with @{const narrowing}.
       
  2011     \end{description}
       
  2012 
  1993 
  2013   \<^descr> @{command (HOL) "quickcheck_params"} changes @{command (HOL)
  1994   \<^descr> @{command (HOL) "quickcheck_params"} changes @{command (HOL)
  2014   "quickcheck"} configuration options persistently.
  1995   "quickcheck"} configuration options persistently.
  2015 
  1996 
  2016   \<^descr> @{command (HOL) "quickcheck_generator"} creates random and
  1997   \<^descr> @{command (HOL) "quickcheck_generator"} creates random and
  2205   \<^descr> @{method (HOL) algebra} performs algebraic reasoning via
  2186   \<^descr> @{method (HOL) algebra} performs algebraic reasoning via
  2206   Gr\"obner bases, see also @{cite "Chaieb-Wenzel:2007"} and
  2187   Gr\"obner bases, see also @{cite "Chaieb-Wenzel:2007"} and
  2207   @{cite \<open>\S3.2\<close> "Chaieb-thesis"}. The method handles deals with two main
  2188   @{cite \<open>\S3.2\<close> "Chaieb-thesis"}. The method handles deals with two main
  2208   classes of problems:
  2189   classes of problems:
  2209 
  2190 
  2210   \begin{enumerate}
  2191     \<^enum> Universal problems over multivariate polynomials in a
  2211 
       
  2212     \item Universal problems over multivariate polynomials in a
       
  2213     (semi)-ring/field/idom; the capabilities of the method are augmented
  2192     (semi)-ring/field/idom; the capabilities of the method are augmented
  2214     according to properties of these structures. For this problem class
  2193     according to properties of these structures. For this problem class
  2215     the method is only complete for algebraically closed fields, since
  2194     the method is only complete for algebraically closed fields, since
  2216     the underlying method is based on Hilbert's Nullstellensatz, where
  2195     the underlying method is based on Hilbert's Nullstellensatz, where
  2217     the equivalence only holds for algebraically closed fields.
  2196     the equivalence only holds for algebraically closed fields.
  2218 
  2197 
  2219     The problems can contain equations @{text "p = 0"} or inequations
  2198     The problems can contain equations @{text "p = 0"} or inequations
  2220     @{text "q \<noteq> 0"} anywhere within a universal problem statement.
  2199     @{text "q \<noteq> 0"} anywhere within a universal problem statement.
  2221 
  2200 
  2222     \item All-exists problems of the following restricted (but useful)
  2201     \<^enum> All-exists problems of the following restricted (but useful)
  2223     form:
  2202     form:
  2224 
  2203 
  2225     @{text [display] "\<forall>x\<^sub>1 \<dots> x\<^sub>n.
  2204     @{text [display] "\<forall>x\<^sub>1 \<dots> x\<^sub>n.
  2226       e\<^sub>1(x\<^sub>1, \<dots>, x\<^sub>n) = 0 \<and> \<dots> \<and> e\<^sub>m(x\<^sub>1, \<dots>, x\<^sub>n) = 0 \<longrightarrow>
  2205       e\<^sub>1(x\<^sub>1, \<dots>, x\<^sub>n) = 0 \<and> \<dots> \<and> e\<^sub>m(x\<^sub>1, \<dots>, x\<^sub>n) = 0 \<longrightarrow>
  2227       (\<exists>y\<^sub>1 \<dots> y\<^sub>k.
  2206       (\<exists>y\<^sub>1 \<dots> y\<^sub>k.
  2229         \<dots> \<and>
  2208         \<dots> \<and>
  2230         p\<^sub>t\<^sub>1(x\<^sub>1, \<dots>, x\<^sub>n) * y\<^sub>1 + \<dots> + p\<^sub>t\<^sub>k(x\<^sub>1, \<dots>, x\<^sub>n) * y\<^sub>k = 0)"}
  2209         p\<^sub>t\<^sub>1(x\<^sub>1, \<dots>, x\<^sub>n) * y\<^sub>1 + \<dots> + p\<^sub>t\<^sub>k(x\<^sub>1, \<dots>, x\<^sub>n) * y\<^sub>k = 0)"}
  2231 
  2210 
  2232     Here @{text "e\<^sub>1, \<dots>, e\<^sub>n"} and the @{text "p\<^sub>i\<^sub>j"} are multivariate
  2211     Here @{text "e\<^sub>1, \<dots>, e\<^sub>n"} and the @{text "p\<^sub>i\<^sub>j"} are multivariate
  2233     polynomials only in the variables mentioned as arguments.
  2212     polynomials only in the variables mentioned as arguments.
  2234 
       
  2235   \end{enumerate}
       
  2236 
  2213 
  2237   The proof method is preceded by a simplification step, which may be
  2214   The proof method is preceded by a simplification step, which may be
  2238   modified by using the form @{text "(algebra add: ths\<^sub>1 del: ths\<^sub>2)"}.
  2215   modified by using the form @{text "(algebra add: ths\<^sub>1 del: ths\<^sub>2)"}.
  2239   This acts like declarations for the Simplifier
  2216   This acts like declarations for the Simplifier
  2240   (\secref{sec:simplifier}) on a private simpset for this tool.
  2217   (\secref{sec:simplifier}) on a private simpset for this tool.