equal
deleted
inserted
replaced
1 (* Title: HOL/OrderedGroup.thy |
1 (* Title: HOL/OrderedGroup.thy |
2 ID: $Id$ |
2 Author: Gertrud Bauer, Steven Obua, Lawrence C Paulson, Markus Wenzel, Jeremy Avigad |
3 Author: Gertrud Bauer, Steven Obua, Lawrence C Paulson, and Markus Wenzel, |
|
4 with contributions by Jeremy Avigad |
|
5 *) |
3 *) |
6 |
4 |
7 header {* Ordered Groups *} |
5 header {* Ordered Groups *} |
8 |
6 |
9 theory OrderedGroup |
7 theory OrderedGroup |
1374 fun agrp_ord (Const (a, _)) = find_index (fn a' => a = a') |
1372 fun agrp_ord (Const (a, _)) = find_index (fn a' => a = a') |
1375 [@{const_name HOL.zero}, @{const_name HOL.plus}, |
1373 [@{const_name HOL.zero}, @{const_name HOL.plus}, |
1376 @{const_name HOL.uminus}, @{const_name HOL.minus}] |
1374 @{const_name HOL.uminus}, @{const_name HOL.minus}] |
1377 | agrp_ord _ = ~1; |
1375 | agrp_ord _ = ~1; |
1378 |
1376 |
1379 fun termless_agrp (a, b) = (Term.term_lpo agrp_ord (a, b) = LESS); |
1377 fun termless_agrp (a, b) = (TermOrd.term_lpo agrp_ord (a, b) = LESS); |
1380 |
1378 |
1381 local |
1379 local |
1382 val ac1 = mk_meta_eq @{thm add_assoc}; |
1380 val ac1 = mk_meta_eq @{thm add_assoc}; |
1383 val ac2 = mk_meta_eq @{thm add_commute}; |
1381 val ac2 = mk_meta_eq @{thm add_commute}; |
1384 val ac3 = mk_meta_eq @{thm add_left_commute}; |
1382 val ac3 = mk_meta_eq @{thm add_left_commute}; |