src/HOL/NatArith.thy
author paulson
Tue, 22 May 2001 09:26:57 +0200
changeset 11324 82406bd816a5
parent 11181 d04f57b91166
child 11454 7514e5e21cb8
permissions -rw-r--r--
nat_diff_split_asm, for the assumptions

(*  Title:      HOL/NatArith.thy
    ID:         $Id$

Setup arithmetic proof procedures.
*)

theory NatArith = Nat
files "arith_data.ML":

setup arith_setup

(*elimination of `-' on nat*)
lemma nat_diff_split:
    "P(a - b::nat) = ((a<b --> P 0) & (ALL d. a = b + d --> P d))"
  by (cases "a<b" rule: case_split) (auto simp add: diff_is_0_eq [THEN iffD2])

(*elimination of `-' on nat in assumptions*)
lemma nat_diff_split_asm:
    "P(a - b::nat) = (~ (a < b & ~ P 0 | (EX d. a = b + d & ~ P d)))"
  by (simp split: nat_diff_split)

ML {*
 val nat_diff_split = thm "nat_diff_split";
 val nat_diff_split_asm = thm "nat_diff_split_asm";

(* TODO: use this for force_tac in Provers/clasip.ML *)
fun add_arith cs = cs addafter ("arith_tac", arith_tac);
*}

lemmas [arith_split] = nat_diff_split split_min split_max


end