# HG changeset patch # User Cezary Kaliszyk # Date 1270123787 -7200 # Node ID b47c336ba1b7c078104839d0c86552f208acb379 # Parent 24cc3dbd3c4a20e46171fa31c8dd9d85be9f1bfb Cleaning the strong induction example. diff -r 24cc3dbd3c4a -r b47c336ba1b7 Paper/Paper.thy --- a/Paper/Paper.thy Thu Apr 01 12:19:26 2010 +0200 +++ b/Paper/Paper.thy Thu Apr 01 14:09:47 2010 +0200 @@ -1654,47 +1654,52 @@ & & @{text "ACons pat trm al = ACons (\ \bv pat) (\ \ trm) al"} \nonumber \end{eqnarray} - With the Property~\ref{avoiding} we can prove a strong induction principle + \noindent With the Property~\ref{avoiding} we can prove a strong induction principle which we show again only for the interesting constructors in the Core Haskell example. We first show the weak induction principle for comparison: \begin{equation}\nonumber \infer { - @{text "P1 tkind \ P2 ckind \ \ \ P12 cvars"} + \textrm{The properties }@{text "P1, P2, \, P12"}\textrm{ hold for all }@{text "tkind, ckind, \"} }{ \begin{tabular}{cp{7cm}} - @{text "P1 KStar"}\\ - @{text "\tk1 tk2. \P1 tk1; P1 tk2\ \ P1 (KFun tk1 tk2)"}\\ - @{text "\"}\\ - @{text "\v ty t1 t2. \P3 ty; P7 t1; P7 t2\ \ P7 (Let v ty t1 t2)"}\\ - @{text "\p t al. \P9 p; P7 t; P8 al\ \ P8 (ACons p t al)"}\\ +%% @{text "P1 KStar"}\\ +%% @{text "\tk1 tk2. \<^raw:\big(>P1 tk1 \ P1 tk2\<^raw:\big)> \ P1 (KFun tk1 tk2)"}\\ +%% @{text "\"}\\ + @{text "\v ty t1 t2. \<^raw:\big(>P3 ty \ P7 t1 \ P7 t2\<^raw:\big)> \ P7 (Let v ty t1 t2)"}\\ + @{text "\p t al. \<^raw:\big(>P9 p \ P7 t \ P8 al\<^raw:\big)> \ P8 (ACons p t al)"}\\ @{text "\"} \end{tabular} } \end{equation} -In comparison, the cases for the same constructors in the derived strong -induction principle are: + \noindent In comparison, the cases for the same constructors in the derived strong + induction principle are: +%% TODO get rid of the ugly hspaces. \begin{equation}\nonumber \infer { - @{text "P1 a tkind \ P2 a ckind \ \ \ P12 a cvars"} + \begin{tabular}{cp{7cm}} + \textrm{The properties }@{text "P1, P2, \, P12"}\textrm{ hold for all }@{text "tkind, ckind, \"}\\ + \textrm{ avoiding any atoms in a given }@{text "y"} + \end{tabular} }{ \begin{tabular}{cp{7cm}} - @{text "\b. P1 b KStar"}\\ - @{text "\tk1 tk2 b. \\c. P1 c tk1; \c. P1 c tk2\ \ P1 b (KFun tk1 tk2)"}\\ - @{text "\"}\\ - @{text "\v ty t1 t2 b. \\c. P3 c ty; \c. P7 c t1; \c. P7 c t2; atom var \ b\ \ P7 b (Let v ty t1 t2)"}\\ - @{text "\p t al b. \\c. P9 c p; \c. P7 c t; \c. P8 c al; set (bv p) \* b\ \ P8 b (ACons p t al)"}\\ +%% @{text "\b. P1 b KStar"}\\ +%% @{text "\tk1 tk2 b. \<^raw:\big(>\c. P1 c tk1 \ \c. P1 c tk2\<^raw:\big)> \ P1 b (KFun tk1 tk2)"}\\ +%% @{text "\"}\\ + @{text "\v ty t1 t2 b. \<^raw:\big(>\c. P3 c ty \ \c. P7 c t1 \ \c. P7 c t2 \"}\\ + @{text "\<^raw:\hspace{2cm}>\ atom var \ b\<^raw:\big)> \ P7 b (Let v ty t1 t2)"}\\ + @{text "\p t al b. \<^raw:\big(>\c. P9 c p \ \c. P7 c t \ \c. P8 c al \"}\\ + @{text "\<^raw:\hspace{2cm}>\ set (bv p) \* b\<^raw:\big)> \ P8 b (ACons p t al)"}\\ @{text "\"} \end{tabular} } \end{equation} - *} text {*