src/ZF/IntArith.thy
changeset 45602 2a858377c3d2
parent 27237 c94eefffc3a5
child 46821 ff6b0c1087f2
equal deleted inserted replaced
45601:d5178f19b671 45602:2a858377c3d2
     7 (** To simplify inequalities involving integer negation and literals,
     7 (** To simplify inequalities involving integer negation and literals,
     8     such as -x = #3
     8     such as -x = #3
     9 **)
     9 **)
    10 
    10 
    11 lemmas [simp] =
    11 lemmas [simp] =
    12   zminus_equation [where y = "integ_of(w)", standard]
    12   zminus_equation [where y = "integ_of(w)"]
    13   equation_zminus [where x = "integ_of(w)", standard]
    13   equation_zminus [where x = "integ_of(w)"]
       
    14   for w
    14 
    15 
    15 lemmas [iff] =
    16 lemmas [iff] =
    16   zminus_zless [where y = "integ_of(w)", standard]
    17   zminus_zless [where y = "integ_of(w)"]
    17   zless_zminus [where x = "integ_of(w)", standard]
    18   zless_zminus [where x = "integ_of(w)"]
       
    19   for w
    18 
    20 
    19 lemmas [iff] =
    21 lemmas [iff] =
    20   zminus_zle [where y = "integ_of(w)", standard]
    22   zminus_zle [where y = "integ_of(w)"]
    21   zle_zminus [where x = "integ_of(w)", standard]
    23   zle_zminus [where x = "integ_of(w)"]
       
    24   for w
    22 
    25 
    23 lemmas [simp] =
    26 lemmas [simp] =
    24   Let_def [where s = "integ_of(w)", standard]
    27   Let_def [where s = "integ_of(w)"] for w
    25 
    28 
    26 
    29 
    27 (*** Simprocs for numeric literals ***)
    30 (*** Simprocs for numeric literals ***)
    28 
    31 
    29 (** Combining of literal coefficients in sums of products **)
    32 (** Combining of literal coefficients in sums of products **)
    45 
    48 
    46 
    49 
    47 (** For cancel_numerals **)
    50 (** For cancel_numerals **)
    48 
    51 
    49 lemmas rel_iff_rel_0_rls =
    52 lemmas rel_iff_rel_0_rls =
    50   zless_iff_zdiff_zless_0 [where y = "u $+ v", standard]
    53   zless_iff_zdiff_zless_0 [where y = "u $+ v"]
    51   eq_iff_zdiff_eq_0 [where y = "u $+ v", standard]
    54   eq_iff_zdiff_eq_0 [where y = "u $+ v"]
    52   zle_iff_zdiff_zle_0 [where y = "u $+ v", standard]
    55   zle_iff_zdiff_zle_0 [where y = "u $+ v"]
    53   zless_iff_zdiff_zless_0 [where y = n]
    56   zless_iff_zdiff_zless_0 [where y = n]
    54   eq_iff_zdiff_eq_0 [where y = n]
    57   eq_iff_zdiff_eq_0 [where y = n]
    55   zle_iff_zdiff_zle_0 [where y = n]
    58   zle_iff_zdiff_zle_0 [where y = n]
       
    59   for u v (* FIXME n (!?) *)
    56 
    60 
    57 lemma eq_add_iff1: "(i$*u $+ m = j$*u $+ n) <-> ((i$-j)$*u $+ m = intify(n))"
    61 lemma eq_add_iff1: "(i$*u $+ m = j$*u $+ n) <-> ((i$-j)$*u $+ m = intify(n))"
    58   apply (simp add: zdiff_def zadd_zmult_distrib)
    62   apply (simp add: zdiff_def zadd_zmult_distrib)
    59   apply (simp add: zcompare_rls)
    63   apply (simp add: zcompare_rls)
    60   apply (simp add: zadd_ac)
    64   apply (simp add: zadd_ac)