src/HOL/Import/MakeEqual.thy
author haftmann
Fri, 12 Oct 2007 08:25:48 +0200
changeset 24996 ebd5f4cc7118
parent 16417 9bc16273c2d4
child 41589 bbd861837ebc
permissions -rw-r--r--
moved class power to theory Power
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14620
1be590fd2422 Minor cleanup of headers and some speedup of the HOL4 import.
skalberg
parents: 14516
diff changeset
     1
(*  Title:      HOL/Import/MakeEqual.thy
1be590fd2422 Minor cleanup of headers and some speedup of the HOL4 import.
skalberg
parents: 14516
diff changeset
     2
    ID:         $Id$
1be590fd2422 Minor cleanup of headers and some speedup of the HOL4 import.
skalberg
parents: 14516
diff changeset
     3
    Author:     Sebastian Skalberg (TU Muenchen)
1be590fd2422 Minor cleanup of headers and some speedup of the HOL4 import.
skalberg
parents: 14516
diff changeset
     4
*)
1be590fd2422 Minor cleanup of headers and some speedup of the HOL4 import.
skalberg
parents: 14516
diff changeset
     5
16417
9bc16273c2d4 migrated theory headers to new format
haftmann
parents: 14620
diff changeset
     6
theory MakeEqual imports Main
9bc16273c2d4 migrated theory headers to new format
haftmann
parents: 14620
diff changeset
     7
  uses "shuffler.ML" begin
14516
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
     8
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
     9
setup Shuffler.setup
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    10
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    11
lemma conj_norm [shuffle_rule]: "(A & B ==> PROP C) == ([| A ; B |] ==> PROP C)"
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    12
proof
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    13
  assume "A & B ==> PROP C" A B
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    14
  thus "PROP C"
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    15
    by auto
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    16
next
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    17
  assume "[| A; B |] ==> PROP C" "A & B"
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    18
  thus "PROP C"
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    19
    by auto
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    20
qed
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    21
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    22
lemma imp_norm [shuffle_rule]: "(Trueprop (A --> B)) == (A ==> B)"
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    23
proof
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    24
  assume "A --> B" A
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    25
  thus B ..
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    26
next
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    27
  assume "A ==> B"
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    28
  thus "A --> B"
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    29
    by auto
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    30
qed
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    31
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    32
lemma all_norm [shuffle_rule]: "(Trueprop (ALL x. P x)) == (!!x. P x)"
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    33
proof
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    34
  fix x
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    35
  assume "ALL x. P x"
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    36
  thus "P x" ..
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    37
next
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    38
  assume "!!x. P x"
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    39
  thus "ALL x. P x"
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    40
    ..
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    41
qed
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    42
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    43
lemma ex_norm [shuffle_rule]: "(EX x. P x ==> PROP Q) == (!!x. P x ==> PROP Q)"
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    44
proof
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    45
  fix x
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    46
  assume ex: "EX x. P x ==> PROP Q"
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    47
  assume "P x"
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    48
  hence "EX x. P x" ..
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    49
  with ex show "PROP Q" .
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    50
next
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    51
  assume allx: "!!x. P x ==> PROP Q"
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    52
  assume "EX x. P x"
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    53
  hence p: "P (SOME x. P x)"
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    54
    ..
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    55
  from allx
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    56
  have "P (SOME x. P x) ==> PROP Q"
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    57
    .
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    58
  with p
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    59
  show "PROP Q"
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    60
    by auto
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    61
qed
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    62
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    63
lemma eq_norm [shuffle_rule]: "Trueprop (t = u) == (t == u)"
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    64
proof
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    65
  assume "t = u"
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    66
  thus "t == u" by simp
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    67
next
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    68
  assume "t == u"
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    69
  thus "t = u"
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    70
    by simp
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    71
qed
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    72
a183dec876ab Added HOL proof importer.
skalberg
parents:
diff changeset
    73
end