src/HOL/Real/HahnBanach/Linearform.thy
author nipkow
Thu Apr 13 15:01:50 2000 +0200 (2000-04-13)
changeset 8703 816d8f6513be
parent 8203 2fcc6017cb72
child 9013 9dd0274f76af
permissions -rw-r--r--
Times -> <*>
** -> <*lex*>
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@7808
     6
header {* Linearforms *};
wenzelm@7535
     7
wenzelm@7917
     8
theory Linearform = VectorSpace:;
wenzelm@7917
     9
wenzelm@7978
    10
text{* A \emph{linear form} is a function on a vector
wenzelm@7978
    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) &
nipkow@8703
    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@7535
    22
 ==> is_linearform V f";
wenzelm@7566
    23
 by (unfold is_linearform_def) force;
wenzelm@7535
    24
wenzelm@8203
    25
lemma linearform_add [intro??]: 
wenzelm@7917
    26
  "[| is_linearform V f; x:V; y:V |] ==> f (x + y) = f x + f y";
wenzelm@7917
    27
  by (unfold is_linearform_def) fast;
wenzelm@7535
    28
wenzelm@8203
    29
lemma linearform_mult [intro??]: 
nipkow@8703
    30
  "[| is_linearform V f; x:V |] ==>  f (a (*) x) = a * (f x)"; 
wenzelm@7917
    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@7917
    35
  ==> f (- x) = - f x";
wenzelm@7535
    36
proof -; 
wenzelm@7535
    37
  assume "is_linearform V f" "is_vectorspace V" "x:V"; 
nipkow@8703
    38
  have "f (- x) = f ((- 1r) (*) x)"; by (simp! add: negate_eq1);
wenzelm@7978
    39
  also; have "... = (- 1r) * (f x)"; by (rule linearform_mult);
wenzelm@7566
    40
  also; have "... = - (f x)"; by (simp!);
wenzelm@7535
    41
  finally; show ?thesis; .;
wenzelm@7535
    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@7917
    46
  ==> f (x - y) = f x - f y";  
wenzelm@7535
    47
proof -;
wenzelm@7535
    48
  assume "is_vectorspace V" "is_linearform V f" "x:V" "y:V";
wenzelm@7917
    49
  have "f (x - y) = f (x + - y)"; by (simp! only: diff_eq1);
wenzelm@7917
    50
  also; have "... = f x + f (- y)"; 
wenzelm@7978
    51
    by (rule linearform_add) (simp!)+;
wenzelm@7978
    52
  also; have "f (- y) = - f y"; by (rule linearform_neg);
wenzelm@7917
    53
  finally; show "f (x - y) = f x - f y"; by (simp!);
wenzelm@7535
    54
qed;
wenzelm@7535
    55
wenzelm@7978
    56
text{* Every linear form yields $0$ for the $\zero$ vector.*};
wenzelm@7917
    57
wenzelm@8203
    58
lemma linearform_zero [intro??, simp]: 
nipkow@8703
    59
  "[| is_vectorspace V; is_linearform V f |] ==> f 00 = 0r"; 
wenzelm@7535
    60
proof -; 
wenzelm@7535
    61
  assume "is_vectorspace V" "is_linearform V f";
nipkow@8703
    62
  have "f 00 = f (00 - 00)"; by (simp!);
nipkow@8703
    63
  also; have "... = f 00 - f 00"; 
wenzelm@7978
    64
    by (rule linearform_diff) (simp!)+;
wenzelm@7535
    65
  also; have "... = 0r"; by simp;
nipkow@8703
    66
  finally; show "f 00 = 0r"; .;
wenzelm@7535
    67
qed; 
wenzelm@7535
    68
wenzelm@7808
    69
end;