doc-src/IsarAdvanced/Codegen/Thy/examples/lexicographic.ML
changeset 24421 acfb2413faa3
parent 24193 926dde4d96de
child 26513 6f306c8c2c54
--- a/doc-src/IsarAdvanced/Codegen/Thy/examples/lexicographic.ML	Fri Aug 24 14:14:16 2007 +0200
+++ b/doc-src/IsarAdvanced/Codegen/Thy/examples/lexicographic.ML	Fri Aug 24 14:14:17 2007 +0200
@@ -1,8 +1,8 @@
 structure HOL = 
 struct
 
-type 'a eq = {eq : 'a -> 'a -> bool};
-fun eq (A_:'a eq) = #eq A_;
+type 'a eq = {eqop : 'a -> 'a -> bool};
+fun eqop (A_:'a eq) = #eqop A_;
 
 type 'a ord = {less_eq : 'a -> 'a -> bool, less : 'a -> 'a -> bool};
 fun less_eq (A_:'a ord) = #less_eq A_;
@@ -13,7 +13,8 @@
 structure Codegen = 
 struct
 
-fun less_eq_product (A1_, A2_) B_ (x1, y1) (x2, y2) =
-  HOL.less A2_ x1 x2 orelse HOL.eq A1_ x1 x2 andalso HOL.less_eq B_ y1 y2;
+fun less_eq (A1_, A2_) B_ (x1, y1) (x2, y2) =
+  HOL.less A2_ x1 x2 orelse
+    HOL.eqop A1_ x1 x2 andalso HOL.less_eq B_ y1 y2;
 
 end; (*struct Codegen*)