0

n各単項式の指数が より小さいか等しい場合、単項式の和の次数は常に より小さいか等しいことを示す補題に取り組んでいnます。

lemma degree_poly_smaller:
  fixes a :: "('a::comm_ring_1 poly)" and n::nat
  shows "degree (∑x∷nat | x ≤ n . monom (coeff a x) x) ≤ n"
sorry

これまでのところ、次のことを行う必要があります (Isabelle の初心者であることに注意してください)。

lemma degree_smaller:
  fixes a :: "('a::comm_ring_1 poly)" and n::nat
  shows "degree (∑x∷nat | x ≤ n . monom (coeff a x) x) ≤ n"
proof-

 have th01: "⋀k. k ≤ n ⟹ 
             degree (setsum (λ x . monom (coeff a x) k) {x∷nat. x ≤ n})  ≤ n" 
                    by (metis degree_monom_le monom_setsum order_trans)

 have min_lemma1: "k∈{x∷nat. x ≤ n} ⟹ k ≤ n" by simp

 from this th01 have th02: 
     "⋀k. k∈{x∷nat. x ≤ n} ⟹ 
     degree (setsum (λ x . monom (coeff a x) k) {x∷nat. x ≤ n})  ≤ n" 
                                             by (metis mem_Collect_eq)

 have min_lemma2: "(SOME y . y ≤ n) ≤ n" by (metis (full_types) le0 some_eq_ex)

 from this have th03: 
     "degree (∑x∷nat | x ≤ n . monom (coeff a x) (SOME y . y ≤ n)) ≤ n" 
                                                         by (metis th01)

 from min_lemma1 min_lemma2 have min_lemma3: 
     "(SOME y . y∈{x∷nat. x ≤ n}) ≤ n" by (metis (full_types) mem_Collect_eq some_eq_ex)

 from this th01 th02 th03 have th04: 
     "degree (∑x∷nat | x ≤ n . monom (coeff a x) (SOME y . y∈{x∷nat. x ≤ n}) ) ≤ n" 
                                                                      by presburger

ここに問題があります。次の補題が証明を完了するのに十分でない理由がわかりません。特に、最後の部分 (申し訳ありませんが) は、大槌が証明を見つけるのに十分なほど単純であると思います。

 from this th01 th02 th03 th04  have th05: 
 "degree 
  (setsum (λ i . monom (coeff a i) (SOME y . y∈{x∷nat. x ≤ n})) {x∷nat. x ≤ n})
   ≤ n"
        by linarith

  (* how can I prove this last step ? *)
  from this have 
    "degree (setsum (λ i . monom (coeff a i) i) {x∷nat. x ≤ n}) ≤ n" sorry 

  from this show ?thesis by auto
qed

.
Brian Huffman の優れた回答からの解決策:
.

lemma degree_setsum_smaller:
  "finite A ⟹ ∀x∈A. degree (f x) ≤ n ⟹ degree (∑x∈A. f x) ≤ n"
apply(induct rule: finite_induct)
apply(auto)
by (metis degree_add_le)

lemma finiteSetSmallerThanNumber: 
   "finite {x∷nat. x ≤ n}" 
by (metis finite_Collect_le_nat)

lemma degree_smaller:
  fixes a :: "('a::comm_ring_1 poly)" and n::nat
  shows "degree (∑x∷nat | x ≤ n . monom (coeff a x) x) ≤ n"
apply (rule degree_setsum_smaller)
apply(simp add: finiteSetSmallerThanNumber)
by (metis degree_0 degree_monom_eq le0 mem_Collect_eq monom_eq_0_iff) (* from sledgehammer *)
4

2 に答える 2

1

auto を apply スクリプトの最後のメソッド以外に使用するのは、一般的に悪いスタイルと考えられています。「finiteSetSmallerThanNumber」補題を完全に削除します。これは、Collect_le_nat の不必要に特殊なケースです。また、定理のキャメルケース名は通常 Isabelle では使用されません。

とにかく、これは証明をより良くする方法の私の提案です:

lemma degree_setsum_smaller:
  "finite A ⟹ ∀x∈A. degree (f x) ≤ n ⟹ degree (∑x∈A. f x) ≤ n"
by (induct rule: finite_induct, simp_all add: degree_add_le)

lemma degree_smaller:
  fixes a :: "('a::comm_ring_1 poly)" and n::nat
  shows "degree (∑x∷nat | x ≤ n . monom (coeff a x) x) ≤ n"
proof (rule degree_setsum_smaller)
  show "finite {x. x ≤ n}" using finite_Collect_le_nat .
  {
    fix x assume "x ≤ n"
    hence "degree (monom (coeff a x) x) ≤ n"
        by (cases "coeff a x = 0", simp_all add: degree_monom_eq)
  }
  thus "∀x∈{x. x≤ n}. degree (monom (coeff a x) x) ≤ n" by simp
qed
于 2013-09-24T21:27:18.987 に答える