		/** Projector extraction **/

/*K: part extraction; projections; functions; large expressions; find
	function*/
/*A: John Gottschalk */
/*S: University of Western Australia */
/*D: May 1985 */
/*U: January 1988, K McIsaac */
/* Changed to allow any template */

/*: Projfind[$proj[($temp:$$a)],$exp]
	returns a list of all projections matching $proj[$temp] in $exp
	Any numerical coefficients that may have multiplied the
	projection are removed. */

_Projfind[Smp] : {0,Inf,0}
Projfind_:Tier

Projfind[$proj[$$args],$exp] :: \
	(Pos[$proj[$$args],$exp,$exp]; Union[%%/Map[Nc,%%]])

Projfind[$proj,$exp] :: Projfind[$proj[$$a],$exp] 

Projfind[$proj,$exp,$ptemp] :: \
  (Projfind[$proj,$exp]; Cat[Ar[Len[%%],%%,,$ptemp]])

