用 Isabelle 证明谓词逻辑

问题描述

我试图证明以下引理:

lemma myLemma6: "(∀x. A(x) ∧ B(x))= ((∀x. A(x)) ∧ (∀x. B(x)))"

我试图从消除 forall 量词开始,所以这是我尝试的:

lemma myLemma6: "(∀x. A(x) ∧ B(x))= ((∀x. A(x)) ∧ (∀x. B(x)))"
  apply(rule iffI)
  apply ( erule_tac x="x" in allE)
  apply (rule allE)
  (*goal now: get rid of conj on both sides and the quantifiers on right*)
  apply (erule conjE) (*isn't conjE supposed to be used with elim/erule?*)
  apply (rule allI)
  apply (assumption)
  
  
  apply ( rule conjI) (*at this point,the following starts to make no sense... *)
    
   apply (rule conjE) (*should be erule?*)
   apply ( rule conjI)
   apply ( rule conjI)

  ...

最后我才开始根据上次申请的结果采取行动,但在我看来是错误的,可能是因为一开始有一些错误......有人可以向我解释我的错误以及如何完成这个证明正确吗?

提前致谢

解决方法

在这个早期阶段消除全称量词并不是一个好主意,因为你甚至没有任何可以在那个时候插入的值(你给出的 x 在那个时候不在范围内,这就是为什么它在 Isabelle/jEdit 中以橙色背景打印)。

执行 iffI 后,您有两个目标:

goal (2 subgoals):
 1. ∀x. A x ∧ B x ⟹ (∀x. A x) ∧ (∀x. B x)
 2. (∀x. A x) ∧ (∀x. B x) ⟹ ∀x. A x ∧ B x

现在让我们专注于第一个。您应该首先应用右侧的介绍规则,即 conjIallI。这让你有

goal (3 subgoals):
 1. ⋀x. ∀x. A x ∧ B x ⟹ A x
 2. ⋀x. ∀x. A x ∧ B x ⟹ B x
 3. (∀x. A x) ∧ (∀x. B x) ⟹ ∀x. A x ∧ B x

现在您可以应用使用 allE 实例化的 x,第一个目标变为 ⋀x. A x ∧ B x ⟹ A x,然后您可以使用 erule conjEassumption 求解。第二个目标类似。

对于最后一个目标,再次类似:先应用介绍规则,然后应用消除规则和assumption,您就完成了。

当然,Isabelle 的所有标准证明器,例如 autoforceblast 甚至是简单的证明器,例如 metismeson、{ {1}} 可以轻松地自动解决这个问题,但这可能不是您在这里想要的。

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...