Nominal/Ex/Foo2.thy
author Christian Urban <urbanc@in.tum.de>
Wed, 08 Dec 2010 13:16:25 +0000
changeset 2602 bcf558c445a4
parent 2600 ca6b4bc7a871
child 2603 90779aefbf1a
permissions -rw-r--r--
moved some code into the nominal_library
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
2598
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
    27
thm foo.bn_defs
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
    28
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
    29
thm foo.perm_bn_alpha
2573
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    30
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
    31
thm foo.bn_finite
2573
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    32
2600
ca6b4bc7a871 kept the nested structure of constructors (belonging to one datatype)
Christian Urban <urbanc@in.tum.de>
parents: 2599
diff changeset
    33
2573
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    34
thm foo.distinct
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    35
thm foo.induct
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    36
thm foo.inducts
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    37
thm foo.exhaust
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    38
thm foo.fv_defs
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    39
thm foo.bn_defs
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    40
thm foo.perm_simps
2575
b1d38940040a single rename in let2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 2573
diff changeset
    41
thm foo.eq_iff(5)
2573
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    42
thm foo.fv_bn_eqvt
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    43
thm foo.size_eqvt
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    44
thm foo.supports
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    45
thm foo.fsupp
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    46
thm foo.supp
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    47
thm foo.fresh
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    48
2584
1eac050a36f4 completely different method fro deriving the exhaust lemma
Christian Urban <urbanc@in.tum.de>
parents: 2579
diff changeset
    49
2586
3ebc7ecfb0dd disabled the Foo examples, because of heavy work
Christian Urban <urbanc@in.tum.de>
parents: 2585
diff changeset
    50
2600
ca6b4bc7a871 kept the nested structure of constructors (belonging to one datatype)
Christian Urban <urbanc@in.tum.de>
parents: 2599
diff changeset
    51
2590
98dc38c250bb added abs_rename_res lemma
Christian Urban <urbanc@in.tum.de>
parents: 2589
diff changeset
    52
2586
3ebc7ecfb0dd disabled the Foo examples, because of heavy work
Christian Urban <urbanc@in.tum.de>
parents: 2585
diff changeset
    53
2598
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
    54
(*
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
    55
thm at_set_avoiding1[THEN exE]
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
    56
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
    57
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
    58
lemma Let1_rename:
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
    59
  fixes c::"'a::fs"
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
    60
  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
    61
apply(simp only: foo.eq_iff)
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
    62
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
    63
apply(simp)
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
    64
apply(simp add: finite_supp)
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
    65
apply(perm_simp)
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
    66
apply(rule Abs_rename_list[THEN exE])
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
    67
apply(simp only: set_eqvt)
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
    68
apply
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
    69
sorry 
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
    70
*)
2588
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
    71
2600
ca6b4bc7a871 kept the nested structure of constructors (belonging to one datatype)
Christian Urban <urbanc@in.tum.de>
parents: 2599
diff changeset
    72
thm foo.exhaust
ca6b4bc7a871 kept the nested structure of constructors (belonging to one datatype)
Christian Urban <urbanc@in.tum.de>
parents: 2599
diff changeset
    73
ca6b4bc7a871 kept the nested structure of constructors (belonging to one datatype)
Christian Urban <urbanc@in.tum.de>
parents: 2599
diff changeset
    74
ML {*
ca6b4bc7a871 kept the nested structure of constructors (belonging to one datatype)
Christian Urban <urbanc@in.tum.de>
parents: 2599
diff changeset
    75
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
    76
  (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
    77
*}
ca6b4bc7a871 kept the nested structure of constructors (belonging to one datatype)
Christian Urban <urbanc@in.tum.de>
parents: 2599
diff changeset
    78
ca6b4bc7a871 kept the nested structure of constructors (belonging to one datatype)
Christian Urban <urbanc@in.tum.de>
parents: 2599
diff changeset
    79
ML {*
ca6b4bc7a871 kept the nested structure of constructors (belonging to one datatype)
Christian Urban <urbanc@in.tum.de>
parents: 2599
diff changeset
    80
  @{thms foo.exhaust}
ca6b4bc7a871 kept the nested structure of constructors (belonging to one datatype)
Christian Urban <urbanc@in.tum.de>
parents: 2599
diff changeset
    81
  |> map prop_of
ca6b4bc7a871 kept the nested structure of constructors (belonging to one datatype)
Christian Urban <urbanc@in.tum.de>
parents: 2599
diff changeset
    82
  |> 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
    83
  |> map fst
ca6b4bc7a871 kept the nested structure of constructors (belonging to one datatype)
Christian Urban <urbanc@in.tum.de>
parents: 2599
diff changeset
    84
  |> 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
    85
  |> map cat_lines
ca6b4bc7a871 kept the nested structure of constructors (belonging to one datatype)
Christian Urban <urbanc@in.tum.de>
parents: 2599
diff changeset
    86
  |> cat_lines
ca6b4bc7a871 kept the nested structure of constructors (belonging to one datatype)
Christian Urban <urbanc@in.tum.de>
parents: 2599
diff changeset
    87
  |> writeln 
ca6b4bc7a871 kept the nested structure of constructors (belonging to one datatype)
Christian Urban <urbanc@in.tum.de>
parents: 2599
diff changeset
    88
*}
ca6b4bc7a871 kept the nested structure of constructors (belonging to one datatype)
Christian Urban <urbanc@in.tum.de>
parents: 2599
diff changeset
    89
2588
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
    90
lemma test6:
2584
1eac050a36f4 completely different method fro deriving the exhaust lemma
Christian Urban <urbanc@in.tum.de>
parents: 2579
diff changeset
    91
  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
    92
  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
    93
  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
    94
  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
    95
  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
    96
  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
    97
  shows "P"
2588
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
    98
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
    99
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
   100
apply(rule exI)+
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   101
apply(assumption)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   102
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
   103
apply(rule exI)+
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   104
apply(assumption)
2598
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
   105
(* lam case *)
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
   106
(*
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
   107
apply(rule Let1_rename)
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
   108
apply(rule assms(3))
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
   109
apply(assumption)
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
   110
apply(simp)
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
   111
*)
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
   112
2588
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   113
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
   114
apply(erule exE)
2591
35c570891a3a isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents: 2590
diff changeset
   115
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
   116
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
   117
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
   118
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
   119
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
   120
apply(drule meta_mp)
2591
35c570891a3a isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents: 2590
diff changeset
   121
apply(simp)
2588
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   122
apply(erule exE)
2592
98236fbd8aa6 updated to Isabelle 2nd December
Christian Urban <urbanc@in.tum.de>
parents: 2591
diff changeset
   123
apply(rule assms(3))
2584
1eac050a36f4 completely different method fro deriving the exhaust lemma
Christian Urban <urbanc@in.tum.de>
parents: 2579
diff changeset
   124
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
   125
apply(erule conjE)+
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   126
apply(assumption)
2592
98236fbd8aa6 updated to Isabelle 2nd December
Christian Urban <urbanc@in.tum.de>
parents: 2591
diff changeset
   127
apply(clarify)
98236fbd8aa6 updated to Isabelle 2nd December
Christian Urban <urbanc@in.tum.de>
parents: 2591
diff changeset
   128
apply(simp (no_asm) add: foo.eq_iff)
98236fbd8aa6 updated to Isabelle 2nd December
Christian Urban <urbanc@in.tum.de>
parents: 2591
diff changeset
   129
apply(perm_simp)
98236fbd8aa6 updated to Isabelle 2nd December
Christian Urban <urbanc@in.tum.de>
parents: 2591
diff changeset
   130
apply(assumption)
2589
9781db0e2196 completed proofs in Foo2
Christian Urban <urbanc@in.tum.de>
parents: 2588
diff changeset
   131
apply(rule at_set_avoiding1)
9781db0e2196 completed proofs in Foo2
Christian Urban <urbanc@in.tum.de>
parents: 2588
diff changeset
   132
apply(simp)
9781db0e2196 completed proofs in Foo2
Christian Urban <urbanc@in.tum.de>
parents: 2588
diff changeset
   133
apply(simp add: finite_supp)
2598
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
   134
(* let1 case *)
2588
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   135
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
   136
apply(erule exE)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   137
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
   138
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
   139
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
   140
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
   141
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
   142
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
   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 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
   146
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
   147
apply(drule meta_mp)
2591
35c570891a3a isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents: 2590
diff changeset
   148
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
   149
apply(drule meta_mp)
2591
35c570891a3a isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents: 2590
diff changeset
   150
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
   151
apply(erule exE)+
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   152
apply(rule exI)+
2598
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
   153
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
   154
apply(rule conjI)
2591
35c570891a3a isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents: 2590
diff changeset
   155
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
   156
apply(erule conjE)+
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   157
apply(rule conjI)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   158
apply(assumption)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   159
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
   160
apply(assumption)
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)
2584
1eac050a36f4 completely different method fro deriving the exhaust lemma
Christian Urban <urbanc@in.tum.de>
parents: 2579
diff changeset
   163
apply(rule conjI)
2594
515e5496171c automated alpha_perm_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2593
diff changeset
   164
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
   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)
2594
515e5496171c automated alpha_perm_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2593
diff changeset
   167
apply(rule foo.perm_bn_alpha)
2589
9781db0e2196 completed proofs in Foo2
Christian Urban <urbanc@in.tum.de>
parents: 2588
diff changeset
   168
apply(rule at_set_avoiding1)
9781db0e2196 completed proofs in Foo2
Christian Urban <urbanc@in.tum.de>
parents: 2588
diff changeset
   169
apply(simp)
9781db0e2196 completed proofs in Foo2
Christian Urban <urbanc@in.tum.de>
parents: 2588
diff changeset
   170
apply(simp add: finite_supp)
2598
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
   171
(* let2 case *)
2588
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   172
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
   173
apply(erule exE)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   174
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
   175
apply(simp only:)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   176
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
   177
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
   178
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
   179
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
   180
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
   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 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="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
   185
apply(drule meta_mp)
2591
35c570891a3a isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents: 2590
diff changeset
   186
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
   187
apply(auto)[1]
35c570891a3a isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents: 2590
diff changeset
   188
apply(perm_simp)
35c570891a3a isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents: 2590
diff changeset
   189
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
   190
apply(perm_simp)
35c570891a3a isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents: 2590
diff changeset
   191
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
   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]
2588
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   194
apply(drule meta_mp)
2591
35c570891a3a isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents: 2590
diff changeset
   195
apply(perm_simp)
35c570891a3a isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents: 2590
diff changeset
   196
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
   197
apply(erule exE)+
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   198
apply(rule exI)+
2598
b136721eedb2 automated permute_bn theorems
Christian Urban <urbanc@in.tum.de>
parents: 2594
diff changeset
   199
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
   200
apply(rule conjI)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   201
prefer 2
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   202
apply(rule conjI)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   203
apply(assumption)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   204
apply(assumption)
2591
35c570891a3a isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents: 2590
diff changeset
   205
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
   206
apply(simp add: fresh_star_def)
2589
9781db0e2196 completed proofs in Foo2
Christian Urban <urbanc@in.tum.de>
parents: 2588
diff changeset
   207
apply(rule at_set_avoiding1)
9781db0e2196 completed proofs in Foo2
Christian Urban <urbanc@in.tum.de>
parents: 2588
diff changeset
   208
apply(simp)
9781db0e2196 completed proofs in Foo2
Christian Urban <urbanc@in.tum.de>
parents: 2588
diff changeset
   209
apply(simp add: finite_supp)
9781db0e2196 completed proofs in Foo2
Christian Urban <urbanc@in.tum.de>
parents: 2588
diff changeset
   210
done
2584
1eac050a36f4 completely different method fro deriving the exhaust lemma
Christian Urban <urbanc@in.tum.de>
parents: 2579
diff changeset
   211
2585
385add25dedf slightly simplified the Foo2 tests and hint at a general lemma
Christian Urban <urbanc@in.tum.de>
parents: 2584
diff changeset
   212
lemma test5:
385add25dedf slightly simplified the Foo2 tests and hint at a general lemma
Christian Urban <urbanc@in.tum.de>
parents: 2584
diff changeset
   213
  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
   214
  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
   215
  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
   216
  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
   217
  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
   218
  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
   219
  shows "P"
2588
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   220
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
   221
apply(erule exE)+
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   222
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
   223
apply(assumption)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   224
apply(erule exE)+
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   225
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
   226
apply(assumption)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   227
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
   228
apply(auto)[2]
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   229
apply(erule exE)+
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   230
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
   231
apply(auto)[2]
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   232
apply(erule exE)+
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   233
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
   234
apply(auto)[2]
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   235
done
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   236
2585
385add25dedf slightly simplified the Foo2 tests and hint at a general lemma
Christian Urban <urbanc@in.tum.de>
parents: 2584
diff changeset
   237
2588
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   238
lemma strong_induct:
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   239
  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
   240
  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
   241
  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
   242
  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
   243
  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
   244
  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
   245
    \<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
   246
    \<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
   247
  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
   248
    \<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
   249
  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
   250
  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
   251
  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
   252
  using assms
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   253
  apply(induction_schema)
8f5420681039 completed the strong exhausts rules for Foo2 using general lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2586
diff changeset
   254
  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
   255
  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
   256
  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
   257
  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
   258
  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
   259
  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
   260
  done
2584
1eac050a36f4 completely different method fro deriving the exhaust lemma
Christian Urban <urbanc@in.tum.de>
parents: 2579
diff changeset
   261
2573
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   262
end
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   263
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   264
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   265