Nominal/Ex/SingleLet.thy
author Christian Urban <urbanc@in.tum.de>
Thu, 02 Sep 2010 18:10:06 +0800
changeset 2461 86028b2016bd
parent 2454 9ffee4eb1ae1
child 2464 f4eba60cbd69
permissions -rw-r--r--
some experiments with support
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1911
60b5c61d3de2 renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents: 1773
diff changeset
     1
theory SingleLet
2454
9ffee4eb1ae1 renamed NewParser to Nominal2
Christian Urban <urbanc@in.tum.de>
parents: 2452
diff changeset
     2
imports "../Nominal2"
1596
c69d9fb16785 Move Ex1 and Ex2 out of Test
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     3
begin
c69d9fb16785 Move Ex1 and Ex2 out of Test
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     4
c69d9fb16785 Move Ex1 and Ex2 out of Test
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     5
atom_decl name
c69d9fb16785 Move Ex1 and Ex2 out of Test
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     6
2436
3885dc2669f9 cleaned up (almost completely) the examples
Christian Urban <urbanc@in.tum.de>
parents: 2434
diff changeset
     7
declare [[STEPS = 100]]
2294
72ad4e766acf properly exported bn_descr
Christian Urban <urbanc@in.tum.de>
parents: 2293
diff changeset
     8
2436
3885dc2669f9 cleaned up (almost completely) the examples
Christian Urban <urbanc@in.tum.de>
parents: 2434
diff changeset
     9
nominal_datatype single_let: trm  =
1911
60b5c61d3de2 renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents: 1773
diff changeset
    10
  Var "name"
60b5c61d3de2 renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents: 1773
diff changeset
    11
| App "trm" "trm"
2461
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    12
| Lam x::"name" t::"trm"  bind (set) x in t
2424
621ebd8b13c4 changed parser so that the binding mode is indicated as "bind (list)", "bind (set)" or "bind (res)"; if only "bind" is given, then bind (list) is assumed as default
Christian Urban <urbanc@in.tum.de>
parents: 2410
diff changeset
    13
| Let a::"assg" t::"trm"  bind (set) "bn a" in t
621ebd8b13c4 changed parser so that the binding mode is indicated as "bind (list)", "bind (set)" or "bind (res)"; if only "bind" is given, then bind (list) is assumed as default
Christian Urban <urbanc@in.tum.de>
parents: 2410
diff changeset
    14
| Foo x::"name" y::"name" t::"trm" t1::"trm" t2::"trm" bind (set) x in y t t1 t2
2296
45a69c9cc4cc alpha works now
Christian Urban <urbanc@in.tum.de>
parents: 2295
diff changeset
    15
| Bar x::"name" y::"name" t::"trm" bind y x in t x y
2316
08bbde090a17 also symmetry
Christian Urban <urbanc@in.tum.de>
parents: 2313
diff changeset
    16
| Baz x::"name" t1::"trm" t2::"trm" bind x in t1, bind x in t2 
1911
60b5c61d3de2 renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents: 1773
diff changeset
    17
and assg =
2320
d835a2771608 prove that alpha implies alpha_bn (needed for rsp proofs)
Christian Urban <urbanc@in.tum.de>
parents: 2318
diff changeset
    18
  As "name" x::"name" t::"trm" bind x in t
1596
c69d9fb16785 Move Ex1 and Ex2 out of Test
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    19
binder
1911
60b5c61d3de2 renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents: 1773
diff changeset
    20
  bn::"assg \<Rightarrow> atom set"
1596
c69d9fb16785 Move Ex1 and Ex2 out of Test
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    21
where
2320
d835a2771608 prove that alpha implies alpha_bn (needed for rsp proofs)
Christian Urban <urbanc@in.tum.de>
parents: 2318
diff changeset
    22
  "bn (As x y t) = {atom x}"
1911
60b5c61d3de2 renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents: 1773
diff changeset
    23
2448
b9d9c4540265 proved supports lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2436
diff changeset
    24
2436
3885dc2669f9 cleaned up (almost completely) the examples
Christian Urban <urbanc@in.tum.de>
parents: 2434
diff changeset
    25
thm single_let.distinct
3885dc2669f9 cleaned up (almost completely) the examples
Christian Urban <urbanc@in.tum.de>
parents: 2434
diff changeset
    26
thm single_let.induct
3885dc2669f9 cleaned up (almost completely) the examples
Christian Urban <urbanc@in.tum.de>
parents: 2434
diff changeset
    27
thm single_let.exhaust
3885dc2669f9 cleaned up (almost completely) the examples
Christian Urban <urbanc@in.tum.de>
parents: 2434
diff changeset
    28
thm single_let.fv_defs
3885dc2669f9 cleaned up (almost completely) the examples
Christian Urban <urbanc@in.tum.de>
parents: 2434
diff changeset
    29
thm single_let.bn_defs
3885dc2669f9 cleaned up (almost completely) the examples
Christian Urban <urbanc@in.tum.de>
parents: 2434
diff changeset
    30
thm single_let.perm_simps
3885dc2669f9 cleaned up (almost completely) the examples
Christian Urban <urbanc@in.tum.de>
parents: 2434
diff changeset
    31
thm single_let.eq_iff
3885dc2669f9 cleaned up (almost completely) the examples
Christian Urban <urbanc@in.tum.de>
parents: 2434
diff changeset
    32
thm single_let.fv_bn_eqvt
3885dc2669f9 cleaned up (almost completely) the examples
Christian Urban <urbanc@in.tum.de>
parents: 2434
diff changeset
    33
thm single_let.size_eqvt
2448
b9d9c4540265 proved supports lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2436
diff changeset
    34
thm single_let.supports
2450
217ef3e4282e added proofs for fsupp properties
Christian Urban <urbanc@in.tum.de>
parents: 2449
diff changeset
    35
thm single_let.fsupp
2430
a746d49b0240 updated to new Isabelle
Christian Urban <urbanc@in.tum.de>
parents: 2428
diff changeset
    36
2461
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    37
lemma supp_abs_sum:
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    38
  fixes a b::"'a::fs"
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    39
  shows "supp (Abs x a) \<union> supp (Abs x b) = supp (Abs x (a, b))"
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    40
  and   "supp (Abs_res x a) \<union> supp (Abs_res x b) = supp (Abs_res x (a, b))"
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    41
  and   "supp (Abs_lst y a) \<union> supp (Abs_lst y b) = supp (Abs_lst y (a, b))"
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    42
  apply (simp_all add: supp_abs supp_Pair)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    43
  apply blast+
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    44
  done
2448
b9d9c4540265 proved supports lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2436
diff changeset
    45
b9d9c4540265 proved supports lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2436
diff changeset
    46
b9d9c4540265 proved supports lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2436
diff changeset
    47
lemma test: 
2461
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    48
  "(\<exists>p. (bs, x) \<approx>gen (op=) f p (cs, y)) \<longleftrightarrow> (\<exists>p. (bs, x) \<approx>gen (op=) supp p (cs, y))"
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    49
sorry
2448
b9d9c4540265 proved supports lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2436
diff changeset
    50
b9d9c4540265 proved supports lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2436
diff changeset
    51
lemma Abs_eq_iff:
b9d9c4540265 proved supports lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2436
diff changeset
    52
  shows "Abs bs x = Abs cs y \<longleftrightarrow> (\<exists>p. (bs, x) \<approx>gen (op =) supp p (cs, y))"
b9d9c4540265 proved supports lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2436
diff changeset
    53
  and   "Abs_res bs x = Abs_res cs y \<longleftrightarrow> (\<exists>p. (bs, x) \<approx>res (op =) supp p (cs, y))"
b9d9c4540265 proved supports lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2436
diff changeset
    54
  and   "Abs_lst bsl x = Abs_lst csl y \<longleftrightarrow> (\<exists>p. (bsl, x) \<approx>lst (op =) supp p (csl, y))"
b9d9c4540265 proved supports lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2436
diff changeset
    55
  by (lifting alphas_abs)
2461
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    56
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    57
lemma test2:
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    58
  assumes "fv_trm t = supp t" 
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    59
  shows "\<forall>p. fv_trm (p \<bullet> t) = supp (p \<bullet> t)"
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    60
sorry
2448
b9d9c4540265 proved supports lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2436
diff changeset
    61
2461
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    62
lemma yy:
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    63
  "X = Y \<Longrightarrow> finite X = finite Y" by simp
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    64
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    65
2361
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
    66
lemma supp_fv:
2461
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    67
  "fv_trm t = supp t \<and> fv_assg as = supp as \<and> fv_bn as = {a. infinite {b. \<not>alpha_bn ((a \<rightleftharpoons> b) \<bullet> as) as}}"
2448
b9d9c4540265 proved supports lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2436
diff changeset
    68
apply(rule single_let.induct)
b9d9c4540265 proved supports lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2436
diff changeset
    69
apply(simp_all only: single_let.fv_defs)[2]
b9d9c4540265 proved supports lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2436
diff changeset
    70
apply(simp_all only: supp_def)[2]
b9d9c4540265 proved supports lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2436
diff changeset
    71
apply(simp_all only: single_let.perm_simps)[2]
b9d9c4540265 proved supports lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2436
diff changeset
    72
apply(simp_all only: single_let.eq_iff)[2]
b9d9c4540265 proved supports lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2436
diff changeset
    73
apply(simp_all only: de_Morgan_conj)[2]
b9d9c4540265 proved supports lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2436
diff changeset
    74
apply(simp_all only: Collect_disj_eq)[2]
b9d9c4540265 proved supports lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2436
diff changeset
    75
apply(simp_all only: finite_Un)[2]
b9d9c4540265 proved supports lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2436
diff changeset
    76
apply(simp_all only: de_Morgan_conj)[2]
b9d9c4540265 proved supports lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2436
diff changeset
    77
apply(simp_all only: Collect_disj_eq)[2]
2461
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    78
--" 1 "
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    79
apply(simp only: single_let.fv_defs)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    80
apply(simp add: supp_abs(1)[symmetric])
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    81
apply(simp (no_asm) only: supp_def)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    82
apply(simp only: single_let.perm_simps)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    83
apply(simp only: single_let.eq_iff)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    84
apply(simp only: permute_abs atom_eqvt permute_list.simps)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    85
apply(perm_simp)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    86
apply(simp only: Abs_eq_iff)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    87
apply(simp add: alphas)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    88
apply(drule test2)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    89
apply(simp)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    90
-- " 2 "
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    91
apply(erule conjE)+
2448
b9d9c4540265 proved supports lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2436
diff changeset
    92
apply(simp only: single_let.fv_defs)
2461
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    93
apply(simp add: supp_abs(1)[symmetric])
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    94
apply(simp (no_asm) only: supp_def)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    95
apply(simp only: single_let.perm_simps)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    96
apply(simp only: single_let.eq_iff)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    97
apply(simp only: permute_abs atom_eqvt permute_list.simps)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    98
apply(perm_simp add: single_let.fv_bn_eqvt)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
    99
apply(simp only: de_Morgan_conj)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   100
apply(simp only: Collect_disj_eq)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   101
apply(simp only: Abs_eq_iff)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   102
apply(simp only: finite_Un)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   103
apply(simp only: de_Morgan_conj)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   104
apply(simp only: Collect_disj_eq)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   105
apply(simp add: alphas)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   106
apply(drule test2)
2452
39f8d405d7a2 updated todos
Christian Urban <urbanc@in.tum.de>
parents: 2451
diff changeset
   107
apply(simp)
2461
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   108
-- " 3 "
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   109
apply(simp only: single_let.fv_defs)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   110
apply(simp only: supp_Pair[symmetric])
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   111
apply(simp add: supp_abs(1)[symmetric])
2448
b9d9c4540265 proved supports lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2436
diff changeset
   112
apply(simp (no_asm) only: supp_def)
b9d9c4540265 proved supports lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2436
diff changeset
   113
apply(simp only: single_let.perm_simps)
b9d9c4540265 proved supports lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2436
diff changeset
   114
apply(simp only: single_let.eq_iff)
2452
39f8d405d7a2 updated todos
Christian Urban <urbanc@in.tum.de>
parents: 2451
diff changeset
   115
apply(simp only: permute_abs atom_eqvt permute_list.simps)
2461
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   116
apply(perm_simp add: single_let.fv_bn_eqvt)
2452
39f8d405d7a2 updated todos
Christian Urban <urbanc@in.tum.de>
parents: 2451
diff changeset
   117
apply(simp only: Abs_eq_iff)
2461
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   118
apply(simp add: alphas)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   119
apply(simp add: supp_Pair)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   120
apply(drule test2)+
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   121
apply(simp)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   122
apply(simp add: prod_alpha_def)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   123
apply(simp add: Un_assoc)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   124
apply(rule Collect_cong)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   125
apply(rule arg_cong)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   126
back
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   127
apply(rule yy)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   128
apply(rule Collect_cong)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   129
apply(auto)[1]
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   130
-- " Bar "
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   131
apply(simp only: single_let.fv_defs)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   132
apply(simp only: supp_Pair[symmetric])
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   133
apply(simp add: supp_abs(1)[symmetric])
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   134
apply(simp (no_asm) only: supp_def)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   135
apply(simp only: single_let.perm_simps)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   136
apply(simp only: single_let.eq_iff)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   137
apply(simp only: permute_abs atom_eqvt permute_list.simps)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   138
apply(perm_simp add: single_let.fv_bn_eqvt)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   139
apply(simp only: Abs_eq_iff)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   140
apply(simp add: alphas prod_alpha_def)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   141
apply(drule test2)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   142
apply(simp add: supp_Pair)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   143
apply(subst atom_eqvt)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   144
apply(simp)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   145
apply(simp add: Un_assoc)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   146
apply(rule Collect_cong)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   147
apply(rule arg_cong)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   148
back
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   149
apply(rule yy)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   150
apply(rule Collect_cong)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   151
-- "last"
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   152
prefer 3
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   153
apply(rule conjI)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   154
apply(simp only: single_let.fv_defs)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   155
apply(perm_simp add: single_let.fv_bn_eqvt)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   156
apply(simp add: supp_abs(1)[symmetric])
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   157
apply(simp (no_asm) only: supp_def)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   158
apply(simp only: single_let.perm_simps)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   159
apply(simp only: single_let.eq_iff)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   160
apply(simp only: permute_abs atom_eqvt permute_list.simps)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   161
apply(perm_simp add: single_let.fv_bn_eqvt)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   162
apply(simp only: Abs_eq_iff)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   163
apply(simp only: de_Morgan_conj)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   164
apply(simp only: Collect_disj_eq)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   165
apply(simp only: finite_Un)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   166
apply(simp only: de_Morgan_conj)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   167
apply(simp only: Collect_disj_eq)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   168
apply(simp add: alphas prod_alpha_def)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   169
apply(drule test2)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   170
apply(simp add: supp_Pair)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   171
apply(simp only: permute_set_eq)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   172
apply(simp)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   173
apply(perm_simp add: single_let.fv_bn_eqvt)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   174
apply(simp only: single_let.eq_iff)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   175
apply(simp only: single_let.fv_defs)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   176
apply(simp add: supp_abs(1)[symmetric])
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   177
apply(simp (no_asm) only: supp_def)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   178
apply(perm_simp)
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   179
oops
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   180
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   181
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   182
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   183
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   184
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   185
text {* *}
86028b2016bd some experiments with support
Christian Urban <urbanc@in.tum.de>
parents: 2454
diff changeset
   186
2448
b9d9c4540265 proved supports lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2436
diff changeset
   187
(*
2365
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   188
consts perm_bn_trm :: "perm \<Rightarrow> trm \<Rightarrow> trm"
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   189
consts perm_bn_assg :: "perm \<Rightarrow> assg \<Rightarrow> assg"
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   190
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   191
lemma y:
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   192
  "perm_bn_trm p (Var x) = (Var x)"
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   193
  "perm_bn_trm p (App t1 t2) = (App t1 t2)"
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   194
  "perm_bn_trm p ("
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   195
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   196
2361
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   197
2336
f2d545b77b31 added definition of the quotient types
Christian Urban <urbanc@in.tum.de>
parents: 2330
diff changeset
   198
typ trm
f2d545b77b31 added definition of the quotient types
Christian Urban <urbanc@in.tum.de>
parents: 2330
diff changeset
   199
typ assg
f2d545b77b31 added definition of the quotient types
Christian Urban <urbanc@in.tum.de>
parents: 2330
diff changeset
   200
1911
60b5c61d3de2 renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents: 1773
diff changeset
   201
thm trm_assg.fv
60b5c61d3de2 renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents: 1773
diff changeset
   202
thm trm_assg.supp
2024
d974059827ad Equivariance fails for single let?
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1911
diff changeset
   203
thm trm_assg.eq_iff
1911
60b5c61d3de2 renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents: 1773
diff changeset
   204
thm trm_assg.bn
60b5c61d3de2 renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents: 1773
diff changeset
   205
thm trm_assg.perm
60b5c61d3de2 renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents: 1773
diff changeset
   206
thm trm_assg.induct
60b5c61d3de2 renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents: 1773
diff changeset
   207
thm trm_assg.inducts
60b5c61d3de2 renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents: 1773
diff changeset
   208
thm trm_assg.distinct
60b5c61d3de2 renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents: 1773
diff changeset
   209
ML {* Sign.of_sort @{theory} (@{typ trm}, @{sort fs}) *}
2436
3885dc2669f9 cleaned up (almost completely) the examples
Christian Urban <urbanc@in.tum.de>
parents: 2434
diff changeset
   210
*)
2024
d974059827ad Equivariance fails for single let?
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1911
diff changeset
   211
2436
3885dc2669f9 cleaned up (almost completely) the examples
Christian Urban <urbanc@in.tum.de>
parents: 2434
diff changeset
   212
2064
2725853f43b9 solved the problem with equivariance by first eta-normalising the goal
Christian Urban <urbanc@in.tum.de>
parents: 2028
diff changeset
   213
1596
c69d9fb16785 Move Ex1 and Ex2 out of Test
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   214
end
c69d9fb16785 Move Ex1 and Ex2 out of Test
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   215
c69d9fb16785 Move Ex1 and Ex2 out of Test
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   216
c69d9fb16785 Move Ex1 and Ex2 out of Test
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   217