Nominal/Ex/SingleLet.thy
author Christian Urban <urbanc@in.tum.de>
Wed, 11 Aug 2010 16:21:24 +0800
changeset 2393 d9a0cf26a88c
parent 2392 9294d7cec5e2
child 2395 79e493880801
permissions -rw-r--r--
added a function that transforms the helper-rsp lemmas into real rsp lemmas
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
2388
ebf253d80670 equivariance for size
Christian Urban <urbanc@in.tum.de>
parents: 2387
diff changeset
     7
declare [[STEPS = 17]]
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
2389
0f24c961b5f6 introduced a general alpha_prove method
Christian Urban <urbanc@in.tum.de>
parents: 2388
diff changeset
    24
thm alpha_sym_thms
0f24c961b5f6 introduced a general alpha_prove method
Christian Urban <urbanc@in.tum.de>
parents: 2388
diff changeset
    25
thm alpha_trans_thms
2388
ebf253d80670 equivariance for size
Christian Urban <urbanc@in.tum.de>
parents: 2387
diff changeset
    26
thm size_eqvt
2392
9294d7cec5e2 proved rsp-helper lemmas of size functions
Christian Urban <urbanc@in.tum.de>
parents: 2389
diff changeset
    27
thm size_simps
9294d7cec5e2 proved rsp-helper lemmas of size functions
Christian Urban <urbanc@in.tum.de>
parents: 2389
diff changeset
    28
thm size_rsp
2384
841b7e34e70a fixed order of fold_union to make alpha and fv agree
Christian Urban <urbanc@in.tum.de>
parents: 2382
diff changeset
    29
thm alpha_bn_imps
841b7e34e70a fixed order of fold_union to make alpha and fv agree
Christian Urban <urbanc@in.tum.de>
parents: 2382
diff changeset
    30
thm distinct
841b7e34e70a fixed order of fold_union to make alpha and fv agree
Christian Urban <urbanc@in.tum.de>
parents: 2382
diff changeset
    31
thm eq_iff
2387
082d9fd28f89 helper lemmas for rsp-lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2386
diff changeset
    32
thm eq_iff_simps
2384
841b7e34e70a fixed order of fold_union to make alpha and fv agree
Christian Urban <urbanc@in.tum.de>
parents: 2382
diff changeset
    33
thm fv_defs
841b7e34e70a fixed order of fold_union to make alpha and fv agree
Christian Urban <urbanc@in.tum.de>
parents: 2382
diff changeset
    34
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
    35
thm perm_laws
2388
ebf253d80670 equivariance for size
Christian Urban <urbanc@in.tum.de>
parents: 2387
diff changeset
    36
thm funs_rsp
2384
841b7e34e70a fixed order of fold_union to make alpha and fv agree
Christian Urban <urbanc@in.tum.de>
parents: 2382
diff changeset
    37
2393
d9a0cf26a88c added a function that transforms the helper-rsp lemmas into real rsp lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2392
diff changeset
    38
declare size_rsp[quot_respect]
d9a0cf26a88c added a function that transforms the helper-rsp lemmas into real rsp lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2392
diff changeset
    39
declare funs_rsp[quot_respect]
2384
841b7e34e70a fixed order of fold_union to make alpha and fv agree
Christian Urban <urbanc@in.tum.de>
parents: 2382
diff changeset
    40
2359
46f753eeb0b8 more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2339
diff changeset
    41
typ trm
46f753eeb0b8 more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2339
diff changeset
    42
typ assg
2338
e1764a73c292 slight cleaning
Christian Urban <urbanc@in.tum.de>
parents: 2336
diff changeset
    43
term Var 
e1764a73c292 slight cleaning
Christian Urban <urbanc@in.tum.de>
parents: 2336
diff changeset
    44
term App
e1764a73c292 slight cleaning
Christian Urban <urbanc@in.tum.de>
parents: 2336
diff changeset
    45
term Baz
2339
1e0b3992189c more quotient-definitions
Christian Urban <urbanc@in.tum.de>
parents: 2338
diff changeset
    46
term bn
1e0b3992189c more quotient-definitions
Christian Urban <urbanc@in.tum.de>
parents: 2338
diff changeset
    47
term fv_trm
2384
841b7e34e70a fixed order of fold_union to make alpha and fv agree
Christian Urban <urbanc@in.tum.de>
parents: 2382
diff changeset
    48
term alpha_bn
2338
e1764a73c292 slight cleaning
Christian Urban <urbanc@in.tum.de>
parents: 2336
diff changeset
    49
2388
ebf253d80670 equivariance for size
Christian Urban <urbanc@in.tum.de>
parents: 2387
diff changeset
    50
lemma exi_zero: "P 0 \<Longrightarrow> \<exists>(x::perm). P x" by auto
ebf253d80670 equivariance for size
Christian Urban <urbanc@in.tum.de>
parents: 2387
diff changeset
    51
ebf253d80670 equivariance for size
Christian Urban <urbanc@in.tum.de>
parents: 2387
diff changeset
    52
ML {* 
ebf253d80670 equivariance for size
Christian Urban <urbanc@in.tum.de>
parents: 2387
diff changeset
    53
  val pre_ss = @{thms fun_rel_def}
ebf253d80670 equivariance for size
Christian Urban <urbanc@in.tum.de>
parents: 2387
diff changeset
    54
  val post_ss = @{thms alphas prod_alpha_def prod_rel.simps 
ebf253d80670 equivariance for size
Christian Urban <urbanc@in.tum.de>
parents: 2387
diff changeset
    55
    prod_fv.simps fresh_star_zero permute_zero funs_rsp prod.cases alpha_bn_imps}
ebf253d80670 equivariance for size
Christian Urban <urbanc@in.tum.de>
parents: 2387
diff changeset
    56
ebf253d80670 equivariance for size
Christian Urban <urbanc@in.tum.de>
parents: 2387
diff changeset
    57
  val tac = 
ebf253d80670 equivariance for size
Christian Urban <urbanc@in.tum.de>
parents: 2387
diff changeset
    58
    asm_full_simp_tac (HOL_ss addsimps pre_ss)
ebf253d80670 equivariance for size
Christian Urban <urbanc@in.tum.de>
parents: 2387
diff changeset
    59
    THEN' REPEAT o (resolve_tac @{thms allI impI})
ebf253d80670 equivariance for size
Christian Urban <urbanc@in.tum.de>
parents: 2387
diff changeset
    60
    THEN' resolve_tac @{thms alpha_trm_raw_alpha_assg_raw_alpha_bn_raw.intros} 
ebf253d80670 equivariance for size
Christian Urban <urbanc@in.tum.de>
parents: 2387
diff changeset
    61
    THEN_ALL_NEW (TRY o (rtac @{thm exi_zero}) THEN' asm_full_simp_tac (HOL_ss addsimps post_ss))
ebf253d80670 equivariance for size
Christian Urban <urbanc@in.tum.de>
parents: 2387
diff changeset
    62
*}
2361
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
    63
2359
46f753eeb0b8 more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2339
diff changeset
    64
lemma [quot_respect]: 
2361
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
    65
  "(op= ===> alpha_trm_raw) Var_raw Var_raw"
2359
46f753eeb0b8 more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2339
diff changeset
    66
  "(alpha_trm_raw ===> alpha_trm_raw ===> alpha_trm_raw) App_raw App_raw"
2361
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
    67
  "(op= ===> alpha_trm_raw ===> alpha_trm_raw) Lam_raw Lam_raw"
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
    68
  "(alpha_assg_raw ===> alpha_trm_raw ===> alpha_trm_raw) Let_raw Let_raw"
2388
ebf253d80670 equivariance for size
Christian Urban <urbanc@in.tum.de>
parents: 2387
diff changeset
    69
  "(op= ===> op= ===> alpha_trm_raw ===> alpha_trm_raw ===> alpha_trm_raw ===> alpha_trm_raw)
2361
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
    70
     Foo_raw Foo_raw"
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
    71
  "(op= ===> op= ===> alpha_trm_raw ===> alpha_trm_raw) Bar_raw Bar_raw"
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
    72
  "(op= ===> alpha_trm_raw ===> alpha_trm_raw ===> alpha_trm_raw) Baz_raw Baz_raw"
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
    73
  "(op = ===> op = ===> alpha_trm_raw ===> alpha_assg_raw) As_raw As_raw"
2388
ebf253d80670 equivariance for size
Christian Urban <urbanc@in.tum.de>
parents: 2387
diff changeset
    74
apply(tactic {* ALLGOALS tac *})
2393
d9a0cf26a88c added a function that transforms the helper-rsp lemmas into real rsp lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2392
diff changeset
    75
sorry
2359
46f753eeb0b8 more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2339
diff changeset
    76
2361
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
    77
lemma [quot_respect]:
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
    78
  "(op = ===> alpha_trm_raw ===> alpha_trm_raw) permute permute"
2393
d9a0cf26a88c added a function that transforms the helper-rsp lemmas into real rsp lemmas
Christian Urban <urbanc@in.tum.de>
parents: 2392
diff changeset
    79
apply(simp)
2361
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
    80
sorry
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
    81
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
    82
ML {*
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
    83
  val thms_d = map (lift_thm [@{typ trm}, @{typ assg}] @{context}) @{thms distinct}
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
    84
*}
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
    85
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
    86
ML {* 
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
    87
  val thms_i = map (lift_thm [@{typ trm}, @{typ assg}] @{context}) @{thms trm_raw_assg_raw.inducts}
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
    88
*}
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
    89
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
    90
ML {*
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
    91
  val thms_f = map (lift_thm [@{typ trm}, @{typ assg}] @{context}) @{thms fv_defs}
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
    92
*}
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
    93
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
    94
thm perm_defs[no_vars]
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
    95
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
    96
instance trm :: pt sorry
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
    97
instance assg :: pt sorry
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
    98
2365
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
    99
lemma b1:
2361
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   100
  "p \<bullet> Var name = Var (p \<bullet> name)"
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   101
  "p \<bullet> App trm1 trm2 = App (p \<bullet> trm1) (p \<bullet> trm2)"
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   102
  "p \<bullet> Lam name trm = Lam (p \<bullet> name) (p \<bullet> trm)"
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   103
  "p \<bullet> Let assg trm = Let (p \<bullet> assg) (p \<bullet> trm)"
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   104
  "p \<bullet> Foo name1 name2 trm1 trm2 trm3 =
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   105
     Foo (p \<bullet> name1) (p \<bullet> name2) (p \<bullet> trm1) (p \<bullet> trm2) (p \<bullet> trm3)"
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   106
  "p \<bullet> Bar name1 name2 trm = Bar (p \<bullet> name1) (p \<bullet> name2) (p \<bullet> trm)"
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   107
  "p \<bullet> Baz name trm1 trm2 = Baz (p \<bullet> name) (p \<bullet> trm1) (p \<bullet> trm2)"
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   108
  "p \<bullet> As name1 name2 trm = As (p \<bullet> name1) (p \<bullet> name2) (p \<bullet> trm)"
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   109
sorry
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   110
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   111
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   112
(*
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   113
ML {*
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   114
  val thms_p = map (lift_thm [@{typ trm}, @{typ assg}] @{context}) @{thms perm_defs}
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   115
*}
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   116
*)
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   117
2365
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   118
thm eq_iff[no_vars]
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   119
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   120
ML {*
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   121
  val q1 = lift_thm [@{typ trm}, @{typ assg}] @{context} @{thm "eq_iff"(1)}
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   122
*}
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   123
2361
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   124
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
   125
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
   126
local_setup {* Local_Theory.note ((@{binding f1}, []), thms_f) #> snd *}
2365
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   127
local_setup {* Local_Theory.note ((@{binding q1}, []), [q1]) #> snd *}
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   128
2361
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   129
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   130
thm perm_defs
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   131
thm perm_simps
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   132
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   133
lemma supp_fv:
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   134
  "supp t = fv_trm t"
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   135
  "supp b = fv_bn b"
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   136
apply(induct t and b rule: i1)
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   137
apply(simp_all add: f1)
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   138
apply(simp_all add: supp_def)
2365
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   139
apply(simp_all add: b1)
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   140
sorry
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   141
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   142
consts perm_bn_trm :: "perm \<Rightarrow> trm \<Rightarrow> trm"
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   143
consts perm_bn_assg :: "perm \<Rightarrow> assg \<Rightarrow> assg"
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   144
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   145
lemma y:
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   146
  "perm_bn_trm p (Var x) = (Var x)"
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   147
  "perm_bn_trm p (App t1 t2) = (App t1 t2)"
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   148
  "perm_bn_trm p ("
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   149
Christian Urban <urbanc@in.tum.de>
parents: 2361
diff changeset
   150
2361
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   151
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   152
ML {*
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   153
  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
   154
*}
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   155
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   156
d73d4d151cce more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2359
diff changeset
   157
2359
46f753eeb0b8 more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2339
diff changeset
   158
46f753eeb0b8 more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2339
diff changeset
   159
46f753eeb0b8 more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2339
diff changeset
   160
lemma "Var x \<noteq> App y1 y2"
46f753eeb0b8 more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2339
diff changeset
   161
apply(descending)
46f753eeb0b8 more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2339
diff changeset
   162
apply(simp add: trm_raw.distinct)
46f753eeb0b8 more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2339
diff changeset
   163
46f753eeb0b8 more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2339
diff changeset
   164
46f753eeb0b8 more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2339
diff changeset
   165
46f753eeb0b8 more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2339
diff changeset
   166
ML {*
46f753eeb0b8 more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2339
diff changeset
   167
  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
   168
*}
46f753eeb0b8 more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2339
diff changeset
   169
46f753eeb0b8 more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2339
diff changeset
   170
46f753eeb0b8 more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 2339
diff changeset
   171
2338
e1764a73c292 slight cleaning
Christian Urban <urbanc@in.tum.de>
parents: 2336
diff changeset
   172
2336
f2d545b77b31 added definition of the quotient types
Christian Urban <urbanc@in.tum.de>
parents: 2330
diff changeset
   173
typ trm
f2d545b77b31 added definition of the quotient types
Christian Urban <urbanc@in.tum.de>
parents: 2330
diff changeset
   174
typ assg
f2d545b77b31 added definition of the quotient types
Christian Urban <urbanc@in.tum.de>
parents: 2330
diff changeset
   175
1911
60b5c61d3de2 renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents: 1773
diff changeset
   176
thm trm_assg.fv
60b5c61d3de2 renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents: 1773
diff changeset
   177
thm trm_assg.supp
2024
d974059827ad Equivariance fails for single let?
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1911
diff changeset
   178
thm trm_assg.eq_iff
1911
60b5c61d3de2 renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents: 1773
diff changeset
   179
thm trm_assg.bn
60b5c61d3de2 renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents: 1773
diff changeset
   180
thm trm_assg.perm
60b5c61d3de2 renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents: 1773
diff changeset
   181
thm trm_assg.induct
60b5c61d3de2 renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents: 1773
diff changeset
   182
thm trm_assg.inducts
60b5c61d3de2 renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents: 1773
diff changeset
   183
thm trm_assg.distinct
60b5c61d3de2 renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents: 1773
diff changeset
   184
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
   185
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
   186
(* TEMPORARY
2024
d974059827ad Equivariance fails for single let?
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1911
diff changeset
   187
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
   188
*)
2064
2725853f43b9 solved the problem with equivariance by first eta-normalising the goal
Christian Urban <urbanc@in.tum.de>
parents: 2028
diff changeset
   189
1596
c69d9fb16785 Move Ex1 and Ex2 out of Test
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   190
end
c69d9fb16785 Move Ex1 and Ex2 out of Test
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   191
c69d9fb16785 Move Ex1 and Ex2 out of Test
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   192
c69d9fb16785 Move Ex1 and Ex2 out of Test
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   193