doc-src/TutorialI/Advanced/simp.thy
changeset 10845 3696bc935bbd
parent 10795 9e888d60d3e5
child 10885 90695f46440b
equal deleted inserted replaced
10844:0c0e7de7e9c5 10845:3696bc935bbd
   155 sides.  They may not contain extraneous term or type variables, though.
   155 sides.  They may not contain extraneous term or type variables, though.
   156 *}
   156 *}
   157 
   157 
   158 subsubsection{*The preprocessor*}
   158 subsubsection{*The preprocessor*}
   159 
   159 
   160 text{*
   160 text{*\label{sec:simp-preprocessor}
   161 When some theorem is declared a simplification rule, it need not be a
   161 When some theorem is declared a simplification rule, it need not be a
   162 conditional equation already.  The simplifier will turn it into a set of
   162 conditional equation already.  The simplifier will turn it into a set of
   163 conditional equations automatically.  For example, given @{prop"f x =
   163 conditional equations automatically.  For example, given @{prop"f x =
   164 g x & h x = k x"} the simplifier will turn this into the two separate
   164 g x & h x = k x"} the simplifier will turn this into the two separate
   165 simplifiction rules @{prop"f x = g x"} and @{prop"h x = k x"}. In
   165 simplifiction rules @{prop"f x = g x"} and @{prop"h x = k x"}. In
   173 @{text if}\ P\ @{text then}\ Q\ @{text else}\ R &\mapsto&
   173 @{text if}\ P\ @{text then}\ Q\ @{text else}\ R &\mapsto&
   174  P \Longrightarrow Q,\ \neg P \Longrightarrow R \nonumber
   174  P \Longrightarrow Q,\ \neg P \Longrightarrow R \nonumber
   175 \end{eqnarray}
   175 \end{eqnarray}
   176 Once this conversion process is finished, all remaining non-equations
   176 Once this conversion process is finished, all remaining non-equations
   177 $P$ are turned into trivial equations $P = True$.
   177 $P$ are turned into trivial equations $P = True$.
   178 For example, the formula @{prop"(p \<longrightarrow> q \<and> r) \<and> s"} is converted into the three rules
   178 For example, the formula \begin{center}@{prop"(p \<longrightarrow> q \<and> r) \<and> s"}\end{center}
       
   179 is converted into the three rules
   179 \begin{center}
   180 \begin{center}
   180 @{prop"p \<Longrightarrow> q = True"},\quad  @{prop"p \<Longrightarrow> r = True"},\quad  @{prop"s = True"}.
   181 @{prop"p \<Longrightarrow> q = True"},\quad  @{prop"p \<Longrightarrow> r = True"},\quad  @{prop"s = True"}.
   181 \end{center}
   182 \end{center}
   182 \index{simplification rule|)}
   183 \index{simplification rule|)}
   183 \index{simplification|)}
   184 \index{simplification|)}