Nominal/Abs.thy
author Christian Urban <urbanc@in.tum.de>
Thu, 24 Jun 2010 00:41:41 +0100
changeset 2334 0d10196364aa
parent 2324 9038c9549073
child 2385 fe25a3ffeb14
permissions -rw-r--r--
added comment about partial equivalence relations
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1440
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
theory Abs
1804
81b171e2d6d5 added eqvt rules that are more standard
Christian Urban <urbanc@in.tum.de>
parents: 1744
diff changeset
     2
imports "../Nominal-General/Nominal2_Atoms" 
81b171e2d6d5 added eqvt rules that are more standard
Christian Urban <urbanc@in.tum.de>
parents: 1744
diff changeset
     3
        "../Nominal-General/Nominal2_Eqvt" 
81b171e2d6d5 added eqvt rules that are more standard
Christian Urban <urbanc@in.tum.de>
parents: 1744
diff changeset
     4
        "../Nominal-General/Nominal2_Supp" 
81b171e2d6d5 added eqvt rules that are more standard
Christian Urban <urbanc@in.tum.de>
parents: 1744
diff changeset
     5
        "Quotient" 
1933
9eab1dfc14d2 moved lemmas from FSet.thy to do with atom to Nominal2_Base, and to do with 'a::at set to Nominal2_Atoms; moved Nominal2_Eqvt.thy one up to be loaded before Nominal2_Atoms
Christian Urban <urbanc@in.tum.de>
parents: 1932
diff changeset
     6
        "Quotient_List"
1804
81b171e2d6d5 added eqvt rules that are more standard
Christian Urban <urbanc@in.tum.de>
parents: 1744
diff changeset
     7
        "Quotient_Product" 
1440
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
begin
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
fun
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    11
  alpha_gen 
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
where
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    13
  alpha_gen[simp del]:
1465
4de35639fef0 added another supp-proof for the non-recursive case
Christian Urban <urbanc@in.tum.de>
parents: 1460
diff changeset
    14
  "alpha_gen (bs, x) R f pi (cs, y) \<longleftrightarrow> 
4de35639fef0 added another supp-proof for the non-recursive case
Christian Urban <urbanc@in.tum.de>
parents: 1460
diff changeset
    15
     f x - bs = f y - cs \<and> 
4de35639fef0 added another supp-proof for the non-recursive case
Christian Urban <urbanc@in.tum.de>
parents: 1460
diff changeset
    16
     (f x - bs) \<sharp>* pi \<and> 
4de35639fef0 added another supp-proof for the non-recursive case
Christian Urban <urbanc@in.tum.de>
parents: 1460
diff changeset
    17
     R (pi \<bullet> x) y \<and>
4de35639fef0 added another supp-proof for the non-recursive case
Christian Urban <urbanc@in.tum.de>
parents: 1460
diff changeset
    18
     pi \<bullet> bs = cs"
1440
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    19
1557
fee2389789ad moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents: 1544
diff changeset
    20
fun
fee2389789ad moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents: 1544
diff changeset
    21
  alpha_res
fee2389789ad moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents: 1544
diff changeset
    22
where
fee2389789ad moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents: 1544
diff changeset
    23
  alpha_res[simp del]:
fee2389789ad moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents: 1544
diff changeset
    24
  "alpha_res (bs, x) R f pi (cs, y) \<longleftrightarrow> 
fee2389789ad moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents: 1544
diff changeset
    25
     f x - bs = f y - cs \<and> 
fee2389789ad moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents: 1544
diff changeset
    26
     (f x - bs) \<sharp>* pi \<and> 
fee2389789ad moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents: 1544
diff changeset
    27
     R (pi \<bullet> x) y"
1440
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    28
1557
fee2389789ad moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents: 1544
diff changeset
    29
fun
fee2389789ad moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents: 1544
diff changeset
    30
  alpha_lst
fee2389789ad moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents: 1544
diff changeset
    31
where
fee2389789ad moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents: 1544
diff changeset
    32
  alpha_lst[simp del]:
fee2389789ad moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents: 1544
diff changeset
    33
  "alpha_lst (bs, x) R f pi (cs, y) \<longleftrightarrow> 
fee2389789ad moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents: 1544
diff changeset
    34
     f x - set bs = f y - set cs \<and> 
fee2389789ad moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents: 1544
diff changeset
    35
     (f x - set bs) \<sharp>* pi \<and> 
fee2389789ad moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents: 1544
diff changeset
    36
     R (pi \<bullet> x) y \<and>
fee2389789ad moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents: 1544
diff changeset
    37
     pi \<bullet> bs = cs"
fee2389789ad moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents: 1544
diff changeset
    38
fee2389789ad moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents: 1544
diff changeset
    39
lemmas alphas = alpha_gen.simps alpha_res.simps alpha_lst.simps
fee2389789ad moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents: 1544
diff changeset
    40
fee2389789ad moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents: 1544
diff changeset
    41
notation
fee2389789ad moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents: 1544
diff changeset
    42
  alpha_gen ("_ \<approx>gen _ _ _ _" [100, 100, 100, 100, 100] 100) and
fee2389789ad moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents: 1544
diff changeset
    43
  alpha_res ("_ \<approx>res _ _ _ _" [100, 100, 100, 100, 100] 100) and
fee2389789ad moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents: 1544
diff changeset
    44
  alpha_lst ("_ \<approx>lst _ _ _ _" [100, 100, 100, 100, 100] 100) 
fee2389789ad moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents: 1544
diff changeset
    45
fee2389789ad moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents: 1544
diff changeset
    46
(* monos *)
fee2389789ad moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents: 1544
diff changeset
    47
lemma [mono]: 
fee2389789ad moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents: 1544
diff changeset
    48
  shows "R1 \<le> R2 \<Longrightarrow> alpha_gen bs R1 \<le> alpha_gen bs R2"
fee2389789ad moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents: 1544
diff changeset
    49
  and   "R1 \<le> R2 \<Longrightarrow> alpha_res bs R1 \<le> alpha_res bs R2"
fee2389789ad moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents: 1544
diff changeset
    50
  and   "R1 \<le> R2 \<Longrightarrow> alpha_lst cs R1 \<le> alpha_lst cs R2"
fee2389789ad moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents: 1544
diff changeset
    51
  by (case_tac [!] bs, case_tac [!] cs) 
fee2389789ad moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents: 1544
diff changeset
    52
     (auto simp add: le_fun_def le_bool_def alphas)
1440
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    53
2311
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
    54
(* equivariance *)
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
    55
lemma alpha_gen_eqvt[eqvt]:
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
    56
  shows "(bs, x) \<approx>gen R f q (cs, y) \<Longrightarrow> (p \<bullet> bs, p \<bullet> x) \<approx>gen (p \<bullet> R) (p \<bullet> f) (p \<bullet> q) (p \<bullet> cs, p \<bullet> y)"
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
    57
  and   "(bs, x) \<approx>res R f q (cs, y) \<Longrightarrow> (p \<bullet> bs, p \<bullet> x) \<approx>res (p \<bullet> R) (p \<bullet> f) (p \<bullet> q) (p \<bullet> cs, p \<bullet> y)"
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
    58
  and   "(ds, x) \<approx>lst R f q (es, y) \<Longrightarrow> (p \<bullet> ds, p \<bullet> x) \<approx>lst (p \<bullet> R) (p \<bullet> f) (p \<bullet> q) (p \<bullet> es, p \<bullet> y)" 
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
    59
  unfolding alphas
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
    60
  unfolding permute_eqvt[symmetric]
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
    61
  unfolding set_eqvt[symmetric]
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
    62
  unfolding permute_fun_app_eq[symmetric]
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
    63
  unfolding Diff_eqvt[symmetric]
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
    64
  by (auto simp add: permute_bool_def fresh_star_permute_iff)
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
    65
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
    66
(* equivalence *)
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
    67
lemma alpha_gen_refl:
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
    68
  assumes a: "R x x"
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
    69
  shows "(bs, x) \<approx>gen R f 0 (bs, x)"
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
    70
  and   "(bs, x) \<approx>res R f 0 (bs, x)"
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
    71
  and   "(cs, x) \<approx>lst R f 0 (cs, x)"
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
    72
  using a 
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
    73
  unfolding alphas
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
    74
  unfolding fresh_star_def
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
    75
  by (simp_all add: fresh_zero_perm)
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
    76
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
    77
lemma alpha_gen_sym:
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
    78
  assumes a: "R (p \<bullet> x) y \<Longrightarrow> R (- p \<bullet> y) x"
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
    79
  shows "(bs, x) \<approx>gen R f p (cs, y) \<Longrightarrow> (cs, y) \<approx>gen R f (- p) (bs, x)"
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
    80
  and   "(bs, x) \<approx>res R f p (cs, y) \<Longrightarrow> (cs, y) \<approx>res R f (- p) (bs, x)"
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
    81
  and   "(ds, x) \<approx>lst R f p (es, y) \<Longrightarrow> (es, y) \<approx>lst R f (- p) (ds, x)"
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
    82
  unfolding alphas fresh_star_def
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
    83
  using a
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
    84
  by (auto simp add:  fresh_minus_perm)
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
    85
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
    86
lemma alpha_gen_sym_eqvt:
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
    87
  assumes a: "R (p \<bullet> x) y \<Longrightarrow> R y (p \<bullet> x)" 
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
    88
  and     b: "p \<bullet> R = R"
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
    89
  shows "(bs, x) \<approx>gen R f p (cs, y) \<Longrightarrow> (cs, y) \<approx>gen R f (- p) (bs, x)" 
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
    90
  and   "(bs, x) \<approx>res R f p (cs, y) \<Longrightarrow> (cs, y) \<approx>res R f (- p) (bs, x)" 
2313
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
    91
  and   "(ds, x) \<approx>lst R f p (es, y) \<Longrightarrow> (es, y) \<approx>lst R f (- p) (ds, x)"
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
    92
apply(auto intro!: alpha_gen_sym)
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
    93
apply(drule_tac [!] a)
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
    94
apply(rule_tac [!] p="p" in permute_boolE)
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
    95
apply(perm_simp add: permute_minus_cancel b)
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
    96
apply(assumption)
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
    97
apply(perm_simp add: permute_minus_cancel b)
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
    98
apply(assumption)
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
    99
apply(perm_simp add: permute_minus_cancel b)
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   100
apply(assumption)
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   101
done
2311
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
   102
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
   103
lemma alpha_gen_trans:
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
   104
  assumes a: "\<lbrakk>R (p \<bullet> x) y; R (q \<bullet> y) z\<rbrakk> \<Longrightarrow> R ((q + p) \<bullet> x) z"
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
   105
  shows "\<lbrakk>(bs, x) \<approx>gen R f p (cs, y); (cs, y) \<approx>gen R f q (ds, z)\<rbrakk> \<Longrightarrow> (bs, x) \<approx>gen R f (q + p) (ds, z)"
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
   106
  and   "\<lbrakk>(bs, x) \<approx>res R f p (cs, y); (cs, y) \<approx>res R f q (ds, z)\<rbrakk> \<Longrightarrow> (bs, x) \<approx>res R f (q + p) (ds, z)"
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
   107
  and   "\<lbrakk>(es, x) \<approx>lst R f p (gs, y); (gs, y) \<approx>lst R f q (hs, z)\<rbrakk> \<Longrightarrow> (es, x) \<approx>lst R f (q + p) (hs, z)"
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
   108
  using a
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
   109
  unfolding alphas fresh_star_def
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
   110
  by (simp_all add: fresh_plus_perm)
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
   111
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
   112
2313
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   113
lemma alpha_gen_trans_eqvt:
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   114
  assumes b: "(cs, y) \<approx>gen R f q (ds, z)"
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   115
  and     a: "(bs, x) \<approx>gen R f p (cs, y)" 
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   116
  and     d: "q \<bullet> R = R"
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   117
  and     c: "\<lbrakk>R (p \<bullet> x) y; R y (- q \<bullet> z)\<rbrakk> \<Longrightarrow> R (p \<bullet> x) (- q \<bullet> z)"
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   118
  shows "(bs, x) \<approx>gen R f (q + p) (ds, z)"
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   119
apply(rule alpha_gen_trans)
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   120
defer
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   121
apply(rule a)
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   122
apply(rule b)
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   123
apply(drule c)
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   124
apply(rule_tac p="q" in permute_boolE)
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   125
apply(perm_simp add: permute_minus_cancel d)
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   126
apply(assumption)
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   127
apply(rotate_tac -1)
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   128
apply(drule_tac p="q" in permute_boolI)
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   129
apply(perm_simp add: permute_minus_cancel d)
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   130
apply(simp add: permute_eqvt[symmetric])
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   131
done
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   132
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   133
lemma alpha_res_trans_eqvt:
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   134
  assumes  b: "(cs, y) \<approx>res R f q (ds, z)"
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   135
  and     a: "(bs, x) \<approx>res R f p (cs, y)" 
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   136
  and     d: "q \<bullet> R = R"
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   137
  and     c: "\<lbrakk>R (p \<bullet> x) y; R y (- q \<bullet> z)\<rbrakk> \<Longrightarrow> R (p \<bullet> x) (- q \<bullet> z)"
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   138
  shows "(bs, x) \<approx>res R f (q + p) (ds, z)"
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   139
apply(rule alpha_gen_trans)
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   140
defer
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   141
apply(rule a)
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   142
apply(rule b)
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   143
apply(drule c)
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   144
apply(rule_tac p="q" in permute_boolE)
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   145
apply(perm_simp add: permute_minus_cancel d)
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   146
apply(assumption)
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   147
apply(rotate_tac -1)
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   148
apply(drule_tac p="q" in permute_boolI)
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   149
apply(perm_simp add: permute_minus_cancel d)
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   150
apply(simp add: permute_eqvt[symmetric])
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   151
done
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   152
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   153
lemma alpha_lst_trans_eqvt:
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   154
  assumes b: "(cs, y) \<approx>lst R f q (ds, z)"
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   155
  and     a: "(bs, x) \<approx>lst R f p (cs, y)" 
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   156
  and     d: "q \<bullet> R = R"
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   157
  and     c: "\<lbrakk>R (p \<bullet> x) y; R y (- q \<bullet> z)\<rbrakk> \<Longrightarrow> R (p \<bullet> x) (- q \<bullet> z)"
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   158
  shows "(bs, x) \<approx>lst R f (q + p) (ds, z)"
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   159
apply(rule alpha_gen_trans)
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   160
defer
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   161
apply(rule a)
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   162
apply(rule b)
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   163
apply(drule c)
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   164
apply(rule_tac p="q" in permute_boolE)
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   165
apply(perm_simp add: permute_minus_cancel d)
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   166
apply(assumption)
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   167
apply(rotate_tac -1)
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   168
apply(drule_tac p="q" in permute_boolI)
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   169
apply(perm_simp add: permute_minus_cancel d)
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   170
apply(simp add: permute_eqvt[symmetric])
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   171
done
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   172
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   173
lemmas alpha_trans_eqvt = alpha_gen_trans_eqvt alpha_res_trans_eqvt alpha_lst_trans_eqvt
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   174
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   175
lemma test:
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   176
  shows "(as, t) \<approx>gen R f pi (bs, s) \<Longrightarrow> R (pi \<bullet> t) s"
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   177
  and   "(as, t) \<approx>res R f pi (bs, s) \<Longrightarrow> R (pi \<bullet> t) s"
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   178
  and   "(cs, t) \<approx>lst R f pi (ds, s) \<Longrightarrow> R (pi \<bullet> t) s"
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   179
  by (simp_all add: alphas)
25d2cdf7d7e4 transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents: 2311
diff changeset
   180
2311
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
   181
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
   182
section {* General Abstractions *}
4da5c5c29009 work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents: 2302
diff changeset
   183
1440
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   184
fun
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   185
  alpha_abs 
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   186
where
1666
a99ae705b811 Removed some warnings.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1665
diff changeset
   187
  [simp del]:
1558
a5ba76208983 started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents: 1557
diff changeset
   188
  "alpha_abs (bs, x) (cs, y) \<longleftrightarrow> (\<exists>p. (bs, x) \<approx>gen (op=) supp p (cs, y))"
1440
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   189
1657
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   190
fun
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   191
  alpha_abs_lst
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   192
where
1666
a99ae705b811 Removed some warnings.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1665
diff changeset
   193
  [simp del]:
1657
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   194
  "alpha_abs_lst (bs, x) (cs, y) \<longleftrightarrow> (\<exists>p. (bs, x) \<approx>lst (op=) supp p (cs, y))"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   195
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   196
fun
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   197
  alpha_abs_res
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   198
where
1666
a99ae705b811 Removed some warnings.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1665
diff changeset
   199
  [simp del]:
1657
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   200
  "alpha_abs_res (bs, x) (cs, y) \<longleftrightarrow> (\<exists>p. (bs, x) \<approx>res (op=) supp p (cs, y))"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   201
1440
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   202
notation
1666
a99ae705b811 Removed some warnings.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1665
diff changeset
   203
  alpha_abs (infix "\<approx>abs" 50) and
a99ae705b811 Removed some warnings.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1665
diff changeset
   204
  alpha_abs_lst (infix "\<approx>abs'_lst" 50) and
a99ae705b811 Removed some warnings.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1665
diff changeset
   205
  alpha_abs_res (infix "\<approx>abs'_res" 50)
1657
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   206
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   207
lemmas alphas_abs = alpha_abs.simps alpha_abs_res.simps alpha_abs_lst.simps
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   208
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   209
lemma alphas_abs_refl:
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   210
  shows "(bs, x) \<approx>abs (bs, x)"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   211
  and   "(bs, x) \<approx>abs_res (bs, x)"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   212
  and   "(cs, x) \<approx>abs_lst (cs, x)" 
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   213
  unfolding alphas_abs
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   214
  unfolding alphas
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   215
  unfolding fresh_star_def
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   216
  by (rule_tac [!] x="0" in exI)
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   217
     (simp_all add: fresh_zero_perm)
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   218
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   219
lemma alphas_abs_sym:
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   220
  shows "(bs, x) \<approx>abs (cs, y) \<Longrightarrow> (cs, y) \<approx>abs (bs, x)"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   221
  and   "(bs, x) \<approx>abs_res (cs, y) \<Longrightarrow> (cs, y) \<approx>abs_res (bs, x)"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   222
  and   "(ds, x) \<approx>abs_lst (es, y) \<Longrightarrow> (es, y) \<approx>abs_lst (ds, x)"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   223
  unfolding alphas_abs
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   224
  unfolding alphas
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   225
  unfolding fresh_star_def
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   226
  by (erule_tac [!] exE, rule_tac [!] x="-p" in exI)
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   227
     (auto simp add: fresh_minus_perm)
1440
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   228
1657
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   229
lemma alphas_abs_trans:
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   230
  shows "\<lbrakk>(bs, x) \<approx>abs (cs, y); (cs, y) \<approx>abs (ds, z)\<rbrakk> \<Longrightarrow> (bs, x) \<approx>abs (ds, z)"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   231
  and   "\<lbrakk>(bs, x) \<approx>abs_res (cs, y); (cs, y) \<approx>abs_res (ds, z)\<rbrakk> \<Longrightarrow> (bs, x) \<approx>abs_res (ds, z)"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   232
  and   "\<lbrakk>(es, x) \<approx>abs_lst (gs, y); (gs, y) \<approx>abs_lst (hs, z)\<rbrakk> \<Longrightarrow> (es, x) \<approx>abs_lst (hs, z)"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   233
  unfolding alphas_abs
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   234
  unfolding alphas
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   235
  unfolding fresh_star_def
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   236
  apply(erule_tac [!] exE, erule_tac [!] exE)
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   237
  apply(rule_tac [!] x="pa + p" in exI)
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   238
  by (simp_all add: fresh_plus_perm)
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   239
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   240
lemma alphas_abs_eqvt:
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   241
  shows "(bs, x) \<approx>abs (cs, y) \<Longrightarrow> (p \<bullet> bs, p \<bullet> x) \<approx>abs (p \<bullet> cs, p \<bullet> y)"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   242
  and   "(bs, x) \<approx>abs_res (cs, y) \<Longrightarrow> (p \<bullet> bs, p \<bullet> x) \<approx>abs_res (p \<bullet> cs, p \<bullet> y)"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   243
  and   "(ds, x) \<approx>abs_lst (es, y) \<Longrightarrow> (p \<bullet> ds, p \<bullet> x) \<approx>abs_lst (p \<bullet> es, p \<bullet> y)"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   244
  unfolding alphas_abs
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   245
  unfolding alphas
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   246
  unfolding set_eqvt[symmetric]
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   247
  unfolding supp_eqvt[symmetric]
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   248
  unfolding Diff_eqvt[symmetric]
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   249
  apply(erule_tac [!] exE)
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   250
  apply(rule_tac [!] x="p \<bullet> pa" in exI)
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   251
  by (auto simp add: fresh_star_permute_iff permute_eqvt[symmetric])
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   252
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   253
quotient_type 
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   254
    'a abs_gen = "(atom set \<times> 'a::pt)" / "alpha_abs"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   255
and 'b abs_res = "(atom set \<times> 'b::pt)" / "alpha_abs_res"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   256
and 'c abs_lst = "(atom list \<times> 'c::pt)" / "alpha_abs_lst"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   257
  apply(rule_tac [!] equivpI)
1440
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   258
  unfolding reflp_def symp_def transp_def
1657
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   259
  by (auto intro: alphas_abs_sym alphas_abs_refl alphas_abs_trans simp only:)
1440
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   260
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   261
quotient_definition
1932
2b0cc308fd6a tuned proofs
Christian Urban <urbanc@in.tum.de>
parents: 1924
diff changeset
   262
  Abs ("[_]set. _" [60, 60] 60)
2b0cc308fd6a tuned proofs
Christian Urban <urbanc@in.tum.de>
parents: 1924
diff changeset
   263
where
1558
a5ba76208983 started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents: 1557
diff changeset
   264
  "Abs::atom set \<Rightarrow> ('a::pt) \<Rightarrow> 'a abs_gen"
1440
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   265
is
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   266
  "Pair::atom set \<Rightarrow> ('a::pt) \<Rightarrow> (atom set \<times> 'a)"
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   267
1657
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   268
quotient_definition
1932
2b0cc308fd6a tuned proofs
Christian Urban <urbanc@in.tum.de>
parents: 1924
diff changeset
   269
  Abs_res ("[_]res. _" [60, 60] 60)
2b0cc308fd6a tuned proofs
Christian Urban <urbanc@in.tum.de>
parents: 1924
diff changeset
   270
where
1657
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   271
  "Abs_res::atom set \<Rightarrow> ('a::pt) \<Rightarrow> 'a abs_res"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   272
is
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   273
  "Pair::atom set \<Rightarrow> ('a::pt) \<Rightarrow> (atom set \<times> 'a)"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   274
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   275
quotient_definition
1932
2b0cc308fd6a tuned proofs
Christian Urban <urbanc@in.tum.de>
parents: 1924
diff changeset
   276
  Abs_lst ("[_]lst. _" [60, 60] 60)
2b0cc308fd6a tuned proofs
Christian Urban <urbanc@in.tum.de>
parents: 1924
diff changeset
   277
where
1657
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   278
  "Abs_lst::atom list \<Rightarrow> ('a::pt) \<Rightarrow> 'a abs_lst"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   279
is
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   280
  "Pair::atom list \<Rightarrow> ('a::pt) \<Rightarrow> (atom list \<times> 'a)"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   281
1440
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   282
lemma [quot_respect]:
1657
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   283
  shows "(op= ===> op= ===> alpha_abs) Pair Pair"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   284
  and   "(op= ===> op= ===> alpha_abs_res) Pair Pair"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   285
  and   "(op= ===> op= ===> alpha_abs_lst) Pair Pair"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   286
  unfolding fun_rel_def
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   287
  by (auto intro: alphas_abs_refl simp only:)
1440
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   288
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   289
lemma [quot_respect]:
1657
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   290
  shows "(op= ===> alpha_abs ===> alpha_abs) permute permute"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   291
  and   "(op= ===> alpha_abs_res ===> alpha_abs_res) permute permute"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   292
  and   "(op= ===> alpha_abs_lst ===> alpha_abs_lst) permute permute"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   293
  unfolding fun_rel_def
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   294
  by (auto intro: alphas_abs_eqvt simp only: Pair_eqvt)
1440
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   295
1686
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   296
lemma abs_exhausts:
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   297
  shows "(\<And>as (x::'a::pt). y1 = Abs as x \<Longrightarrow> P1) \<Longrightarrow> P1"
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   298
  and   "(\<And>as (x::'a::pt). y2 = Abs_res as x \<Longrightarrow> P2) \<Longrightarrow> P2"
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   299
  and   "(\<And>as (x::'a::pt). y3 = Abs_lst as x \<Longrightarrow> P3) \<Longrightarrow> P3"
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   300
  by (lifting prod.exhaust[where 'a="atom set" and 'b="'a"]
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   301
              prod.exhaust[where 'a="atom set" and 'b="'a"]
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   302
              prod.exhaust[where 'a="atom list" and 'b="'a"])
1440
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   303
1662
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   304
lemma abs_eq_iff:
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   305
  shows "Abs bs x = Abs cs y \<longleftrightarrow> (bs, x) \<approx>abs (cs, y)"
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   306
  and   "Abs_res bs x = Abs_res cs y \<longleftrightarrow> (bs, x) \<approx>abs_res (cs, y)"
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   307
  and   "Abs_lst ds x = Abs_lst hs y \<longleftrightarrow> (ds, x) \<approx>abs_lst (hs, y)"
1932
2b0cc308fd6a tuned proofs
Christian Urban <urbanc@in.tum.de>
parents: 1924
diff changeset
   308
  unfolding alphas_abs
2b0cc308fd6a tuned proofs
Christian Urban <urbanc@in.tum.de>
parents: 1924
diff changeset
   309
  by (lifting alphas_abs)
1662
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   310
1558
a5ba76208983 started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents: 1557
diff changeset
   311
instantiation abs_gen :: (pt) pt
1440
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   312
begin
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   313
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   314
quotient_definition
1558
a5ba76208983 started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents: 1557
diff changeset
   315
  "permute_abs_gen::perm \<Rightarrow> ('a::pt abs_gen) \<Rightarrow> 'a abs_gen"
1440
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   316
is
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   317
  "permute:: perm \<Rightarrow> (atom set \<times> 'a::pt) \<Rightarrow> (atom set \<times> 'a::pt)"
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   318
1657
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   319
lemma permute_Abs[simp]:
1558
a5ba76208983 started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents: 1557
diff changeset
   320
  fixes x::"'a::pt"  
1440
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   321
  shows "(p \<bullet> (Abs as x)) = Abs (p \<bullet> as) (p \<bullet> x)"
1657
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   322
  by (lifting permute_prod.simps[where 'a="atom set" and 'b="'a"])
1440
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   323
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   324
instance
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   325
  apply(default)
1686
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   326
  apply(case_tac [!] x rule: abs_exhausts(1))
1657
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   327
  apply(simp_all)
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   328
  done
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   329
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   330
end
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   331
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   332
instantiation abs_res :: (pt) pt
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   333
begin
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   334
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   335
quotient_definition
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   336
  "permute_abs_res::perm \<Rightarrow> ('a::pt abs_res) \<Rightarrow> 'a abs_res"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   337
is
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   338
  "permute:: perm \<Rightarrow> (atom set \<times> 'a::pt) \<Rightarrow> (atom set \<times> 'a::pt)"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   339
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   340
lemma permute_Abs_res[simp]:
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   341
  fixes x::"'a::pt"  
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   342
  shows "(p \<bullet> (Abs_res as x)) = Abs_res (p \<bullet> as) (p \<bullet> x)"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   343
  by (lifting permute_prod.simps[where 'a="atom set" and 'b="'a"])
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   344
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   345
instance
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   346
  apply(default)
1686
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   347
  apply(case_tac [!] x rule: abs_exhausts(2))
1657
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   348
  apply(simp_all)
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   349
  done
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   350
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   351
end
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   352
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   353
instantiation abs_lst :: (pt) pt
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   354
begin
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   355
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   356
quotient_definition
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   357
  "permute_abs_lst::perm \<Rightarrow> ('a::pt abs_lst) \<Rightarrow> 'a abs_lst"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   358
is
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   359
  "permute:: perm \<Rightarrow> (atom list \<times> 'a::pt) \<Rightarrow> (atom list \<times> 'a::pt)"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   360
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   361
lemma permute_Abs_lst[simp]:
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   362
  fixes x::"'a::pt"  
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   363
  shows "(p \<bullet> (Abs_lst as x)) = Abs_lst (p \<bullet> as) (p \<bullet> x)"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   364
  by (lifting permute_prod.simps[where 'a="atom list" and 'b="'a"])
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   365
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   366
instance
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   367
  apply(default)
1686
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   368
  apply(case_tac [!] x rule: abs_exhausts(3))
1440
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   369
  apply(simp_all)
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   370
  done
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   371
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   372
end
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   373
1657
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   374
lemmas permute_abs = permute_Abs permute_Abs_res permute_Abs_lst
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   375
1662
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   376
lemma abs_swap1:
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   377
  assumes a1: "a \<notin> (supp x) - bs"
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   378
  and     a2: "b \<notin> (supp x) - bs"
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   379
  shows "Abs bs x = Abs ((a \<rightleftharpoons> b) \<bullet> bs) ((a \<rightleftharpoons> b) \<bullet> x)"
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   380
  and   "Abs_res bs x = Abs_res ((a \<rightleftharpoons> b) \<bullet> bs) ((a \<rightleftharpoons> b) \<bullet> x)"
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   381
  unfolding abs_eq_iff
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   382
  unfolding alphas_abs
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   383
  unfolding alphas
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   384
  unfolding supp_eqvt[symmetric] Diff_eqvt[symmetric] 
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   385
  unfolding fresh_star_def fresh_def
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   386
  unfolding swap_set_not_in[OF a1 a2] 
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   387
  using a1 a2
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   388
  by (rule_tac [!] x="(a \<rightleftharpoons> b)" in exI)
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   389
     (auto simp add: supp_perm swap_atom)
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   390
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   391
lemma abs_swap2:
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   392
  assumes a1: "a \<notin> (supp x) - (set bs)"
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   393
  and     a2: "b \<notin> (supp x) - (set bs)"
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   394
  shows "Abs_lst bs x = Abs_lst ((a \<rightleftharpoons> b) \<bullet> bs) ((a \<rightleftharpoons> b) \<bullet> x)"
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   395
  unfolding abs_eq_iff
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   396
  unfolding alphas_abs
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   397
  unfolding alphas
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   398
  unfolding supp_eqvt[symmetric] Diff_eqvt[symmetric] set_eqvt[symmetric]
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   399
  unfolding fresh_star_def fresh_def
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   400
  unfolding swap_set_not_in[OF a1 a2]
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   401
  using a1 a2
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   402
  by (rule_tac [!] x="(a \<rightleftharpoons> b)" in exI)
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   403
     (auto simp add: supp_perm swap_atom)
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   404
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   405
lemma abs_supports:
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   406
  shows "((supp x) - as) supports (Abs as x)"
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   407
  and   "((supp x) - as) supports (Abs_res as x)"
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   408
  and   "((supp x) - (set bs)) supports (Abs_lst bs x)"
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   409
  unfolding supports_def
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   410
  unfolding permute_abs
e78cd33a246f more on the paper
Christian Urban <urbanc@in.tum.de>
parents: 1661
diff changeset
   411
  by (simp_all add: abs_swap1[symmetric] abs_swap2[symmetric])
1657
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   412
1686
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   413
function
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   414
  supp_gen  :: "('a::pt) abs_gen \<Rightarrow> atom set"
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   415
where
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   416
  "supp_gen (Abs as x) = supp x - as"
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   417
apply(case_tac x rule: abs_exhausts(1))
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   418
apply(simp)
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   419
apply(simp add: abs_eq_iff alphas_abs alphas)
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   420
done
1657
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   421
1686
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   422
termination supp_gen 
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   423
  by (auto intro!: local.termination)
1440
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   424
1686
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   425
function
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   426
  supp_res :: "('a::pt) abs_res \<Rightarrow> atom set"
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   427
where
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   428
  "supp_res (Abs_res as x) = supp x - as"
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   429
apply(case_tac x rule: abs_exhausts(2))
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   430
apply(simp)
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   431
apply(simp add: abs_eq_iff alphas_abs alphas)
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   432
done
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   433
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   434
termination supp_res 
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   435
  by (auto intro!: local.termination)
1440
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   436
1686
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   437
function
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   438
  supp_lst :: "('a::pt) abs_lst \<Rightarrow> atom set"
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   439
where
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   440
  "supp_lst (Abs_lst cs x) = (supp x) - (set cs)"
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   441
apply(case_tac x rule: abs_exhausts(3))
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   442
apply(simp)
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   443
apply(simp add: abs_eq_iff alphas_abs alphas)
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   444
done
1440
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   445
1686
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   446
termination supp_lst 
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   447
  by (auto intro!: local.termination)
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   448
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   449
lemma [eqvt]:
1657
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   450
  shows "(p \<bullet> supp_gen x) = supp_gen (p \<bullet> x)"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   451
  and   "(p \<bullet> supp_res y) = supp_res (p \<bullet> y)"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   452
  and   "(p \<bullet> supp_lst z) = supp_lst (p \<bullet> z)"
1686
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   453
  apply(case_tac x rule: abs_exhausts(1))
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   454
  apply(simp add: supp_eqvt Diff_eqvt)
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   455
  apply(case_tac y rule: abs_exhausts(2))
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   456
  apply(simp add: supp_eqvt Diff_eqvt)
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   457
  apply(case_tac z rule: abs_exhausts(3))
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   458
  apply(simp add: supp_eqvt Diff_eqvt set_eqvt)
1440
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   459
  done
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   460
1657
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   461
lemma aux_fresh:
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   462
  shows "a \<sharp> Abs bs x \<Longrightarrow> a \<sharp> supp_gen (Abs bs x)"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   463
  and   "a \<sharp> Abs_res bs x \<Longrightarrow> a \<sharp> supp_res (Abs_res bs x)"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   464
  and   "a \<sharp> Abs_lst cs x \<Longrightarrow> a \<sharp> supp_lst (Abs_lst cs x)"
1932
2b0cc308fd6a tuned proofs
Christian Urban <urbanc@in.tum.de>
parents: 1924
diff changeset
   465
  by (rule_tac [!] fresh_fun_eqvt_app)
2b0cc308fd6a tuned proofs
Christian Urban <urbanc@in.tum.de>
parents: 1924
diff changeset
   466
     (simp_all add: eqvts_raw)
1657
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   467
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   468
lemma supp_abs_subset1:
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   469
  assumes a: "finite (supp x)"
1440
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   470
  shows "(supp x) - as \<subseteq> supp (Abs as x)"
1657
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   471
  and   "(supp x) - as \<subseteq> supp (Abs_res as x)"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   472
  and   "(supp x) - (set bs) \<subseteq> supp (Abs_lst bs x)"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   473
  unfolding supp_conv_fresh
1932
2b0cc308fd6a tuned proofs
Christian Urban <urbanc@in.tum.de>
parents: 1924
diff changeset
   474
  by (auto dest!: aux_fresh)
2b0cc308fd6a tuned proofs
Christian Urban <urbanc@in.tum.de>
parents: 1924
diff changeset
   475
     (simp_all add: fresh_def supp_finite_atom_set a)
1440
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   476
1657
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   477
lemma supp_abs_subset2:
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   478
  assumes a: "finite (supp x)"
1440
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   479
  shows "supp (Abs as x) \<subseteq> (supp x) - as"
1657
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   480
  and   "supp (Abs_res as x) \<subseteq> (supp x) - as"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   481
  and   "supp (Abs_lst bs x) \<subseteq> (supp x) - (set bs)"
1932
2b0cc308fd6a tuned proofs
Christian Urban <urbanc@in.tum.de>
parents: 1924
diff changeset
   482
  by (rule_tac [!] supp_is_subset)
2b0cc308fd6a tuned proofs
Christian Urban <urbanc@in.tum.de>
parents: 1924
diff changeset
   483
     (simp_all add: abs_supports a)
1478
1ea4ca823266 added proof of supp/fv for type schemes
Christian Urban <urbanc@in.tum.de>
parents: 1470
diff changeset
   484
1657
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   485
lemma abs_finite_supp:
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   486
  assumes a: "finite (supp x)"
1478
1ea4ca823266 added proof of supp/fv for type schemes
Christian Urban <urbanc@in.tum.de>
parents: 1470
diff changeset
   487
  shows "supp (Abs as x) = (supp x) - as"
1657
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   488
  and   "supp (Abs_res as x) = (supp x) - as"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   489
  and   "supp (Abs_lst bs x) = (supp x) - (set bs)"
1932
2b0cc308fd6a tuned proofs
Christian Urban <urbanc@in.tum.de>
parents: 1924
diff changeset
   490
  by (rule_tac [!] subset_antisym)
2b0cc308fd6a tuned proofs
Christian Urban <urbanc@in.tum.de>
parents: 1924
diff changeset
   491
     (simp_all add: supp_abs_subset1[OF a] supp_abs_subset2[OF a])
1440
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   492
1657
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   493
lemma supp_abs:
1440
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   494
  fixes x::"'a::fs"
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   495
  shows "supp (Abs as x) = (supp x) - as"
1657
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   496
  and   "supp (Abs_res as x) = (supp x) - as"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   497
  and   "supp (Abs_lst bs x) = (supp x) - (set bs)"
1932
2b0cc308fd6a tuned proofs
Christian Urban <urbanc@in.tum.de>
parents: 1924
diff changeset
   498
  by (rule_tac [!] abs_finite_supp)
2b0cc308fd6a tuned proofs
Christian Urban <urbanc@in.tum.de>
parents: 1924
diff changeset
   499
     (simp_all add: finite_supp)
1440
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   500
1558
a5ba76208983 started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents: 1557
diff changeset
   501
instance abs_gen :: (fs) fs
1440
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   502
  apply(default)
1686
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   503
  apply(case_tac x rule: abs_exhausts(1))
1657
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   504
  apply(simp add: supp_abs finite_supp)
1440
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   505
  done
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   506
1657
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   507
instance abs_res :: (fs) fs
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   508
  apply(default)
1686
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   509
  apply(case_tac x rule: abs_exhausts(2))
1657
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   510
  apply(simp add: supp_abs finite_supp)
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   511
  done
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   512
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   513
instance abs_lst :: (fs) fs
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   514
  apply(default)
1686
7b3dd407f6b3 got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents: 1673
diff changeset
   515
  apply(case_tac x rule: abs_exhausts(3))
1657
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   516
  apply(simp add: supp_abs finite_supp)
1440
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   517
  done
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   518
1657
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   519
lemma abs_fresh_iff:
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   520
  fixes x::"'a::fs"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   521
  shows "a \<sharp> Abs bs x \<longleftrightarrow> a \<in> bs \<or> (a \<notin> bs \<and> a \<sharp> x)"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   522
  and   "a \<sharp> Abs_res bs x \<longleftrightarrow> a \<in> bs \<or> (a \<notin> bs \<and> a \<sharp> x)"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   523
  and   "a \<sharp> Abs_lst cs x \<longleftrightarrow> a \<in> (set cs) \<or> (a \<notin> (set cs) \<and> a \<sharp> x)"
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   524
  unfolding fresh_def
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   525
  unfolding supp_abs
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   526
  by auto
1460
0fd03936dedb merge and proof of support for non-recursive case
Christian Urban <urbanc@in.tum.de>
parents: 1451
diff changeset
   527
1657
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   528
section {* BELOW is stuff that may or may not be needed *}
1440
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   529
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   530
lemma supp_atom_image:
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   531
  fixes as::"'a::at_base set"
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   532
  shows "supp (atom ` as) = supp as"
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   533
apply(simp add: supp_def)
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   534
apply(simp add: image_eqvt)
1933
9eab1dfc14d2 moved lemmas from FSet.thy to do with atom to Nominal2_Base, and to do with 'a::at set to Nominal2_Atoms; moved Nominal2_Eqvt.thy one up to be loaded before Nominal2_Atoms
Christian Urban <urbanc@in.tum.de>
parents: 1932
diff changeset
   535
apply(simp add: eqvts_raw)
1440
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   536
apply(simp add: atom_image_cong)
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   537
done
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   538
2324
9038c9549073 deleted compose-lemmas in Abs (not needed anymore)
Christian Urban <urbanc@in.tum.de>
parents: 2313
diff changeset
   539
lemma swap_atom_image_fresh: 
9038c9549073 deleted compose-lemmas in Abs (not needed anymore)
Christian Urban <urbanc@in.tum.de>
parents: 2313
diff changeset
   540
  "\<lbrakk>a \<sharp> atom ` (fn :: ('a :: at_base set)); b \<sharp> atom ` fn\<rbrakk> \<Longrightarrow> (a \<rightleftharpoons> b) \<bullet> fn = fn"
1460
0fd03936dedb merge and proof of support for non-recursive case
Christian Urban <urbanc@in.tum.de>
parents: 1451
diff changeset
   541
  apply (simp add: fresh_def)
0fd03936dedb merge and proof of support for non-recursive case
Christian Urban <urbanc@in.tum.de>
parents: 1451
diff changeset
   542
  apply (simp add: supp_atom_image)
0fd03936dedb merge and proof of support for non-recursive case
Christian Urban <urbanc@in.tum.de>
parents: 1451
diff changeset
   543
  apply (fold fresh_def)
0fd03936dedb merge and proof of support for non-recursive case
Christian Urban <urbanc@in.tum.de>
parents: 1451
diff changeset
   544
  apply (simp add: swap_fresh_fresh)
1440
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   545
  done
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   546
1467
77b86f1fc936 Lifting theorems with compound fv and compound alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1460
diff changeset
   547
(* TODO: The following lemmas can be moved somewhere... *)
1657
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   548
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   549
lemma Abs_eq_iff:
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   550
  shows "Abs bs x = Abs cs y \<longleftrightarrow> (\<exists>p. (bs, x) \<approx>gen (op =) supp p (cs, y))"
1675
d24f59f78a86 Generalize Abs_eq_iff.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1673
diff changeset
   551
  and   "Abs_res bs x = Abs_res cs y \<longleftrightarrow> (\<exists>p. (bs, x) \<approx>res (op =) supp p (cs, y))"
d24f59f78a86 Generalize Abs_eq_iff.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1673
diff changeset
   552
  and   "Abs_lst bsl x = Abs_lst csl y \<longleftrightarrow> (\<exists>p. (bsl, x) \<approx>lst (op =) supp p (csl, y))"
d24f59f78a86 Generalize Abs_eq_iff.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1673
diff changeset
   553
  by (lifting alphas_abs)
1657
Christian Urban <urbanc@in.tum.de>
parents: 1588
diff changeset
   554
1467
77b86f1fc936 Lifting theorems with compound fv and compound alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1460
diff changeset
   555
lemma split_rsp2[quot_respect]: "((R1 ===> R2 ===> prod_rel R1 R2 ===> op =) ===>
77b86f1fc936 Lifting theorems with compound fv and compound alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1460
diff changeset
   556
  prod_rel R1 R2 ===> prod_rel R1 R2 ===> op =) split split"
77b86f1fc936 Lifting theorems with compound fv and compound alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1460
diff changeset
   557
  by auto
77b86f1fc936 Lifting theorems with compound fv and compound alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1460
diff changeset
   558
77b86f1fc936 Lifting theorems with compound fv and compound alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1460
diff changeset
   559
lemma split_prs2[quot_preserve]:
77b86f1fc936 Lifting theorems with compound fv and compound alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1460
diff changeset
   560
  assumes q1: "Quotient R1 Abs1 Rep1"
77b86f1fc936 Lifting theorems with compound fv and compound alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1460
diff changeset
   561
  and q2: "Quotient R2 Abs2 Rep2"
77b86f1fc936 Lifting theorems with compound fv and compound alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1460
diff changeset
   562
  shows "((Abs1 ---> Abs2 ---> prod_fun Abs1 Abs2 ---> id) ---> prod_fun Rep1 Rep2 ---> prod_fun Rep1 Rep2 ---> id) split = split"
77b86f1fc936 Lifting theorems with compound fv and compound alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1460
diff changeset
   563
  by (simp add: expand_fun_eq Quotient_abs_rep[OF q1] Quotient_abs_rep[OF q2])
77b86f1fc936 Lifting theorems with compound fv and compound alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1460
diff changeset
   564
1673
e8cf0520c820 New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1666
diff changeset
   565
lemma alphas2:
1467
77b86f1fc936 Lifting theorems with compound fv and compound alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1460
diff changeset
   566
  "(bs, x1, x2) \<approx>gen (\<lambda>(x1, y1) (x2, y2). R1 x1 x2 \<and> R2 y1 y2) (\<lambda>(a, b). f1 a \<union> f2 b) pi (cs, y1, y2) =
1470
3127c75275a6 Fix for the change of alpha_gen.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1469
diff changeset
   567
  (f1 x1 \<union> f2 x2 - bs = f1 y1 \<union> f2 y2 - cs \<and> (f1 x1 \<union> f2 x2 - bs) \<sharp>* pi \<and> R1 (pi \<bullet> x1) y1 \<and> R2 (pi \<bullet> x2) y2
3127c75275a6 Fix for the change of alpha_gen.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1469
diff changeset
   568
  \<and> pi \<bullet> bs = cs)"
1673
e8cf0520c820 New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1666
diff changeset
   569
  "(bs, x1, x2) \<approx>res (\<lambda>(x1, y1) (x2, y2). R1 x1 x2 \<and> R2 y1 y2) (\<lambda>(a, b). f1 a \<union> f2 b) pi (cs, y1, y2) =
e8cf0520c820 New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1666
diff changeset
   570
  (f1 x1 \<union> f2 x2 - bs = f1 y1 \<union> f2 y2 - cs \<and> (f1 x1 \<union> f2 x2 - bs) \<sharp>* pi \<and> R1 (pi \<bullet> x1) y1 \<and> R2 (pi \<bullet> x2) y2)"
e8cf0520c820 New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1666
diff changeset
   571
  "(bsl, x1, x2) \<approx>lst (\<lambda>(x1, y1) (x2, y2). R1 x1 x2 \<and> R2 y1 y2) (\<lambda>(a, b). f1 a \<union> f2 b) pi (csl, y1, y2) =
e8cf0520c820 New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1666
diff changeset
   572
  (f1 x1 \<union> f2 x2 - set bsl = f1 y1 \<union> f2 y2 - set csl \<and> (f1 x1 \<union> f2 x2 - set bsl) \<sharp>* pi \<and> R1 (pi \<bullet> x1) y1 \<and> R2 (pi \<bullet> x2) y2
e8cf0520c820 New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1666
diff changeset
   573
  \<and> pi \<bullet> bsl = csl)"
e8cf0520c820 New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1666
diff changeset
   574
by (simp_all add: alphas)
1544
c6849a634582 Keep only one copy of infinite_Un.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1543
diff changeset
   575
1744
00680cea0dde Let with multiple bindings.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1691
diff changeset
   576
lemma alphas3:
00680cea0dde Let with multiple bindings.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1691
diff changeset
   577
  "(bsl, x1, x2, x3) \<approx>lst (\<lambda>(x1, y1, z1) (x2, y2, z2). R1 x1 x2 \<and> R2 y1 y2 \<and> R3 z1 z2) (\<lambda>(a, b, c). f1 a \<union> (f2 b \<union> f3 c)) pi (csl, y1, y2, y3) = (f1 x1 \<union> (f2 x2 \<union> f3 x3) - set bsl = f1 y1 \<union> (f2 y2 \<union> f3 y3) - set csl \<and>
00680cea0dde Let with multiple bindings.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1691
diff changeset
   578
     (f1 x1 \<union> (f2 x2 \<union> f3 x3) - set bsl) \<sharp>* pi \<and>
00680cea0dde Let with multiple bindings.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1691
diff changeset
   579
     R1 (pi \<bullet> x1) y1 \<and> R2 (pi \<bullet> x2) y2 \<and> R3 (pi \<bullet> x3) y3 \<and> pi \<bullet> bsl = csl)"
00680cea0dde Let with multiple bindings.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1691
diff changeset
   580
by (simp add: alphas)
00680cea0dde Let with multiple bindings.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1691
diff changeset
   581
1691
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   582
lemma alpha_gen_simpler:
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   583
  assumes fv_rsp: "\<And>x y. R y x \<Longrightarrow> f x = f y"
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   584
  and fin_fv: "finite (f x)"
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   585
  and fv_eqvt: "pi \<bullet> f x = f (pi \<bullet> x)"
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   586
  shows "alpha_gen (bs, x) R f pi (cs, y) \<longleftrightarrow>
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   587
     (f x - bs) \<sharp>* pi \<and>
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   588
     R (pi \<bullet> x) y \<and>
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   589
     pi \<bullet> bs = cs"
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   590
  apply rule
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   591
  unfolding alpha_gen
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   592
  apply clarify
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   593
  apply (erule conjE)+
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   594
  apply (simp)
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   595
  apply (subgoal_tac "f y - cs = pi \<bullet> (f x - bs)")
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   596
  apply (rule sym)
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   597
  apply simp
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   598
  apply (rule supp_perm_eq)
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   599
  apply (subst supp_finite_atom_set)
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   600
  apply (rule finite_Diff)
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   601
  apply (rule fin_fv)
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   602
  apply (assumption)
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   603
  apply (simp add: eqvts fv_eqvt)
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   604
  apply (subst fv_rsp)
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   605
  apply assumption
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   606
  apply (simp)
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   607
  done
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   608
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   609
lemma alpha_lst_simpler:
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   610
  assumes fv_rsp: "\<And>x y. R y x \<Longrightarrow> f x = f y"
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   611
  and fin_fv: "finite (f x)"
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   612
  and fv_eqvt: "pi \<bullet> f x = f (pi \<bullet> x)"
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   613
  shows "alpha_lst (bs, x) R f pi (cs, y) \<longleftrightarrow>
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   614
     (f x - set bs) \<sharp>* pi \<and>
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   615
     R (pi \<bullet> x) y \<and>
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   616
     pi \<bullet> bs = cs"
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   617
  apply rule
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   618
  unfolding alpha_lst
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   619
  apply clarify
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   620
  apply (erule conjE)+
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   621
  apply (simp)
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   622
  apply (subgoal_tac "f y - set cs = pi \<bullet> (f x - set bs)")
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   623
  apply (rule sym)
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   624
  apply simp
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   625
  apply (rule supp_perm_eq)
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   626
  apply (subst supp_finite_atom_set)
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   627
  apply (rule finite_Diff)
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   628
  apply (rule fin_fv)
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   629
  apply (assumption)
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   630
  apply (simp add: eqvts fv_eqvt)
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   631
  apply (subst fv_rsp)
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   632
  apply assumption
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   633
  apply (simp)
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   634
  done
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   635
2068
79b733010bc5 prod_fv and its respectfullness and preservation.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1933
diff changeset
   636
fun
79b733010bc5 prod_fv and its respectfullness and preservation.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1933
diff changeset
   637
  prod_fv :: "('a \<Rightarrow> atom set) \<Rightarrow> ('b \<Rightarrow> atom set) \<Rightarrow> ('a \<times> 'b) \<Rightarrow> atom set"
79b733010bc5 prod_fv and its respectfullness and preservation.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1933
diff changeset
   638
where
79b733010bc5 prod_fv and its respectfullness and preservation.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1933
diff changeset
   639
  "prod_fv fvx fvy (x, y) = (fvx x \<union> fvy y)"
79b733010bc5 prod_fv and its respectfullness and preservation.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1933
diff changeset
   640
2296
45a69c9cc4cc alpha works now
Christian Urban <urbanc@in.tum.de>
parents: 2124
diff changeset
   641
definition 
45a69c9cc4cc alpha works now
Christian Urban <urbanc@in.tum.de>
parents: 2124
diff changeset
   642
  prod_alpha :: "('a \<Rightarrow> 'a \<Rightarrow> bool) \<Rightarrow> ('b \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> ('a \<times> 'b \<Rightarrow> 'a \<times> 'b \<Rightarrow> bool)"
45a69c9cc4cc alpha works now
Christian Urban <urbanc@in.tum.de>
parents: 2124
diff changeset
   643
where
45a69c9cc4cc alpha works now
Christian Urban <urbanc@in.tum.de>
parents: 2124
diff changeset
   644
 "prod_alpha = prod_rel"
45a69c9cc4cc alpha works now
Christian Urban <urbanc@in.tum.de>
parents: 2124
diff changeset
   645
45a69c9cc4cc alpha works now
Christian Urban <urbanc@in.tum.de>
parents: 2124
diff changeset
   646
2068
79b733010bc5 prod_fv and its respectfullness and preservation.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1933
diff changeset
   647
lemma [quot_respect]:
2296
45a69c9cc4cc alpha works now
Christian Urban <urbanc@in.tum.de>
parents: 2124
diff changeset
   648
  shows "((R1 ===> op =) ===> (R2 ===> op =) ===> prod_rel R1 R2 ===> op =) prod_fv prod_fv"
2068
79b733010bc5 prod_fv and its respectfullness and preservation.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1933
diff changeset
   649
  by auto
79b733010bc5 prod_fv and its respectfullness and preservation.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1933
diff changeset
   650
79b733010bc5 prod_fv and its respectfullness and preservation.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1933
diff changeset
   651
lemma [quot_preserve]:
79b733010bc5 prod_fv and its respectfullness and preservation.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1933
diff changeset
   652
  assumes q1: "Quotient R1 abs1 rep1"
79b733010bc5 prod_fv and its respectfullness and preservation.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1933
diff changeset
   653
  and     q2: "Quotient R2 abs2 rep2"
79b733010bc5 prod_fv and its respectfullness and preservation.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1933
diff changeset
   654
  shows "((abs1 ---> id) ---> (abs2 ---> id) ---> prod_fun rep1 rep2 ---> id) prod_fv = prod_fv"
79b733010bc5 prod_fv and its respectfullness and preservation.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1933
diff changeset
   655
  by (simp add: expand_fun_eq Quotient_abs_rep[OF q1] Quotient_abs_rep[OF q2])
1691
b497ac81aead Abs_gen and Abs_let simplifications.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1688
diff changeset
   656
2296
45a69c9cc4cc alpha works now
Christian Urban <urbanc@in.tum.de>
parents: 2124
diff changeset
   657
lemma [mono]: 
2302
c6db12ddb60c intermediate state
Christian Urban <urbanc@in.tum.de>
parents: 2296
diff changeset
   658
  shows "A <= B \<Longrightarrow> C <= D ==> prod_alpha A C <= prod_alpha B D"
c6db12ddb60c intermediate state
Christian Urban <urbanc@in.tum.de>
parents: 2296
diff changeset
   659
  unfolding prod_alpha_def
2092
c0ab7451b20d prod_rel and prod_fv eqvt and mono
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 2068
diff changeset
   660
  by auto
c0ab7451b20d prod_rel and prod_fv eqvt and mono
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 2068
diff changeset
   661
2124
a17b25cb94a6 tuned eqvt-proofs about prod_rel and prod_fv
Christian Urban <urbanc@in.tum.de>
parents: 2104
diff changeset
   662
lemma [eqvt]: 
2296
45a69c9cc4cc alpha works now
Christian Urban <urbanc@in.tum.de>
parents: 2124
diff changeset
   663
  shows "p \<bullet> prod_alpha A B x y = prod_alpha (p \<bullet> A) (p \<bullet> B) (p \<bullet> x) (p \<bullet> y)"
45a69c9cc4cc alpha works now
Christian Urban <urbanc@in.tum.de>
parents: 2124
diff changeset
   664
  unfolding prod_alpha_def
2124
a17b25cb94a6 tuned eqvt-proofs about prod_rel and prod_fv
Christian Urban <urbanc@in.tum.de>
parents: 2104
diff changeset
   665
  unfolding prod_rel.simps
a17b25cb94a6 tuned eqvt-proofs about prod_rel and prod_fv
Christian Urban <urbanc@in.tum.de>
parents: 2104
diff changeset
   666
  by (perm_simp) (rule refl)
2092
c0ab7451b20d prod_rel and prod_fv eqvt and mono
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 2068
diff changeset
   667
2124
a17b25cb94a6 tuned eqvt-proofs about prod_rel and prod_fv
Christian Urban <urbanc@in.tum.de>
parents: 2104
diff changeset
   668
lemma [eqvt]: 
a17b25cb94a6 tuned eqvt-proofs about prod_rel and prod_fv
Christian Urban <urbanc@in.tum.de>
parents: 2104
diff changeset
   669
  shows "p \<bullet> prod_fv A B (x, y) = prod_fv (p \<bullet> A) (p \<bullet> B) (p \<bullet> x, p \<bullet> y)"
a17b25cb94a6 tuned eqvt-proofs about prod_rel and prod_fv
Christian Urban <urbanc@in.tum.de>
parents: 2104
diff changeset
   670
  unfolding prod_fv.simps
a17b25cb94a6 tuned eqvt-proofs about prod_rel and prod_fv
Christian Urban <urbanc@in.tum.de>
parents: 2104
diff changeset
   671
  by (perm_simp) (rule refl)
2092
c0ab7451b20d prod_rel and prod_fv eqvt and mono
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 2068
diff changeset
   672
2302
c6db12ddb60c intermediate state
Christian Urban <urbanc@in.tum.de>
parents: 2296
diff changeset
   673
1440
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   674
end
ffd5540ac2e9 added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   675