src/HOL/Numeral.ML
author nipkow
Thu, 10 May 2001 17:28:40 +0200
changeset 11295 66925f23ac7f
parent 10707 9285b4d87d7d
permissions -rw-r--r--
improved tracing of permutative rules.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8264
fffae6147cf7 Added global let-simplification rule.
nipkow
parents:
diff changeset
     1
(*  Title:      HOL/Numeral.ML
fffae6147cf7 Added global let-simplification rule.
nipkow
parents:
diff changeset
     2
    ID:         $Id$
fffae6147cf7 Added global let-simplification rule.
nipkow
parents:
diff changeset
     3
    Author:     Tobias Nipkow
fffae6147cf7 Added global let-simplification rule.
nipkow
parents:
diff changeset
     4
*)
fffae6147cf7 Added global let-simplification rule.
nipkow
parents:
diff changeset
     5
fffae6147cf7 Added global let-simplification rule.
nipkow
parents:
diff changeset
     6
(*Unfold all "let"s involving constants*)
fffae6147cf7 Added global let-simplification rule.
nipkow
parents:
diff changeset
     7
Goalw [Let_def] "Let (number_of v) f == f (number_of v)";
fffae6147cf7 Added global let-simplification rule.
nipkow
parents:
diff changeset
     8
by(Simp_tac 1);
fffae6147cf7 Added global let-simplification rule.
nipkow
parents:
diff changeset
     9
qed "Let_number_of";
fffae6147cf7 Added global let-simplification rule.
nipkow
parents:
diff changeset
    10
Addsimps [Let_number_of];
10707
9285b4d87d7d re-orienting equations with #nnn on the lhs
paulson
parents: 8264
diff changeset
    11
9285b4d87d7d re-orienting equations with #nnn on the lhs
paulson
parents: 8264
diff changeset
    12
(*The condition "True" is a hack to prevent looping.
9285b4d87d7d re-orienting equations with #nnn on the lhs
paulson
parents: 8264
diff changeset
    13
  Conditional rewrite rules are tried after unconditional ones, so a rule
9285b4d87d7d re-orienting equations with #nnn on the lhs
paulson
parents: 8264
diff changeset
    14
  like eq_nat_number_of will be tried first to eliminate #mm=#nn. *)
9285b4d87d7d re-orienting equations with #nnn on the lhs
paulson
parents: 8264
diff changeset
    15
Goal "True ==> (number_of w = x) = (x = number_of w)";
9285b4d87d7d re-orienting equations with #nnn on the lhs
paulson
parents: 8264
diff changeset
    16
by Auto_tac;  
9285b4d87d7d re-orienting equations with #nnn on the lhs
paulson
parents: 8264
diff changeset
    17
qed "number_of_reorient";
9285b4d87d7d re-orienting equations with #nnn on the lhs
paulson
parents: 8264
diff changeset
    18
Addsimps [number_of_reorient];