Nominal/Ex/Foo1.thy
author Christian Urban <urbanc@in.tum.de>
Tue, 07 Dec 2010 14:27:39 +0000
changeset 2598 b136721eedb2
parent 2594 515e5496171c
child 2626 d1bdc281be2b
permissions -rw-r--r--
automated permute_bn theorems
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2494
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
theory Foo1
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
imports "../Nominal2" 
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
begin
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
2564
5be8e34c2c0e tuned example
Christian Urban <urbanc@in.tum.de>
parents: 2562
diff changeset
     5
text {* 
2494
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
  Contrived example that has more than one
2564
5be8e34c2c0e tuned example
Christian Urban <urbanc@in.tum.de>
parents: 2562
diff changeset
     7
  binding function
5be8e34c2c0e tuned example
Christian Urban <urbanc@in.tum.de>
parents: 2562
diff changeset
     8
*}
2494
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
2571
f0252365936c proved that bn functions return a finite set
Christian Urban <urbanc@in.tum.de>
parents: 2564
diff changeset
    10
2494
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    11
atom_decl name
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    13
nominal_datatype foo: trm =
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    14
  Var "name"
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    15
| App "trm" "trm"
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    16
| Lam x::"name" t::"trm"  bind x in t
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    17
| Let1 a::"assg" t::"trm"  bind "bn1 a" in t
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    18
| Let2 a::"assg" t::"trm"  bind "bn2 a" in t
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    19
| Let3 a::"assg" t::"trm"  bind "bn3 a" in t
2564
5be8e34c2c0e tuned example
Christian Urban <urbanc@in.tum.de>
parents: 2562
diff changeset
    20
| Let4 a::"assg'" t::"trm"  bind (set) "bn4 a" in t
2494
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    21
and assg =
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    22
  As "name" "name" "trm"
2564
5be8e34c2c0e tuned example
Christian Urban <urbanc@in.tum.de>
parents: 2562
diff changeset
    23
and assg' =
5be8e34c2c0e tuned example
Christian Urban <urbanc@in.tum.de>
parents: 2562
diff changeset
    24
  BNil
5be8e34c2c0e tuned example
Christian Urban <urbanc@in.tum.de>
parents: 2562
diff changeset
    25
| BAs "name" "assg'"
2494
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    26
binder
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    27
  bn1::"assg \<Rightarrow> atom list" and
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    28
  bn2::"assg \<Rightarrow> atom list" and
2564
5be8e34c2c0e tuned example
Christian Urban <urbanc@in.tum.de>
parents: 2562
diff changeset
    29
  bn3::"assg \<Rightarrow> atom list" and
5be8e34c2c0e tuned example
Christian Urban <urbanc@in.tum.de>
parents: 2562
diff changeset
    30
  bn4::"assg' \<Rightarrow> atom set"
2494
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    31
where
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    32
  "bn1 (As x y t) = [atom x]"
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    33
| "bn2 (As x y t) = [atom y]"
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    34
| "bn3 (As x y t) = [atom x, atom y]"
2564
5be8e34c2c0e tuned example
Christian Urban <urbanc@in.tum.de>
parents: 2562
diff changeset
    35
| "bn4 (BNil) = {}"
5be8e34c2c0e tuned example
Christian Urban <urbanc@in.tum.de>
parents: 2562
diff changeset
    36
| "bn4 (BAs a as) = {atom a} \<union> bn4 as"
5be8e34c2c0e tuned example
Christian Urban <urbanc@in.tum.de>
parents: 2562
diff changeset
    37
2598
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
    38
thm foo.permute_bn
2593
25dcb2b1329e ordered raw_bn_info to agree with the order of the raw_bn_functions; started alpha_bn proof
Christian Urban <urbanc@in.tum.de>
parents: 2588
diff changeset
    39
thm foo.perm_bn_alpha
25dcb2b1329e ordered raw_bn_info to agree with the order of the raw_bn_functions; started alpha_bn proof
Christian Urban <urbanc@in.tum.de>
parents: 2588
diff changeset
    40
thm foo.perm_bn_simps
25dcb2b1329e ordered raw_bn_info to agree with the order of the raw_bn_functions; started alpha_bn proof
Christian Urban <urbanc@in.tum.de>
parents: 2588
diff changeset
    41
thm foo.bn_finite
2494
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    42
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    43
thm foo.distinct
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    44
thm foo.induct
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    45
thm foo.inducts
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    46
thm foo.exhaust
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    47
thm foo.fv_defs
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    48
thm foo.bn_defs
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    49
thm foo.perm_simps
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    50
thm foo.eq_iff
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    51
thm foo.fv_bn_eqvt
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    52
thm foo.size_eqvt
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    53
thm foo.supports
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    54
thm foo.fsupp
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    55
thm foo.supp
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    56
thm foo.fresh
2571
f0252365936c proved that bn functions return a finite set
Christian Urban <urbanc@in.tum.de>
parents: 2564
diff changeset
    57
thm foo.bn_finite
2494
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    58
2586
3ebc7ecfb0dd disabled the Foo examples, because of heavy work
Christian Urban <urbanc@in.tum.de>
parents: 2573
diff changeset
    59
lemma strong_exhaust1:
3ebc7ecfb0dd disabled the Foo examples, because of heavy work
Christian Urban <urbanc@in.tum.de>
parents: 2573
diff changeset
    60
  fixes c::"'a::fs"
3ebc7ecfb0dd disabled the Foo examples, because of heavy work
Christian Urban <urbanc@in.tum.de>
parents: 2573
diff changeset
    61
  assumes "\<exists>name. y = Var name \<Longrightarrow> P" 
3ebc7ecfb0dd disabled the Foo examples, because of heavy work
Christian Urban <urbanc@in.tum.de>
parents: 2573
diff changeset
    62
  and     "\<exists>trm1 trm2. y = App trm1 trm2 \<Longrightarrow> P"
2588
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
    63
  and     "\<exists>name trm.  {atom name} \<sharp>* c \<and> y = Lam name trm \<Longrightarrow> P" 
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
    64
  and     "\<exists>(c::'a::fs) assn trm. set (bn1 assn) \<sharp>* c \<and> y = Let1 assn trm \<Longrightarrow> P"
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
    65
  and     "\<exists>(c::'a::fs) assn trm. set (bn2 assn) \<sharp>* c \<and> y = Let2 assn trm \<Longrightarrow> P"
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
    66
  and     "\<exists>(c::'a::fs) assn trm. set (bn3 assn) \<sharp>* c \<and> y = Let3 assn trm \<Longrightarrow> P"
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
    67
  and     "\<exists>(c::'a::fs) assn' trm. (bn4 assn') \<sharp>* c \<and> y = Let4 assn' trm \<Longrightarrow> P"
2586
3ebc7ecfb0dd disabled the Foo examples, because of heavy work
Christian Urban <urbanc@in.tum.de>
parents: 2573
diff changeset
    68
  shows "P"
2594
515e5496171c automated alpha_perm_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2593
diff changeset
    69
oops
2588
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
    70
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
    71
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
    72
lemma strong_exhaust2:
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
    73
  fixes c::"'a::fs"
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
    74
  assumes "\<And>name. y = Var name \<Longrightarrow> P" 
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
    75
  and     "\<And>trm1 trm2. y = App trm1 trm2 \<Longrightarrow> P"
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
    76
  and     "\<And>name trm. \<lbrakk>{atom name} \<sharp>* c; y = Lam name trm\<rbrakk> \<Longrightarrow> P" 
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
    77
  and     "\<And>assn trm. \<lbrakk>set (bn1 assn) \<sharp>* c; y = Let1 assn trm\<rbrakk> \<Longrightarrow> P"
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
    78
  and     "\<And>assn trm. \<lbrakk>set (bn2 assn) \<sharp>* c; y = Let2 assn trm\<rbrakk> \<Longrightarrow> P"
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
    79
  and     "\<And>assn trm. \<lbrakk>set (bn3 assn) \<sharp>* c; y = Let3 assn trm\<rbrakk> \<Longrightarrow> P"
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
    80
  and     "\<And>assn' trm. \<lbrakk>(bn4 assn') \<sharp>* c; y = Let4 assn' trm\<rbrakk> \<Longrightarrow> P"
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
    81
  shows "P"
2594
515e5496171c automated alpha_perm_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2593
diff changeset
    82
oops
2500
3b6a70e73006 worked example Foo1 with induct_schema
Christian Urban <urbanc@in.tum.de>
parents: 2494
diff changeset
    83
3b6a70e73006 worked example Foo1 with induct_schema
Christian Urban <urbanc@in.tum.de>
parents: 2494
diff changeset
    84
lemma strong_exhaust1:
3b6a70e73006 worked example Foo1 with induct_schema
Christian Urban <urbanc@in.tum.de>
parents: 2494
diff changeset
    85
  fixes c::"'a::fs"
2503
cc5d23547341 simplified exhaust proofs
Christian Urban <urbanc@in.tum.de>
parents: 2500
diff changeset
    86
  assumes "\<And>name. y = Var name \<Longrightarrow> P" 
cc5d23547341 simplified exhaust proofs
Christian Urban <urbanc@in.tum.de>
parents: 2500
diff changeset
    87
  and     "\<And>trm1 trm2. y = App trm1 trm2 \<Longrightarrow> P"
cc5d23547341 simplified exhaust proofs
Christian Urban <urbanc@in.tum.de>
parents: 2500
diff changeset
    88
  and     "\<And>name trm. \<lbrakk>{atom name} \<sharp>* c; y = Lam name trm\<rbrakk> \<Longrightarrow> P" 
cc5d23547341 simplified exhaust proofs
Christian Urban <urbanc@in.tum.de>
parents: 2500
diff changeset
    89
  and     "\<And>assn trm. \<lbrakk>set (bn1 assn) \<sharp>* c; y = Let1 assn trm\<rbrakk> \<Longrightarrow> P"
cc5d23547341 simplified exhaust proofs
Christian Urban <urbanc@in.tum.de>
parents: 2500
diff changeset
    90
  and     "\<And>assn trm. \<lbrakk>set (bn2 assn) \<sharp>* c; y = Let2 assn trm\<rbrakk> \<Longrightarrow> P"
cc5d23547341 simplified exhaust proofs
Christian Urban <urbanc@in.tum.de>
parents: 2500
diff changeset
    91
  and     "\<And>assn trm. \<lbrakk>set (bn3 assn) \<sharp>* c; y = Let3 assn trm\<rbrakk> \<Longrightarrow> P"
2564
5be8e34c2c0e tuned example
Christian Urban <urbanc@in.tum.de>
parents: 2562
diff changeset
    92
  and     "\<And>assn' trm. \<lbrakk>(bn4 assn') \<sharp>* c; y = Let4 assn' trm\<rbrakk> \<Longrightarrow> P"
2500
3b6a70e73006 worked example Foo1 with induct_schema
Christian Urban <urbanc@in.tum.de>
parents: 2494
diff changeset
    93
  shows "P"
2594
515e5496171c automated alpha_perm_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2593
diff changeset
    94
oops 
2571
f0252365936c proved that bn functions return a finite set
Christian Urban <urbanc@in.tum.de>
parents: 2564
diff changeset
    95
2500
3b6a70e73006 worked example Foo1 with induct_schema
Christian Urban <urbanc@in.tum.de>
parents: 2494
diff changeset
    96
lemma strong_exhaust2:
2503
cc5d23547341 simplified exhaust proofs
Christian Urban <urbanc@in.tum.de>
parents: 2500
diff changeset
    97
  assumes "\<And>x y t. as = As x y t \<Longrightarrow> P" 
2500
3b6a70e73006 worked example Foo1 with induct_schema
Christian Urban <urbanc@in.tum.de>
parents: 2494
diff changeset
    98
  shows "P"
3b6a70e73006 worked example Foo1 with induct_schema
Christian Urban <urbanc@in.tum.de>
parents: 2494
diff changeset
    99
apply(rule_tac y="as" in foo.exhaust(2))
3b6a70e73006 worked example Foo1 with induct_schema
Christian Urban <urbanc@in.tum.de>
parents: 2494
diff changeset
   100
apply(rule assms(1))
2503
cc5d23547341 simplified exhaust proofs
Christian Urban <urbanc@in.tum.de>
parents: 2500
diff changeset
   101
apply(assumption)
2500
3b6a70e73006 worked example Foo1 with induct_schema
Christian Urban <urbanc@in.tum.de>
parents: 2494
diff changeset
   102
done
3b6a70e73006 worked example Foo1 with induct_schema
Christian Urban <urbanc@in.tum.de>
parents: 2494
diff changeset
   103
2564
5be8e34c2c0e tuned example
Christian Urban <urbanc@in.tum.de>
parents: 2562
diff changeset
   104
lemma strong_exhaust3:
5be8e34c2c0e tuned example
Christian Urban <urbanc@in.tum.de>
parents: 2562
diff changeset
   105
  assumes "as' = BNil \<Longrightarrow> P"
5be8e34c2c0e tuned example
Christian Urban <urbanc@in.tum.de>
parents: 2562
diff changeset
   106
  and "\<And>a as. as' = BAs a as \<Longrightarrow> P" 
5be8e34c2c0e tuned example
Christian Urban <urbanc@in.tum.de>
parents: 2562
diff changeset
   107
  shows "P"
5be8e34c2c0e tuned example
Christian Urban <urbanc@in.tum.de>
parents: 2562
diff changeset
   108
apply(rule_tac y="as'" in foo.exhaust(3))
5be8e34c2c0e tuned example
Christian Urban <urbanc@in.tum.de>
parents: 2562
diff changeset
   109
apply(rule assms(1))
5be8e34c2c0e tuned example
Christian Urban <urbanc@in.tum.de>
parents: 2562
diff changeset
   110
apply(assumption)
5be8e34c2c0e tuned example
Christian Urban <urbanc@in.tum.de>
parents: 2562
diff changeset
   111
apply(rule assms(2))
5be8e34c2c0e tuned example
Christian Urban <urbanc@in.tum.de>
parents: 2562
diff changeset
   112
apply(assumption)
5be8e34c2c0e tuned example
Christian Urban <urbanc@in.tum.de>
parents: 2562
diff changeset
   113
done
2500
3b6a70e73006 worked example Foo1 with induct_schema
Christian Urban <urbanc@in.tum.de>
parents: 2494
diff changeset
   114
3b6a70e73006 worked example Foo1 with induct_schema
Christian Urban <urbanc@in.tum.de>
parents: 2494
diff changeset
   115
lemma 
3b6a70e73006 worked example Foo1 with induct_schema
Christian Urban <urbanc@in.tum.de>
parents: 2494
diff changeset
   116
  fixes t::trm
3b6a70e73006 worked example Foo1 with induct_schema
Christian Urban <urbanc@in.tum.de>
parents: 2494
diff changeset
   117
  and   as::assg
2564
5be8e34c2c0e tuned example
Christian Urban <urbanc@in.tum.de>
parents: 2562
diff changeset
   118
  and   as'::assg'
2500
3b6a70e73006 worked example Foo1 with induct_schema
Christian Urban <urbanc@in.tum.de>
parents: 2494
diff changeset
   119
  and   c::"'a::fs"
3b6a70e73006 worked example Foo1 with induct_schema
Christian Urban <urbanc@in.tum.de>
parents: 2494
diff changeset
   120
  assumes a1: "\<And>x c. P1 c (Var x)"
3b6a70e73006 worked example Foo1 with induct_schema
Christian Urban <urbanc@in.tum.de>
parents: 2494
diff changeset
   121
  and     a2: "\<And>t1 t2 c. \<lbrakk>\<And>d. P1 d t1; \<And>d. P1 d t2\<rbrakk> \<Longrightarrow> P1 c (App t1 t2)"
3b6a70e73006 worked example Foo1 with induct_schema
Christian Urban <urbanc@in.tum.de>
parents: 2494
diff changeset
   122
  and     a3: "\<And>x t c. \<lbrakk>{atom x} \<sharp>* c; \<And>d. P1 d t\<rbrakk> \<Longrightarrow> P1 c (Lam x t)"
3b6a70e73006 worked example Foo1 with induct_schema
Christian Urban <urbanc@in.tum.de>
parents: 2494
diff changeset
   123
  and     a4: "\<And>as t c. \<lbrakk>set (bn1 as) \<sharp>* c; \<And>d. P2 d as; \<And>d. P1 d t\<rbrakk> \<Longrightarrow> P1 c (Let1 as t)"
3b6a70e73006 worked example Foo1 with induct_schema
Christian Urban <urbanc@in.tum.de>
parents: 2494
diff changeset
   124
  and     a5: "\<And>as t c. \<lbrakk>set (bn2 as) \<sharp>* c; \<And>d. P2 d as; \<And>d. P1 d t\<rbrakk> \<Longrightarrow> P1 c (Let2 as t)"
3b6a70e73006 worked example Foo1 with induct_schema
Christian Urban <urbanc@in.tum.de>
parents: 2494
diff changeset
   125
  and     a6: "\<And>as t c. \<lbrakk>set (bn3 as) \<sharp>* c; \<And>d. P2 d as; \<And>d. P1 d t\<rbrakk> \<Longrightarrow> P1 c (Let3 as t)"
2564
5be8e34c2c0e tuned example
Christian Urban <urbanc@in.tum.de>
parents: 2562
diff changeset
   126
  and     a7: "\<And>as' t c. \<lbrakk>(bn4 as') \<sharp>* c; \<And>d. P3 d as'; \<And>d. P1 d t\<rbrakk> \<Longrightarrow> P1 c (Let4 as' t)" 
5be8e34c2c0e tuned example
Christian Urban <urbanc@in.tum.de>
parents: 2562
diff changeset
   127
  and     a8: "\<And>x y t c. \<And>d. P1 d t \<Longrightarrow> P2 c (As x y t)"
5be8e34c2c0e tuned example
Christian Urban <urbanc@in.tum.de>
parents: 2562
diff changeset
   128
  and     a9: "\<And>c. P3 c (BNil)"
5be8e34c2c0e tuned example
Christian Urban <urbanc@in.tum.de>
parents: 2562
diff changeset
   129
  and     a10: "\<And>c a as. \<And>d. P3 d as \<Longrightarrow> P3 c (BAs a as)"
5be8e34c2c0e tuned example
Christian Urban <urbanc@in.tum.de>
parents: 2562
diff changeset
   130
  shows "P1 c t" "P2 c as" "P3 c as'"
2594
515e5496171c automated alpha_perm_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2593
diff changeset
   131
oops
515e5496171c automated alpha_perm_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2593
diff changeset
   132
(*
2500
3b6a70e73006 worked example Foo1 with induct_schema
Christian Urban <urbanc@in.tum.de>
parents: 2494
diff changeset
   133
using assms
3b6a70e73006 worked example Foo1 with induct_schema
Christian Urban <urbanc@in.tum.de>
parents: 2494
diff changeset
   134
apply(induction_schema)
2503
cc5d23547341 simplified exhaust proofs
Christian Urban <urbanc@in.tum.de>
parents: 2500
diff changeset
   135
apply(rule_tac y="t" and c="c" in strong_exhaust1)
2564
5be8e34c2c0e tuned example
Christian Urban <urbanc@in.tum.de>
parents: 2562
diff changeset
   136
apply(simp_all)[7]
2500
3b6a70e73006 worked example Foo1 with induct_schema
Christian Urban <urbanc@in.tum.de>
parents: 2494
diff changeset
   137
apply(rule_tac as="as" in strong_exhaust2)
2503
cc5d23547341 simplified exhaust proofs
Christian Urban <urbanc@in.tum.de>
parents: 2500
diff changeset
   138
apply(simp)
2564
5be8e34c2c0e tuned example
Christian Urban <urbanc@in.tum.de>
parents: 2562
diff changeset
   139
apply(rule_tac as'="as'" in strong_exhaust3)
5be8e34c2c0e tuned example
Christian Urban <urbanc@in.tum.de>
parents: 2562
diff changeset
   140
apply(simp_all)[2]
5be8e34c2c0e tuned example
Christian Urban <urbanc@in.tum.de>
parents: 2562
diff changeset
   141
apply(relation "measure (sum_case (size o snd) (sum_case (\<lambda>y. size (snd y)) (\<lambda>z. size (snd z))))")
2500
3b6a70e73006 worked example Foo1 with induct_schema
Christian Urban <urbanc@in.tum.de>
parents: 2494
diff changeset
   142
apply(simp_all add: foo.size)
3b6a70e73006 worked example Foo1 with induct_schema
Christian Urban <urbanc@in.tum.de>
parents: 2494
diff changeset
   143
done
2594
515e5496171c automated alpha_perm_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2593
diff changeset
   144
*)
2494
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   145
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   146
end
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   147
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   148
11133eb76f61 added Foo1 to explore a contrived example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   149