(* Title: HOL/Nitpick_Examples/Integer_Nits.thy Author: Jasmin Blanchette, TU Muenchen Copyright 2009-2012 Examples featuring Nitpick applied to natural numbers and integers. *) section ‹Examples Featuring Nitpick Applied to Natural Numbers and Integers› theory Integer_Nits imports Main begin nitpick_params [verbose, card = 1-5, bits = 1,2,3,4,6, sat_solver = MiniSat, max_threads = 1, timeout = 240] lemma "Suc x = x + 1" nitpick [unary_ints, expect = none] nitpick [binary_ints, expect = none] sorry lemma "x < Suc x" nitpick [unary_ints, expect = none] nitpick [binary_ints, expect = none] sorry lemma "x + y ≥ (x::nat)" nitpick [unary_ints, expect = none] nitpick [binary_ints, expect = none] sorry lemma "y ≠ 0 ⟹ x + y > (x::nat)" nitpick [unary_ints, expect = none] nitpick [binary_ints, expect = none] sorry lemma "x + y = y + (x::nat)" nitpick [unary_ints, expect = none] nitpick [binary_ints, expect = none] sorry lemma "x > y ⟹ x - y ≠ (0::nat)" nitpick [unary_ints, expect = none] nitpick [binary_ints, expect = none] sorry lemma "x ≤ y ⟹ x - y = (0::nat)" nitpick [unary_ints, expect = none] nitpick [binary_ints, expect = none] sorry lemma "x - (0::nat) = x" nitpick [unary_ints, expect = none] nitpick [binary_ints, expect = none] sorry lemma "⟦x ≠ 0; y ≠ 0⟧ ⟹ x * y ≠ (0::nat)" nitpick [unary_ints, expect = none] nitpick [binary_ints, expect = none] sorry lemma "0 * y = (0::nat)" nitpick [unary_ints, expect = none] nitpick [binary_ints, expect = none] sorry lemma "y * 0 = (0::nat)" nitpick [unary_ints, expect = none] nitpick [binary_ints, expect = none] sorry lemma "⟦x ≠ 0; y ≠ 0⟧ ⟹ x * y ≥ (x::nat)" nitpick [unary_ints, expect = none] nitpick [binary_ints, expect = none] sorry lemma "⟦x ≠ 0; y ≠ 0⟧ ⟹ x * y ≥ (y::nat)" nitpick [unary_ints, expect = none] nitpick [binary_ints, expect = none] sorry lemma "x * y div y = (x::nat)" nitpick [unary_ints, expect = genuine] nitpick [binary_ints, expect = genuine] oops lemma "y ≠ 0 ⟹ x * y div y = (x::nat)" nitpick [unary_ints, expect = none] nitpick [binary_ints, expect = none] sorry lemma "5 * 55 < (260::nat)" nitpick [unary_ints, expect = none] nitpick [binary_ints, expect = none] nitpick [binary_ints, bits = 9, expect = genuine] oops lemma "nat (of_nat n) = n" nitpick [unary_ints, expect = none] nitpick [binary_ints, expect = none] sorry lemma "x + y ≥ (x::int)" nitpick [unary_ints, expect = genuine] nitpick [binary_ints, expect = genuine] oops lemma "⟦x ≥ 0; y ≥ 0⟧ ⟹ x + y ≥ (0::int)" nitpick [unary_ints, expect = none] nitpick [binary_ints, expect = none] sorry lemma "y ≥ 0 ⟹ x + y ≥ (x::int)" nitpick [unary_ints, expect = none] nitpick [binary_ints, expect = none] sorry lemma "x ≥ 0 ⟹ x + y ≥ (y::int)" nitpick [unary_ints, expect = none] nitpick [binary_ints, expect = none] sorry lemma "x ≥ 0 ⟹ x + y ≥ (x::int)" nitpick [unary_ints, expect = genuine] nitpick [binary_ints, expect = genuine] oops lemma "⟦x ≤ 0; y ≤ 0⟧ ⟹ x + y ≤ (0::int)" nitpick [unary_ints, expect = none] nitpick [binary_ints, expect = none] sorry lemma "y ≠ 0 ⟹ x + y > (x::int)" nitpick [unary_ints, expect = genuine] nitpick [binary_ints, expect = genuine] oops lemma "x + y = y + (x::int)" nitpick [unary_ints, expect = none] nitpick [binary_ints, expect = none] sorry lemma "x > y ⟹ x - y ≠ (0::int)" nitpick [unary_ints, expect = none] nitpick [binary_ints, expect = none] sorry lemma "x ≤ y ⟹ x - y = (0::int)" nitpick [unary_ints, expect = genuine] nitpick [binary_ints, expect = genuine] oops lemma "x - (0::int) = x" nitpick [unary_ints, expect = none] nitpick [binary_ints, expect = none] sorry lemma "⟦x ≠ 0; y ≠ 0⟧ ⟹ x * y ≠ (0::int)" nitpick [unary_ints, expect = none] nitpick [binary_ints, expect = none] sorry lemma "0 * y = (0::int)" nitpick [unary_ints, expect = none] nitpick [binary_ints, expect = none] sorry lemma "y * 0 = (0::int)" nitpick [unary_ints, expect = none] nitpick [binary_ints, expect = none] sorry lemma "⟦x ≠ 0; y ≠ 0⟧ ⟹ x * y ≥ (x::int)" nitpick [unary_ints, expect = genuine] nitpick [binary_ints, expect = genuine] oops lemma "⟦x ≠ 0; y ≠ 0⟧ ⟹ x * y ≥ (y::int)" nitpick [unary_ints, expect = genuine] nitpick [binary_ints, expect = genuine] oops lemma "x * y div y = (x::int)" nitpick [unary_ints, expect = genuine] nitpick [binary_ints, expect = genuine] oops lemma "y ≠ 0 ⟹ x * y div y = (x::int)" nitpick [unary_ints, expect = none] nitpick [binary_ints, card = 1-4, bits = 1-4, expect = none] sorry lemma "(x * y < 0) ⟷ (x > 0 ∧ y < 0) ∨ (x < 0 ∧ y > (0::int))" nitpick [unary_ints, expect = none] nitpick [binary_ints, expect = none] sorry lemma "-5 * 55 > (-260::int)" nitpick [unary_ints, expect = none] nitpick [binary_ints, expect = none] nitpick [binary_ints, bits = 9, expect = genuine] oops lemma "nat (of_nat n) = n" nitpick [unary_ints, expect = none] nitpick [binary_ints, expect = none] sorry