Quot/Examples/SigmaEx.thy
author Cezary Kaliszyk <kaliszyk@in.tum.de>
Tue, 26 Jan 2010 16:30:51 +0100
changeset 946 46cc6708c3b3
parent 945 de9e5faf1f03
child 980 9d35c6145dd2
permissions -rw-r--r--
Bex1_Bexeq_regular.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
905
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     1
theory SigmaEx
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     2
imports Nominal "../QuotMain" "../QuotList" "../QuotProd"
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     3
begin
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     4
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     5
atom_decl name
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     6
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     7
datatype robj =
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     8
  rVar "name"
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     9
| rObj "(string \<times> rmethod) list"
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    10
| rInv "robj" "string"
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    11
| rUpd "robj" "string" "rmethod"
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    12
and rmethod =
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    13
  rSig "name" "robj"
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    14
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    15
inductive
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    16
    alpha_obj :: "robj \<Rightarrow> robj \<Rightarrow> bool" ("_ \<approx>o _" [100, 100] 100)
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    17
and alpha_method :: "rmethod \<Rightarrow> rmethod \<Rightarrow> bool" ("_ \<approx>m _" [100, 100] 100)
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    18
where
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    19
  a1: "a = b \<Longrightarrow> (rVar a) \<approx>o (rVar b)"
914
b8e43414c5aa Proper alpha equivalence for Sigma calculus.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 912
diff changeset
    20
| a2: "rObj [] \<approx>o rObj []"
b8e43414c5aa Proper alpha equivalence for Sigma calculus.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 912
diff changeset
    21
| a3: "rObj t1 \<approx>o rObj t2 \<Longrightarrow> m1 \<approx>m r2 \<Longrightarrow> rObj ((l1, m1) # t1) \<approx>o rObj ((l2, m2) # t2)"
b8e43414c5aa Proper alpha equivalence for Sigma calculus.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 912
diff changeset
    22
| a4: "x \<approx>o y \<Longrightarrow> rInv x l1 \<approx>o rInv y l2"
b8e43414c5aa Proper alpha equivalence for Sigma calculus.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 912
diff changeset
    23
| a5: "\<exists>pi::name prm. (rfv t - {a} = rfv s - {b} \<and> (rfv t - {a})\<sharp>* pi \<and> (pi \<bullet> t) \<approx>o s \<and> (pi \<bullet> a) = b)
b8e43414c5aa Proper alpha equivalence for Sigma calculus.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 912
diff changeset
    24
       \<Longrightarrow> rSig a t \<approx>m rSig b s"
905
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    25
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    26
lemma alpha_equivps:
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    27
  shows "equivp alpha_obj"
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    28
  and   "equivp alpha_method"
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    29
sorry
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    30
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    31
quotient_type
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    32
    obj = robj / alpha_obj
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    33
and method = rmethod / alpha_method
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    34
  by (auto intro: alpha_equivps)
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    35
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    36
quotient_definition
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    37
  "Var :: name \<Rightarrow> obj"
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    38
as
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    39
  "rVar"
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    40
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    41
quotient_definition
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    42
  "Obj :: (string \<times> method) list \<Rightarrow> obj"
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    43
as
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    44
  "rObj"
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    45
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    46
quotient_definition
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    47
  "Inv :: obj \<Rightarrow> string \<Rightarrow> obj"
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    48
as
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    49
  "rInv"
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    50
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    51
quotient_definition
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    52
  "Upd :: obj \<Rightarrow> string \<Rightarrow> method \<Rightarrow> obj"
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    53
as
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    54
  "rUpd"
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    55
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    56
quotient_definition
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    57
  "Sig :: name \<Rightarrow> obj \<Rightarrow> method"
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    58
as
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    59
  "rSig"
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    60
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    61
overloading
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    62
  perm_obj \<equiv> "perm :: 'x prm \<Rightarrow> obj \<Rightarrow> obj" (unchecked)
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    63
  perm_method   \<equiv> "perm :: 'x prm \<Rightarrow> method \<Rightarrow> method" (unchecked)
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    64
begin
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    65
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    66
quotient_definition
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    67
  "perm_obj :: 'x prm \<Rightarrow> obj \<Rightarrow> obj"
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    68
as
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    69
  "(perm::'x prm \<Rightarrow> robj \<Rightarrow> robj)"
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    70
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    71
quotient_definition
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    72
  "perm_method :: 'x prm \<Rightarrow> method \<Rightarrow> method"
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    73
as
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    74
  "(perm::'x prm \<Rightarrow> rmethod \<Rightarrow> rmethod)"
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    75
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    76
end
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    77
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    78
lemma tolift:
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    79
"\<forall> fvar.
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    80
 \<forall> fobj\<in>Respects (op = ===> list_rel (prod_rel (op =) alpha_method) ===> op =).
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    81
 \<forall> fnvk\<in>Respects (op = ===> alpha_obj ===> op =).
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    82
 \<forall> fupd\<in>Respects (op = ===> op = ===> alpha_obj ===> op = ===> alpha_method ===> op =).
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    83
 \<forall> fcns\<in>Respects (op = ===> op = ===> prod_rel (op =) alpha_method ===> list_rel (prod_rel (op =) alpha_method) ===> op =).
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    84
 \<forall> fnil.
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    85
 \<forall> fpar\<in>Respects (op = ===> op = ===> alpha_method ===> op =).
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    86
 \<forall> fsgm\<in>Respects (op = ===> (op = ===> alpha_obj) ===> op =).
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    87
946
46cc6708c3b3 Bex1_Bexeq_regular.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 945
diff changeset
    88
 Bex1
46cc6708c3b3 Bex1_Bexeq_regular.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 945
diff changeset
    89
   (Respects (prod_rel (alpha_obj ===> op =)
905
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    90
     (prod_rel (list_rel (prod_rel (op =) alpha_method) ===> op =)
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    91
       (prod_rel ((prod_rel (op =) alpha_method) ===> op =)
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    92
         (alpha_method ===> op =)
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    93
       )
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    94
     )
946
46cc6708c3b3 Bex1_Bexeq_regular.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 945
diff changeset
    95
   ))
945
de9e5faf1f03 Hom Theorem with exists unique
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 944
diff changeset
    96
(\<lambda> (hom_o\<Colon>robj \<Rightarrow> 'a, hom_d\<Colon>(char list \<times> rmethod) list \<Rightarrow> 'b, hom_e\<Colon>char list \<times> rmethod \<Rightarrow> 'c, hom_m\<Colon>rmethod \<Rightarrow> 'd).
905
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    97
945
de9e5faf1f03 Hom Theorem with exists unique
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 944
diff changeset
    98
905
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    99
 (\<forall>x. hom_o (rVar x) = fvar x) \<and>
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   100
 (\<forall>d. hom_o (rObj d) = fobj (hom_d d) d) \<and>
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   101
 (\<forall>a l. hom_o (rInv a l) = fnvk (hom_o a) a l) \<and>
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   102
 (\<forall>a l m. hom_o (rUpd a l m) = fupd (hom_o a) (hom_m m) a l m) \<and>
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   103
 (\<forall>e d. hom_d (e # d) = fcns (hom_e e) (hom_d d) e d) \<and>
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   104
 (hom_d [] = fnil) \<and>
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   105
 (\<forall>l m. hom_e (l, m) = fpar (hom_m m) l m) \<and>
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   106
 (\<forall>x a. hom_m (rSig x a) = fsgm (\<lambda>y. hom_o ([(x, y)] \<bullet> a)) (\<lambda>y. [(x, y)] \<bullet> a))
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   107
)"
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   108
sorry
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   109
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   110
syntax
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   111
  "_expttrn"        :: "pttrn => bool => bool"      ("(3\<exists>\<exists> _./ _)" [0, 10] 10)
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   112
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   113
translations
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   114
  "\<exists>\<exists> x. P"   == "Ex (%x. P)"
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   115
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   116
lemma rvar_rsp[quot_respect]: "(op = ===> alpha_obj) rVar rVar"
938
0ff855a6ffb7 Sigma cleaning works with split_prs (still manual proof).
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 918
diff changeset
   117
  by (simp add: a1)
905
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   118
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   119
lemma robj_rsp[quot_respect]: "(list_rel (prod_rel op = alpha_method) ===> alpha_obj) rObj rObj"
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   120
sorry
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   121
lemma rinv_rsp[quot_respect]: "(alpha_obj ===> op = ===> alpha_obj) rInv rInv"
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   122
sorry
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   123
lemma rupd_rsp[quot_respect]: "(alpha_obj ===> op = ===> alpha_method ===> alpha_obj) rUpd rUpd"
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   124
sorry
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   125
lemma rsig_rsp[quot_respect]: "(op = ===> alpha_obj ===> alpha_method) rSig rSig"
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   126
sorry
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   127
lemma operm_rsp[quot_respect]: "(op = ===> alpha_obj ===> alpha_obj) op \<bullet> op \<bullet>"
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   128
sorry
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   129
918
7be9b054f672 test with splits
Christian Urban <urbanc@in.tum.de>
parents: 914
diff changeset
   130
  
946
46cc6708c3b3 Bex1_Bexeq_regular.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 945
diff changeset
   131
lemma bex1_bex1reg: "(\<exists>!x\<in>Respects R. P x) \<longrightarrow> (Bexeq R (\<lambda>x. P x))"
46cc6708c3b3 Bex1_Bexeq_regular.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 945
diff changeset
   132
apply (simp add: Bex1_def Ex1_def Bexeq_def in_respects)
46cc6708c3b3 Bex1_Bexeq_regular.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 945
diff changeset
   133
apply clarify
46cc6708c3b3 Bex1_Bexeq_regular.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 945
diff changeset
   134
apply auto
46cc6708c3b3 Bex1_Bexeq_regular.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 945
diff changeset
   135
apply (rule bexI)
46cc6708c3b3 Bex1_Bexeq_regular.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 945
diff changeset
   136
apply assumption
46cc6708c3b3 Bex1_Bexeq_regular.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 945
diff changeset
   137
apply (simp add: in_respects)
46cc6708c3b3 Bex1_Bexeq_regular.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 945
diff changeset
   138
apply (simp add: in_respects)
46cc6708c3b3 Bex1_Bexeq_regular.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 945
diff changeset
   139
apply auto
46cc6708c3b3 Bex1_Bexeq_regular.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 945
diff changeset
   140
done
918
7be9b054f672 test with splits
Christian Urban <urbanc@in.tum.de>
parents: 914
diff changeset
   141
905
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   142
lemma liftd: "
945
de9e5faf1f03 Hom Theorem with exists unique
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 944
diff changeset
   143
Ex1 (\<lambda>(hom_o, hom_d, hom_e, hom_m).
de9e5faf1f03 Hom Theorem with exists unique
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 944
diff changeset
   144
905
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   145
 (\<forall>x. hom_o (Var x) = fvar x) \<and>
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   146
 (\<forall>d. hom_o (Obj d) = fobj (hom_d d) d) \<and>
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   147
 (\<forall>a l. hom_o (Inv a l) = fnvk (hom_o a) a l) \<and>
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   148
 (\<forall>a l m. hom_o (Upd a l m) = fupd (hom_o a) (hom_m m) a l m) \<and>
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   149
 (\<forall>e d. hom_d (e # d) = fcns (hom_e e) (hom_d d) e d) \<and>
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   150
 (hom_d [] = fnil) \<and>
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   151
 (\<forall>l m. hom_e (l, m) = fpar (hom_m m) l m) \<and>
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   152
 (\<forall>x a. hom_m (Sig x a) = fsgm (\<lambda>y. hom_o ([(x, y)] \<bullet> a)) (\<lambda>y. [(x, y)] \<bullet> a))
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   153
)"
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   154
apply (lifting tolift)
944
6267ad688ea8 2 cases for regularize with split, lemmas with split now lift.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 940
diff changeset
   155
done
905
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   156
945
de9e5faf1f03 Hom Theorem with exists unique
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 944
diff changeset
   157
done
de9e5faf1f03 Hom Theorem with exists unique
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 944
diff changeset
   158
905
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   159
lemma tolift':
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   160
"\<forall> fvar.
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   161
 \<forall> fobj\<in>Respects (op = ===> list_rel (prod_rel (op =) alpha_method) ===> op =).
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   162
 \<forall> fnvk\<in>Respects (op = ===> alpha_obj ===> op =).
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   163
 \<forall> fupd\<in>Respects (op = ===> op = ===> alpha_obj ===> op = ===> alpha_method ===> op =).
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   164
 \<forall> fcns\<in>Respects (op = ===> op = ===> prod_rel (op =) alpha_method ===> list_rel (prod_rel (op =) alpha_method) ===> op =).
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   165
 \<forall> fnil.
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   166
 \<forall> fpar\<in>Respects (op = ===> op = ===> alpha_method ===> op =).
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   167
 \<forall> fsgm\<in>Respects (op = ===> (op = ===> alpha_obj) ===> op =).
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   168
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   169
 \<exists> hom_o\<Colon>robj \<Rightarrow> 'a \<in> Respects (alpha_obj ===> op =).
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   170
 \<exists> hom_d\<Colon>(char list \<times> rmethod) list \<Rightarrow> 'b \<in> Respects (list_rel (prod_rel (op =) alpha_method) ===> op =).
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   171
 \<exists> hom_e\<Colon>char list \<times> rmethod \<Rightarrow> 'c \<in> Respects ((prod_rel (op =) alpha_method) ===> op =).
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   172
 \<exists> hom_m\<Colon>rmethod \<Rightarrow> 'd \<in> Respects (alpha_method ===> op =).
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   173
(
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   174
 (\<forall>x. hom_o (rVar x) = fvar x) \<and>
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   175
 (\<forall>d. hom_o (rObj d) = fobj (hom_d d) d) \<and>
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   176
 (\<forall>a l. hom_o (rInv a l) = fnvk (hom_o a) a l) \<and>
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   177
 (\<forall>a l m. hom_o (rUpd a l m) = fupd (hom_o a) (hom_m m) a l m) \<and>
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   178
 (\<forall>e d. hom_d (e # d) = fcns (hom_e e) (hom_d d) e d) \<and>
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   179
 (hom_d [] = fnil) \<and>
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   180
 (\<forall>l m. hom_e (l, m) = fpar (hom_m m) l m) \<and>
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   181
 (\<forall>x a. hom_m (rSig x a) = fsgm (\<lambda>y. hom_o ([(x, y)] \<bullet> a)) (\<lambda>y. [(x, y)] \<bullet> a))
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   182
)"
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   183
sorry
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   184
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   185
lemma liftd': "
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   186
\<exists>hom_o. \<exists>hom_d. \<exists>hom_e. \<exists>hom_m.
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   187
(
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   188
 (\<forall>x. hom_o (Var x) = fvar x) \<and>
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   189
 (\<forall>d. hom_o (Obj d) = fobj (hom_d d) d) \<and>
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   190
 (\<forall>a l. hom_o (Inv a l) = fnvk (hom_o a) a l) \<and>
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   191
 (\<forall>a l m. hom_o (Upd a l m) = fupd (hom_o a) (hom_m m) a l m) \<and>
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   192
 (\<forall>e d. hom_d (e # d) = fcns (hom_e e) (hom_d d) e d) \<and>
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   193
 (hom_d [] = fnil) \<and>
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   194
 (\<forall>l m. hom_e (l, m) = fpar (hom_m m) l m) \<and>
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   195
 (\<forall>x a. hom_m (Sig x a) = fsgm (\<lambda>y. hom_o ([(x, y)] \<bullet> a)) (\<lambda>y. [(x, y)] \<bullet> a))
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   196
)"
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   197
apply (lifting tolift')
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   198
done
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   199
912
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   200
lemma tolift'':
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   201
"\<forall> fvar.
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   202
 \<forall> fobj\<in>Respects (op = ===> list_rel (prod_rel (op =) alpha_method) ===> op =).
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   203
 \<forall> fnvk\<in>Respects (op = ===> alpha_obj ===> op =).
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   204
 \<forall> fupd\<in>Respects (op = ===> op = ===> alpha_obj ===> op = ===> alpha_method ===> op =).
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   205
 \<forall> fcns\<in>Respects (op = ===> op = ===> prod_rel (op =) alpha_method ===> list_rel (prod_rel (op =) alpha_method) ===> op =).
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   206
 \<forall> fnil.
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   207
 \<forall> fpar\<in>Respects (op = ===> op = ===> alpha_method ===> op =).
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   208
 \<forall> fsgm\<in>Respects (op = ===> (op = ===> alpha_obj) ===> op =).
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   209
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   210
 Bexeq (alpha_obj ===> op =) (\<lambda>hom_o\<Colon>robj \<Rightarrow> 'a .
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   211
 Bexeq (list_rel (prod_rel (op =) alpha_method) ===> op =) (\<lambda>hom_d\<Colon>(char list \<times> rmethod) list \<Rightarrow> 'b.
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   212
 Bexeq ((prod_rel (op =) alpha_method) ===> op =) (\<lambda>hom_e\<Colon>char list \<times> rmethod \<Rightarrow> 'c.
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   213
 Bexeq (alpha_method ===> op =) (\<lambda>hom_m\<Colon>rmethod \<Rightarrow> 'd.
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   214
(
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   215
 (\<forall>x. hom_o (rVar x) = fvar x) \<and>
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   216
 (\<forall>d. hom_o (rObj d) = fobj (hom_d d) d) \<and>
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   217
 (\<forall>a l. hom_o (rInv a l) = fnvk (hom_o a) a l) \<and>
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   218
 (\<forall>a l m. hom_o (rUpd a l m) = fupd (hom_o a) (hom_m m) a l m) \<and>
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   219
 (\<forall>e d. hom_d (e # d) = fcns (hom_e e) (hom_d d) e d) \<and>
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   220
 (hom_d [] = fnil) \<and>
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   221
 (\<forall>l m. hom_e (l, m) = fpar (hom_m m) l m) \<and>
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   222
 (\<forall>x a. hom_m (rSig x a) = fsgm (\<lambda>y. hom_o ([(x, y)] \<bullet> a)) (\<lambda>y. [(x, y)] \<bullet> a))
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   223
)
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   224
))))"
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   225
sorry
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   226
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   227
lemma liftd'': "
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   228
\<exists>!hom_o. \<exists>!hom_d. \<exists>!hom_e. \<exists>!hom_m.
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   229
(
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   230
 (\<forall>x. hom_o (Var x) = fvar x) \<and>
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   231
 (\<forall>d. hom_o (Obj d) = fobj (hom_d d) d) \<and>
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   232
 (\<forall>a l. hom_o (Inv a l) = fnvk (hom_o a) a l) \<and>
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   233
 (\<forall>a l m. hom_o (Upd a l m) = fupd (hom_o a) (hom_m m) a l m) \<and>
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   234
 (\<forall>e d. hom_d (e # d) = fcns (hom_e e) (hom_d d) e d) \<and>
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   235
 (hom_d [] = fnil) \<and>
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   236
 (\<forall>l m. hom_e (l, m) = fpar (hom_m m) l m) \<and>
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   237
 (\<forall>x a. hom_m (Sig x a) = fsgm (\<lambda>y. hom_o ([(x, y)] \<bullet> a)) (\<lambda>y. [(x, y)] \<bullet> a))
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   238
)"
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   239
apply (lifting tolift'')
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   240
done
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   241
aa960d16570f Lifted Peter's Sigma lemma with Ex1.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 908
diff changeset
   242
905
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   243
end
51e5cc3793d2 Added the Sigma Calculus example
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   244