src/HOL/Real/HahnBanach/Linearform.thy
author wenzelm
Sun Jun 04 19:39:29 2000 +0200 (2000-06-04)
changeset 9035 371f023d3dbd
parent 9013 9dd0274f76af
child 9374 153853af318b
permissions -rw-r--r--
removed explicit terminator (";");
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@7978
    10
text{* A \emph{linear form} is a function on a vector
wenzelm@9035
    11
space into the reals that is additive and multiplicative. *}
wenzelm@7535
    12
wenzelm@7535
    13
constdefs
wenzelm@7917
    14
  is_linearform :: "['a::{minus, plus} set, 'a => real] => bool" 
wenzelm@7535
    15
  "is_linearform V f == 
wenzelm@7917
    16
      (ALL x: V. ALL y: V. f (x + y) = f x + f y) &
wenzelm@9035
    17
      (ALL x: V. ALL a. f (a (*) x) = a * (f x))" 
wenzelm@7535
    18
wenzelm@7808
    19
lemma is_linearformI [intro]: 
wenzelm@7917
    20
  "[| !! x y. [| x : V; y : V |] ==> f (x + y) = f x + f y;
nipkow@8703
    21
    !! x c. x : V ==> f (c (*) x) = c * f x |]
wenzelm@9035
    22
 ==> is_linearform V f"
wenzelm@9035
    23
 by (unfold is_linearform_def) force
wenzelm@7535
    24
wenzelm@8203
    25
lemma linearform_add [intro??]: 
wenzelm@9035
    26
  "[| is_linearform V f; x:V; y:V |] ==> f (x + y) = f x + f y"
wenzelm@9035
    27
  by (unfold is_linearform_def) fast
wenzelm@7535
    28
wenzelm@8203
    29
lemma linearform_mult [intro??]: 
wenzelm@9035
    30
  "[| is_linearform V f; x:V |] ==>  f (a (*) x) = a * (f x)" 
wenzelm@9035
    31
  by (unfold is_linearform_def) fast
wenzelm@7535
    32
wenzelm@8203
    33
lemma linearform_neg [intro??]:
wenzelm@7917
    34
  "[|  is_vectorspace V; is_linearform V f; x:V|] 
wenzelm@9035
    35
  ==> f (- x) = - f x"
wenzelm@9035
    36
proof - 
wenzelm@9035
    37
  assume "is_linearform V f" "is_vectorspace V" "x:V"
wenzelm@9035
    38
  have "f (- x) = f ((- #1) (*) x)" by (simp! add: negate_eq1)
wenzelm@9035
    39
  also have "... = (- #1) * (f x)" by (rule linearform_mult)
wenzelm@9035
    40
  also have "... = - (f x)" by (simp!)
wenzelm@9035
    41
  finally show ?thesis .
wenzelm@9035
    42
qed
wenzelm@7535
    43
wenzelm@8203
    44
lemma linearform_diff [intro??]: 
wenzelm@7808
    45
  "[| is_vectorspace V; is_linearform V f; x:V; y:V |] 
wenzelm@9035
    46
  ==> f (x - y) = f x - f y"  
wenzelm@9035
    47
proof -
wenzelm@9035
    48
  assume "is_vectorspace V" "is_linearform V f" "x:V" "y:V"
wenzelm@9035
    49
  have "f (x - y) = f (x + - y)" by (simp! only: diff_eq1)
wenzelm@9035
    50
  also have "... = f x + f (- y)" 
wenzelm@9035
    51
    by (rule linearform_add) (simp!)+
wenzelm@9035
    52
  also have "f (- y) = - f y" by (rule linearform_neg)
wenzelm@9035
    53
  finally show "f (x - y) = f x - f y" by (simp!)
wenzelm@9035
    54
qed
wenzelm@7535
    55
wenzelm@9035
    56
text{* Every linear form yields $0$ for the $\zero$ vector.*}
wenzelm@7917
    57
wenzelm@8203
    58
lemma linearform_zero [intro??, simp]: 
wenzelm@9035
    59
  "[| is_vectorspace V; is_linearform V f |] ==> f 00 = #0" 
wenzelm@9035
    60
proof - 
wenzelm@9035
    61
  assume "is_vectorspace V" "is_linearform V f"
wenzelm@9035
    62
  have "f 00 = f (00 - 00)" by (simp!)
wenzelm@9035
    63
  also have "... = f 00 - f 00" 
wenzelm@9035
    64
    by (rule linearform_diff) (simp!)+
wenzelm@9035
    65
  also have "... = #0" by simp
wenzelm@9035
    66
  finally show "f 00 = #0" .
wenzelm@9035
    67
qed 
wenzelm@7535
    68
wenzelm@9035
    69
end