src/HOL/Subst/UTerm.ML
author paulson
Thu, 15 May 1997 12:40:01 +0200
changeset 3192 a75558a4ed37
parent 2903 d1d5a0acbf72
child 5069 3ea049f7979d
permissions -rw-r--r--
New version, modified by Konrad Slind and LCP for TFL
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1465
5d7a7e439cec expanded tabs
clasohm
parents: 1266
diff changeset
     1
(*  Title:      HOL/Subst/UTerm.ML
1266
3ae9fe3c0f68 added local simpsets
clasohm
parents: 968
diff changeset
     2
    ID:         $Id$
1465
5d7a7e439cec expanded tabs
clasohm
parents: 1266
diff changeset
     3
    Author:     Martin Coen, Cambridge University Computer Laboratory
968
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
     4
    Copyright   1993  University of Cambridge
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
     5
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
     6
Simple term structure for unifiation.
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
     7
Binary trees with leaves that are constants or variables.
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
     8
*)
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
     9
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    10
open UTerm;
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    11
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    12
3192
a75558a4ed37 New version, modified by Konrad Slind and LCP for TFL
paulson
parents: 2903
diff changeset
    13
(**** vars_of lemmas  ****)
968
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    14
3192
a75558a4ed37 New version, modified by Konrad Slind and LCP for TFL
paulson
parents: 2903
diff changeset
    15
goal UTerm.thy "(v : vars_of(Var(w))) = (w=v)";
a75558a4ed37 New version, modified by Konrad Slind and LCP for TFL
paulson
parents: 2903
diff changeset
    16
by (Simp_tac 1);
a75558a4ed37 New version, modified by Konrad Slind and LCP for TFL
paulson
parents: 2903
diff changeset
    17
by (fast_tac HOL_cs 1);
a75558a4ed37 New version, modified by Konrad Slind and LCP for TFL
paulson
parents: 2903
diff changeset
    18
qed "vars_var_iff";
968
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    19
3192
a75558a4ed37 New version, modified by Konrad Slind and LCP for TFL
paulson
parents: 2903
diff changeset
    20
goal UTerm.thy  "(x : vars_of(t)) = (Var(x) <: t | Var(x) = t)";
a75558a4ed37 New version, modified by Konrad Slind and LCP for TFL
paulson
parents: 2903
diff changeset
    21
by (induct_tac "t" 1);
a75558a4ed37 New version, modified by Konrad Slind and LCP for TFL
paulson
parents: 2903
diff changeset
    22
by (ALLGOALS Simp_tac);
a75558a4ed37 New version, modified by Konrad Slind and LCP for TFL
paulson
parents: 2903
diff changeset
    23
by (fast_tac HOL_cs 1);
a75558a4ed37 New version, modified by Konrad Slind and LCP for TFL
paulson
parents: 2903
diff changeset
    24
qed "vars_iff_occseq";
968
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    25
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    26
3192
a75558a4ed37 New version, modified by Konrad Slind and LCP for TFL
paulson
parents: 2903
diff changeset
    27
(* Not used, but perhaps useful in other proofs *)
a75558a4ed37 New version, modified by Konrad Slind and LCP for TFL
paulson
parents: 2903
diff changeset
    28
goal UTerm.thy "M<:N --> vars_of(M) <= vars_of(N)";
a75558a4ed37 New version, modified by Konrad Slind and LCP for TFL
paulson
parents: 2903
diff changeset
    29
by (induct_tac "N" 1);
a75558a4ed37 New version, modified by Konrad Slind and LCP for TFL
paulson
parents: 2903
diff changeset
    30
by (ALLGOALS Asm_simp_tac);
a75558a4ed37 New version, modified by Konrad Slind and LCP for TFL
paulson
parents: 2903
diff changeset
    31
by (fast_tac set_cs 1);
a75558a4ed37 New version, modified by Konrad Slind and LCP for TFL
paulson
parents: 2903
diff changeset
    32
val occs_vars_subset = result();
968
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    33
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    34
3192
a75558a4ed37 New version, modified by Konrad Slind and LCP for TFL
paulson
parents: 2903
diff changeset
    35
goal UTerm.thy "vars_of M Un vars_of N <= (vars_of M Un A) Un (vars_of N Un B)";
a75558a4ed37 New version, modified by Konrad Slind and LCP for TFL
paulson
parents: 2903
diff changeset
    36
by (Blast_tac 1);
a75558a4ed37 New version, modified by Konrad Slind and LCP for TFL
paulson
parents: 2903
diff changeset
    37
val monotone_vars_of = result();
968
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    38
3192
a75558a4ed37 New version, modified by Konrad Slind and LCP for TFL
paulson
parents: 2903
diff changeset
    39
goal UTerm.thy "finite(vars_of M)";
a75558a4ed37 New version, modified by Konrad Slind and LCP for TFL
paulson
parents: 2903
diff changeset
    40
by (induct_tac"M" 1);
a75558a4ed37 New version, modified by Konrad Slind and LCP for TFL
paulson
parents: 2903
diff changeset
    41
by (ALLGOALS Simp_tac);
a75558a4ed37 New version, modified by Konrad Slind and LCP for TFL
paulson
parents: 2903
diff changeset
    42
by (forward_tac [finite_UnI] 1);
a75558a4ed37 New version, modified by Konrad Slind and LCP for TFL
paulson
parents: 2903
diff changeset
    43
by (assume_tac 1);
a75558a4ed37 New version, modified by Konrad Slind and LCP for TFL
paulson
parents: 2903
diff changeset
    44
by (Asm_simp_tac 1);
a75558a4ed37 New version, modified by Konrad Slind and LCP for TFL
paulson
parents: 2903
diff changeset
    45
val finite_vars_of = result();