Quot/Nominal/LFex.thy
author Cezary Kaliszyk <kaliszyk@in.tum.de>
Wed, 24 Feb 2010 10:08:54 +0100
changeset 1236 ca3c69545a78
parent 1234 1240d5eb275d
child 1237 38eb2bd9ad3a
permissions -rw-r--r--
LF renaming part 2 (proper fv functions)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     1
theory LFex
1219
c74c8ba46db7 All works in LF but will require renaming.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1218
diff changeset
     2
imports "Nominal2_Atoms" "Nominal2_Eqvt" "Nominal2_Supp" "Abs" "Perm" "Fv"
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     3
begin
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     4
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     5
atom_decl name
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     6
atom_decl ident
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     7
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
     8
datatype rkind =
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     9
    Type
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    10
  | KPi "rty" "name" "rkind"
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    11
and rty =
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    12
    TConst "ident"
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    13
  | TApp "rty" "rtrm"
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    14
  | TPi "rty" "name" "rty"
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    15
and rtrm =
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    16
    Const "ident"
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    17
  | Var "name"
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    18
  | App "rtrm" "rtrm"
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    19
  | Lam "rty" "name" "rtrm"
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    20
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    21
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    22
instantiation rkind and rty and rtrm :: pt
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    23
begin
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    24
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    25
primrec
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    26
    permute_rkind
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    27
and permute_rty
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    28
and permute_rtrm
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    29
where
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    30
  "permute_rkind pi Type = Type"
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    31
| "permute_rkind pi (KPi t n k) = KPi (permute_rty pi t) (pi \<bullet> n) (permute_rkind pi k)"
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    32
| "permute_rty pi (TConst i) = TConst (pi \<bullet> i)"
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    33
| "permute_rty pi (TApp A M) = TApp (permute_rty pi A) (permute_rtrm pi M)"
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    34
| "permute_rty pi (TPi A x B) = TPi (permute_rty pi A) (pi \<bullet> x) (permute_rty pi B)"
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    35
| "permute_rtrm pi (Const i) = Const (pi \<bullet> i)"
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    36
| "permute_rtrm pi (Var x) = Var (pi \<bullet> x)"
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    37
| "permute_rtrm pi (App M N) = App (permute_rtrm pi M) (permute_rtrm pi N)"
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    38
| "permute_rtrm pi (Lam A x M) = Lam (permute_rty pi A) (pi \<bullet> x) (permute_rtrm pi M)"
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    39
1022
cc5830c452c4 With induct instead of induct_tac, just one induction is sufficient.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1021
diff changeset
    40
lemma rperm_zero_ok:
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    41
  "0 \<bullet> (x :: rkind) = x"
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    42
  "0 \<bullet> (y :: rty) = y"
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    43
  "0 \<bullet> (z :: rtrm) = z"
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    44
apply(induct x and y and z rule: rkind_rty_rtrm.inducts)
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    45
apply(simp_all)
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    46
done
1022
cc5830c452c4 With induct instead of induct_tac, just one induction is sufficient.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1021
diff changeset
    47
cc5830c452c4 With induct instead of induct_tac, just one induction is sufficient.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1021
diff changeset
    48
lemma rperm_plus_ok:
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    49
 "(p + q) \<bullet> (x :: rkind) = p \<bullet> q \<bullet> x"
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    50
 "(p + q) \<bullet> (y :: rty) = p \<bullet> q \<bullet> y"
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    51
 "(p + q) \<bullet> (z :: rtrm) = p \<bullet> q \<bullet> z"
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    52
apply(induct x and y and z rule: rkind_rty_rtrm.inducts)
1022
cc5830c452c4 With induct instead of induct_tac, just one induction is sufficient.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1021
diff changeset
    53
apply(simp_all)
cc5830c452c4 With induct instead of induct_tac, just one induction is sufficient.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1021
diff changeset
    54
done
cc5830c452c4 With induct instead of induct_tac, just one induction is sufficient.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1021
diff changeset
    55
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    56
instance
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    57
apply default
1022
cc5830c452c4 With induct instead of induct_tac, just one induction is sufficient.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1021
diff changeset
    58
apply (simp_all only:rperm_zero_ok rperm_plus_ok)
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    59
done
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    60
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    61
end
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    62
1219
c74c8ba46db7 All works in LF but will require renaming.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1218
diff changeset
    63
(*
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    64
setup {* snd o define_raw_perms ["rkind", "rty", "rtrm"] ["LFex.rkind", "LFex.rty", "LFex.rtrm"] *}
1219
c74c8ba46db7 All works in LF but will require renaming.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1218
diff changeset
    65
local_setup {*
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    66
  snd o define_fv_alpha "LFex.rkind"
1219
c74c8ba46db7 All works in LF but will require renaming.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1218
diff changeset
    67
  [[ [], [[], [(NONE, 1)], [(NONE, 1)]] ],
c74c8ba46db7 All works in LF but will require renaming.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1218
diff changeset
    68
   [ [[]], [[], []], [[], [(NONE, 1)], [(NONE, 1)]] ],
c74c8ba46db7 All works in LF but will require renaming.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1218
diff changeset
    69
   [ [[]], [[]], [[], []], [[], [(NONE, 1)], [(NONE, 1)]]]] *}
c74c8ba46db7 All works in LF but will require renaming.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1218
diff changeset
    70
notation
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    71
    alpha_rkind  ("_ \<approx>ki _" [100, 100] 100)
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    72
and alpha_rty    ("_ \<approx>rty _" [100, 100] 100)
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    73
and alpha_rtrm   ("_ \<approx>tr _" [100, 100] 100)
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    74
thm fv_rkind_fv_rty_fv_rtrm.simps alpha_rkind_alpha_rty_alpha_rtrm.intros
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    75
local_setup {* (fn ctxt => snd (Local_Theory.note ((@{binding alphas_inj}, []), (build_alpha_inj @{thms alpha_rkind_alpha_rty_alpha_rtrm.intros} @{thms rkind.distinct rty.distinct rtrm.distinct rkind.inject rty.inject rtrm.inject} @{thms alpha_rkind.cases alpha_rty.cases alpha_rtrm.cases} ctxt)) ctxt)) *}
1219
c74c8ba46db7 All works in LF but will require renaming.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1218
diff changeset
    76
thm alphas_inj
c74c8ba46db7 All works in LF but will require renaming.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1218
diff changeset
    77
c74c8ba46db7 All works in LF but will require renaming.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1218
diff changeset
    78
lemma alphas_eqvt:
c74c8ba46db7 All works in LF but will require renaming.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1218
diff changeset
    79
  "t1 \<approx>ki s1 \<Longrightarrow> (pi \<bullet> t1) \<approx>ki (pi \<bullet> s1)"
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    80
  "t2 \<approx>rty s2 \<Longrightarrow> (pi \<bullet> t2) \<approx>rty (pi \<bullet> s2)"
1219
c74c8ba46db7 All works in LF but will require renaming.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1218
diff changeset
    81
  "t3 \<approx>tr s3 \<Longrightarrow> (pi \<bullet> t3) \<approx>tr (pi \<bullet> s3)"
c74c8ba46db7 All works in LF but will require renaming.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1218
diff changeset
    82
sorry
c74c8ba46db7 All works in LF but will require renaming.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1218
diff changeset
    83
c74c8ba46db7 All works in LF but will require renaming.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1218
diff changeset
    84
local_setup {* (fn ctxt => snd (Local_Theory.note ((@{binding alphas_equivp}, []),
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    85
  (build_equivps [@{term alpha_rkind}, @{term alpha_rty}, @{term alpha_rtrm}]
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    86
     @{thm rkind_rty_rtrm.induct} @{thm alpha_rkind_alpha_rty_alpha_rtrm.induct} 
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    87
     @{thms rkind.inject rty.inject rtrm.inject} @{thms alphas_inj}
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    88
     @{thms rkind.distinct rty.distinct rtrm.distinct}
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
    89
     @{thms alpha_rkind.cases alpha_rty.cases alpha_rtrm.cases}
1219
c74c8ba46db7 All works in LF but will require renaming.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1218
diff changeset
    90
     @{thms alphas_eqvt} ctxt)) ctxt)) *}
c74c8ba46db7 All works in LF but will require renaming.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1218
diff changeset
    91
thm alphas_equivp
c74c8ba46db7 All works in LF but will require renaming.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1218
diff changeset
    92
*)
c74c8ba46db7 All works in LF but will require renaming.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1218
diff changeset
    93
1218
2bbfbc9a81fc Reordering in LF.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1210
diff changeset
    94
primrec
1236
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
    95
    fv_rkind :: "rkind \<Rightarrow> atom set"
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
    96
and fv_rty   :: "rty \<Rightarrow> atom set"
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
    97
and fv_rtrm  :: "rtrm \<Rightarrow> atom set"
1218
2bbfbc9a81fc Reordering in LF.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1210
diff changeset
    98
where
1236
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
    99
  "fv_rkind (Type) = {}"
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
   100
| "fv_rkind (KPi A x K) = (fv_rty A) \<union> ((fv_rkind K) - {atom x})"
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
   101
| "fv_rty (TConst i) = {atom i}"
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
   102
| "fv_rty (TApp A M) = (fv_rty A) \<union> (fv_rtrm M)"
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
   103
| "fv_rty (TPi A x B) = (fv_rty A) \<union> ((fv_rty B) - {atom x})"
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
   104
| "fv_rtrm (Const i) = {atom i}"
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
   105
| "fv_rtrm (Var x) = {atom x}"
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
   106
| "fv_rtrm (App M N) = (fv_rtrm M) \<union> (fv_rtrm N)"
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
   107
| "fv_rtrm (Lam A x M) = (fv_rty A) \<union> ((fv_rtrm M) - {atom x})"
1218
2bbfbc9a81fc Reordering in LF.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1210
diff changeset
   108
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   109
inductive
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   110
    arkind :: "rkind \<Rightarrow> rkind \<Rightarrow> bool" ("_ \<approx>ki _" [100, 100] 100)
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   111
and arty   :: "rty \<Rightarrow> rty \<Rightarrow> bool"     ("_ \<approx>rty _" [100, 100] 100)
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   112
and artrm  :: "rtrm \<Rightarrow> rtrm \<Rightarrow> bool"   ("_ \<approx>tr _" [100, 100] 100)
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   113
where
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   114
  a1: "(Type) \<approx>ki (Type)"
1236
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
   115
| a2: "\<lbrakk>A \<approx>rty A'; \<exists>pi. (({atom a}, K) \<approx>gen arkind fv_rkind pi ({atom b}, K'))\<rbrakk> \<Longrightarrow> (KPi A a K) \<approx>ki (KPi A' b K')"
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   116
| a3: "i = j \<Longrightarrow> (TConst i) \<approx>rty (TConst j)"
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   117
| a4: "\<lbrakk>A \<approx>rty A'; M \<approx>tr M'\<rbrakk> \<Longrightarrow> (TApp A M) \<approx>rty (TApp A' M')"
1236
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
   118
| a5: "\<lbrakk>A \<approx>rty A'; \<exists>pi. (({atom a}, B) \<approx>gen arty fv_rty pi ({atom b}, B'))\<rbrakk> \<Longrightarrow> (TPi A a B) \<approx>rty (TPi A' b B')"
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   119
| a6: "i = j \<Longrightarrow> (Const i) \<approx>tr (Const j)"
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   120
| a7: "x = y \<Longrightarrow> (Var x) \<approx>tr (Var y)"
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   121
| a8: "\<lbrakk>M \<approx>tr M'; N \<approx>tr N'\<rbrakk> \<Longrightarrow> (App M N) \<approx>tr (App M' N')"
1236
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
   122
| a9: "\<lbrakk>A \<approx>rty A'; \<exists>pi. (({atom a}, M) \<approx>gen artrm fv_rtrm pi ({atom b}, M'))\<rbrakk> \<Longrightarrow> (Lam A a M) \<approx>tr (Lam A' b M')"
991
928e80edf138 Added the experiments with fun and function.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 985
diff changeset
   123
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   124
lemma arkind_arty_artrm_inj:
992
74e9a580448c equivariance of rfv and alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 991
diff changeset
   125
  "(Type) \<approx>ki (Type) = True"
1236
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
   126
  "((KPi A a K) \<approx>ki (KPi A' b K')) = ((A \<approx>rty A') \<and> (\<exists>pi. ({atom a}, K) \<approx>gen arkind fv_rkind pi ({atom b}, K')))"
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   127
  "(TConst i) \<approx>rty (TConst j) = (i = j)"
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   128
  "(TApp A M) \<approx>rty (TApp A' M') = (A \<approx>rty A' \<and> M \<approx>tr M')"
1236
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
   129
  "((TPi A a B) \<approx>rty (TPi A' b B')) = ((A \<approx>rty A') \<and> (\<exists>pi. (({atom a}, B) \<approx>gen arty fv_rty pi ({atom b}, B'))))"
992
74e9a580448c equivariance of rfv and alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 991
diff changeset
   130
  "(Const i) \<approx>tr (Const j) = (i = j)"
74e9a580448c equivariance of rfv and alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 991
diff changeset
   131
  "(Var x) \<approx>tr (Var y) = (x = y)"
74e9a580448c equivariance of rfv and alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 991
diff changeset
   132
  "(App M N) \<approx>tr (App M' N') = (M \<approx>tr M' \<and> N \<approx>tr N')"
1236
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
   133
  "((Lam A a M) \<approx>tr (Lam A' b M')) = ((A \<approx>rty A') \<and> (\<exists>pi. (({atom a}, M) \<approx>gen artrm fv_rtrm pi ({atom b}, M'))))"
992
74e9a580448c equivariance of rfv and alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 991
diff changeset
   134
apply -
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   135
apply (simp add: arkind_arty_artrm.intros)
992
74e9a580448c equivariance of rfv and alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 991
diff changeset
   136
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   137
apply rule apply (erule arkind.cases) apply simp apply blast
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   138
apply (simp only: arkind_arty_artrm.intros)
992
74e9a580448c equivariance of rfv and alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 991
diff changeset
   139
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   140
apply rule apply (erule arty.cases) apply simp apply simp apply simp
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   141
apply (simp only: arkind_arty_artrm.intros)
992
74e9a580448c equivariance of rfv and alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 991
diff changeset
   142
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   143
apply rule apply (erule arty.cases) apply simp apply simp apply simp
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   144
apply (simp only: arkind_arty_artrm.intros)
992
74e9a580448c equivariance of rfv and alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 991
diff changeset
   145
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   146
apply rule apply (erule arty.cases) apply simp apply simp apply blast
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   147
apply (simp only: arkind_arty_artrm.intros)
992
74e9a580448c equivariance of rfv and alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 991
diff changeset
   148
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   149
apply rule apply (erule artrm.cases) apply simp apply simp apply simp apply blast
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   150
apply (simp only: arkind_arty_artrm.intros)
992
74e9a580448c equivariance of rfv and alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 991
diff changeset
   151
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   152
apply rule apply (erule artrm.cases) apply simp apply simp apply simp apply blast
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   153
apply (simp only: arkind_arty_artrm.intros)
992
74e9a580448c equivariance of rfv and alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 991
diff changeset
   154
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   155
apply rule apply (erule artrm.cases) apply simp apply simp apply simp apply blast
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   156
apply (simp only: arkind_arty_artrm.intros)
992
74e9a580448c equivariance of rfv and alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 991
diff changeset
   157
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   158
apply rule apply (erule artrm.cases) apply simp apply simp apply simp apply blast
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   159
apply (simp only: arkind_arty_artrm.intros)
992
74e9a580448c equivariance of rfv and alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 991
diff changeset
   160
done
74e9a580448c equivariance of rfv and alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 991
diff changeset
   161
74e9a580448c equivariance of rfv and alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 991
diff changeset
   162
lemma rfv_eqvt[eqvt]:
1236
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
   163
  "((pi\<bullet>fv_rkind t1) = fv_rkind (pi\<bullet>t1))"
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
   164
  "((pi\<bullet>fv_rty t2) = fv_rty (pi\<bullet>t2))"
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
   165
  "((pi\<bullet>fv_rtrm t3) = fv_rtrm (pi\<bullet>t3))"
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   166
apply(induct t1 and t2 and t3 rule: rkind_rty_rtrm.inducts)
993
5c0d9a507bcb Fixed the induction problem + some more proofs.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 992
diff changeset
   167
apply(simp_all add:  union_eqvt Diff_eqvt)
5c0d9a507bcb Fixed the induction problem + some more proofs.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 992
diff changeset
   168
apply(simp_all add: permute_set_eq atom_eqvt)
992
74e9a580448c equivariance of rfv and alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 991
diff changeset
   169
done
74e9a580448c equivariance of rfv and alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 991
diff changeset
   170
74e9a580448c equivariance of rfv and alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 991
diff changeset
   171
lemma alpha_eqvt:
74e9a580448c equivariance of rfv and alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 991
diff changeset
   172
  "t1 \<approx>ki s1 \<Longrightarrow> (pi \<bullet> t1) \<approx>ki (pi \<bullet> s1)"
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   173
  "t2 \<approx>rty s2 \<Longrightarrow> (pi \<bullet> t2) \<approx>rty (pi \<bullet> s2)"
992
74e9a580448c equivariance of rfv and alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 991
diff changeset
   174
  "t3 \<approx>tr s3 \<Longrightarrow> (pi \<bullet> t3) \<approx>tr (pi \<bullet> s3)"
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   175
apply(induct rule: arkind_arty_artrm.inducts)
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   176
apply (simp_all add: arkind_arty_artrm.intros)
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   177
apply (simp_all add: arkind_arty_artrm_inj)
1027
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   178
apply (rule alpha_gen_atom_eqvt)
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   179
apply (simp add: rfv_eqvt)
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   180
apply assumption
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   181
apply (rule alpha_gen_atom_eqvt)
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   182
apply (simp add: rfv_eqvt)
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   183
apply assumption
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   184
apply (rule alpha_gen_atom_eqvt)
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   185
apply (simp add: rfv_eqvt)
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   186
apply assumption
992
74e9a580448c equivariance of rfv and alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 991
diff changeset
   187
done
74e9a580448c equivariance of rfv and alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 991
diff changeset
   188
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   189
lemma al_refl:
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   190
  fixes K::"rkind" 
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   191
  and   A::"rty"
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   192
  and   M::"rtrm"
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   193
  shows "K \<approx>ki K"
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   194
  and   "A \<approx>rty A"
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   195
  and   "M \<approx>tr M"
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   196
  apply(induct K and A and M rule: rkind_rty_rtrm.inducts)
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   197
  apply(auto intro: arkind_arty_artrm.intros)
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   198
  apply (rule a2)
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   199
  apply auto
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   200
  apply(rule_tac x="0" in exI)
1027
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   201
  apply(simp_all add: fresh_star_def fresh_zero_perm alpha_gen)
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   202
  apply (rule a5)
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   203
  apply auto
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   204
  apply(rule_tac x="0" in exI)
1027
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   205
  apply(simp_all add: fresh_star_def fresh_zero_perm alpha_gen)
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   206
  apply (rule a9)
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   207
  apply auto
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   208
  apply(rule_tac x="0" in exI)
1027
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   209
  apply(simp_all add: fresh_star_def fresh_zero_perm alpha_gen)
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   210
  done
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   211
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   212
lemma al_sym:
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   213
  fixes K K'::"rkind" and A A'::"rty" and M M'::"rtrm"
1027
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   214
  shows "K \<approx>ki K' \<Longrightarrow> K' \<approx>ki K"
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   215
  and   "A \<approx>rty A' \<Longrightarrow> A' \<approx>rty A"
1027
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   216
  and   "M \<approx>tr M' \<Longrightarrow> M' \<approx>tr M"
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   217
  apply(induct K K' and A A' and M M' rule: arkind_arty_artrm.inducts)
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   218
  apply(simp_all add: arkind_arty_artrm.intros)
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   219
  apply (simp_all add: arkind_arty_artrm_inj)
1210
10a0e3578507 Generalize atom_trans and atom_sym.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1139
diff changeset
   220
  apply(erule alpha_gen_compose_sym)
10a0e3578507 Generalize atom_trans and atom_sym.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1139
diff changeset
   221
  apply(erule alpha_eqvt)
10a0e3578507 Generalize atom_trans and atom_sym.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1139
diff changeset
   222
  apply(erule alpha_gen_compose_sym)
10a0e3578507 Generalize atom_trans and atom_sym.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1139
diff changeset
   223
  apply(erule alpha_eqvt)
10a0e3578507 Generalize atom_trans and atom_sym.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1139
diff changeset
   224
  apply(erule alpha_gen_compose_sym)
10a0e3578507 Generalize atom_trans and atom_sym.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1139
diff changeset
   225
  apply(erule alpha_eqvt)
1027
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   226
  done
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   227
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   228
lemma al_trans:
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   229
  fixes K K' K''::"rkind" and A A' A''::"rty" and M M' M''::"rtrm"
1027
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   230
  shows "K \<approx>ki K' \<Longrightarrow> K' \<approx>ki K'' \<Longrightarrow> K \<approx>ki K''"
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   231
  and   "A \<approx>rty A' \<Longrightarrow> A' \<approx>rty A'' \<Longrightarrow> A \<approx>rty A''"
1027
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   232
  and   "M \<approx>tr M' \<Longrightarrow> M' \<approx>tr M'' \<Longrightarrow> M \<approx>tr M''"
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   233
  apply(induct K K' and A A' and M M' arbitrary: K'' and A'' and M'' rule: arkind_arty_artrm.inducts)
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   234
  apply(simp_all add: arkind_arty_artrm.intros)
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   235
  apply(erule arkind.cases)
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   236
  apply(simp_all add: arkind_arty_artrm.intros)
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   237
  apply(simp add: arkind_arty_artrm_inj)
1210
10a0e3578507 Generalize atom_trans and atom_sym.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1139
diff changeset
   238
  apply(erule alpha_gen_compose_trans)
10a0e3578507 Generalize atom_trans and atom_sym.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1139
diff changeset
   239
  apply(assumption)
10a0e3578507 Generalize atom_trans and atom_sym.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1139
diff changeset
   240
  apply(erule alpha_eqvt)
1027
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   241
  apply(rotate_tac 4)
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   242
  apply(erule arty.cases)
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   243
  apply(simp_all add: arkind_arty_artrm.intros)
1027
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   244
  apply(rotate_tac 3)
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   245
  apply(erule arty.cases)
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   246
  apply(simp_all add: arkind_arty_artrm.intros)
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   247
  apply(simp add: arkind_arty_artrm_inj)
1210
10a0e3578507 Generalize atom_trans and atom_sym.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1139
diff changeset
   248
  apply(erule alpha_gen_compose_trans)
10a0e3578507 Generalize atom_trans and atom_sym.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1139
diff changeset
   249
  apply(assumption)
10a0e3578507 Generalize atom_trans and atom_sym.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1139
diff changeset
   250
  apply(erule alpha_eqvt)
1027
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   251
  apply(rotate_tac 4)
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   252
  apply(erule artrm.cases)
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   253
  apply(simp_all add: arkind_arty_artrm.intros)
1027
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   254
  apply(rotate_tac 3)
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   255
  apply(erule artrm.cases)
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   256
  apply(simp_all add: arkind_arty_artrm.intros)
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   257
  apply(simp add: arkind_arty_artrm_inj)
1210
10a0e3578507 Generalize atom_trans and atom_sym.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1139
diff changeset
   258
  apply(erule alpha_gen_compose_trans)
10a0e3578507 Generalize atom_trans and atom_sym.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1139
diff changeset
   259
  apply(assumption)
10a0e3578507 Generalize atom_trans and atom_sym.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1139
diff changeset
   260
  apply(erule alpha_eqvt)
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   261
  done
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   262
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   263
lemma alpha_equivps:
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   264
  shows "equivp arkind"
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   265
  and   "equivp arty"
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   266
  and   "equivp artrm"
1027
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   267
  apply(rule equivpI)
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   268
  unfolding reflp_def symp_def transp_def
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   269
  apply(auto intro: al_refl al_sym al_trans)
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   270
  apply(rule equivpI)
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   271
  unfolding reflp_def symp_def transp_def
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   272
  apply(auto intro: al_refl al_sym al_trans)
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   273
  apply(rule equivpI)
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   274
  unfolding reflp_def symp_def transp_def
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   275
  apply(auto intro: al_refl al_sym al_trans)
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   276
  done
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   277
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   278
quotient_type RKIND = rkind / arkind
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   279
  by (rule alpha_equivps)
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   280
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   281
quotient_type
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   282
    RTY = rty / arty and
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   283
    RTRM = rtrm / artrm
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   284
  by (auto intro: alpha_equivps)
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   285
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   286
quotient_definition
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   287
   "TYP :: RKIND"
1139
c4001cda9da3 renamed 'as' to 'is' everywhere.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1129
diff changeset
   288
is
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   289
  "Type"
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   290
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   291
quotient_definition
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   292
   "KPI :: RTY \<Rightarrow> name \<Rightarrow> RKIND \<Rightarrow> RKIND"
1139
c4001cda9da3 renamed 'as' to 'is' everywhere.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1129
diff changeset
   293
is
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   294
  "KPi"
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   295
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   296
quotient_definition
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   297
   "TCONST :: ident \<Rightarrow> RTY"
1139
c4001cda9da3 renamed 'as' to 'is' everywhere.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1129
diff changeset
   298
is
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   299
  "TConst"
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   300
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   301
quotient_definition
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   302
   "TAPP :: RTY \<Rightarrow> RTRM \<Rightarrow> RTY"
1139
c4001cda9da3 renamed 'as' to 'is' everywhere.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1129
diff changeset
   303
is
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   304
  "TApp"
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   305
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   306
quotient_definition
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   307
   "TPI :: RTY \<Rightarrow> name \<Rightarrow> RTY \<Rightarrow> RTY"
1139
c4001cda9da3 renamed 'as' to 'is' everywhere.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1129
diff changeset
   308
is
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   309
  "TPi"
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   310
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   311
(* FIXME: does not work with CONST *)
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   312
quotient_definition
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   313
   "CONS :: ident \<Rightarrow> RTRM"
1139
c4001cda9da3 renamed 'as' to 'is' everywhere.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1129
diff changeset
   314
is
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   315
  "Const"
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   316
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   317
quotient_definition
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   318
   "VAR :: name \<Rightarrow> RTRM"
1139
c4001cda9da3 renamed 'as' to 'is' everywhere.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1129
diff changeset
   319
is
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   320
  "Var"
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   321
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   322
quotient_definition
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   323
   "APP :: RTRM \<Rightarrow> RTRM \<Rightarrow> RTRM"
1139
c4001cda9da3 renamed 'as' to 'is' everywhere.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1129
diff changeset
   324
is
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   325
  "App"
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   326
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   327
quotient_definition
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   328
   "LAM :: RTY \<Rightarrow> name \<Rightarrow> RTRM \<Rightarrow> RTRM"
1139
c4001cda9da3 renamed 'as' to 'is' everywhere.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1129
diff changeset
   329
is
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   330
  "Lam"
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   331
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   332
(* FIXME: print out a warning if the type contains a liftet type, like rkind \<Rightarrow> name set *)
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   333
quotient_definition
1236
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
   334
   "fv_kind :: RKIND \<Rightarrow> atom set"
1139
c4001cda9da3 renamed 'as' to 'is' everywhere.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1129
diff changeset
   335
is
1236
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
   336
  "fv_rkind"
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   337
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   338
quotient_definition
1236
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
   339
   "fv_ty :: RTY \<Rightarrow> atom set"
1139
c4001cda9da3 renamed 'as' to 'is' everywhere.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1129
diff changeset
   340
is
1236
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
   341
  "fv_rty"
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   342
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   343
quotient_definition
1236
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
   344
   "fv_trm :: RTRM \<Rightarrow> atom set"
1139
c4001cda9da3 renamed 'as' to 'is' everywhere.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1129
diff changeset
   345
is
1236
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
   346
  "fv_rtrm"
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   347
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   348
lemma alpha_rfv:
1236
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
   349
  shows "(t \<approx>ki s \<longrightarrow> fv_rkind t = fv_rkind s) \<and>
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
   350
     (t1 \<approx>rty s1 \<longrightarrow> fv_rty t1 = fv_rty s1) \<and>
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
   351
     (t2 \<approx>tr s2 \<longrightarrow> fv_rtrm t2 = fv_rtrm s2)"
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   352
  apply(rule arkind_arty_artrm.induct)
1027
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   353
  apply(simp_all add: alpha_gen)
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   354
  done
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   355
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   356
lemma perm_rsp[quot_respect]:
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   357
  "(op = ===> arkind ===> arkind) permute permute"
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   358
  "(op = ===> arty ===> arty) permute permute"
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   359
  "(op = ===> artrm ===> artrm) permute permute"
992
74e9a580448c equivariance of rfv and alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 991
diff changeset
   360
  by (simp_all add:alpha_eqvt)
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   361
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   362
lemma tconst_rsp[quot_respect]: 
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   363
  "(op = ===> arty) TConst TConst"
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   364
  apply (auto intro: a1 a2 a3 a4 a5 a6 a7 a8 a9) done
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   365
lemma tapp_rsp[quot_respect]: 
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   366
  "(arty ===> artrm ===> arty) TApp TApp" 
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   367
  apply (auto intro: a1 a2 a3 a4 a5 a6 a7 a8 a9) done
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   368
lemma var_rsp[quot_respect]: 
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   369
  "(op = ===> artrm) Var Var"
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   370
  apply (auto intro: a1 a2 a3 a4 a5 a6 a7 a8 a9) done
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   371
lemma app_rsp[quot_respect]: 
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   372
  "(artrm ===> artrm ===> artrm) App App"
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   373
  apply (auto intro: a1 a2 a3 a4 a5 a6 a7 a8 a9) done
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   374
lemma const_rsp[quot_respect]: 
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   375
  "(op = ===> artrm) Const Const"
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   376
  apply (auto intro: a1 a2 a3 a4 a5 a6 a7 a8 a9) done
992
74e9a580448c equivariance of rfv and alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 991
diff changeset
   377
74e9a580448c equivariance of rfv and alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 991
diff changeset
   378
lemma kpi_rsp[quot_respect]: 
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   379
  "(arty ===> op = ===> arkind ===> arkind) KPi KPi"
993
5c0d9a507bcb Fixed the induction problem + some more proofs.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 992
diff changeset
   380
  apply (auto intro: a1 a2 a3 a4 a5 a6 a7 a8 a9)
1027
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   381
  apply (rule a2) apply assumption
993
5c0d9a507bcb Fixed the induction problem + some more proofs.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 992
diff changeset
   382
  apply (rule_tac x="0" in exI)
1027
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   383
  apply (simp add: fresh_star_def fresh_zero_perm alpha_rfv alpha_gen)
993
5c0d9a507bcb Fixed the induction problem + some more proofs.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 992
diff changeset
   384
  done
5c0d9a507bcb Fixed the induction problem + some more proofs.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 992
diff changeset
   385
992
74e9a580448c equivariance of rfv and alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 991
diff changeset
   386
lemma tpi_rsp[quot_respect]: 
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   387
  "(arty ===> op = ===> arty ===> arty) TPi TPi"
993
5c0d9a507bcb Fixed the induction problem + some more proofs.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 992
diff changeset
   388
  apply (auto intro: a1 a2 a3 a4 a5 a6 a7 a8 a9)
1027
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   389
  apply (rule a5) apply assumption
993
5c0d9a507bcb Fixed the induction problem + some more proofs.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 992
diff changeset
   390
  apply (rule_tac x="0" in exI)
1027
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   391
  apply (simp add: fresh_star_def fresh_zero_perm alpha_rfv alpha_gen)
993
5c0d9a507bcb Fixed the induction problem + some more proofs.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 992
diff changeset
   392
  done
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   393
lemma lam_rsp[quot_respect]: 
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   394
  "(arty ===> op = ===> artrm ===> artrm) Lam Lam"
993
5c0d9a507bcb Fixed the induction problem + some more proofs.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 992
diff changeset
   395
  apply (auto intro: a1 a2 a3 a4 a5 a6 a7 a8 a9)
1027
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   396
  apply (rule a9) apply assumption
993
5c0d9a507bcb Fixed the induction problem + some more proofs.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 992
diff changeset
   397
  apply (rule_tac x="0" in exI)
1027
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   398
  apply (simp add: fresh_star_def fresh_zero_perm alpha_rfv alpha_gen)
993
5c0d9a507bcb Fixed the induction problem + some more proofs.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 992
diff changeset
   399
  done
992
74e9a580448c equivariance of rfv and alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 991
diff changeset
   400
1236
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
   401
lemma fv_rty_rsp[quot_respect]: 
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
   402
  "(arty ===> op =) fv_rty fv_rty"
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   403
  by (simp add: alpha_rfv)
1236
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
   404
lemma fv_rkind_rsp[quot_respect]:
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
   405
  "(arkind ===> op =) fv_rkind fv_rkind"
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   406
  by (simp add: alpha_rfv)
1236
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
   407
lemma fv_rtrm_rsp[quot_respect]:
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
   408
  "(artrm ===> op =) fv_rtrm fv_rtrm"
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   409
  by (simp add: alpha_rfv)
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   410
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   411
thm rkind_rty_rtrm.induct
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   412
lemmas RKIND_RTY_RTRM_induct = rkind_rty_rtrm.induct[quot_lifted]
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   413
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   414
thm rkind_rty_rtrm.inducts
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   415
lemmas RKIND_RTY_RTRM_inducts = rkind_rty_rtrm.inducts[quot_lifted]
994
333c24bd595d More in the LF example in the new nominal way, all is clear until support.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 993
diff changeset
   416
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   417
instantiation RKIND and RTY and RTRM :: pt
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   418
begin
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   419
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   420
quotient_definition
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   421
  "permute_RKIND :: perm \<Rightarrow> RKIND \<Rightarrow> RKIND"
1139
c4001cda9da3 renamed 'as' to 'is' everywhere.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1129
diff changeset
   422
is
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   423
  "permute :: perm \<Rightarrow> rkind \<Rightarrow> rkind"
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   424
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   425
quotient_definition
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   426
  "permute_RTY :: perm \<Rightarrow> RTY \<Rightarrow> RTY"
1139
c4001cda9da3 renamed 'as' to 'is' everywhere.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1129
diff changeset
   427
is
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   428
  "permute :: perm \<Rightarrow> rty \<Rightarrow> rty"
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   429
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   430
quotient_definition
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   431
  "permute_RTRM :: perm \<Rightarrow> RTRM \<Rightarrow> RTRM"
1139
c4001cda9da3 renamed 'as' to 'is' everywhere.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1129
diff changeset
   432
is
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   433
  "permute :: perm \<Rightarrow> rtrm \<Rightarrow> rtrm"
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   434
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   435
lemmas permute_ktt[simp] = permute_rkind_permute_rty_permute_rtrm.simps[quot_lifted]
1083
30550327651a Proper context fixes lifting inside instantiations.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1082
diff changeset
   436
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   437
lemma perm_zero_ok: "0 \<bullet> (x :: RKIND) = x \<and> 0 \<bullet> (y :: RTY) = y \<and> 0 \<bullet> (z :: RTRM) = z"
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   438
apply (induct rule: RKIND_RTY_RTRM_induct)
1083
30550327651a Proper context fixes lifting inside instantiations.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1082
diff changeset
   439
apply (simp_all)
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   440
done
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   441
1082
f8029d8c88a9 Fixed the context import/export and simplified LFex.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1045
diff changeset
   442
lemma perm_add_ok:
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   443
  "((p + q) \<bullet> (x1 :: RKIND) = (p \<bullet> q \<bullet> x1))"
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   444
  "((p + q) \<bullet> (x2 :: RTY) = p \<bullet> q \<bullet> x2)"
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   445
  "((p + q) \<bullet> (x3 :: RTRM) = p \<bullet> q \<bullet> x3)"
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   446
apply (induct x1 and x2 and x3 rule: RKIND_RTY_RTRM_inducts)
1083
30550327651a Proper context fixes lifting inside instantiations.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1082
diff changeset
   447
apply (simp_all)
994
333c24bd595d More in the LF example in the new nominal way, all is clear until support.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 993
diff changeset
   448
done
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   449
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   450
instance
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   451
apply default
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   452
apply (simp_all add: perm_zero_ok perm_add_ok)
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   453
done
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   454
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   455
end
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   456
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   457
lemmas ARKIND_ARTY_ARTRM_inducts = arkind_arty_artrm.inducts[unfolded alpha_gen, quot_lifted, folded alpha_gen]
994
333c24bd595d More in the LF example in the new nominal way, all is clear until support.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 993
diff changeset
   458
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   459
lemmas RKIND_RTY_RTRM_INJECT = arkind_arty_artrm_inj[unfolded alpha_gen, quot_lifted, folded alpha_gen]
994
333c24bd595d More in the LF example in the new nominal way, all is clear until support.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 993
diff changeset
   460
1236
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
   461
lemmas fv_kind_ty_trm = fv_rkind_fv_rty_fv_rtrm.simps[quot_lifted]
994
333c24bd595d More in the LF example in the new nominal way, all is clear until support.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 993
diff changeset
   462
1082
f8029d8c88a9 Fixed the context import/export and simplified LFex.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1045
diff changeset
   463
lemmas fv_eqvt = rfv_eqvt[quot_lifted]
994
333c24bd595d More in the LF example in the new nominal way, all is clear until support.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 993
diff changeset
   464
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   465
lemma supp_rkind_rty_rtrm_easy:
1002
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   466
 "supp TYP = {}"
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   467
 "supp (TCONST i) = {atom i}"
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   468
 "supp (TAPP A M) = supp A \<union> supp M"
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   469
 "supp (CONS i) = {atom i}"
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   470
 "supp (VAR x) = {atom x}"
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   471
 "supp (APP M N) = supp M \<union> supp N"
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   472
apply (simp_all add: supp_def permute_ktt RKIND_RTY_RTRM_INJECT)
1002
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   473
apply (simp_all only: supp_at_base[simplified supp_def])
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   474
apply (simp_all add: Collect_imp_eq Collect_neg_eq)
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   475
done
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   476
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   477
lemma supp_bind:
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   478
  "(supp (atom na, (ty, ki))) supports (KPI ty na ki)"
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   479
  "(supp (atom na, (ty, ty2))) supports (TPI ty na ty2)"
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   480
  "(supp (atom na, (ty, rtrm))) supports (LAM ty na rtrm)"
1002
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   481
apply(simp_all add: supports_def)
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   482
apply(fold fresh_def)
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   483
apply(simp_all add: fresh_Pair swap_fresh_fresh)
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   484
apply(clarify)
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   485
apply(subst swap_at_base_simps(3))
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   486
apply(simp_all add: fresh_atom)
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   487
apply(clarify)
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   488
apply(subst swap_at_base_simps(3))
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   489
apply(simp_all add: fresh_atom)
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   490
apply(clarify)
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   491
apply(subst swap_at_base_simps(3))
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   492
apply(simp_all add: fresh_atom)
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   493
done
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   494
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   495
lemma RKIND_RTY_RTRM_fs:
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   496
  "finite (supp (x\<Colon>RKIND))"
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   497
  "finite (supp (y\<Colon>RTY))"
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   498
  "finite (supp (z\<Colon>RTRM))"
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   499
apply(induct x and y and z rule: RKIND_RTY_RTRM_inducts)
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   500
apply(simp_all add: supp_rkind_rty_rtrm_easy)
1002
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   501
apply(rule supports_finite)
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   502
apply(rule supp_bind(1))
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   503
apply(simp add: supp_Pair supp_atom)
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   504
apply(rule supports_finite)
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   505
apply(rule supp_bind(2))
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   506
apply(simp add: supp_Pair supp_atom)
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   507
apply(rule supports_finite)
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   508
apply(rule supp_bind(3))
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   509
apply(simp add: supp_Pair supp_atom)
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   510
done
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   511
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   512
instance RKIND and RTY and RTRM :: fs
1002
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   513
apply(default)
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   514
apply(simp_all only: RKIND_RTY_RTRM_fs)
1002
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   515
done
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   516
994
333c24bd595d More in the LF example in the new nominal way, all is clear until support.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 993
diff changeset
   517
lemma supp_fv:
1236
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
   518
 "supp t1 = fv_kind t1"
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
   519
 "supp t2 = fv_ty t2"
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
   520
 "supp t3 = fv_trm t3"
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   521
apply(induct t1 and t2 and t3 rule: RKIND_RTY_RTRM_inducts)
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   522
apply (simp_all add: supp_rkind_rty_rtrm_easy)
1236
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
   523
apply (simp_all add: fv_kind_ty_trm)
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   524
apply(subgoal_tac "supp (KPI rty name rkind) = supp rty \<union> supp (Abs {atom name} rkind)")
1027
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   525
apply(simp add: supp_Abs Set.Un_commute)
1002
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   526
apply(simp (no_asm) add: supp_def)
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   527
apply(simp add: RKIND_RTY_RTRM_INJECT)
1036
aaac8274f08c The alpha-equivalence relation for let-rec. Not sure if correct...
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1027
diff changeset
   528
apply(simp add: Abs_eq_iff)
aaac8274f08c The alpha-equivalence relation for let-rec. Not sure if correct...
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1027
diff changeset
   529
apply(simp add: alpha_gen)
1045
7a975641efbc another adaptation for the eqvt-change
Christian Urban <urbanc@in.tum.de>
parents: 1036
diff changeset
   530
apply(simp add: Collect_imp_eq Collect_neg_eq Set.Un_commute insert_eqvt empty_eqvt atom_eqvt)
7a975641efbc another adaptation for the eqvt-change
Christian Urban <urbanc@in.tum.de>
parents: 1036
diff changeset
   531
apply(simp add: supp_eqvt[symmetric] fv_eqvt[symmetric])
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   532
apply(subgoal_tac "supp (TPI rty1 name rty2) = supp rty1 \<union> supp (Abs {atom name} rty2)")
1036
aaac8274f08c The alpha-equivalence relation for let-rec. Not sure if correct...
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1027
diff changeset
   533
apply(simp add: supp_Abs Set.Un_commute)
aaac8274f08c The alpha-equivalence relation for let-rec. Not sure if correct...
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1027
diff changeset
   534
apply(simp (no_asm) add: supp_def)
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   535
apply(simp add: RKIND_RTY_RTRM_INJECT)
1036
aaac8274f08c The alpha-equivalence relation for let-rec. Not sure if correct...
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1027
diff changeset
   536
apply(simp add: Abs_eq_iff)
aaac8274f08c The alpha-equivalence relation for let-rec. Not sure if correct...
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1027
diff changeset
   537
apply(simp add: alpha_gen)
1045
7a975641efbc another adaptation for the eqvt-change
Christian Urban <urbanc@in.tum.de>
parents: 1036
diff changeset
   538
apply(simp add: supp_eqvt[symmetric] fv_eqvt[symmetric] insert_eqvt empty_eqvt atom_eqvt)
1002
3f227ed7e3e5 More proofs in the LF example.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 997
diff changeset
   539
apply(simp add: Collect_imp_eq Collect_neg_eq Set.Un_commute)
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   540
apply(subgoal_tac "supp (LAM rty name rtrm) = supp rty \<union> supp (Abs {atom name} rtrm)")
1036
aaac8274f08c The alpha-equivalence relation for let-rec. Not sure if correct...
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1027
diff changeset
   541
apply(simp add: supp_Abs Set.Un_commute)
aaac8274f08c The alpha-equivalence relation for let-rec. Not sure if correct...
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1027
diff changeset
   542
apply(simp (no_asm) add: supp_def)
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   543
apply(simp add: RKIND_RTY_RTRM_INJECT)
1036
aaac8274f08c The alpha-equivalence relation for let-rec. Not sure if correct...
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1027
diff changeset
   544
apply(simp add: Abs_eq_iff)
aaac8274f08c The alpha-equivalence relation for let-rec. Not sure if correct...
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1027
diff changeset
   545
apply(simp add: alpha_gen)
1045
7a975641efbc another adaptation for the eqvt-change
Christian Urban <urbanc@in.tum.de>
parents: 1036
diff changeset
   546
apply(simp add: supp_eqvt[symmetric] fv_eqvt[symmetric] insert_eqvt empty_eqvt atom_eqvt)
1036
aaac8274f08c The alpha-equivalence relation for let-rec. Not sure if correct...
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1027
diff changeset
   547
apply(simp add: Collect_imp_eq Collect_neg_eq Set.Un_commute)
aaac8274f08c The alpha-equivalence relation for let-rec. Not sure if correct...
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1027
diff changeset
   548
done
994
333c24bd595d More in the LF example in the new nominal way, all is clear until support.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 993
diff changeset
   549
1036
aaac8274f08c The alpha-equivalence relation for let-rec. Not sure if correct...
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1027
diff changeset
   550
(* Not needed anymore *)
1027
163d6917af62 LF ported to alpha_gen, equivp solved and one of the missing proofs in support<-> fv solved. Still some supp properties left.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1022
diff changeset
   551
lemma supp_kpi_pre: "supp (KPI A x K) = (supp (Abs {atom x} K)) \<union> supp A"
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   552
apply (simp add: permute_set_eq supp_def Abs_eq_iff RKIND_RTY_RTRM_INJECT)
1036
aaac8274f08c The alpha-equivalence relation for let-rec. Not sure if correct...
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1027
diff changeset
   553
apply (simp add: alpha_gen supp_fv)
aaac8274f08c The alpha-equivalence relation for let-rec. Not sure if correct...
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1027
diff changeset
   554
apply (simp add: Collect_imp_eq Collect_neg_eq add: atom_eqvt Set.Un_commute)
997
b7d259ded92e Ported LF to the generic lambda and solved the simpler _supp cases.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 994
diff changeset
   555
done
994
333c24bd595d More in the LF example in the new nominal way, all is clear until support.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 993
diff changeset
   556
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   557
lemma supp_rkind_rty_rtrm:
994
333c24bd595d More in the LF example in the new nominal way, all is clear until support.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 993
diff changeset
   558
 "supp TYP = {}"
333c24bd595d More in the LF example in the new nominal way, all is clear until support.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 993
diff changeset
   559
 "supp (KPI A x K) = supp A \<union> (supp K - {atom x})"
333c24bd595d More in the LF example in the new nominal way, all is clear until support.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 993
diff changeset
   560
 "supp (TCONST i) = {atom i}"
333c24bd595d More in the LF example in the new nominal way, all is clear until support.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 993
diff changeset
   561
 "supp (TAPP A M) = supp A \<union> supp M"
333c24bd595d More in the LF example in the new nominal way, all is clear until support.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 993
diff changeset
   562
 "supp (TPI A x B) = supp A \<union> (supp B - {atom x})"
333c24bd595d More in the LF example in the new nominal way, all is clear until support.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 993
diff changeset
   563
 "supp (CONS i) = {atom i}"
333c24bd595d More in the LF example in the new nominal way, all is clear until support.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 993
diff changeset
   564
 "supp (VAR x) = {atom x}"
333c24bd595d More in the LF example in the new nominal way, all is clear until support.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 993
diff changeset
   565
 "supp (APP M N) = supp M \<union> supp N"
333c24bd595d More in the LF example in the new nominal way, all is clear until support.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 993
diff changeset
   566
 "supp (LAM A x M) = supp A \<union> (supp M - {atom x})"
1234
1240d5eb275d LF renaming part1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1219
diff changeset
   567
apply (simp_all only: supp_rkind_rty_rtrm_easy)
1236
ca3c69545a78 LF renaming part 2 (proper fv functions)
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1234
diff changeset
   568
apply (simp_all only: supp_fv fv_kind_ty_trm)
1036
aaac8274f08c The alpha-equivalence relation for let-rec. Not sure if correct...
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1027
diff changeset
   569
done
994
333c24bd595d More in the LF example in the new nominal way, all is clear until support.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 993
diff changeset
   570
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   571
end
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   572
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   573
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   574
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   575