/**Generalized Hypergeometric functions: printing form**/
/*K: Ghg, Hypergeometric, format, print*/
/*A: K McIsaac*/
/*S: UWA, Nedlands 6009, Australia*/
/*D: July, 1985*/
/*U: October, 1985*/
/*U: Februaru, 1986. Includes Gauss' hypergeometric, ie Hg*/

/* Prints Generalized Hypergeometric function in standard two dimensional
	form*/

Ghg_:Tier
_Ghg[Pr] : Tier[{[$p,$q,$a,$b,$z]::\
	     Fmt[{{0,-1},{1,0},{2,-1},\
		  {3,1},{3,0},{3,-1},\
		  {4,1},{4,-1},{5,0},\
		  {6,1},{6,0},{6,-1}},\
		     $p,F,$q,\
		     "|","|","|",\
		     $a,$b,$z,\
		     "|","|","|"]}]

_#[Pr] : Tier[{[]: Fmt[Null,"-"]}]
_#[Pr] : Tier[{[$$a]:: Sx[",",{$$a},3,3]}]

/* Prints Gauss' Hypergeometric function in standard two dimensional
	form*/

_Hg[Pr] : Tier[{[$a,$b,$c,$z]::\
	    Fmt[{{1,0},\
		 {3,1},{3,0},{3,-1},\
		 {4,1},{4,-1},{5,0},\
		 {6,1},{6,0},{6,-1}},\
		     Hg,\
		     "|","|","|",\
		     Sx[",",{$a,$b},3,3],$c,$z,\
		     "|","|","|"]}]
/* Print Ghg at end of quotient line. This improves readability, 
 */
_Div[Pr][[Ghg[$$b],$c]] :: Fmt[2,1/$c,Ghg[$$b]]
_Div[Pr][[$$a Ghg[$$b],$c]] :: Fmt[2,$$a/$c,Ghg[$$b]]

/* Print Hg at end of quotient line. This improves readability, 
 */
_Div[Pr][[Hg[$$b],$c]] :: Fmt[2,1/$c,Hg[$$b]]
_Div[Pr][[$$a Hg[$$b],$c]] :: Fmt[2,$$a/$c,Hg[$$b]]

/*E:
SMP 1.5.0
Fri Feb 14 09:41:12 1986


#I[1]::  <XGhgPR

#I[2]::  Hg[a,b,c,z]

	    |a,b |
#O[2]:*  Hg |   z|
	    |c   |

#I[3]::  Ghg[3,2,#[1,2,3],#[a,b],z]

	    |1,2,3 |
#O[3]:*   F |     z|
	 3 2|a,b   |

#I[4]::  Ghg[5,2,#[a,c,d,e,g],#[q,w],x^2]

	    |a,c,d,e,g  |
		       2
#O[4]:*   F |         x |
	 5 2|q,w	|

#I[5]::  Ghg[3,2,#[a/b,c,d],#[1,s/w],de]

		 a
	    |c,d,-  |
		 b
#O[5]:*   F |     de|
	       s
	 3 2|1,-    |
	       w

#I[6]::  <end>
*/
