Nominal/Ex/Pi.thy
author Christian Urban <urbanc@in.tum.de>
Tue, 07 Aug 2012 18:54:52 +0100
changeset 3197 25d11b449e92
parent 3192 14c7d7e29c44
child 3229 b52e8651591f
permissions -rw-r--r--
definition of an auxiliary graph in nominal-primrec definitions
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3097
b27e94db1b8a included Pi theory in tests
Christian Urban <urbanc@in.tum.de>
parents: 3096
diff changeset
     1
(* Theory be Kirstin Peters *)
3096
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
3097
b27e94db1b8a included Pi theory in tests
Christian Urban <urbanc@in.tum.de>
parents: 3096
diff changeset
     3
theory Pi
3096
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
  imports "../Nominal2"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
begin
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
atom_decl name
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
subsection {* Capture-Avoiding Substitution of Names *}
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    11
definition
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
  subst_name :: "name \<Rightarrow> name \<Rightarrow> name \<Rightarrow> name" ("_[_:::=_]" [110, 110, 110] 110)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    13
where
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    14
  "a[b:::=c] \<equiv> if (a = b) then c else a"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    15
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    16
declare subst_name_def[simp]
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    17
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    18
lemma subst_name_mix_eqvt[eqvt]:
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    19
  fixes p :: perm
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    20
  and   a :: name
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    21
  and   b :: name
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    22
  and   c :: name
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    23
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    24
  shows "p \<bullet> (a[b:::=c]) = (p \<bullet> a)[(p \<bullet> b):::=(p \<bullet> c)]"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    25
proof -
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    26
  show ?thesis
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    27
    by(auto)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    28
qed
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    29
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    30
nominal_primrec
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    31
  subst_name_list :: "name \<Rightarrow> (name \<times> name) list \<Rightarrow> name"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    32
where
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    33
  "subst_name_list a [] = a"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    34
| "subst_name_list a ((b, c)#xs) = (if (a = b) then c else (subst_name_list a xs))"
3197
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
    35
  apply(simp add: eqvt_def subst_name_list_graph_aux_def)
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
    36
  apply(simp)
3096
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    37
  apply(auto)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    38
  apply(rule_tac y="b" in list.exhaust)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    39
  by(auto)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    40
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    41
termination (eqvt)
3097
b27e94db1b8a included Pi theory in tests
Christian Urban <urbanc@in.tum.de>
parents: 3096
diff changeset
    42
  by (lexicographic_order)
3096
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    43
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    44
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    45
section {* The Synchronous Pi-Calculus *}
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    46
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    47
subsection {* Syntax: Synchronous, Monadic Pi-Calculus with n-ary, Mixed Choice *}
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    48
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    49
nominal_datatype
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    50
      guardedTerm_mix = Output name name piMix                     ("_!<_>\<onesuperior>._" [120, 120, 110] 110)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    51
                      | Input name b::name P::piMix  binds b in P  ("_?<_>\<onesuperior>._" [120, 120, 110] 110)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    52
                      | Tau piMix                                  ("<\<tau>\<onesuperior>>._" [110] 110)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    53
  and sumList_mix     = SumNil                                     ("\<zero>\<onesuperior>")
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    54
                      | AddSummand guardedTerm_mix sumList_mix     (infixr "\<oplus>\<onesuperior>" 65)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    55
  and piMix           = Res a::name P::piMix         binds a in P  ("<\<nu>_>\<onesuperior>_" [100, 100] 100)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    56
                      | Par piMix piMix                            (infixr "\<parallel>\<onesuperior>" 85)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    57
                      | Match name name piMix                      ("[_\<frown>\<onesuperior>_]_" [120, 120, 110] 110)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    58
                      | Sum sumList_mix                            ("\<oplus>\<onesuperior>{_}" 90)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    59
                      | Rep name b::name P::piMix    binds b in P  ("\<infinity>_?<_>\<onesuperior>._" [120, 120, 110] 110)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    60
                      | Succ                                       ("succ\<onesuperior>")
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    61
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    62
lemmas piMix_strong_induct  = guardedTerm_mix_sumList_mix_piMix.strong_induct
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    63
lemmas piMix_fresh          = guardedTerm_mix_sumList_mix_piMix.fresh
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    64
lemmas piMix_eq_iff         = guardedTerm_mix_sumList_mix_piMix.eq_iff
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    65
lemmas piMix_distinct       = guardedTerm_mix_sumList_mix_piMix.distinct
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    66
lemmas piMix_size           = guardedTerm_mix_sumList_mix_piMix.size
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    67
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    68
subsection {* Alpha-Conversion Lemmata *}
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    69
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    70
lemma alphaRes_mix:
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    71
  fixes a :: name
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    72
  and   P :: piMix
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    73
  and   z :: name
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    74
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    75
  assumes "atom z \<sharp> P"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    76
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    77
  shows "<\<nu>a>\<onesuperior>P = <\<nu>z>\<onesuperior>((atom a \<rightleftharpoons> atom z) \<bullet> P)"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    78
proof(cases "a = z")
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    79
  assume "a = z"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    80
  thus ?thesis
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    81
    by(simp)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    82
next
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    83
  assume "a \<noteq> z"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    84
  thus ?thesis
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    85
    using assms
3191
0440bc1a2438 streamlined definition of alpha-equivalence for single binders (used flip instead of swap)
Christian Urban <urbanc@in.tum.de>
parents: 3183
diff changeset
    86
    by (simp add: flip_def piMix_eq_iff Abs1_eq_iff fresh_permute_left)
3096
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    87
qed
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    88
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    89
lemma alphaInput_mix:
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    90
  fixes a :: name
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    91
  and   b :: name
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    92
  and   P :: piMix
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    93
  and   z :: name
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    94
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    95
  assumes "atom z \<sharp> P"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    96
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    97
  shows "a?<b>\<onesuperior>.P = a?<z>\<onesuperior>.((atom b \<rightleftharpoons> atom z) \<bullet> P)"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    98
proof(cases "b = z")
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    99
  assume "b = z"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   100
  thus ?thesis
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   101
    by(simp)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   102
next
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   103
  assume "b \<noteq> z"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   104
  thus ?thesis
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   105
    using assms
3191
0440bc1a2438 streamlined definition of alpha-equivalence for single binders (used flip instead of swap)
Christian Urban <urbanc@in.tum.de>
parents: 3183
diff changeset
   106
    by(simp add: flip_def piMix_eq_iff Abs1_eq_iff fresh_permute_left)
3096
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   107
qed
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   108
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   109
lemma alphaRep_mix:
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   110
  fixes a :: name
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   111
  and   b :: name
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   112
  and   P :: piMix
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   113
  and   z :: name
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   114
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   115
  assumes "atom z \<sharp> P"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   116
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   117
  shows "\<infinity>a?<b>\<onesuperior>.P = \<infinity>a?<z>\<onesuperior>.((atom b \<rightleftharpoons> atom z) \<bullet> P)"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   118
proof(cases "b = z")
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   119
  assume "b = z"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   120
  thus ?thesis
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   121
    by(simp)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   122
next
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   123
  assume "b \<noteq> z"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   124
  thus ?thesis
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   125
    using assms
3191
0440bc1a2438 streamlined definition of alpha-equivalence for single binders (used flip instead of swap)
Christian Urban <urbanc@in.tum.de>
parents: 3183
diff changeset
   126
    by(simp add: flip_def piMix_eq_iff Abs1_eq_iff fresh_permute_left)
3096
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   127
qed
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   128
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   129
subsection {* Capture-Avoiding Substitution of Names *}
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   130
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   131
lemma testl:
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   132
  assumes a: "\<exists>y. f = Inl y"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   133
  shows "(p \<bullet> (Sum_Type.Projl f)) = Sum_Type.Projl (p \<bullet> f)"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   134
using a by auto
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   135
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   136
lemma testrr:
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   137
  assumes a: "\<exists>y. f = Inr (Inr y)"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   138
  shows "(p \<bullet> (Sum_Type.Projr (Sum_Type.Projr f))) = Sum_Type.Projr (Sum_Type.Projr (p \<bullet> f))"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   139
using a by auto
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   140
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   141
lemma testlr:
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   142
  assumes a: "\<exists>y. f = Inr (Inl y)"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   143
  shows "(p \<bullet> (Sum_Type.Projl (Sum_Type.Projr f))) = Sum_Type.Projl (Sum_Type.Projr (p \<bullet> f))"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   144
using a by auto
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   145
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   146
nominal_primrec (default "sum_case (\<lambda>x. Inl undefined) (sum_case (\<lambda>x. Inr (Inl undefined)) (\<lambda>x. Inr (Inr undefined)))")
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   147
  subsGuard_mix :: "guardedTerm_mix \<Rightarrow> name \<Rightarrow> name \<Rightarrow> guardedTerm_mix"  ("_[_::=\<onesuperior>\<onesuperior>_]" [100, 100, 100] 100) and
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   148
  subsList_mix  :: "sumList_mix \<Rightarrow> name \<Rightarrow> name \<Rightarrow> sumList_mix"          ("_[_::=\<onesuperior>\<twosuperior>_]" [100, 100, 100] 100) and
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   149
  subs_mix      :: "piMix \<Rightarrow> name \<Rightarrow> name \<Rightarrow> piMix"                      ("_[_::=\<onesuperior>_]" [100, 100, 100] 100)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   150
where
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   151
  "(a!<b>\<onesuperior>.P)[x::=\<onesuperior>\<onesuperior>y] = (a[x:::=y])!<(b[x:::=y])>\<onesuperior>.(P[x::=\<onesuperior>y])"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   152
| "\<lbrakk>atom b \<sharp> (x, y)\<rbrakk> \<Longrightarrow> (a?<b>\<onesuperior>.P)[x::=\<onesuperior>\<onesuperior>y] = (a[x:::=y])?<b>\<onesuperior>.(P[x::=\<onesuperior>y])"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   153
| "(<\<tau>\<onesuperior>>.P)[x::=\<onesuperior>\<onesuperior>y] = <\<tau>\<onesuperior>>.(P[x::=\<onesuperior>y])"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   154
| "(\<zero>\<onesuperior>)[x::=\<onesuperior>\<twosuperior>y] = \<zero>\<onesuperior>"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   155
| "(g \<oplus>\<onesuperior> xg)[x::=\<onesuperior>\<twosuperior>y] = (g[x::=\<onesuperior>\<onesuperior>y]) \<oplus>\<onesuperior> (xg[x::=\<onesuperior>\<twosuperior>y])"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   156
| "\<lbrakk>atom a \<sharp> (x, y)\<rbrakk> \<Longrightarrow> (<\<nu>a>\<onesuperior>P)[x::=\<onesuperior>y] = <\<nu>a>\<onesuperior>(P[x::=\<onesuperior>y])"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   157
| "(P \<parallel>\<onesuperior> Q)[x::=\<onesuperior>y] = (P[x::=\<onesuperior>y]) \<parallel>\<onesuperior> (Q[x::=\<onesuperior>y])"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   158
| "([a\<frown>\<onesuperior>b]P)[x::=\<onesuperior>y] = ([(a[x:::=y])\<frown>\<onesuperior>(b[x:::=y])](P[x::=\<onesuperior>y]))"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   159
| "(\<oplus>\<onesuperior>{xg})[x::=\<onesuperior>y] = \<oplus>\<onesuperior>{(xg[x::=\<onesuperior>\<twosuperior>y])}"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   160
| "\<lbrakk>atom b \<sharp> (x, y)\<rbrakk> \<Longrightarrow> (\<infinity>a?<b>\<onesuperior>.P)[x::=\<onesuperior>y] = \<infinity>(a[x:::=y])?<b>\<onesuperior>.(P[x::=\<onesuperior>y])"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   161
| "(succ\<onesuperior>)[x::=\<onesuperior>y] = succ\<onesuperior>"
3192
14c7d7e29c44 added a simproc for alpha-equivalence to the simplifier
Christian Urban <urbanc@in.tum.de>
parents: 3191
diff changeset
   162
  using [[simproc del: alpha_lst]]
3096
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   163
  apply(auto simp add: piMix_distinct piMix_eq_iff)
3197
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   164
  apply(simp add: eqvt_def  subsGuard_mix_subsList_mix_subs_mix_graph_aux_def)
3096
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   165
  --"Covered all cases"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   166
  apply(case_tac x)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   167
  apply(simp)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   168
  apply(case_tac a)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   169
  apply(simp)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   170
  apply (rule_tac y="aa" and c="(b, c)" in guardedTerm_mix_sumList_mix_piMix.strong_exhaust(1))
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   171
  apply(blast)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   172
  apply(auto simp add: fresh_star_def)[1]
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   173
  apply(blast)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   174
  apply(simp)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   175
  apply(blast)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   176
  apply(simp)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   177
  apply(case_tac b)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   178
  apply(simp)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   179
  apply(case_tac a)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   180
  apply(simp)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   181
  apply (rule_tac ya="aa" in guardedTerm_mix_sumList_mix_piMix.strong_exhaust(2))
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   182
  apply(blast)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   183
  apply(blast)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   184
  apply(simp)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   185
  apply(case_tac ba)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   186
  apply(simp)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   187
  apply (rule_tac yb="a" and c="(bb,c)" in guardedTerm_mix_sumList_mix_piMix.strong_exhaust(3))
3192
14c7d7e29c44 added a simproc for alpha-equivalence to the simplifier
Christian Urban <urbanc@in.tum.de>
parents: 3191
diff changeset
   188
  using [[simproc del: alpha_lst]]
3096
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   189
  apply(auto simp add: fresh_star_def)[1]
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   190
  apply(blast)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   191
  apply(blast)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   192
  apply(blast)
3192
14c7d7e29c44 added a simproc for alpha-equivalence to the simplifier
Christian Urban <urbanc@in.tum.de>
parents: 3191
diff changeset
   193
  using [[simproc del: alpha_lst]]
3096
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   194
  apply(auto simp add: fresh_star_def)[1]
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   195
  apply(blast)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   196
  apply(simp)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   197
  apply(blast)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   198
  --"compatibility"
3183
313e6f2cdd89 added permutation simplification to the simplifier; this makes the simplifier more powerful, but it potentially loops more often
Christian Urban <urbanc@in.tum.de>
parents: 3097
diff changeset
   199
  apply (simp only: meta_eq_to_obj_eq[OF subs_mix_def, symmetric, unfolded fun_eq_iff])
3096
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   200
  apply (subgoal_tac "eqvt_at (\<lambda>(a, b, c). subs_mix a b c) (P, xa, ya)")
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   201
  apply (thin_tac "eqvt_at subsGuard_mix_subsList_mix_subs_mix_sumC (Inr (Inr (P, xa, ya)))")
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   202
  apply (thin_tac "eqvt_at subsGuard_mix_subsList_mix_subs_mix_sumC (Inr (Inr (Pa, xa, ya)))")
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   203
  prefer 2
3183
313e6f2cdd89 added permutation simplification to the simplifier; this makes the simplifier more powerful, but it potentially loops more often
Christian Urban <urbanc@in.tum.de>
parents: 3097
diff changeset
   204
  apply (simp only: eqvt_at_def subs_mix_def)
3096
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   205
  apply rule
3183
313e6f2cdd89 added permutation simplification to the simplifier; this makes the simplifier more powerful, but it potentially loops more often
Christian Urban <urbanc@in.tum.de>
parents: 3097
diff changeset
   206
  apply(simp (no_asm))
3096
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   207
  apply (subst testrr)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   208
  apply (simp add: subsGuard_mix_subsList_mix_subs_mix_sumC_def)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   209
  apply (simp add: THE_default_def)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   210
apply (case_tac "Ex1 (subsGuard_mix_subsList_mix_subs_mix_graph (Inr (Inr (P, xa, ya))))")
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   211
apply simp_all[2]
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   212
apply auto[1]
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   213
apply (erule_tac x="x" in allE)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   214
apply simp
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   215
apply (thin_tac "\<forall>p\<Colon>perm.
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   216
           p \<bullet> The (subsGuard_mix_subsList_mix_subs_mix_graph (Inr (Inr (P, xa, ya)))) =
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   217
           (if \<exists>!x\<Colon>guardedTerm_mix + sumList_mix + piMix.
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   218
                  subsGuard_mix_subsList_mix_subs_mix_graph (Inr (Inr (p \<bullet> P, p \<bullet> xa, p \<bullet> ya))) x
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   219
            then THE x\<Colon>guardedTerm_mix + sumList_mix + piMix.
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   220
                    subsGuard_mix_subsList_mix_subs_mix_graph (Inr (Inr (p \<bullet> P, p \<bullet> xa, p \<bullet> ya))) x
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   221
            else Inr (Inr undefined))")
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   222
apply (thin_tac "\<forall>p\<Colon>perm.
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   223
           p \<bullet> (if \<exists>!x\<Colon>guardedTerm_mix + sumList_mix + piMix.
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   224
                      subsGuard_mix_subsList_mix_subs_mix_graph (Inr (Inr (Pa, xa, ya))) x
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   225
                then THE x\<Colon>guardedTerm_mix + sumList_mix + piMix.
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   226
                        subsGuard_mix_subsList_mix_subs_mix_graph (Inr (Inr (Pa, xa, ya))) x
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   227
                else Inr (Inr undefined)) =
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   228
           (if \<exists>!x\<Colon>guardedTerm_mix + sumList_mix + piMix.
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   229
                  subsGuard_mix_subsList_mix_subs_mix_graph (Inr (Inr (p \<bullet> Pa, p \<bullet> xa, p \<bullet> ya))) x
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   230
            then THE x\<Colon>guardedTerm_mix + sumList_mix + piMix.
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   231
                    subsGuard_mix_subsList_mix_subs_mix_graph (Inr (Inr (p \<bullet> Pa, p \<bullet> xa, p \<bullet> ya))) x
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   232
            else Inr (Inr undefined))")
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   233
apply (thin_tac "atom b \<sharp> (xa, ya)")
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   234
apply (thin_tac "atom ba \<sharp> (xa, ya)")
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   235
apply (thin_tac "[[atom b]]lst. P = [[atom ba]]lst. Pa")
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   236
apply(cases rule: subsGuard_mix_subsList_mix_subs_mix_graph.cases)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   237
apply assumption
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   238
apply (metis Inr_not_Inl)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   239
apply (metis Inr_not_Inl)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   240
apply (metis Inr_not_Inl)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   241
apply (metis Inr_inject Inr_not_Inl)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   242
apply (metis Inr_inject Inr_not_Inl)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   243
apply (rule_tac x="<\<nu>a>\<onesuperior>Sum_Type.Projr
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   244
                            (Sum_Type.Projr
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   245
                              (subsGuard_mix_subsList_mix_subs_mix_sum (Inr (Inr (Pb, xb, y)))))" in exI)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   246
apply clarify
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   247
apply (rule the1_equality)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   248
apply blast apply assumption
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   249
apply (rule_tac x="Sum_Type.Projr
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   250
                       (Sum_Type.Projr (subsGuard_mix_subsList_mix_subs_mix_sum (Inr (Inr (Pb, xb, y))))) \<parallel>\<onesuperior>
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   251
                      Sum_Type.Projr
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   252
                       (Sum_Type.Projr (subsGuard_mix_subsList_mix_subs_mix_sum (Inr (Inr (Q, xb, y)))))" in exI)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   253
apply clarify
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   254
apply (rule the1_equality)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   255
apply blast apply assumption
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   256
apply (rule_tac x="[(a[xb:::=y])\<frown>\<onesuperior>(bb[xb:::=y])]Sum_Type.Projr
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   257
                                                    (Sum_Type.Projr
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   258
(subsGuard_mix_subsList_mix_subs_mix_sum (Inr (Inr (Pb, xb, y)))))" in exI)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   259
apply clarify
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   260
apply (rule the1_equality)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   261
apply blast apply assumption
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   262
apply (rule_tac x="\<oplus>\<onesuperior>{Sum_Type.Projl
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   263
                          (Sum_Type.Projr
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   264
                            (subsGuard_mix_subsList_mix_subs_mix_sum (Inr (Inl (xg, xb, y)))))}" in exI)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   265
apply clarify
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   266
apply (rule the1_equality)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   267
apply blast apply assumption
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   268
apply (rule_tac x="\<infinity>(a[xb:::=y])?<bb>\<onesuperior>.Sum_Type.Projr
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   269
                                           (Sum_Type.Projr
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   270
                                             (subsGuard_mix_subsList_mix_subs_mix_sum
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   271
                                               (Inr (Inr (Pb, xb, y)))))" in exI)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   272
apply clarify
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   273
apply (rule the1_equality)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   274
apply blast apply assumption
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   275
apply (rule_tac x="succ\<onesuperior>" in exI)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   276
apply clarify
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   277
apply (rule the1_equality)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   278
apply blast apply assumption
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   279
apply simp
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   280
(* Here the only real goal compatibility is left *)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   281
  apply (erule Abs_lst1_fcb)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   282
  apply (simp_all add: Abs_fresh_iff fresh_fun_eqvt_app)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   283
  apply (subgoal_tac "atom ba \<sharp> (\<lambda>(a, x, y). subs_mix a x y) (P, xa, ya)")
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   284
  apply simp
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   285
  apply (erule fresh_eqvt_at)
3183
313e6f2cdd89 added permutation simplification to the simplifier; this makes the simplifier more powerful, but it potentially loops more often
Christian Urban <urbanc@in.tum.de>
parents: 3097
diff changeset
   286
  apply(simp add: finite_supp)
313e6f2cdd89 added permutation simplification to the simplifier; this makes the simplifier more powerful, but it potentially loops more often
Christian Urban <urbanc@in.tum.de>
parents: 3097
diff changeset
   287
  apply(simp)
313e6f2cdd89 added permutation simplification to the simplifier; this makes the simplifier more powerful, but it potentially loops more often
Christian Urban <urbanc@in.tum.de>
parents: 3097
diff changeset
   288
  apply(simp add: eqvt_at_def)
3191
0440bc1a2438 streamlined definition of alpha-equivalence for single binders (used flip instead of swap)
Christian Urban <urbanc@in.tum.de>
parents: 3183
diff changeset
   289
  apply(drule_tac x="(b \<leftrightarrow> ba)" in spec)
3183
313e6f2cdd89 added permutation simplification to the simplifier; this makes the simplifier more powerful, but it potentially loops more often
Christian Urban <urbanc@in.tum.de>
parents: 3097
diff changeset
   290
  apply(simp)
3197
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   291
  apply (simp only: meta_eq_to_obj_eq[OF subs_mix_def, symmetric, unfolded fun_eq_iff])
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   292
  apply(rename_tac b P ba xa ya Pa)
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   293
 apply (subgoal_tac "eqvt_at (\<lambda>(a, b, c). subs_mix a b c) (P, xa, ya)")
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   294
  apply (thin_tac "eqvt_at subsGuard_mix_subsList_mix_subs_mix_sumC (Inr (Inr (P, xa, ya)))")
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   295
  apply (thin_tac "eqvt_at subsGuard_mix_subsList_mix_subs_mix_sumC (Inr (Inr (Pa, xa, ya)))")
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   296
  prefer 2
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   297
  apply (simp only: eqvt_at_def subs_mix_def)
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   298
  apply rule
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   299
  apply(simp (no_asm))
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   300
  apply (subst testrr)
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   301
  apply (simp add: subsGuard_mix_subsList_mix_subs_mix_sumC_def)
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   302
  apply (simp add: THE_default_def)
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   303
apply (case_tac "Ex1 (subsGuard_mix_subsList_mix_subs_mix_graph (Inr (Inr (P, xa, ya))))")
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   304
apply simp_all[2]
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   305
apply auto[1]
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   306
apply (erule_tac x="x" in allE)
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   307
apply simp
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   308
apply (thin_tac "\<forall>p\<Colon>perm.
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   309
           p \<bullet> The (subsGuard_mix_subsList_mix_subs_mix_graph (Inr (Inr (P, xa, ya)))) =
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   310
           (if \<exists>!x\<Colon>guardedTerm_mix + sumList_mix + piMix.
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   311
                  subsGuard_mix_subsList_mix_subs_mix_graph (Inr (Inr (p \<bullet> P, p \<bullet> xa, p \<bullet> ya))) x
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   312
            then THE x\<Colon>guardedTerm_mix + sumList_mix + piMix.
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   313
                    subsGuard_mix_subsList_mix_subs_mix_graph (Inr (Inr (p \<bullet> P, p \<bullet> xa, p \<bullet> ya))) x
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   314
            else Inr (Inr undefined))")
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   315
apply (thin_tac "\<forall>p\<Colon>perm.
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   316
           p \<bullet> (if \<exists>!x\<Colon>guardedTerm_mix + sumList_mix + piMix.
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   317
                      subsGuard_mix_subsList_mix_subs_mix_graph (Inr (Inr (Pa, xa, ya))) x
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   318
                then THE x\<Colon>guardedTerm_mix + sumList_mix + piMix.
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   319
                        subsGuard_mix_subsList_mix_subs_mix_graph (Inr (Inr (Pa, xa, ya))) x
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   320
                else Inr (Inr undefined)) =
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   321
           (if \<exists>!x\<Colon>guardedTerm_mix + sumList_mix + piMix.
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   322
                  subsGuard_mix_subsList_mix_subs_mix_graph (Inr (Inr (p \<bullet> Pa, p \<bullet> xa, p \<bullet> ya))) x
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   323
            then THE x\<Colon>guardedTerm_mix + sumList_mix + piMix.
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   324
                    subsGuard_mix_subsList_mix_subs_mix_graph (Inr (Inr (p \<bullet> Pa, p \<bullet> xa, p \<bullet> ya))) x
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   325
            else Inr (Inr undefined))")
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   326
apply (thin_tac "atom b \<sharp> (xa, ya)")
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   327
apply (thin_tac "atom ba \<sharp> (xa, ya)")
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   328
apply (thin_tac "[[atom b]]lst. P = [[atom ba]]lst. Pa")
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   329
apply(cases rule: subsGuard_mix_subsList_mix_subs_mix_graph.cases)
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   330
apply assumption
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   331
apply (metis Inr_not_Inl)
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   332
apply (metis Inr_not_Inl)
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   333
apply (metis Inr_not_Inl)
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   334
apply (metis Inr_inject Inr_not_Inl)
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   335
apply (metis Inr_inject Inr_not_Inl)
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   336
apply (rule_tac x="<\<nu>a>\<onesuperior>Sum_Type.Projr
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   337
                            (Sum_Type.Projr
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   338
                              (subsGuard_mix_subsList_mix_subs_mix_sum (Inr (Inr (Pb, xb, y)))))" in exI)
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   339
apply clarify
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   340
apply (rule the1_equality)
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   341
apply blast apply assumption
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   342
apply (rule_tac x="Sum_Type.Projr
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   343
                       (Sum_Type.Projr (subsGuard_mix_subsList_mix_subs_mix_sum (Inr (Inr (Pb, xb, y))))) \<parallel>\<onesuperior>
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   344
                      Sum_Type.Projr
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   345
                       (Sum_Type.Projr (subsGuard_mix_subsList_mix_subs_mix_sum (Inr (Inr (Q, xb, y)))))" in exI)
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   346
apply clarify
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   347
apply (rule the1_equality)
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   348
apply blast apply assumption
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   349
apply (rule_tac x="[(a[xb:::=y])\<frown>\<onesuperior>(bb[xb:::=y])]Sum_Type.Projr
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   350
                                                    (Sum_Type.Projr
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   351
(subsGuard_mix_subsList_mix_subs_mix_sum (Inr (Inr (Pb, xb, y)))))" in exI)
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   352
apply clarify
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   353
apply (rule the1_equality)
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   354
apply blast apply assumption
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   355
apply (rule_tac x="\<oplus>\<onesuperior>{Sum_Type.Projl
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   356
                          (Sum_Type.Projr
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   357
                            (subsGuard_mix_subsList_mix_subs_mix_sum (Inr (Inl (xg, xb, y)))))}" in exI)
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   358
apply clarify
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   359
apply (rule the1_equality)
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   360
apply blast apply assumption
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   361
apply (rule_tac x="\<infinity>(a[xb:::=y])?<bb>\<onesuperior>.Sum_Type.Projr
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   362
                                           (Sum_Type.Projr
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   363
                                             (subsGuard_mix_subsList_mix_subs_mix_sum
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   364
                                               (Inr (Inr (Pb, xb, y)))))" in exI)
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   365
apply clarify
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   366
apply (rule the1_equality)
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   367
apply blast apply assumption
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   368
apply (rule_tac x="succ\<onesuperior>" in exI)
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   369
apply clarify
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   370
apply (rule the1_equality)
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   371
apply blast apply assumption
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   372
apply simp
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   373
(* Here the only real goal compatibility is left *)
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   374
  apply (erule Abs_lst1_fcb)
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   375
  apply (simp_all add: Abs_fresh_iff fresh_fun_eqvt_app)
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   376
  apply (subgoal_tac "atom ba \<sharp> (\<lambda>(a, x, y). subs_mix a x y) (P, xa, ya)")
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   377
  apply simp
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   378
  apply (erule fresh_eqvt_at)
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   379
  apply(simp add: finite_supp)
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   380
  apply(simp)
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   381
  apply(simp add: eqvt_at_def)
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   382
  apply(drule_tac x="(b \<leftrightarrow> ba)" in spec)
25d11b449e92 definition of an auxiliary graph in nominal-primrec definitions
Christian Urban <urbanc@in.tum.de>
parents: 3192
diff changeset
   383
  apply(simp)
3096
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   384
  done
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   385
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   386
termination (eqvt)
3097
b27e94db1b8a included Pi theory in tests
Christian Urban <urbanc@in.tum.de>
parents: 3096
diff changeset
   387
  by (lexicographic_order)
3096
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   388
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   389
lemma forget_mix:
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   390
  fixes g  :: guardedTerm_mix
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   391
  and   xg :: sumList_mix
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   392
  and   P  :: piMix
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   393
  and   x  :: name
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   394
  and   y  :: name
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   395
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   396
  shows "atom x \<sharp> g \<longrightarrow> g[x::=\<onesuperior>\<onesuperior>y] = g"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   397
  and   "atom x \<sharp> xg \<longrightarrow> xg[x::=\<onesuperior>\<twosuperior>y] = xg"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   398
  and   "atom x \<sharp> P \<longrightarrow> P[x::=\<onesuperior>y] = P"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   399
proof -
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   400
  show  "atom x \<sharp> g \<longrightarrow> g[x::=\<onesuperior>\<onesuperior>y] = g"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   401
  and   "atom x \<sharp> xg \<longrightarrow> xg[x::=\<onesuperior>\<twosuperior>y] = xg"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   402
  and   "atom x \<sharp> P \<longrightarrow> P[x::=\<onesuperior>y] = P"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   403
    using assms
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   404
    apply(nominal_induct g and xg and P avoiding: x y rule: piMix_strong_induct)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   405
    by(auto simp add: piMix_eq_iff piMix_fresh fresh_at_base)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   406
qed
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   407
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   408
lemma fresh_fact_mix:
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   409
  fixes g  :: guardedTerm_mix
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   410
  and   xg :: sumList_mix
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   411
  and   P  :: piMix
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   412
  and   x  :: name
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   413
  and   y  :: name
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   414
  and   z  :: name
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   415
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   416
  assumes "atom z \<sharp> y"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   417
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   418
  shows "(z = x \<or> atom z \<sharp> g) \<longrightarrow> atom z \<sharp> g[x::=\<onesuperior>\<onesuperior>y]"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   419
  and   "(z = x \<or> atom z \<sharp> xg) \<longrightarrow> atom z \<sharp> xg[x::=\<onesuperior>\<twosuperior>y]"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   420
  and   "(z = x \<or> atom z \<sharp> P) \<longrightarrow> atom z \<sharp> P[x::=\<onesuperior>y]"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   421
proof -
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   422
  show  "(z = x \<or> atom z \<sharp> g) \<longrightarrow> atom z \<sharp> g[x::=\<onesuperior>\<onesuperior>y]"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   423
  and   "(z = x \<or> atom z \<sharp> xg) \<longrightarrow> atom z \<sharp> xg[x::=\<onesuperior>\<twosuperior>y]"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   424
  and   "(z = x \<or> atom z \<sharp> P) \<longrightarrow> atom z \<sharp> P[x::=\<onesuperior>y]"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   425
    using assms
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   426
    apply(nominal_induct g and xg and P avoiding: x y z rule: piMix_strong_induct)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   427
    by(auto simp add: piMix_fresh fresh_at_base)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   428
qed
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   429
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   430
lemma substitution_lemma_mix:
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   431
  fixes g  :: guardedTerm_mix
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   432
  and   xg :: sumList_mix
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   433
  and   P  :: piMix
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   434
  and   s  :: name
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   435
  and   u  :: name
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   436
  and   x  :: name
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   437
  and   y  :: name
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   438
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   439
  assumes "x \<noteq> y"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   440
  and     "atom x \<sharp> u"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   441
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   442
  shows "g[x::=\<onesuperior>\<onesuperior>s][y::=\<onesuperior>\<onesuperior>u] = g[y::=\<onesuperior>\<onesuperior>u][x::=\<onesuperior>\<onesuperior>s[y:::=u]]"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   443
  and   "xg[x::=\<onesuperior>\<twosuperior>s][y::=\<onesuperior>\<twosuperior>u] = xg[y::=\<onesuperior>\<twosuperior>u][x::=\<onesuperior>\<twosuperior>s[y:::=u]]"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   444
  and   "P[x::=\<onesuperior>s][y::=\<onesuperior>u] = P[y::=\<onesuperior>u][x::=\<onesuperior>s[y:::=u]]"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   445
proof -
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   446
  show  "g[x::=\<onesuperior>\<onesuperior>s][y::=\<onesuperior>\<onesuperior>u] = g[y::=\<onesuperior>\<onesuperior>u][x::=\<onesuperior>\<onesuperior>s[y:::=u]]"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   447
  and   "xg[x::=\<onesuperior>\<twosuperior>s][y::=\<onesuperior>\<twosuperior>u] = xg[y::=\<onesuperior>\<twosuperior>u][x::=\<onesuperior>\<twosuperior>s[y:::=u]]"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   448
  and   "P[x::=\<onesuperior>s][y::=\<onesuperior>u] = P[y::=\<onesuperior>u][x::=\<onesuperior>s[y:::=u]]"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   449
    using assms
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   450
    apply(nominal_induct g and xg and P avoiding: x y s u rule: piMix_strong_induct)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   451
    apply(simp_all add: fresh_fact_mix forget_mix)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   452
    by(auto simp add: fresh_at_base)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   453
qed
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   454
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   455
lemma perm_eq_subst_mix:
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   456
  fixes g  :: guardedTerm_mix
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   457
  and   xg :: sumList_mix
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   458
  and   P  :: piMix
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   459
  and   x  :: name
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   460
  and   y  :: name
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   461
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   462
  shows "atom y \<sharp> g \<longrightarrow> (atom x \<rightleftharpoons> atom y) \<bullet> g = g[x::=\<onesuperior>\<onesuperior>y]"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   463
  and   "atom y \<sharp> xg \<longrightarrow> (atom x \<rightleftharpoons> atom y) \<bullet> xg = xg[x::=\<onesuperior>\<twosuperior>y]"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   464
  and   "atom y \<sharp> P \<longrightarrow> (atom x \<rightleftharpoons> atom y) \<bullet> P = P[x::=\<onesuperior>y]"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   465
proof -
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   466
  show  "atom y \<sharp> g \<longrightarrow> (atom x \<rightleftharpoons> atom y) \<bullet> g = g[x::=\<onesuperior>\<onesuperior>y]"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   467
  and   "atom y \<sharp> xg \<longrightarrow> (atom x \<rightleftharpoons> atom y) \<bullet> xg = xg[x::=\<onesuperior>\<twosuperior>y]"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   468
  and   "atom y \<sharp> P \<longrightarrow> (atom x \<rightleftharpoons> atom y) \<bullet> P = P[x::=\<onesuperior>y]"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   469
    apply(nominal_induct g and xg and P avoiding: x y rule: piMix_strong_induct)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   470
    by(auto simp add: piMix_fresh fresh_at_base)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   471
qed
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   472
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   473
lemma subst_id_mix:
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   474
  fixes g  :: guardedTerm_mix
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   475
  and   xg :: sumList_mix
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   476
  and   P  :: piMix
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   477
  and   x  :: name
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   478
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   479
  shows "g[x::=\<onesuperior>\<onesuperior>x] = g" and "xg[x::=\<onesuperior>\<twosuperior>x] = xg" and "P[x::=\<onesuperior>x] = P"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   480
proof -
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   481
  show  "g[x::=\<onesuperior>\<onesuperior>x] = g" and "xg[x::=\<onesuperior>\<twosuperior>x] = xg" and "P[x::=\<onesuperior>x] = P"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   482
    apply(nominal_induct g and xg and P avoiding: x rule: piMix_strong_induct)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   483
    by(auto)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   484
qed
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   485
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   486
lemma alphaRes_subst_mix:
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   487
  fixes a :: name
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   488
  and   P :: piMix
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   489
  and   z :: name
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   490
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   491
  assumes "atom z \<sharp> P"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   492
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   493
  shows "<\<nu>a>\<onesuperior>P = <\<nu>z>\<onesuperior>(P[a::=\<onesuperior>z])"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   494
proof(cases "a = z")
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   495
  assume "a = z"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   496
  thus ?thesis
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   497
    by(simp add: subst_id_mix)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   498
next
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   499
  assume "a \<noteq> z"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   500
  thus ?thesis
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   501
    using assms
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   502
    by(simp add: alphaRes_mix perm_eq_subst_mix)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   503
qed
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   504
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   505
lemma alphaInput_subst_mix:
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   506
  fixes a :: name
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   507
  and   b :: name
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   508
  and   P :: piMix
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   509
  and   z :: name
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   510
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   511
  assumes "atom z \<sharp> P"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   512
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   513
  shows "a?<b>\<onesuperior>.P = a?<z>\<onesuperior>.(P[b::=\<onesuperior>z])"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   514
proof(cases "b = z")
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   515
  assume "b = z"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   516
  thus ?thesis
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   517
    by(simp add: subst_id_mix)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   518
next
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   519
  assume "b \<noteq> z"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   520
  thus ?thesis
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   521
    using assms
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   522
    by(simp add: alphaInput_mix perm_eq_subst_mix)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   523
qed
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   524
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   525
lemma alphaRep_subst_mix:
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   526
  fixes a :: name
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   527
  and   b :: name
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   528
  and   P :: piMix
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   529
  and   z :: name
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   530
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   531
  assumes "atom z \<sharp> P"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   532
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   533
  shows "\<infinity>a?<b>\<onesuperior>.P = \<infinity>a?<z>\<onesuperior>.(P[b::=\<onesuperior>z])"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   534
proof(cases "b = z")
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   535
  assume "b = z"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   536
  thus ?thesis
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   537
    by(simp add: subst_id_mix)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   538
next
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   539
  assume "b \<noteq> z"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   540
  thus ?thesis
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   541
    using assms
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   542
    by(simp add: alphaRep_mix perm_eq_subst_mix)
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   543
qed
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   544
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   545
inductive
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   546
  fresh_list_guard_mix :: "name list \<Rightarrow> guardedTerm_mix \<Rightarrow> bool"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   547
where
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   548
  "fresh_list_guard_mix [] g"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   549
| "\<lbrakk>atom n \<sharp> g; fresh_list_guard_mix xn g\<rbrakk> \<Longrightarrow> fresh_list_guard_mix (n#xn) g"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   550
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   551
equivariance fresh_list_guard_mix
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   552
nominal_inductive fresh_list_guard_mix
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   553
  done
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   554
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   555
inductive
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   556
  fresh_list_sumList_mix :: "name list \<Rightarrow> sumList_mix \<Rightarrow> bool"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   557
where
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   558
  "fresh_list_sumList_mix [] xg"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   559
| "\<lbrakk>atom n \<sharp> xg; fresh_list_sumList_mix xn xg\<rbrakk> \<Longrightarrow> fresh_list_sumList_mix (n#xn) xg"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   560
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   561
equivariance fresh_list_sumList_mix
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   562
nominal_inductive fresh_list_sumList_mix
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   563
  done
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   564
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   565
inductive
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   566
  fresh_list_mix :: "name list \<Rightarrow> piMix \<Rightarrow> bool"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   567
where
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   568
  "fresh_list_mix [] P"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   569
| "\<lbrakk>atom n \<sharp> P; fresh_list_mix xn P\<rbrakk> \<Longrightarrow> fresh_list_mix (n#xn) P"
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   570
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   571
equivariance fresh_list_mix
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   572
nominal_inductive fresh_list_mix
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   573
  done
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   574
18f20d75b463 added file by Kirstin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   575
end