src/Doc/Logics/document/HOL.tex
changeset 61424 c3658c18b7bc
parent 58318 f95754ca7082
child 64267 b9a1486e79be
equal deleted inserted replaced
61423:9b6a0fb85fa3 61424:c3658c18b7bc
  1011         & & generalized projection\\
  1011         & & generalized projection\\
  1012   \cdx{Sigma}  & 
  1012   \cdx{Sigma}  & 
  1013         $[\alpha\,set, \alpha\To\beta\,set]\To(\alpha\times\beta)set$ &
  1013         $[\alpha\,set, \alpha\To\beta\,set]\To(\alpha\times\beta)set$ &
  1014         & general sum of sets
  1014         & general sum of sets
  1015 \end{constants}
  1015 \end{constants}
  1016 %\tdx{fst_def}      fst p     == @a. ? b. p = (a,b)
  1016 %\tdx{fst_def}      fst p         == @a. ? b. p = (a,b)
  1017 %\tdx{snd_def}      snd p     == @b. ? a. p = (a,b)
  1017 %\tdx{snd_def}      snd p         == @b. ? a. p = (a,b)
  1018 %\tdx{split_def}    split c p == c (fst p) (snd p)
  1018 %\tdx{split_def}    case_prod c p == c (fst p) (snd p)
  1019 \begin{ttbox}\makeatletter
  1019 \begin{ttbox}\makeatletter
  1020 \tdx{Sigma_def}    Sigma A B == UN x:A. UN y:B x. {\ttlbrace}(x,y){\ttrbrace}
  1020 \tdx{Sigma_def}    Sigma A B == UN x:A. UN y:B x. {\ttlbrace}(x,y){\ttrbrace}
  1021 
  1021 
  1022 \tdx{Pair_eq}      ((a,b) = (a',b')) = (a=a' & b=b')
  1022 \tdx{prod.inject}      ((a,b) = (a',b')) = (a=a' & b=b')
  1023 \tdx{Pair_inject}  [| (a, b) = (a',b');  [| a=a';  b=b' |] ==> R |] ==> R
  1023 \tdx{Pair_inject}  [| (a, b) = (a',b');  [| a=a';  b=b' |] ==> R |] ==> R
  1024 \tdx{PairE}        [| !!x y. p = (x,y) ==> Q |] ==> Q
  1024 \tdx{prod.exhaust}        [| !!x y. p = (x,y) ==> Q |] ==> Q
  1025 
  1025 
  1026 \tdx{fst_conv}     fst (a,b) = a
  1026 \tdx{fst_conv}     fst (a,b) = a
  1027 \tdx{snd_conv}     snd (a,b) = b
  1027 \tdx{snd_conv}     snd (a,b) = b
  1028 \tdx{surjective_pairing}  p = (fst p,snd p)
  1028 \tdx{surjective_pairing}  p = (fst p,snd p)
  1029 
  1029 
  1030 \tdx{split}        split c (a,b) = c a b
  1030 \tdx{split}        case_prod c (a,b) = c a b
  1031 \tdx{split_split}  R(split c p) = (! x y. p = (x,y) --> R(c x y))
  1031 \tdx{prod.split}  R(case_prod c p) = (! x y. p = (x,y) --> R(c x y))
  1032 
  1032 
  1033 \tdx{SigmaI}    [| a:A;  b:B a |] ==> (a,b) : Sigma A B
  1033 \tdx{SigmaI}    [| a:A;  b:B a |] ==> (a,b) : Sigma A B
  1034 
  1034 
  1035 \tdx{SigmaE}    [| c:Sigma A B; !!x y.[| x:A; y:B x; c=(x,y) |] ==> P 
  1035 \tdx{SigmaE}    [| c:Sigma A B; !!x y.[| x:A; y:B x; c=(x,y) |] ==> P 
  1036           |] ==> P
  1036           |] ==> P
  1057 \end{center}
  1057 \end{center}
  1058 Nested patterns are also supported.  They are translated stepwise:
  1058 Nested patterns are also supported.  They are translated stepwise:
  1059 \begin{eqnarray*}
  1059 \begin{eqnarray*}
  1060 \hbox{\tt\%($x$,$y$,$z$).\ $t$} 
  1060 \hbox{\tt\%($x$,$y$,$z$).\ $t$} 
  1061    & \leadsto & \hbox{\tt\%($x$,($y$,$z$)).\ $t$} \\
  1061    & \leadsto & \hbox{\tt\%($x$,($y$,$z$)).\ $t$} \\
  1062    & \leadsto & \hbox{\tt split(\%$x$.\%($y$,$z$).\ $t$)}\\
  1062    & \leadsto & \hbox{\tt case_prod(\%$x$.\%($y$,$z$).\ $t$)}\\
  1063    & \leadsto & \hbox{\tt split(\%$x$.\ split(\%$y$ $z$.\ $t$))}
  1063    & \leadsto & \hbox{\tt case_prod(\%$x$.\ case_prod(\%$y$ $z$.\ $t$))}
  1064 \end{eqnarray*}
  1064 \end{eqnarray*}
  1065 The reverse translation is performed upon printing.
  1065 The reverse translation is performed upon printing.
  1066 \begin{warn}
  1066 \begin{warn}
  1067   The translation between patterns and \texttt{split} is performed automatically
  1067   The translation between patterns and \texttt{split} is performed automatically
  1068   by the parser and printer.  Thus the internal and external form of a term
  1068   by the parser and printer.  Thus the internal and external form of a term