🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: fj.mail-lists.reduce
1 messages
1 total messages Started by Dresse Alain Fri, 19 Feb 1993 16:56
incomplete evaluation
#55
Author: Dresse Alain
Date: Fri, 19 Feb 1993 16:56
94 lines
3107 bytes
Hello,

I would need to define an algebraic operator P representing the
product of anticommuting one argument operators :

p(a,b,c,...) = pp(a) * pp(b) * pp(c) * ...
where pp(x) * pp(y) = - pp(y) * pp(x) for all x,y.

P should then have the following properties :

1. P is antisymmetric;

2. for all a,b,c,...,y such that y > 1 let p(a,b,c,...)^y = 0;

3. for all x,y let
     p(x,y,z,...) * p(a,b,c,...) = p(x,y,z,...,a,b,c,..);


The fact that these should be defined for arbitrary number of
variables suggests that p accept a single argument, which would be a
list of the arguments.

I have attempted to implement this with the code included below, but
I have the following unexpected result :

P({1}) * P({2});

                   -1
==> - P({1})*P({1})  *P({2,1})


reval(ws);

==> - P({2,1})

I have no idea why the result is not fully evaluated in the first
place.

Thanks for any help.

-- 
Alain Dresse, Universite Libre de Bruxelles
Campus Plaine, CP 231, B-1050 Bruxelles, Belgium
email: adresse@ulb.ac.be


---------- code follows ------------
operator p;
listargp p;
noncom p;

p_rules := 
  {P(~x)^~y => 0 when y > 1,
   P(~x)*P(~y) => P(append(x,y))};
   
let p_rules;

put('P,'simpfn,'simpp);

%%
%% implementation of an antisymmetric list
%% if some element is repeated in u, then return (0 . nil)
%% else return (the_sign . sorted(u)) where the_sign is the
%%   sign of the permutation mapping u to sorted(u).
%%

symbolic procedure antisym_list(u);
  begin
  scalar z;
  integer the_sign;
  if null u or repeats u then return 0 . nil;
  if permp(z := ordn u, u) then the_sign := 1 else the_sign := -1;
  return the_sign . z;
  end;

%% 
%% simpfn of p.
%% P({}) => 1;
%% P is atisymmetric in the elements inside the list given as argument
%%

symbolic procedure simpp(u);
  begin
  scalar a;
  a := aeval car u;
  if not listp a or car a neq 'list then
    return !*p2q (list('P, a) .** 1);
  % a is now of the form '(list args)
  if null cdr a then return 1 ./ 1;
  a := antisym_list(cdr a);
  if car a eq 0 then return nil ./ 1;
  if car a eq 1 then return !*p2q (list('P, 'list . cdr a) .** 1);
  return !*t2q ((list('P, 'list . cdr a) .** 1) .* -1);
  end;
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads