src/HOL/Real/HahnBanach/Aux.thy
author paulson
Wed, 10 Jan 2001 11:05:13 +0100
changeset 10841 2fb8089ab6cd
parent 10783 2781ac7a4619
child 11701 3d51fbf81c17
permissions -rw-r--r--
new wfrec example
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7566
c5a3f980a7af accomodate refined facts handling;
wenzelm
parents: 7535
diff changeset
     1
(*  Title:      HOL/Real/HahnBanach/Aux.thy
c5a3f980a7af accomodate refined facts handling;
wenzelm
parents: 7535
diff changeset
     2
    ID:         $Id$
c5a3f980a7af accomodate refined facts handling;
wenzelm
parents: 7535
diff changeset
     3
    Author:     Gertrud Bauer, TU Munich
c5a3f980a7af accomodate refined facts handling;
wenzelm
parents: 7535
diff changeset
     4
*)
7535
599d3414b51d The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff changeset
     5
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
     6
header {* Auxiliary theorems *}
7808
fd019ac3485f update from Gertrud;
wenzelm
parents: 7656
diff changeset
     7
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
     8
theory Aux = Real + Zorn:
7566
c5a3f980a7af accomodate refined facts handling;
wenzelm
parents: 7535
diff changeset
     9
7917
5e5b9813cce7 HahnBanach update by Gertrud Bauer;
wenzelm
parents: 7808
diff changeset
    10
text {* Some existing theorems are declared as extra introduction
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
    11
or elimination rules, respectively. *}
7917
5e5b9813cce7 HahnBanach update by Gertrud Bauer;
wenzelm
parents: 7808
diff changeset
    12
9408
d3d56e1d2ec1 classical atts now intro! / intro / intro?;
wenzelm
parents: 9394
diff changeset
    13
lemmas [intro?] = isLub_isUb
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    14
lemmas [intro?] = chainD
9941
fe05af7ec816 renamed atts: rulify to rule_format, elimify to elim_format;
wenzelm
parents: 9906
diff changeset
    15
lemmas chainE2 = chainD2 [elim_format, standard]
7917
5e5b9813cce7 HahnBanach update by Gertrud Bauer;
wenzelm
parents: 7808
diff changeset
    16
5e5b9813cce7 HahnBanach update by Gertrud Bauer;
wenzelm
parents: 7808
diff changeset
    17
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    18
text {* \medskip Lemmas about sets. *}
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    19
10783
2781ac7a4619 fixed two proofs that were affected by the removal of obsolete rules
paulson
parents: 10752
diff changeset
    20
lemma Int_singletonD: "A \<inter> B = {v} \<Longrightarrow> x \<in> A \<Longrightarrow> x \<in> B \<Longrightarrow> x = v"
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
    21
  by (fast elim: equalityE)
7917
5e5b9813cce7 HahnBanach update by Gertrud Bauer;
wenzelm
parents: 7808
diff changeset
    22
10783
2781ac7a4619 fixed two proofs that were affected by the removal of obsolete rules
paulson
parents: 10752
diff changeset
    23
lemma set_less_imp_diff_not_empty: "H < E \<Longrightarrow> \<exists>x0 \<in> E. x0 \<notin> H"
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    24
  by (auto simp add: psubset_eq)
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    25
7917
5e5b9813cce7 HahnBanach update by Gertrud Bauer;
wenzelm
parents: 7808
diff changeset
    26
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    27
text{* \medskip Some lemmas about orders. *}
7535
599d3414b51d The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff changeset
    28
10783
2781ac7a4619 fixed two proofs that were affected by the removal of obsolete rules
paulson
parents: 10752
diff changeset
    29
lemma lt_imp_not_eq: "x < (y::'a::order) \<Longrightarrow> x \<noteq> y"
9379
21cfeae6659d tuded presentation;
bauerg
parents: 9374
diff changeset
    30
  by (simp add: order_less_le)
7917
5e5b9813cce7 HahnBanach update by Gertrud Bauer;
wenzelm
parents: 7808
diff changeset
    31
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    32
lemma le_noteq_imp_less:
10783
2781ac7a4619 fixed two proofs that were affected by the removal of obsolete rules
paulson
parents: 10752
diff changeset
    33
  "x \<le> (r::'a::order) \<Longrightarrow> x \<noteq> r \<Longrightarrow> x < r"
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
    34
proof -
10783
2781ac7a4619 fixed two proofs that were affected by the removal of obsolete rules
paulson
parents: 10752
diff changeset
    35
  assume "x \<le> r" and ne:"x \<noteq> r"
2781ac7a4619 fixed two proofs that were affected by the removal of obsolete rules
paulson
parents: 10752
diff changeset
    36
  hence "x < r \<or> x = r" by (simp add: order_le_less)
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
    37
  with ne show ?thesis by simp
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
    38
qed
7917
5e5b9813cce7 HahnBanach update by Gertrud Bauer;
wenzelm
parents: 7808
diff changeset
    39
7535
599d3414b51d The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff changeset
    40
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    41
text {* \medskip Some lemmas for the reals. *}
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    42
10783
2781ac7a4619 fixed two proofs that were affected by the removal of obsolete rules
paulson
parents: 10752
diff changeset
    43
lemma real_add_minus_eq: "x - y = (#0::real) \<Longrightarrow> x = y"
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
    44
  by simp
9013
9dd0274f76af Updated files to remove 0r and 1r from theorems in descendant theories
fleuriot
parents: 8838
diff changeset
    45
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    46
lemma abs_minus_one: "abs (- (#1::real)) = #1"
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
    47
  by simp
9013
9dd0274f76af Updated files to remove 0r and 1r from theorems in descendant theories
fleuriot
parents: 8838
diff changeset
    48
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    49
lemma real_mult_le_le_mono1a:
10783
2781ac7a4619 fixed two proofs that were affected by the removal of obsolete rules
paulson
parents: 10752
diff changeset
    50
  "(#0::real) \<le> z \<Longrightarrow> x \<le> y \<Longrightarrow> z * x  \<le> z * y"
2781ac7a4619 fixed two proofs that were affected by the removal of obsolete rules
paulson
parents: 10752
diff changeset
    51
  by (simp add: real_mult_le_mono2)
7656
2f18c0ffc348 update from Gertrud;
wenzelm
parents: 7566
diff changeset
    52
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    53
lemma real_mult_le_le_mono2:
10783
2781ac7a4619 fixed two proofs that were affected by the removal of obsolete rules
paulson
parents: 10752
diff changeset
    54
  "(#0::real) \<le> z \<Longrightarrow> x \<le> y \<Longrightarrow> x * z \<le> y * z"
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
    55
proof -
10783
2781ac7a4619 fixed two proofs that were affected by the removal of obsolete rules
paulson
parents: 10752
diff changeset
    56
  assume "(#0::real) \<le> z"  "x \<le> y"
2781ac7a4619 fixed two proofs that were affected by the removal of obsolete rules
paulson
parents: 10752
diff changeset
    57
  hence "x < y \<or> x = y" by (auto simp add: order_le_less)
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
    58
  thus ?thesis
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    59
  proof
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    60
    assume "x < y"
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    61
    show ?thesis by (rule real_mult_le_less_mono1) (simp!)
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    62
  next
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    63
    assume "x = y"
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    64
    thus ?thesis by simp
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
    65
  qed
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
    66
qed
7535
599d3414b51d The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff changeset
    67
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    68
lemma real_mult_less_le_anti:
10783
2781ac7a4619 fixed two proofs that were affected by the removal of obsolete rules
paulson
parents: 10752
diff changeset
    69
  "z < (#0::real) \<Longrightarrow> x \<le> y \<Longrightarrow> z * y \<le> z * x"
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
    70
proof -
10783
2781ac7a4619 fixed two proofs that were affected by the removal of obsolete rules
paulson
parents: 10752
diff changeset
    71
  assume "z < #0"  "x \<le> y"
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
    72
  hence "#0 < - z" by simp
10783
2781ac7a4619 fixed two proofs that were affected by the removal of obsolete rules
paulson
parents: 10752
diff changeset
    73
  hence "#0 \<le> - z" by (rule order_less_imp_le)
2781ac7a4619 fixed two proofs that were affected by the removal of obsolete rules
paulson
parents: 10752
diff changeset
    74
  hence "x * (- z) \<le> y * (- z)"
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
    75
    by (rule real_mult_le_le_mono2)
10783
2781ac7a4619 fixed two proofs that were affected by the removal of obsolete rules
paulson
parents: 10752
diff changeset
    76
  hence  "- (x * z) \<le> - (y * z)"
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
    77
    by (simp only: real_minus_mult_eq2)
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
    78
  thus ?thesis by (simp only: real_mult_commute)
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
    79
qed
9013
9dd0274f76af Updated files to remove 0r and 1r from theorems in descendant theories
fleuriot
parents: 8838
diff changeset
    80
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    81
lemma real_mult_less_le_mono:
10783
2781ac7a4619 fixed two proofs that were affected by the removal of obsolete rules
paulson
parents: 10752
diff changeset
    82
  "(#0::real) < z \<Longrightarrow> x \<le> y \<Longrightarrow> z * x \<le> z * y"
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    83
proof -
10783
2781ac7a4619 fixed two proofs that were affected by the removal of obsolete rules
paulson
parents: 10752
diff changeset
    84
  assume "#0 < z"  "x \<le> y"
2781ac7a4619 fixed two proofs that were affected by the removal of obsolete rules
paulson
parents: 10752
diff changeset
    85
  have "#0 \<le> z" by (rule order_less_imp_le)
2781ac7a4619 fixed two proofs that were affected by the removal of obsolete rules
paulson
parents: 10752
diff changeset
    86
  hence "x * z \<le> y * z"
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
    87
    by (rule real_mult_le_le_mono2)
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
    88
  thus ?thesis by (simp only: real_mult_commute)
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
    89
qed
9013
9dd0274f76af Updated files to remove 0r and 1r from theorems in descendant theories
fleuriot
parents: 8838
diff changeset
    90
10783
2781ac7a4619 fixed two proofs that were affected by the removal of obsolete rules
paulson
parents: 10752
diff changeset
    91
lemma real_inverse_gt_zero1: "#0 < (x::real) \<Longrightarrow> #0 < inverse x"
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    92
proof -
9394
wenzelm
parents: 9379
diff changeset
    93
  assume "#0 < x"
wenzelm
parents: 9379
diff changeset
    94
  have "0 < x" by simp
10606
e3229a37d53f converted rinv to inverse;
bauerg
parents: 9941
diff changeset
    95
  hence "0 < inverse x" by (rule real_inverse_gt_zero)
9394
wenzelm
parents: 9379
diff changeset
    96
  thus ?thesis by simp
wenzelm
parents: 9379
diff changeset
    97
qed
7535
599d3414b51d The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff changeset
    98
10783
2781ac7a4619 fixed two proofs that were affected by the removal of obsolete rules
paulson
parents: 10752
diff changeset
    99
lemma real_mult_inv_right1: "(x::real) \<noteq> #0 \<Longrightarrow> x * inverse x = #1"
9394
wenzelm
parents: 9379
diff changeset
   100
  by simp
9013
9dd0274f76af Updated files to remove 0r and 1r from theorems in descendant theories
fleuriot
parents: 8838
diff changeset
   101
10783
2781ac7a4619 fixed two proofs that were affected by the removal of obsolete rules
paulson
parents: 10752
diff changeset
   102
lemma real_mult_inv_left1: "(x::real) \<noteq> #0 \<Longrightarrow> inverse x * x = #1"
9394
wenzelm
parents: 9379
diff changeset
   103
  by simp
9013
9dd0274f76af Updated files to remove 0r and 1r from theorems in descendant theories
fleuriot
parents: 8838
diff changeset
   104
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
   105
lemma real_le_mult_order1a:
10783
2781ac7a4619 fixed two proofs that were affected by the removal of obsolete rules
paulson
parents: 10752
diff changeset
   106
  "(#0::real) \<le> x \<Longrightarrow> #0 \<le> y \<Longrightarrow> #0 \<le> x * y"
2781ac7a4619 fixed two proofs that were affected by the removal of obsolete rules
paulson
parents: 10752
diff changeset
   107
  by (simp add: real_0_le_mult_iff)
7535
599d3414b51d The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff changeset
   108
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
   109
lemma real_mult_diff_distrib:
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
   110
  "a * (- x - (y::real)) = - a * x - a * y"
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
   111
proof -
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
   112
  have "- x - y = - x + - y" by simp
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
   113
  also have "a * ... = a * - x + a * - y"
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
   114
    by (simp only: real_add_mult_distrib2)
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
   115
  also have "... = - a * x - a * y"
9394
wenzelm
parents: 9379
diff changeset
   116
    by simp
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
   117
  finally show ?thesis .
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
   118
qed
7535
599d3414b51d The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff changeset
   119
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
   120
lemma real_mult_diff_distrib2: "a * (x - (y::real)) = a * x - a * y"
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
   121
proof -
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
   122
  have "x - y = x + - y" by simp
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
   123
  also have "a * ... = a * x + a * - y"
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
   124
    by (simp only: real_add_mult_distrib2)
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
   125
  also have "... = a * x - a * y"
9394
wenzelm
parents: 9379
diff changeset
   126
    by simp
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
   127
  finally show ?thesis .
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
   128
qed
7535
599d3414b51d The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff changeset
   129
10783
2781ac7a4619 fixed two proofs that were affected by the removal of obsolete rules
paulson
parents: 10752
diff changeset
   130
lemma real_minus_le: "- (x::real) \<le> y \<Longrightarrow> - y \<le> x"
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
   131
  by simp
7535
599d3414b51d The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff changeset
   132
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
   133
lemma real_diff_ineq_swap:
10783
2781ac7a4619 fixed two proofs that were affected by the removal of obsolete rules
paulson
parents: 10752
diff changeset
   134
    "(d::real) - b \<le> c + a \<Longrightarrow> - a - b \<le> c - d"
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
   135
  by simp
7535
599d3414b51d The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff changeset
   136
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
   137
end