Proper context fixes lifting inside instantiations.
authorCezary Kaliszyk <kaliszyk@in.tum.de>
Mon, 08 Feb 2010 11:41:25 +0100
changeset 1083 30550327651a
parent 1082 f8029d8c88a9
child 1084 40e3e6a6076f
child 1085 cf53861a00a7
Proper context fixes lifting inside instantiations.
Quot/Nominal/LFex.thy
Quot/Nominal/Terms.thy
Quot/quotient_tacs.ML
--- a/Quot/Nominal/LFex.thy	Mon Feb 08 10:47:19 2010 +0100
+++ b/Quot/Nominal/LFex.thy	Mon Feb 08 11:41:25 2010 +0100
@@ -403,9 +403,11 @@
 as
   "permute :: perm \<Rightarrow> trm \<Rightarrow> trm"
 
+lemmas permute_ktt[simp] = permute_kind_permute_ty_permute_trm.simps[quot_lifted]
+
 lemma perm_zero_ok: "0 \<bullet> (x :: KIND) = x \<and> 0 \<bullet> (y :: TY) = y \<and> 0 \<bullet> (z :: TRM) = z"
 apply (induct rule: KIND_TY_TRM_induct)
-apply (simp_all add: permute_kind_permute_ty_permute_trm.simps[quot_lifted])
+apply (simp_all)
 done
 
 lemma perm_add_ok:
@@ -413,7 +415,7 @@
   "((p + q) \<bullet> (x2 :: TY) = p \<bullet> q \<bullet> x2)"
   "((p + q) \<bullet> (x3 :: TRM) = p \<bullet> q \<bullet> x3)"
 apply (induct x1 and x2 and x3 rule: KIND_TY_TRM_inducts)
-apply (simp_all add: permute_kind_permute_ty_permute_trm.simps[quot_lifted])
+apply (simp_all)
 done
 
 instance
@@ -423,8 +425,6 @@
 
 end
 
-lemmas permute_ktt[simp] = permute_kind_permute_ty_permute_trm.simps[quot_lifted]
-
 lemmas AKIND_ATY_ATRM_inducts = akind_aty_atrm.inducts[unfolded alpha_gen, quot_lifted, folded alpha_gen]
 
 lemmas KIND_TY_TRM_INJECT = akind_aty_atrm_inj[unfolded alpha_gen, quot_lifted, folded alpha_gen]
--- a/Quot/Nominal/Terms.thy	Mon Feb 08 10:47:19 2010 +0100
+++ b/Quot/Nominal/Terms.thy	Mon Feb 08 11:41:25 2010 +0100
@@ -214,16 +214,16 @@
 as
   "permute :: perm \<Rightarrow> rtrm1 \<Rightarrow> rtrm1"
 
+lemmas permute_trm1[simp] = permute_rtrm1_permute_bp.simps[quot_lifted]
+
 instance
 apply default
 apply(induct_tac [!] x rule: trm1_bp_inducts(1))
-apply(simp_all add: permute_rtrm1_permute_bp.simps[quot_lifted])
+apply(simp_all)
 done
 
 end
 
-lemmas permute_trm1[simp] = permute_rtrm1_permute_bp.simps[quot_lifted]
-
 lemmas fv_trm1 = rfv_trm1_rfv_bp.simps[quot_lifted]
 
 lemmas fv_trm1_eqvt = rfv_trm1_eqvt[quot_lifted]
--- a/Quot/quotient_tacs.ML	Mon Feb 08 10:47:19 2010 +0100
+++ b/Quot/quotient_tacs.ML	Mon Feb 08 11:41:25 2010 +0100
@@ -653,8 +653,8 @@
 let
   val ctxt = Context.proof_of context
   val ((_, [thm']), ctxt') = Variable.import false [thm] ctxt
-  val goal = (quotient_lift_all ctxt o prop_of) thm'
-  val nthm = Goal.prove ctxt [] [] goal (fn x => lift_tac ctxt [thm] 1)
+  val goal = (quotient_lift_all ctxt' o prop_of) thm'
+  val nthm = Goal.prove ctxt' [] [] goal (fn x => lift_tac ctxt' [thm] 1)
   val [nthm1] = ProofContext.export ctxt' ctxt [nthm]
 in
   nthm1