Nominal/Ex/SingleLet.thy
author Christian Urban <urbanc@in.tum.de>
Sat, 14 Aug 2010 23:33:23 +0800
changeset 2398 1e6160690546
parent 2397 c670a849af65
child 2400 c6d30d5f5ba1
permissions -rw-r--r--
improved code
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
2024
d974059827ad Equivariance fails for single let?
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1911
diff changeset
     2
imports "../NewParser"
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
2398
1e6160690546 improved code
Christian Urban <urbanc@in.tum.de>
parents: 2397
diff changeset
     7
declare [[STEPS = 18]]
2294
72ad4e766acf properly exported bn_descr
Christian Urban <urbanc@in.tum.de>
parents: 2293
diff changeset
     8
2336
f2d545b77b31 added definition of the quotient types
Christian Urban <urbanc@in.tum.de>
parents: 2330
diff changeset
     9
nominal_datatype 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"
2024
d974059827ad Equivariance fails for single let?
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1911
diff changeset
    12
| Lam x::"name" t::"trm"  bind_set x in t
d974059827ad Equivariance fails for single let?
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1911
diff changeset
    13
| Let a::"assg" t::"trm"  bind_set "bn a" in t
2311
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2308
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
2397
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    24
(* can lift *)
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    25
thm distinct
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    26
thm trm_raw_assg_raw.inducts
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    27
thm fv_defs
2384
841b7e34e70a fixed order of fold_union to make alpha and fv agree
Christian Urban <urbanc@in.tum.de>
parents: 2382
diff changeset
    28
thm perm_simps
841b7e34e70a fixed order of fold_union to make alpha and fv agree
Christian Urban <urbanc@in.tum.de>
parents: 2382
diff changeset
    29
thm perm_laws
2397
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    30
thm trm_raw_assg_raw.size(9 - 16)
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    31
2398
1e6160690546 improved code
Christian Urban <urbanc@in.tum.de>
parents: 2397
diff changeset
    32
(* cannot lift yet *)
1e6160690546 improved code
Christian Urban <urbanc@in.tum.de>
parents: 2397
diff changeset
    33
thm eq_iff
1e6160690546 improved code
Christian Urban <urbanc@in.tum.de>
parents: 2397
diff changeset
    34
thm eq_iff_simps
2361
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
    35
2397
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    36
instantiation trm and assg :: size 
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    37
begin
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    38
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    39
quotient_definition 
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    40
  "size_trm :: trm \<Rightarrow> nat"
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    41
is "size :: trm_raw \<Rightarrow> nat"
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    42
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    43
quotient_definition 
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    44
  "size_assg :: assg \<Rightarrow> nat"
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    45
is "size :: assg_raw \<Rightarrow> nat"
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    46
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    47
instance .. 
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    48
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    49
end 
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    50
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    51
instantiation trm and assg :: pt
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    52
begin
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    53
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    54
quotient_definition 
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    55
  "permute_trm :: perm => trm => trm" 
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    56
  is "permute :: perm \<Rightarrow> trm_raw \<Rightarrow> trm_raw"
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    57
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    58
quotient_definition 
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    59
  "permute_assg :: perm => assg => assg" 
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    60
  is "permute :: perm \<Rightarrow> assg_raw \<Rightarrow> assg_raw"
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    61
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    62
lemma qperm_laws:
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    63
  fixes t::trm and a::assg
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    64
  shows "permute 0 t = t"
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    65
  and   "permute 0 a = a" 
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    66
sorry
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    67
  
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    68
instance
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    69
apply(default)
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    70
sorry
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    71
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    72
end
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    73
2398
1e6160690546 improved code
Christian Urban <urbanc@in.tum.de>
parents: 2397
diff changeset
    74
ML {*
1e6160690546 improved code
Christian Urban <urbanc@in.tum.de>
parents: 2397
diff changeset
    75
  val thms_d = map (lift_thm [@{typ trm}, @{typ assg}] @{context}) @{thms distinct}
1e6160690546 improved code
Christian Urban <urbanc@in.tum.de>
parents: 2397
diff changeset
    76
*}
2397
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
    77
2398
1e6160690546 improved code
Christian Urban <urbanc@in.tum.de>
parents: 2397
diff changeset
    78
ML {* 
1e6160690546 improved code
Christian Urban <urbanc@in.tum.de>
parents: 2397
diff changeset
    79
  val thms_i = map (lift_thm [@{typ trm}, @{typ assg}] @{context}) @{thms trm_raw_assg_raw.inducts}
1e6160690546 improved code
Christian Urban <urbanc@in.tum.de>
parents: 2397
diff changeset
    80
*}
1e6160690546 improved code
Christian Urban <urbanc@in.tum.de>
parents: 2397
diff changeset
    81
1e6160690546 improved code
Christian Urban <urbanc@in.tum.de>
parents: 2397
diff changeset
    82
ML {*
1e6160690546 improved code
Christian Urban <urbanc@in.tum.de>
parents: 2397
diff changeset
    83
  val thms_f = map (lift_thm [@{typ trm}, @{typ assg}] @{context}) @{thms fv_defs}
1e6160690546 improved code
Christian Urban <urbanc@in.tum.de>
parents: 2397
diff changeset
    84
*}
1e6160690546 improved code
Christian Urban <urbanc@in.tum.de>
parents: 2397
diff changeset
    85
1e6160690546 improved code
Christian Urban <urbanc@in.tum.de>
parents: 2397
diff changeset
    86
ML {* 
1e6160690546 improved code
Christian Urban <urbanc@in.tum.de>
parents: 2397
diff changeset
    87
  val thms_i = map (lift_thm [@{typ trm}, @{typ assg}] @{context}) @{thms trm_raw_assg_raw.size(9 - 16)}
1e6160690546 improved code
Christian Urban <urbanc@in.tum.de>
parents: 2397
diff changeset
    88
*}
1e6160690546 improved code
Christian Urban <urbanc@in.tum.de>
parents: 2397
diff changeset
    89
1e6160690546 improved code
Christian Urban <urbanc@in.tum.de>
parents: 2397
diff changeset
    90
ML {*
1e6160690546 improved code
Christian Urban <urbanc@in.tum.de>
parents: 2397
diff changeset
    91
  val thms_p = map (lift_thm [@{typ trm}, @{typ assg}] @{context}) @{thms perm_simps}
1e6160690546 improved code
Christian Urban <urbanc@in.tum.de>
parents: 2397
diff changeset
    92
*}
1e6160690546 improved code
Christian Urban <urbanc@in.tum.de>
parents: 2397
diff changeset
    93
1e6160690546 improved code
Christian Urban <urbanc@in.tum.de>
parents: 2397
diff changeset
    94
ML {*
1e6160690546 improved code
Christian Urban <urbanc@in.tum.de>
parents: 2397
diff changeset
    95
  val thms_f = map (lift_thm [@{typ trm}, @{typ assg}] @{context}) @{thms perm_laws}
1e6160690546 improved code
Christian Urban <urbanc@in.tum.de>
parents: 2397
diff changeset
    96
*}
1e6160690546 improved code
Christian Urban <urbanc@in.tum.de>
parents: 2397
diff changeset
    97
1e6160690546 improved code
Christian Urban <urbanc@in.tum.de>
parents: 2397
diff changeset
    98
1e6160690546 improved code
Christian Urban <urbanc@in.tum.de>
parents: 2397
diff changeset
    99
1e6160690546 improved code
Christian Urban <urbanc@in.tum.de>
parents: 2397
diff changeset
   100
1e6160690546 improved code
Christian Urban <urbanc@in.tum.de>
parents: 2397
diff changeset
   101
1e6160690546 improved code
Christian Urban <urbanc@in.tum.de>
parents: 2397
diff changeset
   102
section {* NOT *} 
1e6160690546 improved code
Christian Urban <urbanc@in.tum.de>
parents: 2397
diff changeset
   103
2397
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
   104
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
   105
ML {*
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
   106
  val thms_e = map (lift_thm [@{typ trm}, @{typ assg}] @{context}) @{thms eq_iff[unfolded alphas prod_fv.simps prod_rel.simps prod_alpha_def]}
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
   107
*}
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
   108
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
   109
ML {*
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
   110
  val thms_e = map (lift_thm [@{typ trm}, @{typ assg}] @{context}) @{thms eq_iff[unfolding alphas]}
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
   111
*}
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
   112
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
   113
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
   114
(*
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
   115
instance trm :: size ..
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
   116
instance assg :: size ..
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
   117
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
   118
lemma "(size (Var x)) = 0"
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
   119
apply(descending)
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
   120
apply(rule trm_raw_assg_raw.size(9 - 16))
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
   121
apply(simp)
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
   122
*)
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
   123
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
   124
ML {*
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
   125
  val thms_e = map (lift_thm [@{typ trm}, @{typ assg}] @{context}) @{thms eq_iff[unfolding alphas]}
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
   126
*}
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
   127
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
   128
section {* NOT *}
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
   129
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
   130
ML {*
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
   131
  val thms_p = map (lift_thm [@{typ trm}, @{typ assg}] @{context}) @{thms perm_simps(1)}
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
   132
*}
2361
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   133
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   134
instance trm :: pt sorry
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   135
instance assg :: pt sorry
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   136
2397
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
   137
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
   138
2361
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   139
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   140
2397
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
   141
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
   142
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
   143
c670a849af65 more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents: 2395
diff changeset
   144
2361
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   145
2365
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   146
thm eq_iff[no_vars]
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   147
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   148
ML {*
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   149
  val q1 = lift_thm [@{typ trm}, @{typ assg}] @{context} @{thm "eq_iff"(1)}
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   150
*}
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   151
2361
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   152
local_setup {* Local_Theory.note ((@{binding d1}, []), thms_d) #> snd *}
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   153
local_setup {* Local_Theory.note ((@{binding i1}, []), thms_i) #> snd *}
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   154
local_setup {* Local_Theory.note ((@{binding f1}, []), thms_f) #> snd *}
2365
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   155
local_setup {* Local_Theory.note ((@{binding q1}, []), [q1]) #> snd *}
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   156
2361
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   157
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   158
thm perm_defs
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   159
thm perm_simps
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   160
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   161
lemma supp_fv:
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   162
  "supp t = fv_trm t"
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   163
  "supp b = fv_bn b"
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   164
apply(induct t and b rule: i1)
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   165
apply(simp_all add: f1)
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   166
apply(simp_all add: supp_def)
2365
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   167
apply(simp_all add: b1)
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   168
sorry
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   169
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   170
consts perm_bn_trm :: "perm \<Rightarrow> trm \<Rightarrow> trm"
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   171
consts perm_bn_assg :: "perm \<Rightarrow> assg \<Rightarrow> assg"
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   172
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   173
lemma y:
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   174
  "perm_bn_trm p (Var x) = (Var x)"
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   175
  "perm_bn_trm p (App t1 t2) = (App t1 t2)"
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   176
  "perm_bn_trm p ("
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   177
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   178
2361
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   179
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   180
ML {*
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   181
  map (lift_thm [@{typ trm}, @{typ assg}] @{context}) @{thms eq_iff}
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   182
*}
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   183
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   184
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   185
2359
46f753eeb0b8 more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2339
diff changeset
   186
46f753eeb0b8 more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2339
diff changeset
   187
46f753eeb0b8 more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2339
diff changeset
   188
lemma "Var x \<noteq> App y1 y2"
46f753eeb0b8 more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2339
diff changeset
   189
apply(descending)
46f753eeb0b8 more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2339
diff changeset
   190
apply(simp add: trm_raw.distinct)
46f753eeb0b8 more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2339
diff changeset
   191
46f753eeb0b8 more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2339
diff changeset
   192
46f753eeb0b8 more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2339
diff changeset
   193
46f753eeb0b8 more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2339
diff changeset
   194
ML {*
46f753eeb0b8 more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2339
diff changeset
   195
  map (lift_thm [@{typ trm}, @{typ assg}] @{context}) @{thms trm_raw.distinct(1)}
46f753eeb0b8 more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2339
diff changeset
   196
*}
46f753eeb0b8 more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2339
diff changeset
   197
46f753eeb0b8 more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2339
diff changeset
   198
46f753eeb0b8 more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2339
diff changeset
   199
2338
e1764a73c292 slight cleaning
Christian Urban <urbanc@in.tum.de>
parents: 2336
diff changeset
   200
2336
f2d545b77b31 added definition of the quotient types
Christian Urban <urbanc@in.tum.de>
parents: 2330
diff changeset
   201
typ trm
f2d545b77b31 added definition of the quotient types
Christian Urban <urbanc@in.tum.de>
parents: 2330
diff changeset
   202
typ assg
f2d545b77b31 added definition of the quotient types
Christian Urban <urbanc@in.tum.de>
parents: 2330
diff changeset
   203
1911
60b5c61d3de2 renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents: 1773
diff changeset
   204
thm trm_assg.fv
60b5c61d3de2 renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents: 1773
diff changeset
   205
thm trm_assg.supp
2024
d974059827ad Equivariance fails for single let?
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1911
diff changeset
   206
thm trm_assg.eq_iff
1911
60b5c61d3de2 renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents: 1773
diff changeset
   207
thm trm_assg.bn
60b5c61d3de2 renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents: 1773
diff changeset
   208
thm trm_assg.perm
60b5c61d3de2 renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents: 1773
diff changeset
   209
thm trm_assg.induct
60b5c61d3de2 renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents: 1773
diff changeset
   210
thm trm_assg.inducts
60b5c61d3de2 renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents: 1773
diff changeset
   211
thm trm_assg.distinct
60b5c61d3de2 renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents: 1773
diff changeset
   212
ML {* Sign.of_sort @{theory} (@{typ trm}, @{sort fs}) *}
2024
d974059827ad Equivariance fails for single let?
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1911
diff changeset
   213
2288
3b83960f9544 new fv/fv_bn function (supp breaks now); exported raw perms and raw funs into separate ML-files
Christian Urban <urbanc@in.tum.de>
parents: 2146
diff changeset
   214
(* TEMPORARY
2024
d974059827ad Equivariance fails for single let?
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1911
diff changeset
   215
thm trm_assg.fv[simplified trm_assg.supp(1-2)]
2288
3b83960f9544 new fv/fv_bn function (supp breaks now); exported raw perms and raw funs into separate ML-files
Christian Urban <urbanc@in.tum.de>
parents: 2146
diff changeset
   216
*)
2064
2725853f43b9 solved the problem with equivariance by first eta-normalising the goal
Christian Urban <urbanc@in.tum.de>
parents: 2028
diff changeset
   217
1596
c69d9fb16785 Move Ex1 and Ex2 out of Test
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   218
end
c69d9fb16785 Move Ex1 and Ex2 out of Test
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   219
c69d9fb16785 Move Ex1 and Ex2 out of Test
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   220
c69d9fb16785 Move Ex1 and Ex2 out of Test
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   221