src/Doc/IsarRef/HOL_Specific.thy
changeset 54017 2a3c07f49615
parent 53982 f0ee92285221
child 54334 409d7f7247f4
equal deleted inserted replaced
54016:769fcbdf2918 54017:2a3c07f49615
   259   \begin{matharray}{rcl}
   259   \begin{matharray}{rcl}
   260     @{command_def (HOL) "primrec"} & : & @{text "local_theory \<rightarrow> local_theory"} \\
   260     @{command_def (HOL) "primrec"} & : & @{text "local_theory \<rightarrow> local_theory"} \\
   261     @{command_def (HOL) "fun"} & : & @{text "local_theory \<rightarrow> local_theory"} \\
   261     @{command_def (HOL) "fun"} & : & @{text "local_theory \<rightarrow> local_theory"} \\
   262     @{command_def (HOL) "function"} & : & @{text "local_theory \<rightarrow> proof(prove)"} \\
   262     @{command_def (HOL) "function"} & : & @{text "local_theory \<rightarrow> proof(prove)"} \\
   263     @{command_def (HOL) "termination"} & : & @{text "local_theory \<rightarrow> proof(prove)"} \\
   263     @{command_def (HOL) "termination"} & : & @{text "local_theory \<rightarrow> proof(prove)"} \\
       
   264     @{command_def (HOL) "fun_cases"} & : & @{text "local_theory \<rightarrow> local_theory"} \\
   264   \end{matharray}
   265   \end{matharray}
   265 
   266 
   266   @{rail "
   267   @{rail "
   267     @@{command (HOL) primrec} @{syntax target}? @{syntax \"fixes\"} @'where' equations
   268     @@{command (HOL) primrec} @{syntax target}? @{syntax \"fixes\"} @'where' equations
   268     ;
   269     ;
   273     equations: (@{syntax thmdecl}? @{syntax prop} + '|')
   274     equations: (@{syntax thmdecl}? @{syntax prop} + '|')
   274     ;
   275     ;
   275     functionopts: '(' (('sequential' | 'domintros') + ',') ')'
   276     functionopts: '(' (('sequential' | 'domintros') + ',') ')'
   276     ;
   277     ;
   277     @@{command (HOL) termination} @{syntax term}?
   278     @@{command (HOL) termination} @{syntax term}?
       
   279     ;
       
   280     @@{command (HOL) fun_cases} (@{syntax thmdecl}? @{syntax prop} + @'and')
   278   "}
   281   "}
   279 
   282 
   280   \begin{description}
   283   \begin{description}
   281 
   284 
   282   \item @{command (HOL) "primrec"} defines primitive recursive
   285   \item @{command (HOL) "primrec"} defines primitive recursive
   327   termination proof for the previously defined function @{text f}.  If
   330   termination proof for the previously defined function @{text f}.  If
   328   this is omitted, the command refers to the most recent function
   331   this is omitted, the command refers to the most recent function
   329   definition.  After the proof is closed, the recursive equations and
   332   definition.  After the proof is closed, the recursive equations and
   330   the induction principle is established.
   333   the induction principle is established.
   331 
   334 
       
   335   \item @{command (HOL) "fun_cases"} generates specialized elimination
       
   336   rules for function equations. It expects one or more function equations
       
   337   and produces rules that eliminate the given equalities, following the cases
       
   338   given in the function definition.
   332   \end{description}
   339   \end{description}
   333 
   340 
   334   Recursive definitions introduced by the @{command (HOL) "function"}
   341   Recursive definitions introduced by the @{command (HOL) "function"}
   335   command accommodate reasoning by induction (cf.\ @{method induct}):
   342   command accommodate reasoning by induction (cf.\ @{method induct}):
   336   rule @{text "f.induct"} refers to a specific induction rule, with
   343   rule @{text "f.induct"} refers to a specific induction rule, with