Leon 在焊机中进行双感应

Leon 在焊机中进行双感应,leon,Leon,我想用双感应焊机证明一个特性。这些定义取自。可以找到一个相关的问题,该问题提供了该理论的更多细节。无论如何,我只需要一部分来说明我的问题: 基本上,我用的是整数形式的表达式,POPi,p和povi,p,q。它们有一个称为n的正态性质。我想证明如果nx&&ny,那么nx+y 让我们看看具体的情况x=POPi,p,y=POPj,q,那么x+y的定义如下: if i = j then pop(i,p+q) if i > j then pop(j,POP(i-j,p)+q) if i < j

我想用双感应焊机证明一个特性。这些定义取自。可以找到一个相关的问题,该问题提供了该理论的更多细节。无论如何,我只需要一部分来说明我的问题:

基本上,我用的是整数形式的表达式,POPi,p和povi,p,q。它们有一个称为n的正态性质。我想证明如果nx&&ny,那么nx+y

让我们看看具体的情况x=POPi,p,y=POPj,q,那么x+y的定义如下:

if i = j then pop(i,p+q)
if i > j then pop(j,POP(i-j,p)+q)
if i < j then pop(i,POP(j-i,q)+p)
def property(x: Expr) = {
  forall("y" :: shf){ case (y) => 
    (n(x) && n(y)) ==> n(x+y)
  } 
}
structuralInduction(property _, "x" :: shf) { case (ihs1, goal1) =>
  val xi = ihs1.expression
  xi match{
  ...
我想关注的相关案例如下:

case C(`POP_ID`,i,pshf) =>
  def popproperty(y: Expr) = { 
    n(y) ==> n(xi+y) 
  }
  structuralInduction(popproperty _, "y" :: shf) { case (ihs2, goal2) =>
   val yi = ihs2.expression
   implI(n(yi)){ axioms2 =>
    yi match{
     case C(`constshfID`, fc) => andI(ihs1.hypothesis(pshf),axioms1)
     case C(`POP_ID`,j,qshf) => 
      andI(
       implE(forallE(normpop1Lemma)(i,normadd(pshf,qshf)))( g => 
        andI(implE(forallE(ihs1.hypothesis(pshf))(qshf))( g => 
         andI(axioms1,axioms2)), axioms1, axioms2)),
       implI(i > j){ gt => 
        implE(forallE(normpop1Lemma)(i,normadd(POP(i-j,pshf),qshf)))( g => 
         andI(implE(ihs2.hypothesis(qshf))(g => axioms2),axioms1,axioms2,gt))                            
       },
       implI(i < j){ lt => 
        implE(forallE(normpop1Lemma)(i,normadd(POP(j-i,pshf),qshf)))( g => 
         andI(implE(ihs2.hypothesis(qshf))(g => axioms2),axioms1,axioms2,lt))
                            
    }
   )
但我不是在破坏归纳法吗?通过这样做,我真的可以解决I>j和I 编辑

目前,我可以先在y上导入,然后在x上导入,对于POP-POP情况,我可以显示I=j和I>j但I
相反,现在我试图证明两个不同的性质,假设在每一种情况下,其中一个不能保持Ij。嗯,我希望你的证明看起来更像这样:

structuralInduction((x: Expr) =>
  forall("y" :: shf)(y => (n(x) && n(y)) ==> n(x+y)), "x" :: shf
) { case (ihs1, g1) =>
  structuralInduction((y: Expr) =>
    (n(ihs1.expression) && n(y)) ==> n(ihs1.expression+y), "y" :: shf
  ) { case (ihs2, g2) =>
    implI(n(ihs1.expression) && n(ihs2.expression)) { normalXY =>
      (ihs1.expression, ihs2.expression) match {
        case (C(`POP_ID`,i,pshf), C(`POP_ID`,j,qshf)) => andI(
           ... // case (i == j)
           ... // case (i > j)
           implI(i < j) { iLtJ =>
             andI(
               ... // stuff using normprop1Lemma
               implE(forallE(ihs1.hypothesis(pshf))(normadd(POP(j-i,qshf)) {
                 g => // the reason why n(normadd(POP(j-i,qshf)) and n(pshf)
               },
               ... // invoke some lemma showing x+y == y+x
             )
           }
        )
      }
    }
  }
}
这里我们使用外部归纳的归纳假设,因为我们在x中的p上进行归纳。我假设normProp1Emma告诉你normaddPOPj-I,qshf是正常形式的。您可能需要一些引理来说明,如果x是正规形式,那么x中的p是正规形式

希望这有帮助

structuralInduction((x: Expr) =>
  forall("y" :: shf)(y => (n(x) && n(y)) ==> n(x+y)), "x" :: shf
) { case (ihs1, g1) =>
  structuralInduction((y: Expr) =>
    (n(ihs1.expression) && n(y)) ==> n(ihs1.expression+y), "y" :: shf
  ) { case (ihs2, g2) =>
    implI(n(ihs1.expression) && n(ihs2.expression)) { normalXY =>
      (ihs1.expression, ihs2.expression) match {
        case (C(`POP_ID`,i,pshf), C(`POP_ID`,j,qshf)) => andI(
           ... // case (i == j)
           ... // case (i > j)
           implI(i < j) { iLtJ =>
             andI(
               ... // stuff using normprop1Lemma
               implE(forallE(ihs1.hypothesis(pshf))(normadd(POP(j-i,qshf)) {
                 g => // the reason why n(normadd(POP(j-i,qshf)) and n(pshf)
               },
               ... // invoke some lemma showing x+y == y+x
             )
           }
        )
      }
    }
  }
}