doc-src/TutorialI/Rules/rules.tex
changeset 12540 a5604ff1ef4e
parent 12535 626eaec7b5ad
child 12815 1f073030b97a
equal deleted inserted replaced
12539:368414099877 12540:a5604ff1ef4e
   849 the third unchanged.  With this instantiation, backtracking is neither necessary
   849 the third unchanged.  With this instantiation, backtracking is neither necessary
   850 nor possible.
   850 nor possible.
   851 
   851 
   852 An alternative to \isa{rule_tac} is to use \isa{rule} with a theorem
   852 An alternative to \isa{rule_tac} is to use \isa{rule} with a theorem
   853 modified using~\isa{of}, described in
   853 modified using~\isa{of}, described in
   854 {\S}\ref{sec:forward} below.   An advantage of \isa{rule_tac} is that the
   854 {\S}\ref{sec:forward} below.   But \isa{rule_tac}, unlike \isa{of}, can 
   855 instantiations may refer to 
   855 express instantiations that refer to 
   856 \isasymAnd-bound variables in the current subgoal.%
   856 \isasymAnd-bound variables in the current subgoal.%
   857 \index{substitution|)}
   857 \index{substitution|)}
   858 
   858 
   859 
   859 
   860 \section{Quantifiers}
   860 \section{Quantifiers}
  1258 
  1258 
  1259 \index{descriptions!definite}%
  1259 \index{descriptions!definite}%
  1260 A definite description is traditionally written $\iota x.  P(x)$.  It denotes
  1260 A definite description is traditionally written $\iota x.  P(x)$.  It denotes
  1261 the $x$ such that $P(x)$ is true, provided there exists a unique such~$x$;
  1261 the $x$ such that $P(x)$ is true, provided there exists a unique such~$x$;
  1262 otherwise, it returns an arbitrary value of the expected type.
  1262 otherwise, it returns an arbitrary value of the expected type.
  1263 Isabelle uses \sdx{THE} for the Greek letter~$\iota$.  (The
  1263 Isabelle uses \sdx{THE} for the Greek letter~$\iota$.  
  1264 traditional notation could be provided, but it is not legible on screen.)
  1264 
       
  1265 %(The traditional notation could be provided, but it is not legible on screen.)
  1265 
  1266 
  1266 We reason using this rule, where \isa{a} is the unique solution:
  1267 We reason using this rule, where \isa{a} is the unique solution:
  1267 \begin{isabelle}
  1268 \begin{isabelle}
  1268 \isasymlbrakk P\ a;\ \isasymAnd x.\ P\ x\ \isasymLongrightarrow \ x\ =\ a\isasymrbrakk \ 
  1269 \isasymlbrakk P\ a;\ \isasymAnd x.\ P\ x\ \isasymLongrightarrow \ x\ =\ a\isasymrbrakk \ 
  1269 \isasymLongrightarrow \ (THE\ x.\ P\ x)\ =\ a%
  1270 \isasymLongrightarrow \ (THE\ x.\ P\ x)\ =\ a%
  2299 \isa{assumption}.  Therefore, we combine these methods using the choice
  2300 \isa{assumption}.  Therefore, we combine these methods using the choice
  2300 operator.
  2301 operator.
  2301 
  2302 
  2302 A postfixed question mark~(\isa?)\index{*"? (tactical)} expresses zero or one
  2303 A postfixed question mark~(\isa?)\index{*"? (tactical)} expresses zero or one
  2303 repetitions of a method.  It can also be viewed as the choice between executing a
  2304 repetitions of a method.  It can also be viewed as the choice between executing a
  2304 method and doing nothing.  It is useless at top level but may be valuable within
  2305 method and doing nothing.  It is useless at top level but can be valuable
  2305 other control structures.%
  2306 within other control structures; for example, 
       
  2307 \isa{($m$+)?} performs zero or more repetitions of method~$m$.%
  2306 \index{tacticals|)}
  2308 \index{tacticals|)}
  2307 
  2309 
  2308 
  2310 
  2309 \subsection{Subgoal Numbering}
  2311 \subsection{Subgoal Numbering}
  2310 
  2312