qpaper/examples
authorCezary Kaliszyk <kaliszyk@in.tum.de>
Mon, 14 Jun 2010 07:55:02 +0200
changeset 2239 ff997de1bd73
parent 2238 8ddf1330f2ed
child 2240 6c4b54482396
qpaper/examples
Quotient-Paper/Paper.thy
--- a/Quotient-Paper/Paper.thy	Mon Jun 14 04:38:25 2010 +0200
+++ b/Quotient-Paper/Paper.thy	Mon Jun 14 07:55:02 2010 +0200
@@ -874,17 +874,26 @@
 
 text {*
 
-  A user of our quotient package first needs to define an equivalence relation:
+  In this section we will show, a complete interaction with the quotient package
+  for lifting a theorem about integers. A user of our quotient package first
+  needs to define a relation on the raw type, by which the quotienting will be
+  performed. We give the same integer relation as the one presented in the
+  introduction:
 
-  @{text "fun \<approx> where (x, y) \<approx> (u, v) = (x + v = u + y)"}
-
-  Then the user defines a quotient type:
+  \begin{isabelle}\ \ \ \ \ \ \ \ \ \ %%%
+  \isacommand{fun}~~@{text "\<approx>"}~~\isacommand{where}~~@{text "(x \<Colon> nat, y) \<approx> (u, v) = (x + v = u + y)"}
+  \end{isabelle}
 
-  @{text "quotient_type int = (nat \<times> nat) / \<approx>"}
+  \noindent
+  Next the quotient type is defined. This leaves a proof obligation that the
+  relation is an equivalence relation which is solved automatically using the
+  definitions:
 
-  Which leaves a proof obligation that the relation is an equivalence relation,
-  that can be solved with the automatic tactic with two definitions.
+  \begin{isabelle}\ \ \ \ \ \ \ \ \ \ %%%
+  \isacommand{quotient\_type}~~@{text "int"}~~\isacommand{=}~~@{text "(nat \<times> nat)"}~~\isacommand{/}~~@{text "\<approx>"}
+  \end{isabelle}
 
+  \noindent
   The user can then specify the constants on the quotient type:
 
   @{text "quotient_definition 0 \<Colon> int is (0\<Colon>nat, 0\<Colon>nat)"}