products/sources/formale sprachen/PVS/vectors image not shown  

Quellcode-Bibliothek

© Kompilation durch diese Firma

[Weder Korrektheit noch Funktionsfähigkeit der Software werden zugesichert.]

Datei: cross_3D.pvs   Sprache: PVS

Original von: PVS©

cross_3D: THEORY
%------------------------------------------------------------------------------

%  3D cross-product and mixed product (e.g. a*cross(b,c)) and 
%  linear independence of two vectors
%
%  cross(a,b) =  a x b =  | i     j      k  |
%                         | a_x   a_y   a_z |
%                         | b_x   b_y   b_z |
%
%  Author: Rick Butler   NASA Langley Research Center
%                        2-7-2008
%
%------------------------------------------------------------------------------
BEGIN

  IMPORTING vectors_3D

  u,v,w,z : VAR Vect3
  k,k1,k2 : VAR real
  nzu,nzv : VAR Nz_vect3


% ------------- vector cross product ------------

  cross(u,v): Vector = (u`y*v`z - v`y*u`z,
                        u`z*v`x - v`z*u`x,
                        u`x*v`y - v`x*u`y)

  cross_zero_left  : LEMMA cross(zero,v) = zero

  cross_zero_right : LEMMA cross(v,zero) = zero

  cross_anticomm   : LEMMA cross(u,v) = -cross(v,u)

  cross_scal_left  : LEMMA cross(k*u,v) = k*cross(u,v)

  cross_scal_right : LEMMA cross(u,k*v) = k*cross(u,v)

  cross_dist       : LEMMA cross(u,v+w) = cross(u,v) + cross(u,w)

  Lagrange_Identity: LEMMA cross(u,v)*cross(w,z) = (u*w)*(v*z)-(u*z)*(v*w)

  cross_cross      : LEMMA cross(cross(u,v),w) = (u*w)*v - (v*w)*u 

%  ------------ linear dependence ------------

   linearly_dependent?(u,v): bool = 
       (EXISTS (k1,k2: real): (k1 /= 0 OR k2 /= 0) AND
                               k1*u + k2*v = zero)

   linearly_independent?(a,b: Vect3): bool = 
     NOT linearly_dependent?(a,b)

   lin_indep_cross: LEMMA 
     linearly_dependent?(nzu,nzv) IFF cross(nzu,nzv) = zero
 
  % ------------ mixed product ------------
  % ------------ aka triple product, aka determinant of vectors a, b, c

  ;[||](u,v,w): real = u*cross(v,w)

  mixed_prod(u,v,w): MACRO real = [|u,v,w|]

  mixed_prod_perm     : LEMMA [|u,v,w|] = [|v,w,u|]

  mixed_prod_perm2    : LEMMA [|u,v,w|] = [|w,u,v|]

  mixed_prod_perm_neg : LEMMA [|u,v,w|] = -[|v,u,w|]
 
  mixed_prod_scal1    : LEMMA [|k*u,v,w|] = k*[|u,v,w|] 
  mixed_prod_scal2    : LEMMA [|u,k*v,w|] = k*[|u,v,w|] 
  mixed_prod_scal3    : LEMMA [|u,v,k*w|] = k*[|u,v,w|] 

  mixed_prod_dist     : LEMMA [|u+z,v,w|] = [|u,v,w|] + [|z,v,w|]

  cross_cross_mixed   : LEMMA cross(cross(u,v),cross(w,z)) = 
                              [|u,v,z|]*w - [|u,v,w|]*z
END cross_3D 



¤ Dauer der Verarbeitung: 0.15 Sekunden  (vorverarbeitet)  ¤





Download des
Quellennavigators
Download des
sprechenden Kalenders

in der Quellcodebibliothek suchen




Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.


Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.


Bot Zugriff