doc-src/IsarRef/logics.tex
changeset 12879 8e1cae1de136
parent 12621 48cafea0684b
child 13014 3c1c493e6d93
equal deleted inserted replaced
12878:2896f88180b9 12879:8e1cae1de136
    88   \isarcmd{typedecl} & : & \isartrans{theory}{theory} \\
    88   \isarcmd{typedecl} & : & \isartrans{theory}{theory} \\
    89   \isarcmd{typedef} & : & \isartrans{theory}{proof(prove)} \\
    89   \isarcmd{typedef} & : & \isartrans{theory}{proof(prove)} \\
    90 \end{matharray}
    90 \end{matharray}
    91 
    91 
    92 \begin{rail}
    92 \begin{rail}
    93   'typedecl' typespec infix? comment?
    93   'typedecl' typespec infix?
    94   ;
    94   ;
    95   'typedef' parname? typespec infix? \\ '=' term comment?
    95   'typedef' parname? typespec infix? '=' term
    96   ;
    96   ;
    97 \end{rail}
    97 \end{rail}
    98 
    98 
    99 \begin{descr}
    99 \begin{descr}
   100 \item [$\isarkeyword{typedecl}~(\vec\alpha)t$] is similar to the original
   100 \item [$\isarkeyword{typedecl}~(\vec\alpha)t$] is similar to the original
   184   repdatatype (name * ) dtrules
   184   repdatatype (name * ) dtrules
   185   ;
   185   ;
   186 
   186 
   187   dtspec: parname? typespec infix? '=' (cons + '|')
   187   dtspec: parname? typespec infix? '=' (cons + '|')
   188   ;
   188   ;
   189   cons: name (type * ) mixfix? comment?
   189   cons: name (type * ) mixfix?
   190   ;
   190   ;
   191   dtrules: 'distinct' thmrefs 'inject' thmrefs 'induction' thmrefs
   191   dtrules: 'distinct' thmrefs 'inject' thmrefs 'induction' thmrefs
   192 \end{rail}
   192 \end{rail}
   193 
   193 
   194 \begin{descr}
   194 \begin{descr}
   234 \railterm{recdeftc}
   234 \railterm{recdeftc}
   235 
   235 
   236 \begin{rail}
   236 \begin{rail}
   237   'primrec' parname? (equation + )
   237   'primrec' parname? (equation + )
   238   ;
   238   ;
   239   'recdef' ('(' 'permissive' ')')? \\ name term (eqn + ) hints?
   239   'recdef' ('(' 'permissive' ')')? \\ name term (prop + ) hints?
   240   ;
   240   ;
   241   recdeftc thmdecl? tc comment?
   241   recdeftc thmdecl? tc
   242   ;
   242   ;
   243 
   243 
   244   equation: thmdecl? eqn
   244   equation: thmdecl? prop
   245   ;
       
   246   eqn: prop comment?
       
   247   ;
   245   ;
   248   hints: '(' 'hints' (recdefmod * ) ')'
   246   hints: '(' 'hints' (recdefmod * ) ')'
   249   ;
   247   ;
   250   recdefmod: ((recdefsimp | recdefcong | recdefwf) (() | 'add' | 'del') ':' thmrefs) | clasimpmod
   248   recdefmod: ((recdefsimp | recdefcong | recdefwf) (() | 'add' | 'del') ':' thmrefs) | clasimpmod
   251   ;
   249   ;
   327   ('inductive' | 'coinductive') sets intros monos?
   325   ('inductive' | 'coinductive') sets intros monos?
   328   ;
   326   ;
   329   'mono' (() | 'add' | 'del')
   327   'mono' (() | 'add' | 'del')
   330   ;
   328   ;
   331 
   329 
   332   sets: (term comment? +)
   330   sets: (term +)
   333   ;
   331   ;
   334   intros: 'intros' (thmdecl? prop comment? +)
   332   intros: 'intros' (thmdecl? prop +)
   335   ;
   333   ;
   336   monos: 'monos' thmrefs comment?
   334   monos: 'monos' thmrefs
   337   ;
   335   ;
   338 \end{rail}
   336 \end{rail}
   339 
   337 
   340 \begin{descr}
   338 \begin{descr}
   341 \item [$\isarkeyword{inductive}$ and $\isarkeyword{coinductive}$] define
   339 \item [$\isarkeyword{inductive}$ and $\isarkeyword{coinductive}$] define
   402   ;
   400   ;
   403   inducttac goalspec? (insts * 'and') rule?
   401   inducttac goalspec? (insts * 'and') rule?
   404   ;
   402   ;
   405   indcases (prop +)
   403   indcases (prop +)
   406   ;
   404   ;
   407   inductivecases thmdecl? (prop +) comment?
   405   inductivecases thmdecl? (prop +)
   408   ;
   406   ;
   409 
   407 
   410   rule: ('rule' ':' thmref)
   408   rule: ('rule' ':' thmref)
   411   ;
   409   ;
   412 \end{rail}
   410 \end{rail}
   466   'domain' parname? (dmspec + 'and')
   464   'domain' parname? (dmspec + 'and')
   467   ;
   465   ;
   468 
   466 
   469   dmspec: typespec '=' (cons + '|')
   467   dmspec: typespec '=' (cons + '|')
   470   ;
   468   ;
   471   cons: name (type * ) mixfix? comment?
   469   cons: name (type * ) mixfix?
   472   ;
   470   ;
   473   dtrules: 'distinct' thmrefs 'inject' thmrefs 'induction' thmrefs
   471   dtrules: 'distinct' thmrefs 'inject' thmrefs 'induction' thmrefs
   474 \end{rail}
   472 \end{rail}
   475 
   473 
   476 Recursive domains in HOLCF are analogous to datatypes in classical HOL (cf.\ 
   474 Recursive domains in HOLCF are analogous to datatypes in classical HOL (cf.\