src/HOL/Real/HahnBanach/Linearform.thy
author ballarin
Thu Nov 06 14:18:05 2003 +0100 (2003-11-06)
changeset 14254 342634f38451
parent 13547 bf399f3bd7dc
child 16417 9bc16273c2d4
permissions -rw-r--r--
Isar/Locales: <loc>.intro and <loc>.axioms no longer intro? and elim? by
default.
wenzelm@7566
     1
(*  Title:      HOL/Real/HahnBanach/Linearform.thy
wenzelm@7566
     2
    ID:         $Id$
wenzelm@7566
     3
    Author:     Gertrud Bauer, TU Munich
wenzelm@7566
     4
*)
wenzelm@7535
     5
wenzelm@9035
     6
header {* Linearforms *}
wenzelm@7535
     7
wenzelm@9035
     8
theory Linearform = VectorSpace:
wenzelm@7917
     9
wenzelm@10687
    10
text {*
wenzelm@10687
    11
  A \emph{linear form} is a function on a vector space into the reals
wenzelm@10687
    12
  that is additive and multiplicative.
wenzelm@10687
    13
*}
wenzelm@7535
    14
wenzelm@13515
    15
locale linearform = var V + var f +
wenzelm@13515
    16
  assumes add [iff]: "x \<in> V \<Longrightarrow> y \<in> V \<Longrightarrow> f (x + y) = f x + f y"
wenzelm@13515
    17
    and mult [iff]: "x \<in> V \<Longrightarrow> f (a \<cdot> x) = a * f x"
wenzelm@7535
    18
ballarin@14254
    19
declare linearform.intro [intro?]
ballarin@14254
    20
wenzelm@13547
    21
lemma (in linearform) neg [iff]:
wenzelm@13547
    22
  includes vectorspace
wenzelm@13547
    23
  shows "x \<in> V \<Longrightarrow> f (- x) = - f x"
wenzelm@10687
    24
proof -
wenzelm@13515
    25
  assume x: "x \<in> V"
wenzelm@13515
    26
  hence "f (- x) = f ((- 1) \<cdot> x)" by (simp add: negate_eq1)
wenzelm@13515
    27
  also from x have "... = (- 1) * (f x)" by (rule mult)
wenzelm@13515
    28
  also from x have "... = - (f x)" by simp
wenzelm@9035
    29
  finally show ?thesis .
wenzelm@9035
    30
qed
wenzelm@7535
    31
wenzelm@13547
    32
lemma (in linearform) diff [iff]:
wenzelm@13547
    33
  includes vectorspace
wenzelm@13547
    34
  shows "x \<in> V \<Longrightarrow> y \<in> V \<Longrightarrow> f (x - y) = f x - f y"
wenzelm@9035
    35
proof -
wenzelm@13515
    36
  assume x: "x \<in> V" and y: "y \<in> V"
wenzelm@13515
    37
  hence "x - y = x + - y" by (rule diff_eq1)
wenzelm@13547
    38
  also have "f ... = f x + f (- y)" by (rule add) (simp_all add: x y)
wenzelm@13547
    39
  also from _ y have "f (- y) = - f y" by (rule neg)
wenzelm@13515
    40
  finally show ?thesis by simp
wenzelm@9035
    41
qed
wenzelm@7535
    42
wenzelm@10687
    43
text {* Every linear form yields @{text 0} for the @{text 0} vector. *}
wenzelm@7917
    44
wenzelm@13547
    45
lemma (in linearform) zero [iff]:
wenzelm@13547
    46
  includes vectorspace
wenzelm@13547
    47
  shows "f 0 = 0"
wenzelm@10687
    48
proof -
wenzelm@13515
    49
  have "f 0 = f (0 - 0)" by simp
wenzelm@13515
    50
  also have "\<dots> = f 0 - f 0" by (rule diff) simp_all
wenzelm@13515
    51
  also have "\<dots> = 0" by simp
wenzelm@13515
    52
  finally show ?thesis .
wenzelm@10687
    53
qed
wenzelm@7535
    54
wenzelm@10687
    55
end