Return-Path:
Return-Path: <john.harrison-request@uk.ac.cam.cl>
Received: from iris.eecs.ucdavis.edu by swan.cl.cam.ac.uk with SMTP (PP)
          id <24534-0@swan.cl.cam.ac.uk>; Tue, 13 Aug 1991 17:20:41 +0100
Received: by iris.eecs.ucdavis.edu (5.57/UCD.EECS.7.0) id AA00965;
          Tue, 13 Aug 91 00:29:26 -0700
Received: from vms2.uni-c.dk by danpost.uni-c.dk (5.65/1.34) id AA04294;
          Tue, 13 Aug 91 07:28:46 GMT
Received: from tfl.dk by vms2.uni-c.dk; Tue, 13 Aug 91 09:30 +0200
Received: from ux6.tfl.dk (130.227.226.23) by tfl.dk; Tue, 13 Aug 91 09:29 +0100
Received: by ux6.tfl.dk (5.57/Ultrix3.0-C) id AA18893;
          Tue, 13 Aug 91 09:28:29 +0200
Date: Tue, 13 Aug 91 09:28:29 +0200
From: kimdam@dk.tfl.sun
Subject: Re: Alphabetic change of bound variables
To: info-hol@edu.ucdavis.eecs.iris
Message-Id: <9108130728.AA18893@ux6.tfl.dk>
X-Envelope-To: info-hol@iris.eecs.ucdavis.edu


>
> How is that handled (1) in the HOL logic and (2) in the HOL system?  I can't
> find any mention of the subject in the documentation.
>
> Garrel Pottinger
> garrel@oracorp.com
>

(1) Alpha convertible terms are considered equivalent (the _exact_ same),
    in the HOL logic.

(2) This also holds for the HOL system.  An explicit prove of the
    equality of two HOL term, e.g. proving:

        |- tm1 = tm2

    where tm1 and tm2 are alpha convertible, may be done using the rule
    below:

    let ALPHA_EQ tm1 tm2 =
      let thm1 = DISCH (mk_eq(tm1,tm1)) (ASSUME(mk_eq(tm1,tm2))) and
          thm2 = REFL tm1
      in
        MP thm1 thm2;;

    In this rule DISCH is applied with "tm1 = tm1", but actually
    discharges the assumed alpha-convertible term: "tm1 = tm2"

    The rule may be called like:

        ALPHA_EQ "\x:bool.x" "\y:bool.y"  -->  |- (\x.x) = (\y.y)

    Combining the rule above with EQ_MP like:

    let ALPHA_MP tm thm =
      let thm1 = ALPHA_EQ (concl thm) tm
      in
        EQ_MP thm1 thm;;

    yields a rule for transforming a theorem into an alpha-convertible
    theorem:

       ALPHA_MP "T = ((\y:bool.y) = (\w.w))" T_DEF -->
          |- T = ((\y.y) = (\w.w))

Kind Regards
        Kim Dam Petersen        (E-mail: kimdam@tfl.dk)

