Nominal/Ex/Foo2.thy
author Christian Urban <urbanc@in.tum.de>
Wed, 08 Dec 2010 17:07:08 +0000
changeset 2603 90779aefbf1a
parent 2602 bcf558c445a4
child 2607 7430e07a5d61
permissions -rw-r--r--
first tests about exhaust
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2573
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
theory Foo2
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
imports "../Nominal2" 
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
begin
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
(* 
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
  Contrived example that has more than one
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
  binding clause
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
*)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
atom_decl name
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    11
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
nominal_datatype foo: trm =
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    13
  Var "name"
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    14
| App "trm" "trm"
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    15
| Lam x::"name" t::"trm"  bind x in t
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    16
| Let1 a1::"assg" t1::"trm" a2::"assg" t2::"trm" bind "bn a1" in t1, bind "bn a2" in t2
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    17
| Let2 x::"name" y::"name" t1::"trm" t2::"trm" bind x y in t1, bind y in t2
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    18
and assg =
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    19
  As_Nil
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    20
| As "name" x::"name" t::"trm" "assg" 
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    21
binder
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    22
  bn::"assg \<Rightarrow> atom list"
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    23
where
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    24
 "bn (As x y t a) = [atom x] @ bn a"
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    25
| "bn (As_Nil) = []"
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    26
2603
90779aefbf1a first tests about exhaust
Christian Urban <urbanc@in.tum.de>
parents: 2602
diff changeset
    27
term "bn"
90779aefbf1a first tests about exhaust
Christian Urban <urbanc@in.tum.de>
parents: 2602
diff changeset
    28
90779aefbf1a first tests about exhaust
Christian Urban <urbanc@in.tum.de>
parents: 2602
diff changeset
    29
90779aefbf1a first tests about exhaust
Christian Urban <urbanc@in.tum.de>
parents: 2602
diff changeset
    30
2598
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
    31
thm foo.bn_defs
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
    32
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: 2592
diff changeset
    33
thm foo.perm_bn_alpha
2573
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    34
thm foo.perm_bn_simps
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: 2592
diff changeset
    35
thm foo.bn_finite
2573
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    36
2600
ca6b4bc7a871 kept the nested structure of constructors (belonging to one datatype)
Christian Urban <urbanc@in.tum.de>
parents: 2599
diff changeset
    37
2573
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    38
thm foo.distinct
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    39
thm foo.induct
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    40
thm foo.inducts
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    41
thm foo.exhaust
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    42
thm foo.fv_defs
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    43
thm foo.bn_defs
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    44
thm foo.perm_simps
2575
b1d38940040a single rename in let2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 2573
diff changeset
    45
thm foo.eq_iff(5)
2573
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    46
thm foo.fv_bn_eqvt
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    47
thm foo.size_eqvt
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    48
thm foo.supports
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    49
thm foo.fsupp
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    50
thm foo.supp
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    51
thm foo.fresh
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    52
2584
1eac050a36f4 completely different method fro deriving the exhaust lemma
Christian Urban <urbanc@in.tum.de>
parents: 2579
diff changeset
    53
2586
3ebc7ecfb0dd disabled the Foo examples, because of heavy work
Christian Urban <urbanc@in.tum.de>
parents: 2585
diff changeset
    54
2600
ca6b4bc7a871 kept the nested structure of constructors (belonging to one datatype)
Christian Urban <urbanc@in.tum.de>
parents: 2599
diff changeset
    55
2590
98dc38c250bb added abs_rename_res lemma
Christian Urban <urbanc@in.tum.de>
parents: 2589
diff changeset
    56
2586
3ebc7ecfb0dd disabled the Foo examples, because of heavy work
Christian Urban <urbanc@in.tum.de>
parents: 2585
diff changeset
    57
2598
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
    58
(*
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
    59
thm at_set_avoiding1[THEN exE]
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
    60
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
    61
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
    62
lemma Let1_rename:
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
    63
  fixes c::"'a::fs"
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
    64
  shows "\<exists>name' trm'. {atom name'} \<sharp>* c \<and>  Lam name trm = Lam name' trm'"
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
    65
apply(simp only: foo.eq_iff)
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
    66
apply(rule at_set_avoiding1[where c="(c, atom name, trm)" and xs="set [atom name]", THEN exE])
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
    67
apply(simp)
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
    68
apply(simp add: finite_supp)
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
    69
apply(perm_simp)
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
    70
apply(rule Abs_rename_list[THEN exE])
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
    71
apply(simp only: set_eqvt)
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
    72
apply
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
    73
sorry 
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
    74
*)
2588
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
    75
2600
ca6b4bc7a871 kept the nested structure of constructors (belonging to one datatype)
Christian Urban <urbanc@in.tum.de>
parents: 2599
diff changeset
    76
thm foo.exhaust
ca6b4bc7a871 kept the nested structure of constructors (belonging to one datatype)
Christian Urban <urbanc@in.tum.de>
parents: 2599
diff changeset
    77
ca6b4bc7a871 kept the nested structure of constructors (belonging to one datatype)
Christian Urban <urbanc@in.tum.de>
parents: 2599
diff changeset
    78
ML {*
ca6b4bc7a871 kept the nested structure of constructors (belonging to one datatype)
Christian Urban <urbanc@in.tum.de>
parents: 2599
diff changeset
    79
fun strip_prems_concl trm =
ca6b4bc7a871 kept the nested structure of constructors (belonging to one datatype)
Christian Urban <urbanc@in.tum.de>
parents: 2599
diff changeset
    80
  (Logic.strip_imp_prems trm, Logic.strip_imp_concl trm)
ca6b4bc7a871 kept the nested structure of constructors (belonging to one datatype)
Christian Urban <urbanc@in.tum.de>
parents: 2599
diff changeset
    81
*}
ca6b4bc7a871 kept the nested structure of constructors (belonging to one datatype)
Christian Urban <urbanc@in.tum.de>
parents: 2599
diff changeset
    82
ca6b4bc7a871 kept the nested structure of constructors (belonging to one datatype)
Christian Urban <urbanc@in.tum.de>
parents: 2599
diff changeset
    83
ML {*
ca6b4bc7a871 kept the nested structure of constructors (belonging to one datatype)
Christian Urban <urbanc@in.tum.de>
parents: 2599
diff changeset
    84
  @{thms foo.exhaust}
ca6b4bc7a871 kept the nested structure of constructors (belonging to one datatype)
Christian Urban <urbanc@in.tum.de>
parents: 2599
diff changeset
    85
  |> map prop_of
ca6b4bc7a871 kept the nested structure of constructors (belonging to one datatype)
Christian Urban <urbanc@in.tum.de>
parents: 2599
diff changeset
    86
  |> map strip_prems_concl
ca6b4bc7a871 kept the nested structure of constructors (belonging to one datatype)
Christian Urban <urbanc@in.tum.de>
parents: 2599
diff changeset
    87
  |> map fst
ca6b4bc7a871 kept the nested structure of constructors (belonging to one datatype)
Christian Urban <urbanc@in.tum.de>
parents: 2599
diff changeset
    88
  |> map (map (Syntax.string_of_term @{context}))
ca6b4bc7a871 kept the nested structure of constructors (belonging to one datatype)
Christian Urban <urbanc@in.tum.de>
parents: 2599
diff changeset
    89
  |> map cat_lines
ca6b4bc7a871 kept the nested structure of constructors (belonging to one datatype)
Christian Urban <urbanc@in.tum.de>
parents: 2599
diff changeset
    90
  |> cat_lines
ca6b4bc7a871 kept the nested structure of constructors (belonging to one datatype)
Christian Urban <urbanc@in.tum.de>
parents: 2599
diff changeset
    91
  |> writeln 
ca6b4bc7a871 kept the nested structure of constructors (belonging to one datatype)
Christian Urban <urbanc@in.tum.de>
parents: 2599
diff changeset
    92
*}
ca6b4bc7a871 kept the nested structure of constructors (belonging to one datatype)
Christian Urban <urbanc@in.tum.de>
parents: 2599
diff changeset
    93
2588
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
    94
lemma test6:
2584
1eac050a36f4 completely different method fro deriving the exhaust lemma
Christian Urban <urbanc@in.tum.de>
parents: 2579
diff changeset
    95
  fixes c::"'a::fs"
2588
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
    96
  assumes "\<exists>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
    97
  and     "\<exists>trm1 trm2. y = App trm1 trm2 \<Longrightarrow> P"
2592
98236fbd8aa6 updated to Isabelle 2nd December
Christian Urban <urbanc@in.tum.de>
parents: 2591
diff changeset
    98
  and     "\<And>name trm. \<lbrakk>{atom name} \<sharp>* c; y = Lam name trm\<rbrakk> \<Longrightarrow> P" 
2588
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
    99
  and     "\<exists>a1 trm1 a2 trm2.  ((set (bn a1)) \<union> (set (bn a2))) \<sharp>* c \<and> y = Let1 a1 trm1 a2 trm2 \<Longrightarrow> P"
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   100
  and     "\<exists>x1 x2 trm1 trm2. {atom x1, atom x2} \<sharp>* c \<and> y = Let2 x1 x2 trm1 trm2 \<Longrightarrow> P"
2584
1eac050a36f4 completely different method fro deriving the exhaust lemma
Christian Urban <urbanc@in.tum.de>
parents: 2579
diff changeset
   101
  shows "P"
2588
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   102
apply(rule_tac y="y" in foo.exhaust(1))
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   103
apply(rule assms(1))
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   104
apply(rule exI)+
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   105
apply(assumption)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   106
apply(rule assms(2))
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   107
apply(rule exI)+
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   108
apply(assumption)
2598
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
   109
(* lam case *)
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
   110
(*
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
   111
apply(rule Let1_rename)
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
   112
apply(rule assms(3))
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
   113
apply(assumption)
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
   114
apply(simp)
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
   115
*)
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
   116
2588
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   117
apply(subgoal_tac "\<exists>p. (p \<bullet> {atom name}) \<sharp>* (c, [atom name], trm)")
2584
1eac050a36f4 completely different method fro deriving the exhaust lemma
Christian Urban <urbanc@in.tum.de>
parents: 2579
diff changeset
   118
apply(erule exE)
2591
35c570891a3a isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents: 2590
diff changeset
   119
apply(insert Abs_rename_list)[1]
2588
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   120
apply(drule_tac x="p" in meta_spec)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   121
apply(drule_tac x="[atom name]" in meta_spec)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   122
apply(drule_tac x="trm" in meta_spec)
2591
35c570891a3a isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents: 2590
diff changeset
   123
apply(simp only: fresh_star_Pair set.simps)
2588
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   124
apply(drule meta_mp)
2591
35c570891a3a isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents: 2590
diff changeset
   125
apply(simp)
2588
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   126
apply(erule exE)
2592
98236fbd8aa6 updated to Isabelle 2nd December
Christian Urban <urbanc@in.tum.de>
parents: 2591
diff changeset
   127
apply(rule assms(3))
2584
1eac050a36f4 completely different method fro deriving the exhaust lemma
Christian Urban <urbanc@in.tum.de>
parents: 2579
diff changeset
   128
apply(perm_simp)
2588
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   129
apply(erule conjE)+
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   130
apply(assumption)
2592
98236fbd8aa6 updated to Isabelle 2nd December
Christian Urban <urbanc@in.tum.de>
parents: 2591
diff changeset
   131
apply(clarify)
98236fbd8aa6 updated to Isabelle 2nd December
Christian Urban <urbanc@in.tum.de>
parents: 2591
diff changeset
   132
apply(simp (no_asm) add: foo.eq_iff)
98236fbd8aa6 updated to Isabelle 2nd December
Christian Urban <urbanc@in.tum.de>
parents: 2591
diff changeset
   133
apply(perm_simp)
98236fbd8aa6 updated to Isabelle 2nd December
Christian Urban <urbanc@in.tum.de>
parents: 2591
diff changeset
   134
apply(assumption)
2589
9781db0e2196 completed proofs in Foo2
Christian Urban <urbanc@in.tum.de>
parents: 2588
diff changeset
   135
apply(rule at_set_avoiding1)
9781db0e2196 completed proofs in Foo2
Christian Urban <urbanc@in.tum.de>
parents: 2588
diff changeset
   136
apply(simp)
9781db0e2196 completed proofs in Foo2
Christian Urban <urbanc@in.tum.de>
parents: 2588
diff changeset
   137
apply(simp add: finite_supp)
2598
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
   138
(* let1 case *)
2588
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   139
apply(subgoal_tac "\<exists>p. (p \<bullet> ((set (bn assg1)) \<union> (set (bn assg2)))) \<sharp>* (c, bn assg1, bn assg2, trm1, trm2)")
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   140
apply(erule exE)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   141
apply(rule assms(4))
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   142
apply(simp only: foo.eq_iff)
2591
35c570891a3a isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents: 2590
diff changeset
   143
apply(insert Abs_rename_list)[1]
2588
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   144
apply(drule_tac x="p" in meta_spec)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   145
apply(drule_tac x="bn assg1" in meta_spec)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   146
apply(drule_tac x="trm1" in meta_spec)
2591
35c570891a3a isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents: 2590
diff changeset
   147
apply(insert Abs_rename_list)[1]
2588
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   148
apply(drule_tac x="p" in meta_spec)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   149
apply(drule_tac x="bn assg2" in meta_spec)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   150
apply(drule_tac x="trm2" in meta_spec)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   151
apply(drule meta_mp)
2591
35c570891a3a isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents: 2590
diff changeset
   152
apply(simp only: union_eqvt fresh_star_Pair set.simps fresh_star_Un, simp)
2588
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   153
apply(drule meta_mp)
2591
35c570891a3a isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents: 2590
diff changeset
   154
apply(simp only: union_eqvt fresh_star_Pair set.simps fresh_star_Un, simp)
2588
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   155
apply(erule exE)+
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   156
apply(rule exI)+
2598
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
   157
apply(perm_simp add: foo.permute_bn)
2588
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   158
apply(rule conjI)
2591
35c570891a3a isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents: 2590
diff changeset
   159
apply(simp add: fresh_star_Pair fresh_star_Un)
2588
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   160
apply(erule conjE)+
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   161
apply(rule conjI)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   162
apply(assumption)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   163
apply(rotate_tac 4)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   164
apply(assumption)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   165
apply(rule conjI)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   166
apply(assumption)
2584
1eac050a36f4 completely different method fro deriving the exhaust lemma
Christian Urban <urbanc@in.tum.de>
parents: 2579
diff changeset
   167
apply(rule conjI)
2594
515e5496171c automated alpha_perm_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2593
diff changeset
   168
apply(rule foo.perm_bn_alpha)
2588
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   169
apply(rule conjI)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   170
apply(assumption)
2594
515e5496171c automated alpha_perm_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2593
diff changeset
   171
apply(rule foo.perm_bn_alpha)
2589
9781db0e2196 completed proofs in Foo2
Christian Urban <urbanc@in.tum.de>
parents: 2588
diff changeset
   172
apply(rule at_set_avoiding1)
9781db0e2196 completed proofs in Foo2
Christian Urban <urbanc@in.tum.de>
parents: 2588
diff changeset
   173
apply(simp)
9781db0e2196 completed proofs in Foo2
Christian Urban <urbanc@in.tum.de>
parents: 2588
diff changeset
   174
apply(simp add: finite_supp)
2598
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
   175
(* let2 case *)
2588
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   176
apply(subgoal_tac "\<exists>p. (p \<bullet> ({atom name1} \<union> {atom name2})) \<sharp>* (c, atom name1, atom name2, trm1, trm2)")
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   177
apply(erule exE)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   178
apply(rule assms(5))
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   179
apply(simp only:)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   180
apply(simp only: foo.eq_iff)
2591
35c570891a3a isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents: 2590
diff changeset
   181
apply(insert Abs_rename_list)[1]
2588
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   182
apply(drule_tac x="p" in meta_spec)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   183
apply(drule_tac x="[atom name1] @ [atom name2]" in meta_spec)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   184
apply(drule_tac x="trm1" in meta_spec)
2591
35c570891a3a isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents: 2590
diff changeset
   185
apply(insert Abs_rename_list)[1]
2588
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   186
apply(drule_tac x="p" in meta_spec)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   187
apply(drule_tac x="[atom name2]" in meta_spec)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   188
apply(drule_tac x="trm2" in meta_spec)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   189
apply(drule meta_mp)
2591
35c570891a3a isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents: 2590
diff changeset
   190
apply(simp only: union_eqvt fresh_star_Pair fresh_star_list fresh_star_Un, simp)
35c570891a3a isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents: 2590
diff changeset
   191
apply(auto)[1]
35c570891a3a isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents: 2590
diff changeset
   192
apply(perm_simp)
35c570891a3a isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents: 2590
diff changeset
   193
apply(auto simp add: fresh_star_def)[1]
35c570891a3a isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents: 2590
diff changeset
   194
apply(perm_simp)
35c570891a3a isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents: 2590
diff changeset
   195
apply(auto simp add: fresh_star_def)[1]
35c570891a3a isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents: 2590
diff changeset
   196
apply(perm_simp)
35c570891a3a isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents: 2590
diff changeset
   197
apply(auto simp add: fresh_star_def)[1]
2588
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   198
apply(drule meta_mp)
2591
35c570891a3a isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents: 2590
diff changeset
   199
apply(perm_simp)
35c570891a3a isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents: 2590
diff changeset
   200
apply(auto simp add: fresh_star_def fresh_Pair fresh_Nil fresh_Cons)[1]
2588
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   201
apply(erule exE)+
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   202
apply(rule exI)+
2598
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
   203
apply(perm_simp add: foo.permute_bn)
2588
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   204
apply(rule conjI)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   205
prefer 2
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   206
apply(rule conjI)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   207
apply(assumption)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   208
apply(assumption)
2591
35c570891a3a isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents: 2590
diff changeset
   209
apply(simp add: fresh_star_Pair)
2588
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   210
apply(simp add: fresh_star_def)
2589
9781db0e2196 completed proofs in Foo2
Christian Urban <urbanc@in.tum.de>
parents: 2588
diff changeset
   211
apply(rule at_set_avoiding1)
9781db0e2196 completed proofs in Foo2
Christian Urban <urbanc@in.tum.de>
parents: 2588
diff changeset
   212
apply(simp)
9781db0e2196 completed proofs in Foo2
Christian Urban <urbanc@in.tum.de>
parents: 2588
diff changeset
   213
apply(simp add: finite_supp)
9781db0e2196 completed proofs in Foo2
Christian Urban <urbanc@in.tum.de>
parents: 2588
diff changeset
   214
done
2584
1eac050a36f4 completely different method fro deriving the exhaust lemma
Christian Urban <urbanc@in.tum.de>
parents: 2579
diff changeset
   215
2585
385add25dedf slightly simplified the Foo2 tests and hint at a general lemma
Christian Urban <urbanc@in.tum.de>
parents: 2584
diff changeset
   216
lemma test5:
385add25dedf slightly simplified the Foo2 tests and hint at a general lemma
Christian Urban <urbanc@in.tum.de>
parents: 2584
diff changeset
   217
  fixes c::"'a::fs"
385add25dedf slightly simplified the Foo2 tests and hint at a general lemma
Christian Urban <urbanc@in.tum.de>
parents: 2584
diff changeset
   218
  assumes "\<And>name. y = Var name \<Longrightarrow> P" 
385add25dedf slightly simplified the Foo2 tests and hint at a general lemma
Christian Urban <urbanc@in.tum.de>
parents: 2584
diff changeset
   219
  and     "\<And>trm1 trm2. y = App trm1 trm2 \<Longrightarrow> P"
385add25dedf slightly simplified the Foo2 tests and hint at a general lemma
Christian Urban <urbanc@in.tum.de>
parents: 2584
diff changeset
   220
  and     "\<And>name trm. \<lbrakk>{atom name} \<sharp>* c; y = Lam name trm\<rbrakk> \<Longrightarrow> P" 
2588
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   221
  and     "\<And>a1 trm1 a2 trm2. \<lbrakk>((set (bn a1)) \<union> (set (bn a2))) \<sharp>* c; y = Let1 a1 trm1 a2 trm2\<rbrakk> \<Longrightarrow> P"
2585
385add25dedf slightly simplified the Foo2 tests and hint at a general lemma
Christian Urban <urbanc@in.tum.de>
parents: 2584
diff changeset
   222
  and     "\<And>x1 x2 trm1 trm2. \<lbrakk>{atom x1, atom x2} \<sharp>* c; y = Let2 x1 x2 trm1 trm2\<rbrakk> \<Longrightarrow> P"
385add25dedf slightly simplified the Foo2 tests and hint at a general lemma
Christian Urban <urbanc@in.tum.de>
parents: 2584
diff changeset
   223
  shows "P"
2588
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   224
apply(rule_tac y="y" in test6)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   225
apply(erule exE)+
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   226
apply(rule assms(1))
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   227
apply(assumption)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   228
apply(erule exE)+
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   229
apply(rule assms(2))
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   230
apply(assumption)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   231
apply(rule assms(3))
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   232
apply(auto)[2]
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   233
apply(erule exE)+
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   234
apply(rule assms(4))
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   235
apply(auto)[2]
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   236
apply(erule exE)+
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   237
apply(rule assms(5))
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   238
apply(auto)[2]
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   239
done
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   240
2585
385add25dedf slightly simplified the Foo2 tests and hint at a general lemma
Christian Urban <urbanc@in.tum.de>
parents: 2584
diff changeset
   241
2588
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   242
lemma strong_induct:
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   243
  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
   244
  and assg :: assg and trm :: trm
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   245
  assumes a0: "\<And>name c. P1 c (Var name)"
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   246
  and a1: "\<And>trm1 trm2 c. \<lbrakk>\<And>d. P1 d trm1; \<And>d. P1 d trm2\<rbrakk> \<Longrightarrow> P1 c (App trm1 trm2)"
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   247
  and a2: "\<And>name trm c. (\<And>d. P1 d trm) \<Longrightarrow> P1 c (Lam name trm)"
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   248
  and a3: "\<And>a1 t1 a2 t2 c. 
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   249
    \<lbrakk>((set (bn a1)) \<union> (set (bn a2))) \<sharp>* c; \<And>d. P2 c a1; \<And>d. P1 d t1; \<And>d. P2 d a2; \<And>d. P1 d t2\<rbrakk> 
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   250
    \<Longrightarrow> P1 c (Let1 a1 t1 a2 t2)"
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   251
  and a4: "\<And>n1 n2 t1 t2 c. 
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   252
    \<lbrakk>{atom n1, atom n2} \<sharp>* c; \<And>d. P1 d t1; \<And>d. P1 d t2\<rbrakk> \<Longrightarrow> P1 c (Let2 n1 n2 t1 t2)"
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   253
  and a5: "\<And>c. P2 c As_Nil"
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   254
  and a6: "\<And>name1 name2 trm assg c. \<lbrakk>\<And>d. P1 d trm; \<And>d. P2 d assg\<rbrakk> \<Longrightarrow> P2 c (As name1 name2 trm assg)"
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   255
  shows "P1 c trm" "P2 c assg"
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   256
  using assms
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   257
  apply(induction_schema)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   258
  apply(rule_tac y="trm" and c="c" in test5)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   259
  apply(simp_all)[5]
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   260
  apply(rule_tac y="assg" in foo.exhaust(2))
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   261
  apply(simp_all)[2]
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   262
  apply(relation "measure (sum_case (size o snd) (size o snd))")
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   263
  apply(simp_all add: foo.size)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   264
  done
2584
1eac050a36f4 completely different method fro deriving the exhaust lemma
Christian Urban <urbanc@in.tum.de>
parents: 2579
diff changeset
   265
2573
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   266
end
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   267
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   268
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   269