伊莎贝尔:用大锤获得三种不同的结果,看起来是相同的外表

时间:2014-01-12 15:05:41

标签: isabelle theorem-proving

你需要这个来进行我的导入:

(* tested with Isabelle2013-2  *)
theory Notepad
imports
  Main
  "~~/src/HOL/Library/Polynomial"
begin

notepad
begin

我有三个几乎相同的引理。

版本1:

 {
 fix a :: "('a:: comm_ring_1) poly"
  have "degree((monom 1 1) -CONST pCons a 0) =1" sledgehammer

版本2:

 {
 fix a :: "('a:: comm_ring_1) poly"
 def p ≡ "(monom 1 1) - CONST pCons a 0"
 from p_def have "degree p = 1"

版本3:

{
 fix a :: "('a:: comm_ring_1) poly"
 have "p ≡ (monom 1 1) - CONST pCons a 0 ⟹ degree p = 1" 

这是运行大锤的结果,仅显示e定理 - 证明者结果; 它显示了三个完全不同的结果:

(*
for instance, the three results of the prover e are:
"e": Try this: by (metis One_nat_def degree_1 degree_pCons_eq_if diff_0_right diff_pCons monom_0 monom_Suc one_poly_def zero_neq_one) (2.12 s).
"e": Try this: by (metis coeff_diff coeff_monom coeff_pCons_Suc degree_pCons_eq_if diff_0_right leading_coeff_0_iff pCons_cases zero_neq_one) (> 3 s). 
"e": Try this: by (metis One_nat_def degree_pCons_eq_if diff_0_right diff_pCons monom_0 monom_Suc one_poly_def zero_neq_one) (214 ms).
*)

问题: 这是为什么?是大锤是不确定的吗?或者是Isabelle的三个版本不同,所以大锤有三种不同的输入?

(* tested with Isabelle2013-2  *)
theory Notepad
imports
  Main
  "~~/src/HOL/Library/Polynomial"
begin

notepad
begin
Here is the full code:
 {
 fix a :: "('a:: comm_ring_1) poly"
  have "degree((monom 1 1) -CONST pCons a 0) =1"
(*
Sledgehammering... 
"spass": Try this: by (metis One_nat_def degree_pCons_eq_if diff_0_right diff_pCons monom_0 monom_Suc one_poly_def zero_neq_one) (2.13 s). 
"e": Try this: by (metis One_nat_def degree_1 degree_pCons_eq_if diff_0_right diff_pCons monom_0 monom_Suc one_poly_def zero_neq_one) (2.12 s).
To minimize: sledgehammer min (One_nat_def degree_1 degree_pCons_eq_if diff_0_right diff_pCons monom_0 monom_Suc one_poly_def zero_neq_one). 
"z3": Timed out. 
"remote_vampire": Timed out. 
"remote_e_sine": Try this: by (smt Nat.add_0_right Nat.add_diff_inverse Nat.diff_cancel One_nat_def Suc_diff_1 Suc_diff_Suc Suc_diff_diff Suc_diff_eq_diff_pred Suc_eq_plus1 Suc_eq_plus1_left Suc_inject Suc_le_mono Suc_lessD Suc_lessE Suc_lessI Suc_less_SucD Suc_less_eq Suc_mono Suc_neq_Zero Suc_pred Suc_pred' Zero_neq_Suc Zero_not_Suc add_Suc add_Suc_right add_Suc_shift add_diff_cancel_left' add_diff_cancel_right add_diff_cancel_right' add_eq_if add_eq_self_zero add_gr_0 add_is_0 add_is_1 add_left_cancel add_lessD1 add_less_cancel_left add_less_cancel_right add_less_mono add_less_mono1 add_pCons add_pos_pos add_right_cancel bool.size(1) bool.size(2) bool.size(3) bool.size(4) coeff_0 coeff_1 coeff_add coeff_diff coeff_linear_power coeff_monom coeff_pCons_0 coeff_pCons_Suc comm_monoid_add_class.add.left_neutral comm_monoid_add_class.add.right_neutral comm_monoid_diff_class.add_diff_cancel_left comm_monoid_diff_class.diff_cancel comm_semiring_1_class.normalizing_semiring_rules(32) comm_semiring_1_class.normalizing_semiring_rules(33) degree_0 degree_1 degree_linear_power degree_monom_eq degree_pCons_0 degree_pCons_eq degree_pCons_eq_if degree_synthetic_div diff_0_eq_0 diff_0_right diff_Suc_1 diff_Suc_Suc diff_Suc_eq_diff_pred diff_Suc_less diff_add_0 diff_add_inverse diff_add_inverse2 diff_add_zero diff_cancel2 diff_commute diff_diff_cancel diff_diff_left diff_eq_diff_eq diff_induct diff_is_0_eq diff_is_0_eq' diff_less diff_less_Suc diff_less_iff(1) diff_less_iff(2) diff_less_iff(3) diff_less_iff(4) diff_less_mono2 diff_monom diff_pCons diff_right_commute diff_self diff_self_eq_0 diff_zero diffs0_imp_equal double_add_less_zero_iff_single_add_less_zero double_zero double_zero_sym dvd.dual_order.refl dvd.lift_Suc_mono_less dvd.lift_Suc_mono_less_iff dvd_1_iff_1 dvd_1_left dvd_diff_nat dvd_minus_self dvd_plusE dvd_plus_eq_left dvd_plus_eq_right dvd_pos_nat dvd_reduce eq_diff_eq' eq_iff_diff_eq_0 exists_least_lemma field_power_not_zero gcd_lcm_complete_lattice_nat.bot.extremum gcd_lcm_complete_lattice_nat.bot.extremum_strict gcd_lcm_complete_lattice_nat.bot.extremum_unique gcd_lcm_complete_lattice_nat.bot.extremum_uniqueI gcd_lcm_complete_lattice_nat.bot.not_eq_extremum gcd_lcm_complete_lattice_nat.top.extremum_strict gcd_lcm_complete_lattice_nat.top.extremum_unique gcd_lcm_complete_lattice_nat.top.extremum_uniqueI gcd_lcm_complete_lattice_nat.top.not_eq_extremum gcd_lcm_complete_lattice_nat.top_greatest gr0I gr0_conv_Suc gr0_implies_Suc gr_implies_not0 ind_euclid infinite_descent infinite_descent0 is_zero_null le0 le_0_eq le_add_diff_inverse le_add_diff_inverse2 leading_coeff_0_iff leading_coeff_neq_0 lessE lessI less_Suc0 less_SucE less_SucI less_Suc_eq less_Suc_eq_0_disj less_Suc_induct less_add_Suc1 less_add_Suc2 less_add_eq_less less_antisym less_diff_conv less_dvd_minus less_iff_Suc_add less_imp_Suc_add less_imp_add_positive less_imp_diff_less less_irrefl_nat less_nat_zero_code less_not_refl less_not_refl2 less_not_refl3 less_trans_Suc less_zeroE lift_Suc_mono_less lift_Suc_mono_less_iff linorder_neqE_nat list_decode.cases minus_nat.diff_0 minus_poly.rep_eq minus_real_def monoid_add_class.add.left_neutral monoid_add_class.add.right_neutral monom.rep_eq monom_0 monom_Suc monom_eq_0 monom_eq_0_iff monom_eq_iff n_not_Suc_n nat.inject nat.size(1) nat.size(2) nat.size(3) nat.size(4) nat_add_assoc nat_add_commute nat_add_left_cancel nat_add_left_cancel_le nat_add_left_cancel_less nat_add_left_commute nat_add_right_cancel nat_diff_split nat_diff_split_asm nat_dvd_not_less nat_induct nat_less_cases nat_less_induct nat_lt_two_imp_zero_or_one nat_neq_iff nat_power_eq_Suc_0_iff nat_power_less_imp_less nat_zero_less_power_iff neq0_conv not0_implies_Suc not_add_less1 not_add_less2 not_less0 not_less_eq not_less_less_Suc_eq one_is_add one_poly_def one_reorient order_root pCons_0_0 pCons_cases pCons_eq_0_iff pCons_eq_iff pCons_induct pcompose_0 plus_nat.add_0 poly_0 poly_1 poly_add poly_all_0_iff_0 poly_diff poly_gcd_0_0 poly_gcd_monic poly_gcd_zero_iff poly_minus_degree_zero_const poly_power pow_divides_eq_int pow_divides_eq_nat pow_divides_pow_int pow_divides_pow_nat power_0 power_0_Suc power_0_left power_Suc_0 power_eq_0_iff power_inject_exp power_one power_one_right power_strict_increasing_iff real_0_less_add_iff real_add_eq_0_iff real_add_less_0_iff real_add_minus_iff real_arch_pow real_arch_pow_inv real_lbound_gt_zero realpow_pos_nth realpow_pos_nth2 realpow_pos_nth_unique semiring_numeral_div_class.diff_zero size_bool strict_inc_induct synthetic_div_0 synthetic_div_eq_0_iff synthetic_div_pCons trans_less_add1 trans_less_add2 transitive_stepwise_gt transitive_stepwise_lt_eq triangle_0 triangle_Suc zero_diff zero_induct zero_induct_lemma zero_less_Suc zero_less_diff zero_less_double_add_iff_zero_less_single_add zero_less_power_nat_eq zero_neq_one zero_poly.rep_eq zero_reorient) (> 3 s).
To minimize: sledgehammer min [remote_e_sine] (Nat.add_0_right Nat.add_diff_inverse Nat.diff_cancel One_nat_def Suc_diff_1 Suc_diff_Suc Suc_diff_diff Suc_diff_eq_diff_pred Suc_eq_plus1 Suc_eq_plus1_left Suc_inject Suc_le_mono Suc_lessD Suc_lessE Suc_lessI Suc_less_SucD Suc_less_eq Suc_mono Suc_neq_Zero Suc_pred Suc_pred' Zero_neq_Suc Zero_not_Suc add_Suc add_Suc_right add_Suc_shift add_diff_cancel_left' add_diff_cancel_right add_diff_cancel_right' add_eq_if add_eq_self_zero add_gr_0 add_is_0 add_is_1 add_left_cancel add_lessD1 add_less_cancel_left add_less_cancel_right add_less_mono add_less_mono1 add_pCons add_pos_pos add_right_cancel bool.size(1) bool.size(2) bool.size(3) bool.size(4) coeff_0 coeff_1 coeff_add coeff_diff coeff_linear_power coeff_monom coeff_pCons_0 coeff_pCons_Suc comm_monoid_add_class.add.left_neutral comm_monoid_add_class.add.right_neutral comm_monoid_diff_class.add_diff_cancel_left comm_monoid_diff_class.diff_cancel comm_semiring_1_class.normalizing_semiring_rules(32) comm_semiring_1_class.normalizing_semiring_rules(33) degree_0 degree_1 degree_linear_power degree_monom_eq degree_pCons_0 degree_pCons_eq degree_pCons_eq_if degree_synthetic_div diff_0_eq_0 diff_0_right diff_Suc_1 diff_Suc_Suc diff_Suc_eq_diff_pred diff_Suc_less diff_add_0 diff_add_inverse diff_add_inverse2 diff_add_zero diff_cancel2 diff_commute diff_diff_cancel diff_diff_left diff_eq_diff_eq diff_induct diff_is_0_eq diff_is_0_eq' diff_less diff_less_Suc diff_less_iff(1) diff_less_iff(2) diff_less_iff(3) diff_less_iff(4) diff_less_mono2 diff_monom diff_pCons diff_right_commute diff_self diff_self_eq_0 diff_zero diffs0_imp_equal double_add_less_zero_iff_single_add_less_zero double_zero double_zero_sym dvd.dual_order.refl dvd.lift_Suc_mono_less dvd.lift_Suc_mono_less_iff dvd_1_iff_1 dvd_1_left dvd_diff_nat dvd_minus_self dvd_plusE dvd_plus_eq_left dvd_plus_eq_right dvd_pos_nat dvd_reduce eq_diff_eq' eq_iff_diff_eq_0 exists_least_lemma field_power_not_zero gcd_lcm_complete_lattice_nat.bot.extremum gcd_lcm_complete_lattice_nat.bot.extremum_strict gcd_lcm_complete_lattice_nat.bot.extremum_unique gcd_lcm_complete_lattice_nat.bot.extremum_uniqueI gcd_lcm_complete_lattice_nat.bot.not_eq_extremum gcd_lcm_complete_lattice_nat.top.extremum_strict gcd_lcm_complete_lattice_nat.top.extremum_unique gcd_lcm_complete_lattice_nat.top.extremum_uniqueI gcd_lcm_complete_lattice_nat.top.not_eq_extremum gcd_lcm_complete_lattice_nat.top_greatest gr0I gr0_conv_Suc gr0_implies_Suc gr_implies_not0 ind_euclid infinite_descent infinite_descent0 is_zero_null le0 le_0_eq le_add_diff_inverse le_add_diff_inverse2 leading_coeff_0_iff leading_coeff_neq_0 lessE lessI less_Suc0 less_SucE less_SucI less_Suc_eq less_Suc_eq_0_disj less_Suc_induct less_add_Suc1 less_add_Suc2 less_add_eq_less less_antisym less_diff_conv less_dvd_minus less_iff_Suc_add less_imp_Suc_add less_imp_add_positive less_imp_diff_less less_irrefl_nat less_nat_zero_code less_not_refl less_not_refl2 less_not_refl3 less_trans_Suc less_zeroE lift_Suc_mono_less lift_Suc_mono_less_iff linorder_neqE_nat list_decode.cases minus_nat.diff_0 minus_poly.rep_eq minus_real_def monoid_add_class.add.left_neutral monoid_add_class.add.right_neutral monom.rep_eq monom_0 monom_Suc monom_eq_0 monom_eq_0_iff monom_eq_iff n_not_Suc_n nat.inject nat.size(1) nat.size(2) nat.size(3) nat.size(4) nat_add_assoc nat_add_commute nat_add_left_cancel nat_add_left_cancel_le nat_add_left_cancel_less nat_add_left_commute nat_add_right_cancel nat_diff_split nat_diff_split_asm nat_dvd_not_less nat_induct nat_less_cases nat_less_induct nat_lt_two_imp_zero_or_one nat_neq_iff nat_power_eq_Suc_0_iff nat_power_less_imp_less nat_zero_less_power_iff neq0_conv not0_implies_Suc not_add_less1 not_add_less2 not_less0 not_less_eq not_less_less_Suc_eq one_is_add one_poly_def one_reorient order_root pCons_0_0 pCons_cases pCons_eq_0_iff pCons_eq_iff pCons_induct pcompose_0 plus_nat.add_0 poly_0 poly_1 poly_add poly_all_0_iff_0 poly_diff poly_gcd_0_0 poly_gcd_monic poly_gcd_zero_iff poly_minus_degree_zero_const poly_power pow_divides_eq_int pow_divides_eq_nat pow_divides_pow_int pow_divides_pow_nat power_0 power_0_Suc power_0_left power_Suc_0 power_eq_0_iff power_inject_exp power_one power_one_right power_strict_increasing_iff real_0_less_add_iff real_add_eq_0_iff real_add_less_0_iff real_add_minus_iff real_arch_pow real_arch_pow_inv real_lbound_gt_zero realpow_pos_nth realpow_pos_nth2 realpow_pos_nth_unique semiring_numeral_div_class.diff_zero size_bool strict_inc_induct synthetic_div_0 synthetic_div_eq_0_iff synthetic_div_pCons trans_less_add1 trans_less_add2 transitive_stepwise_gt transitive_stepwise_lt_eq triangle_0 triangle_Suc zero_diff zero_induct zero_induct_lemma zero_less_Suc zero_less_diff zero_less_double_add_iff_zero_less_single_add zero_less_power_nat_eq zero_neq_one zero_poly.rep_eq zero_reorient).
*)

 {
 fix a :: "('a:: comm_ring_1) poly"
 def p ≡ "(monom 1 1) - CONST pCons a 0"
 from p_def have "degree p = 1"
 (*
Sledgehammering... 
"spass": Try this: by (metis One_nat_def degree_pCons_eq_if diff_0_right diff_pCons monom_0 monom_Suc one_poly_def zero_neq_one) (227 ms). 
"remote_e_sine": Timed out. 
"z3": Timed out. 
"remote_vampire": Timed out. 
"e": Try this: by (metis coeff_diff coeff_monom coeff_pCons_Suc degree_pCons_eq_if diff_0_right leading_coeff_0_iff pCons_cases zero_neq_one) (> 3 s). 
Structured proof (> 9.08 s):
proof -
  have f1: "⋀x⇩1 x⇩2. coeff 0 x⇩1 = (x⇩2∷'a poly) ∨ x⇩2 ≠ 0"
    using coeff_monom by simp
  have f2: "⋀x⇩1 x⇩2. (coeff (esk6⇩1 x⇩1) x⇩2∷'a poly) = coeff x⇩1 (Suc x⇩2)"
    by (metis coeff_pCons_Suc pCons_cases)
  have f3: "⋀x⇩1. coeff (monom 1 1) (Suc x⇩1) = coeff p (Suc x⇩1)"
    using p_def by fastforce
  have f4: "⋀x⇩1. Suc (degree (esk6⇩1 x⇩1)) = degree x⇩1 ∨ esk6⇩1 x⇩1 = 0"
    by (metis degree_pCons_eq_if pCons_cases)
  have "⋀x⇩1. degree x⇩1 = 0 ∨ esk6⇩1 x⇩1 ≠ 0"
    by (metis degree_pCons_eq_if pCons_cases)
  hence "esk6⇩1 p ≠ 0"
    using f1 f2 f3 by (metis coeff_monom leading_coeff_0_iff zero_neq_one)
  thus "degree p = 1"
    using f2 f3 f4 by (metis coeff_monom leading_coeff_0_iff)
qed
*) 

{
 fix a :: "('a:: comm_ring_1) poly"
 have "p ≡ (monom 1 1) - CONST pCons a 0 ⟹ degree p = 1" 
(*
Sledgehammering... 
"spass": Try this: by (metis One_nat_def degree_pCons_eq_if diff_0_right diff_pCons monom_0 monom_Suc one_poly_def zero_neq_one) (210 ms). 
"e": Try this: by (metis One_nat_def degree_pCons_eq_if diff_0_right diff_pCons monom_0 monom_Suc one_poly_def zero_neq_one) (214 ms). 
"z3": Timed out. 
"remote_e_sine": Try this: by (smt Nat.add_0_right Nat.add_diff_inverse Nat.diff_cancel One_nat_def Suc_diff_1 Suc_diff_Suc Suc_diff_diff Suc_diff_eq_diff_pred Suc_eq_plus1 Suc_eq_plus1_left Suc_inject Suc_le_mono Suc_lessD Suc_lessE Suc_lessI Suc_less_SucD Suc_less_eq Suc_mono Suc_neq_Zero Suc_pred Suc_pred' Zero_neq_Suc Zero_not_Suc add_Suc add_Suc_right add_Suc_shift add_diff_cancel_left' add_diff_cancel_right add_diff_cancel_right' add_eq_if add_eq_self_zero add_gr_0 add_is_0 add_is_1 add_left_cancel add_lessD1 add_less_cancel_left add_less_cancel_right add_less_mono add_less_mono1 add_pCons add_pos_pos add_right_cancel bool.size(1) bool.size(2) bool.size(3) bool.size(4) coeff_0 coeff_1 coeff_add coeff_diff coeff_linear_power coeff_monom coeff_pCons_0 coeff_pCons_Suc comm_monoid_add_class.add.left_neutral comm_monoid_add_class.add.right_neutral comm_monoid_diff_class.add_diff_cancel_left comm_monoid_diff_class.diff_cancel comm_semiring_1_class.normalizing_semiring_rules(32) comm_semiring_1_class.normalizing_semiring_rules(33) degree_0 degree_1 degree_linear_power degree_monom_eq degree_pCons_0 degree_pCons_eq degree_pCons_eq_if degree_synthetic_div diff_0_eq_0 diff_0_right diff_Suc_1 diff_Suc_Suc diff_Suc_eq_diff_pred diff_Suc_less diff_add_0 diff_add_inverse diff_add_inverse2 diff_add_zero diff_cancel2 diff_commute diff_diff_cancel diff_diff_left diff_eq_diff_eq diff_induct diff_is_0_eq diff_is_0_eq' diff_less diff_less_Suc diff_less_iff(1) diff_less_iff(2) diff_less_iff(3) diff_less_iff(4) diff_less_mono2 diff_monom diff_pCons diff_right_commute diff_self diff_self_eq_0 diff_zero diffs0_imp_equal double_add_less_zero_iff_single_add_less_zero double_zero double_zero_sym dvd.dual_order.refl dvd.lift_Suc_mono_less dvd.lift_Suc_mono_less_iff dvd_1_iff_1 dvd_1_left dvd_diff_nat dvd_minus_self dvd_plusE dvd_plus_eq_left dvd_plus_eq_right dvd_pos_nat dvd_reduce eq_diff_eq' eq_iff_diff_eq_0 exists_least_lemma field_power_not_zero gcd_lcm_complete_lattice_nat.bot.extremum gcd_lcm_complete_lattice_nat.bot.extremum_strict gcd_lcm_complete_lattice_nat.bot.extremum_unique gcd_lcm_complete_lattice_nat.bot.extremum_uniqueI gcd_lcm_complete_lattice_nat.bot.not_eq_extremum gcd_lcm_complete_lattice_nat.top.extremum_strict gcd_lcm_complete_lattice_nat.top.extremum_unique gcd_lcm_complete_lattice_nat.top.extremum_uniqueI gcd_lcm_complete_lattice_nat.top.not_eq_extremum gcd_lcm_complete_lattice_nat.top_greatest gr0I gr0_conv_Suc gr0_implies_Suc gr_implies_not0 ind_euclid infinite_descent infinite_descent0 is_zero_null le0 le_0_eq le_add_diff_inverse le_add_diff_inverse2 leading_coeff_0_iff leading_coeff_neq_0 lessE lessI less_Suc0 less_SucE less_SucI less_Suc_eq less_Suc_eq_0_disj less_Suc_induct less_add_Suc1 less_add_Suc2 less_add_eq_less less_antisym less_diff_conv less_dvd_minus less_iff_Suc_add less_imp_Suc_add less_imp_add_positive less_imp_diff_less less_irrefl_nat less_nat_zero_code less_not_refl less_not_refl2 less_not_refl3 less_trans_Suc less_zeroE lift_Suc_mono_less lift_Suc_mono_less_iff linorder_neqE_nat list_decode.cases minus_nat.diff_0 minus_poly.rep_eq minus_real_def monoid_add_class.add.left_neutral monoid_add_class.add.right_neutral monom.rep_eq monom_0 monom_Suc monom_eq_0 monom_eq_0_iff monom_eq_iff n_not_Suc_n nat.inject nat.size(1) nat.size(2) nat.size(3) nat.size(4) nat_add_assoc nat_add_commute nat_add_left_cancel nat_add_left_cancel_le nat_add_left_cancel_less nat_add_left_commute nat_add_right_cancel nat_diff_split nat_diff_split_asm nat_dvd_not_less nat_induct nat_less_cases nat_less_induct nat_lt_two_imp_zero_or_one nat_neq_iff nat_power_eq_Suc_0_iff nat_power_less_imp_less nat_zero_less_power_iff neq0_conv not0_implies_Suc not_add_less1 not_add_less2 not_less0 not_less_eq not_less_less_Suc_eq one_is_add one_poly_def one_reorient order_root pCons_0_0 pCons_cases pCons_eq_0_iff pCons_eq_iff pCons_induct pcompose_0 plus_nat.add_0 poly_0 poly_1 poly_add poly_all_0_iff_0 poly_diff poly_gcd_0_0 poly_gcd_monic poly_gcd_zero_iff poly_minus_degree_zero_const poly_power pow_divides_eq_int pow_divides_eq_nat pow_divides_pow_int pow_divides_pow_nat power_0 power_0_Suc power_0_left power_Suc_0 power_eq_0_iff power_inject_exp power_one power_one_right power_strict_increasing_iff real_0_less_add_iff real_add_eq_0_iff real_add_less_0_iff real_add_minus_iff real_arch_pow real_arch_pow_inv real_lbound_gt_zero realpow_pos_nth realpow_pos_nth2 realpow_pos_nth_unique semiring_numeral_div_class.diff_zero size_bool strict_inc_induct synthetic_div_0 synthetic_div_eq_0_iff synthetic_div_pCons trans_less_add1 trans_less_add2 transitive_stepwise_gt transitive_stepwise_lt_eq triangle_0 triangle_Suc zero_diff zero_induct zero_induct_lemma zero_less_Suc zero_less_diff zero_less_double_add_iff_zero_less_single_add zero_less_power_nat_eq zero_neq_one zero_poly.rep_eq zero_reorient) (> 3 s).
To minimize: sledgehammer min [remote_e_sine] (Nat.add_0_right Nat.add_diff_inverse Nat.diff_cancel One_nat_def Suc_diff_1 Suc_diff_Suc Suc_diff_diff Suc_diff_eq_diff_pred Suc_eq_plus1 Suc_eq_plus1_left Suc_inject Suc_le_mono Suc_lessD Suc_lessE Suc_lessI Suc_less_SucD Suc_less_eq Suc_mono Suc_neq_Zero Suc_pred Suc_pred' Zero_neq_Suc Zero_not_Suc add_Suc add_Suc_right add_Suc_shift add_diff_cancel_left' add_diff_cancel_right add_diff_cancel_right' add_eq_if add_eq_self_zero add_gr_0 add_is_0 add_is_1 add_left_cancel add_lessD1 add_less_cancel_left add_less_cancel_right add_less_mono add_less_mono1 add_pCons add_pos_pos add_right_cancel bool.size(1) bool.size(2) bool.size(3) bool.size(4) coeff_0 coeff_1 coeff_add coeff_diff coeff_linear_power coeff_monom coeff_pCons_0 coeff_pCons_Suc comm_monoid_add_class.add.left_neutral comm_monoid_add_class.add.right_neutral comm_monoid_diff_class.add_diff_cancel_left comm_monoid_diff_class.diff_cancel comm_semiring_1_class.normalizing_semiring_rules(32) comm_semiring_1_class.normalizing_semiring_rules(33) degree_0 degree_1 degree_linear_power degree_monom_eq degree_pCons_0 degree_pCons_eq degree_pCons_eq_if degree_synthetic_div diff_0_eq_0 diff_0_right diff_Suc_1 diff_Suc_Suc diff_Suc_eq_diff_pred diff_Suc_less diff_add_0 diff_add_inverse diff_add_inverse2 diff_add_zero diff_cancel2 diff_commute diff_diff_cancel diff_diff_left diff_eq_diff_eq diff_induct diff_is_0_eq diff_is_0_eq' diff_less diff_less_Suc diff_less_iff(1) diff_less_iff(2) diff_less_iff(3) diff_less_iff(4) diff_less_mono2 diff_monom diff_pCons diff_right_commute diff_self diff_self_eq_0 diff_zero diffs0_imp_equal double_add_less_zero_iff_single_add_less_zero double_zero double_zero_sym dvd.dual_order.refl dvd.lift_Suc_mono_less dvd.lift_Suc_mono_less_iff dvd_1_iff_1 dvd_1_left dvd_diff_nat dvd_minus_self dvd_plusE dvd_plus_eq_left dvd_plus_eq_right dvd_pos_nat dvd_reduce eq_diff_eq' eq_iff_diff_eq_0 exists_least_lemma field_power_not_zero gcd_lcm_complete_lattice_nat.bot.extremum gcd_lcm_complete_lattice_nat.bot.extremum_strict gcd_lcm_complete_lattice_nat.bot.extremum_unique gcd_lcm_complete_lattice_nat.bot.extremum_uniqueI gcd_lcm_complete_lattice_nat.bot.not_eq_extremum gcd_lcm_complete_lattice_nat.top.extremum_strict gcd_lcm_complete_lattice_nat.top.extremum_unique gcd_lcm_complete_lattice_nat.top.extremum_uniqueI gcd_lcm_complete_lattice_nat.top.not_eq_extremum gcd_lcm_complete_lattice_nat.top_greatest gr0I gr0_conv_Suc gr0_implies_Suc gr_implies_not0 ind_euclid infinite_descent infinite_descent0 is_zero_null le0 le_0_eq le_add_diff_inverse le_add_diff_inverse2 leading_coeff_0_iff leading_coeff_neq_0 lessE lessI less_Suc0 less_SucE less_SucI less_Suc_eq less_Suc_eq_0_disj less_Suc_induct less_add_Suc1 less_add_Suc2 less_add_eq_less less_antisym less_diff_conv less_dvd_minus less_iff_Suc_add less_imp_Suc_add less_imp_add_positive less_imp_diff_less less_irrefl_nat less_nat_zero_code less_not_refl less_not_refl2 less_not_refl3 less_trans_Suc less_zeroE lift_Suc_mono_less lift_Suc_mono_less_iff linorder_neqE_nat list_decode.cases minus_nat.diff_0 minus_poly.rep_eq minus_real_def monoid_add_class.add.left_neutral monoid_add_class.add.right_neutral monom.rep_eq monom_0 monom_Suc monom_eq_0 monom_eq_0_iff monom_eq_iff n_not_Suc_n nat.inject nat.size(1) nat.size(2) nat.size(3) nat.size(4) nat_add_assoc nat_add_commute nat_add_left_cancel nat_add_left_cancel_le nat_add_left_cancel_less nat_add_left_commute nat_add_right_cancel nat_diff_split nat_diff_split_asm nat_dvd_not_less nat_induct nat_less_cases nat_less_induct nat_lt_two_imp_zero_or_one nat_neq_iff nat_power_eq_Suc_0_iff nat_power_less_imp_less nat_zero_less_power_iff neq0_conv not0_implies_Suc not_add_less1 not_add_less2 not_less0 not_less_eq not_less_less_Suc_eq one_is_add one_poly_def one_reorient order_root pCons_0_0 pCons_cases pCons_eq_0_iff pCons_eq_iff pCons_induct pcompose_0 plus_nat.add_0 poly_0 poly_1 poly_add poly_all_0_iff_0 poly_diff poly_gcd_0_0 poly_gcd_monic poly_gcd_zero_iff poly_minus_degree_zero_const poly_power pow_divides_eq_int pow_divides_eq_nat pow_divides_pow_int pow_divides_pow_nat power_0 power_0_Suc power_0_left power_Suc_0 power_eq_0_iff power_inject_exp power_one power_one_right power_strict_increasing_iff real_0_less_add_iff real_add_eq_0_iff real_add_less_0_iff real_add_minus_iff real_arch_pow real_arch_pow_inv real_lbound_gt_zero realpow_pos_nth realpow_pos_nth2 realpow_pos_nth_unique semiring_numeral_div_class.diff_zero size_bool strict_inc_induct synthetic_div_0 synthetic_div_eq_0_iff synthetic_div_pCons trans_less_add1 trans_less_add2 transitive_stepwise_gt transitive_stepwise_lt_eq triangle_0 triangle_Suc zero_diff zero_induct zero_induct_lemma zero_less_Suc zero_less_diff zero_less_double_add_iff_zero_less_single_add zero_less_power_nat_eq zero_neq_one zero_poly.rep_eq zero_reorient). 
Sledgehammer ran out of time.
*)

2 个答案:

答案 0 :(得分:4)

许多陈述都有多个证明。在此处转换语句时,会影响搜索的方向,特别是相关性过滤器。决定论绝不是大锤的设计目标。

答案 1 :(得分:3)

你的问题的非专家,简短回答是你的不同版本会产生不同的问题,只需对使用overlord选项生成的问题文件进行差异即可看出,正如我解释的那样下方。

Jasmin Blanchette是Sledgehammer的主要开发者,但我还没有见过他。他回复了Isabelle的用户邮件列表。拉里保尔森也和Sledgehammer有一些关系。

我回答这个问题,提供一个如何将overlord选项与sledgehammer一起使用的示例。 Windows上的Vampire ATP无法正常工作,所以在我很久以前向Jasmin报告时,他告诉我如何使用overlord生成一个问题文件发送给他,就像我一样解释如下。

我为e证明者生成前两个版本的问题文件。

我一直在努力理解Sledgehammer,以至于我对一个简短的回答感到满意,就像e有一种语言,Sledgehammer把这个引理转化为一个一堆用ee语言表达的事实做了一些魔术,然后报告回到大锤。稍微不同的引理会导致Sledgehammer算法产生不同的事实。毕竟,我们可以多次证明一个定理不止一种方式。"

一个雄心勃勃的人可以使用e使用的语言来匹配Sledgehammer生成的问题文件中的内容。这可能很明显,为什么一个特定的引理,以两种不同的方式说明,会导致e出现两个不同的问题。

e有一个TUM链接:The E Theorem ProverWiki link

现在我详细说明。 overlord选项会在名为prob_e_1的主文件夹中生成问题文件。它会报告一个名为prob_e_1_proof的文件,但我并不关心这一点。

(* Version 1 *)
notepad 
begin
  fix a :: "('a:: comm_ring_1) poly" 
  have "degree((monom 1 1) -CONST pCons a 0) =1"
sledgehammer[overlord=true, provers="e"]
oops

我用你的第二个版本再次执行它,它会覆盖以前的文件:

(* Version 2 *)
notepad begin
 fix a :: "('a:: comm_ring_1) poly"
 def p ≡ "(monom 1 1) - CONST pCons a 0"
 from p_def have "degree p = 1"
sledgehammer[overlord=true, provers="e"]
oops

我重命名了第一个文件。文件大小不同。我使用jEdit插件JDiff轻松做差异。它们从第一行开始是不同的,这是e给出的命令。

为了向您展示您将看到的内容,以下是第一个版本问题的前几行:

% TIMEFORMAT='%3R'; { time (exec 2>&1; '/cygdrive/e/E_2/dev/Isabelle2013-2/contrib/e-1.8/x86-cygwin/eprover' --tstp-in --tstp-out --silent --split-clauses=4 --split-reuse-defs --simul-paramod --forward-context-sr --destructive-er-aggressive --destructive-er --presat-simplify --prefer-initial-clauses -winvfreqrank -c1 -Ginvfreqconjmax -F1 --delete-bad-limit=150000000 -WSelectMaxLComplexAvoidPosPred -H'(4*FunWeight(SimulateSOS,20,20,1.5,1.5,1,a2:0,degree_poly_a:0,minus_154650241poly_a:0,monom_poly_a:0,one_one_nat:0,one_one_poly_a:0,pCons_poly_a:0,zero_z2096148049poly_a:0,minus_1267152911poly_a:8,minus_1927295133poly_a:8,pCons_1263018438poly_a:8,minus_minus_a:9,minus_minus_poly_a:9,pCons_a:9,pCons_poly_poly_a:9,monom_1144868891atural:9,tt_poly_Code_natural:9,zero_z1864290105atural:9,zero_z2076475201atural:9,monom_poly_nat:9,tt_poly_nat:9,zero_z1059985641ly_nat:9,zero_zero_poly_nat:9,monom_67158909poly_a:9,tt_poly_poly_poly_a:9,zero_z1199790189poly_a:9,zero_z2064990175poly_a:9,monom_a:9,tt_a:9,zero_zero_a:9,zero_zero_poly_a:9,monom_poly_poly_a:10,tt_poly_poly_a:10,monom_nat:10,zero_zero_nat:10,monom_Code_natural:10,zero_z353611057atural:10,tt_poly_a:10,pCons_1690884498atural:11,tt_pol1445527701atural:11,pCons_poly_nat:11,tt_poly_poly_nat:11,tt_pol1146364953poly_a:12,pCons_nat:12,pCons_Code_natural:12,minus_1521903873atural:14,minus_minus_nat:14,one_one_poly_poly_a:15,one_one_a:16,one_on446885109atural:16,one_one_Code_natural:16,one_one_poly_nat:16,one_on392296739poly_a:16,degree_a:17,degree_Code_natural:18,degree_nat:18,degree_poly_poly_a:18,aa_poly_poly_a_bool:23,pp:23,aa_poly_a_bool:23,aa_pol1791115049l_bool:23,aa_poly_nat_bool:23,aa_pol1868968491a_bool:23,degree1502533245atural:24,degree_poly_nat:24,degree368812443poly_a:24,is_zero_poly_a:26,is_zero_a:26,is_zero_Code_natural:26,is_zero_nat:26,is_zero_poly_poly_a:26,pcompose_poly_a:27,pcompose_a:27,pcompo775675211atural:27,pcompose_nat:27,pcompose_poly_poly_a:27,power_276493840poly_a:27,power_power_poly_a:27,power_1061922746atural:28,power_power_poly_nat:28,power_1749536158poly_a:28,synthetic_div_poly_a:28,synthetic_div_a:28,synthe389744629atural:28,synthetic_div_nat:28,synthe1271504013poly_a:29,suc:29,coeff_a:30,coeff_poly_poly_a:30,coeff_nat:30,coeff_Code_natural:30,coeff_poly_a:30,coeff_2076392010atural:30,one_on1013003517atural:30,coeff_poly_nat:30,one_on1411366565ly_nat:30,coeff_36192014poly_a:30,one_on1584232881poly_a:30,poly_poly_a:31,poly_nat:31,poly_a:31,a:32,code_natural:32,fFalse:32,fTrue:32,nat:32,poly:32,tt_bool:32,undefi1030841758poly_a:32,undefi122925008atural:32,undefi1684997496ly_nat:32,undefi2131925448atural:32,undefi65090320poly_a:32,undefi880707458poly_a:32,undefined_a:32,undefined_poly_a:32,undefined_poly_nat:32,power_power_nat:36,aa_nat_bool:37,aa_nat_fun_nat_bool:37,code_natural_size:38,size_s686587580atural:38,ord_less_nat:39),3*ConjectureGeneralSymbolWeight(PreferNonGoals,200,100,200,50,50,1,100,1.5,1.5,1),1*Clauseweight(PreferProcessed,1,1,1),1*FIFOWeight(PreferProcessed))'  --term-ordering=KBO6 --cpu-limit=9 --proof-object=1 '/cygdrive/e/E_1/02-p/pi/home/.isabelle/Isabelle2013-2/prob_e_1' ) ; }
% This file was generated by Isabelle (most likely Sledgehammer)
% 2014-01-12 10:46:41.037

% Explicit typings (80)
fof(tsy_c_Groups_Ominus__class_Ominus_001t__Polynomial__Opoly_It__Polynomial__Opoly_It__Polynomial__Opoly_It__Polynomial__Opoly_Itf__a_J_J_J_J, axiom,
    ((![B_1, B_2]: tt_pol1146364953poly_a(minus_1927295133poly_a(B_1, B_2)) = minus_1927295133poly_a(B_1, B_2)))).
fof(tsy_c_Groups_Ominus__class_Ominus_001t__Polynomial__Opoly_It__Polynomial__Opoly_It__Polynomial__Opoly_Itf__a_J_J_J, axiom,
    ((![B_1, B_2]: tt_poly_poly_poly_a(minus_1267152911poly_a(B_1, B_2)) = minus_1267152911poly_a(B_1, B_2)))).
fof(tsy_c_Groups_Ominus__class_Ominus_001t__Polynomial__Opoly_It__Polynomial__Opoly_Itf__a_J_J, hypothesis,
    ((![B_1, B_2]: tt_poly_poly_a(minus_154650241poly_a(B_1, B_2)) = minus_154650241poly_a(B_1, B_2)))).

我将您的第一个版本转换为使用theorem而不是notepad,问题文件除了时间戳和其他一行外都是相同的。

(* Version 1 as theorem *)
theorem
  fixes a :: "('a:: comm_ring_1) poly"
  shows "degree((monom 1 1) -CONST pCons a 0) =1"
(*sledgehammer[overlord=true, provers="e"]*)
by(metis 
  One_nat_def degree_pCons_eq_if diff_0_right diff_pCons monom_0 
  monom_Suc one_poly_def zero_neq_one)

关于大锤是否具有决定性

更新140112_1651

周日晚上没有专家出现过,所以我在下面提供了一些Sledgehammer文档链接,作为文档gofer。

首先,我做了3个简单的观察,关于Sledgehammer是否可以像OP定义的那样确定性,"在某种意义上说,如果你连续几次运行大锤(即,在完全相同的定理定义上)你得到相同的结果"。除了他的定义,我对决定论一无所知。

对于大锤来说是确定性的,我看到三件事必须是确定性的,在那里我试图保持足够的正确性。

此外,PIDE可能存在大量多线程,这会极大地影响处理分配给任何事物和所有内容的方式,这会影响特定ATP是否会找到特定证据。

  1. 给定一个定理陈述和一组固定的可用事实(先验定理),对于特定的自动定理证明器(ATP),Sledgehammer算法必须始终为ATP产生相同的问题。最初存在问题,但是Sledgehammer可能会为ATP试图消除不必要的事实产生一系列问题。 (它可能更复杂,一些固定问题会产生相同的结果。)
  2. 对于ATP从Sledgehammer收到的固定问题,ATP证明尝试必须始终以同样的方式成功或失败。
  3. smtmetis方法,在给定相同事实的情况下,必须始终以相同方式成功或失败。这可能是一个明智的选择,但我列出了它。
  4. 基本上,我上面列表中的值是它可能会带走一些大锤的神秘感。大锤是什么是产生问题的Sledgehammer算法,第三方ATP以及smtmetis证明方法之间的团队努力。

    在可用的数千个定理中,大锤找到了适用的定理并用它们来给ATP提供ATP语言的问题。 ATP用定理执行其逻辑魔法,然后向Sledgehammer报告。 Sledgehammer从ATP读取返回消息,如果找到证据,它会在输出面板中建议可以使用smtmetis证明。在这个过程中,Sledgehammer可以自己回放证据来消除不必要的事实,或根据所选择的Sledgehammer选项可以做的各种事情。

    以下是Larry Paulson的网页,其中包含Isabelle和ATPs特有的文档:

    Linking Isabelle with Automated Theorem Provers

    在顶部是各种出版物页面的链接,其中一些下拉。

    这是Jasmin Blanchette的出版物页面,它恰好包含了他所有的东西,所以我链接到他的研讨会论文部分,以及Paulson和Blanchette的一篇论文,我发现这是一篇易于阅读的概述。

    我们可以假设大锤专家可以在我的清单中回答1和3。他们也会熟悉ATP的大部分内容,但他们可能并不关心自己了解ATP的所有内容,除了防止不一致之类的事情。< / p>