Quot/Examples/IntEx.thy
changeset 621 c10a46fa0de9
parent 620 a98b136fc88a
child 622 df7a2f76daae
--- a/Quot/Examples/IntEx.thy	Tue Dec 08 11:38:58 2009 +0100
+++ b/Quot/Examples/IntEx.thy	Tue Dec 08 11:59:16 2009 +0100
@@ -299,30 +299,6 @@
 lemma lam_tst3a: "(\<lambda>(y :: nat \<times> nat). y) = (\<lambda>(x :: nat \<times> nat). x)"
 by auto
 
-lemma lam_tst3a_clean: "(op \<approx> ===> op \<approx>)
-     ((ABS_my_int ---> REP_my_int) ((REP_my_int ---> ABS_my_int) (Babs (Respects op \<approx>) (
-       ((ABS_my_int ---> REP_my_int) ((REP_my_int ---> ABS_my_int) (\<lambda>y. REP_my_int (ABS_my_int y))))))))
-     ((ABS_my_int ---> REP_my_int) ((REP_my_int ---> ABS_my_int) (Babs (Respects op \<approx>) (
-       ((ABS_my_int ---> REP_my_int) ((REP_my_int ---> ABS_my_int) (\<lambda>y. REP_my_int (ABS_my_int y))))))))
-      = ((\<lambda>(y::my_int). y) = (\<lambda>x. x))"
-apply(subst lambda_prs[OF Quotient_my_int Quotient_my_int])
-apply(subst lambda_prs[OF Quotient_my_int Quotient_my_int])
-apply(subst Quotient_rel_rep[OF fun_quotient[OF Quotient_my_int Quotient_my_int]])
-apply(subst babs_prs[OF Quotient_my_int Quotient_my_int])
-apply(subst babs_prs[OF Quotient_my_int Quotient_my_int])
-apply(rule refl)
-done
-
-lemma lam_tst3a_inj: "QUOT_TRUE ((\<lambda>(y::my_int). y) = (\<lambda>x. x)) \<Longrightarrow>
-    (op \<approx> ===> op \<approx>) (Babs (Respects op \<approx>) (\<lambda>y. y)) (Babs (Respects op \<approx>) (\<lambda>x. x)) =
-(op \<approx> ===> op \<approx>)
-     ((ABS_my_int ---> REP_my_int) ((REP_my_int ---> ABS_my_int) (Babs (Respects op \<approx>) (
-       ((ABS_my_int ---> REP_my_int) ((REP_my_int ---> ABS_my_int) (\<lambda>y. REP_my_int (ABS_my_int y))))))))
-     ((ABS_my_int ---> REP_my_int) ((REP_my_int ---> ABS_my_int) (Babs (Respects op \<approx>) (
-       ((ABS_my_int ---> REP_my_int) ((REP_my_int ---> ABS_my_int) (\<lambda>y. REP_my_int (ABS_my_int y))))))))"
-apply(tactic {* all_inj_repabs_tac @{context} 1*})
-done
-
 lemma id_rsp:
   shows "(R ===> R) id id"
 by simp
@@ -332,34 +308,32 @@
 apply (simp add: id_rsp)
 done
 
-
 lemma "(\<lambda>(y :: my_int). y) = (\<lambda>(x :: my_int). x)"
 apply(tactic {* procedure_tac @{context} @{thm lam_tst3a} 1 *})
-defer
+apply(rule impI)
+apply(rule lam_tst3a_reg)
 apply(tactic {* all_inj_repabs_tac @{context} 1*})
 apply(tactic {* clean_tac  @{context} 1 *})
-apply(subst babs_rsp)
-apply(tactic {* clean_tac  @{context} 1 *})
-apply(simp)
-apply(tactic {* regularize_tac @{context} 1*})?
-apply(subst babs_reg_eqv)
-apply(tactic {* equiv_tac @{context} 1*})
-apply(subst babs_reg_eqv)
-apply(tactic {* equiv_tac @{context} 1*})
-sorry
+apply(simp add: babs_prs[OF Quotient_my_int Quotient_my_int])
+done
 
 lemma lam_tst3b: "(\<lambda>(y :: nat \<times> nat \<Rightarrow> nat \<times> nat). y) = (\<lambda>(x :: nat \<times> nat \<Rightarrow> nat \<times> nat). x)"
 by auto
 
 lemma "(\<lambda>(y :: my_int => my_int). y) = (\<lambda>(x :: my_int => my_int). x)"
 apply(tactic {* procedure_tac @{context} @{thm lam_tst3b} 1 *})
-defer
+apply(rule impI)
+apply (rule babs_rsp[OF fun_quotient[OF Quotient_my_int Quotient_my_int]])
+apply (simp add: id_rsp)
 apply(tactic {* all_inj_repabs_tac @{context} 1*})
 apply(tactic {* clean_tac  @{context} 1 *})
-apply(subst babs_rsp)
-apply(tactic {* clean_tac  @{context} 1 *})
-apply(simp)
-apply(tactic {* regularize_tac @{context} 1*})?
-sorry
+apply(subst babs_prs)
+apply(tactic {* quotient_tac @{context} 1 *})
+apply(tactic {* quotient_tac @{context} 1 *})
+apply(subst babs_prs)
+apply(tactic {* quotient_tac @{context} 1 *})
+apply(tactic {* quotient_tac @{context} 1 *})
+apply(rule refl)
+done
 
 end