author wenzelm Sat, 20 Jan 2001 00:32:56 +0100 changeset 10945 58ddb5049335 parent 10944 710ddb9e8b5e child 10946 c03f7dcee8b2
 src/HOL/IsaMakefile file | annotate | diff | comparison | revisions src/HOL/Library/Ring_and_Field_Example.thy file | annotate | diff | comparison | revisions
```--- a/src/HOL/IsaMakefile	Sat Jan 20 00:01:40 2001 +0100
+++ b/src/HOL/IsaMakefile	Sat Jan 20 00:32:56 2001 +0100
@@ -178,7 +178,8 @@

\$(LOG)/HOL-Library.gz: \$(OUT)/HOL Library/Accessible_Part.thy \
Library/Library.thy Library/List_Prefix.thy Library/Multiset.thy \
+  Library/Quotient.thy Library/Ring_and_Field.thy \
Library/Nested_Environment.thy Library/Rational_Numbers.thy Library/ROOT.ML \
Library/While_Combinator.thy Library/While_Combinator_Example.thy
@\$(ISATOOL) usedir \$(OUT)/HOL Library```
```--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/HOL/Library/Ring_and_Field_Example.thy	Sat Jan 20 00:32:56 2001 +0100
@@ -0,0 +1,24 @@
+
+header {* \title{}\subsection{Example: The ordered ring of integers} *}
+
+theory Ring_and_Field_Example = Ring_and_Field:
+
+instance int :: ordered_ring
+proof
+  fix i j k :: int
+  show "(i + j) + k = i + (j + k)" by simp
+  show "i + j = j + i" by simp
+  show "0 + i = i" by simp
+  show "- i + i = 0" by simp
+  show "i - j = i + (-j)" by simp
+  show "(i * j) * k = i * (j * k)" by simp
+  show "i * j = j * i" by simp
+  show "#1 * i = i" by simp
+  show "0 = (#0::int)" by simp
+  show "(i + j) * k = i * k + j * k" by (simp add: int_distrib)
+  show "i \<le> j ==> k + i \<le> k + j" by simp
+  show "i < j ==> 0 < k ==> k * i < k * j" by (simp add: zmult_zless_mono2)
+  show "\<bar>i\<bar> = (if i < 0 then -i else i)" by (simp only: zabs_def)
+qed
+
+end```