src/HOL/Subst/UTerm.ML
author wenzelm
Tue, 07 Sep 1999 10:40:58 +0200
changeset 7499 23e090051cb8
parent 5069 3ea049f7979d
permissions -rw-r--r--
isatool expandshort;
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
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 3192
diff changeset
    15
Goal "(v : vars_of(Var(w))) = (w=v)";
3192
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
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 3192
diff changeset
    20
Goal  "(x : vars_of(t)) = (Var(x) <: t | Var(x) = t)";
3192
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 *)
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 3192
diff changeset
    28
Goal "M<:N --> vars_of(M) <= vars_of(N)";
3192
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
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 3192
diff changeset
    35
Goal "vars_of M Un vars_of N <= (vars_of M Un A) Un (vars_of N Un B)";
3192
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
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 3192
diff changeset
    39
Goal "finite(vars_of M)";
3192
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);
7499
23e090051cb8 isatool expandshort;
wenzelm
parents: 5069
diff changeset
    42
by (ftac finite_UnI 1);
3192
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();