src/HOL/ZF/Helper.thy
author haftmann
Mon, 06 Jul 2009 14:19:13 +0200
changeset 31949 3f933687fae9
parent 19203 778507520684
permissions -rw-r--r--
moved Inductive.myinv to Fun.inv; tuned
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
19203
778507520684 Added HOL-ZF to Isabelle.
obua
parents:
diff changeset
     1
(*  Title:      HOL/ZF/Helper.thy
778507520684 Added HOL-ZF to Isabelle.
obua
parents:
diff changeset
     2
    ID:         $Id$
778507520684 Added HOL-ZF to Isabelle.
obua
parents:
diff changeset
     3
    Author:     Steven Obua
778507520684 Added HOL-ZF to Isabelle.
obua
parents:
diff changeset
     4
778507520684 Added HOL-ZF to Isabelle.
obua
parents:
diff changeset
     5
    Some helpful lemmas that probably will end up elsewhere. 
778507520684 Added HOL-ZF to Isabelle.
obua
parents:
diff changeset
     6
*)
778507520684 Added HOL-ZF to Isabelle.
obua
parents:
diff changeset
     7
778507520684 Added HOL-ZF to Isabelle.
obua
parents:
diff changeset
     8
theory Helper 
778507520684 Added HOL-ZF to Isabelle.
obua
parents:
diff changeset
     9
imports Main
778507520684 Added HOL-ZF to Isabelle.
obua
parents:
diff changeset
    10
begin
778507520684 Added HOL-ZF to Isabelle.
obua
parents:
diff changeset
    11
778507520684 Added HOL-ZF to Isabelle.
obua
parents:
diff changeset
    12
lemma theI2' : "?! x. P x \<Longrightarrow> (!! x. P x \<Longrightarrow> Q x) \<Longrightarrow> Q (THE x. P x)"
778507520684 Added HOL-ZF to Isabelle.
obua
parents:
diff changeset
    13
  apply auto
778507520684 Added HOL-ZF to Isabelle.
obua
parents:
diff changeset
    14
  apply (subgoal_tac "P (THE x. P x)")
778507520684 Added HOL-ZF to Isabelle.
obua
parents:
diff changeset
    15
  apply blast
778507520684 Added HOL-ZF to Isabelle.
obua
parents:
diff changeset
    16
  apply (rule theI)
778507520684 Added HOL-ZF to Isabelle.
obua
parents:
diff changeset
    17
  apply auto
778507520684 Added HOL-ZF to Isabelle.
obua
parents:
diff changeset
    18
  done
778507520684 Added HOL-ZF to Isabelle.
obua
parents:
diff changeset
    19
778507520684 Added HOL-ZF to Isabelle.
obua
parents:
diff changeset
    20
lemma in_range_superfluous: "(z \<in> range f & z \<in> (f ` x)) = (z \<in> f ` x)" 
778507520684 Added HOL-ZF to Isabelle.
obua
parents:
diff changeset
    21
  by auto
778507520684 Added HOL-ZF to Isabelle.
obua
parents:
diff changeset
    22
778507520684 Added HOL-ZF to Isabelle.
obua
parents:
diff changeset
    23
lemma f_x_in_range_f: "f x \<in> range f"
778507520684 Added HOL-ZF to Isabelle.
obua
parents:
diff changeset
    24
  by (blast intro: image_eqI)
778507520684 Added HOL-ZF to Isabelle.
obua
parents:
diff changeset
    25
778507520684 Added HOL-ZF to Isabelle.
obua
parents:
diff changeset
    26
lemma comp_inj: "inj f \<Longrightarrow> inj g \<Longrightarrow> inj (g o f)"
778507520684 Added HOL-ZF to Isabelle.
obua
parents:
diff changeset
    27
  by (blast intro: comp_inj_on subset_inj_on)
778507520684 Added HOL-ZF to Isabelle.
obua
parents:
diff changeset
    28
778507520684 Added HOL-ZF to Isabelle.
obua
parents:
diff changeset
    29
lemma comp_image_eq: "(g o f) ` x = g ` f ` x"
778507520684 Added HOL-ZF to Isabelle.
obua
parents:
diff changeset
    30
  by auto
778507520684 Added HOL-ZF to Isabelle.
obua
parents:
diff changeset
    31
  
778507520684 Added HOL-ZF to Isabelle.
obua
parents:
diff changeset
    32
end