src/HOL/Real/HahnBanach/Linearform.thy
author wenzelm
Tue Sep 21 17:31:20 1999 +0200 (1999-09-21)
changeset 7566 c5a3f980a7af
parent 7535 599d3414b51d
child 7656 2f18c0ffc348
permissions -rw-r--r--
accomodate refined facts handling;
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@7535
     6
theory Linearform = LinearSpace:;
wenzelm@7535
     7
wenzelm@7535
     8
section {* linearforms *};
wenzelm@7535
     9
wenzelm@7535
    10
constdefs
wenzelm@7535
    11
  is_linearform :: "['a set, 'a => real] => bool" 
wenzelm@7535
    12
  "is_linearform V f == 
wenzelm@7535
    13
      (ALL x: V. ALL y: V. f (x [+] y) = f x + f y) &
wenzelm@7535
    14
      (ALL x: V. ALL a. f (a [*] x) = a * (f x))"; 
wenzelm@7535
    15
wenzelm@7535
    16
lemma is_linearformI [intro]: "[| !! x y. [| x : V; y : V |] ==> f (x [+] y) = f x + f y;
wenzelm@7535
    17
    !! x c. x : V ==> f (c [*] x) = c * f x |]
wenzelm@7535
    18
 ==> is_linearform V f";
wenzelm@7566
    19
 by (unfold is_linearform_def) force;
wenzelm@7535
    20
wenzelm@7566
    21
lemma linearform_add_linear [intro!!]: 
wenzelm@7566
    22
  "[| is_linearform V f; x:V; y:V |] ==> f (x [+] y) = f x + f y";
wenzelm@7566
    23
  by (unfold is_linearform_def) auto;
wenzelm@7535
    24
wenzelm@7566
    25
lemma linearform_mult_linear [intro!!]: 
wenzelm@7566
    26
  "[| is_linearform V f; x:V |] ==>  f (a [*] x) = a * (f x)"; 
wenzelm@7566
    27
  by (unfold is_linearform_def) auto;
wenzelm@7535
    28
wenzelm@7566
    29
lemma linearform_neg_linear [intro!!]:
wenzelm@7535
    30
  "[|  is_vectorspace V; is_linearform V f; x:V|] ==> f ([-] x) = - f x";
wenzelm@7535
    31
proof -; 
wenzelm@7535
    32
  assume "is_linearform V f" "is_vectorspace V" "x:V"; 
wenzelm@7566
    33
  have "f ([-] x) = f ((- 1r) [*] x)"; by (simp! add: vs_mult_minus_1);
wenzelm@7535
    34
  also; have "... = (- 1r) * (f x)"; by (rule linearform_mult_linear);
wenzelm@7566
    35
  also; have "... = - (f x)"; by (simp!);
wenzelm@7535
    36
  finally; show ?thesis; .;
wenzelm@7535
    37
qed;
wenzelm@7535
    38
wenzelm@7566
    39
lemma linearform_diff_linear [intro!!]: 
wenzelm@7535
    40
  "[| is_vectorspace V; is_linearform V f; x:V; y:V |] ==> f (x [-] y) = f x - f y";  
wenzelm@7535
    41
proof -;
wenzelm@7535
    42
  assume "is_vectorspace V" "is_linearform V f" "x:V" "y:V";
wenzelm@7535
    43
  have "f (x [-] y) = f (x [+] [-] y)"; by (simp only: diff_def);
wenzelm@7566
    44
  also; have "... = f x + f ([-] y)"; by (rule linearform_add_linear) (simp!)+;
wenzelm@7535
    45
  also; have "f ([-] y) = - f y"; by (rule linearform_neg_linear);
wenzelm@7566
    46
  finally; show "f (x [-] y) = f x - f y"; by (simp!);
wenzelm@7535
    47
qed;
wenzelm@7535
    48
wenzelm@7566
    49
lemma linearform_zero [intro!!]: "[| is_vectorspace V; is_linearform V f |] ==> f <0> = 0r"; 
wenzelm@7535
    50
proof -; 
wenzelm@7535
    51
  assume "is_vectorspace V" "is_linearform V f";
wenzelm@7566
    52
  have "f <0> = f (<0> [-] <0>)"; by (simp!);
wenzelm@7566
    53
  also; have "... = f <0> - f <0>"; by (rule linearform_diff_linear) (simp!)+;
wenzelm@7535
    54
  also; have "... = 0r"; by simp;
wenzelm@7535
    55
  finally; show "f <0> = 0r"; .;
wenzelm@7535
    56
qed; 
wenzelm@7535
    57
wenzelm@7535
    58
end;
wenzelm@7535
    59