我试图证明一些事情,我认为会相对简单。
(k≥10 ⟹ 2^(k::nat) > (k::nat)^3)
然而,我陷入困境,不知道如何进步。
lemma "(k≥10 ⟹ 2^(k::nat) > (k::nat)^3)"
proof (induction k)
case 0
then show ?case by simp
next
case (Suc k)
assume "10 ≤ k ⟹ k ^ 3 < 2 ^ k"
assume "10 ≤ Suc k"
show "(Suc k) ^ 3 < 2 ^( Suc k)"
apply (simp add: algebra_simps)
then show ?case sorry
qed
答案 0 :(得分:3)
良好的归纳规则可以省去很多麻烦。您想要使用10
而不是0
开始归纳,那么是否有更好的归纳规则?使用
find_theorems name:ind name:Nat
我找到了这个
Nat.dec_induct: ?i ≤ ?j ⟹ ?P ?i ⟹ (⋀n. ?i ≤ n ⟹ n < ?j ⟹ ?P n ⟹ ?P (Suc n)) ⟹ ?P ?j
从现在开始,它是简单的等式推理,我能够逐步跟踪this math stackexchange answer中的证明:
lemma
assumes "k≥10"
shows "2^(k::nat) > (k::nat)^3"
using assms
proof(induction rule: Nat.dec_induct)
case base show ?case by simp
next
case (step n)
note power2_eq_square[simp] power3_eq_cube[simp] ring_distribs[simp]
have "Suc n ^ 3 = 1 + 3*n + 3*n^2 + n^3" by simp
also have "… < 51*n + 3*n + 3*n^2 + n^3" using `n ≥ 10` by simp
also have "… = 54*n + 3*n^2 + n^3" by simp
also have "… < 6*n^2 + 3*n^2 + n^3" using `n ≥ 10` by simp
also have "… = 9*n^2 + n^3" by simp
also have "… < n^3 + n^3" using `n ≥ 10` by simp
also have "… = 2 * n^3" by simp
also have "… < 2 * 2^n" using `n ^ 3 < 2 ^ n` by simp
also have "… = 2^(Suc n)" by simp
finally show ?case.
qed
答案 1 :(得分:0)
对于代数证明,诀窍是准确识别简化步骤,然后find_theorems
搜索相关规则。代数简化集并不包含积极的简化规则,可能是因为过度简化可能会使目标无法实现。 (有人可以添加更多理由)
在这种特殊情况下,您必须假设10 ≤ k
感应假设起作用。您可以通过case_tac "10 ≤ k"
轻松完成该操作,然后按monoid_mult_class.power3_eq_cube
和le_Suc_ex
重写。对于¬ 10 ≤ k
,您可以使用not_less_eq_eq
来证明目标。