src/HOL/Ctr_Sugar.thy
author blanchet
Tue, 12 Nov 2013 13:47:24 +0100
changeset 54396 8baee6b04a7c
parent 54008 src/HOL/BNF/Ctr_Sugar.thy@b15cfc2864de
child 54397 f4b4fa25ce56
permissions -rw-r--r--
moved 'Ctr_Sugar' files out of BNF, so that it can become a general-purpose abstraction

(*  Title:      HOL/BNF/Ctr_Sugar.thy
    Author:     Jasmin Blanchette, TU Muenchen
    Copyright   2012

Wrapping existing freely generated type's constructors.
*)

header {* Wrapping Existing Freely Generated Type's Constructors *}

theory Ctr_Sugar
imports Main
keywords
  "wrap_free_constructors" :: thy_goal and
  "no_discs_sels" and
  "rep_compat"
begin

lemma iffI_np: "\<lbrakk>x \<Longrightarrow> \<not> y; \<not> x \<Longrightarrow> y\<rbrakk> \<Longrightarrow> \<not> x \<longleftrightarrow> y"
by (erule iffI) (erule contrapos_pn)

lemma iff_contradict:
"\<not> P \<Longrightarrow> P \<longleftrightarrow> Q \<Longrightarrow> Q \<Longrightarrow> R"
"\<not> Q \<Longrightarrow> P \<longleftrightarrow> Q \<Longrightarrow> P \<Longrightarrow> R"
by blast+

ML_file "Tools/ctr_sugar_util.ML"
ML_file "Tools/ctr_sugar_tactics.ML"
ML_file "Tools/ctr_sugar.ML"

end