src/ZF/ex/CoUnit.thy
changeset 69593 3dda49e08b9d
parent 65449 c82e63b11b8b
child 76213 e44d86131648
equal deleted inserted replaced
69592:a80d8ec6c998 69593:3dda49e08b9d
    23   counit :: i
    23   counit :: i
    24 codatatype
    24 codatatype
    25   "counit" = Con ("x \<in> counit")
    25   "counit" = Con ("x \<in> counit")
    26 
    26 
    27 inductive_cases ConE: "Con(x) \<in> counit"
    27 inductive_cases ConE: "Con(x) \<in> counit"
    28   \<comment> \<open>USELESS because folding on @{term "Con(xa) == xa"} fails.\<close>
    28   \<comment> \<open>USELESS because folding on \<^term>\<open>Con(xa) == xa\<close> fails.\<close>
    29 
    29 
    30 lemma Con_iff: "Con(x) = Con(y) \<longleftrightarrow> x = y"
    30 lemma Con_iff: "Con(x) = Con(y) \<longleftrightarrow> x = y"
    31   \<comment> \<open>Proving freeness results.\<close>
    31   \<comment> \<open>Proving freeness results.\<close>
    32   by (auto elim!: counit.free_elims)
    32   by (auto elim!: counit.free_elims)
    33 
    33 
    74 
    74 
    75 lemma counit2_Int_Vset_subset [rule_format]:
    75 lemma counit2_Int_Vset_subset [rule_format]:
    76   "Ord(i) ==> \<forall>x y. x \<in> counit2 \<longrightarrow> y \<in> counit2 \<longrightarrow> x \<inter> Vset(i) \<subseteq> y"
    76   "Ord(i) ==> \<forall>x y. x \<in> counit2 \<longrightarrow> y \<in> counit2 \<longrightarrow> x \<inter> Vset(i) \<subseteq> y"
    77   \<comment> \<open>Lemma for proving finality.\<close>
    77   \<comment> \<open>Lemma for proving finality.\<close>
    78   apply (erule trans_induct)
    78   apply (erule trans_induct)
    79   apply (tactic "safe_tac (put_claset subset_cs @{context})")
    79   apply (tactic "safe_tac (put_claset subset_cs \<^context>)")
    80   apply (erule counit2.cases)
    80   apply (erule counit2.cases)
    81   apply (erule counit2.cases)
    81   apply (erule counit2.cases)
    82   apply (unfold counit2.con_defs)
    82   apply (unfold counit2.con_defs)
    83   apply (tactic \<open>fast_tac (put_claset subset_cs @{context}
    83   apply (tactic \<open>fast_tac (put_claset subset_cs \<^context>
    84     addSIs [@{thm QPair_Int_Vset_subset_UN} RS @{thm subset_trans}, @{thm QPair_mono}]
    84     addSIs [@{thm QPair_Int_Vset_subset_UN} RS @{thm subset_trans}, @{thm QPair_mono}]
    85     addSEs [@{thm Ord_in_Ord}, @{thm Pair_inject}]) 1\<close>)
    85     addSEs [@{thm Ord_in_Ord}, @{thm Pair_inject}]) 1\<close>)
    86   done
    86   done
    87 
    87 
    88 lemma counit2_implies_equal: "[| x \<in> counit2;  y \<in> counit2 |] ==> x = y"
    88 lemma counit2_implies_equal: "[| x \<in> counit2;  y \<in> counit2 |] ==> x = y"