BODY %&plain %\input macro.tex %% ------------------------------------------------------------------------- %% %% Equazioni con nomi simbolici %% %% $$ x=1 \Eq(ciccio) $$ %% By \equ(ciccio) we get ... %% %% Dentro \eqalignno invece di \Eq si usa \eq. %% Per far riferimento ad una formula definita nel futuro: \eqf %% ------------------------------------------------------------------------- %% %% Teoremi con nomi simbolici %% %% \nproclaim Proposition[peppe]. %% If bla bla, then blu blu. %% %% {\it Proof.} It is easy to check that ... %% %% Because of Proposition \thm[peppe], we know that ... %% %% Per far riferimento ad un teorema definito nel futuro: \thf %% Per far riferimento a formule o teoremi definiti in altri file %% di cui si dispone il .aux, includere lo statement %% \include{file} %% e usare \eqf o \thf %% %% Se e' presente il comando \BOZZA, viene stampato sul margine %% sinistro il nome simbolico della formula (o del teorema). %% ------------------------------------------------------------------------- %% %% All'inizio di ogni sezione includere %% %% \expandafter\ifx\csname sezioniseparate\endcsname\relax% %% \input macro \fi %% \numsec=n %% \numfor=1\numtheo=1\pgn=1 %% %% dove n e' il numero della sezione %% Le Appendici hanno numeri negativi (\numsec=-1, -2, ecc...) %% ------------------------------------------------------------------------- %% %% Fonti %% %% Vengono caricate le fonti msam, msbm, eufm. %% ------------------------------------------------------------------------- %%%%%%%%%FORMATO FRANCESCA \magnification=\magstep1 \hoffset=0.5 truecm \voffset=1 truecm \hsize=15.5 truecm \vsize=21 truecm \baselineskip=20pt plus0.1pt minus0.1pt \parindent=15pt \lineskip=4pt\lineskiplimit=0.1pt \parskip=0.1pt plus1pt %\def\ds{\displaystyle}\def\st{\scriptstyle}\def\sst{\scriptscriptstyle} %\font\seven=cmr7 %%%%%%%%%%%%%%% FORMATO %\hoffset=0.5truecm %\voffset=0.5truecm %\hsize=16.5truecm %\vsize=22.0truecm %\baselineskip=14pt plus0.1pt minus0.1pt %\parindent=25pt %\lineskip=4pt\lineskiplimit=0.1pt %\parskip=0.1pt plus1pt % \def\menouno{-{\underline 1}} \def\piuuno{+{\underline 1}} \def\piumeno{\pm{\underline 1}} \def\piumenouno{\pm{\underline 1}} \let\ds=\displaystyle \let\txt=\textstyle \let\st=\scriptstyle \let\sst=\scriptscriptstyle % %%%%%%%%%%%%%%%%%%%%%%%%%%% FONTS \font\twelverm=cmr12 \font\twelvei=cmmi12 \font\twelvesy=cmsy10 \font\twelvebf=cmbx12 \font\twelvett=cmtt12 \font\twelveit=cmti12 \font\twelvesl=cmsl12 % \font\ninerm=cmr9 \font\ninei=cmmi9 \font\ninesy=cmsy9 \font\ninebf=cmbx9 \font\ninett=cmtt9 \font\nineit=cmti9 \font\ninesl=cmsl9 % \font\eightrm=cmr8 \font\eighti=cmmi8 \font\eightsy=cmsy8 \font\eightbf=cmbx8 \font\eighttt=cmtt8 \font\eightit=cmti8 \font\eightsl=cmsl8 % \font\seven=cmr7 % \font\sixrm=cmr6 \font\sixi=cmmi6 \font\sixsy=cmsy6 \font\sixbf=cmbx6 % \font\caps=cmcsc10 \font\bigcaps=cmcsc10 scaled \magstep1 % %%%%%%%%%%%%%%%%%%%%%%%%% GRECO % \let\a=\alpha \let\b=\beta \let\c=\chi \let\d=\delta \let\e=\varepsilon \let\f=\varphi \let\g=\gamma \let\h=\eta \let\k=\kappa \let\l=\lambda \let\m=\mu \let\n=\nu \let\o=\omega \let\p=\pi \let\ph=\varphi \let\r=\rho \let\s=\sigma \let\t=\tau \let\th=\vartheta \let\y=\upsilon \let\x=\xi \let\z=\zeta \let\D=\Delta \let\F=\Phi \let\G=\Gamma \let\L=\Lambda \let\Th=\Theta \let\O=\Omega \let\P=\Pi \let\Ps=\Psi \let\Si=\Sigma \let\X=\Xi \let\Y=\Upsilon % %%%%%%%%%%%%%%%%%%%%%%% CALLIGRAFICHE % \def\cA{{\cal A}} \def\cB{{\cal B}} \def\cC{{\cal C}} \def\cD{{\cal D}} \def\cE{{\cal E}} \def\cF{{\cal F}} \def\cG{{\cal G}} \def\cH{{\cal H}} \def\cI{{\cal I}} \def\cJ{{\cal J}} \def\cK{{\cal K}} \def\cL{{\cal L}} \def\cM{{\cal M}} \def\cN{{\cal N}} \def\cO{{\cal O}} \def\cP{{\cal P}} \def\cQ{{\cal Q}} \def\cR{{\cal R}} \def\cS{{\cal S}} \def\cT{{\cal T}} \def\cU{{\cal U}} \def\cV{{\cal V}} \def\cW{{\cal W}} \def\cX{{\cal X}} \def\cY{{\cal Y}} \def\cZ{{\cal Z}} % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% figure % \newdimen\xshift \newdimen\yshift \newdimen\xwidth % \def\eqfig#1#2#3#4#5#6{ \par\xwidth=#1 \xshift=\hsize \advance\xshift by-\xwidth \divide\xshift by 2 \yshift=#2 \divide\yshift by 2 \vbox{ \line{\hglue\xshift \vbox to #2{ \smallskip \vfil#3 \special{psfile=#4.ps} } \hfill\raise\yshift\hbox{#5} } \smallskip \centerline{#6} } \smallskip} % \def\figini#1{% \def\8{\write13}% \catcode`\%=12\catcode`\{=12\catcode`\}=12 \catcode`\<=1\catcode`\>=2 \openout13=#1.ps} % \def\figfin{% \closeout13 \catcode`\%=14\catcode`\{=1 \catcode`\}=2\catcode`\<=12\catcode`\>=12} % % %%%%%%%%%%%%%%%%%%%%% Numerazione pagine % \def\data{\number\day/\ifcase\month\or gennaio \or febbraio \or marzo \or aprile \or maggio \or giugno \or luglio \or agosto \or settembre \or ottobre \or novembre \or dicembre \fi/\number\year} % %%\newcount\tempo %%\tempo=\number\time\divide\tempo by 60} % \setbox200\hbox{$\scriptscriptstyle \data $} % \newcount\pgn \pgn=1 \def\foglio{% \numsection\pgn \global\advance\pgn by 1} % % %%%%%%%%%%%%%%%%% EQUAZIONI E TEOREMI CON NOMI SIMBOLICI % \def\begintex{% \openin14=\jobname.aux \ifeof14 \relax \else \input \jobname.aux \closein14 \fi \openout15=\jobname.aux } \def\endtex{} % \global\newcount\numsec \global\newcount\numfor \global\newcount\numfig \global\newcount\numtheo % \gdef\profonditastruttura{\dp\strutbox} % \def\senondefinito#1{\expandafter\ifx\csname#1\endcsname\relax} % \def\SIA #1,#2,#3 {\senondefinito{#1#2}% \expandafter\xdef\csname #1#2\endcsname{#3}\else \write16{???? ma #1,#2 e' gia' stato definito !!!!}\fi} % \def\etichetta(#1){(\numsection\numfor) \SIA e,#1,(\numsection\numfor) \global\advance\numfor by 1 \write15{\string\FU (#1){\equ(#1)}} \write16{ EQ \equ(#1) == #1 }} % \def\oldetichetta(#1){ \senondefinito{fu#1}\clubsuit(#1)\else \csname fu#1\endcsname\fi} % \def\FU(#1)#2{\SIA fu,#1,#2 } % \def\tetichetta(#1){{\numsection\numtheo}% \SIA theo,#1,{\numsection\numtheo} \global\advance\numtheo by 1% \write15{\string\FUth (#1){\thm[#1]}}% \write16{ TH \thm[#1] == #1 }} % \def\oldtetichetta(#1){%----------------------- mnemonic label \senondefinito{futh#1}\clubsuit(#1)\else \csname futh#1\endcsname\fi} % % \def\FUth(#1)#2{\SIA futh,#1,#2 } % \def\getichetta(#1){Fig. \number\numfig \SIA e,#1,{\number\numfig} \global\advance\numfig by 1 \write15{\string\FU (#1){\equ(#1)}} \write16{ Fig. \equ(#1) ha simbolo #1 }} % \newdimen\gwidth % \def\BOZZA{ \def\alato(##1){ {\vtop to \profonditastruttura{\baselineskip \profonditastruttura\vss \rlap{\kern-\hsize\kern-1.3truecm{$\scriptstyle##1$}}}}} \def\galato(##1){ \gwidth=\hsize \divide\gwidth by 2 {\vtop to \profonditastruttura{\baselineskip \profonditastruttura\vss \rlap{\kern-\gwidth\kern-1.3truecm{$\scriptstyle##1$}}}}} \def\talato(##1){\rlap{\sixrm\kern -1.3truecm ##1}} \def\thm{\teo}\def\thf{\teo} } % \def\alato(#1){} \def\galato(#1){} \def\talato(#1){} % % \def\numsection#1{% \ifnum\numsec=-100% \relax\number#1% \else \ifnum\numsec=-101% \relax A\number#1% \else \ifnum\numsec<0% A\number-\numsec.\number#1% \else \number\numsec.\number#1% \fi \fi \fi } % %\def\geq(#1){\getichetta(#1)\galato(#1)} % \def\Thm[#1]{\tetichetta(#1)} \def\thf[#1]{\senondefinito{futh#1}$\clubsuit$[#1]\else \csname futh#1\endcsname\fi} \def\thm[#1]{\senondefinito{theo#1}$\spadesuit$[#1]\else \csname theo#1\endcsname\fi} % \def\Eq(#1){\eqno{\etichetta(#1)\alato(#1)}} \def\eq(#1){\etichetta(#1)\alato(#1)} \def\eqv(#1){\senondefinito{fu#1}$\clubsuit$(#1)\else \csname fu#1\endcsname\fi} \def\equ(#1){\senondefinito{e#1}$\spadesuit$(#1)\else \csname e#1\endcsname\fi} \let\eqf=\eqv % \def\nonumeration{%--------------- used in partial printings \let\etichetta=\oldetichetta \let\tetichetta=\oldtetichetta \let\equ=\eqf \let\thm=\thf } % % % ------------------------------------------------------------------------- % % Numerazione verso il futuro ed eventuali paragrafi % precedenti non inseriti nel file da compilare % \def\include#1{% \openin13=#1.aux \ifeof13 \relax \else \input #1.aux \closein13 \fi } % % % ------------------------------------------------------------------------- % % \def\fine{\vfill\eject} \def\sezioniseparate{% \def\fine{\par \vfill \supereject \end }} % % ------------------------------------------------------------------------- % \footline={\rlap{\hbox{$\sst \data$}\ $\st[\number\pageno]$}\hss\tenrm \foglio\hss} % %------------------------- Altre macro da chiamare ------------ % \def\page{\vfill\eject} \def\smallno{\smallskip\noindent} \def\medno{\medskip\noindent} \def\bigno{\bigskip\noindent} \def\\{\hfill\break} \def\acapo{\hfill\break\noindent} \def\thsp{\thinspace} \def\x{\thinspace} \def\tthsp{\kern .083333 em} \def\mathindent{\parindent=50pt} \def\club{$\clubsuit$} \def\cclub{\club\club\club} \def\?{\mskip -10mu} % %------------------------ itemizing % \def\itm#1{\item{(#1)}} \let\itemm=\itemitem \def\bu{\smallskip\item{$\bullet$}} \def\bul{\medskip\item{$\bullet$}} \def\indbox#1{\hbox to \parindent{\hfil\ #1\hfil} } \def\citem#1{\item{\indbox{#1}}} \def\citemitem#1{\itemitem{\indbox{#1}}} \def\litem#1{\item{\indbox{#1\hfill}}} % \def\ref[#1]{[#1]} % \def\beginsubsection#1\par{\bigskip\leftline{\it #1}\nobreak\smallskip \noindent} % \newfam\msafam \newfam\msbfam \newfam\eufmfam % % -------------------------------------------------- math macros -------- % % \def\hexnumber#1{% \ifcase#1 0\or 1\or 2\or 3\or 4\or 5\or 6\or 7\or 8\or 9\or A\or B\or C\or D\or E\or F\fi} % \font\tenmsa=msam10 \font\sevenmsa=msam7 \font\fivemsa=msam5 \textfont\msafam=\tenmsa \scriptfont\msafam=\sevenmsa \scriptscriptfont\msafam=\fivemsa % \edef\msafamhexnumber{\hexnumber\msafam}% % % \mathchardef\restriction"1\msafamhexnumber16 % "class, family, position (found on amstex guide) % \mathchardef\restriction"1\msafamhexnumber16 \mathchardef\ssim"0218 \mathchardef\square"0\msafamhexnumber03 \mathchardef\eqd"3\msafamhexnumber2C \def\QED{\ifhmode\unskip\nobreak\fi\quad \ifmmode\square\else$\square$\fi} % \font\tenmsb=msbm10 \font\sevenmsb=msbm7 \font\fivemsb=msbm5 \textfont\msbfam=\tenmsb \scriptfont\msbfam=\sevenmsb \scriptscriptfont\msbfam=\fivemsb \def\Bbb#1{\fam\msbfam\relax#1} % \font\teneufm=eufm10 \font\seveneufm=eufm7 \font\fiveeufm=eufm5 \textfont\eufmfam=\teneufm \scriptfont\eufmfam=\seveneufm \scriptscriptfont\eufmfam=\fiveeufm \def\frak#1{{\fam\eufmfam\relax#1}} \let\goth\frak % \def\bZ{{\Bbb Z}} \def\bF{{\Bbb F}} \def\bR{{\Bbb R}} \def\bC{{\Bbb C}} \def\bE{{\Bbb E}} \def\bP{{\Bbb P}} \def\bI{{\Bbb I}} \def\bN{{\Bbb N}} \def\bL{{\Bbb L}} \def\bV{{\Bbb V}} \def\Fg{{\frak g}} \def\({\left(} \def\){\right)} % %------------------------------------------------------------------- % % ------- Per compatibilita' % \let\integer=\bZ \let\real=\bR \let\complex=\bC \let\Ee=\bE \let\Pp=\bP \let\Dir=\cE \let\Z=\integer \let\uline=\underline \def\Zp{{\integer_+}} \def\ZpN{{\integer_+^N}} \def\ZZ{{\integer^2}} \def\ZZt{\integer^2_*} \def\ee#1{{\vec {\bf e}_{#1}}} % \let\neper=e \let\ii=i \let\mmin=\wedge \let\mmax=\vee \def\lefkg{ \le } \def\lefkgstrong{ \preceq } \def\gefkg{ \ge } \def\gefkgstrong{ \succeq } \def\identity{ {1 \mskip -5mu {\rm I}} } \def\ie{\hbox{\it i.e.\ }} \let\id=\identity \let\emp=\emptyset \let\sset=\subset \def\ssset{\subset\subset} \let\setm=\backslash \def\nep#1{ \neper^{#1}} \let\uu=\underline \def\ov#1{{1\over#1}} \let\nea=\nearrow \let\dnar=\downarrow \let\imp=\Rightarrow \let\de=\partial \def\dep{\partial^+} \def\deb{\bar\partial} \def\tc{\thsp | \thsp} \let\<=\langle \let\>=\rangle \def\tpl{{| \mskip -1.5mu | \mskip -1.5mu |}} \def\tnorm#1{\tpl #1 \tpl} \def\uno{{\uu 1}} \def\mno{{- \uu 1}} % \def\xx{ {\{x\}} } \def\xy{ { \{x,y\} } } \def\XY{ {\< x, y \>} } \def\pmu{\{-1,1\}} % \def\Pro{\noindent{\it Proof.}} % \def\sump{\mathop{{\sum}'}} \def\tr{ \mathop{\rm tr}\nolimits } \def\intt{ \mathop{\rm int}\nolimits } \def\ext{ \mathop{\rm ext}\nolimits } \def\Tr{ \mathop{\rm Tr}\nolimits } \def\ad{ \mathop{\rm ad}\nolimits } \def\Ad{ \mathop{\rm Ad}\nolimits } \def\dim{ \mathop{\rm dim}\nolimits } \def\weight{ \mathop{\rm weight}\nolimits } \def\Orb{ \mathop{\rm Orb} } \def\Var{ \mathop{\rm Var}\nolimits } \def\Cov{ \mathop{\rm Cov}\nolimits } \def\mean{ \mathop{\bf E}\nolimits } \def\EE{ \mathop\Ee\nolimits } \def\PP{ \mathop\Pp\nolimits } \def\diam{\mathop{\rm diam}\nolimits} \def\sgn{\mathop{\rm sgn}\nolimits} \def\prob{\mathop{\rm Prob}\nolimits} \def\gap{\mathop{\rm gap}\nolimits} \def\osc{\mathop{\rm osc}\nolimits} \def\supp{\mathop{\rm supp}\nolimits} \def\Dom{\mathop{\rm Dom}\nolimits} % \def\tto#1{\buildrel #1 \over \longrightarrow} \def\con#1{{\buildrel #1 \over \longleftrightarrow}} % \def\norm#1{ | #1 | } \def\ninf#1{ \| #1 \|_\infty } \def\scalprod#1#2{ \thsp<#1, \thsp #2>\thsp } \def\inte#1{\lfloor #1 \rfloor} \def\ceil#1{\lceil #1 \rceil} \def\intl{\int\limits} % \outer\def\nproclaim#1 [#2]#3. #4\par{\medbreak \noindent \talato(#2){\bf #1 \Thm[#2]#3.\enspace }% {\sl #4\par }\ifdim \lastskip <\medskipamount \removelastskip \penalty 55\medskip \fi} % \def\thmm[#1]{#1} \def\teo[#1]{#1} % %------------------------------ tilde % \def\sttilde#1{% \dimen2=\fontdimen5\textfont0 \setbox0=\hbox{$\mathchar"7E$} \setbox1=\hbox{$\scriptstyle #1$} \dimen0=\wd0 \dimen1=\wd1 \advance\dimen1 by -\dimen0 \divide\dimen1 by 2 \vbox{\offinterlineskip% \moveright\dimen1 \box0 \kern - \dimen2\box1} } % \def\ntilde#1{\mathchoice{\widetilde #1}{\widetilde #1}% {\sttilde #1}{\sttilde #1}} % %------------------------------------------------------------------- % %\sezioniseparate %----------- togliere quando si stampa tutto insieme %\let\g=\o % %------------------ per il Mac % \def\bye{% \par\vfill\supereject \message{******** Run TeX twice to resolve cross-references *****************}% \message{******** Run TeX twice to resolve cross-references *****************}% \message{******** Run TeX twice to resolve cross-references *****************}% \message{******** Run TeX twice to resolve cross-references *****************}% \end} \long\def\newsection#1\par{% \advance\numsec by 1% \numfor=1% \numtheo=1% \pgn=1% \vskip 0pt plus.3\vsize \penalty -250 \vskip 0pt plus-.3\vsize \bigskip \vskip \parskip \message {#1}\leftline {\bf \number\numsec. #1}% \nobreak \smallskip \noindent} \long\def\appendix#1\par{% \numsec=-101% \numfor=1% \numtheo=1% \pgn=1% \vskip 0pt plus.3\vsize \penalty -250 \vskip 0pt plus-.3\vsize \bigskip \vskip \parskip \message {#1}\leftline {\bf Appendix. #1}% \nobreak \smallskip \noindent} \def\parsk{% \baselineskip=11pt plus0.1pt minus0.1pt \lineskip=4pt\lineskiplimit=0.1pt \parskip=2pt plus1pt } %-------------------------------------------- amstex \def\frac#1#2{{#1\over#2}} %\def\cA{{\cal A}} \def\cB{{\cal B}} \def\cC{{\cal C}} \def\cD{{\cal D}} %\def\cE{{\cal E}} \def\cF{{\cal F}} \def\cG{{\cal G}} \def\cH{{\cal H}} %\def\cI{{\cal I}} \def\cJ{{\cal J}} \def\cK{{\cal K}} \def\cL{{\cal L}} %\def\cM{{\cal M}} \def\cN{{\cal N}} \def\cO{{\cal O}} \def\cP{{\cal P}} %\def\cQ{{\cal Q}} \def\cR{{\cal R}} \def\cS{{\cal S}} \def\cT{{\cal T}} %\def\cU{{\cal U}} \def\cV{{\cal V}} \def\cW{{\cal W}} \def\cX{{\cal X}} %\def\cY{{\cal Y}} \def\cZ{{\cal Z}} % %%%%%%%%%%%%%%%%%%%STAMPATELLO % % \def\rA{{\rm A}} \def\rB{{\rm B}} \def\rC{{\rm C}} \def\rD{{\rm D}} \def\rE{{\rm E}} \def\rF{{\rm F}} \def\rG{{\rm G}} \def\rH{{\rm H}} \def\rI{{\rm I}} \def\rJ{{\rm J}} \def\rK{{\rm K}} \def\rL{{\rm L}} \def\rM{{\rm M}} \def\rN{{\rm N}} \def\rO{{\rm O}} \def\rP{{\rm P}} \def\rQ{{\rm Q}} \def\rR{{\rm R}} \def\rS{{\rm S}} \def\rT{{\rm T}} \def\rU{{\rm U}} \def\rV{{\rm V}} \def\rW{{\rm W}} \def\rX{{\rm X}} \def\rY{{\rm Y}} \def\rZ{{\rm Z}} % This is PiCTeX, Version 1.1 9/21/87 % CAVEAT: The PiCTeX manual often has a more lucid explanation % of any given topic than you will find in the internal documentation % of the macros. % PiCTeX's commands can be classified into two groups: (1) public (or % external), and (2) private (or internal). The public macros are % discussed at length in the manual. The only discussion of the private % macros is the internal documentation. The private macros all have % names beginning with an exclamation point (!) of category code 11. % Since in normal usage "!" has category code 12, these macros can't % be accessed or modified by the general user. % The macros are organized into thematically related groups. For example, % the macros dealing with dots & dashes are all in the DASHPATTERN group. % The table below shows which macros are in which groups. The table % covers all public macros, and many (but not all) of PiCTeX's upper level % private macros. Following the table, the various groups are listed % in the order in which they appear in the table. % *********************** TABLE OF GROUPS OF MACROS ********************** % HACKS: Utility macros % \PiC % \PiCTeX % \placevalueinpts % \!!loop % \!cfor % \!copylist % \!ecfor % \!etfor % \!getnext % \!getnextvalueof % \!ifempty % \!ifnextchar % \!leftappend % \!listaddon % \!loop % \!lop % \!mlap % \!not % \!removept % \!rightappend % \!tfor % \!vmlap % \!wlet % ALLOCATION: Allocates registers % AREAS: Deals with plot areas % \axis % \grid % \invisibleaxes % \normalgraphs % \plotheading % \setplotarea % \visibleaxes % ARROWS: Draws arrows % \arrow % \betweenarrows % BARS: Draws bars % \putbar % \setbars % BOXES: Draws rectangles % \frame % \putrectangle % \rectangle % \shaderectangleson % \shaderectanglesoff % CURVES: Upper level plot commands % \hshade % \plot % \sethistograms % \setlinear % \setquadratic % \vshade % DASHPATTERNS: Sets up dash patterns % \findlength % \setdashes % \setdashesnear % \setdashpattern % \setdots % \setdotsnear % \setsolid % \!dashingoff % \!dashingon % DIVISION: Does long division of dimension registers % \Divide % \!divide % ELLIPSES: Draws ellipses and circles % \circulararc % \ellipticalarc % RULES: Draws rules, i.e., horizontal & vertical lines % \putrule % \!putdashedhline % \!putdashedvline % \!puthline % \!putsolidhline % \!putsolidvline % \!putvline % LINEAR ARC: Draws straight lines -- solid and dashed % \inboundscheckoff % \inboundscheckon % \!advancedashing % \!drawlinearsegment % \!initinboundscheck % \!linearsolid % \!lineardashed % \!ljoin % \!plotifinbounds % \!start % LOGTEN: Log_10 function % \!logten % PICTURES: Basic setups for PiCtures; \put commands % \accountingoff % \accountingon % \beginpicture % \endpicture % \endpicturesave % \lines % \multiput % \put % \setcoordinatemode % \setcoordinatesystem % \setdimensionmode % \stack % \Lines % \Xdistance % \Ydistance % \!dimenput % \!ifcoordmode % \!ifdimenmode % \!setcoordmode % \!setdimenmode % \!setputobject % PLOTTING: Things to do with plotting % \dontsavelinesandcurves % \replot % \savelinesandcurves % \setplotsymbol % \writesavefile % \!plot % PYTHAGORAS: Euclidean distance function % \placehypotenuse % \!Pythag % QUADRATIC ARC: Draws a quadratic arc % \!qjoin % ROTATIONS: Handles rotations % \startrotation % \stoprotation % \!rotateaboutpivot % \!rotateonly % SHADING: Handles shading % \setshadegrid % \setshadesymbol % \!lshade % \!qshade % \!starthshade % \!startvshade % TICKS: Draws ticks on graphs % \gridlines % \loggedticks % \nogridlines % \ticksin % \ticksout % \unloggesticks % ***************** END OF TABLE OF GROUPS OF MACROS ******************** \catcode`!=11 % ***** THIS MUST NEVER BE OMITTED % ******************************* % *** HACKS (Utility macros) *** % ******************************* % ** User commands % ** \PiC{P\kern-.12em\lower.5ex\hbox{I}\kern-.075emC} % ** \PiCTeX{\PiC\kern-.11em\TeX} % ** \placevalueinpts of in {CONTROL SEQUENCE} % ** Internal commands % ** \!ifnextchar{CHARACTER}{TRUE ACTION}{FALSE ACTION} % ** \!tfor NAME := LIST \do {BODY} % ** \!etfor NAME:= LIST \do {BODY} % ** \!cfor NAME := LIST \do {BODY} % ** \!ecfor NAME:= LIST \do {BODY} % ** \!ifempty{MACRO}{TRUE ACTION}{FALSE ACTION} % ** \!getnext\\ITEMfrom\LIST % ** \!getnextvalueof\DIMEN\from\LIST % ** \!copylist\LISTMACRO_A\to\LISTMACRO_B % ** \!wlet\CONTROL_SEQUENCE_A=\CONTROL_SEQUENCE_B % ** \!listaddon ITEM LIST % ** \!rightappendITEM\withCS\to\LISTMACRO % ** \!leftappendITEM\withCS\to\LISTMACRO % ** \!lop\LISTMACRO\to\ITEM % ** \!loop ... repeat % ** \!!loop ... repeat % ** \!removept{DIMENSION REGISTER}{CONTROL SEQUENCE} % ** \!mlap{...} % ** \!vmlap{...} % ** \!not{TEK if-CONDITION} % ** First, here are the the PiCTeX logo, and the syllable PiC: \def\PiC{P\kern-.12em\lower.5ex\hbox{I}\kern-.075emC} \def\PiCTeX{\PiC\kern-.11em\TeX} % ** The following macro expands to parameter #2 or parameter #3 according to % ** whether the next non-blank character following the macro is or is not #1. % ** Blanks following the macro are gobbled. \def\!ifnextchar#1#2#3{% \let\!testchar=#1% \def\!first{#2}% \def\!second{#3}% \futurelet\!nextchar\!testnext} \def\!testnext{% \ifx \!nextchar \!spacetoken \let\!next=\!skipspacetestagain \else \ifx \!nextchar \!testchar \let\!next=\!first \else \let\!next=\!second \fi \fi \!next} \def\\{\!skipspacetestagain} \expandafter\def\\ {\futurelet\!nextchar\!testnext} \def\\{\let\!spacetoken= } \\ % ** set \spacetoken to a space token % ** Borrow the "tfor" macro from Latex: % ** \!tfor NAME := LIST \do {BODY} % ** if, before expansion, LIST = T1 ... Tn, where each Ti is a token % ** or {...}, then executes BODY n times, with NAME = Ti on the % ** i-th iteration. Works for n=0. \def\!tfor#1:=#2\do#3{% \edef\!fortemp{#2}% \ifx\!fortemp\!empty \else \!tforloop#2\!nil\!nil\!!#1{#3}% \fi} \def\!tforloop#1#2\!!#3#4{% \def#3{#1}% \ifx #3\!nnil \let\!nextwhile=\!fornoop \else #4\relax \let\!nextwhile=\!tforloop \fi \!nextwhile#2\!!#3{#4}} % ** \!etfor NAME:= LIST\do {BODY} % ** This is like \!cfor, but LIST is any balanced token list whose complete % ** expansion has the form T1 ... Tn \def\!etfor#1:=#2\do#3{% \def\!!tfor{\!tfor#1:=}% \edef\!!!tfor{#2}% \expandafter\!!tfor\!!!tfor\do{#3}} % ** modify the Latex \tfor (token-for) loop to a \cfor (comma-for) loop. % ** \!cfor NAME := LIST \do {BODY} % ** if, before expansion, LIST = a1,a2,...an, then executes BODY n times, % ** with NAME = ai on the i-th iteration. Works for n=0. \def\!cfor#1:=#2\do#3{% \edef\!fortemp{#2}% \ifx\!fortemp\!empty \else \!cforloop#2,\!nil,\!nil\!!#1{#3}% \fi} \def\!cforloop#1,#2\!!#3#4{% \def#3{#1}% \ifx #3\!nnil \let\!nextwhile=\!fornoop \else #4\relax \let\!nextwhile=\!cforloop \fi \!nextwhile#2\!!#3{#4}} % ** \!ecfor NAME:= LIST\do {BODY} % ** This is like \!cfor, but LIST is any balanced token list whose complete % ** expansion has the form a1,a2,...,an. \def\!ecfor#1:=#2\do#3{% \def\!!cfor{\!cfor#1:=}% \edef\!!!cfor{#2}% \expandafter\!!cfor\!!!cfor\do{#3}} \def\!empty{} \def\!nnil{\!nil} \def\!fornoop#1\!!#2#3{} % ** \!ifempty{ARG}{TRUE ACTION}{FALSE ACTION} \def\!ifempty#1#2#3{% \edef\!emptyarg{#1}% \ifx\!emptyarg\!empty #2% \else #3% \fi} % ** \!getnext\\ITEMfrom\LIST % ** \LIST has the form \\{item1}\\{item2}\\{item3}...\\{itemk} % ** This routine sets \ITEM to item1, and cycles \LIST to % ** \\{item2}\\{item3}...\\{itemk}\\{item1} \def\!getnext#1\from#2{% \expandafter\!gnext#2\!#1#2}% \def\!gnext\\#1#2\!#3#4{% \def#3{#1}% \def#4{#2\\{#1}}% \ignorespaces} % ** \!getnextvalueof\DIMEN\from\LIST % ** Similar to !getnext. % ** \LIST has the form \\{dimen1}\\{dimen2}\\{dimen3} ... % ** \DIMEN is a dimension register % ** Works also for counts % \def\!getnextvalueof#1\from#2{% \expandafter\!gnextv#2\!#1#2}% \def\!gnextv\\#1#2\!#3#4{% #3=#1% \def#4{#2\\{#1}}% \ignorespaces} % ** \!copylist\LISTMACROA\to\LISTMACROB % ** makes the replacement text of LISTMACRO B identical to that of % ** list macro A. \def\!copylist#1\to#2{% \expandafter\!!copylist#1\!#2} \def\!!copylist#1\!#2{% \def#2{#1}\ignorespaces} % ** \!wlet\CSA=\CSB % ** lets control sequence \CSB = control sequence \CSA, and writes a % ** message to that effect in the log file using plain TEK's \wlog \def\!wlet#1=#2{% \let#1=#2 \wlog{\string#1=\string#2}} % ** \!listaddon ITEM LIST % ** LIST <-- LIST \\ ITEM \def\!listaddon#1#2{% \expandafter\!!listaddon#2\!{#1}#2} \def\!!listaddon#1\!#2#3{% \def#3{#1\\#2}} % ** \!rightappendITEM\to\LISTMACRO % ** \LISTMACRO --> \LISTMACRO\\{ITEM} %\def\!rightappend#1\to#2{\expandafter\!!rightappend#2\!{#1}#2} %\def\!!rightappend#1\!#2#3{\def#3{#1\\{#2}}} % ** \!rightappendITEM\withCS\to\LISTMACRO % ** \LISTMACRO --> \LISTMACRO||CS||{ITEM} \def\!rightappend#1\withCS#2\to#3{\expandafter\!!rightappend#3\!#2{#1}#3} \def\!!rightappend#1\!#2#3#4{\def#4{#1#2{#3}}} % ** \!leftappendITEM\withCS\to\LISTMACRO % ** \LISTMACRO --> CS||{ITEM}||\LISTMACRO \def\!leftappend#1\withCS#2\to#3{\expandafter\!!leftappend#3\!#2{#1}#3} \def\!!leftappend#1\!#2#3#4{\def#4{#2{#3}#1}} % ** \!lop\LISTMACRO\to\ITEM % ** \\{item1}\\{item2}\\{item3} ... --> \\{item2}\\{item3} ... % ** item1 --> \ITEM \def\!lop#1\to#2{\expandafter\!!lop#1\!#1#2} \def\!!lop\\#1#2\!#3#4{\def#4{#1}\def#3{#2}} % ** \!placeNUMBER\of\LISTMACRO\in\ITEM % ** the NUMBERth item of \LISTMACRO --> replacement text of \ITEM %\def\!place#1\of#2\in#3{\def#3{\outofrange}% %{\count0=#1\def\\##1{\advance\count0-1 \ifnum\count0=0 \gdef#3{##1}\fi}#2}} % ** Following code converts a commalist to a list macro, with all items % ** fully expanded. %\!ecfor\item:=\commalist\do{\expandafter\!rightappend\item\to\list} % ** \!loop ... repeat % ** This is exactly like TEX's \loop ... repeat. It can be used in nesting % ** two loops, without puting the inner one inside a group. \def\!loop#1\repeat{\def\!body{#1}\!iterate} \def\!iterate{\!body\let\!next=\!iterate\else\let\!next=\relax\fi\!next} % ** \!!loop ... repeat % ** This is exactly like TEX's \loop ... repeat. It can be used in nesting % ** two loops, without puting the inner one inside a group. \def\!!loop#1\repeat{\def\!!body{#1}\!!iterate} \def\!!iterate{\!!body\let\!!next=\!!iterate\else\let\!!next=\relax\fi\!!next} % (\multiput uses \!!loop) % ** \!removept{DIMENREG}{\CS} % ** Defines the control sequence CS to be the value (in points) in the % ** dimension register DIMENREG (but without the "pt" TEK usually adds) % ** E.g., after \dimen0=12.3pt \!removept\dimen0\A, \A expands to 12.3 \def\!removept#1#2{\edef#2{\expandafter\!!removePT\the#1}} {\catcode`p=12 \catcode`t=12 \gdef\!!removePT#1pt{#1}} % ** \pladevalueinpts of in {CONTROL SEQUENCE} \def\placevalueinpts of <#1> in #2 {% \!removept{#1}{#2}} % ** \!mlap{...} \!vmlap{...} % ** Center ... in a box of width 0. \def\!mlap#1{\hbox to 0pt{\hss#1\hss}} \def\!vmlap#1{\vbox to 0pt{\vss#1\vss}} % ** \!not{TEK if-CONDITION} % ** By a TEK if-CONDITION is meant something like % ** \ifnum\N<0, or \ifdim\A>\B % ** \!not produces an if-condition which is false if the original condition % ** is true, and true if the original condition is false. \def\!not#1{% #1\relax \!switchfalse \else \!switchtrue \fi \if!switch \ignorespaces} % ******************* % *** ALLOCATIONS *** % ******************* % This section allocates all the registers PiCTeX uses. Following % each allocation is a string of the form ....N.D...L......... ; % the various letters show which sections of PiCTeX make explicit % reference to that register, according to the following code: % H Hacks % A Areas % W arroWs % B Bars % X boXes % C Curves % D Dashpattterns % V diVision % E Ellipses % U rUles % L Linear arc % G loGten % P Pictures % O plOtting % Y pYthagoras % Q Quadratic arc % R Rotations % S Shading % T Ticks % Turn off messages from TeX's allocation macros \let\!!!wlog=\wlog % "\wlog" is defined in plain TeX \def\wlog#1{} \newdimen\headingtoplotskip %.A................. \newdimen\linethickness %.A..X....U........T \newdimen\longticklength %.A................T \newdimen\plotsymbolspacing %......D...L....Q... \newdimen\shortticklength %.A................T \newdimen\stackleading %.A..........P...... \newdimen\tickstovaluesleading %.A................T \newdimen\totalarclength %......D...L....Q... \newdimen\valuestolabelleading %.A................. \newbox\!boxA %.AW...............T \newbox\!boxB %..W................ \newbox\!picbox %............P...... \newbox\!plotsymbol %..........L..O..... \newbox\!putobject %............PO...S. \newbox\!shadesymbol %.................S. \newcount\!countA %.A....D..UL....Q.ST \newcount\!countB %......D..U.....Q.ST \newcount\!countC %...............Q..T \newcount\!countD %................... \newcount\!countE %.............O....T \newcount\!countF %.............O....T \newcount\!countG %..................T \newcount\!fiftypt %.........U......... \newcount\!intervalno %..........L....Q... \newcount\!npoints %..........L........ \newcount\!nsegments %.........U......... \newcount\!ntemp %............P...... \newcount\!parity %.................S. \newcount\!scalefactor %..................T \newcount\!tfs %.......V........... \newcount\!tickcase %..................T \newdimen\!Xleft %............P...... \newdimen\!Xright %............P...... \newdimen\!Xsave %.A................T \newdimen\!Ybot %............P...... \newdimen\!Ysave %.A................T \newdimen\!Ytop %............P...... \newdimen\!angle %........E.......... \newdimen\!arclength %..W......UL....Q... \newdimen\!areabloc %.A........L........ \newdimen\!arealloc %.A........L........ \newdimen\!arearloc %.A........L........ \newdimen\!areatloc %.A........L........ \newdimen\!bshrinkage %.................S. \newdimen\!checkbot %..........L........ \newdimen\!checkleft %..........L........ \newdimen\!checkright %..........L........ \newdimen\!checktop %..........L........ \newdimen\!dimenA %.AW.X.DVEUL..OYQRST \newdimen\!dimenB %....X.DVEU...O.QRS. \newdimen\!dimenC %..W.X.DVEU......RS. \newdimen\!dimenD %..W.X.DVEU....Y.RS. \newdimen\!dimenE %..W........G..YQ.S. \newdimen\!dimenF %...........G..YQ.S. \newdimen\!dimenG %...........G..YQ.S. \newdimen\!dimenH %...........G..Y..S. \newdimen\!dimenI %...BX.........Y.... \newdimen\!distacross %..........L....Q... \newdimen\!downlength %..........L........ \newdimen\!dp %.A..X.......P....S. \newdimen\!dshade %.................S. \newdimen\!dxpos %..W......U..P....S. \newdimen\!dxprime %...............Q... \newdimen\!dypos %..WB.....U..P...... \newdimen\!dyprime %...............Q... \newdimen\!ht %.A..X.......P....S. \newdimen\!leaderlength %......D..U......... \newdimen\!lshrinkage %.................S. \newdimen\!midarclength %...............Q... \newdimen\!offset %.A................T \newdimen\!plotheadingoffset %.A................. \newdimen\!plotsymbolxshift %..........L..O..... \newdimen\!plotsymbolyshift %..........L..O..... \newdimen\!plotxorigin %..........L..O..... \newdimen\!plotyorigin %..........L..O..... \newdimen\!rootten %...........G....... \newdimen\!rshrinkage %.................S. \newdimen\!shadesymbolxshift %.................S. \newdimen\!shadesymbolyshift %.................S. \newdimen\!tenAa %...........G....... \newdimen\!tenAc %...........G....... \newdimen\!tenAe %...........G....... \newdimen\!tshrinkage %.................S. \newdimen\!uplength %..........L........ \newdimen\!wd %....X.......P....S. \newdimen\!wmax %...............Q... \newdimen\!wmin %...............Q... \newdimen\!xB %...............Q... \newdimen\!xC %...............Q... \newdimen\!xE %..W.....E.L....Q.S. \newdimen\!xM %..W.....E......Q.S. \newdimen\!xS %..W.....E.L....Q.S. \newdimen\!xaxislength %.A................T \newdimen\!xdiff %..........L........ \newdimen\!xleft %............P...... \newdimen\!xloc %..WB.....U.......S. \newdimen\!xorigin %.A........L.P....S. \newdimen\!xpivot %................R.. \newdimen\!xpos %..........L.P..Q.ST \newdimen\!xprime %...............Q... \newdimen\!xright %............P...... \newdimen\!xshade %.................S. \newdimen\!xshift %..W.........PO...S. \newdimen\!xtemp %............P...... \newdimen\!xunit %.AWBX...EUL.P..QRS. \newdimen\!xxE %........E.......... \newdimen\!xxM %........E.......... \newdimen\!xxS %........E.......... \newdimen\!xxloc %..WB....EU......... \newdimen\!yB %...............Q... \newdimen\!yC %...............Q... \newdimen\!yE %..W.....E.L....Q... \newdimen\!yM %..W.....E......Q... \newdimen\!yS %..W.....E.L....Q... \newdimen\!yaxislength %.A................T \newdimen\!ybot %............P...... \newdimen\!ydiff %..........L........ \newdimen\!yloc %..WB.....U.......S. \newdimen\!yorigin %.A........L.P....S. \newdimen\!ypivot %................R.. \newdimen\!ypos %..........L.P..Q.ST \newdimen\!yprime %...............Q... \newdimen\!yshade %.................S. \newdimen\!yshift %..W.........PO...S. \newdimen\!ytemp %............P...... \newdimen\!ytop %............P...... \newdimen\!yunit %.AWBX...EUL.P..QRS. \newdimen\!yyE %........E.......... \newdimen\!yyM %........E.......... \newdimen\!yyS %........E.......... \newdimen\!yyloc %..WB....EU......... \newdimen\!zpt %.AWBX.DVEULGP.YQ.ST \newif\if!axisvisible %.A................. \newif\if!gridlinestoo %..................T \newif\if!keepPO %................... \newif\if!placeaxislabel %.A................. \newif\if!switch %H.................. \newif\if!xswitch %.A................T \newtoks\!axisLaBeL %.A................. \newtoks\!keywordtoks %.A................. \newwrite\!replotfile %.............O..... \newhelp\!keywordhelp{The keyword mentioned in the error message in unknown. Replace NEW KEYWORD in the indicated response by the keyword that should have been specified.} %.A................. % The following commands assign alternate names to some of the % above registers. "\!wlet" is defined in Hacks. \!wlet\!!origin=\!xM %.A................T \!wlet\!!unit=\!uplength %.A................T \!wlet\!Lresiduallength=\!dimenG %.........U......... \!wlet\!Rresiduallength=\!dimenF %.........U......... \!wlet\!axisLength=\!distacross %.A................T \!wlet\!axisend=\!ydiff %.A................T \!wlet\!axisstart=\!xdiff %.A................T \!wlet\!axisxlevel=\!arclength %.A................T \!wlet\!axisylevel=\!downlength %.A................T \!wlet\!beta=\!dimenE %...............Q... \!wlet\!gamma=\!dimenF %...............Q... \!wlet\!shadexorigin=\!plotxorigin %.................S. \!wlet\!shadeyorigin=\!plotyorigin %.................S. \!wlet\!ticklength=\!xS %..................T \!wlet\!ticklocation=\!xE %..................T \!wlet\!ticklocationincr=\!yE %..................T \!wlet\!tickwidth=\!yS %..................T \!wlet\!totalleaderlength=\!dimenE %.........U......... \!wlet\!xone=\!xprime %....X.............. \!wlet\!xtwo=\!dxprime %....X.............. \!wlet\!ySsave=\!yM %................... \!wlet\!ybB=\!yB %.................S. \!wlet\!ybC=\!yC %.................S. \!wlet\!ybE=\!yE %.................S. \!wlet\!ybM=\!yM %.................S. \!wlet\!ybS=\!yS %.................S. \!wlet\!ybpos=\!yyloc %.................S. \!wlet\!yone=\!yprime %....X.............. \!wlet\!ytB=\!xB %.................S. \!wlet\!ytC=\!xC %.................S. \!wlet\!ytE=\!downlength %.................S. \!wlet\!ytM=\!arclength %.................S. \!wlet\!ytS=\!distacross %.................S. \!wlet\!ytpos=\!xxloc %.................S. \!wlet\!ytwo=\!dyprime %....X.............. % Initial values for registers \!zpt=0pt % static \!xunit=1pt \!yunit=1pt \!arearloc=\!xunit \!areatloc=\!yunit \!dshade=5pt \!leaderlength=24in \!tfs=256 % static \!wmax=5.3pt % static \!wmin=2.7pt % static \!xaxislength=\!xunit \!xpivot=\!zpt \!yaxislength=\!yunit \!ypivot=\!zpt \plotsymbolspacing=.4pt \!dimenA=50pt \!fiftypt=\!dimenA % static \!rootten=3.162278pt % static \!tenAa=8.690286pt % static (A5) \!tenAc=2.773839pt % static (A3) \!tenAe=2.543275pt % static (A1) % Initial values for control sequences \def\!cosrotationangle{1} %................R.. \def\!sinrotationangle{0} %................R.. \def\!xpivotcoord{0} %................R.. \def\!xref{0} %............P...... \def\!xshadesave{0} %.................S. \def\!ypivotcoord{0} %................R.. \def\!yref{0} %............P...... \def\!yshadesave{0} %.................S. \def\!zero{0} %..................T % Reset TeX to report allocations \let\wlog=\!!!wlog % ************************************* % *** AREAS: Deals with plot areas *** % ************************************* % % ** User commands % ** \setplotarea x from LEFT XCOORD to RIGTH XCOORD, y from BOTTOM YCOORD % ** to TOP YCOORD % ** \axis BOTTOM-LEFT-TOP-RIGHT [SHIFTEDTO xy=COORD] [VISIBLE-INVISIBLE] % ** [LABEL {label}] [TICKS] / % ** \visibleaxes % ** \invisibleaxes % ** \plotheading {HEADING} % ** \grid {# of columns} {# of rows} % ** \normalgraphs % ** \normalgraphs % ** Sets defaults for graph setup. See Subsection 3.4 of manual. \def\normalgraphs{% \longticklength=.4\baselineskip \shortticklength=.25\baselineskip \tickstovaluesleading=.25\baselineskip \valuestolabelleading=.8\baselineskip \linethickness=.4pt \stackleading=.17\baselineskip \headingtoplotskip=1.5\baselineskip \visibleaxes \ticksout \nogridlines \unloggedticks} % % ** \setplotarea x from LEFT XCOORD to RIGTH XCOORD, y from BOTTOM YCOORD % ** to TOP YCOORD % ** Reserves space in PICBOX for a rectangular box with the indicated % ** coordinates. Must be specified before calls to \axis, % ** \grid, \plotheading. % ** See Subsection 3.1 of the manual. \def\setplotarea x from #1 to #2, y from #3 to #4 {% \!arealloc=\!M{#1}\!xunit \advance \!arealloc -\!xorigin \!areabloc=\!M{#3}\!yunit \advance \!areabloc -\!yorigin \!arearloc=\!M{#2}\!xunit \advance \!arearloc -\!xorigin \!areatloc=\!M{#4}\!yunit \advance \!areatloc -\!yorigin \!initinboundscheck \!xaxislength=\!arearloc \advance\!xaxislength -\!arealloc \!yaxislength=\!areatloc \advance\!yaxislength -\!areabloc \!plotheadingoffset=\!zpt \!dimenput {{\setbox0=\hbox{}\wd0=\!xaxislength\ht0=\!yaxislength\box0}} [bl] (\!arealloc,\!areabloc)} % % ** \visibleaxes, \invisibleaxes % ** Switches for setting visibility of subsequent axes. % ** See Subsection 3.2 of the manual. \def\visibleaxes{% \def\!axisvisibility{\!axisvisibletrue}} \def\invisibleaxes{% \def\!axisvisibility{\!axisvisiblefalse}} % % ** The next few macros enable the user to fix up an erroneous keyword % ** in the \axis command. % \newhelp is in ALLOCATIONS % \newhelp\!keywordhelp{The keyword mentioned in the error message in unknown. % Replace NEW KEYWORD in the indicated response by the keyword that % should have been specified.} \def\!fixkeyword#1{% \errhelp=\!keywordhelp \errmessage{Unrecognized keyword `#1': \the\!keywordtoks{NEW KEYWORD}'}} % \newtoks\!keywordtoks In ALLOCATIONS. \!keywordtoks={enter `i\fixkeyword} \def\fixkeyword#1{% \!nextkeyword#1 } % ** \axis BOTTOM-LEFT-TOP-RIGHT [SHIFTEDTO xy=COORD] [VISIBLE-INVISIBLE] % ** [LABEL {label}] [TICKS] / % ** Exactly one of the keywords BOTTOM, LEFT, TOP, RIGHT must be % ** specified. Axis is drawn along the indicated edge of the current % ** plot area, shifted if the SHIFTEDTO option is used, visible or % ** invisible according the selected option, with an optional LABEL, % ** and optional TICKS (see ticks.tex for the options avialabel with % ** TICKS). The TICKS option must be the last one specified. The \axis % ** MUST be terminated with a / followed by a space. % ** See Subsection 3.2 of the manual for more information. % ** The various options of the \axis command are processed by the % ** \!nextkeyword macro defined below. For example, % ** `\!nextkeyword shiftedto ' expands to `\!axisshiftedto'. \def\axis {% \def\!nextkeyword##1 {% \expandafter\ifx\csname !axis##1\endcsname \relax \def\!next{\!fixkeyword{##1}}% \else \def\!next{\csname !axis##1\endcsname}% \fi \!next}% \!offset=\!zpt \!axisvisibility \!placeaxislabelfalse \!nextkeyword} % ** This and the various macros that follow handle the keyword % ** specifications on the \axis command % ** See Subsection 3.2 of the manual. \def\!axisbottom{% \!axisylevel=\!areabloc \def\!tickxsign{0}% \def\!tickysign{-}% \def\!axissetup{\!axisxsetup}% \def\!axislabeltbrl{t}% \!nextkeyword} \def\!axistop{% \!axisylevel=\!areatloc \def\!tickxsign{0}% \def\!tickysign{+}% \def\!axissetup{\!axisxsetup}% \def\!axislabeltbrl{b}% \!nextkeyword} \def\!axisleft{% \!axisxlevel=\!arealloc \def\!tickxsign{-}% \def\!tickysign{0}% \def\!axissetup{\!axisysetup}% \def\!axislabeltbrl{r}% \!nextkeyword} \def\!axisright{% \!axisxlevel=\!arearloc \def\!tickxsign{+}% \def\!tickysign{0}% \def\!axissetup{\!axisysetup}% \def\!axislabeltbrl{l}% \!nextkeyword} \def\!axisshiftedto#1=#2 {% \if 0\!tickxsign \!axisylevel=\!M{#2}\!yunit \advance\!axisylevel -\!yorigin \else \!axisxlevel=\!M{#2}\!xunit \advance\!axisxlevel -\!xorigin \fi \!nextkeyword} \def\!axisvisible{% \!axisvisibletrue \!nextkeyword} \def\!axisinvisible{% \!axisvisiblefalse \!nextkeyword} \def\!axislabel#1 {% \!axisLaBeL={#1}% \!placeaxislabeltrue \!nextkeyword} \expandafter\def\csname !axis/\endcsname{% \!axissetup % This could done already by "ticks"; if so, now \relax \if!placeaxislabel \!placeaxislabel \fi \if +\!tickysign % ** (A "top" axis) \!dimenA=\!axisylevel \advance\!dimenA \!offset % ** dimA = top of the axis structure \advance\!dimenA -\!areatloc % ** dimA = excess over the plot area \ifdim \!dimenA>\!plotheadingoffset \!plotheadingoffset=\!dimenA % ** Greatest excess over the plot area \fi \fi} % ** \grid {c} {r} % ** Partitions the plot area into c columns and r rows; see Subsection 3.3 % ** of the manual. % ** (Other grid patterns can be drawn with the TICKS option of the \axis % ** command. \def\grid #1 #2 {% \!countA=#1\advance\!countA 1 \axis bottom invisible ticks length <\!zpt> andacross quantity {\!countA} / \!countA=#2\advance\!countA 1 \axis left invisible ticks length <\!zpt> andacross quantity {\!countA} / } % ** \plotheading{HEADING} % ** Places HEADING centered above the top of the plotarea (and above % ** any top axis ticks marks, tick labels, and axis label); see % ** Subsection 3.3 of the manual. \def\plotheading#1 {% \advance\!plotheadingoffset \headingtoplotskip \!dimenput {#1} [B] <.5\!xaxislength,\!plotheadingoffset> (\!arealloc,\!areatloc)} % ** From here on, the routines are internal. \def\!axisxsetup{% \!axisxlevel=\!arealloc \!axisstart=\!arealloc \!axisend=\!arearloc \!axisLength=\!xaxislength \!!origin=\!xorigin \!!unit=\!xunit \!xswitchtrue \if!axisvisible \!makeaxis \fi} \def\!axisysetup{% \!axisylevel=\!areabloc \!axisstart=\!areabloc \!axisend=\!areatloc \!axisLength=\!yaxislength \!!origin=\!yorigin \!!unit=\!yunit \!xswitchfalse \if!axisvisible \!makeaxis \fi} \def\!makeaxis{% \setbox\!boxA=\hbox{% (Make a pseudo-y[x] tick for an x[y]-axis) \beginpicture \!setdimenmode \setcoordinatesystem point at {\!zpt} {\!zpt} \putrule from {\!zpt} {\!zpt} to {\!tickysign\!tickysign\!axisLength} {\!tickxsign\!tickxsign\!axisLength} \endpicturesave <\!Xsave,\!Ysave>}% \wd\!boxA=\!zpt \!placetick\!axisstart} \def\!placeaxislabel{% \advance\!offset \valuestolabelleading \if!xswitch \!dimenput {\the\!axisLaBeL} [\!axislabeltbrl] <.5\!axisLength,\!tickysign\!offset> (\!axisxlevel,\!axisylevel) \advance\!offset \!dp % ** advance offset by the "tallness" \advance\!offset \!ht % ** of the label \else \!dimenput {\the\!axisLaBeL} [\!axislabeltbrl] <\!tickxsign\!offset,.5\!axisLength> (\!axisxlevel,\!axisylevel) \fi \!axisLaBeL={}} % ******************************* % *** ARROWS (Draws arrows) *** % ******************************* % % ** User commands % ** \arrow [MID FRACTION, BASE FRACTION] % ** [] from XFROM YFROM to XTO YTO % ** \betweenarrows {TEXT} [orientation & shift] from XFROM YFROM to XTO YTO % ** \arrow [MID FRACTION, BASE FRACTION] % ** [] from XFROM YFROM to XTO YTO % ** Draws an arrow from (XFROM,YFROM) to (XTO,YTO). The arrow head % ** is constructed two quadratic arcs, which extend back a distance % ** ARROW HEAD LENGTH (a dimension) on both sides of the arrow shaft. % ** All the way back the arcs are a distance BASE FRACTION*ARROW HEAD % ** LENGTH apart, while half-way back they are a distance MID FRACTION* % ** ARROW HEAD LENGTH apart. is optional, and has % ** its usual interpreation. See Subsection 5.4 of the manual. \def\arrow <#1> [#2,#3]{% \!ifnextchar<{\!arrow{#1}{#2}{#3}}{\!arrow{#1}{#2}{#3}<\!zpt,\!zpt> }} \def\!arrow#1#2#3<#4,#5> from #6 #7 to #8 #9 {% % % ** convert to dimensions \!xloc=\!M{#8}\!xunit \!yloc=\!M{#9}\!yunit \!dxpos=\!xloc \!dimenA=\!M{#6}\!xunit \advance \!dxpos -\!dimenA \!dypos=\!yloc \!dimenA=\!M{#7}\!yunit \advance \!dypos -\!dimenA \let\!MAH=\!M% ** save current c/d mode \!setdimenmode% ** go into dimension mode % \!xshift=#4\relax \!yshift=#5\relax% ** pick up shift \!reverserotateonly\!xshift\!yshift% ** back rotate shift \advance\!xshift\!xloc \advance\!yshift\!yloc % % ** draw shaft of arrow \!xS=-\!dxpos \advance\!xS\!xshift \!yS=-\!dypos \advance\!yS\!yshift \!start (\!xS,\!yS) \!ljoin (\!xshift,\!yshift) % % ** find 32*cosine and 32*sine of angle of rotation \!Pythag\!dxpos\!dypos\!arclength \!divide\!dxpos\!arclength\!dxpos \!dxpos=32\!dxpos \!removept\!dxpos\!!cos \!divide\!dypos\!arclength\!dypos \!dypos=32\!dypos \!removept\!dypos\!!sin % % ** construct arrowhead \!halfhead{#1}{#2}{#3}% ** draw half of arrow head \!halfhead{#1}{-#2}{-#3}% ** draw other half % \let\!M=\!MAH% ** restore old c/d mode \ignorespaces} % % ** draw half of arrow head \def\!halfhead#1#2#3{% \!dimenC=-#1% \divide \!dimenC 2 % ** half way back \!dimenD=#2\!dimenC% ** half the mid width \!rotate(\!dimenC,\!dimenD)by(\!!cos,\!!sin)to(\!xM,\!yM) \!dimenC=-#1% ** all the way back \!dimenD=#3\!dimenC \!dimenD=.5\!dimenD% ** half the full width \!rotate(\!dimenC,\!dimenD)by(\!!cos,\!!sin)to(\!xE,\!yE) \!start (\!xshift,\!yshift) \advance\!xM\!xshift \advance\!yM\!yshift \advance\!xE\!xshift \advance\!yE\!yshift \!qjoin (\!xM,\!yM) (\!xE,\!yE) \ignorespaces} % ** \betweenarrows {TEXT} [orientation & shift] from XFROM YFROM to XTO YTO % ** Makes things like <--- text --->, using arrow heads from TeX's fonts. % ** See Subsection 5.4 of the manual. \def\betweenarrows #1#2 from #3 #4 to #5 #6 {% \!xloc=\!M{#3}\!xunit \!xxloc=\!M{#5}\!xunit% \!yloc=\!M{#4}\!yunit \!yyloc=\!M{#6}\!yunit% \!dxpos=\!xxloc \advance\!dxpos by -\!xloc \!dypos=\!yyloc \advance\!dypos by -\!yloc \advance\!xloc .5\!dxpos \advance\!yloc .5\!dypos % \let\!MBA=\!M% ** save current coord\dimen mode \!setdimenmode% ** express locations in dimens \ifdim\!dypos=\!zpt \ifdim\!dxpos<\!zpt \!dxpos=-\!dxpos \fi \put {\!lrarrows{\!dxpos}{#1}}#2{} at {\!xloc} {\!yloc} \else \ifdim\!dxpos=\!zpt \ifdim\!dypos<\!zpt \!dypos=-\!zpt \fi \put {\!udarrows{\!dypos}{#1}}#2{} at {\!xloc} {\!yloc} \fi \fi \let\!M=\!MBA% ** restore previous c/d mode \ignorespaces} % ** Subroutine for left-right between arrows \def\!lrarrows#1#2{% #1=width, #2=text {\setbox\!boxA=\hbox{$\mkern-2mu\mathord-\mkern-2mu$}% \setbox\!boxB=\hbox{$\leftarrow$}\!dimenE=\ht\!boxB \setbox\!boxB=\hbox{}\ht\!boxB=2\!dimenE \hbox to #1{$\mathord\leftarrow\mkern-6mu \cleaders\copy\!boxA\hfil \mkern-6mu\mathord-$% \kern.4em $\vcenter{\box\!boxB}$$\vcenter{\hbox{#2}}$\kern.4em $\mathord-\mkern-6mu \cleaders\copy\!boxA\hfil \mkern-6mu\mathord\rightarrow$}}} % ** Subroutine for up-down between arrows \def\!udarrows#1#2{% #1=width, #2=text {\setbox\!boxB=\hbox{#2}% \setbox\!boxA=\hbox to \wd\!boxB{\hss$\vert$\hss}% \!dimenE=\ht\!boxA \advance\!dimenE \dp\!boxA \divide\!dimenE 2 \vbox to #1{\offinterlineskip \vskip .05556\!dimenE \hbox to \wd\!boxB{\hss$\mkern.4mu\uparrow$\hss}\vskip-\!dimenE \cleaders\copy\!boxA\vfil \vskip-\!dimenE\copy\!boxA \vskip\!dimenE\copy\!boxB\vskip.4em \copy\!boxA\vskip-\!dimenE \cleaders\copy\!boxA\vfil \vskip-\!dimenE \hbox to \wd\!boxB{\hss$\mkern.4mu\downarrow$\hss} \vskip .05556\!dimenE}}} % *************************** % *** BARS (Draws bars) *** % *************************** % % ** User commands: % ** \putbar [] breadth from XSTART YSTART % ** to XEND YEND % ** \setbars [] breadth baseline at XY = COORD % ** [baselabels ([B_ORIENTATION_x,B_ORIENTATION_y] )] % ** [endlabels ([E_ORIENTATION_x,E_ORIENTATION_y] )] % ** \putbar [] breadth from XSTART YSTART % ** to XEND YEND % ** Either XSTART=XEND or YSTART=YEND. Draws a rectangle between % ** (XSTART,YSTART) & (XEND,YEND). The "depth" of the rectangle % ** is determined by those two plot positions; its other % ** dimension "breadth" is specified by the dimension BREADTH. % ** See Subsection 4.2 of the manual. \def\putbar#1breadth <#2> from #3 #4 to #5 #6 {% \!xloc=\!M{#3}\!xunit \!xxloc=\!M{#5}\!xunit% \!yloc=\!M{#4}\!yunit \!yyloc=\!M{#6}\!yunit% \!dypos=\!yyloc \advance\!dypos by -\!yloc \!dimenI=#2 % \ifdim \!dimenI=\!zpt % ** If 0 breadth \putrule#1from {#3} {#4} to {#5} {#6} % ** Then draw line \else % ** Else, put in a rectangle \let\!MBar=\!M% ** save current c/d mode \!setdimenmode % ** go into dimension mode \divide\!dimenI 2 \ifdim \!dypos=\!zpt \advance \!yloc -\!dimenI % ** Equal y coordinates \advance \!yyloc \!dimenI \else \advance \!xloc -\!dimenI % ** Equal x coordinates \advance \!xxloc \!dimenI \fi \putrectangle#1corners at {\!xloc} {\!yloc} and {\!xxloc} {\!yyloc} \let\!M=\!MBar % ** restore c/d mode \fi \ignorespaces} % ** \setbars [] breadth baseline at XY = COORD % ** [baselabels ([B_ORIENTATION_x,B_ORIENTATION_y] )] % ** [endlabels ([E_ORIENTATION_x,E_ORIENTATION_y] )] % ** This command puts PiCTeX into the bar graph drawing mode described % ** in Subsection 4.4 of the manual. \def\setbars#1breadth <#2> baseline at #3 = #4 {% \edef\!barshift{#1}% \edef\!barbreadth{#2}% \edef\!barorientation{#3}% \edef\!barbaseline{#4}% \def\!bardobaselabel{\!bardoendlabel}% \def\!bardoendlabel{\!barfinish}% \let\!drawcurve=\!barcurve \!setbars} \def\!setbars{% \futurelet\!nextchar\!!setbars} \def\!!setbars{% \if b\!nextchar \def\!!!setbars{\!setbarsbget}% \else \if e\!nextchar \def\!!!setbars{\!setbarseget}% \else \def\!!!setbars{\relax}% \fi \fi \!!!setbars} \def\!setbarsbget baselabels (#1) {% \def\!barbaselabelorientation{#1}% \def\!bardobaselabel{\!!bardobaselabel}% \!setbars} \def\!setbarseget endlabels (#1) {% \edef\!barendlabelorientation{#1}% \def\!bardoendlabel{\!!bardoendlabel}% \!setbars} % ** \!barcurve % ** Draws a bargraph with preset values of barshift, barbreadth, % ** barorientation (x or y) and barbaseline (coordinate) \def\!barcurve #1 #2 {% \if y\!barorientation \def\!basexarg{#1}% \def\!baseyarg{\!barbaseline}% \else \def\!basexarg{\!barbaseline}% \def\!baseyarg{#2}% \fi \expandafter\putbar\!barshift breadth <\!barbreadth> from {\!basexarg} {\!baseyarg} to {#1} {#2} \def\!endxarg{#1}% \def\!endyarg{#2}% \!bardobaselabel} \def\!!bardobaselabel "#1" {% \put {#1}\!barbaselabelorientation{} at {\!basexarg} {\!baseyarg} \!bardoendlabel} \def\!!bardoendlabel "#1" {% \put {#1}\!barendlabelorientation{} at {\!endxarg} {\!endyarg} \!barfinish} \def\!barfinish{% \!ifnextchar/{\!finish}{\!barcurve}} % ******************************** % *** BOXES (Draws rectangles) *** % ******************************** % % ** User commands: % ** \putrectangle [] corners at XCOORD1 YCOORD1 % ** and XCOORD2 YCOORD2 % ** \shaderectangleson % ** \shaderectanglesoff % ** \frame [] {TEXT} % ** \rectangle % % % ** \putrectangle [] corners at XCOORD1 YCOORD1 % ** and XCOORD2 YCOORD2 % ** Draws a rectangle with corners at (X1,Y1), (X2,Y1), (X1,Y2), (X2,Y2) % ** Lines have thickness \linethickness, and overlap at the corners. % ** The optional field functions as with a \put command. % ** See Subsection 4.2 of the manual. \def\putrectangle{% \!ifnextchar<{\!putrectangle}{\!putrectangle<\!zpt,\!zpt> }} \def\!putrectangle<#1,#2> corners at #3 #4 and #5 #6 {% % % ** get locations \!xone=\!M{#3}\!xunit \!xtwo=\!M{#5}\!xunit% \!yone=\!M{#4}\!yunit \!ytwo=\!M{#6}\!yunit% \ifdim \!xtwo<\!xone \!dimenI=\!xone \!xone=\!xtwo \!xtwo=\!dimenI \fi \ifdim \!ytwo<\!yone \!dimenI=\!yone \!yone=\!ytwo \!ytwo=\!dimenI \fi \!dimenI=#1\relax \advance\!xone\!dimenI \advance\!xtwo\!dimenI \!dimenI=#2\relax \advance\!yone\!dimenI \advance\!ytwo\!dimenI \let\!MRect=\!M% ** save current coord/dimen mode \!setdimenmode % % ** shade rectangle if appropriate \!shaderectangle % % ** draw horizontal edges \!dimenI=.5\linethickness \advance \!xone -\!dimenI% ** adjust x-location to overlap corners \advance \!xtwo \!dimenI% ** ditto \putrule from {\!xone} {\!yone} to {\!xtwo} {\!yone} \putrule from {\!xone} {\!ytwo} to {\!xtwo} {\!ytwo} % % ** draw vertical edges \advance \!xone \!dimenI% ** restore original x-values \advance \!xtwo -\!dimenI% \advance \!yone -\!dimenI% ** adjust y-location to overlap corners \advance \!ytwo \!dimenI% ** ditto \putrule from {\!xone} {\!yone} to {\!xone} {\!ytwo} \putrule from {\!xtwo} {\!yone} to {\!xtwo} {\!ytwo} % \let\!M=\!MRect% ** restore coord/dimen mode \ignorespaces} % ** \shaderectangleson % ** Subsequent rectangles will be shaded according to % ** the current shading pattern. Affects \putrectangle, \putbar, % ** \frame, \sethistograms, and \setbars. See Subsection 7.5 of the manual. \def\shaderectangleson{% \def\!shaderectangle{\!!shaderectangle}% \ignorespaces} % ** \shaderectanglesoff % ** Suppresses \shaderectangleson. The default. \def\shaderectanglesoff{% \def\!shaderectangle{}% \ignorespaces} \shaderectanglesoff % ** The following internal routine shades the current rectangle, when % ** \!shaderectangle = \!!shaderectangle . \def\!!shaderectangle{% \!dimenA=\!xtwo \advance \!dimenA -\!xone \!dimenB=\!ytwo \advance \!dimenB -\!yone \ifdim \!dimenA<\!dimenB \!startvshade (\!xone,\!yone,\!ytwo) \!lshade (\!xtwo,\!yone,\!ytwo) \else \!starthshade (\!yone,\!xone,\!xtwo) \!lshade (\!ytwo,\!xone,\!xtwo) \fi \ignorespaces} % ** \frame [] {TEXT} % ** Draws a frame of thickness linethickness about the box enclosing % ** TEXT; the frame is separated from the box by a distance of % ** SEPARATION. The result is an hbox with the same baseline as TEXT. % ** If is omitted, you get the effect of <0pt>. % ** See Subsection 4.2 of the manual. \def\frame{% \!ifnextchar<{\!frame}{\!frame<\!zpt> }} \long\def\!frame<#1> #2{% \beginpicture \setcoordinatesystem units <1pt,1pt> point at 0 0 \put {#2} [Bl] at 0 0 \!dimenA=#1\relax \!dimenB=\!wd \advance \!dimenB \!dimenA \!dimenC=\!ht \advance \!dimenC \!dimenA \!dimenD=\!dp \advance \!dimenD \!dimenA \let\!MFr=\!M \!setdimenmode \putrectangle corners at {-\!dimenA} {-\!dimenD} and {\!dimenB} {\!dimenC} \!setcoordmode \let\!M=\!MFr \endpicture \ignorespaces} % ** \rectangle % ** Constructs a rectangle of width WIDTH and heigth HEIGHT. % ** See Subsection 4.2 of the manual. \def\rectangle <#1> <#2> {% \setbox0=\hbox{}\wd0=#1\ht0=#2\frame {\box0}} % ********************************************* % *** CURVES (Upper level \plot commands) *** % ********************************************* % % ** User commands % ** \plot DATA / % ** \plot "FILE NAME" % ** \setquadratic % ** \setlinear % ** \sethistograms % ** \vshade ... % ** \hshade ... % \plot: multi-purpose command. Draws histograms, bar graphs, piecewise-linear % or piecewise quadratic curves, depending on the setting of \!drawcurve. % See Subsections 4.3-4.5, 5.1, 5.2 of the manual. \def\plot{% \!ifnextchar"{\!plotfromfile}{\!drawcurve}} \def\!plotfromfile"#1"{% \expandafter\!drawcurve \input #1 /} % Command to set piecewise quadratic mode % See Subsections 5.1, 7.3, and 7.4 of the manual. \def\setquadratic{% \let\!drawcurve=\!qcurve \let\!!Shade=\!!qShade \let\!!!Shade=\!!!qShade} % Command to set piecewise linear mode % See Subsections 5.1, 7.3, and 7.4 of the manual. \def\setlinear{% \let\!drawcurve=\!lcurve \let\!!Shade=\!!lShade \let\!!!Shade=\!!!lShade} % Command to set histogram mode % See Subsection 4.3 of the manual. \def\sethistograms{% \let\!drawcurve=\!hcurve} % Commands to cycle through list of coordinates in piecewise quadratic % interpolation mode \def\!qcurve #1 #2 {% \!start (#1,#2) \!Qjoin} \def\!Qjoin#1 #2 #3 #4 {% \!qjoin (#1,#2) (#3,#4) % \!qjoin is defined in QUADRATIC \!ifnextchar/{\!finish}{\!Qjoin}} % Commands to cycle through list of coordinates in piecewise linear % interpolation mode \def\!lcurve #1 #2 {% \!start (#1,#2) \!Ljoin} \def\!Ljoin#1 #2 {% \!ljoin (#1,#2) % \!ljoin is defined in LINEAR \!ifnextchar/{\!finish}{\!Ljoin}} \def\!finish/{\ignorespaces} % Command to cycle through list of coordinates in histogram mode \def\!hcurve #1 #2 {% \edef\!hxS{#1}% \edef\!hyS{#2}% \!hjoin} \def\!hjoin#1 #2 {% \putrectangle corners at {\!hxS} {\!hyS} and {#1} {#2} \edef\!hxS{#1}% \!ifnextchar/{\!finish}{\!hjoin}} % \vshade: See Subsection 7.3 of the manual. \def\vshade #1 #2 #3 {% \!startvshade (#1,#2,#3) \!Shadewhat} % \hshade: See Subsection 7.4 of the manual. \def\hshade #1 #2 #3 {% \!starthshade (#1,#2,#3) \!Shadewhat} % Commands to cycle through coordinates and optional "edge effect" % fields while shading. \def\!Shadewhat{% \futurelet\!nextchar\!Shade} \def\!Shade{% \if <\!nextchar \def\!nextShade{\!!Shade}% \else \if /\!nextchar \def\!nextShade{\!finish}% \else \def\!nextShade{\!!!Shade}% \fi \fi \!nextShade} \def\!!lShade<#1> #2 #3 #4 {% \!lshade <#1> (#2,#3,#4) % \!lshade is defined in SHADING \!Shadewhat} \def\!!!lShade#1 #2 #3 {% \!lshade (#1,#2,#3) \!Shadewhat} \def\!!qShade<#1> #2 #3 #4 #5 #6 #7 {% \!qshade <#1> (#2,#3,#4) (#5,#6,#7) % \!qshade is defined in SHADING \!Shadewhat} \def\!!!qShade#1 #2 #3 #4 #5 #6 {% \!qshade (#1,#2,#3) (#4,#5,#6) \!Shadewhat} % ** Set default interpolation mode \setlinear % ******************************************** % *** DASHPATTERNS (Sets up dash patterns) *** % ******************************************** % ** User commands: % ** \setdashpattern % ** \setdots % ** \setdotsnear for % ** \setdashes % ** \setdashesnear for % ** \setsolid % ** \findlength {CURVE CMDS} % ** Internal commands: % ** \!dashingon % ** \!dashingoff % ** Dash patterns are specified by a balanced token list whose complete % ** expansion has the form: DIMEN1,DIMEN2,DIMEN3,DIMEN4,... ; this produces % ** an arc of length DIMEN1, a skip of length DIMEN2, an arc of length % ** DIMEN3, a skip of length DIMEN4, ... . Any number of DIMEN values may % ** be given. The pattern is repeated as many times (perhaps fractional) % ** as necessary to draw the curve. % ** A dash pattern remains in effect until it is overridden by a call to % ** \setdashpattern, or to \setdots, \setdotsnear ... , \setdashes, % ** \setdashesnear ... , or \setsolid. % ** Solid lines are the default. % ** \def\setdashpattern % ** The following routine converts a balanced list of tokens whose % ** complete expansion has the form DIMEN1,DIMEN2, ... , DIMENk into % ** three list macros that are used in drawing dashed rules and curves: % ** !Flist: \!Rule{DIMEN1}\!Skip{DIMEN2}\!Rule{DIMEN3}\!Skip{DIMEN4} ... % ** !Blist: ...\!Skip{DIMEN4}\!Rule{DIMEN3}\!Skip{DIMEN2}\!Rule{DIMEN1} % ** !UDlist: \\{DIMEN1}\\{DIMEN2}\\{DIMEN3}\\{DIMEN4} ...; % ** calculates \!leaderlength := DIMEN1 + ... + DIMENk; and % ** sets the curve drawing routines to dash mode. % ** Those lists are used by the curve drawing routines. % ** Dimenj ... may be given as an explicit dimension (e.g., 5pt), or % ** as an expression involving a dimension register (e.g., -2.5\dimen0). % ** See Subsection 6.2 of the manual \def\setdashpattern <#1>{% \def\!Flist{}\def\!Blist{}\def\!UDlist{}% \!countA=0 \!ecfor\!item:=#1\do{% \!dimenA=\!item\relax \expandafter\!rightappend\the\!dimenA\withCS{\\}\to\!UDlist% \advance\!countA 1 \ifodd\!countA \expandafter\!rightappend\the\!dimenA\withCS{\!Rule}\to\!Flist% \expandafter\!leftappend\the\!dimenA\withCS{\!Rule}\to\!Blist% \else \expandafter\!rightappend\the\!dimenA\withCS{\!Skip}\to\!Flist% \expandafter\!leftappend\the\!dimenA\withCS{\!Skip}\to\!Blist% \fi}% \!leaderlength=\!zpt \def\!Rule##1{\advance\!leaderlength ##1}% \def\!Skip##1{\advance\!leaderlength ##1}% \!Flist% \ifdim\!leaderlength>\!zpt \else \def\!Flist{\!Skip{24in}}\def\!Blist{\!Skip{24in}}\ignorespaces \def\!UDlist{\\{\!zpt}\\{24in}}\ignorespaces \!leaderlength=24in \fi \!dashingon} % ** \!dashingon -- puts the curve drawing routines into dash mode % ** \!dashingoff -- puts the curve drawing routines into solid mode % ** These are internal commands, invoked by \setdashpattern and \setsolid \def\!dashingon{% \def\!advancedashing{\!!advancedashing}% \def\!drawlinearsegment{\!lineardashed}% \def\!puthline{\!putdashedhline}% \def\!putvline{\!putdashedvline}% % \def\!putsline{\!putdashedsline}% \ignorespaces}% \def\!dashingoff{% \def\!advancedashing{\relax}% \def\!drawlinearsegment{\!linearsolid}% \def\!puthline{\!putsolidhline}% \def\!putvline{\!putsolidvline}% % \def\!putsline{\!putsolidsline}% \ignorespaces} % ** \setdots -- sets up a dot/skip pattern where dot (actually % ** the current plotsymbol) is plunked down once for every LENGTH % ** traveled along the curve. LENGTH defaults to 5pt. % ** See Subsection 6.1 of the manual. \def\setdots{% \!ifnextchar<{\!setdots}{\!setdots<5pt>}} \def\!setdots<#1>{% \!dimenB=#1\advance\!dimenB -\plotsymbolspacing \ifdim\!dimenB<\!zpt \!dimenB=\!zpt \fi \setdashpattern <\plotsymbolspacing,\!dimenB>} % ** \setdotsnear for % ** sets up a dot pattern where the dots are approximately LENGTH apart, % ** the total length of the pattern is ARC LENGTH, and the pattern % ** begins and ends with a dot. See Subsection 6.3 of the manual. \def\setdotsnear <#1> for <#2>{% \!dimenB=#2\relax \advance\!dimenB -.05pt \!dimenC=#1\relax \!countA=\!dimenC \!dimenD=\!dimenB \advance\!dimenD .5\!dimenC \!countB=\!dimenD \divide \!countB \!countA \ifnum 1>\!countB \!countB=1 \fi \divide\!dimenB \!countB \setdots <\!dimenB>} % ** \setdashes -- sets up a dash/skip pattern where the dash % ** and the skip are each of length LENGTH (the dash is formed by % ** plunking down the current plotsymbol over an arc of length LENGTH % ** and so may actually be longer than LENGTH. LENGTH defaults to 5pt. % ** See Subsection 6.1 of the manual. \def\setdashes{% \!ifnextchar<{\!setdashes}{\!setdashes<5pt>}} \def\!setdashes<#1>{\setdashpattern <#1,#1>} % ** \setdashesnear ... % ** Like \setdotsnear; the pattern begins and ends with a dash. % ** See Subsection 6.3 of the manual. \def\setdashesnear <#1> for <#2>{% \!dimenB=#2\relax \!dimenC=#1\relax \!countA=\!dimenC \!dimenD=\!dimenB \advance\!dimenD .5\!dimenC \!countB=\!dimenD \divide \!countB \!countA \ifodd \!countB \else \advance \!countB 1 \fi \divide\!dimenB \!countB \setdashes <\!dimenB>} % ** \setsolid -- puts the curve drawing routines in "solid line" mode, % ** the default mode. See Subsection 6.1 of the manual. \def\setsolid{% \def\!Flist{\!Rule{24in}}\def\!Blist{\!Rule{24in}}% \def\!UDlist{\\{24in}\\{\!zpt}}% \!dashingoff} \setsolid % ** \findlength {CURVE CMDS} % ** PiCTeX executes the \start, \ljoin, and \qjoin cmds comprising % ** CURVE CMDS without plotting anything, but stashes the length % ** of the phantom curve away in \totalarclength. % ** See Subsection 6.3 of the manual. \def\findlength#1{% \begingroup \setdashpattern <0pt, \maxdimen> \setplotsymbol ({}) \dontsavelinesandcurves #1% \endgroup \ignorespaces} % ************************************************************* % *** DIVISION (Does long division of dimension registers) *** % ************************************************************* % ** User command: % ** \Divide {DIVIDEND} by {DIVISOR} forming {RESULT} % ** Internal command % ** \!divide{DIVIDEND}{DIVISOR}{RESULT} % ** \!divide DIVIDEND [by] DIVISOR [to get] ANSWER % ** Divides the dimension DIVIDEND by the dimension DIVISOR, placing the % ** quotient in the dimension register ANSWER. Values are understood to % ** be in points. E.g. 12.5pt/1.4pt=8.92857pt. % ** Quotient is accurate to 1/65536pt=2**[-16]pt % ** |DIVISOR| should be < 2048pt (about 28 inches). \def\!divide#1#2#3{% \!dimenB=#1% ** dimB holds current remainder (r) \!dimenC=#2% ** dimC holds divisor (d) \!dimenD=\!dimenB% ** dimD holds quotient q=r/d for this \divide \!dimenD \!dimenC% ** step, in units of scaled pts \!dimenA=\!dimenD% ** dimA eventually holds answer (a) \multiply\!dimenD \!dimenC% ** r <-- r - dq \advance\!dimenB -\!dimenD% ** First step complete. Have integer part % ** of a, and corresponding remainder. \!dimenD=\!dimenC% ** Temporarily use dimD to hold |d| \ifdim\!dimenD<\!zpt \!dimenD=-\!dimenD \fi \ifdim\!dimenD<64pt% ** Branch on the magnitude of |d| \!divstep[\!tfs]\!divstep[\!tfs]% \else \!!divide \fi #3=\!dimenA\ignorespaces} % ** The following code handles divisors d with % ** (1) .88in = 64pt <= d < 256pt = 3.54in % ** (2) 3.54in = 256pt <= d < 2048pt = 28.34in % ** Anything bigger than that may result in an overflow condition. % ** For our purposes, we should never even see case (2). \def\!!divide{% \ifdim\!dimenD<256pt \!divstep[64]\!divstep[32]\!divstep[32]% \else \!divstep[8]\!divstep[8]\!divstep[8]\!divstep[8]\!divstep[8]% \!dimenA=2\!dimenA \fi} % ** The following macro does the real long division work. \def\!divstep[#1]{% ** #1 = "B" \!dimenB=#1\!dimenB% ** r <-- B*r \!dimenD=\!dimenB% ** dimD holds quotient q=r/d for this \divide \!dimenD by \!dimenC% ** step, in units of scaled pts \!dimenA=#1\!dimenA% ** a <-- B*a + q \advance\!dimenA by \!dimenD% \multiply\!dimenD by \!dimenC% ** r <-- r - dq \advance\!dimenB by -\!dimenD} % ** \Divide: See Subsection 9.3 of the manual. \def\Divide <#1> by <#2> forming <#3> {% \!divide{#1}{#2}{#3}} % ********************************************* % *** ELLIPSES (Draws ellipses and circles) *** % ********************************************* % ** User commands % ** \ellipticalarc axes ratio A:B DEGREES degrees from XSTART YSTART % ** center at XCENTER YCENTER % ** \circulararc DEGREES degrees from XSTART YSTART % ** center at XCENTER YCENTER % ** Internal command % ** \!sinandcos{32*ANGLE in radians}{32*SIN}{32*COS} % ** \ellipticalarc axes ratio A:B DEGREES degrees from XSTART YSTART % ** center at XCENTER YCENTER % ** Draws a elliptical arc starting at the coordinate point (XSTART,YSTART). % ** The center of the ellipse of which the arc is a segment is at % ** (XCENTER,YCENTER). % ** The arc extends through an angle of DEGREES degrees (may be + or -). % ** A:B is the ratio of the length of the xaxis to the length of % ** the yaxis of the ellipse % ** Sqrt{[(XSTART-XCENTER)/A]**2 + [(YSTART-YCENTER)/B]**2} % ** must be < 512pt (about 7in). % ** Doesn't modify the dimensions (ht, dp, wd) of the PiCture under % ** construction. % ** \circulararc -- See Subsection 5.3 of the manual. \def\circulararc{% \ellipticalarc axes ratio 1:1 } % ** \ellipticalarc -- See Subsection 5.3 of the manual. \def\ellipticalarc axes ratio #1:#2 #3 degrees from #4 #5 center at #6 #7 {% \!angle=#3pt\relax% ** get angle \ifdim\!angle>\!zpt \def\!sign{}% ** counterclockwise \else \def\!sign{-}\!angle=-\!angle% ** clockwise \fi \!xxloc=\!M{#6}\!xunit% ** convert CENTER to dimension \!yyloc=\!M{#7}\!yunit \!xxS=\!M{#4}\!xunit% ** get STARTing point on rim of ellipse \!yyS=\!M{#5}\!yunit \advance\!xxS -\!xxloc% ** make center of ellipse (0,0) \advance\!yyS -\!yyloc \!divide\!xxS{#1pt}\!xxS % ** scale point on ellipse to point on \!divide\!yyS{#2pt}\!yyS % corresponding circle % \let\!MC=\!M% ** save current c/d mode \!setdimenmode% ** go into dimension mode % \!xS=#1\!xxS \advance\!xS\!xxloc \!yS=#2\!yyS \advance\!yS\!yyloc \!start (\!xS,\!yS)% \!loop\ifdim\!angle>14.9999pt% ** draw in major portion of ellipse \!rotate(\!xxS,\!yyS)by(\!cos,\!sign\!sin)to(\!xxM,\!yyM) \!rotate(\!xxM,\!yyM)by(\!cos,\!sign\!sin)to(\!xxE,\!yyE) \!xM=#1\!xxM \advance\!xM\!xxloc \!yM=#2\!yyM \advance\!yM\!yyloc \!xE=#1\!xxE \advance\!xE\!xxloc \!yE=#2\!yyE \advance\!yE\!yyloc \!qjoin (\!xM,\!yM) (\!xE,\!yE) \!xxS=\!xxE \!yyS=\!yyE \advance \!angle -15pt \repeat \ifdim\!angle>\!zpt% ** complete remaining arc, if any \!angle=100.53096\!angle% ** convert angle to radians, divide \divide \!angle 360 % ** by 2, and multiply by 32 \!sinandcos\!angle\!!sin\!!cos% ** get 32*sin & 32*cos \!rotate(\!xxS,\!yyS)by(\!!cos,\!sign\!!sin)to(\!xxM,\!yyM) \!rotate(\!xxM,\!yyM)by(\!!cos,\!sign\!!sin)to(\!xxE,\!yyE) \!xM=#1\!xxM \advance\!xM\!xxloc \!yM=#2\!yyM \advance\!yM\!yyloc \!xE=#1\!xxE \advance\!xE\!xxloc \!yE=#2\!yyE \advance\!yE\!yyloc \!qjoin (\!xM,\!yM) (\!xE,\!yE) \fi % \let\!M=\!MC% ** restore c/d mode \ignorespaces}% ** if appropriate % ** \!rotate(XREG,YREG)by(32cos,32sin)to(XXREG,YYREG) % ** rotates (XREG,YREG) by angle with specfied scaled cos & sin to % ** (XXREG,YYREG). Uses \!dimenA & \!dimenB as scratch registers. \def\!rotate(#1,#2)by(#3,#4)to(#5,#6){% \!dimenA=#3#1\advance \!dimenA -#4#2% ** Rcos(x+t)=Rcosx*cost - Rsinx*sint \!dimenB=#3#2\advance \!dimenB #4#1% ** Rsin(x+t)=Rsinx*cost + Rcosx*sint \divide \!dimenA 32 \divide \!dimenB 32 #5=\!dimenA #6=\!dimenB \ignorespaces} \def\!sin{4.17684}% ** 32*sin(pi/24) (pi/24=7.5deg) \def\!cos{31.72624}% ** 32*cos(pi/24) % ** \!sinandcos{32*ANGLE in radians}{\SINCS}{\COSCS} % ** Computes the 32*sine and 32*cosine of a small ANGLE expressed in % ** radians/32 and puts these values in the replacement texts of % ** \SINCS and \COSCS \def\!sinandcos#1#2#3{% \!dimenD=#1% ** angle is expressed in radians/32: 1pt = 1/32rad \!dimenA=\!dimenD% ** dimA will eventually contain 32sin(angle)in pts \!dimenB=32pt% ** dimB will eventually contain 32cos(angle)in pts \!removept\!dimenD\!value% ** get value of 32*angle, without "pt" \!dimenC=\!dimenD% ** holds 32*angle**i/i! in pts \!dimenC=\!value\!dimenC \divide\!dimenC by 64 % ** now 32*angle**2/2 \advance\!dimenB by -\!dimenC% ** 32-32*angle**2/2 \!dimenC=\!value\!dimenC \divide\!dimenC by 96 % ** now 32*angle**3/3! \advance\!dimenA by -\!dimenC% ** now 32*(angle-angle**3/6) \!dimenC=\!value\!dimenC \divide\!dimenC by 128 % ** now 32*angle**4/4! \advance\!dimenB by \!dimenC% \!removept\!dimenA#2% ** set 32*sin(angle) \!removept\!dimenB#3% ** set 32*cos(angle) \ignorespaces} % ***************************************************************** % *** RULES (Draws rules, i.e., horizontal & vertical lines) *** % ***************************************************************** % ** User command: % ** \putrule [] from XCOORD1 YCOORD1 % ** to XCOORD2 YCOORD2 % ** Internal commands: % ** \!puthline [] (h = horizontal) % ** Set by dashpat to either: \!putsolidhline or \!putdashedhline % ** \!putvline [] (v = vertical) % ** Either: \!putsolidvline or \!putdashedvline % ** \putrule [] from XCOORD1 YCOORD1 % ** to XCOORD2 YCOORD2 % ** Draws a rule -- dashed or solid depending on the current dash pattern -- % ** from (X1,Y1) to (X2,Y2). Uses TEK's \hrule & \vrule & \leaders % ** constructions to handle horizontal & vertical lines efficiently both % ** in terms of execution time and space in the DVI file. % ** See Subsection 4.1 of the manual. \def\putrule#1from #2 #3 to #4 #5 {% \!xloc=\!M{#2}\!xunit \!xxloc=\!M{#4}\!xunit% \!yloc=\!M{#3}\!yunit \!yyloc=\!M{#5}\!yunit% \!dxpos=\!xxloc \advance\!dxpos by -\!xloc \!dypos=\!yyloc \advance\!dypos by -\!yloc % \ifdim\!dypos=\!zpt \def\!!Line{\!puthline{#1}}\ignorespaces \else \ifdim\!dxpos=\!zpt \def\!!Line{\!putvline{#1}}\ignorespaces \else \def\!!Line{} \fi \fi \let\!ML=\!M% ** save current coord\dimen mode \!setdimenmode% ** express locations in dimens \!!Line% \let\!M=\!ML% ** restore previous c/d mode \ignorespaces} % ** \!putsolidhline [] % ** Place horizontal solid line \def\!putsolidhline#1{% \ifdim\!dxpos>\!zpt \put{\!hline\!dxpos}#1[l] at {\!xloc} {\!yloc} \else \put{\!hline{-\!dxpos}}#1[l] at {\!xxloc} {\!yyloc} \fi \ignorespaces} % ** \!putsolidvline [shifted ] % ** Place vertical solid line \def\!putsolidvline#1{% \ifdim\!dypos>\!zpt \put{\!vline\!dypos}#1[b] at {\!xloc} {\!yloc} \else \put{\!vline{-\!dypos}}#1[b] at {\!xxloc} {\!yyloc} \fi \ignorespaces} \def\!hline#1{\hbox to #1{\leaders \hrule height\linethickness\hfill}} \def\!vline#1{\vbox to #1{\leaders \vrule width\linethickness\vfill}} % ** \!putdashedhline [] % ** Place dashed horizontal line \def\!putdashedhline#1{% \ifdim\!dxpos>\!zpt \!DLsetup\!Flist\!dxpos \put{\hbox to \!totalleaderlength{\!hleaders}\!hpartialpattern\!Rtrunc} #1[l] at {\!xloc} {\!yloc} \else \!DLsetup\!Blist{-\!dxpos} \put{\!hpartialpattern\!Ltrunc\hbox to \!totalleaderlength{\!hleaders}} #1[r] at {\!xloc} {\!yloc} \fi \ignorespaces} % ** \!putdashedhline [] % ** Place dashed vertical line \def\!putdashedvline#1{% \!dypos=-\!dypos% ** vertical leaders go from top to bottom \ifdim\!dypos>\!zpt \!DLsetup\!Flist\!dypos \put{\vbox{\vbox to \!totalleaderlength{\!vleaders} \!vpartialpattern\!Rtrunc}}#1[t] at {\!xloc} {\!yloc} \else \!DLsetup\!Blist{-\!dypos} \put{\vbox{\!vpartialpattern\!Ltrunc \vbox to \!totalleaderlength{\!vleaders}}}#1[b] at {\!xloc} {\!yloc} \fi \ignorespaces} % ** The rest of the macros in this section are subroutines used by % ** \!putdashedhline and \!putdashedvline. \def\!DLsetup#1#2{% ** Dashed-Line set up \let\!RSlist=#1% ** set !Rule-Skip list \!countB=#2% ** convert rule length to integer (number of sps) \!countA=\!leaderlength% ** ditto, leaderlength \divide\!countB by \!countA% ** number of complete leader units \!totalleaderlength=\!countB\!leaderlength \!Rresiduallength=#2% \advance \!Rresiduallength by -\!totalleaderlength% \** excess length \!Lresiduallength=\!leaderlength \advance \!Lresiduallength by -\!Rresiduallength \ignorespaces} \def\!hleaders{% \def\!Rule##1{\vrule height\linethickness width##1}% \def\!Skip##1{\hskip##1}% \leaders\hbox{\!RSlist}\hfill} \def\!hpartialpattern#1{% \!dimenA=\!zpt \!dimenB=\!zpt \def\!Rule##1{#1{##1}\vrule height\linethickness width\!dimenD}% \def\!Skip##1{#1{##1}\hskip\!dimenD}% \!RSlist} \def\!vleaders{% \def\!Rule##1{\hrule width\linethickness height##1}% \def\!Skip##1{\vskip##1}% \leaders\vbox{\!RSlist}\vfill} \def\!vpartialpattern#1{% \!dimenA=\!zpt \!dimenB=\!zpt \def\!Rule##1{#1{##1}\hrule width\linethickness height\!dimenD}% \def\!Skip##1{#1{##1}\vskip\!dimenD}% \!RSlist} \def\!Rtrunc#1{\!trunc{#1}>\!Rresiduallength} \def\!Ltrunc#1{\!trunc{#1}<\!Lresiduallength} \def\!trunc#1#2#3{% \!dimenA=\!dimenB \advance\!dimenB by #1% \!dimenD=\!dimenB \ifdim\!dimenD#2#3\!dimenD=#3\fi \!dimenC=\!dimenA \ifdim\!dimenC#2#3\!dimenC=#3\fi \advance \!dimenD by -\!dimenC} % **************************************************************** % *** LINEAR ARC (Draws straight lines -- solid and dashed) *** % **************************************************************** % ** User commands % ** \inboundscheckoff % ** \inboundscheckon % ** Internal commands % ** \!start (XCOORD,YCOORD) % ** \!ljoin (XCOORD,YCOORD) % ** \!drawlinearsegment -- set by \dashpat to either % ** \!linearsolid or \!lineardashed % ** \!advancedashing -- set by \dashpat to either % ** \relax or \!!advancedashing % ** \!plotifinbounds -- set by \inboundscheck off/on to either % ** \!plot or \!!plotifinbounds % ** \!initinboundscheck -- set by \inboundscheck off/on to either % ** \relax or \!!initinboundscheck % \plotsymbolspacing ** distance between consecutive plot positions % \!xS ** starting x % \!yS ** starting y % \!xE ** ending x % \!yE ** ending y % \!xdiff ** x_end - x_start % \!ydiff ** y_end - y_start % \!distacross ** how far along curve next point to be plotted is % \!arclength ** approximate length of arc for current interval % \!downlength ** remaining length for "pen" to be down % \!uplength ** length for "pen" to be down % \!intervalno ** counts segments to curve % \totalarclength ** cumulative distance along curve % \!npoints ** approximately (arc length / plotsymbolspacing) % ** Calls -- \!Pythag, \!divide, \!plot % ** \!start (XCOORD,YCOORD) % ** Sets initial point for linearly (or quadratically) interpolated curve \def\!start (#1,#2){% \!plotxorigin=\!xorigin \advance \!plotxorigin by \!plotsymbolxshift \!plotyorigin=\!yorigin \advance \!plotyorigin by \!plotsymbolyshift \!xS=\!M{#1}\!xunit \!yS=\!M{#2}\!yunit \!rotateaboutpivot\!xS\!yS \!copylist\!UDlist\to\!!UDlist% **\!UDlist has the form \\{dimen1}\\{dimen2}.. % ** Routine will draw dashed line with pen % ** down for dimen1, up for dimen2, ... \!getnextvalueof\!downlength\from\!!UDlist \!distacross=\!zpt% ** 1st point goes at start of curve \!intervalno=0 % ** initialize interval counter \global\totalarclength=\!zpt% ** initialize distance traveled along curve \ignorespaces} % ** \!ljoin (XCOORD,YCOORD) % ** Draws a straight line starting at the last point specified % ** by the most recent \!start, \!ljoin, or \!qjoin, and % ** ending at (XCOORD,YCOORD). \def\!ljoin (#1,#2){% \advance\!intervalno by 1 \!xE=\!M{#1}\!xunit \!yE=\!M{#2}\!yunit \!rotateaboutpivot\!xE\!yE \!xdiff=\!xE \advance \!xdiff by -\!xS%** xdiff = xE - xS \!ydiff=\!yE \advance \!ydiff by -\!yS%** ydiff = yE - yS \!Pythag\!xdiff\!ydiff\!arclength% ** arclength = sqrt(xdiff**2+ydiff**2) \global\advance \totalarclength by \!arclength% \!drawlinearsegment% ** set by dashpat to \!linearsolid or \!lineardashed \!xS=\!xE \!yS=\!yE% ** shift ending points to starting points \ignorespaces} % ** The following routine is used to draw a "solid" line between (xS,yS) % ** and (xE,yE). Points are spaced nearly every \plotsymbolspacing length % ** along the line. \def\!linearsolid{% \!npoints=\!arclength \!countA=\plotsymbolspacing \divide\!npoints by \!countA% ** now #pts =. arclength/plotsymbolspacing \ifnum \!npoints<1 \!npoints=1 \fi \divide\!xdiff by \!npoints \divide\!ydiff by \!npoints \!xpos=\!xS \!ypos=\!yS % \loop\ifnum\!npoints>-1 \!plotifinbounds \advance \!xpos by \!xdiff \advance \!ypos by \!ydiff \advance \!npoints by -1 \repeat \ignorespaces} % ** The following routine is used to draw a dashed line between (xS,yS) % ** and (xE,yE). The dash pattern continues from the previous segment. \def\!lineardashed{% % ** \ifdim\!distacross>\!arclength \advance \!distacross by -\!arclength %nothing to plot in this interval % \else % \loop\ifdim\!distacross<\!arclength % ** plot point, interpolating linearly in x and y \!divide\!distacross\!arclength\!dimenA% ** dimA = across/arclength \!removept\!dimenA\!t% ** \!t holds value in dimA, without the "pt" \!xpos=\!t\!xdiff \advance \!xpos by \!xS \!ypos=\!t\!ydiff \advance \!ypos by \!yS \!plotifinbounds \advance\!distacross by \plotsymbolspacing \!advancedashing \repeat % \advance \!distacross by -\!arclength% ** prepare for next interval \fi \ignorespaces} \def\!!advancedashing{% \advance\!downlength by -\plotsymbolspacing \ifdim \!downlength>\!zpt \else \advance\!distacross by \!downlength \!getnextvalueof\!uplength\from\!!UDlist \advance\!distacross by \!uplength \!getnextvalueof\!downlength\from\!!UDlist \fi} % ** \inboundscheckoff & \inboundscheckon: See Subsection 5.5 of the manual. \def\inboundscheckoff{% \def\!plotifinbounds{\!plot(\!xpos,\!ypos)}% \def\!initinboundscheck{\relax}\ignorespaces} \def\inboundscheckon{% \def\!plotifinbounds{\!!plotifinbounds}% \def\!initinboundscheck{\!!initinboundscheck}% \!initinboundscheck\ignorespaces} \inboundscheckoff % ** The following code plots the current point only if it falls in the % ** current plotarea. It doesn't matter if the coordinate system has % ** changed since the plotarea was set up. However, shifts of the plot % ** are ignored (how the plotsymbol stands relative to its plot position is % ** unknown anyway). \def\!!plotifinbounds{% \ifdim \!xpos<\!checkleft \else \ifdim \!xpos>\!checkright \else \ifdim \!ypos<\!checkbot \else \ifdim \!ypos>\!checktop \else \!plot(\!xpos,\!ypos) \fi \fi \fi \fi} \def\!!initinboundscheck{% \!checkleft=\!arealloc \advance\!checkleft by \!xorigin \!checkright=\!arearloc \advance\!checkright by \!xorigin \!checkbot=\!areabloc \advance\!checkbot by \!yorigin \!checktop=\!areatloc \advance\!checktop by \!yorigin} % ********************************* % *** LOGTEN (Log_10 function) *** % ********************************* % % ** \!logten{X} % ** Calculates log_10 of X. X and LOG10(X) are in fixed point notation. % ** X must be positive; it may have an optional `+' sign; any number % ** of digits may be specified for X. The absolute error in LOG10(X) is % ** less than .0001 (probably < .00006). That's about as good as you % ** hope for, since TEX only operates to 5 figures after the decimal % ** point anyway. % \!rootten=3.162278pt **** These are values are set in ALLOCATIONS % \!tenAe=2.543275pt (=A5) % \!tenAc=2.773839pt (=A3) % \!tenAa=8.690286pt (=A1) \def\!logten#1#2{% \expandafter\!!logten#1\!nil \!removept\!dimenF#2% \ignorespaces} \def\!!logten#1#2\!nil{% \if -#1% \!dimenF=\!zpt \def\!next{\ignorespaces}% \else \if +#1% \def\!next{\!!logten#2\!nil}% \else \if .#1% \def\!next{\!!logten0.#2\!nil}% \else \def\!next{\!!!logten#1#2..\!nil}% \fi \fi \fi \!next} \def\!!!logten#1#2.#3.#4\!nil{% \!dimenF=1pt % ** DimF holds log10 original argument \if 0#1% \!!logshift#3pt % ** Argument < 1 \else % ** Argument >= 1 \!logshift#2/% ** Shift decimal pt as many places \!dimenE=#1.#2#3pt % ** as there are figures in #2 \fi % ** Now dimE holds revised X want log10 of \ifdim \!dimenE<\!rootten% ** Transform X to XX between sqrt(10) \multiply \!dimenE 10 % ** and 10*sqrt(10) \advance \!dimenF -1pt \fi \!dimenG=\!dimenE% ** dimG <- (XX + 10) \advance\!dimenG 10pt \advance\!dimenE -10pt % ** dimE <- (XX - 10) \multiply\!dimenE 10 % ** dimE = 10*(XX-10) \!divide\!dimenE\!dimenG\!dimenE% ** Now dimE=10t==10*(XX-10)/(XX+10) \!removept\!dimenE\!t% ** !t=10t, with "pt" removed \!dimenG=\!t\!dimenE% ** dimG=100t**2 \!removept\!dimenG\!tt% ** !tt=100t**2, with "pt" removed \!dimenH=\!tt\!tenAe% ** dimH=10*a5*(10t)**2 /100 \divide\!dimenH 100 \advance\!dimenH \!tenAc% ** ditto + 10*a3 \!dimenH=\!tt\!dimenH% ** ditto * (10t)**2 /100 \divide\!dimenH 100 \advance\!dimenH \!tenAa% ** ditto + 10*a1 \!dimenH=\!t\!dimenH% ** ditto * 10t / 100 \divide\!dimenH 100 % ** Now dimH = log10(XX) - 1 \advance\!dimenF \!dimenH}% ** dimF = log10(X) \def\!logshift#1{% \if #1/% \def\!next{\ignorespaces}% \else \advance\!dimenF 1pt \def\!next{\!logshift}% \fi \!next} \def\!!logshift#1{% \advance\!dimenF -1pt \if 0#1% \def\!next{\!!logshift}% \else \if p#1% \!dimenF=1pt \def\!next{\!dimenE=1p}% \else \def\!next{\!dimenE=#1.}% \fi \fi \!next} % *********************************************************** % *** PICTURES (Basic setups for PiCtures; \put commands) *** % *********************************************************** % ** User Commands: % ** \beginpicture % ** \endpicture % ** \endpicturesave % ** \setcoordinatesystem units point at XREF YREF % ** \put {OBJECT} [ORIENTATION] at XCOORD YCOORD % ** \multiput {OJBECT} [ORIENTATION] ) at % ** XCOORD YCOORD % ** *NUMBER_OF_TIMES DXCOORD DYCOORD / % ** \accountingon % ** \accountingoff % ** \stack [ORIENTATION] {LIST OF ITEMS} % ** \lines [ORIENTATION] {LINES} % ** \Lines [ORIENTATION] {LINES} % ** \setdimensionmode % ** \setcoordinatemode % ** \Xdistance % ** \Ydistance % ** Internal commands: % ** \!setputobject{OBJECT}{[ORIENTATION]} % ** \!dimenput{OBJECT}[ORIENTATION](XDIMEN,YDIMEN) % ** \!setdimenmode % ** \!setcoordmode % ** \!ifdimenmode % ** \!ifcoordmode % ** \beginpicture % ** \endpicture % ** \endpicturesave % ** \beginpicture ... \endpicture creates an hbox. Objects are % ** placed in this box using the \put command and the like (see below). % ** The location of an object is specified in terms of coordinate system(s) % ** established by \setcoordinatesystem. Each coordinate system (there % ** might be just one) specifies the length of 1 horizontal unit, the length % ** of 1 vertical unit, and the coordinates of a "reference point". The % ** reference points of various coordinate systems will be in the same % ** physical location. The macros keep track of the size of the objects % ** and their locations. The resulting hbox is the smallest hbox which % ** encloses all the objects, and whose TEK reference point is the point % ** on the left edge of the box closest vertically to the PICTEX reference % ** point. Using \endpicturesave, you can (globally) save the distance TEK's % ** reference point is to the right (respectively, up from) PICTEX's % ** reference point in the dimension register \XREG (respectively \YREG). % ** You can then \put the picture OBJECT into a larger picture so that its % ** reference point is at (XCOORD,YCOORD) with the command % ** \put {picture OBJECT} [Bl] <\XREG, \YREG> at XCOORD YCOORD % ** \beginpicture : See Subsection 1.1 of the manual. \def\beginpicture{% \setbox\!picbox=\hbox\bgroup% \!xleft=\maxdimen \!xright=-\maxdimen \!ybot=\maxdimen \!ytop=-\maxdimen} % ** \endpicture : See Subsection 1.1 of the manual. \def\endpicture{% \ifdim\!xleft=\maxdimen% ** check if nothing was put in picbox \!xleft=\!zpt \!xright=\!zpt \!ybot=\!zpt \!ytop=\!zpt \fi \global\!Xleft=\!xleft \global\!Xright=\!xright \global\!Ybot=\!ybot \global\!Ytop=\!ytop \egroup% \ht\!picbox=\!Ytop \dp\!picbox=-\!Ybot \ifdim\!Ybot>\!zpt \else \ifdim\!Ytop<\!zpt \!Ybot=\!Ytop \else \!Ybot=\!zpt \fi \fi \hbox{\kern-\!Xleft\lower\!Ybot\box\!picbox\kern\!Xright}} % ** \endpicturesave : See Subsection 8.4 of the manual. \def\endpicturesave <#1,#2>{% \endpicture \global #1=\!Xleft \global #2=\!Ybot \ignorespaces} % ** \setcoordinatesystem units % ** point at XREF YREF % ** Each of `units ' and `point at XREF YREF' % ** are optional. % ** Unit lengths must be given in dimensions (e.g., <10pt,1in>). % ** Default unit lengths are 1pt, 1pt, or previous unit lengths. % ** Reference point is specified in current units (e.g., 3 5 ). % ** Default reference point is 0 0 , or previous reference point. % ** Unit lengths and reference points obey TEX's scoping rules. % ** See Subsection 1.2 of the manual. \def\setcoordinatesystem{% \!ifnextchar{u}{\!getlengths } {\!getlengths units <\!xunit,\!yunit>}} \def\!getlengths units <#1,#2>{% \!xunit=#1\relax \!yunit=#2\relax \!ifcoordmode \let\!SCnext=\!SCccheckforRP \else \let\!SCnext=\!SCdcheckforRP \fi \!SCnext} \def\!SCccheckforRP{% \!ifnextchar{p}{\!cgetreference } {\!cgetreference point at {\!xref} {\!yref} }} \def\!cgetreference point at #1 #2 {% \edef\!xref{#1}\edef\!yref{#2}% \!xorigin=\!xref\!xunit \!yorigin=\!yref\!yunit \!initinboundscheck % ** See linear.tex \ignorespaces} \def\!SCdcheckforRP{% \!ifnextchar{p}{\!dgetreference}% {\ignorespaces}} \def\!dgetreference point at #1 #2 {% \!xorigin=#1\relax \!yorigin=#2\relax \ignorespaces} % ** \put {OBJECT} [XY] at (XCOORD,YCOORD) % ** `[XY]' and `' are optional. % ** First OBJECT is placed in an hbox (the "objectbox") and then a % ** "reference point" is assigned to the objectbox as follows: % ** [1] first, the reference point is taken to be the center of the box; % ** [2] next, centering is overridden by the specifications % ** X=l -- reference point along the left edge of the objectbox % ** X=r -- reference point along the right edge of the objectbox % ** Y=b -- reference point along the bottom edge of the objectbox % ** Y=B -- reference point along the Baseline of the objectbox % ** Y=t -- reference point along the top edge of the objectbox; % ** [3] finally the reference point is shifted left by XDIMEN, down % ** by YDIMEN (both default to 0pt). % ** The objectbox is placed within PICBOX with its reference point at % ** (XCOORD,YCOORD). % ** If OBJECT is a saved box, say box0, you have to write % ** \put{\box0}... or \put{\copy0}... % ** The objectbox is void after the put. % ** See Subsection 2.1 of the manual. \long\def\put#1#2 at #3 #4 {% \!setputobject{#1}{#2}% \!xpos=\!M{#3}\!xunit \!ypos=\!M{#4}\!yunit \!rotateaboutpivot\!xpos\!ypos% \advance\!xpos -\!xorigin \advance\!xpos -\!xshift \advance\!ypos -\!yorigin \advance\!ypos -\!yshift \kern\!xpos\raise\!ypos\box\!putobject\kern-\!xpos% \!doaccounting\ignorespaces} % ** \multiput etc. Like \put. The objectbox is not voided until the % ** termininating /, and is placed repeatedly with: % ** XCOORD YCOORD -- the objectbox is put down with its reference point % ** at (XCOORD,YCOORD); % ** *N DXCOORD DYCOORD -- each of N times the current % ** (xcoord,ycoord) is incremented by (DXCOORD,DYCOORD), and the % ** objectbox is put down with its reference point at (xcoord,ycoord) % ** (This specification has to follow an XCOORD YCOORD pair) % ** See Subsection 2.2 of the manual. \long\def\multiput #1#2 at {% \!setputobject{#1}{#2}% \!ifnextchar"{\!putfromfile}{\!multiput}} \def\!putfromfile"#1"{% \expandafter\!multiput \input #1 /} \def\!multiput{% \futurelet\!nextchar\!!multiput} \def\!!multiput{% \if *\!nextchar \def\!nextput{\!alsoby}% \else \if /\!nextchar \def\!nextput{\!finishmultiput}% \else \def\!nextput{\!alsoat}% \fi \fi \!nextput} \def\!finishmultiput/{% \setbox\!putobject=\hbox{}% \ignorespaces} % ** \!alsoat XCOORD YCOORD % ** The objectbox is put down with reference point at XCOORD,YCOORD \def\!alsoat#1 #2 {% \!xpos=\!M{#1}\!xunit \!ypos=\!M{#2}\!yunit \!rotateaboutpivot\!xpos\!ypos% \advance\!xpos -\!xorigin \advance\!xpos -\!xshift \advance\!ypos -\!yorigin \advance\!ypos -\!yshift \kern\!xpos\raise\!ypos\copy\!putobject\kern-\!xpos% \!doaccounting \!multiput} % ** \!alsoby*N DXCOORD DYCOORD % ** N times, the current (XCOORD,YCOORD) is advanced by (DXCOORD,DYCOORD), % ** and the current (shifted, oriented) OBJECT is put down. \def\!alsoby*#1 #2 #3 {% \!dxpos=\!M{#2}\!xunit \!dypos=\!M{#3}\!yunit \!rotateonly\!dxpos\!dypos \!ntemp=#1% \!!loop\ifnum\!ntemp>0 \advance\!xpos by \!dxpos \advance\!ypos by \!dypos \kern\!xpos\raise\!ypos\copy\!putobject\kern-\!xpos% \advance\!ntemp by -1 \repeat \!doaccounting \!multiput} % ** \accountingoff : Suspends PiCTeX's accounting of the aggregate % ** size of the picture box. % ** \accounting on : Reinstates accounting. % ** See Subsection 8.2 of the manual. \def\accountingon{\def\!doaccounting{\!!doaccounting}\ignorespaces} \def\accountingoff{\def\!doaccounting{}\ignorespaces} \accountingon \def\!!doaccounting{% \!xtemp=\!xpos \!ytemp=\!ypos \ifdim\!xtemp<\!xleft \!xleft=\!xtemp \fi \advance\!xtemp by \!wd \ifdim\!xright<\!xtemp \!xright=\!xtemp \fi \advance\!ytemp by -\!dp \ifdim\!ytemp<\!ybot \!ybot=\!ytemp \fi \advance\!ytemp by \!dp \advance\!ytemp by \!ht \ifdim\!ytemp>\!ytop \!ytop=\!ytemp \fi} \long\def\!setputobject#1#2{% \setbox\!putobject=\hbox{#1}% \!ht=\ht\!putobject \!dp=\dp\!putobject \!wd=\wd\!putobject \wd\!putobject=\!zpt \!xshift=.5\!wd \!yshift=.5\!ht \advance\!yshift by -.5\!dp \edef\!putorientation{#2}% \expandafter\!SPOreadA\!putorientation[]\!nil% \expandafter\!SPOreadB\!putorientation<\!zpt,\!zpt>\!nil\ignorespaces} \def\!SPOreadA#1[#2]#3\!nil{\!etfor\!orientation:=#2\do\!SPOreviseshift} \def\!SPOreadB#1<#2,#3>#4\!nil{\advance\!xshift by -#2\advance\!yshift by -#3} \def\!SPOreviseshift{% \if l\!orientation \!xshift=\!zpt \else \if r\!orientation \!xshift=\!wd \else \if b\!orientation \!yshift=-\!dp \else \if B\!orientation \!yshift=\!zpt \else \if t\!orientation \!yshift=\!ht \fi \fi \fi \fi \fi} % ** \!dimenput{OBJECT} [XY] (XLOC,YLOC) % ** This is an internal put routine, similar to \put, except that % ** XLOC=distance right from reference point, YLOC=distance up from % ** reference point. XLOC and YLOC are dimensions, so this routine % ** is completely independent of the current coordinate system. % ** This routine does NOT do ROTATIONS. \long\def\!dimenput#1#2(#3,#4){% \!setputobject{#1}{#2}% \!xpos=#3\advance\!xpos by -\!xshift \!ypos=#4\advance\!ypos by -\!yshift \kern\!xpos\raise\!ypos\box\!putobject\kern-\!xpos% \!doaccounting\ignorespaces} % ** The following macros permit the picture drawing routines to be used % ** either in the default "coordinate mode", or in "dimension mode". % ** In coordinate mode \!M(1.5,\!xunit) expands to 1.5\!xunit % ** In dimension mode \!M(1.5pt,\!xunit) expands to 1.5pt % ** Dimension mode is useful in coding macros. % ** Any special purpose picture macro that sets dimension mode should % ** reset coordinate mode before completion. % ** See Subsection 9.2 of the manual. \def\!setdimenmode{% \let\!M=\!M!!\ignorespaces} \def\!setcoordmode{% \let\!M=\!M!\ignorespaces} \def\!ifcoordmode{% \ifx \!M \!M!} \def\!ifdimenmode{% \ifx \!M \!M!!} \def\!M!#1#2{#1#2} \def\!M!!#1#2{#1} \!setcoordmode \let\setdimensionmode=\!setdimenmode \let\setcoordinatemode=\!setcoordmode % ** \Xdistance{XCOORD}, \Ydistance{YCOORD} are the horizontal and % ** vertical distances from the origin (0,0) to the point % ** (XCOORD,YCOORD) in the current coordinate system. % ** See Subsection 9.2 of the manual. \def\Xdistance#1{% \!M{#1}\!xunit \ignorespaces} \def\Ydistance#1{% \!M{#1}\!yunit \ignorespaces} % ** The following macros -- \stack, \line, and \Lines -- are useful for % ** annotating PiCtures. They can be used outside the \beginpicture ... % ** \endpicture environment. % ** \stack [POSITIONING] {VALUESLIST} % ** Builds a vertical stack of the values in VALUESLIST. Values in % ** VALUESLIST are separated by commas. In the resulting stack, values are % ** centered by default, and positioned flush left (right) if % ** POSITIONING = l (r). Values are separated vertically by LEADING, % ** which defaults to \stackleading. % ** See Subsection 2.3 of the manual. \def\stack{% \!ifnextchar[{\!stack}{\!stack[c]}} \def\!stack[#1]{% \let\!lglue=\hfill \let\!rglue=\hfill \expandafter\let\csname !#1glue\endcsname=\relax \!ifnextchar<{\!!stack}{\!!stack<\stackleading>}} \def\!!stack<#1>#2{% \vbox{\def\!valueslist{}\!ecfor\!value:=#2\do{% \expandafter\!rightappend\!value\withCS{\\}\to\!valueslist}% \!lop\!valueslist\to\!value \let\\=\cr\lineskiplimit=\maxdimen\lineskip=#1% \baselineskip=-1000pt\halign{\!lglue##\!rglue\cr \!value\!valueslist\cr}}% \ignorespaces} % ** \lines [POSITIONING] {LINES} % ** Builds a vertical array of the lines in LINES. Each line in LINES % ** is terminated by a \cr. In the resulting array, lines are % ** centered by default, and positioned flush left (right) if % ** POSITIONING = l (r). The lines in the array are subject to TeX's % ** usual spacing rules: in particular the baselines are ordinarily an equal % ** distance apart. The baseline of the array is the baseline of the % ** the bottom line. % ** See Subsection 2.3 of the manual. \def\lines{% \!ifnextchar[{\!lines}{\!lines[c]}} \def\!lines[#1]#2{% \let\!lglue=\hfill \let\!rglue=\hfill \expandafter\let\csname !#1glue\endcsname=\relax \vbox{\halign{\!lglue##\!rglue\cr #2\crcr}}% \ignorespaces} % ** \Lines [POSITIONING] {LINES} % ** Like \lines, but the baseline of the array is the baseline of the % ** top line. See Subsection 2.3 of the manual. \def\Lines{% \!ifnextchar[{\!Lines}{\!Lines[c]}} \def\!Lines[#1]#2{% \let\!lglue=\hfill \let\!rglue=\hfill \expandafter\let\csname !#1glue\endcsname=\relax \vtop{\halign{\!lglue##\!rglue\cr #2\crcr}}% \ignorespaces} % ********************************************* % *** PLOTTING (Things to do with plotting) *** % ********************************************* % ** User commands % ** \setplotsymbol ({PLOTSYMBOL} [ORIENTATION] ) % ** \savelinesandcurves on "FILE_NAME" % ** \dontsavelinesandcurves % ** \writesavefile {MESSAGE} % ** \replot {FILE_NAME} % ** Internal command % ** \!plot(XDIMEN,YDIMEN) % ** \setplotsymbol ({PLOTSYMBOL} [ ] < , >) % ** Save PLOTSYMBOL away in an hbox for use with curve plotting routines % ** See Subsection 5.2 of the manual. \def\setplotsymbol(#1#2){% \!setputobject{#1}{#2} \setbox\!plotsymbol=\box\!putobject% \!plotsymbolxshift=\!xshift \!plotsymbolyshift=\!yshift \ignorespaces} \setplotsymbol({\fiverm .})% ** initialize plotsymbol % ** \!plot is either \!!plot (when no lines and curves are being saved) or % ** \!!!plot (when lines and curves are being saved) % ** \!!plot(XDIMEN,YDIMEN) % ** Places the current plotsymbol a horizontal distance=XDIMEN-xorigin % ** and a vertical distance=YDIMEN-yorigin from the current % ** reference point. \def\!!plot(#1,#2){% \!dimenA=-\!plotxorigin \advance \!dimenA by #1% ** over \!dimenB=-\!plotyorigin \advance \!dimenB by #2% ** up \kern\!dimenA\raise\!dimenB\copy\!plotsymbol\kern-\!dimenA% \ignorespaces} % ** \!!!plot(XDIMEN,YDIMEN) % ** Like \!!plot, but also saves the plot location in units of % ** scaled point, on file `replotfile' \def\!!!plot(#1,#2){% \!dimenA=-\!plotxorigin \advance \!dimenA by #1% ** over \!dimenB=-\!plotyorigin \advance \!dimenB by #2% ** up \kern\!dimenA\raise\!dimenB\copy\!plotsymbol\kern-\!dimenA% \!countE=\!dimenA \!countF=\!dimenB \immediate\write\!replotfile{\the\!countE,\the\!countF.}% \ignorespaces} % ** \savelinesandcurves on "FILE_NAME" % ** Switch to save locations used for plotting lines and curves % ** (No advantage in saving locations for solid lines; however % ** replotting curve locations speeds things up by a factor of about 4. % ** \dontsavelinesandcurves % ** Terminates \savelinesandcurves. The default. % ** See Subsection 5.6 of the manual. \def\savelinesandcurves on "#1" {% \immediate\closeout\!replotfile \immediate\openout\!replotfile=#1% \let\!plot=\!!!plot} \def\dontsavelinesandcurves {% \let\!plot=\!!plot} \dontsavelinesandcurves % ** \writesavefile {MESSAGE} % ** The message is preceded by a "%", so that it won't interfere % ** with replotting. % ** See Subsection 5.6 of the manual. {\catcode`\%=11\xdef\!Commentsignal{%}} \def\writesavefile#1 {% \immediate\write\!replotfile{\!Commentsignal #1}% \ignorespaces} % ** \replot "FILE_NAME" % ** Replots the locations saved earlier under \savelinesandcurves % ** on "FILE_NAME" % ** See Subsection 5.6 of the manual. \def\replot"#1" {% \expandafter\!replot\input #1 /} \def\!replot#1,#2. {% \!dimenA=#1sp \kern\!dimenA\raise#2sp\copy\!plotsymbol\kern-\!dimenA \futurelet\!nextchar\!!replot} \def\!!replot{% \if /\!nextchar \def\!next{\!finish}% \else \def\!next{\!replot}% \fi \!next} % ************************************************** % *** PYTHAGORAS (Euclidean distance function) *** % ************************************************** % ** User command: % ** \placehypotenuse for and in % ** Internal command: % ** \!Pythag{X}{Y}{Z} % ** Input X,Y are dimensions, or dimension registers. % ** Output Z == sqrt(X**2+Y**2) must be a dimension register. % ** Assumes that |X|+|Y| < 2048pt (about 28in). % ** Without loss of generality, suppose x>0, y>0. Put s = x+y, % ** z = sqrt(x**2+y**2). Then z = s*f, where f = sqrt(t**2 + (1-t)**2) % ** = sqrt((1+tau**2)/2), where t = x/s and tau = 2(t-1/2) . % ** Uses the \!divide macro (which uses registers \!dimenA--\!dimenD. % ** Uses the \!removept macro (e.g., 123.45pt --> 123.45) % ** Uses registers \!dimenE--\!dimenI. \def\!Pythag#1#2#3{% \!dimenE=#1\relax \ifdim\!dimenE<\!zpt \!dimenE=-\!dimenE \fi% ** dimE = |x| \!dimenF=#2\relax \ifdim\!dimenF<\!zpt \!dimenF=-\!dimenF \fi% ** dimF = |y| \advance \!dimenF by \!dimenE% ** dimF = s = |x|+|y| \ifdim\!dimenF=\!zpt \!dimenG=\!zpt% ** dimG = z = sqrt(x**2+y**2) \else \!divide{8\!dimenE}\!dimenF\!dimenE% ** now dimE = 8t = (8|x|)/s \advance\!dimenE by -4pt% ** 8tau = (8t-4)*2 \!dimenE=2\!dimenE% ** (tau = 2*t - 1) \!removept\!dimenE\!!t% ** 8tau, without "pt" \!dimenE=\!!t\!dimenE% ** (8tau)**2, in pts \advance\!dimenE by 64pt% ** u = [64 + (8tau)**2]/2 \divide \!dimenE by 2% ** [u = (8f)**2] \!dimenH=7pt% ** initial guess g at sqrt(u) \!!Pythag\!!Pythag\!!Pythag% ** 3 iterations give sqrt(u) \!removept\!dimenH\!!t% ** 8f=sqrt(u), without "pt" \!dimenG=\!!t\!dimenF% ** z = (8f)*s/8 \divide\!dimenG by 8 \fi #3=\!dimenG \ignorespaces} \def\!!Pythag{% ** Newton-Raphson for sqrt \!divide\!dimenE\!dimenH\!dimenI% ** v = u/g \advance\!dimenH by \!dimenI% ** g <-- (g + u/g)/2 \divide\!dimenH by 2} % ** \placehypotenuse for and in % ** See Subsection 9.3 of the manual. \def\placehypotenuse for <#1> and <#2> in <#3> {% \!Pythag{#1}{#2}{#3}} % ********************************************** % *** QUADRATIC ARC (Draws a quadratic arc) *** % ********************************************** % ** Internal command % ** \!qjoin (XCOORD1,YCOORD1) (XCOORD2,YCOORD2) % ** \!qjoin (XCOORD1,YCOORD1) (XCOORD2,YCOORD2) % ** Draws an arc starting at the (last) point specified by the most recent % ** \!qjoin, or \!ljoin, or \!start and passing through (X_1,Y_1), (X_2,Y_2). % ** Uses quadratic interpolation in both x and y: % ** x(t), 0 <= t <= 1, interpolates x_0, x_1, x_2 at t=0, .5, 1 % ** y(t), 0 <= t <= 1, interpolates y_0, y_1, y_2 at t=0, .5, 1 \def\!qjoin (#1,#2) (#3,#4){% \advance\!intervalno by 1 \!ifcoordmode \edef\!xmidpt{#1}\edef\!ymidpt{#2}% \else \!dimenA=#1\relax \edef\!xmidpt{\the\!dimenA}% \!dimenA=#2\relax \edef\!ymidpt{\the\!dimenA}% \fi \!xM=\!M{#1}\!xunit \!yM=\!M{#2}\!yunit \!rotateaboutpivot\!xM\!yM \!xE=\!M{#3}\!xunit \!yE=\!M{#4}\!yunit \!rotateaboutpivot\!xE\!yE % % ** Find coefficients for x(t)=a_x + b_x*t + c_x*t**2 \!dimenA=\!xM \advance \!dimenA by -\!xS% ** dimA = I = xM - xS \!dimenB=\!xE \advance \!dimenB by -\!xM% ** dimB = II = xE-xM \!xB=3\!dimenA \advance \!xB by -\!dimenB% ** b=3I-II \!xC=2\!dimenB \advance \!xC by -2\!dimenA% ** c=2(II-I) % % ** Find coefficients for y(t)=y_x + b_y*t + c_y*t**2 \!dimenA=\!yM \advance \!dimenA by -\!yS% \!dimenB=\!yE \advance \!dimenB by -\!yM% \!yB=3\!dimenA \advance \!yB by -\!dimenB% \!yC=2\!dimenB \advance \!yC by -2\!dimenA% % % ** Use Simpson's rule to calculate arc length over [0,1/2]: % ** arc length = 1/2[1/6 f(0) + 4/6 f(1/4) + 1/6 f(1/2)] % ** with f(t) = sqrt(x'(t)**2 + y'(t)**2). \!xprime=\!xB \!yprime=\!yB% ** x'(t) = b + 2ct \!dxprime=.5\!xC \!dyprime=.5\!yC% ** dt=1/4 ==> dx'(t) = c/2 \!getf \!midarclength=\!dimenA \!getf \advance \!midarclength by 4\!dimenA \!getf \advance \!midarclength by \!dimenA \divide \!midarclength by 12 % % ** Get arc length over [0,1]. \!arclength=\!dimenA \!getf \advance \!arclength by 4\!dimenA \!getf \advance \!arclength by \!dimenA \divide \!arclength by 12% ** Now have arc length over [1/2,1] \advance \!arclength by \!midarclength \global\advance \totalarclength by \!arclength % % % ** Check to see if there's anything to plot in this interval \ifdim\!distacross>\!arclength \advance \!distacross by -\!arclength% ** nothing % \else \!initinverseinterp% ** initialize for inverse interpolation on arc length \loop\ifdim\!distacross<\!arclength% ** loop over points on arc \!inverseinterp% ** find t such that arc length[0,t] = distacross, % ** using inverse quadratic interpolation % ** now evaluate x(t)=(c*t + b)*t + a \!xpos=\!t\!xC \advance\!xpos by \!xB \!xpos=\!t\!xpos \advance \!xpos by \!xS % ** evaluate y(t) \!ypos=\!t\!yC \advance\!ypos by \!yB \!ypos=\!t\!ypos \advance \!ypos by \!yS \!plotifinbounds% ** plot point if in bounds \advance\!distacross \plotsymbolspacing%** advance arc length for next pt \!advancedashing% ** see "linear" \repeat % \advance \!distacross by -\!arclength% ** prepare for next interval \fi % \!xS=\!xE% ** shift ending points to starting points \!yS=\!yE \ignorespaces} % ** \!getf -- Calculates sqrt(x'(t)**2 + y'(t)**2) and advances % ** x'(t) and y'(t) \def\!getf{\!Pythag\!xprime\!yprime\!dimenA% \advance\!xprime by \!dxprime \advance\!yprime by \!dyprime} % ** \!initinverseinterp -- initializes for inverse quadratic interpolation % ** of arc length provided 1/3 < midarclength/arclength < 2/3; otherwise % ** initializes for inverse linear interpolation. \def\!initinverseinterp{% \ifdim\!arclength>\!zpt \!divide{8\!midarclength}\!arclength\!dimenE% ** dimE=8w=8r/s, where r % ** = midarclength, s=arclength % ** Test for w out of range: w<1/3 or w>2/3 \ifdim\!dimenE<\!wmin \!setinverselinear \else \ifdim\!dimenE>\!wmax \!setinverselinear \else% ** w in range: initialize \def\!inverseinterp{\!inversequad}\ignorespaces % % ** Calculate the coefficients \!beta and \!gamma of the quadratic % ** t = \!beta*v + \!gamma*v**2 % ** taking the values t=0, 1/2, 1 at v=0, w==r/s, 1 respectively: % ** \!beta = (1/2 - w**2)/[w(1-w)] % ** \!gamma = 1 - beta. % \!removept\!dimenE\!Ew% ** 8w, without "pt" \!dimenF=-\!Ew\!dimenE% ** -(8w)**2 \advance\!dimenF by 32pt% ** 32 - (8w)**2 \!dimenG=8pt \advance\!dimenG by -\!dimenE% ** 8 - 8w \!dimenG=\!Ew\!dimenG% ** (8w)*(8-8w) \!divide\!dimenF\!dimenG\!beta% ** beta = (32-(8w)**2)/(8w(8-8w)) % ** = (1/2 - w**2)/(w(1-w)) \!gamma=1pt \advance \!gamma by -\!beta% ** gamma = 1-beta \fi% ** end of the \ifdim\!dimenE>\!wmax \fi% ** end of the \ifdim\!dimenE<\!wmin \fi% ** end of the \ifdim\!arclength>\!zpt \ignorespaces} % ** For 0 <= t <= 1, let AL(t) = arclength[0,t]/arclength[0,1]; note % ** AL(0)=0, AL(1/2)=midarclength/arclength, AL(1)=1. This routine % ** calculates an approximation to AL^{-1}(distance across/arclength), % ** using the assumption that AL^{-1} is quadratic. Specifically, % ** it finds t such that % ** AL^{-1}(v) =. t = v*(\!beta + \!gamma*v) % ** where \!beta and \!gamma are set by \!initinv, and where % ** v=distance across/arclength \def\!inversequad{% \!divide\!distacross\!arclength\!dimenG% ** dimG = v = distacross/arclength \!removept\!dimenG\!v% ** v, without "pt" \!dimenG=\!v\!gamma% ** gamma*v \advance\!dimenG by \!beta% ** beta + gamma*v \!dimenG=\!v\!dimenG% ** t = v*(beta + gamma*v) \!removept\!dimenG\!t}% ** t, without "pt" % ** When w <= 1/3 or w >= 2/3, the following routine writes (using % ** plain TEK's \wlog command) a warning message on the user's log file, % ** and initializes for inverse linear interpolation on arc length. \def\!setinverselinear{% \def\!inverseinterp{\!inverselinear}% \divide\!dimenE by 8 \!removept\!dimenE\!t \!countC=\!intervalno \multiply \!countC 2 \!countB=\!countC \advance \!countB -1 \!countA=\!countB \advance \!countA -1 \wlog{\the\!countB th point (\!xmidpt,\!ymidpt) being plotted doesn't lie in the}% \wlog{ middle third of the arc between the \the\!countA th and \the\!countC th points:}% \wlog{ [arc length \the\!countA\space to \the\!countB]/[arc length \the \!countA\space to \the\!countC]=\!t.}% \ignorespaces} % ** Inverse linear interpolation \def\!inverselinear{% \!divide\!distacross\!arclength\!dimenG \!removept\!dimenG\!t} % ************************************** % ** ROTATIONS (Handles rotations) *** % ************************************** % ** User commands % ** \startrotation [by COS_OF_ANGLE SIN_OF_ANGLE] [about XPIVOT YPIVOT] % ** \stoprotation % ** \startrotation [by COS_OF_ANGLE SIN_OF_ANGLE] [about XPIVOT YPIVOT] % ** Future (XCOORD,YCOORD)'s will be rotated about (XPIVOT,YPIVOT) % ** by the angle with the give COS and SIN. Both fields are optional. % ** [COS,SIN] defaults to previous value, or (1,0). % ** (XPIVOT,YPIVOT) defaults to previous value, or (0,0) % ** You can't change the coordinate system in the scope of a rotation. % ** See Subsection 9.1 of the manual. \def\startrotation{% \let\!rotateaboutpivot=\!!rotateaboutpivot \let\!rotateonly=\!!rotateonly \!ifnextchar{b}{\!getsincos }% {\!getsincos by {\!cosrotationangle} {\!sinrotationangle} }} \def\!getsincos by #1 #2 {% \edef\!cosrotationangle{#1}% \edef\!sinrotationangle{#2}% \!ifcoordmode \let\!ROnext=\!ccheckforpivot \else \let\!ROnext=\!dcheckforpivot \fi \!ROnext} \def\!ccheckforpivot{% \!ifnextchar{a}{\!cgetpivot}% {\!cgetpivot about {\!xpivotcoord} {\!ypivotcoord} }} \def\!cgetpivot about #1 #2 {% \edef\!xpivotcoord{#1}% \edef\!ypivotcoord{#2}% \!xpivot=#1\!xunit \!ypivot=#2\!yunit \ignorespaces} \def\!dcheckforpivot{% \!ifnextchar{a}{\!dgetpivot}{\ignorespaces}} \def\!dgetpivot about #1 #2 {% \!xpivot=#1\relax \!ypivot=#2\relax \ignorespaces} % ** Following terminates rotation. % ** See Subsection 9.1 of the manual. \def\stoprotation{% \let\!rotateaboutpivot=\!!!rotateaboutpivot \let\!rotateonly=\!!!rotateonly \ignorespaces} % ** !!rotateaboutpivot{XREG}{YREG} % ** XREG <-- xpvt + cos(angle)*(XREG-xpvt) - sin(angle)*(YREG-ypvt) % ** YREG <-- ypvt + cos(angle)*(YREG-ypvt) + sin(angle)*(XREG-xpvt) % ** XREG,YREG are dimension registers. Can't be \!dimenA to \!dimenD \def\!!rotateaboutpivot#1#2{% \!dimenA=#1\relax \advance\!dimenA -\!xpivot \!dimenB=#2\relax \advance\!dimenB -\!ypivot \!dimenC=\!cosrotationangle\!dimenA \advance \!dimenC -\!sinrotationangle\!dimenB \!dimenD=\!cosrotationangle\!dimenB \advance \!dimenD \!sinrotationangle\!dimenA \advance\!dimenC \!xpivot \advance\!dimenD \!ypivot #1=\!dimenC #2=\!dimenD \ignorespaces} % ** \!!rotateonly{XREG}{YREG} % ** Like \!!rotateaboutpivot, but with a pivot of (0,0) \def\!!rotateonly#1#2{% \!dimenA=#1\relax \!dimenB=#2\relax \!dimenC=\!cosrotationangle\!dimenA \advance \!dimenC -\!rotsign\!sinrotationangle\!dimenB \!dimenD=\!cosrotationangle\!dimenB \advance \!dimenD \!rotsign\!sinrotationangle\!dimenA #1=\!dimenC #2=\!dimenD \ignorespaces} \def\!rotsign{} \def\!!!rotateaboutpivot#1#2{\relax} \def\!!!rotateonly#1#2{\relax} \stoprotation \def\!reverserotateonly#1#2{% \def\!rotsign{-}% \!rotateonly{#1}{#2}% \def\!rotsign{}% \ignorespaces} % ********************************** % *** SHADING (Handles shading) *** % ********************************** % ** User commands % ** \setshadegrid [span ] [point at XSHADE YSHADE] % ** \setshadesymbol [] ({SHADESYMBOL} % ** [ORIENTATION]) % ** Internal commands: % ** \!startvshade (xS,ybS,ytS) % ** \!starthshade (yS,xlS,xrS) % ** \!lshade [] % ** ** when shading vertically: % ** [the region from (xS,ybS,ytS) to] (xE,ybE,ytE) % ** ** when shading horizontally: % ** [the region from (yS,xlS,xrS) to] (yE,xlE,xrE) % ** \!qshade [] % ** ** when shading vertically: % ** [the region from (xS,ybS,ytS) to] (xM,ybM,ytM) (xE,ybE,ytE) % ** ** when shading horizontally: % ** [the region from (yS,xlS,xrS) to] (yM,xlM,xrM) (yE,xlE,xrE) % ** \!lattice{ANCHOR}{SPAN}{LOCATION}{INDEX}{LATTICE LOCATION} % ** \!override{NOMINAL DIMEN}{REPLACEMENT DIMEN}{DIMEN} % ** The shading routine can operate either in a "vertical mode" or a % ** "horizontal mode". In vertical mode, the region to be shaded is specified % ** in the form % ** {(x,y): xl <= x <= xr & yb(x) <= y <= yt(x)} % ** where yb and yt are functions of x. In horizontal mode, the region % ** is specified in the form % ** {(x,y): yb <= y <= yt & xl(y) <= x <= xr(y)}. % ** The functions yb and yt may be either both linear or both quadratic; % ** similarly for xl and xr. A region with say, piecewise quadratic bottom % ** and top boundaries, can be shaded by consecutive (vertical) \!qshades, % ** proceeding from left to right. Similarly, a region with piecewise % ** quadratic left and right boundaries can be shaded by consecutive % ** (horizontal) \!qshades, proceeding from bottom to top. More complex % ** regions can be shaded by partitioning them into appropriate subregions, % ** and shading those. % ** Shading is accomplished by placing a user-selected shading symbol at % ** those points of a regular grid which fall within the region to be % ** shaded. This region can be "shrunk" so that a largish shading symbol % ** will not extend outside it. Shrinking is accomplished by specifying % ** shrinkages for the left, right, bottom, and top boundaries, in a manner % ** discussed further below. % ** \shades and \!joins MUST NOT be intermingled. Finish drawing a curve % ** before starting to shade a region, and finish shading a region before % ** starting to draw a curve. % ** \setshadegrid [span ] [point at XSHADE YSHADE] % ** The shading symbol is placed down on the points of a grid centered % ** at the coordinate point (XSHADE,YSHADE). The grid points are of the % ** form (j*SPAN,k*SPAN), with j+k even. SPAN is specified % ** as a dimension. % ** (XSHADE,YSHADE) defaults to previous (XSHADE,YSHADE) (or (0,0) if none) % ** SPAN defaults to previous span (or 5pt if none) % ** See Subsection 7.2 of the manual. \def\setshadegrid{% \!ifnextchar{s}{\!getspan } {\!getspan span <\!dshade>}} \def\!getspan span <#1>{% \!dshade=#1\relax \!ifcoordmode \let\!GRnext=\!GRccheckforAP \else \let\!GRnext=\!GRdcheckforAP \fi \!GRnext} \def\!GRccheckforAP{% \!ifnextchar{p}{\!cgetanchor } {\!cgetanchor point at {\!xshadesave} {\!yshadesave} }} \def\!cgetanchor point at #1 #2 {% \edef\!xshadesave{#1}\edef\!yshadesave{#2}% \!xshade=\!xshadesave\!xunit \!yshade=\!yshadesave\!yunit \ignorespaces} \def\!GRdcheckforAP{% \!ifnextchar{p}{\!dgetanchor}% {\ignorespaces}} \def\!dgetanchor point at #1 #2 {% \!xshade=#1\relax \!yshade=#2\relax \ignorespaces} % ** \setshadesymbol [] ({SHADESYMBOL} % ** [ORIENTATION]) % ** Saves SHADESYMBOL away in an hbox for use with shading routines. % ** A shade symbol will not be plotted if its plot position comes within % ** distance LS of the left boundary, RS of the right boundary, TS of the % ** top boundary, BS of the bottom boundary. These parameters have % ** default values that should work in most cases (see below). % ** To override a default value, specify the replacement value % ** in the appropriate subfield of the shrinkages field. % ** 0pt may be coded as "z" (without the quotes). To accept a % ** default value, leave the field empty. Thus % ** [,z,,5pt] sets LS=default, RS=0pt, BS=default, TS=5pt . % ** Skipping the shrinkages field accepts all the defaults. % ** See Subsection 7.1 of the manual. \def\setshadesymbol{% \!ifnextchar<{\!setshadesymbol}{\!setshadesymbol<,,,> }} \def\!setshadesymbol <#1,#2,#3,#4> (#5#6){% % ** set the shadesymbol \!setputobject{#5}{#6}% \setbox\!shadesymbol=\box\!putobject% \!shadesymbolxshift=\!xshift \!shadesymbolyshift=\!yshift % % ** set the shrinkages \!dimenA=\!xshift \advance\!dimenA \!smidge% ** default LS = xshift - smidge \!override\!dimenA{#1}\!lshrinkage% \!dimenA=\!wd \advance \!dimenA -\!xshift% ** default RS = width - xshift \advance\!dimenA \!smidge% - smidge \!override\!dimenA{#2}\!rshrinkage \!dimenA=\!dp \advance \!dimenA \!yshift% ** default BS = depth + yshift \advance\!dimenA \!smidge% - smidge \!override\!dimenA{#3}\!bshrinkage \!dimenA=\!ht \advance \!dimenA -\!yshift% ** default TS = height - yshift \advance\!dimenA \!smidge% - smidge \!override\!dimenA{#4}\!tshrinkage \ignorespaces} \def\!smidge{-.2pt}% % ** \!override{NOMINAL DIMEN}{REPLACEMENT DIMEN}{DIMEN} % ** Overrides the NOMINAL DIMEN by the REPLACEMENT DIMEN to produce DIMEN, % ** according to the following rules: % ** REPLACEMENT DIMEN empty: DIMEN <-- NOMINAL DIMEN % ** REPLACEMENT DIMEN z: DIMEN <-- 0pt % ** otherwise: DIMEN <-- REPLACEMENT DIMEN % ** DIMEN must be a dimension register \def\!override#1#2#3{% \edef\!!override{#2}% \ifx \!!override\empty #3=#1\relax \else \if z\!!override #3=\!zpt \else \ifx \!!override\!blankz #3=\!zpt \else #3=#2\relax \fi \fi \fi \ignorespaces} \def\!blankz{ z} \setshadesymbol ({\fiverm .})% ** initialize plotsymbol % ** \fivesy ^^B is a small cross % ** \!startvshade [at] (xS,ybS,ytS) % ** Initiates vertical shading mode \def\!startvshade#1(#2,#3,#4){% \let\!!xunit=\!xunit% \let\!!yunit=\!yunit% \let\!!xshade=\!xshade% \let\!!yshade=\!yshade% \def\!getshrinkages{\!vgetshrinkages}% \let\!setshadelocation=\!vsetshadelocation% \!xS=\!M{#2}\!!xunit \!ybS=\!M{#3}\!!yunit \!ytS=\!M{#4}\!!yunit \!shadexorigin=\!xorigin \advance \!shadexorigin \!shadesymbolxshift \!shadeyorigin=\!yorigin \advance \!shadeyorigin \!shadesymbolyshift \ignorespaces} % ** \!starthshade [at] (yS,xlS,xrS) % ** Initiates horizontal shading mode \def\!starthshade#1(#2,#3,#4){% \let\!!xunit=\!yunit% \let\!!yunit=\!xunit% \let\!!xshade=\!yshade% \let\!!yshade=\!xshade% \def\!getshrinkages{\!hgetshrinkages}% \let\!setshadelocation=\!hsetshadelocation% \!xS=\!M{#2}\!!xunit \!ybS=\!M{#3}\!!yunit \!ytS=\!M{#4}\!!yunit \!shadexorigin=\!xorigin \advance \!shadexorigin \!shadesymbolxshift \!shadeyorigin=\!yorigin \advance \!shadeyorigin \!shadesymbolyshift \ignorespaces} % ** \!lattice{ANCHOR}{SPAN}{LOCATION}{INDEX}{LATTICE LOCATION} % ** Consider the lattice with points ANCHOR + j*SPAN. This routine determines % ** the index k of the smallest lattice point >= LOCATION, and sets % ** LATTICE LOCATION = ANCHOR + k*SPAN. % ** INDEX is assumed to be a count register, LATTICE LOCATION a dimen reg. \def\!lattice#1#2#3#4#5{% \!dimenA=#1% ** dimA = ANCHOR \!dimenB=#2% ** dimB = SPAN (assumed > 0pt) \!countB=\!dimenB% ** ctB = SPAN, as a count % % ** Determine index of smallest lattice point >= LOCATION \!dimenC=#3% ** dimC = LOCATION \advance\!dimenC -\!dimenA% ** now dimC = LOCATION-ANCHOR \!countA=\!dimenC% ** ctA = above, as a count \divide\!countA \!countB% ** now ctA = desired index, if dimC <= 0 \ifdim\!dimenC>\!zpt \!dimenD=\!countA\!dimenB% ** (tentative k)*span \ifdim\!dimenD<\!dimenC% ** if this is false, ctA = desired index \advance\!countA 1 % ** if true, have to add 1 \fi \fi % \!dimenC=\!countA\!dimenB% ** lattice location = anchor + ctA*span \advance\!dimenC \!dimenA #4=\!countA% ** the desired index #5=\!dimenC% ** corresponding lattice location \ignorespaces} % ** \!qshade [with shrinkages] [[LS,RS,BS,TS]] % ***** during vertical shading: % ** [the region from (xS,ybS,ytS) to] (xM,ybM,ytM) [and] (xE,ybE,ytE) % ** Shades the region {(x,y): xS <= x <= xE, yb(x) <= y <= yt(x)}, where % ** yb is the quadratic thru (xS,ybS) & (xM,ybM) & (xE,ybE) % ** yt is the quadratic thru (xS,ytS) & (xM,ybM) & (xE,ytE) % ** xS,ybS,ytS are either given by \!startvshade or carried over % ** as the ending values of the immediately preceding \!qshade. % ** For the interpretation of LS, RS, BS, & TS, see \setshadesymbol. The % ** values set there can be overridden, for the course of this \!qshade % ** only, in the same manner as overrides are specified for % ** \setshadesymbol. % ***** during horizontal shading: % ** [the region from (yS,xlS,xrS) to] (yM,xlM,xrM) [and] (yE,xlE,xrE) \def\!qshade#1(#2,#3,#4)#5(#6,#7,#8){% \!xM=\!M{#2}\!!xunit \!ybM=\!M{#3}\!!yunit \!ytM=\!M{#4}\!!yunit \!xE=\!M{#6}\!!xunit \!ybE=\!M{#7}\!!yunit \!ytE=\!M{#8}\!!yunit \!getcoeffs\!xS\!ybS\!xM\!ybM\!xE\!ybE\!ybB\!ybC%**Get coefficients B & C for \!getcoeffs\!xS\!ytS\!xM\!ytM\!xE\!ytE\!ytB\!ytC%**y=y0 + B(x-X0) + C(x-X0)**2 \def\!getylimits{\!qgetylimits}% \!shade{#1}\ignorespaces} % ** \!lshade ... (xE,ybE,ytE) % ** This is like \!qshade, but the top and bottom boundaries are linear, % ** rather than quadratic. \def\!lshade#1(#2,#3,#4){% \!xE=\!M{#2}\!!xunit \!ybE=\!M{#3}\!!yunit \!ytE=\!M{#4}\!!yunit \!dimenE=\!xE \advance \!dimenE -\!xS% ** xE-xS \!dimenC=\!ytE \advance \!dimenC -\!ytS% ** ytE-ytS \!divide\!dimenC\!dimenE\!ytB% ** ytB = (ytE-ytS)/(xE-xS) \!dimenC=\!ybE \advance \!dimenC -\!ybS% ** ybE-ybS \!divide\!dimenC\!dimenE\!ybB% ** ybB = (ybE-ybS)/(xE-xS) \def\!getylimits{\!lgetylimits}% \!shade{#1}\ignorespaces} % ** \!getcoeffs{X0}{Y0}{X1}{Y1}{X2}{Y2}{B}{C} % ** Finds B and C such that the quadratic y = Y0 + B(x-X0) + C(x-X0)**2 % ** passes through (X1,Y1) and (X2,Y2): when X0=0=Y0, the formulas are: % ** B = S1 - X1*C, C = (S2-S1)/X2 % ** with % ** S1 = Y1/X1, S2 = (Y2-Y1)/(X2-X1). \def\!getcoeffs#1#2#3#4#5#6#7#8{% \!dimenC=#4\advance \!dimenC -#2% ** dimC=Y1-Y0 \!dimenE=#3\advance \!dimenE -#1% ** dimE=X1-X0 \!divide\!dimenC\!dimenE\!dimenF% ** dimF=S1 \!dimenC=#6\advance \!dimenC -#4% ** dimC=Y2-Y1 \!dimenH=#5\advance \!dimenH -#3% ** dimH=X2-X1 \!divide\!dimenC\!dimenH\!dimenG% ** dimG=S2 \advance\!dimenG -\!dimenF% ** dimG=S2-S1 \advance \!dimenH \!dimenE% ** dimH=X2-X0 \!divide\!dimenG\!dimenH#8% ** C=(S2-S1)/(X2-X0) \!removept#8\!t% ** C, without "pt" #7=-\!t\!dimenE% ** -C*(X1-X0) \advance #7\!dimenF% ** B=S1-C*(X1-X0) \ignorespaces} \def\!shade#1{% % ** Get LS,RS,BS,TS for this panel \!getshrinkages#1<,,,>\!nil% % ** now effective LS=dimE, RS=dimF, % ** BS=dimG, TS=dimH \advance \!dimenE \!xS% ** now dimE=xS+LS \!lattice\!!xshade\!dshade\!dimenE% ** set parity=index of left-mst x-lattice \!parity\!xpos% ** point >= xS+LS, xpos=its location \!dimenF=-\!dimenF% ** set dimF=xE-RS \advance\!dimenF \!xE % \!loop\!not{\ifdim\!xpos>\!dimenF}% ** loop over x-lattice points <= xE-RS \!shadecolumn% \advance\!xpos \!dshade% ** move over to next column \advance\!parity 1% ** increase index of x-point \repeat % \!xS=\!xE% ** shift ending values to starting values \!ybS=\!ybE \!ytS=\!ytE \ignorespaces} \def\!vgetshrinkages#1<#2,#3,#4,#5>#6\!nil{% \!override\!lshrinkage{#2}\!dimenE \!override\!rshrinkage{#3}\!dimenF \!override\!bshrinkage{#4}\!dimenG \!override\!tshrinkage{#5}\!dimenH \ignorespaces} \def\!hgetshrinkages#1<#2,#3,#4,#5>#6\!nil{% \!override\!lshrinkage{#2}\!dimenG \!override\!rshrinkage{#3}\!dimenH \!override\!bshrinkage{#4}\!dimenE \!override\!tshrinkage{#5}\!dimenF \ignorespaces} \def\!shadecolumn{% \!dxpos=\!xpos \advance\!dxpos -\!xS% ** dx = x - xS \!removept\!dxpos\!dx% ** ditto, without "pt" \!getylimits% ** get top and bottom y-values \advance\!ytpos -\!dimenH% ** less TS \advance\!ybpos \!dimenG% ** plus BS \!yloc=\!!yshade% ** get anchor point for this column \ifodd\!parity \advance\!yloc \!dshade \fi \!lattice\!yloc{2\!dshade}\!ybpos% \!countA\!ypos% ** ypos=smallest y point for this column \!dimenA=-\!shadexorigin \advance \!dimenA \!xpos% ** over \loop\!not{\ifdim\!ypos>\!ytpos}% ** loop over ypos <= yt(t) \!setshadelocation% ** vmode: xloc=xpos, yloc=ypos % ** hmode: xloc=ypos, yloc=xpos \!rotateaboutpivot\!xloc\!yloc% \!dimenA=-\!shadexorigin \advance \!dimenA \!xloc% ** over \!dimenB=-\!shadeyorigin \advance \!dimenB \!yloc% ** up \kern\!dimenA \raise\!dimenB\copy\!shadesymbol \kern-\!dimenA \advance\!ypos 2\!dshade \repeat \ignorespaces} \def\!qgetylimits{% \!dimenA=\!dx\!ytC \advance\!dimenA \!ytB% ** yt(t)=ytS + dx*(Bt + dx*Ct) \!ytpos=\!dx\!dimenA \advance\!ytpos \!ytS \!dimenA=\!dx\!ybC \advance\!dimenA \!ybB% ** yb(t)=ybS + dx*(Bb + dx*Cb) \!ybpos=\!dx\!dimenA \advance\!ybpos \!ybS} \def\!lgetylimits{% \!ytpos=\!dx\!ytB% ** yt(t)=ytS + dx*Bt \advance\!ytpos \!ytS \!ybpos=\!dx\!ybB% ** yb(t)=ybS + dx*Bb \advance\!ybpos \!ybS} \def\!vsetshadelocation{% ** vmode: xloc=xpos, yloc=ypos \!xloc=\!xpos \!yloc=\!ypos} \def\!hsetshadelocation{% ** hmode: xloc=ypos, yloc=xpos \!xloc=\!ypos \!yloc=\!xpos} % ************************************** % *** TICKS (Draws ticks on graphs) *** % ************************************** % ** User commands % ** \ticksout % ** \ticksin % ** \gridlines % ** \nogridlines % ** \loggedticks % ** \unloggesticks % ** See Subsection 3.4 of the manual % ** The following is an option of the \axis command % ** ticks % ** [in] [out] % ** [long] [short] [length ] % ** [width ] % ** [andacross] [butnotacross] % ** [logged] [unlogged] % ** [unlabeled] [numbered] [withvalues VALUE1 VALUE2 ... VALUEk / ] % ** [quantity Q] [at LOC1 LOC2 ... LOCk / ] [from LOC1 to LOC2 by % ** LOC_INCREMENT] % ** See Subsection 3.2 of the manual for the rules. % ** The various options of the tick field are processed by the % ** \!nextkeyword command defined below. % ** For example, `\!nextkeyword short ' expands to `\!ticksshort', % ** while `\!nextkeyword withvalues' expands to `\!tickswithvalues'. \def\!axisticks {% \def\!nextkeyword##1 {% \expandafter\ifx\csname !ticks##1\endcsname \relax \def\!next{\!fixkeyword{##1}}% \else \def\!next{\csname !ticks##1\endcsname}% \fi \!next}% \!axissetup \def\!axissetup{\relax}% \edef\!ticksinoutsign{\!ticksinoutSign}% \!ticklength=\longticklength \!tickwidth=\linethickness \!gridlinestatus \!setticktransform \!maketick \!tickcase=0 \def\!LTlist{}% \!nextkeyword} \def\ticksout{% \def\!ticksinoutSign{+}} \def\ticksin{% \def\!ticksinoutSign{-}} \ticksout \def\gridlines{% \def\!gridlinestatus{\!gridlinestootrue}} \def\nogridlines{% \def\!gridlinestatus{\!gridlinestoofalse}} \nogridlines \def\loggedticks{% \def\!setticktransform{\let\!ticktransform=\!logten}} \def\unloggedticks{% \def\!setticktransform{\let\!ticktransform=\!donothing}} \def\!donothing#1#2{\def#2{#1}} \unloggedticks % ** \!ticks/ : terminates read of tick options \expandafter\def\csname !ticks/\endcsname{% \!not {\ifx \!LTlist\empty} \!placetickvalues \fi \def\!tickvalueslist{}% \def\!LTlist{}% \expandafter\csname !axis/\endcsname} \def\!maketick{% \setbox\!boxA=\hbox{% \beginpicture \!setdimenmode \setcoordinatesystem point at {\!zpt} {\!zpt} \linethickness=\!tickwidth \ifdim\!ticklength>\!zpt \putrule from {\!zpt} {\!zpt} to {\!ticksinoutsign\!tickxsign\!ticklength} {\!ticksinoutsign\!tickysign\!ticklength} \fi \if!gridlinestoo \putrule from {\!zpt} {\!zpt} to {-\!tickxsign\!xaxislength} {-\!tickysign\!yaxislength} \fi \endpicturesave <\!Xsave,\!Ysave>}% \wd\!boxA=\!zpt} \def\!ticksin{% \def\!ticksinoutsign{-}% \!maketick \!nextkeyword} \def\!ticksout{% \def\!ticksinoutsign{+}% \!maketick \!nextkeyword} \def\!tickslength<#1> {% \!ticklength=#1\relax \!maketick \!nextkeyword} \def\!tickslong{% \!tickslength<\longticklength> } \def\!ticksshort{% \!tickslength<\shortticklength> } \def\!tickswidth<#1> {% \!tickwidth=#1\relax \!maketick \!nextkeyword} \def\!ticksandacross{% \!gridlinestootrue \!maketick \!nextkeyword} \def\!ticksbutnotacross{% \!gridlinestoofalse \!maketick \!nextkeyword} \def\!tickslogged{% \let\!ticktransform=\!logten \!nextkeyword} \def\!ticksunlogged{% \let\!ticktransform=\!donothing \!nextkeyword} \def\!ticksunlabeled{% \!tickcase=0 \!nextkeyword} \def\!ticksnumbered{% \!tickcase=1 \!nextkeyword} \def\!tickswithvalues#1/ {% \edef\!tickvalueslist{#1! /}% \!tickcase=2 \!nextkeyword} \def\!ticksquantity#1 {% \ifnum #1>1 \!updatetickoffset \!countA=#1\relax \advance \!countA -1 \!ticklocationincr=\!axisLength \divide \!ticklocationincr \!countA \!ticklocation=\!axisstart \loop \!not{\ifdim \!ticklocation>\!axisend} \!placetick\!ticklocation \ifcase\!tickcase \relax % Case 0: no labels \or \relax % Case 1: numbered -- not available here \or \expandafter\!gettickvaluefrom\!tickvalueslist \edef\!tickfield{{\the\!ticklocation}{\!value}}% \expandafter\!listaddon\expandafter{\!tickfield}\!LTlist% \fi \advance \!ticklocation \!ticklocationincr \repeat \fi \!nextkeyword} \def\!ticksat#1 {% \!updatetickoffset \edef\!Loc{#1}% \if /\!Loc \def\next{\!nextkeyword}% \else \!ticksincommon \def\next{\!ticksat}% \fi \next} \def\!ticksfrom#1 to #2 by #3 {% \!updatetickoffset \edef\!arg{#3}% \expandafter\!separate\!arg\!nil \!scalefactor=1 \expandafter\!countfigures\!arg/ \edef\!arg{#1}% \!scaleup\!arg by\!scalefactor to\!countE \edef\!arg{#2}% \!scaleup\!arg by\!scalefactor to\!countF \edef\!arg{#3}% \!scaleup\!arg by\!scalefactor to\!countG \loop \!not{\ifnum\!countE>\!countF} \ifnum\!scalefactor=1 \edef\!Loc{\the\!countE}% \else \!scaledown\!countE by\!scalefactor to\!Loc \fi \!ticksincommon \advance \!countE \!countG \repeat \!nextkeyword} \def\!updatetickoffset{% \!dimenA=\!ticksinoutsign\!ticklength \ifdim \!dimenA>\!offset \!offset=\!dimenA \fi} \def\!placetick#1{% \if!xswitch \!xpos=#1\relax \!ypos=\!axisylevel \else \!xpos=\!axisxlevel \!ypos=#1\relax \fi \advance\!xpos \!Xsave \advance\!ypos \!Ysave \kern\!xpos\raise\!ypos\copy\!boxA\kern-\!xpos \ignorespaces} \def\!gettickvaluefrom#1 #2 /{% \edef\!value{#1}% \edef\!tickvalueslist{#2 /}% \ifx \!tickvalueslist\!endtickvaluelist \!tickcase=0 \fi} \def\!endtickvaluelist{! /} \def\!ticksincommon{% \!ticktransform\!Loc\!t \!ticklocation=\!t\!!unit \advance\!ticklocation -\!!origin \!placetick\!ticklocation \ifcase\!tickcase \relax % Case 0: no labels \or % Case 1: numbered \ifdim\!ticklocation<-\!!origin \edef\!Loc{$\!Loc$}% \fi \edef\!tickfield{{\the\!ticklocation}{\!Loc}}% \expandafter\!listaddon\expandafter{\!tickfield}\!LTlist% \or % Case 2: labeled \expandafter\!gettickvaluefrom\!tickvalueslist \edef\!tickfield{{\the\!ticklocation}{\!value}}% \expandafter\!listaddon\expandafter{\!tickfield}\!LTlist% \fi} \def\!separate#1\!nil{% \!ifnextchar{-}{\!!separate}{\!!!separate}#1\!nil} \def\!!separate-#1\!nil{% \def\!sign{-}% \!!!!separate#1..\!nil} \def\!!!separate#1\!nil{% \def\!sign{+}% \!!!!separate#1..\!nil} \def\!!!!separate#1.#2.#3\!nil{% \def\!arg{#1}% \ifx\!arg\!empty \!countA=0 \else \!countA=\!arg \fi \def\!arg{#2}% \ifx\!arg\!empty \!countB=0 \else \!countB=\!arg \fi} \def\!countfigures#1{% \if #1/% \def\!next{\ignorespaces}% \else \multiply\!scalefactor 10 \def\!next{\!countfigures}% \fi \!next} \def\!scaleup#1by#2to#3{% \expandafter\!separate#1\!nil \multiply\!countA #2\relax \advance\!countA \!countB \if -\!sign \!countA=-\!countA \fi #3=\!countA \ignorespaces} \def\!scaledown#1by#2to#3{% \!countA=#1\relax% ** get original # \ifnum \!countA<0 % ** take abs value, \def\!sign{-}% ** remember sign \!countA=-\!countA \else \def\!sign{}% \fi \!countB=\!countA% ** copy |#| \divide\!countB #2\relax% ** integer part (|#|/sf) \!countC=\!countB% ** get sf * (|#|/sf) \multiply\!countC #2\relax \advance \!countA -\!countC% ** ctA is now remainder \edef#3{\!sign\the\!countB.}% ** +- integerpart. \!countC=\!countA % ** Tack on proper number \ifnum\!countC=0 % ** of zeros after . \!countC=1 \fi \multiply\!countC 10 \!loop \ifnum #2>\!countC \edef#3{#3\!zero}% \multiply\!countC 10 \repeat \edef#3{#3\the\!countA}% ** Add on rest of remainder \ignorespaces} \def\!placetickvalues{% \advance\!offset \tickstovaluesleading \if!xswitch \setbox\!boxA=\hbox{% \def\\##1##2{% \!dimenput {##2} [B] (##1,\!axisylevel)}% \beginpicture \!LTlist \endpicturesave <\!Xsave,\!Ysave>}% \!dimenA=\!axisylevel \advance\!dimenA -\!Ysave \advance\!dimenA \!tickysign\!offset \if -\!tickysign \advance\!dimenA -\ht\!boxA \else \advance\!dimenA \dp\!boxA \fi \advance\!offset \ht\!boxA \advance\!offset \dp\!boxA \!dimenput {\box\!boxA} [Bl] <\!Xsave,\!Ysave> (\!zpt,\!dimenA) \else \setbox\!boxA=\hbox{% \def\\##1##2{% \!dimenput {##2} [r] (\!axisxlevel,##1)}% \beginpicture \!LTlist \endpicturesave <\!Xsave,\!Ysave>}% \!dimenA=\!axisxlevel \advance\!dimenA -\!Xsave \advance\!dimenA \!tickxsign\!offset \if -\!tickxsign \advance\!dimenA -\wd\!boxA \fi \advance\!offset \wd\!boxA \!dimenput {\box\!boxA} [Bl] <\!Xsave,\!Ysave> (\!dimenA,\!zpt) \fi} \normalgraphs \catcode`!=12 % ***** THIS MUST NEVER BE OMITTED {\centerline {\bf ON THE ISING MODEL WITH STRONGLY}} \medno {\centerline {\bf ANISOTROPIC EXTERNAL FIELD }} \bigskip \vskip 3 truecm {\centerline {F.R. Nardi$^{(1)}$, E.Olivieri$^{(1)}$, and M. Zahradn\'\i k$^{(2)}$} \bigskip\bigskip \centerline{\bf Abstract} \bigskip In this paper we analyze the equilibrium phase diagram of two-dimensional ferromagnetic n.n. Ising model when the external field takes alternating signs on different rows. We show that some of zero temperature coexistence lines disappear at every positive temperature whereas one (and only one) of them persists for sufficiently low temperature. \bigskip\bigskip\bigskip {\bf Keywords: Ising Model , anisotropic field, phase diagram, cluster expansion} \bigskip\bigskip \item{(1)} {\it Dipartimento di Matematica, II Universit\`a di Roma Tor Vergata, Roma, Italy,} \item{(2)} {\it Faculty of Mathematics and Physics, Charles University Prague Czech Republic} \vfill \eject \numfor=1 \numsec=1 %\BOZZA {\centerline {\bf Section 1. Introduction}} \bigskip This paper concerns the low temperature phase diagram of highly anisotropic Ising Models; we will mainly be concerned with the two-dimensional Ising model with alternating field.\par Let $N$ be an even integer and $\L$ a torus with side $N$ ($\L$ is a $N\times N$ square where the opposite sides are identified).\par The hamiltonian is $$ H_{\L}(\s )= -{J\over 2}\sum_{i,j\in \L : |i-j|=1}\s_{i}\s_{j} -{h_{1}\over 2}\sum_{i\in \L_{1} }\s_{i} +{h_{2}\over 2}\sum_{i\in \L_{2} }\s_{i} \Eq(1.1) $$ where $\s_{i}\in \{-1,+1\},\quad \s\in \O_{\L}:=\{-1,+1\}^{\L},$ $\quad J>0,$ $\quad h_{1} \geq 0,$ $\quad h_{2} \geq 0.$\par $ \L_{1}$ is the union of the odd rows, whereas $\L_{2}$ is the union of the even rows in $\L$: $$\L_{1}=\left\{x=(x_{1},x_{2})\in \L,\qquad x_{2}\;\hbox{odd} \right\} \Eq(1.2)$$ $$\L_{2}=\left\{x=(x_{1},x_{2})\in \L,\qquad x_{2}\;\hbox{even} \right\}\Eq(1.3)$$ The partition function is $$Z=\sum_{\s\in \O_{\L}} e ^{-\b H_{\L}(\s)}.\Eq(1.4)$$ The phase diagram in the $h_1,h_2$ plane at $T=0$ is represented in Fig (2.1). Mainly three different configurations appear as ground states in different regions: all pluses $\piuuno$, all minuses $\menouno$ and a staggered configuration $\piumeno$ with all pluses (all minuses) on even (odd) horizontal lines. They are separated by the coexistence lines: \item{$\bullet$} $h_1 > 2J,\; h_2 = 2J$ that we will call line $a$\par \item{$\bullet$} $h_2 > 2J,\; h_1 = 2J$ that we call $b$\par \item{$\bullet$} $h_{1}=h_{2}<2J$ that we will call $c$. \par They converge in the triple point $\widetilde P \equiv (2J,2J)$ (see Fig.2.1).\par \midinsert \line\bgroup\hss \beginpicture \setcoordinatesystem units <0.5true cm,0.5truecm> \setplotarea x from 0 to 32, y from 0 to 16 \plot 1 2 13 2 / \plot 1 2 1 14 / \plot 1 2 6 7 / \plot 6 7 13 7 / \plot 6 7 6 14 / %\putrectangle corners at 3 10 and 4 9 %\putrectangle corners at 0 11 and 6 0 \put {$2J$} at 6 1.2 \put {$\widetilde P$} at 6.5 7.5 \put {$h_1$} at 14 1.5 \put {$2J$} at 0.5 7 \put {$h_2$} at 0.5 14 \put {$\piumenouno$} at 10 11 \put {$\piuuno$} at 10 4.5 \put {$\menouno$} at 3.5 11 \put {$a$} at 12.5 7.5 \put {$b$} at 6.5 13.5 \put {$c$} at 3.5 4 \put {\bf Fig. 2.1 T=0 phase diagram } at 5 0.1 % fine prima figura \plot 18 2 31 2 / \plot 18 2 18 14 / \plot 18 2 22 6 / %linea che spiega la sezioe 2.1 \plot 26 6.2 26 14 / \plot 26 6 26.2 6.4 / \plot 26 6 25.8 6.4 / %linea che spiega la sezioe 2.2 \plot 28 2 28 7 / \plot 28 7.4 28.2 7 / \plot 28 7.4 27.8 7 / %\putrectangle corners at 3 10 and 4 9 \setdashes \plot 6 2 6 7 / \plot 1 7 6 7 / \plot 22 6 23 7 / \plot 23 7 31 7 / \plot 23 7 23 14 / %\putrectangle corners at 0 11 and 6 0 \put {$2J$} at 23 1.2 \put {$\widetilde P$} at 23.5 8 \put {$ P^*$} at 22 7 \put {$h_1$} at 31.5 1.5 \put {$2J$} at 17.5 7 \put {$h_2$} at 17.5 14 \put {\bf Fig. 2.2 $\bf T>0$ phase diagram } at 24 0.1 \put {Section 2.1 } at 26 12 \put {Section 2.2 } at 28 4.5 \put {Section 3 } at 20.5 5 \endpicture \hss\egroup \endinsert \bigskip We will mainly analyze:\par \item{i)} the vicinities of the line $a$ ($T=0$ coexistence line between $\piumeno$ and $\piuuno$), together with its symmetrical $b$ (between $\piumeno$ and $\menouno$); and \par \item {ii)} the vicinities of the line $c$ ($T=0$ coexistence line between $\piuuno$ and $\menouno$).\par Of course we will be particularly interested in the vicinities of the triple point $\widetilde P$.\par As we will explain, we expect that $a$ and $b$ zero-temperature coexistence lines will disappear at any (arbitrarily small) positive temperature $T={1\over \b}$, whereas the $c$ line will persist at least for sufficiently low temperature. The ending point of the $c$ line is called $P^*= P^*(\b)$ (see fig. 2.2). We will see that ${\rm dist} (P^*(\b), \widetilde P)< k e^{-\b J}$, $k$ being suitable positive constant. \par Moreover we will be able to prove uniqueness outside a small tube centered around $\{ h_1,h_2: h_1 = h_2 < 2J- k e^{-\b J}\}$; in particular in $$U=\{ (h_{1},h_{2})\quad {\rm s.t.}\;\; \max\{ h_1,h_2\}> 2J + k' e^{-\b J} \}. \Eq(1.5) $$ \par The behaviour of our model depends on how much the values of $h_1$ and $h_2$ differ from $2J$. Let us call the fields $h_1, h_2$ ``strong'' resp. ``weak'' resp. ``marginal'' according to whether they are ``sufficiently bigger" resp. ``sufficiently smaller than'' resp. ``approximately equal to'' the value $2J$. See sections 2.1 and 2.2 for a detailed discussion of the case when $h_1$ is ``strong'' and $h_2$ is arbitrary (with the emphasis, in both sections 2.1 and 2.2, on the ``marginal'' values of $h_2$). Let us outline what kind of behaviour we expect in the different regions of parameters around the ``hook'' depicted in Figure 2.3: %figura 3 \midinsert \line\bgroup\hss \beginpicture \setcoordinatesystem units <0.5true cm,0.5truecm> \setplotarea x from 0 to 16, y from 0 to 16 \plot 1 2 13 2 / \plot 1 2 1 14 / \plot 1 2 5 6 / \plot 8 4 8 9 / \plot 5 4 8 4 / \plot 4 5 5 4 / \plot 4.4 4.9 4 5 / \plot 4.1 4.6 4 5 / %\putrectangle corners at 3 10 and 4 9 %\putrectangle corners at 0 11 and 6 0 \put {$2J$} at 6 1.2 \put {$h_1$} at 14 1.5 \put {$2J$} at 0.5 7 \put {$h_2$} at 0.5 14 \put {\bf Fig. 2.3 The path in the space of parameters (``hook") } at 6 0 \setdashes \plot 6 7 13 7 / \plot 6 7 6 14 / \plot 5 6 6 7 / %\putrectangle corners at 0 11 and 6 0 \endpicture \hss\egroup \endinsert Let us start in the upper part of the hook, in some ``strong'' value $h_1 =h_2$. The picture observed there and around (in the region where both $h_1$ and $h_2$ are sufficiently bigger than $2 J$) can be suitably described using the language of so called "rods". These objects will be defined as segments of spins having the value opposite to the "recommended one" in the corresponding row. (Recommended by the groundstate, which has a stripped $+/-$ structure in such a case.) In the $\L_1$ lines we will thus have the ``$-$ rods'' (introduced and thoroughly discussed below in sections 2.1 and 2.2) and analogously we will have ``$+$ rods'' for the $\L_2$ lines. These rods are rare and almost independent objects; more precisely there is some effective repulsion between the neighboring $-$ rods living in the $\L_1$ lines and $+$ rods living in the $\L_2$ lines. In fact, the above region of parameters is not at all studied in detail in this paper; however its discussion is slightly easier than that of our main case of strong $h_1$ and arbitrary (but most interestingly marginal) $h_2$ which is really the most delicate one (toghether with its symmetrical: $h_2$ strong $h_1$ marginal). So we concentrate our discussion on the latter case. Then the concept of a $+$ rod, as a ``rare'' event in the $\L_2$ line, has to be abandoned. (In fact, we will see that plus spins will prevail in $\L_2$ for sufficiently weak $h_2$ fields.) However, the concept of a $-$ rod in $\L_1$ still plays a decisive role in our investigation. In section 2.1 we show that we have the following picture, for $h_2$ reaching from above the value $2 J$: For a typical configuration, one observes rare $-$ rods, denoted as $r$, in $\L_1$ surrounded almost always by minuses above and below in what we will later call $\hat r$. These minuses in $\hat r \setminus r$ will force the remaining nearby $\L_2$ spins to take mainly the minus value even for the external field $h_2$ being slightly below the value $2 J$ (where, we recall, pure plus is already the ground state). However, our leading strategy in 2.1, and also in 2.2, is not to look at the details of the behaviour in $\L_2$ outside of the intersection of $\L_2$ with the union of all the above $\hat r$ %(where $\hat r$ is a neighborhood of some rod $r$). The approach of section 2.1 will be applicable for all strong and marginal values of $h_2$, but the really delicate case is the latter one. When further lowering $h_2$ to the marginal values around $2J $ and below we enter another region, studied in section 2.2. The approach we use there will be applicable both to the weak and (more interestingly, too) the marginal values of $h_2$. Here we will have, for values $h_2$ sufficiently lower than $2J$, a different picture in $\L_2$. This picture is quickly, but smoothly changing when $h_2$ reaches the marginal values. Namely, the picture one observes, for a weak field $h_2$, can be described as only a short range influence of the $\L_1$ rods (which are always rare) on the behaviour in the $\L_2$ lines. Thus, we get mainly plus spins in the points of $\L_2$ which are far from the rods. Again, we do not want to look at the details of the behaviour of the spins in the $\L_2$ lines (outside of the ``$-$appendices'' going out of $r$ and described in section 2.2). So we expect a quick but smooth jump in the mean magnetizatin in the $\L_2$ lines for the marginal values of $h_2$, with a steepest point being placed somewhere slightly below the value $h_2 =2J$. When further lowering the value $h_2$ to weak values significantly below $2 J$, the minuses in $\L_2$ start also to be very rare. Their segments, namely those not attached to the rods (the former will be called $-$appendices in the section 2.2) deserve also a special name. Let us call them ``twigs'' here. Thus the picture for weak $h_2$ (well below $2J$) is the following one. Not only the rods (with minus values of spins being typically extended to the neighborhood, in $\L_2$, of these rods), but also the "twigs" i.e. the segments of minuses in $\L_2$, which are disconnected to rods, appear only scarcely in the $\L_2$ lines. However, it is now the value $2J -h_2 > 0$ which will be ``responsible'' (for weak and marginal $h_1$) for the fact that these twigs (and rods, too) are sufficiently damped. Thus we have essentially a low temperature gas of "legs" of two kinds: extended rods (of minuses centered in the $\L_1$ lines) and segments, called twigs, of minuses ``unprotected'' by some rod. The latter live in the $\L_2$ lines. Both these objects are rare for $h_2$ well below $2J$ and they allow, for $h_2$ sufficiently weak and at the same time sufficiently smaller than $h_1$ (so that the energy of the pure $+$ ground state would remain well below the energy of the pure $-$!), a description by low temperature cluster expansion. We notice that the twigs in the $\L_2$ lines are much more frequent than rods, though also sufficiently damped if $h_2$ is kept sufficiently weak. The rods centered in $\L_1$ are rare as always (in the considered region of parameters $h_1, h_2$) however their control is now possible, even when lowering the value $h_1$ below $2J$, because it is the quantity $h_2$ which is held sufficiently smaller than $2 J$. However, this last case is again not discussed in detail in our paper. In fact, the situation here is again a little bit less delicate than in our main case of marginal values of $h_2$ (and strong $h_1$). Now, having kept $h_2$ considerably smaller than $2 J$ and lowering the value of $h_1$ down to the value $h_2 = 2J$ and then further in direction to the line $h_1 = h_2$ we approach the region where another ``local ground state'' namely the pure $-$ configuration has to be also taken in account. What happens ? When finally reaching the region of weak fields around $h_1 =h_2$, it is necessary to use another approach. In fact, the control over the large (in the horizontal direction) islands of minuses in the pure plus ground state (up to now, these islands were viewed as conglomerates of rods and twigs) is now lost. There is, in fact, a strong attraction of the rods in such a weak field regime. So yet another approach is needed. However, we can ``glue'' together our twigs and (extended) rods $\bar r$ into connected components, and look only at the boundaries of these components. Then we come to the picture of usual Ising contours, and this turns out to be an appropriate approach in the region where $h_1$ and $h_2$ are roughly the same. Indeed, as we describe it in section 3, it is then possible to apply a variant of the usual Peierls argument. The difficulty is that for our ``segmental'' contours (having a considerable energy only around the verticals) the summation over contours is a more delicate problem than in the usual isotropic case. Nevertheless we prove that at the axis $h_1= h_2$ we have a phase transition. We emphasise that in section 3 we consider only the case of the line $h_1 =h_2$. We completely omit the surrounding region where, of course, we expect the uniqueness. However, a rigorous proof of this fact is postponed to some future work. Let us summarize once again what we observed along our itineration in the $h_1$, $h_2$ plane shown in figure 2.3. While the picture in the $\L_1$ lines (where we observe mainly pluses!) is almost constant (namely rare $-$ rods) and changing smoothly (even analytically) during our whole path, the behaviour in the $\L_2$ lines has (for a strong field $h_1 > 2J$) a smooth but quick jump (from the prevailing value $-$ to the prevailing value $+$) slightly below the value $h_2 = 2J$. Below we give some more details on the main results of our Sections 2, 3 and 4: In section 2, we prove uniqueness in the region $U$ of ``strong'' fields $h_1$ (or $h_2$). In particular we will analyze the halfline $a$: $h_2 = 2J, h_1 > 2J + k' e^{-\b J}$. (Of course, by symmetry, the halfline $b$: $h_1 = 2J, h_2 > 2J + k' e^{-\b J}$ can be treated in the same manner.) As we noted, that these two half-lines and their vicinity are the most difficult to deal with in the uniqueness region $U$ (see \equ(1.5)).\par We will determine the set of values of $\th >0$ such that around the half-line $\quad h_{2} =2J,$ $\quad h_{1} =2J+\th,$ we will have uniqueness of the infinite volume Gibbs measure, decay of correlations and other typical properties of the one-phase situation. We will take $\th \geq \k e^{-c \b}$, $c\geq 0$, $\k\geq 0$ where $\k$ will depedend on $c$. It will turn out that we can choose $c$ equal the coupling constant $J$. The central point of our analysis will be to evaluate how close to the ``triple point'' $h_{1}=h_{2}=2J$ we can go, still remaining in the uniqueness region. (It will appear clear that if for a given $\th>0$ we have uniqueness of the Gibbs measure, then for any $\th'>\th $ this property will continue to hold.) In order to prove uniqueness we will use a perturbative approach. We will show that for $h_{2}=2J,\quad h_{1}=2J+\th,$ with $\th=\k e^{-c\b}, \;\k, \; c$ being a suitable positive constants, our system will exhibit a behaviour close to the one of a ``reference system'' where the spins on the odd rows of $\L_{1}$ (where the external magnetic field takes the positive value $h_{1}=2J+\th)$ are ``frozen'' to the value $+1$ whereas on the even rows in $\L_{2}$, we have a set of independent, one dimensional, zero-field systems. The heuristic argument for this is the following one: due to the excess $\th$ of the external magnetic field on the odd rows in $\L_{1}$ w.r.t. the maximal negative molecular field created by contiguous spins in the even rows in $\L_{2}$, we have that, at very low temperature, the spins on $\L_{1}$ will tend to be positive with overwhelming probability. Then the spins in $\L_{2}$ will typically feel a vanishing effective field ( given, on each site $x\in \L_{2} $, by the sum of the negative external magnetic field $-2J$ plus the molecular field $2J$ generated by the two positive spins in $\L_{1}$ nearest neighbours to $x$); thus on the rows of $\L_{2}$ we will have one dimensional, zero field, Ising systems, which are independent from each other since they are separated by $+1$ rows in $\L_{1}$. In the real situation we will certainly have some remarkable differences w.r.t. this extreme situation: the main perturbation, at any small but positive temperature, that we will observe with probability of the order $e^{-\b J}$ will be the presence of rare segments of minus spins on the odd rows in $\L_{1}$; they are called ``rods''. The possibility of the appearance of the rods on $\L_{1}$ will break the independence of the even rows inducing a ``comunication'' between them.\par Our strategy will be based on the use of the methods of cluster expansion. We will perturbatively treat the rods and we will evaluate the effective interaction between two contiguous rods due to the presence of finite volume zero field one dimensional Ising systems on the segments in $\L_{2}$ between them. This effective interaction will turn out to decay exponentially fast on the scale of the correlation length of the zero-field one dimensional Ising system. This correlation length is easily seen to behave, for large $\b$, as $e^{J\b}$. There will be a competition between the typical density of the rods and the rate of decay of their effective interaction; this will imply a relationship between the minimal possible value for $\th$ and the correlation length of the one dimensional zero field Ising model.\par In Section 3 we will show coexistence in the $c$ line $h_1 = h_2< 2J - k e^{-\b J}$. The heuristics for this result is the following one: on this line our model behaves similarly to the anisotropic Ising model with vertical coupling constant $J_1 = J$ and horizontal coupling constant $J_2 = J -{h\over 2}$. Namely a kind of a suitably adapted Peierls argument can be applied there. However when $J_2 $ is exponentially small in $\b$ the typical Peierls contours become almost one-dimensional and the summation over the activities of contours requires some more care than usually for small $J_{2}$. (In fact, for very small $J_{2}-h_{2}$, $h=h_{2}=h_{1}$ we expect a second order phase transition but we are unable to prove it rigorously.)\par Thus to show the existence of a phase transition via the Peierls argument, we describe the configurations in terms of contours. We first make a comparison with the above mentioned anisotropic Ising model and then we perform the sum over the corresponding contours (passing through a fixed point) in such a way to exploit the almost one-dimensionality of the contours.\par Technically, the main novelty of our paper is a use of cluster expansion techniques in situations where strongly anisotropic, ``segmental'' polymers appear. In section 4 we give some general outlook of such polymers, expecting that in future work such a general approach could be useful. We also found a new, indeed very elementary proof of the basic cluster expansion result of Koteck\'y and Preiss (which was used several times throughout our paper). We explain it in section 4.1. \vskip 2 truecm \centerline{\bf Section 2. Uniqueness region.} \bigno {\bf 2.1. The region $\bf h_{1}>2J + \th \;\; $ and $ \;\; h_2 >2J-\d ,\quad \d\b\leq e^{-\b J} , \quad \th \gg e^{-\b J} $.} \numfor=1 \numsec=2 \bigno % pagina1 We will start analyzing the partition function of our system enclosed in a finite volume with periodic boundary conditions. We will trasform our original system into a gas of polymers with small activity. Then, by using general methods of the theory of cluster expansion, we will be able to perform the thermodynamic limit. By similar arguments we will also be able to analyze the correlation functions and prove uniqueness of the infinite volume Gibbs measure as well as decay of truncated correlations. \par We will show, and this will be the main result of Section 2, that our partition function can be expressed as $$Z=\tilde Z \Xi\Eq(2.1)$$ where $\tilde Z$ is a simple term representing the partition function of our reference system whereas $\Xi$ is the partition function (Lemma 2.2) of a gas of polymers with small activities (Theorem 2.8). Let us start our computation of the partition function.\par We first introduce the approach convenient to describe the region above the line $a$ given by: $h_{1}>2J,\;\; 2J=h_2$; it can be pushed also a little under the line. Indeed we have the limitation that $\d=2J-h_2$ is either negative or, if positive, it has to be less than ${1\over 8 \b } \e$ where $$\e=e^{-\b J},\Eq(2.2)$$ and $\th=h_1-2J$. The staggered configuration $\s^{\pm}$ is given by $$\s^{\pm}(x)= \cases{+1 & $x\in \L_{1}$\cr -1 & $x\in \L_{2}$\cr}\Eq(2.3)$$ We write $$ Z = \sum_{\s\in \O_{\L}} e^{-\b(H(\s)-H(\s\pm))}\Eq(2.4);$$ indeed in the region of parameters that we are presently considering, we take as reference configuration the staggered one $\s^{\pm}$ so that in \equ(2.4) we are subtracting $H(\s^{\pm})$. In the other region ($h_{1}>2J, h_{2} < 2J )$ we will subtract $H(+ \uline{1} )$ (see (2.82) below). \smallno {\bf Def. 2.1.} Given $\s\in \O_{\L}$, a maximal connected component (segment) of $-1$ spins in $\L_{1}$ is called {\it rod}; for ${\bf x}\in \L_{1}, \quad l\in N$, we denote by $r_{{\bf x}, l}$ the rod whose extreme left point is ${\bf x}=(x_{1},x_{2})$ and whose length (cardinality) is $l$ %and denoted by %$r_{{\bf x}, l_{1}}$. Where ${\bf x}$ is the left point of the %segment and $l$ is the length of the segment (the number of sites that %are in the segment). $$r_{{\bf x}, l}=\left\{ {\bf y}=(y_1,y_2) \in \L_{1} \; |\; x_{1}\leq y_{1} \leq x_{1}+l-1\quad \hbox{ and }y_{2}=x_{2} \right\} \Eq(2.5)$$ We use the same symbol $r_{{\bf x}, l} $ also to denote the union of unit cubes centered at the sites in $r_{{\bf x}, l} $. %We often identify a rod $r_{{\bf x}, l} $ %with its `` coordinates" $({\bf x}, l)$. \par \bigno {\bf Def. 2.2.} Two rods $r_{{\bf x}^{1}, l_{1}}$ and $r_{{\bf x}^{2}, l_{2}}$ are {\it incompatible} if they intersect: $$r_{{\bf x}^{1}, l_{1}}\cap r_{{\bf x}^{2}, l_{2}}\ne \emptyset \Eq(2.6)$$ %?? or their $\L_{2}$- extension %$$??\hat r_{{\bf x}^{1}, l_{1}}\cap \hat r_{{\bf x}^{2}, l_{2}}\ne %\emptyset $$ %will denote by %$r_{{\bf x}^{1}, l_{1}} (\s)$ %the $i$-th (in lexicografic order) rod in ${\bf x}_{2}^{i}$ row. %We denote with $r$ also the union of cubes centreted in this spins. We will call $\rR_{\L}$ the set of all possible rods ( with any size and location ) in $\L_{1}$. Given $\s\in \O_{\L}$ we denote by $L(\s)$ the family of coordinates of compatible rods generated by $\s$. We write: $$ L(\s)=\left\{ ({\bf x}^{1}, l_{1}) \ldots ({\bf x}^{n}, l_{n}), \quad r_{{\bf x}^{j}, l_{j}} \hbox{is a rod in } \s \right\} \Eq(2.7).$$ Let $$\qquad\qquad \tilde \rL=\bigcup_{({\bf x}, l )\in L(\s) } r_{{\bf x}, l}.\Eq(2.8)$$ be the {\it support } of the set of rods $r_{{\bf x}, l}$ such that $({\bf x}, l)\in L(\s)$; notice that, whereas this set of rods is an element of $(\rR_{\L})^{n},$ for some $n$, $\tilde \rL$ is a subset of $\L_{1}$. We denote by $$\cL=\{L(\s):\;\; \s\in \O_{\L} \}\Eq(2.9)$$ the set of all possible families of compatible rods in $\L_{1}$. %We set: %$$\z(r_{{\bf x}, l})=e^{-\b[H(r_{{\bf x}, l})-H(\s\pm)]} \Eq(1.11)$$ %where $H(r_{{\bf x}, l})$ represents the energy associated to We call $\s(r_{{\bf x}, l})$ the configuration $\s$ where the $-1$ spins are precisely the ones in $r_{{\bf x}, l}$ and in $\L_{2}$; $\z(r_{{\bf x}, l})$ is the weight (or activity) associated to the rod $r_{{\bf x}, l}$. We get $$\z(r_{{\bf x}, l}):=e^{-\b[H(\s(r_{{\bf x}, l}))-H(\s\pm)]}= \e^{2}e^{-\th l}\Eq(2.10)$$ We recall that $\e=e^{-J\b}$. In what follows we will choose $\th=\k \,\e$ for some positive constant $\k$. We have: $$ Z_{\L}= \sum_{n\geq 0} \quad \sum_{ L=\left\{ ({\bf x}^{1}, l_{1}) \ldots ({\bf x}^{n}, l_{n}) \right\} \in {\cal L} } \left[ \prod_{j=0}^{n} \e^2 \exp (-\b \th l_{j}) \right] Z_{\L_{2}}^{\{ L \}} \Eq(2.11)$$ where we use the convention that if $n=0$ then $\sum_{ L}$ is absent, while $\prod_{j=0}^{0}=1$. $Z_{\L_{2}}^{\{ L \} }$ denotes the partition function on $\L_{2}$ with boundary conditions given by $-1$ on $\widetilde \rL$ and $+1$ elsewhere. Again for $n=0$ we set $\widetilde \rL=\bigcup_{j=0}^{0}\; r_{{\bf x}^{j}, l_{j}}=\emptyset $. \bigno {\bf Def. 2.3.} % In the part of the lines of $\L_{2}$ that are immidiatly %above and below of a rod, we define $\L_{2}$-extension of a rod. %Given $r_{{\bf x}^{1}, l_{1}}$ we take We call {\it $\L_{2}$-enlargement} of a rod $r_{{\bf x}, l}$, and denote it by $\hat r_{{\bf x}, l}$, the set of sites immediately above and below $r_{{\bf x}, l}\; \big(\; {\bf x}=(x_{1},x_{2})\;\big)$: $$\hat r_{{\bf x}, l}=\left\{ {\bf y}=(y_{1},y_{2})\; \in \L_{2} \quad |\qquad x_{1}\leq y_{1} \leq x_{1}+l-1\quad \hbox{ and }y_{2}=x_{2}\pm 1 \right\} \Eq(2.12)$$ %%%%%%% %DISEGNO 1 %%%%%%% %In the lines of $\L_{2}$ immdiatly above or below of a rod, %$r_{{\bf x}, l}$ we consider the maximal connected components of %sites, whose spin takes value $+1$ and (at least one of them is at %distance one site of the rod) that has non-empty intersection with %$\hat r_{{\bf x}, l}$.\par %%%%%%% %DISEGNO 2 We set $$\bar r_{{\bf x}, l}=\hat r_{{\bf x}, l} \cup r_{{\bf x}, l} \Eq(2.12')$$ and call it {\it extended rod}.\par Let us denote by $E( r_{{\bf x}, l})$ the set of four extreme points of $\hat r_{{\bf x}, l}$: $$E( r_{{\bf x}, l})=\left\{ (x_{1},x_{2}\pm 1);\quad (x_{1}+l-1,x_{2}\pm 1) \right\}.\Eq(2.13)$$ Given $\s\in \O_{\L}$, we denote by C$(\s)$ the set of maximal connected components (segments $\r\subset \L_{2}$) of $+1$ spins in $\L_{2}$ that have non-empty intersection with some $\hat r_{{\bf x}, l}$. We emphasize that for any $h_{2}>0$, if we suppose that the spins in $r_{{\bf x}, l}$ are $-1$, then the typical value of the spins in $\hat r_{{\bf x}, l}$ will be also minus. With this in mind we introduce the following definitions. \bigno {\bf Def. 2.4. } Given $\s\in \O_\L$, we call {\it protuberances} and denote by $p$ the components $\r$ completely contained in $\hat r_{{\bf x}, l}\setminus E(\hat r_{{\bf x}, l})$ for at least one $({\bf x}, l)\in L(\s)$. We denote by ${\rm P}(\s)$ the set of all protuberances appearing in the configuration $\s$: $${\rm P} (\s)=\left\{ \r\in {\rm C}(\s) :\quad \exists({\bf x}, l)\in L(\s):\; \r\subset \hat r_{{\bf x}, l}\setminus E(\hat r_{{\bf x}, l}) \right\}.\Eq(2.14)$$ {\bf Def. 2.5. } We call {\it appendices} of $\s$ and denote by $a$ the other components $\r$ in $C(\s)$. ${\rm A}(\s)$ is the set of appendices appearing in $\s$ $${\rm A}(\s)= {\rm C}(\s)\setminus {\rm P} (\s).\Eq(2.15)$$ {\bf Def. 2.6. } Two elements $a,$ $a'$ (appendices), $p,$ $p'$ (protuberances), $a,$ $p$ are {\it incompatible} if they intersect. \bigno {\bf Remark 2.1.} Every appendix contains at least one site in $E( r_{{\bf x}, l})$ for some rod $r_{{\bf x}, l};$ thus we can write, for the length $|a|$ of an appendix $a$: $$|a|=l_{1}+l_{2}$$ where $l_{1}\geq 1$ is the length of the part of $a$ contained in $\hat r_{{\bf x}, l}$ for some $({\bf x}, l)$ whereas $l_{2}\geq 0$ is the length of the rest (part of $a$ outside any $\hat r_{{\bf x}, l}$).\par We set: $$\forall a \in {\rm A}(\s):\;|a|=l_{1}+l_{2} \qquad\z_{0} (a)=\e^2(\e^2 \exp(\d \b) )^{l_{1}} \exp(\d \b)^{l_{2}} \qquad \Eq(2.16)$$ $$\forall p \in {\rm P} (\s):\; |p|=l\qquad \z_{0} (p)=\e^2(\e^2 \exp(\d \b) )^l \qquad \Eq(2.17)$$ We recall that $\d=2J-h_2$ is positive below the line $a$, but negative above. Given $\rL\in \cL $, a pair of families $\rA,\rP$ of (compatible) appendices and protuberances is called ``L- compatible '' if there exists $\s\in \O$ such that $\rL(\s),\rA(\s),\rP(\s)=\rL,\rA,\rP$. We denote by $\widetilde \rA, \;\widetilde \rP\subset \L_{2}$ the supports of A, P, respectively: $$\widetilde \rA=\bigcup_{a\in \rA} a\qquad \widetilde \rP=\bigcup_{p\in \rP} p$$ The set of all families of appendices and protuberances $(\rA,\rP)$ compatible with L is denoted by $$\big(\cA(\rL),\cP(\rL)\big) = \left\{\rA,\rP:\quad a,a'\in \rA,\; p,p' \in \rP, \; a,p \in (\rA,\rP) \hbox{ are pairwise}\qquad\right.$$ $$ \qquad \qquad \qquad \qquad \qquad \left. \hbox{ compatible and L-compatible} \right\}\Eq(2.18)$$ Given a compatible set L,A we denote by $\bar\rA $ the extension of $\widetilde \rA$ to the nearest neighbour sites in $\L_{2}$ not contained in any $\hat r_{{\bf x}, l}$ with $({\bf x}, l)\in \rL$: $$\bar\rA=\widetilde \rA \cup \left\{ {\bf y}\in \L_{2}: {\rm dist}( {\bf y},\widetilde \rA) =1,\quad {\bf y}\cap \left( \bigcup_{ ({\bf x},l)\in \rL } \hat r_{{\bf x}, l} \right)=\emptyset \right\}\Eq(2.19) $$ if $\widetilde \rA=\emptyset$ we set $\bar \rA=\emptyset$. We can write: $$ Z_{\L}= \sum_{n\geq 0} \quad \sum_{\rL=\{ ({\bf x}^{1}, l_{1}) \ldots ({\bf x}^{n}, l_{n}) \} \in {\cal L} } \left[ \prod_{j=0}^{n} \e^{2} \exp (-\b \th l_{j}) \right.\cdot \qquad$$ $$\qquad\qquad\qquad\qquad\qquad\cdot\left. \sum_{(\rP,\rA)\in (\cP(\rL),\cA(\rL) )} \; \prod_{p\in {\rm P}} \z_0(p)\; \prod_{a\in \rA} \z_{0}(a) \; Z_{\L_{2}}^{\{ \rL ;\, \rA;\, \rP \} } \right] \Eq(2.20)$$ where $Z_{\L_{2}}^{\{ \rL;\, \rA;\, \rP \} }$ is the partition function in $\L_{2}\setminus\left[ \bar \rA\bigcup (\bigcup_{{\bf x}, l \in \rL}\hat r_{{\bf x}, l})\, \right]$ with $+$ boundary conditions on the contiguous sites on $\L_{1}$ and $-$ boundary conditions on the contiguous sites in $\L_{2}$.\par Then $Z_{\L_{2}}^{\{ \rL;\, \rA;\, \rP \} }$ splits into the product of partition functions of one dimensional Ising systems with external field $\d$ on some intervals in $\L_{2}$ with $-$ boundary conditions on their extrema. Given $\rL,\, \rA,\, \rP$ we set: $\L_{2}\setminus\left[ \bar \rA\bigcup (\bigcup_{{\bf x}, l \in \rL}\hat r_{{\bf x}, l})\, \right]=\bigcup_{j} g_{j}$. The $g_{j}$ are disjoint intervals that lie in $\L_{2}$ between pairs of sites which are either extreme points of some extended appendices in $\bar \rA$ or extreme points of some $\hat r_{{\bf x}, l}$. This latter case corresponds to saying that in $y\in E( r_{{\bf x}, l})$ we have $\s(y)=-1.$ %(``empty") % Their length can be %$|\rI_{j}|:=l=1,2$ or $l>2$. In the %cases %$l=1,2 $ certainly the corresponding spins are $-1$. %When the length of such interval is $|g_{j}|=l>2$ the extreme spins are %determined to be $-1$, while we have to sum over all possible values %of the other spins in the $l-2$ with $-1$ boundary conditions. %Now we want to compute this %$Z_{\L_{2}}^{\{ %r_{{\bf x}^{j}, l_{j}};\, \rA;\, \rP % \} }$ % that the sum on the sites of $\L_{2}$ that are not in %$\widetilde r$ or $a$. %We want to compute the one dimensional partition function on the %sites of $\L_{2}$ The interior sites of the intervals $g_{j}$ are free and we are going to sum up over their values obtaining, in this way, the partition function of a $\d$-field, one dimensional Ising model on an interval of length $l$ with $-1$ boundary condition. Given L, A, P we denote by $\rG (\rL, \rA, \rP )$ the set of the above defined intervals $\{ g_{j}\}$. In what follows we will denote by $Z^{\t,\;\t'}_{l}(\d,-)$ the partition function of a one dimensional Ising model on the interval $\{1,\dots,l\}$ with external field $\d$, and $\t,\;\t'$ boundary conditions when the reference configuration (zero of the energy ) is $-\uline{1} $ (all minuses) $$Z^{\t,\;\t'}_{l}(\d,-)=\sum_{\s\in\{-1,+1 \}^{l} } e^{-\b[H(\s|\t\,\t')-H(- \uline{1}|\t\,\t')]}\Eq(2.21)$$ where $$H(\s|\t\,\t')=-{J\over 2}\t\s_{1} +{J\over 2}\sum_{i=1}^{l-1}\s_{i}\s_{i+1} -{J\over 2}\t'\s_{l} -{\d\over 2}\sum_{i=1}^{l} \s_{i}\Eq(2.22)$$ \bigno {\bf Proposition 2.1}\par {\it There exist costants $c_{1}(\d,\t,\t'),\; c_{2}(\d,\t,\t')$ $$Z_{l}^{\t,\t'}(\d,-)= c_{1}(\d,\t,\t')\l_{0}^{l+1} \left( 1+ c_{2}(\d,\t,\t') \left({\l_{1}\over\l_{0}}\right) ^{l+1} \right)\Eq(2.23)$$ where $$\l_{0,1}={1+e^{\d \b}\over 2}\pm \sqrt{{(1- e^{\d \b})^{2}\over 4}+ e^{(-2J+\d)\b}}\Eq(2.24)$$ If the external field is $\d=0$ and $\t=\t'=-1$, we have $\l_{0}=1+\e$, $\l_{1}=1-\e$ and $c_{1}(0,\t,\t')={1\over 2},\;\;\; c_{2}(0,\t,\t')=1$}.\par \medno {\it Proof}\par\noindent The proposition follows from an elementary computation, based on the transfer matrix. Indeed in the case of periodic boundary condition one has $Z^{per}(\d,-)={\rm Tr} A^{l}(\d,-)$ where $$A(\d,-)= \left( \matrix{ e^{\b\d}& e^{({\d\over 2}-J)\b}\cr e^{({\d\over 2}-J)\b}&1 \cr } \right) $$ is the corresponding transfer matrix. While for a generic boundary condition $\t,\t'$ outside $[1,\ldots,l]$ one has $$Z^{\t,\t'}_{l}(\d,-)=(v_{\t},A^{l}(\d,-) v_{\t'})$$ where $v_{\t},v_{\t'}$ are suitable vectors. See also section 4.2 for a different derivation. \QED \medskip Using Proposition 2.1 $$Z_{l}^{--}(\d,-)= {c_{1}(\d,--)\l_{0}^{l+1}} \left( 1+ c_{2}(\d,--) \left({\l_{1}\over\l_{0}}\right) ^{l+1} \right)\Eq(2.25)$$ This sum over the values of the spins on the sites of $\L_{2}\setminus\left[ \bar \rA\bigcup (\bigcup_{{\bf x}, l \in \rL}\hat r_{{\bf x}, l})\, \right]$ gives rise to an effective interaction between pairs of rods.\par %at distance $l_{1}$ of the %other $(1- 2\e+o( \e ) )^{l_{1}}$.\par %\bigno %{\bf Def. 6 } %The set of the sites in which this interaction is different to $1$, %is a bond and we denote it with $b$.\par %\bigskip We want now to put a factor $\l_{0}$ in evidence for each site in $\L_{2}$ in the r. h. s. of \equ(2.20); we get: $$ Z_{\L}= \l_{0}^{N^{2}\over 2}\left\{\sum_{n\geq 0} \quad \sum_{ ({\bf x}^{1}, l_{1}) \ldots ({\bf x}^{n}, l_{n}) \in {\cal L} }\left[ \prod_{j=0}^{n} \e^{2} \exp (-\b \th l_{j}) { 1 \overwithdelims() \l_{0}}^{|\cup_{{\bf x},l}\hat r_{{\bf x}, l}| } \cdot\right. \right. $$ $$ \qquad \cdot\left.\left. \sum_{(\rP,\rA)\in (\cP(\rL),\cA(\rL) )} \;\; { 1 \overwithdelims() \l_{0}}^{|\bar\rA \setminus\widetilde\rA | } \prod_{p\in {\rm P}} \z(p)\; \prod_{a\in \rA} \z(a) \prod_{g\in \rG (\rL, \rA, \rP)}\z(g) \right] \right\} \Eq(2.26)$$ where $$\z (p)=\z_{0}(p){1 \overwithdelims() \l_{0} }^{l} =\e^{2} {\e^{2} \exp(\d \b) \overwithdelims() \l_{0} }^{l} \leq \e^2 \left(\e^2(1-\e) \right)^l \Eq(2.26')$$ %%% CI SONO LE STIME DEI VARI OGGETTI CHE HA DETTO DI CANCELLARE PER %%%%%%% IL MOMENTO %$$\z(b)=\left( { \l_{1}\over \l_{0}}\right)^{l+1}= %\left( { 1-\e\over 1+\e }\right)^{l+1}= %\left( 1-2\e +4\e^{2}+o( \e ) \right)^{l+1} %\left( 1- { 7\over 4}\e \right)^{l+1}\Eq(2.25)$$ $$\z (a)=\z_{0}(a){1 \overwithdelims() \l_{0} }^{l_{2}} =\e^{2} \left( { \e^2 \exp(\d \b) \over \l_0 } \right)^{l_1} {\exp(\d \b) \overwithdelims() \l_{0} }^{l_{2}} \leq \e^{2} (\e^2 (1-\e ) )^{l_1} \left( 1- { 15 \over 16}\e \right)^{l_{2}} \Eq(2.27)$$ %\leq\e^{2(l_{1}+1)} \left( 1- { 3\over 4}\e %\right)^{(l_{1}+l_{2})} %$$\z (p)=\e^{2} {\e^{2}\overwithdelims() \l_{0} }^{l} %\leq \e^{2}\left( \e^{2}\left( 1- { 3\over 4}\e \right) \right) %^{l}\Eq(1.25)$$ %for sufficiently large $\b$. %in the limit $\b \to \infty$. $$\z(g)={c_{1}\l_{0}} \left( 1+ c_{2}{\l_{1} \overwithdelims() \l_{0}}^{|g|+1} \right) \Eq(2.28)$$ \par The last inequality in \equ(2.27) comes from our choice $\d\b <{\e\over 8}$. Of course for negative $\d$ we could have much better estimates but our emphasis is on $\d=0$.\par Let us call {\it "leg''} an element that can be a rod, a protuberance or an appendix. \smallno {\bf Remark 2.2. } Notice that the number of factors ${1 \overwithdelims() \l_{0} }$ that we get in \equ(2.23) depends on the overlapping between the $\hat r_{{\bf x}, l}$; this induces an (effective) interaction between rods; a similar effect takes place also for the other kinds of legs, thus, it makes sense to give the following definitions. \par\bigno {\bf Def. 2.7. } Two compatible rods $r_{{\bf x}^{1}, l_{1}}$, $r_{{\bf x}^{2}, l_{2}}$ are {\it interacting} if the intersection between their $\L_{2}$-enlargements $\hat r_{{\bf x}^{1}, l_{1}}$, $\hat r_{{\bf x}^{2}, l_{2}}$ is non-empty: $\hat r_{{\bf x}^{1}, l_{1}}\cap \hat r_{{\bf x}^{2}, l_{2}}\ne \emptyset $. \bigno {\bf Def. 2.8. } A compatible pair given by a rod $r$ and an appendix $a$ (or a protuberance $p$ ) is {\it interacting} if the intersection between the appendix $a$ (or the protuberance $p$ ) and the $\L_{2}$-enlargement of the rod $r$ is non-empty: $\hat r_{{\bf x}^{1}, l_{1}}\cap a \ne \emptyset $. \bigno {\bf Def. 2.9. } Two compatible appendices $a$, $a'$ are {\it interacting} if there exist a site ${\bf x}\in a$ and a site ${\bf y}\in a'$ such that $\quad d({\bf x},{\bf y})\leq 2$ \medskip \par We use symbol $\cI$ to denote interaction; for example $r\cI a$ means that the rod $r$ interacts with the appendix $a$.\par We now develop the product $\prod_{g\in \rG (\rL, \rA, \rP)}{\l_{0} \over 2 } \left( 1+ {\l_{1} \overwithdelims() \l_{0}}^{|g|+1} \right)$. A single term of the development will correspond to a choice of the term 1 or ${\l_{1} \overwithdelims() \l_{0}}^{|g|+1}$ for each $g\in \rG (\rL, \rA, \rP)$. \par Given a term of the above development we will call {\it bond} and denote by $b$ those among the intervals $g$ which hold the term ${\l_{1} \overwithdelims() \l_{0}}^{|g|+1}$. The activity of a bond $b$ is $$\z(b)=c_{2}(\d,--){\l_{1} \overwithdelims() \l_{0}}^{|b|+1} \leq \left( 1-\e +o(\e) \right)^{|b|+1} \leq (1- \e+ o(\e) )^{|b|+1} \leq\left(1-{7\over 4}\e \right)^{|b|+1}\Eq(2.29)$$ Notice that $\z(b)$ has an expression partially similar to $\z(a)$ but without the prefactor $\e^{2}$. Geometrically a bond is a generic interval in $\rG(\rL,\rA,\rP)$; we can write: $$ Z_{\L}= \l_{0}^{N^{2}\over 2}\left\{\sum_{n\geq 0} \quad \sum_{ ({\bf x}^{1}, l_{1}) \ldots ({\bf x}^{n}, l_{n}) \in {\cal L} }\left[ \prod_{j=0}^{n} \e^{2} \exp (-\b \th l_{j}) { 1 \overwithdelims() \l_{0}}^{|\cup_{{\bf x},l}\hat r_{{\bf x}, l}| } \cdot \right. \right. $$ $$ \cdot \sum_{(\rP,\rA)\in (\cP(\rL),\cA(\rL) )} { 1 \overwithdelims() \l_{0}}^{|\bar\rA \setminus\widetilde\rA | } \prod_{p\in {\rm P}} \z(p)\; \prod_{a\in \rA} \z(a) { \l_{0} c_{1}(\d,--)}^{|\rG(\rL,\rP,\rA) | }\cdot$$ $$\qquad \qquad \cdot \left.\left. \sum_{\rB \subset \rG(\rL,\rP,\rA) } \prod_{b\in \rB} c_{2}(\d,--){ \l_{1} \overwithdelims() \l_{0}}^{|b |+1 } \right] \right\} \Eq(2.30) $$ \smallno {\bf Def. 2.10.} A rod $r$ and a bond $b$ are {\it interacting} if there exist a site $x\in r$ and a site $y\in b$ such that ${\rm d}(x,y)=\sqrt{2}$. \smallno {\bf Def. 2.11. } An appendix $a$ and a bond $b$ are {\it interacting} if there exist a site $x\in r$ and a site $y\in b$ such that ${\rm d}(x,y)=2$. \smallno The above notions of interactions will be now used to define particular collections of legs and bonds. \smallno {\bf Def. 2.12. } Given a compatible set L, A, P, a {\it "conglomerate''} $\g$ is a maximal connected component of interacting legs. \bigno We are now ready to give the basic definition of polymer\bigno {\bf Def. 2.13.} Given a compatible set L, A, P, and a set B of bonds in G(L,A,P), a {\it polymer} $\G$ is a maximal component of interacting rods, appendices, protuberances and bonds. \par \bigno {\bf Def. 2.14. } For each rod we can define four corners: at the top to the left, at the top to the right at the bottom to the left and at the bottom to the right.\par We call ``vertex'' a generic site belonging to a leg or to a bond; the support $\widetilde \G$ of a polymer $\G$ is the union of its vertices.\par Given a rod $r_{{\bf x},l}$, we denote by $\rC (r_{{\bf x},l}) $ the set of its (four) corners $c$. To any $c$ we can associate a site $y(c)\in E( r_{{\bf x}, l}):$ the one which is contiguous to $c$; this correspondence is one to one when $l\geq 2$.\par Given $( \rL, \rA)$ we denote by $\bar\rC( \rL, \rA)$ the set of corners $c$ belonging to a rod in L such that the corresponding $y(c)$ is connected to some interval $g$ or belongs to some appendix $a\in \rA(\s)$ connected to some $g$. Given a conglomerate $\g$ we call $$\rL(\g) = \{ ({\bf x}, l):\quad r_{{\bf x}, l}\in \g \}$$ similarly, by $\rA(\g),\; \rP(\g)$, we denote the set of appendices, or protuberances, respectively, belonging to $\g$. We have $$\z(\g)= \prod_{ ({\bf x}, l) \in \rL(\g) } \left[ \z(r_{x,l}) \left( \sqrt{ { \l_{0} c_{1}(\d,--)} } \right)^ {|\rC ( r_{{\bf x}, l}) \cap \bar\rC( \rL, \rA)| } \right] { 1 \overwithdelims() \l_{0}}^{|\cup_{{\bf x},l}\hat r_{{\bf x}, l}| } \cdot $$ $$ \cdot \qquad \qquad { 1 \overwithdelims() \l_{0}}^{|\bar\rA \setminus\widetilde\rA | } \; \prod_{p\in {\rm P}(\g)} \z(p) \; \prod_{a\in \rA (\g)} \z(a) \Eq(2.31)$$ %%%%%%%%%%%%%%% FORMULE PER LE STIME DI ZITZ DI A, B, P, R, % The function $\z$ takes different value depending on the elements % $$\z(r_{{\bf x}, l})=e^{-2\b J}e^{-\th l}\qquad % \z(b)\leq % \left( 1- { 7\over 4}\e \right)^{l+1}\Eq(2.31)$$ % $$\z (a)\leq % \e^{2(l_{1}+1)} \left( 1- { 3\over 4}\e % \right)^{(l_{1}+l_{2})}\qquad % \z (p) % \leq \e^{2}\left( \e^{2}\left( 1- { 3\over 4}\e \right) \right) % ^{l}\Eq(1.27)$$ % % for sufficiently large $\b$. {\bf Remark 2.3. } A conglomerate is nothing but a polymer $\G$ containing no bonds.\par Given a polymer $\G$, containing the conglomerates $\g_{1},\ldots, \g_{n}$ and the bonds $b_{1}$, $\ldots ,$ $b_{m}$, the {\it weight} of $\G$ is given by $$ \z(\G)=\prod_{i=1}^{n}\z(\g_{i}) \prod_{j=1}^{m}\z(b_{j}).$$ Using the above definitions of polymer and interaction we are now able to express our partition function as the one of a gas of polymers. We summarize our result in the following: \medno {\bf Lemma 2.2} \medno $Z_{\L}$ can be expressed as: $$Z_{\L}=\l_{0}^{{N^{2}\over 2}} \left( 1+ \sum_{n\geq 1}\sum_{\G_{1}\ldots \G_{n}} \z(\G_{1}) \ldots \z(\G_{n}) \right) \Eq(2.32)$$ where, the sum on the r.h.s. of the \equ(2.32) runs over all families $\G_{1},\ldots,\G_{n}$ of polymers in $\L$ such that for any $i,j$, $\G_{i}$ do not interact with $\G_{j}$.\par We will now look at a polymer $\G$ as a graph whose nodes are conglomerates and whose connections are given by bonds. Notice that every bond $b$ has to be connected at each one of its two extremes to a rod or to an appendix belonging to some conglomerate. It may happen that a bond connects two vertices of the same conglomerate . In this case we say that we have an internal bond. Notice that, the polymers $\G$, seen as graphs composed by conglomerates and bonds, do not have in general a tree structure, since they can contain loops. In particular every internal bond gives rise to a loop. It turns out that the difficult part in the computation of the sum over all polymers (passing throught a fixed point) comes from the bonds. In order to be able to control the contribution of the bonds, we reorganize the sum over the polymers in such a way to associate to every bond one conglomerate, whose weight is so small to compensate the (large) result of the sum over the bonds. To achieve %boh this purpose it happens that it is useful to introduce a tree structure. \bigno {\bf Lemma 2.3. } \medno {\it Given a polymer $\G$ we can find a tree $T\subset \G$ ( which is in general not unique) obtained from $\G$ by removing some bonds in $\G$.}\par\noindent {\it Proof}\par\noindent We will use a hierarchical construction. We choose a vertex $v$ belonging to a conglomerate $\g_{1}\subset\G$. Then we consider all conglomerates that are connected to $\g_{1}$ by some bonds and we denote them by $\left \{ \g_{1}^{2}\ldots \g_{k_{2}}^{2} \right\}$. They constitute the ``second generation''. We can iteratively define the subsequent generations. Given the $j$-th generation $\left \{ \g_{1}^{j}\ldots \g_{k_{j}}^{j} \right\}$, we define the $(j+1)$-th generation by taking all conglomerates that are connected at least by a bond to some conglomerate belonging to the $j$-th generation but not connected to any conglomerate belonging to some previous generation. \par This hierarchical description provides a criterion to remove the bonds in order to obtain a tree $T$ out of $\G$. All bonds that connect the first with the second generation belong to the tree. Starting from $j=2$, we consider the conglomerates of the $j$-th generation and we remove from $\G$ all internal bonds and all bonds that connect pairs of conglomerates both belonging to the same $j$-th generation. In order to get a tree structure, we want that any conglomerate of the $(j+1)$-st generation is connected by a single bond to a single conglomerate of the $j$-th generation. So if in $\G$ there is more than one bond connecting a given conglomerate $\g^{j+1}_{k}$ (of the $(j+1)$-st generation) to $\cup_{m}\g^{j}_{m}$ (the set of conglomerates of the $j$-th generation), we keep in $T$ the first one in lexicografic order (of the first extremum) and remove all the others. It is clear that, continuing in this way, we end up with a tree. \QED Given a polymer $\G$, we call $\cT(\G)$ the tree $T$ obtained via the above construction. \par {\bf Remark 2.4.} We know that the tree $T$ contains all conglomerates of $\G$, so the possible positions of the removed bonds is fixed.\par \bigno Given a tree $T$ consider: \par \item {1.} any pair of corners of rods (belonging to the same or to two conglomerates) of $T$ which lie contiguously on the same line of $\L_2$ and that may be directly connected by a bond (without appendices in between); or\par \item {2.} any pair of corners of rods (belonging to the same or to two conglomerates) of $T$ which lie contiguously on the same line of $\L_1$ with one or two appendices emerging from them and such that a bond can connect the appendix to the corner or the two appendices.\par A graph $\G$ such that $\cT(\G) = T$ can be obtained by deciding whether or not we put a bond ( directly or via one or two appendices) between the above pairs of corners of rods. We can think to have introduced a dicotomic variable $\t$ taking the value 1 if we add the bond, and zero if we do not add the bond. \par Let us denote by $n_{r}(\g)$ the number of rods in $\g$. \medno {\bf Lemma 2.4.} $$\sum_{ \G:\, \cT(\G)=T} \z(\G)\leq \z(T) \prod_{\g\in T} 3^{4 n_{r}(\g)} .\Eq(2.32')$$\medno {\it Proof}\par\noindent There are at most $2^{4 n_{r}(\g)}$ choices of the set of bonds that we need to add to the tree in order to obtain a graph $\G$ such that $\cT(\G)=T$. \par We have, % {\bf Remark 6} In our case the nodes % of the tree $T$ are always conglomerates. Since a bond cannot finish % without a rod or an appendix connected with a rod. $$\sum_{ \G:\, \cT(\G)=T} \z(\G)=\z(T) \sum_{\G:\, \cT(\G)=T}\z(\G \setminus T) \leq \z(T) \prod_{\g\in T}\left( 1+ 2^{ 4 n_{r}(\g)} \max_{b}\z(b) \right)\leq$$ %$$??= \z_{T} \prod_{\g\in T} \e^{-\d_{1}n_{r}(\g)} %\prod_{\g\in T} \e^{\d_{1}n_{r}(\g)} \left( 1+ 2^{n_{r}(\g)} %\max_{b}\z_{b} \right)\Eq(1.29)$$ $$\leq \z(T) \prod_{\g\in T} 3^{ 4 n_{r}(\g)} \prod_{\g\in T} {1 \over 3^{4 n_{r}(\g)}} \left( 1+ 2^{4 n_{r}(\g)} \bigl(1-{7\over 4}\e \bigr) \right) \leq \z(T) \prod_{\g\in T} 3^{4 n_{r}(\g)} .\Eq(2.33)$$ \QED \par Given $t>1$, we introduce the modified weigth $\z_{t}(\g)$ of $\z(\g)$ (see \equ (2.31) ) given by $$\z_{t}(\g)= \prod_{ ({\bf x}, l) \in \rL(\g) } \left[\; t\; \z(r_{x,l}) \left( \sqrt{ { \l_{0} c_{1}(\d,--)} } \right)^ {|\rC ( r_{{\bf x}, l}) \cap \bar\rC( \rL, \rA)| } { 1 \overwithdelims() \l_{0}}^{|\cup_{{\bf x},l}\hat r_{{\bf x}, l}| } \right.\cdot $$ $$ \left.\cdot \qquad \qquad { 1 \overwithdelims() \l_{0}}^{|\bar\rA \setminus\widetilde\rA | } \; \prod_{p\in {\rm P}(\g)} \z(p) \; \prod_{a\in \rA(\g)} \z(a) \right] \Eq(2.34)$$ This `'worsening'' parameter $t$ is introduced in order to subsequently control some entropic factors; the `'worsened'' activity $\z_{t}$ represents an upper bound for the result of some partial sum. This will appear clear during the proof of the Theorem 2.6 (see, for instance (2.57) below). Notice that in \equ(2.34) we multiplied the weight $\z(r)$ by a factor $t$ and we left the other weights unchanged. (One has $\z(\g)=\z_{1}(\g)$ ) In the following Lemma 2.5 we perform the main step ( and simplified version) of the Theorem 2.6. \medno {\bf Lemma 2.5.} {\it For every $t : 00$ we have $$a^{j}_{1}\ldots a^{j}_{h_{j}}\quad\hbox{appendices;}\quad p^{j}_{1}\ldots p^{j}_{k_{j}}\quad\hbox{protuberances;}\quad r^{j}_{1}\ldots r^{j}_{n_{j}}\quad\hbox{rods.}$$ We denote by $C(r_{i}^{(h)})$ the set of four corners of the $i$-th rod of the $h$-th generation. $$\eqalign{ &\cC_{0}(r)=C(r_{0});\qquad \widetilde\rR_{0}= r_{0};\qquad \cC_{1}(r) =\bigcup_{i=1}^{n_{1}}C(r_{i}^{(1)});\qquad \widetilde\rR_{1}=\bigcup_{i=1}^{n_{1}} r_{i}^{(1)};\qquad\cr &\widetilde\rA_{1}=\bigcup_{i=1}^{h_{1}} a^{(1)}_{i}\qquad\quad \widetilde\rP_{1}=\bigcup_{i=1}^{k_{1}} p^{(1)}_{i}\qquad \ldots\quad \cC_{M}(r) =\bigcup_{i=1}^{n_{M}}C(r_{i}^{(1)});\cr &\widetilde\rR_{M}=\bigcup_{i=1}^{n_{M}} r^{(M)}_{i}\qquad \widetilde\rA_{M}=\bigcup_{i=1}^{h_{M}} a^{(M)}_{i} \qquad\quad\;\;\; \widetilde\rP_{M}=\bigcup_{i=1}^{k_{M}} p^{(M)}_{i} } \Eq(2.36)$$ We want to estimate, for $\b$ sufficently large, the weight of a conglomerate $\g$ as a product of independent weights associated to the single constituents of $\g$ (rods, appendices, protuberances). We introduce the quantity ${\hat \z}_{t}(r,\rL, \rA )$ defined by: $$ \z_t(r) \;t\; \left( \sqrt{ { \l_{0} c_{1}(\d,--)} } \right)^ {|\rC ( r_{{\bf x}, l}) \cap \bar\rC( \rL, \rA)| } =:{1\over 2}\; {\hat \z}_{t}(r,\rL, \rA ) \left( [e^{-\th / 3}]^{2}\right)^{l} {1 \overwithdelims() 1+\e^{2} }^{4} \Eq(2.39)$$ >From \equ(2.10), \equ(2.2) we get $$ {\hat \z}_{t}(r, \rL, \rA )\leq {\widetilde\z}(r):= \e^{2}\;t\; \left( e^{-\th / 3}\right)^{l}2(1+\e^{2})^{4} {\l_{0}\overwithdelims()2 }^{2}\leq \e^{2}\;t\; \left( e^{-\th / 3}\right)^{l}2(1+\e^{2})^{4}.\Eq(2.40)$$ The factor $(1+\e^{2})^{-4}\approx 1$ is introduced to control the sum over the appendices (see (2.49) below). Let $a$ be an appendix, we introduce $\widetilde\z (a)$ defined by $$\z(a)=:{1\over 2}\;{\widetilde\z}(a) \left[ 1-{1\over 8}\e \right]^{2 l}\; \Eq(2.37)$$ >From \equ(2.27) and \equ(2.37) we get $${\widetilde\z}(a)\leq \e^2 \left( \e^2 \left( 1- {11\over 16}\e \right) \right)^{l_1} \;2 \left[ 1-{10\over 16}\e \right]^{l_{2}}.\;\Eq(2.38)$$ Given a protuberance $p$, we introduce $\widetilde\z(p) $ defined by $$\z(p)=:{1\over 2}\;{\widetilde\z}(p) \left({1\over 2} \right)^{2|p|}\Eq(2.41)$$ from \equ(2.26') and \equ(2.41) we get $${\widetilde\z}(p)\leq \e^{2}2 \left[ 4\;\e^2 (1-\e ) \right]^{|p|}. \Eq(2.42)$$ %First we can compute the following sums: In \equ(2.37), \equ(2.41), \equ(2.39) we have extracted from the weights $\z(a),\;$ $\z(p),\;$ $t\,\z(r),$ a factor $\left(1-{1\over 8}\e \right)^{2},\;$ ${1\overwithdelims() 2}^{2},$ $\;e^{-{2\th \over 3} },$ respectively, that we associate to the vertices; this amounts to worsen (increase) the weight from $\z$ to $\widetilde \z$. Moreover we extract another factor $1\over 2$ that we will use to control the sum over the number of generations. In (2.46), (2.47), (2.48), we extimate the sum of $\widetilde \z$ over the various legs containing a fixed vertex. For the appendices we have: $$\sum_{a\ni v^{*}}{\widetilde \z}(a)\leq 2 \,\e^{2} \sum_{l_{1}=1}^{\infty} \left( \e^2 \left( 1- {11\over 16}\e \right) \right)^{l_1} \sum_{l_{2}=0}^{\infty} \left(1-{5\over 8}\e \right)^{l_{2}} \leq {16 \over 5} \e^{3}\Eq(2.43)$$ For the rods: $$\sum_{r \ni v^{*} }{\widetilde \z}(r)\leq 2 \e^{2} t\,(1+\e^{2})^{4}\sum_{l=1}^{\infty} \left( 1-{1\over 4}\th \right)^{l} \leq 8\,t\,(1+\e^{2})^{4}{\e^{2}\over \th} :=c_{1}{\e^{2}\over \th}\Eq(2.44)$$ with $c_{1}=8\; t\; (1+ \e^{2})^{4}$. Finally for the protuberances we have the following simpler analogue of \equ(2.43) $$\sum_{p \ni v^{*} }{\widetilde \z}(p)\leq 2\;\e^{2} \sum_{l=1}^{\infty} \left[ \e^{2 }(1-\e ) 4 \right]^{l} = 2\; \e^{2} {4\e^{2}(1-\e ) \over 1-4\e^{2} (1-\e) } \leq 8\; \e^{4} \Eq(2.45)$$ The idea that we use to compute $\sum_{\g\ni x}\z_{t}(\g)$ is the following: we first fix all the legs of the first $M-1$ generations and sum over the legs of the last generation ( using the worsened weights $\widetilde \z$); the result of this sum is controlled by the small damping factors $<1$: $\left(1-{1\over 4}\e \right)^{2},\;$ ${1\overwithdelims() 2}^{2},$ $\;e^{-{2\th \over 3} },$ that we had preliminarly extracted from the original weights $\z$ of the legs of the previous generation. Then we proceed iteratively by summing over the legs of the $M-1$ generation and so on. We get $$\sum_{\g:\;\g\ni x}\z_{t}(\g)\;\leq \; \sum_{M=0}^{\infty}{1\over 2}(\widetilde\z (r_0)) \prod_{v\in\widetilde\rR_{0}}\z_t(\g\setminus(\widetilde\rA_{M-1}\cup \widetilde\rP_{M-1} \cup\widetilde\rR_{M-1}) )\;\; {1\over 2}$$ $$\prod_{v\in\widetilde\rA_{M-1}} \left[ \left(1-{1\over 8}\e \right)^{2} \left(1+\sum_{r \cI v }{\widetilde \z}(r) \right) \right] \cdot \prod_{c\in\cC_{M-1}(r)} \left[ {1\over 1+\e^{2}} \left( 1+ \sum_{a \ni y(c) }{\widetilde \z}(a) \right) \right] \cdot $$ $$\prod_{v\in\widetilde\rR_{M-1}} \left[ \left(1-{1\over 4}\th \right)^{2} \left(1+\sum_{r \cI v }{\widetilde \z}(r) %+\sum_{a \iota v \ne \emptyset}{\widetilde \z}(a) +\sum_{p \cI v }{\widetilde \z}(p) \right) \right] \cdot \prod_{v\in\cP_{M-1}} \left[ {1\overwithdelims() 2}^{2} \left(1+\sum_{r \cI v }{\widetilde \z}(r) \right) \right] \Eq(2.46)$$ Using \equ(2.43), \equ(2.44), \equ(2.45), \equ(2.46) and taking into account that a leg can interact with another leg from above or below, we get $$\sum_{\g\ni x}\z_{t}(\g)\;\;\leq\; \sum_{M=0}^{\infty}{1\over 2}(\widetilde\z (r_0)) \prod_{v\in\widetilde\rR_{0}} \z_t(\g\setminus(\widetilde\rA_{M-1}\cup \widetilde\rP_{M-1} \cup\widetilde\rR_{M-1}) )\;\;$$ $${1\over 2} \left\{ \prod_{v\in\widetilde\rA_{M-1}} \left[ \left(1-{1\over 8}\e \right) \left(1+c_{1}{\e^{2}\over \th} \right) \right]^{2} \prod_{v\in\cP_{M-1}} \left[ {1\over 2} \left(1+c_{1}{\e^{2}\over \th} \right) \right]^{2} \right. $$ $$\left. \prod_{v\in\widetilde\rR_{M-1}} \left[ \left(1-{1\over 4}\th \right) \left(1+c_{1}{\e^{2}\over \th} %+4(d+1)\e^{3} +8\; \e^{4} \right) \right]^{2}\;\; \prod_{c\in\cC_{M-1}(r)} \left[ {1\over 1+\e^{2}} \left( 1+ {16\over 5}\e^{3} \right) \right] \right \}\Eq(2.47)$$ where $v^{*}$ is a fixed vertex, say the origin. If $$c_{1}{\e^{2}\over \th}=8\; t (1+\e^{2})^{4}{\e^{2}\over \th}< {1\over 8}\e\Eq(2.48)$$ all the products enclosed in the curly brackets $\{ \qquad\}$ are less than 1. Then we iterate this procedure and we obtain $$\sum_{\g\ni x}\z_{t}(\g)\quad\leq\; \sum_{M=0}^{\infty}{1\over 2}(\widetilde\z (r_0)) \left\{ \prod_{c\in\cC_{0}(r)} \left[ {1\over 1+\e^{2} } \left( 1+ 16\e^{3} \right) \right] \cdot\quad \right.$$ $$\left.\cdot \prod_{v\in\widetilde\rR_{0}} \left[ \left(1-{1\over 4}\th \right) \left(1+c_{1}{\e^{2}\over \th} %+4(d+1)\e^{3} +8\;\e^{4} \right) \right]^{2} \right\} \left( {1\over 2} \right) ^{(M-1)} \leq $$ $$\leq \sum_{M=0}^{\infty} \left( {1\over 2} \right)^{M} 8\; t\, (1+\e^{2})^{4} \left( {\e^{2}\over \th} \right) \leq 16\;t\,(1+\e^{2})^{4} {\e^{2}\over \th} \Eq(2.49)$$ %$$\hbox{ where } %c_{1}={4(1+d)^{11}3^{4} \over d} %.\Eq(1.58)$$ %\bigno %{\bf Lemma 5} The sum over all conglomerates containing %a vertex $\bar v$ %$$\sum_{\g:\;\g \ni {\bar v}} {\z}(\g) %\leq c_{1} {\e^{2}\over \th }\qquad %\hbox{ where }\;\; %c_{1}={4 3^{4}(1+d)^{11}\over d }\Eq(1.59)$$ %\bigno %{\bf Lemma 5} %The sum over all conglomerates that contain a corner $c$ %belonging to an appendix or a rod.\par %$$\sum_{\g:\g \iota c}\z(\g) %\leq c_{1}{\e^{2}\over \th } %\qquad\hbox{ where }\;\; %c_{1}={4 3^{4}(1+d)^{11}\over d }\Eq(1.60)$$ %$$\hbox{ and (INOLTRE }\sum_{b:\,b \iota c}\z(b) %\leq c_{2}{1\over \e } %\qquad\hbox{ where }\;\; %c_{2}={4\over 7 }\Eq(1.61)$$ %\par %{\it Proof} This concludes the proof of the Lemma for $x\in \L_{1}$. If $x\in \L_{2}$ necessarily there exists an appendix $a_{0}$ (or a protuberance $p_{0}$), in $\g$ which contains $x$; this appendix (or protuberance) has to be connected to a rod $r_{0}$ ( and throught it to the rest of the conglomerate), then $\g=a_{0}\cup \{ \g\setminus a_{0}\}$ (or $\g=p_{0}\cup \{ \g\setminus p_{0}\}$ ) $$\sum_{\g:\; \widetilde\g \ni x } \z_{t}(\g) \leq \sum_{a_{0} \ni x } \z(a_{0})\,2 \sum_{ \g\ni a_{0} } \z( \g \setminus a_{0}) \leq {32\over 15} \e^{3} \left( c_{1} {\e^{2}\over \th} \right) .\Eq(2.50)$$ $$\sum_{\g:\; \widetilde\g \ni x } \z_{t}(\g) \leq \sum_{p_{0} \ni x } \z(p_{0})\,2 \sum_{ \g\ni p_{0}} \z( \g \setminus p_{0}) \leq 2 \e^{4} \left( c_{1} {\e^{2}\over \th} \right) .\Eq(2.51)$$ \QED %To conclude the proof of Lemma 5 we have to compute %$$\sum_{b:\,b \iota c} \z(b) %\leq \sum _{l=1}^{\infty} %\left( 1- {7\over 4} \e \right)^{l}= %{1\over 1 -\left( 1- {7\over 4} \e \right)}=$$ %$$\sum_{b:\,b \iota c} \z(b) %\leq \left( {4\over 7 \e} \right):= %c_{2}{1\over \e }\Eq(1.64)$$ %This is last result that we need to finish the proof of the %Theorem 2. % % % %\par \bigno {\bf Theorem 2.6.}\medno {\it Let $\th=\k \e$, $\d\b<{\e\over 8}$ and suppose $\k >2^{12}\;21$, then there exists a constant $c_{2}$ such that for $\e$ sufficiently small: $$\sum_{\G:\; \exists \g\subset \G:\;\g \ni \bar v}\z(\G) \leq c_{2}{\e^{2}\over \th} \Eq(2.52)$$ }\par \medno {\it Proof}\par\noindent It follows from Lemmas 2.3, 2.4 that, in order to get the Theorem, we have only to prove $$\sum_{T:\exists \g\subset T:\;\g \ni \bar v}\z(T) \prod_{\g\in T} 3^{ 4 n_{r}(\g)} \leq c_{2}{\e^{2}\over \th} \Eq(2.53)$$ We will use a hierarchical construction reducing the estimate of the sum on the l.h.s. of \equ(2.53) to the estimate of a sum over trees with modified weight. We consider the conglomerate $\g^{(0)}$ that contains the given site $\bar v$, and we call it the zeroth generation. Then we consider all conglomerates $\g^{(1)}_{1}\ldots \g^{(1)}_{k_{1}}$ connected by a bond to $\g^{(0)}$; we call them the 1-st generation. Given the $j$-th generation, we define the $(j+1)$-th generation taking all conglomerates $\g^{(j+1)}_{1}\ldots \g^{(j+1)}_{k_{j+1}}$ connected by a bond to the ones of the $j$-th generation, but disconnected to all (up to $(j-1)$-th ) previous generation. \par Let $N$ be the index of the maximal generation. We call $\cD_{0}$ the set of corners of rods belonging to the conglomerate $\g^{(0)}$: $\cD_{0}=\cup_{r\in\g_{0}}C(r)$; we denote, for $j=1,\ldots , N,$ by $\cD_{j}$ the set of corners of rods belonging to the conglomerates of the $j$-th generation: $$\cD_{j}=\cup_{i=1}^{k_{j}}\cup_{r\in\g_{i}^{(j)}}C(r).$$ \par {\bf Remark 2.5.} We want to sum over the generations from the last one to the first one. The last one (the ``leaves'' of the tree) is made of conglomerates; in performing the subsequent sums we exploit the particular structure of a tree: starting from the leaves and going ``up'' to the root of the tree we can (uniquely) associate each conglomerate to one bond. The crucial role is plaied by unseparated pairs conglomerate-bond. Indeed the sum over all bonds passing throught a given point amounts to $1\over \e$; thus we have to use for each bond the small weight of the (previous) conglomerate to compensate the diverging term $1\over \e$. \par In order to estimate the quantity $\sum_{T\ni \bar v}\z(T) \prod_{\g\in T} 3^{ 4 n_{r}(\g)}$ we introduce %is clear that this second factor the modified weigths %of all conglomerates: now we have $\z_{t_{1}}(\g) $ %and $\z_{t_{2}}(\g) $ %instead of $\z(\g)$ with $t_{1}=3^{4}$. % $t_{1}=3^{4}2 (1+d_{4})^{4}$. We have $\z_{t_{1}}(\g)=\z(\g) 3^{4 n_{r}(\g)}. $ Moreover we want to write the weight $\z_{t_{1}}(\g) $ of the conglomerate as product of some factors and $\z_{t_{2}}(\g) $ as follows: %. We know that %$\bar \z(\g)$ differs from $\z(\g)$ only because %for the rods $r$ we changed $\z(r)$ into %$\quad\bar \z(r)=\e^{2}3^{4} e^{-\th l}$ %the other weights are unchanged %$\bar \z(a)=\z(a),$ $\quad \bar \z(p)=\z(p),$ $\quad %\bar \z(b)=\z(b).$ % $\quad??\bar \z(r)=\e^{2-4\d_{1}} e^{-\th l}$ % $\quad\bar \z(r)=\e^{2}3^{4} e^{-\th l}$. %We want to write the weight of a conglomerate as product %of some factors $$\z_{t_{1}}(\g)={1 \overwithdelims() 2 }\z_{t_{2}}(\g)\; {1 \overwithdelims() 1+d_{4} }^{4 n_{r}(\g)} \;\;\hbox{ with}\;\; t_{2}=3^{4}2 (1+d_{4})^{4}.\Eq(2.54)$$ The factor ${1 \overwithdelims() 2 }$ in \equ(2.54) will be used to control the sum over the number $N$ of generations whereas the factors ${1 \overwithdelims() 1+d_{4} }$ appearing for each corner $c$ of a rod in $\g$ will be used to control the sum over the pair bond-conglomerate emerging from $c$ (connected with $y(c)$). %where $\xi(c)=$ corner of the rods belonging to $\g$, and %$\e^{\D_{1}}={1 \over 1+d}=\e^{\D_{2}}.$ %In $\z(\g)$ we have the same as for $\bar \z(\g)$: %$\z(\g)$ is different from $\bar\z(\g)$ only for $\bar\z(r)$. %$\z(a)=\z(a),$ $\quad \z(p)=\z(p),$ %$\quad %\z(b)=\z(b),$ %$\quad??\z(r)=\e^{2-4\d_{1}-\D_{1}-4\D_{2}} e^{-\th l}$ %$\quad\z(r)=\e^{2}3^{4}(1+d)^{4}(1+d) e^{-\th l}$. %\par %METTO IN EVIDENZA ${1 \overwithdelims() 2 }$ PER OGNI GENERAZIONE, %QUINDI PER OGNI %r E ${1 \overwithdelims() 1+d_{4} }$ QUATTRO PER OGNI r. We have: $$\sum_{T\ni \bar v}\z(T) \prod_{\g\in T} 3^{ 4 n_{r}(\g)}\; \leq\; \sum _{n=1}^{\infty}{1 \overwithdelims() 2 } \left [\sum _{\g_{0}\ni \bar v} \z_{t_{2}}(\g)\; \right]\cdot$$ $$\cdot{1 \overwithdelims() 2 } \prod_{c\in \cD_{0}} \left [ {1 \overwithdelims() 1+d_{4} } \left(1+ \sum_{\g:\g \ni c}\z_{t_{2}}(\g) \sum_{b \cE c}\z(b)\right) \right] \ldots$$ $$\quad\cdot \;{1 \overwithdelims() 2 } \prod_{c\in \cD_{N-1}} \left [ {1 \overwithdelims() 1+d_{4} } \left(1+ \sum_{\g:\g \ni c}\z_{t_{2}}(\g) \sum_{b \cE c}\z(b)\right) \right]\Eq(2.55)$$ where by $b \cE c$ we mean that the bond $b$ ``emerges'' from the corner $c$. %OPPURE is at distance 1 from $y(c)$. We compute this preliminary sum $$\sum_{b:\,b \cE c} \z(b) \leq \sum _{l=1}^{\infty} \left( 1- {7\over 4} \e \right)^{l}\leq {1\over 1 -\left( 1- {7\over 4} \e \right)} \leq \left( {4\over 7 \e} \right) \Eq(2.56)$$ Using Lemma 2 with $t=t_{2}$ we have $$\sum_{\g:\widetilde\g \ni x } \z_{t_{2}}(\g) \leq {32\; (1+\e^{2})^{4} (1+d_{4})^{4}3^{4} } {\e^{2}\over \th }:= c_{3}{\e^{2}\over \th }\Eq(2.57)$$ % $$\sum_{T\ni \bar v}\z(T) \prod_{\g\in T} 3^{ 4 n_{r}(\g)}\; \leq\; \sum_{n=1}^{\infty} {1 \overwithdelims() 2 } \sum_{\g_{0}\ni \bar v} \z_{t_{2}}(\g)\; {1 \overwithdelims() 2 } \prod_{c\in \cD_{0}} \left [ {1 \overwithdelims() 1+d_{4} }\right.$$ $$\left. \left(1+ \sum_{\g:\g \ni c}\z_{t_{2}}(\g) \sum_{b \ni c}\z(b)\right) \right] \ldots \cdot\;{1 \overwithdelims() 2 } \prod_{c\in \cD_{N-1}} \left [ {1 \overwithdelims() 1+d_{4} } \left(1+ c_{3} \,{7\over 4}\, {\e\over \th}\right) \right] $$ If $${1\over 1+d_{4}}\left(1+ c_{3} \,{7\over 4}\, {\e\over \th}\right)<1,\Eq (2.58)$$ we can extimate the quantity enclosed in the brackets $[ \qquad]$ by 1. A possible choice for $d_{4}$ in order to verify \equ(2.48) (with $t=t_{2}$) and \equ(2.58) is $$d_{4}={1\over 3}; \qquad \k :={\th\over \e}>2^{11} 21 (1+\e^{2})^{4}\Eq(2.59)$$ $$\Longrightarrow \sum_{T\ni \bar v}\z(T) \prod_{\g\in T} 3^{ 4 n_{r}(\g)}\; \leq\;\sum_{n=1}^{\infty} {1 \overwithdelims() 2 }^{N}\,c_{3}{\e^{2}\over \th} \leq\, 2\,c_{3}{\e^{2}\over \th}:= \,c_{2}{\e^{2}\over \th}\Eq(2.60)$$ $$\hbox{where}\qquad\qquad c_{2}=2^{14}(1+\e^{2})^{4}$$ \QED\par \par \bigno In order to develop the theory of cluster expansion (see [GLMM], [K P], [D]) we need a suitable notion of incompatibility, between pairs $\G, \G'$ of polymers. This new notion (which extends the one we already gave) is called {\it incongruousness} and denoted by the symbol $\iota$.\medno {\bf Def. 2.15.} Two rods which are either incompatible or interacting are said to be {\it incongruous}: this happens if and only if they or their $\L_{2}$-enlargement intersect: $${\hat r}_{1}\cap {\hat r}_{2} \ne \emptyset \hbox{ or } r_{1}\cap r_{2} \ne \emptyset \Eq(2.61)$$ \bigno {\bf Def. 2.16.} A rod $r$ and an appendix $a$ are {\it incongruous} if there exist a site ${\bf x}_{1}\in r$ and a site ${\bf x}_{2}\in a$ such that $d({\bf x}_{1},{\bf x}_{2})=1$. \par\bigno {\bf Def. 2.17.} A rod $r$ and a bond $b$ are {\it incongruous} if there exists a site ${\bf x}_{1}\in r$ and a site ${\bf x}_{2}\in b$ such that $d({\bf x}_{1},{\bf x}_{2})\leq\sqrt 2$. \bigno {\bf Def. 2.18.} An appendix $a_{1}$ (or a protuberance $p_{1}$) is {\it incongruous} with another appendix $a_{2}$ (or protuberance $p_{2}$) if there exist a site ${\bf x}_{1}\in a_{1}$ (or a site ${\bf x}_{1}\in p_{1}$ ) and a site ${\bf x}_{2}\in a_{2}$ (or a site ${\bf x}_{2}\in p_{2}$ ) such that ${\bf x}_{1}={\bf x}_{2}$ or $d({\bf x}_{1},{\bf x}_{2})=1 $; or if there exists a site $x_{3}\in \bar \rA$ such that $d(x_{1},x_{3})=d(x_{3},x_{2})=1.$ \bigno {\bf Def. 2.19.} An appendix $a$ (or a protuberance $p$) is {\it incongruous} with a bond $b$ if there exist a site ${\bf x}_{1}\in a$ (or a site ${\bf x}_{1}\in p$ ) and a site ${\bf x}_{2}\in b$ such that ${\bf x}_{1}={\bf x}_{2}$ or if they have horizontal distance less or equal to two \smallno {\bf Def. 2.20} Two bonds $b_{1}$ and $b_{2}$ are {\it incongruous} if they intersect.\par We say that a polymer $\G$ is incongruous with another polymer $\G'$ and we write $\G \iota \G'$ if there is an element in $\G$ which is incongruous with an element in $\G'$. %We want to prove that %$$\quad \forall{\bar v}\quad %\sum_{{\bar v}\iota\G'} \F(\G') e^{a(\G')} %\leq a({\bar v}) \Eq(1.69)$$ Following Koteck\'y and Preiss we want to look at a polymer model with a new weight function given by $\z(\G)e^{\a(\G) + d(\G)}$ where $\a(\G), d(\G)$ are positive functions that we take of the form $$\a(\G)=\sum_{v\in\G} \a(v)\qquad\qquad d(\G)=\sum_{v\in\G} d(v)$$ where $d(v)={1\over 16}\e \quad \forall v\in a,b,p,r$ and $\a(v)$ is given by $$\a( v )= \cases{ {1\over 16}\e &if $v\in a,\;b,\;p$ \cr \hbox{}\cr c &if $ v\in r\;\hbox{and has two corners}$\cr \hbox{}\cr {1\over 16}\e &if $v\in r$\cr} \Eq(2.62)$$ The criterion of choice in \equ(2.62) for the different elements $a,b,p,r$ is the following one: the smaller is the weight of a vertex $v$ the larger is the term $\a (v)$. Indeed the ending points of a rod (made by a pair of corners) carries a small factor of the order of $\e$ so that we can attribute to them a factor $\a =c$ whereas in the others cases we set $\a ={1\over 16} \e$. \medno {\bf Corollary 2.7.}\medno {\it Let $c>0, \th=\k \e$, $\d \b<{\e\over 8}$ and suppose $\k >21\;2^{12}\, e^{2c}$, then, for $\e$ sufficiently small: $$\sum_{\G:\; \exists \g\subset \G:\;\g \ni v_{1}}\z(\G)e^{\a(\G)+d(\G)} \leq c_{4}{\e^{2}\over \th} \Eq(2.63)$$ where $c_{4}=2^{15}e^{2c}$ }\par \medno {\it Proof}\par\noindent To get the result we easly adapt the argument of proof of Theorem 2.6 to the new weights. We use the following estimates valid for sufficiently small $\e$. From \equ(2.10) and \equ(2.62) we have $$\z(r)e^{\a(r)+d(r)}= \e^{2}e^{2\, c}e^{ -(\th -{1\over 8}\e)|r|} =\e^{2}e^{2\, c}e^{-\bar \th |r|}\Eq(2.64)$$ with $\bar\th=\th -{1\over 8}\e$. From \equ(2.29) and \equ(2.62) we have ($|b| =l$): $$\z(b)e^{ {1\over 8}\e |b|}\leq \left[ e^{ {1\over 8}\e}\left( 1-2\e+o(\e) \right)\right]^{l} \leq \left( 1-{7\over 4}\e \right)^{l}\Eq(2.65)$$ so that we get the same result as the one in equation \equ(2.56). From \equ(2.27) and \equ(2.62) we have ($|a|=l_1 +l_2$): $$\z(a)e^{ {1\over 8}\e |a|}= \e^{2}\left( {\e^{2} e^{\d\b} e^{{1\over 8}\e} \over \l_0 } \right)^{l_{1}} \left( {e^{{1\over 8}\e}\over \l_0} \right)^{l_{2}}\leq \e^{2} \left[\e^{2} \left(1- {13\over 16}\e \right) \right]^{l_{1}} \left( {1-{6\over 8} \e} \right)^{l_{2}}. \Eq(2.66)$$ >From \equ(2.17) and \equ(2.62), we get $$\z(p)e^{ {1\over 8}\e |p|}= \e^{2} \left( { \e^{2} e^{\d\b+{1\over 8}\e} \over \l_0} \right)^{|p|} \leq \e^{2} \left(\e^{2} \left(1-{1\over 2}\e\right) \right)^{|p|} \Eq(2.67)$$ With the same steps of Theorem 2.6 we prove \equ(2.63) with: $$ c_{4}=2^{14}(1+\e^{2})^{4} e^{2 c}\;\;\hbox{ and } \quad \k> 21\cdot 2^{11}e^{2\,c}(1+\e^{2})^{4} +{1\over 8} \Eq(2.67')$$ \QED \par {\bf Theorem 2.8.} {\it Let $c ={1\over 4}, \th=\k \e$, $\d \b<{\e\over 8}$ and suppose $\k > 2^{19}\, e^{1\over 2}$, then, for $\b$ sufficiently large: } $$\sum_{\G\iota\G'} \z(\G') e^{\a(\G')+d(\G')} \leq \a(\G)\Eq(2.68)$$ \par {\it Proof}\par\noindent %This is the same as %$$\sum_{ v_{1}\in \G} %\sum_{ v_{1}\iota\G'} \z(\G') e^{\a(\G')++d(\G')} %\leq \a(\G) \Eq(1.66)$$ A sufficient condition for \equ(2.68) is that for any $v_{1}\in \G$ which is incongruous with $v_{2}\in \G'$, there exists a vertex $\widetilde v_{1}\in \G$ ( $\widetilde v_{1}$ can coincide with $v_{1}$ ) which is incongruous with $\widetilde v_{2}$ (which, in turn, can coincide with $v_{2}$ ) still belonging to $\G'$, and %that is with $\G'$ too, and such that $$ \sum_{\G': \widetilde v_{1}\iota \G'}\z(\G') e^{\a(\G')+d(\G')}\leq \a(\widetilde v_{1})\Eq(2.69)$$ {\bf Case 1} $v_{1}\in \L_{1}$, so $v_{1}$ belongs to a rod $r_{1}$ of $\G$ and it is incompatible with a site $v_{2}$ of $\G'$. The site $v_{2}\in \G'$ belongs to \item{$a$)} a rod $r'\in \G'$ \item{$b$)} an appendix $a'\in \G'$ \item{$c$)} a protuberance $p'\in \G'$,\acapo for all these cases $v_{2}$ belongs to a conglomerate of $\G'$; in this case we can take $\tilde v_{1}=v_{1}$, $\tilde v_{2}= v_{2}$ and we can apply Corollary 2.7. We have $$ \sum_{\G': \, \G'\iota\tilde v_{1} }\z(\G') e^{\a(\G')+d(\G')} =\sum_{\G': \tilde v_{2}\in \G'}\z(\G') e^{\a(\G')+d(\G')}\leq c_{4}{\e^{2}\over \th }<\a(v_{2})\Eq(2.70)$$ A first condition is then: $$c_{4}{\e^{2}\over \bar \th }<{1\over 16}\e.\Eq(2.71)$$ \item{$d$)} The site $v_{2}\in \G'$ belongs to a bond $b'\in \G'$. If there exists $\tilde v_{1}\in \G$ which is incongruous with $\G'$, in the sense specified in one of the above cases $1)\,a)$ $1)\,b)$ $1)\,c)$ this means that this $\G'$ is considered in $ \sum_{\G': \, \G'\iota\tilde v_{1} }$. If all incongruesness between $ \G$ and $ \G'$ are of this type $1)\,d)$, necessarily, we have a situation like the one depicted in the following figure 2.4. \midinsert \line\bgroup\hss \beginpicture \setcoordinatesystem units <0.5true cm,0.5truecm> \setplotarea x from 0 to 22, y from 0 to 8 \plot 6 3 6 3.5 / \plot 15 3 15 3.5 / \plot 17 6 17 5.5 / \plot 11 5 11 5.5 / \putrectangle corners at 2 3 and 6 2 \putrectangle corners at 8 5 and 11 4 \putrectangle corners at 15 3 and 20 2 \putrectangle corners at 17 7 and 20 6 \put {$\G'$} at 2 3.6 \put {$\G'$} at 20.5 3.5 \put {$\G$} at 20 7.5 \put {$r_1$} at 10 5.5 \put {$\tilde v_2$} at 8.5 3.3 \put {$\tilde v_1$} at 8.5 4.5 \put {$b'$} at 13.5 2.9 \put {\bf Fig. 2.4 } at 5 0.1 \setdashes \plot 6 3.5 15 3.5 / \plot 17 5.5 11 5.5 / \endpicture \hss\egroup \endinsert \acapo The lenth of the bond $b'\in\G'$ is larger than the lenth of the rod $r_{1}$ and the two minus-sites at the extrema of the bond have empty intersection with $\tilde r_{1}$. In this case we choose $\tilde v_{1}\in r_{1}\in \G$ as the left-most site of the rod $r_{1}$, so $\a(\tilde v_{1})={1\over 8}\e+2 c$. This implies that there exists another site $\tilde v_{2}$ belonging to $b'\in \G'$ which is incongruous with $\tilde v_{1}$. We call $b_{1}$ the part of $b'$ that is lying on the left of $\tilde v_{2}$, $b_{2}$ the part of $b'$ that is lying on the right; $\G_{1}$ the part of $\G'$ that is touching $b_{1}$, and $x_{-}$ the site in $\G_{1}$ connecting $b_{1}$ with $\G_{1}$. Likewise we call $b_{2}$ the rest of $b'$: $b_{2}=b'\setminus \{ b_{1} \cup \tilde v_{2} \},\;\G_{2}$ the part of $\G'$ that is connected with $b_{2}$ on the right and $x_{+}\in \G_{2}$ the site that is connected with $b_{2}$. See fig.2.4.\par We have: $$ \sum_{\G': \tilde v_{1}\iota \G'}\z(\G') e^{\a(\G')+d(\G)} =\sum_{\G': \tilde v_{2}\in \G'}\z(\G') e^{\a(\G')}\leq \sum _{|b_{1}|=1}^{\infty}\left( 1-{7\over 4}\e \right)^{|b_{1}|}\cdot $$ $$\sum_{\G_{1}:\,\G_{1}\ni x_{-}} \z(\G_{1}) e^{\a(\G_{1})+d(\G_1) } \cdot \sum _{|b_{2}|=1}^{\infty}\left( 1-{7\over 4}\e \right)^{|b_{2}|} \sum_{\G_{2}:\,\G_{2}\ni x_{+}} \z(\G_{2}) e^{\a(\G_{2})+d(\G_2)} \Eq (2.71')$$ Using Corollary 2.7 and \equ(2.56) $$ {\rm r.h.s.\; of \; \equ(2.71')} \leq \left({4\over 7\e} c_{4}{\e^{2}\over\bar \th} \right)^{2}= \left({4\over 7 } c_{4}{\e\over\bar \th} \right)^{2} <{1\over 16}\e+c \Eq(2.72)$$ A second condition is $$ \left({4\over 7} c_{4}{\e\over \th} \right)^{2} < c \Eq(2.73)$$\smallno {\bf Case 2} $v_{1}\in \L_{2}$, so $v_{1}$ belongs to an appendix $a_{1}$ of $\G$ and it is incompatible with a site $v_{2}$ of $\G'$. The site $v_{2}\in \G'$ belongs to \item{$a$)} a rod $r'\in \G'$ \item{$b$)} an appendix $a'\in \G'$ \item{$c$)} a protuberance $p'\in \G'$,\acapo these cases are treated like case 1 a), b), c): \equ(2.71) and \equ(2.73). \item{$d$)}the site $v_{2}\in b'\in \G'$. In this case there must be another kind of incongrouesness, that we have seen in the previous cases. \smallno {\bf Case 3} $v_{1}\in \L_{2}$, so $v_{1}$ belongs to a protuberance $p_{1}$ of $\G$; the conditions are the same as the ones of the case 2. \smallno {\bf Case 4} $v_{1}\in \L_{2}$, so $v_{1}$ belongs to an appendix $a_{1}$ of $\G$ and there is incongruesness with a site $v_{2}$ of $\G'$. The site $v_{2}\in \G'$ belongs to \item{$a$)} a rod $r'\in \G'$ \item{$b$)} an appendix $a'\in \G'$ \item{$c$)} a protuberance $p'\in \G'$,\acapo Again these cases can be treated like 1 a), b), c): \equ(2.71) and \equ(2.73). \item{$d$)}the site $v_{2}\in b'\in \G'$ there must be another kind of incongruesness, that we have seen in the previous cases.\par In order to verify estimates \equ(2.71) and \equ(2.73) we have to impose conditions on $\k$ $$16\;c_{4}{\e \over \bar\th }<1 \iff \k>16\;c_{4}+{1\over 8}.\Eq(2.74)$$ $$ \left({4\over 7} c_{4}{\e\over \th} \right)^{2} < c \iff \k>{4\over 7}{c_{4}\over \sqrt{c} } + {1\over 8}\Eq(2.75)$$ Both these conditions are verified for $c={1\over 4}$ if $$\k>2^{18}(1+\e^{2})^{4}e^{1\over 2} +{1\over 8}\Eq(2.76)$$ the proof is concluded. \QED \bigno {\bf 2.2. The region $\bf h_{1}>2J + \th \;\; $ and $ \bf \; \; h_2 <2J+\d' , \quad \d'\b\leq e^{-\b J} , \quad \th \gg e^{-\b J} $.} %{\bf 2.2 The region $\bf h_{2}<2J + \delta, \qquad h_1>2J$} \bigskip In the region $h_{1}>2J$ and $h_{2}<2J$, due to the fact that the external fields dominates w.r.t. the molecular field, the $+$ spins are everywhere typically preferred. We take the zero of the energy in the configuration $\uline{+1}$ ( all spins $+1$). It will become clear that on the line $h_{1}=2J$ both approaches will be acceptable. We will also see that the regions of applicability of the approaches overlap in a strip containing the line $h_{2}=2J$. We write: $$Z=\sum_{\s\in \O_{\L}} e^{-\b[H(\s)-H(\uline{+1})]}.\Eq(2.77)$$ Also in the region $h_{1}>2J$ and $h_{2}<2J$ we want to write the partition function of our system as the product of the partition function of a reference system $\widetilde Z$ times the partition function of a gas of polymers with small activity: $$Z=\widetilde Z\; \widetilde \Xi.\Eq(2.78)$$ This gas of polymers will be different w.r.t. the previous one.\par \medskip %remark {\bf Remark 2.6.} \medskip Let us now heuristically outline how the geometrical constructions of sections 2.1 and 2.2 "coexist" around the line $h_2 = 2J$. First we emphasise that the concept of rod remains the same and for its succesful application we require that $h_1$ would be ``strong'' enough i.e. that $\th = h_1 -2J$ should not be too small.\par Let us describe what kind of behaviour of the rods we expect and how we analyze it in the complementary approaches of sections 2.1 and 2.2. \par We want to prove that rods are rarely appearing, with a probability of the order $\e^2 $, and have a typical length of the order $1/\th$. Crossing the line $h_2 = 2J$ does not produce abrupt changes or non-analyticity of these quantities. On the other hand, if we cross the $h_2=2J$ line from above we expect a rather quick, but analytic, shift of the mean magnetization in the $\L_2$ lines from values almost $-1$ to almost $+1$.\par But this is not a phase transition (like in dimensions 3 and more, see ref. [HZ]); we can say that in our approach we are able to subordinate the quickly changing behaviour of the $\L_2$ lines to the (almost constant) one of the $\L_1$ lines (namely to the behaviour of the rods there) if $h_1 > 2J $ is kept ``strong enough''.\par Needless to say, the concept of a rod works as well in the $\L_2$ lines if the field $h_2$ is sufficiently strong and so we have two possible alternate approaches if both $h_1 -2J$ and $h_2 - 2J$ are sufficiently bigger than zero. In fact in such a region where both $h_1$ and $h_2$ are strong we have a third alternative approach to the problem. Namely, one could work with the rods defined simultaneously both in the even and odd lines. This is the most appropriate approach in such a case but we omit the details here and concentrate only on our most interesting and difficult case above when $h_2 \approx 2J$ and $h_1 > 2J +\th$ (or $h_1 \approx 2J$ and $h_2 > 2J + \th$) .\par As we already noted in the introduction, in the case when both $h_1$ and $h_2$ are marginal the concept of a rod is not usable in general. \par Given a rod $r$, consider the extended rod $\bar r = r \cup r' \cup r''$ where $r'$ resp. $r''$ is just the vertical shift of $r$ by value $1$ resp. $-1$. (See \equ (2.12),\equ (2.12') where we wrote $\hat r = r' \cup r''$.) \par Let us emphasise that given a rod r (of minuses in $\L_1$) a typical configuration appearing in $r'$ is given by $-1$ spins everywhere in $r'$, and in $r''$. \par A) Let us call this an "antiferromagnetic" (from the point of view of the rest of the line to which $r$ belongs) behaviour. This behaviour is typical both for the "weak" and "strong" fields $h_2$ and it is even more frequent in the situation of a strong $h_2$ field. This ideal picture is of course affected by the presence of the impurities inside of $\hat r$, called "protuberances" (which, indeed, appear with a very small probability, in both regimes).\par B) There is however also another possibility, having a small probability but requiring a careful estimate (and being slightly more frequent in the case of a weak field $h_2$ studied in this section). Namely, we have in mind the situation when there is a segment of pluses in the $r'$ line (or $r''$ line) but not contained inside $r'$, i.e. a $+$ appendix in the sense of previous section. These $+$ appendices of section 2.1 intersect, typically in one extremal point only, the segment $r'$. This will be called an ``extremal protuberance'' now and the whole situation is dealt with, in section 2.2, in the following different way: the values of spins outside $r'$ are simply "forgotten" and we look only for the partition function of the ``rest''. (To avoid confusion, let us stress once again that the notion of a $-$appendix defined in this section appears in quite a different context than the $+$appendices of section 2.1!) \par Maybe it is instructive to compare the methods that we are using to deal with these two cases A) and B) in (1) the previous section and (2) the present one. \par (1) In the "strong field $h_2$" situation (that of the previous section) we applied the following approach. In the case A) of absence of a $+$appendix, we decided "not to ask what happens outside $r'$ " and we expanded the partition function $Z^{--}$ in the connected regions in $\L_2$ starting immediately at the ends of $r'$. (This expansion lead to the notion of ``bond''.) These connected regions with $-$ boundaries have their other endpoints either in an extreme point of some other $r'$resp. $r''$ or, possibly, at the boundary of some +appendix. \par The case B) of a nonempty $+$appendix has a small probability but is rather subtle. Namely, $+$appendices, once they appear, tend to be quite large (in comparison to the, much more damped, protuberances) especially if we try to shift our analysis from the $h_2=2J$ line slightly also to the region of a weak $h_2$ field.\par 2) Now, in the present, ``weak field $h_2$'' situation the rods are the same as before but otherwise we are doing, in a sense, an opposite construction. Namely, it is in the case of a "ferromagnetic" behaviour (if we have some pluses in $r'$ touching its boundary; namely the case B)) where we ``cut our interest on whether the observed pluses at the boundary of $r'$ continue also outside of $r'$''. The segments where we expand $Z^{++}$ (leading to bonds) defined is the situation (2) are $+$ ones (compared to segments, with boundary condition $-$, of the previous section). They will start immediately at the end of $r'$, provided that the latter carries the value $+$. Otherwise, we will look for the continuation of such a row of minuses intersecting $r'$ also when it is leaving $r'$. The next interval where we expand $Z^{++}$ will then start just at the end of such a $-$ appendix. So the partition functions $Z^{++}$ (to be expanded and leading to bonds) are now taken on intervals starting either (less typically) directly in the $+$ boundary points of $r'$ or (much more typically!) touching the $-$ appendices just mentioned. Contrary to the concept of a (strong $h_2$ field) $+$appendix, the appearance of $-$appendices in the weak $h_2$ field situation is a typical phenomenon accompanying almost always the appearance of a rod. The analysis of these $-$ appendices is again a rather subtle one, being possible essentially only in the $h_2 < 2J$ regime (with an overlap with the the $h_2> 2J$ marginal regime). Notice that it is important to take the correct choice of $Z^{--}$ resp. $Z^{++}$ in the two respective (strong field and weak field $h_2$) cases; otherwise the coefficient $c_1$ in (2.25) (and analogously for the $+$ situation) decreases to zero with $h_2 -2J$ becoming negative (resp. positive), making \equ(2.32) a not easily controllable object.\par To summarize, around the line $h_2=2J$ we have developed two competing approaches proving uniqueness and analyticity; each of these approaches works easily in one of the regions $h_2 >2 J$ resp. $h_2 <2J$ . With some care, it can be extended also slightly inside of the other region. %fine remark \bigskip We have now to redefine (in comparison to sect. 2.1) some objects. Recall that a rod is a maximal connected segment of $-1$ spins in $\L_{1}$. We still use the notation: $$r_{x, l}=\{y\in \L_{1}\;\; |\;x_{1} J $ $$\z (a)=\z_{0}(a){1 \overwithdelims() \l_{0} }^{l} = {e^{-(2J-2h_{2}) \b} \overwithdelims() \l_{0} }^{l} \leq \e^{-\b\d l}\left( 1- { 3\over 4}\e \right)^{l} \Eq(2.94)$$ We define bonds as before, but now its activity is $$\z(b)=(1-2\e+o(\e))^{l}\Eq(2.95)$$ Notice that plus spins are preferred on $\L_{1}$, so that the rods on $\L_{1}$ are depressed, both for positive and negative $\d$. On the other hand the behavoiur on $\L_{2}$ changes smoothly but quickly when $\d$ changes sign. It easily follows from \equ(2.23), \equ(2.27) and \equ(2.29), that when $\d$ increases, the weights of $\z(a), \; \z(b)$ decrease. In particular \equ(2.94), \equ(2.95) continue to hold.\par In order to get a convergent cluster expansion we can repeat the same steps as the ones that we used in previous Section 2.1. We extend now the notion of conglomerates: they are composed of interacting extended rods, appendices and protuberances. The small factor $\e^{6}$ in the \equ(2.82) will be used to controll the sum over the appendices. In this way it is easy to obtain the analogous of Theorem 2.6, Corollary 2.7 and Theorem 2.8. \par We conclude this section by observing that from Lemma 2.2 and from theorem2.8 we can deduce, using the usual methods of the cluster expansion, uniqueness of the Gibbs measure and exponential decay of truncated correlations. It turns out that in the horizontal direction the correlation lenght is much larger (order of $1\over \e$) than in the vertical direction (order 1).\par \bigskip \numfor=1 \numsec=3 \centerline{\bf Section 3. The coexistence on the line $\bf h_1=h_2$} \bigskip In this section we prove that on the line $h_1=h_2<2J$, for sufficiently low temperature we have coexistence of two phases. The result is stated in the following theorem 3.1. \medno {\bf Theorem 3.1.} {\it There exists $\g(\b)$ going to zero as $\b$ goes to infinity, such that if we suppose $h_1=h_2=2J-\eta$ with $$\eta=\eta (\b)= \exp[-\b (J-\g(\b))]$$ then, for $\b$ sufficiently large, there are at least two Gibbs measures.} \medno {\it Proof}\par\noindent Consider a square $\L\subset \bZ^2$ centered at the origin and take minus boundary condition outside $\L$. If we are able to prove that the Gibbs probability (with minus boundary conditions ) that the spin at the origin is positive (that we denote by $\m_{\L}^{-}(\s_0=+)$ ) is strictly less than $1 \over 2$, uniformly in $\L$, then, by symmetry, we get the result. Indeed, by symmetry, we have $\m_{\L}^{-}(\s_0=+)=\m_{\L}^{+}(\s_0=-)$.\par We describe the configurations inside $\L$ via the usual Peierls contours. Given $\s\in\{-1,+1\}^\L$, we draw, for any pair of n. n. sites ($x,y$), with opposite spins, a unit segment orthogonal to $x,y$ (and joining two points of the dual lattice $\Z^{2} +({1\over 2},{1\over 2}) $ ). In this way we associate to each $\s\in \{ -1,+1\}^\L$ a set of polygonals such that for every point $i$ of $\L^*$ (the set of points in the dual lattice contained in $\L$ ) we have an even number of unit segments (0, 2, or 4) emerging from $i$. Let us use the Gallavotti convention: when we have 4 unit segments emerging from $i$ we modify the ``cross" by cutting in the direction North-East -- South-West. (See [GMM]). Indeed there is a one to one correspondence between configurations $\s\in \{-1,+1\}^\L$ (with minus b.c.) and the set of ``compatible families" of ''signed closed contours". \par Let us clarify the concept of `` compatible family". Given $\s$, consider the set $\g_1,\ldots,\g_n$ of closed, selfavoiding polygonals (=polygons) to which it gives rise. We assign to each $\g_i$ the sign of the spins immediately interior to $\g$ and we denote it by ${\rm sign}(\g)$. For istance the outer polygons $\g$ (namely the ones connected to $\partial \L$ by a n.n. path of minus spins) have the + sign; we call {\it contour} a signed polygon. By abuse of notation we continue to denote by $\g$ the contour; namely the polygon (as a geometrical object) toghether with its sign. A ``compatible family of contours" is a set $(\g_1,\ldots,\g_n)$ such that there exists a $\s\in\{-1,+1\}^\L$ giving rise, with minus boundary conditions, to $(\g_1,\ldots,\g_n)$ as the set of its signed closed polygons.\par There is a natural partial order by inclusion in the set of polygons. It is immediate to see that if $\g_i,\g_j$ are two contours making part of a compatible family: $(\g_1,\ldots, \g_i,\ldots,\g_j,\ldots,\g_n)$ and if $\g_i\subset\g_j$ and `` there is no other contour of the family" between $\g_i$ and $\g_j$ (namely there exists a path in $\L^*$ connecting $\g_i$ to $\g_j$ without intersecting any other member of the family) then the sign of $\g_i$ is opposite to that of $\g_j$. Let $\s \longrightarrow (\g_1,\ldots,\g_n)$ be a configuration, associated to the unique compatible family of contours to which it gives rise. The Gibbs probability of $\s$ can be expressed in terms of factorized weights (activities) attributed to $\g_i$. Indeed let $$\m^{-}_\L(\s)={\exp[-\b[H(\s)-H(-\uline{1})] \;] \over \sum\limits_{\s'} \exp[-\b[H(\s')-H(-\uline{1})] \;]}$$ where $-\uline{1}$ is the configuration with all spins minus. \par We denote, by abuse of notation, by $H(\g_1,\ldots,\g_n)$ the energy associated to $\s$ when $(\g_1,\ldots,\g_n)$ is precisely the family corresponding to $\s$. Suppose to partially order $(\g_1,\ldots,\g_n)$ by inclusion so that $\g_1$ is an outer contour. We write $$H((\g_1,\ldots,\g_n))-H(-\uline{1})= H(\g_1)-H(-\uline{1}) +H(\g_1,\g_2)-H(\g_1)+$$ $$\ldots+H(\g_1,\ldots,\g_n)-H(\g_1,\ldots,\g_{n-1}).$$ It is easy to see that: $$H(\g_1,\ldots,\g_k)-H(\g_1,\ldots,\g_{k-1})= H(\g_k)-H(-{\rm sign}(\g_k)).$$ We get, for $\s \longrightarrow (\g_1,\ldots,\g_n)$ $$\m_\L(\s)={\z(\g_1)\ldots \z(\g_n) \over \sum\limits_{(\g_1,\ldots,\g_k)\subset\L} \z(\g_1)\ldots \z(\g_k)},\Eq(3.1)$$ where the sum in the denominator of \equ(3.1) extends to all compatible families of contours, contains the contribution $1$ corresponding to the empty family and $$\z(\g):=\exp[-\b[H(\g)-H(-{\rm sign}( \g))]\;]$$ Notice that $\z(\g)$ depends in a non trivial way on the location of $\g$.\par Let $\O_0$ denote the set of compatible families $(\g_1,\ldots,\g_n)$ such that there exists at least a $\g_i\in (\g_1,\ldots,\g_n)$ containing the origin $O$ in its interior. Given an element $(\g_1,\ldots,\g_n)\in \O_0$ we denote by $\hat\g(\g_1,\ldots,\g_n)$ the minimal (in the sense of inclusion) between the $\g_i$ in $(\g_1,\ldots,\g_n)$ which contain the origin. \par So, given $(\g_1,\ldots,\g_n)\subset \O_0$, either $n=1$ and $\g_1=\hat\g$ or $(\g_1,\ldots,\g_n)=(\hat\g, \g_1',\ldots,$ $\g_{n-1}')$, $O\in \Th(\hat\g)$ and there is no other contour containing $O$ inside $\Th(\hat\g)$; here by $\Th(\g)$ we denote the region of $\bZ ^2$ enclosed in $\g$. \par We will prove, indeed, that: $$\m_\L(\s_0=+) <<{1\over 2}.\Eq(3.2)$$ We have $$\m_\L^- (\s_0=+)= {\sum\limits_{\bar\g:\;{\rm sign}(\bar\g)=+,\Th(\bar\g)\ni 0} \z(\bar\g) \sum\limits_{(\g^{i}_1,\ldots,\g^{i}_k,\g^{e}_1,\ldots,\g^{e}_l)\in \G } \;\z(\g^{i}_1)\ldots \z(\g^{i}_k) \z(\g^{e}_1)\ldots\z(\g^{e}_1) \over \sum\limits_{(\g_1,\ldots,\g_k)_{comp}} \z(\g_1)\ldots \z(\g_n)}\Eq(3.3)$$ where $\G$ is the set of all collections of contour $\g^{i}_1,\ldots,\g^{i}_k,\g^{e}_1,\ldots,\g^{e}_l$ with $k\geq 0, l\geq 0$ such that \item{-} $\g^{i}_1,\ldots,\g^{i}_k$ are contained in $\bar\g$ and do not contain the origin. \item{-} $\bar\g, \g^{i}_1,\ldots,\g^{i}_k,\g^{e}_1,\ldots,\g^{e}_l$ is a compatible family and \item{-}$\hat\g(\bar\g,\g^{i}_1,\ldots,\g^{i}_k,\g^{e}_1,\ldots,\g^{e}_l)=\bar\g$. In the r.h.s of the \equ(3.3) by the notation ``$(\g_1,\ldots,$ $\ldots,\g_n)_{ comp}$" we express that $(\g_1,\ldots,\g_n)$ constitute a compatible family.\par Now consider the transformation $S$ acting on signed contours in the following way: $S\g=\g'$ where $\g'$ is obtained from $\g$ by translating it of one unit in the vertical direction and by simultaniously changing its sign. It is immediate that , due to the symmetry: $h_{1}=h_{2}$, the activity is invariant under $S$: $$\z(\g)=\z(S\g).$$ It is clear that the set $(S\g^{i}_1,\ldots,S\g^{i}_k,\g^{e}_1,\ldots,\g^{e}_l)$ constitutes a compatible family. We also call $\cal S$ the invertible transformation mapping $$(\g^{i}_1,\ldots,\g^{i}_k,\g^{e}_1,\ldots,\g^{e}_l)\in \G \longrightarrow (S\g^{i}_1,\ldots,S\g^{i}_k,\g^{e}_1,\ldots,\g^{e}_l).$$ Thus, we get $$\m_\L^- (\s_0=+)= {\sum\limits_{\bar\g:\;{\rm sign}(\bar\g)=+,\Th(\bar\g)\ni 0}\; \z(\bar\g)\;\;\; \sum\limits_{(\g_1,\ldots,\g_m)\in \cS \G } \;\z(\g_1)\ldots \z(\g_m) \over \sum\limits_{(\g_1,\ldots,\g_k)_{comp}} \z(\g_1)\ldots \z(\g_n)}\Eq(3.3')$$ and so $$\m^{-}_\L(\s_0=+)\leq \sum_{\bar\g:{\rm sign} (\hat\g)=+}\z(\bar\g)\Eq(3.4)$$ where $\Th(\bar\g)\ni 0$. We now want to make a comparison with another model; we want to prove that there exist $J_1 (\b),\; J_2 (\b)$ $$\sum_{\bar\g:\;\;\Th(\bar\g)\ni 0 \;{\rm sign}(\bar\g) =+ }\z(\bar\g)\leq \sum_{\g:\Th(\g)\ni 0 }\z_{J_{1},J_{2}}(\g)\Eq(3.5)$$ where $\z_{J_1,J_2}(\g)$ is the activity of a Peierls contour for an anisotropic n.n. two dimensional Ising Model with horizontal and vertical coupling constants equal, respectively, to $J_1 ,\; J_2 $. Given a closed Peierls + signed contour $\g$, consider a horizontal unit segment $b$ belonging to $\g$ such that the normal to $b$, external to $\g$, is upwards. Let $x$ be the interior site adjacent to $b$ ($x$ below $b$). Then consider the vertical line orthogonal to $b$ in the interior of $\Th(\g)$; let $b'$ be the first unit segment encountered by this line in $\g$; the external normal to $b'$ is necessarily downwards. We have two cases; either\par 1. the distance between $b$ and $b'$ is one, or, \par 2. the distance between $b$ and $b'$ is larger than one.\par In the first case the energy difference w.r.t. the reference configuration $-\uline{1}$ due to the two broken bonds corresponding to $b$ and $b'$ and the external contribution due to the magnetic field is $$2J-h_1 \;\;\hbox{ if } x\in \L_1 \;\;\hbox{ or}$$ $$2J+h_2 \;\;\hbox{ if } x\in \L_2 $$ \midinsert \line\bgroup\hss \beginpicture \setcoordinatesystem units <0.5true cm,0.5truecm> \setplotarea x from 0 to 25, y from 0 to 7 \put {$\L_{2}$} at 0.5 0.5 \plot 4 0 8 0 / \plot 4 1 8 1 / \put {$b'$} at 6 0.1 \put {$b$} at 6 1.3 % fine primo brick \plot 12 1 16 1 / % fine 2 brick \plot 20 0 24 0 / \put {$b'$} at 22 0.1 \put {$y$} at 22 1.8 \put {$\L_{1}$} at 0.5 5.5 \plot 4 5 8 5 / \plot 4 6 8 6 / \put {$b'$} at 6 4.5 \put {$b$} at 6 6.5 % fine primo brick \plot 12 6 16 6 / \put {$b'$} at 14 5.5 \put {$b$} at 14 6.5 \put {$b$} at 14 0.5 % fine 2 brick \plot 20 5 24 5 / \put {$b'$} at 22 4.5 \put {$y$} at 22 5.5 \put {$y'$} at 22 6.5 \setdashes \plot 20 1 24 1 / \plot 12 5 16 5 / \plot 20 7 24 7 / % \setshadegrid span <4pt> % \vshade 4 0 1 [<0.5 pt,0.5pt ,0.5pt,0.5pt >] 8 0 1/ \endpicture \hss\egroup \endinsert \par In the second case if $x \in \L_1$, we associate $x$ to $b$; putting toghether the contribution of the broken bond and the one of the field, the resulting energy increment is $J-h_1$. If $x\in \L_2$, we consider $b$ alone so that the energy increment is just $J$. Now we look at $b'$: if $y$ (the site adjacent from the interior to $b'$, $y$ above $b'$) belongs to $\L_{1}$, we associate to $b'$ two sites $y$ and $y'=y+e_2$ ($e_2$ vertical upwards unit vector). The corresponding energy increment is only $J$ as the field contributions compensate, since $h_1=h_2=h$. If $y\in \L_2$ we associate only $y$ to b and get an energy increment $J+h_2$. \par A vertical unit segment always carries an energy difference $J$.\par It is immediate to verify that this association of the adjacent interior sites to unit segments of $\g$ makes sense and that the remaining interior sites (the bulk) give a zero field contribution. Moreover summing the contribution to the energy of $b$ and $b'$ (plus possibly the suitable set of internal sites) we get a lower bound to the energy associated to each $\g$ given by $$J|\g_v| +{2J-h\over 2} |\g_h|\Eq(3.6)$$ where $|\g_v|$ is the lenght of the vertical part of $\g$ whereas $|\g_h|$ is the lenght of the horizontal part of $\g$.\par So we get \equ(3.5) with $$J_1=J,\; \qquad \qquad J_2={2J-h\over 2}={\eta(\b)\over 2}\Eq(3.7)$$ In this way we are reduced to study the sum in the r.h.s. of \equ(3.5).\par This is the content of the following \bigno {\bf Proposition 3.2. Estimate for the $\bf J_1,\; J_2$ model}.\smallno {\it Given a $ J_1,\; J_2$ model, let $p=e^{-J_2\b}\;\;\;\e=e^{-J_1 \b}$ with $J_2=e^{-c\b}$, $c\leq J_1$, we have $$\sum_{\g:\Th(\g)\ni 0 }\z_{J_1,J_2}(\g)\;\hbox{ where } \z_{J_1,J_2}(\g) =p^{|\g_h|} \e^{|\g_v|}.\Eq(3.7') $$ }\smallno {\it Proof}\par\noindent Consider the following elementary components.\par \midinsert \line\bgroup\hss \beginpicture \setcoordinatesystem units <0.5true cm,0.5truecm> \setplotarea x from 0 to 28, y from 0 to 2 \plot 0 0 0 1 / \plot 0 1 4 1 / % fine primo brick \plot 7 1 7 0 / \plot 7 0 11 0 / % fine 2 brick \plot 14 1 18 1 / \plot 18 1 18 0 / % fine 3 brick \plot 21 0 25 0 / \plot 25 0 25 1 / % fine 4 brick \plot 28 0 28 1 / % \put {I} at 4.5 3.5 \endpicture \hss\egroup \endinsert \par For each of them we have two differents ''bricks", one has the initial point on the left (up) and another that have the right (down). In the following figure $\bullet$ rapresents the initial point and $\times$ the final point of the brick.\par \midinsert \line\bgroup\hss \beginpicture \setcoordinatesystem units <0.5true cm,0.5truecm> \setplotarea x from 0 to 28, y from 0 to 7 \plot 0 0 0 1 / \plot 0 1 4 1 / \put {$\times$} at 0 0 \put {$\bullet$} at 4 1 % fine primo brick \plot 7 1 7 0 / \plot 7 0 11 0 / \put {$\times$} at 7 1 \put {$\bullet$} at 11 0 % fine 2 brick \plot 14 1 18 1 / \plot 18 1 18 0 / \put {$\times$} at 14 1 \put {$\bullet$} at 18 0 % fine 3 brick \plot 21 0 25 0 / \plot 25 0 25 1 / \put {$\times$} at 21 0 \put {$\bullet$} at 25 1 % fine 4 brick \plot 28 0 28 1 / \put {$\times$} at 28 1 \put {$\bullet$} at 28 0 % fine 5 brick \plot 0 5 0 6 / \plot 0 6 4 6 / \put {$\bullet$} at 0 5 \put {$\times$} at 4 6 % fine primo brick \plot 7 6 7 5 / \plot 7 5 11 5 / \put {$\bullet$} at 7 6 \put {$\times$} at 11 5 % fine 2 brick \plot 14 6 18 6 / \plot 18 6 18 5 / \put {$\bullet$} at 14 6 \put {$\times$} at 18 5 % fine 3 brick \plot 21 5 25 5 / \plot 25 5 25 6 / \put {$\bullet$} at 21 5 \put {$\times$} at 25 6 % fine 4 brick \plot 28 5 28 6 / \put {$\bullet$} at 28 6 \put {$\times$} at 28 5 % fine 5 brick \endpicture \hss\egroup \endinsert \par We say that two bricks (oriented components) $S_1$ and $S_2$ are {\it contiguous} and we write $S_1 \iota S_2$, if the initial point of $S_2$ coincides with the final point of $S_1$ and these two coinciding points do not belong to two horizontal unit segments. \par It is easy to see that: given a closed Peierls contour $\g$, there exists a family of bricks such that $(S_1,\ldots, S_n)_\iota=\g$, where by $(S_1,\ldots, S_n)_\iota$ we express the fact that $S_1\cup\ldots\cup S_n=\g$ and $S_j\iota S_{j+1}\;\;\forall\;\; j=1, \ldots,n-1$.\par The sum over all bricks having a fixed extremum is bounded by $$\sum_{l=0}^\infty p^l \e = {\e\over 1-p}\sim {e^{-J_1 \b} \over \b e^{-c\b}}\longrightarrow 0 \;\;\hbox{ if }\;\;c=J\Eq(3.8)$$ The sum over all rods of lenght $l$ containing a given unit segment $b$ is bounded by $$\sum_{l_1,l_2}\e^2p^{2l_1}p^{2l_2} \sim{\e^2 \over q^2}\longrightarrow 0 \hbox{ where }q=1-p$$ It is easy to convince oneself, that $$\sum_{\g:\Th(\g)\ni 0 }p^{|\g_h|} \e^{|\g_v|}\leq \sum_{\g\ni b} |\g_v| p^{|\g_h|} \e^{|\g_v|}\leq \sum_{\g\ni b} (2 \e)^{|\g_v|} p^{|\g_h|}\Eq(3.9)$$ We set $\e'=2\e$; we want to prove that $$\sum_{\g\ni b} \z'(\g)\leq \d(\b)\Eq(3.10)$$ where $$\z'(\g)= (\e')^{|\g_v|} p^{|\g_h|}$$ and $\d(\b) \to 0$ as $\b \to \infty$.\par Let $\g$ denote a generic closed Peierls contour; we now prove the following estimate: $$\sum_{\g\ni b}\z'(\g)\leq {\e'\over q}\Eq(3.11)$$ where the sum in the l.h.s. of the \equ(3.11) extends to all closed polygons containing a horizontal unit segment $b$ .\par Given a closed polygon $\g$ we denote by $||\g||$ the minimal number of bricks (elementary oriented components) such that $\g=\cup_{i=1}^{||\g||}S_{i}$. If $\g\ni b $ there must exist a brick $S_1$ containing $b$; thus we have $$\sum_{\g\ni b}\z'(\g)=\sum_{S_1\ni b}\;\; \sum_{\g\ni S_1}\z'(\g)= \sum_{S_1\ni b}\;\;\z'(S_1) \sum_{n=1}^{\infty} \sum_{ \g:\;||\g||=n+1} \z'( \g\setminus S_1)\leq\Eq(3.11')$$ where $\z'(S_1)$ can be either $\e'$ (vertical unit segment) or $\e'p^{l}$ for some suitable $l$ (horizontal lenth of $S_1$) $$\leq \sum_{S_1\ni b}\;\;\z'(S_1) \sum_{n=1}^{\infty} \sum _{S_2,\ldots, S_{n+1}} \z'(S_2)\ldots \z'(S_{n+1})\Eq(3.12)$$ Consider $S_1, \ldots, S_{n}$ such that $S_j\iota S_{j+1}\quad\forall\;j=1,\ldots,n$ and suppose that there exists a closed polygon $\g$ with $||\g||=n+1$ and a brick $S_{n+1}$ such that $$(S_1, \ldots, S_{n+1})_\iota =\g\Eq(3.13)$$ then the pair $(S_{n+1}, \g)$ is unique.\par We have: $$\sum_{S_1\ni b}\z'(S_1)=\sum_{l_1,l_2=0}^\infty\e' p^{l_1} p^{l_2} \sim {\e'\over q^2}\Eq(3.14)$$ where $q=1-p$. Given $k\in \L^*$ $$\sum_{S\iota k}\z'(S)\leq\sum_{l=0}^\infty\e' p^{l} \sim {\e'\over q}\Eq(3.15)$$ where by $S\iota k$ we mean that $k$ is the initial point of S. Now \equ(3.11') \equ(3.12) becomes $$\sum_{\g\ni b}\z'(\g)\leq \sum_{S_1\ni b}\;\;\z'(S_1) \sum_{n=1}^{\infty} \;\;\e'\;\; \sum _{S_2,\ldots, S_{n}} \z'(S_2)\ldots \z'(S_{n})\Eq(3.16)$$ $$\leq \;\;\e'\;\; \sum_{S_1\ni b}\;\;\z'(S_1) \sum_{n=1}^{\infty} \left[ \sum _{S\iota k} \z'(S) \right]^{n-1} = \e'\;\; \sum_{S_1\ni b}{1\over 1 - {\e'\over q}} \Eq(3.17)$$ for $\b$ large is $$\leq 2 \left({\e'\over q}\right)^2<<{1\over 2}\qquad \hbox{ if }\;\;\qquad c=J\Eq(3.18)$$ >From \equ(3.4), \equ(3.7) and \equ(3.9) we conclude the proof of Proposition 3.2 of then the one of Theorem 3.1. \QED \vskip 2 truecm \centerline{\bf Section 4. General anisotropic polymer models} \bigno \centerline{\bf Section 4.1. New proof of Koteck\'y Preiss criterion} \bigskip \numfor=1 \numsec=4 Let $\cP$ be a finite set, its elements $P_{1},\ldots, P_{|\cP|}$ are called polymers. We suppose given a binary compatibility relation. This means that in the cartesian product $\cP\times\cP$ we give a subset $\cV$ called the set of compatible pairs. Two polymers which are not compatible are said to be incompatible. We write $P_1\; c \; P_2$, $P_1\;\iota \; P_2$ when $(P_1, P_2)$ is a compatible, respectively, incompatible pair. We suppose given a function $w:\;\;\cP \longrightarrow \bC$ called activity.\par The polymer partition function is: $$ Z_{\cP} =Z_{\cP}(w)= \sum_{(P_{1},\ldots, P_{n})_{c} : P_i \subset \cP }\;\;\; \prod_{i=1}^{n} w_{P_i} \Eq (4.1)$$ where the sum is over all families $(P_{1},\ldots, P_{n})_{c}$ of pairwise compatible polymers in $\cP$. In \equ(4.1) we use the convention that the contribution of $n=0$ term (corresponding to the empty set) is 1. Notice that, in many applications, there is a spatial structure such that it is possible to associate a ''support" $\widetilde P$, namely a finite subset of $\Z^d$, to a polymer $P$; for istance this is the case when considering both high and low temperature expansions for short range traslationally invariant lattice spin systems. In those cases compatibility of $P_1$ $P_2$ is just some goemetrical property of their supports like absence of overlapping; moreover we have that polymers $P$ with $\widetilde P$ ''well inside the bulk" of a volume $\L$, have a transationally invariant activity $w_{P}$. We look at $Z_{\cP}$ as a function of many complex variables $w_1,\ldots, w_{|\cP|}$. In what follows we will often consider collections $\r$ of polymers where multiple copies are allowed. In other words a collection $\r$ of polymers is identified by a function $n_\r$ on $\cP$ taking values on $\Z^+$: $n_{\r}= \{ n(P), \;\; P \in \cP \}$ the non negative integer $n(P)$ represents the multiplicity of the polymer $P$ in $\r$. We write $\r=(\bar\r, n_{\r})$ where $\bar\r$ is the '' support" of the collection $\r:$ $$\bar\r = \{ P\in \cP: n_{\r}(P)\geq 1\}\Eq (4.1')$$ The set of collections of polymers in $\cP$ is denoted by $R(\cP)$.\par Following [D] we can write the Taylor series: $$\log Z_{\cP}= \sum_{\r\in R(\cP)} r_{\cP}(\r) \prod _{P\in \r} w_{P}^{n_{\r}(P)} \Eq(4.3)$$ where $$r_{\cP}(\r) = (n_{\r}(P_1)! \ldots n_{\r}(P_n)!)^{- 1} {\partial^{n_{\r}(P_1)+ \ldots +n_{\r}(P_n)}\log Z_{\cP} \over \partial^{n_{\r}(P_1)} w(P_1) \ldots \partial^{n_{\r}(P_n)} w(P_n) }. \Eq(4.4)$$ given $\bar \r=P_1,\ldots P_n\subset\cP$ and an activity function $w$, let $w^{(\bar\r)} $ be the new activity function given $$w^{(\bar\r)}(P)= \cases{ {w(P)} & $P\in \bar \r$\cr 0 & otherwise\cr}\Eq(4.5)$$ We trivially have $$ Z_{\cP}(w^{(\bar\r)})=Z_{\bar \r}(w^{(\bar\r)})\Eq(4.6)$$ and from \equ(4.4): $$r_{\cP} (\r)= r_{\bar \r}(\r)=:r(\r)\Eq(4.7)$$ We will call {\it cluster} and denote by $\cC$ an indecomposable collection of polymers. Decomposability means that there exists a partition of $\cC$ into two sets: $\cC=\cC_1 \cup \cC_2 $, such that $(P_1, P_2)$ is a compatible pair $\forall P_1\in \cC_1$ and $P_2\in \cC_2$. The subset of $R(\cP)$ consisting in all clusters in $\cP$ will be denoted by $G(\cP)$. Also for a cluster, polymers can appear with a multiplicity. \par We have $$\log Z_{\cP}=\sum_{\cC\subset G(\cP)} \F_{\cC}\Eq(4.8)$$ with $$ \F_{\cC} = r(\cC) \prod_{P \in \cC} (w_P)^{n_{\cC}(P)} \Eq(4.9)$$ The important feature of \equ(4.8) is that the sum on the r.h.s. extends to all clusters of polymers in $\cP$. Indeed, suppose that in \equ(4.3) it appears a decomposable collection $\r$: $\bar\r=\bar\r_1 \cup \bar\r_2 $ with $\bar\r_1 \not= \emptyset,$ $\bar\r_2 \not= \emptyset,$ $\bar\r_1\cap \bar\r_2 = \emptyset,$ and every pair $(P_1, P_2)$ with $P_1\in \bar\r_1$ $P_2\in \bar\r_2$ is compatible, we have $$ \log Z_{\bar\r}(w)=\log Z_{\bar\r_1}(w)+\log Z_{\bar\r_2}(w)\Eq(4.10)$$ and then we get $r(\r)=0$.\par Our main aim, in this section, is to give a simple proof of the result in Theorem 4.1 below which is a slightly weaker version of the general result stated in [KP]. However, the proof given below will be really elementary and straightforward. To make it as short as possible we will not try to optimize the choice of the constant $C = C(\delta)$ used below in (4.12). This constant can be pushed apparently down to the value $C =1$ [KP] (or even lower for some special cases) with some more careful estimates. Our emphasis here is on the simplicity of all estimates.\par We set $$ C = C(\delta) = \max_{x \in (0,\delta)} \left\{ {- \log (1 -x) \over x } \right \}=\max_{x \in (0,\delta)} \{ 1+ x/2 + x^2/3 + \ldots \} . \Eq(4.11) $$ $ C(\d)=1+O(\d) \;\; \hbox{for small } \d$.\bigskip {\bf Theorem 4.1.} {\it Assume that there are functions $a$ and $d$ on $\cP$ ($a>0$, $d\geq 0$) and $\d >0$ such that $$w_P e^{a(P)} \leq \delta \Eq(4.11')$$ holds for any polymer $P\in \cP$. Moreover, assume that for any $P\in \cP$ we have the bound $$\sum_{P'\iota P } |w_{P'}|e^{a (P')+d(P')}\leq {a(P) \over C }\Eq(4.12)$$ %with another, nonnegative $ d \geq 0$. Then we have for any $P\in\cP $ $$ \sum_{\cC: \;\; \cC \iota P } |\F_{\cC}| \ e^{\ \sum_{P \in \cC} \ n_P \ d(P)} \; \; \leq a(P). \Eq(4.13)$$} {\it Note} \par\noindent The statement \equ(4.13) gives an information on the decay of the terms $\F_{\cC}$ in the expansion \equ(4.8). \smallno {\it Proof} \par\noindent We will consider here only the case $d=0$. (The argument for a general $d$ is quite analogous; just work with the weights $\tilde w_{P} = w_{P} e^{d(P)}$ and write only the factors $e^{d(P)}$ , not $e^{n_P d(P)}$, in the estimates (4.27)-(4.31) below when inserted into (4.32).) The proof uses induction over the cardinality $|\cP|$ of the system $\cP$ of all available polymers. We then suppose $$\sum_{P'\iota P } |w_{P'}|e^{a (P')}\leq {a(P) \over C }\Eq(4.14)$$ Moreover we suppose that we already have the bound $$ \sum_{\cC \iota P} |\F_{\cC}| \leq a(P) \Eq(4.15)$$ when the cardinality of the set $\cP$ is $|\cP|=n$.\par Then we want to prove \equ(4.15) for $|\cP|=n+1$. \par In other words, from \smallno $i$) the validity of \equ(4.15) for $|\cP|=1$ and from \smallno $ii$)the implication: [\equ(4.14) and \equ(4.15) for $\cP=n$] implies [\equ(4.15) for $\cP=n+1$] \par the theorem follows by induction.\par Let us first prove \equ(4.15) for the particular case $|\cP|=1$. When $|\cP|=1$ we have $Z_{\cP}=1+z$, $z=w_P$ $$\log Z_{\cP}=\log (1+z)=\sum _{m=1}^\infty {(-1)^{m+1} \over m} z^m \Eq(4.15').$$ We would like to have the validity of \equ(4.14). It reads in this case $$ze^a<{a\over C}:\quad \iff\quad z< {a\over C}e^{-a}\Eq(4.16).$$ Condition \equ(4.15) reads $$\sum _{m=1}^\infty { z^m \over m} =-\log (1-z) 0$ (notice that we can write it also as $\sum_{S: S \owns 0}\ w_S \ e^{a|S|} \leq a$ which is essentially the condition (4.13)!) is unnecessarily strong for the existence of a nontrivial function $f$ defined below: Denote by $Z_{[0,n]}$ the partition function in the volume $[0,n]$ and consider the generating functions of the complex variable $z$ $$ g(z) = \sum_{n=1}^{\infty} w_n z^n \ \; \ \hbox{and} \ \ \ f(z) = \sum_{n=1}^{\infty} Z_{[0,n]}\ z^n . \Eq(4.31) $$ Write $Z_{[0,n]}$ as $ Z_n$ and put $Z_1 = Z_2 =1$. The recursive relation $$ Z_n =Z_{n-1} + \sum_{k=1}^{n-2} w_k \ Z_{n-k-1} \Eq(4.32)$$ implies the corresponding equation between generating functions $f$ and $g$ namely $$ f(z) = \frac{z}{1- z(1+ g(z))} \Eq(4.33)$$ that is $f(z)$ can be extended to a meromorphic function defined at least on the convergence ball of $g(z)$. More precisely, from \equ(4.32) we have $\sum_{n=1}^{\infty} Z_n z^n = z + z (\sum_{k=1}^{\infty}\sum_{m=1}^{\infty} w_k z^k Z_m z^m$ and this implies \equ(4.33). For example, for the case of $w_n = \varepsilon q^n$, $0 < q <1$ (these weights appeared often in the previous parts of the paper) we have $$ g(z) = \sum_{n=1}^{\infty} \varepsilon (qz)^n = \frac{\varepsilon q z }{1 - qz} \Eq(4.34)$$ so that $f(z)$ can be extended to a meromorphic function defined in the whole complex plane, with single poles in located in the roots of the quadratic equation $q(1 -\varepsilon ) z^2 -(q+1) z + 1 = 0$ i.e. in the points $z_{1,2} =\frac{ (q+1) \pm \sqrt{(q-1)^2 -\varepsilon^2 q^2}} {2(1-\varepsilon) q}$. Writing the Laurent expansion of $f(z)$ one then obtains rather precise expansions of the partition functions $Z_n$ i.e. of the coefficients of the power series for $f(z)$. For example if $f(z)$ is meromorphic in the whole complex plane and $\lambda < 1 < \mu$ are the poles of $f(z)$ i.e. the roots of the equation % \footnote{ Take the case of {\bf{positive weights}} %$w_n$, for example. The quantity $\lambda^{-1}$ %is then the biggest %%eigenvalue of the corresponding transfer matrix. %(By Frobenius theorem, the smallest root $\lambda$ is %always positive for positive weights $w_n$.)} $$ 1 - z(1 + g(z)) = 0 \Eq(4.35) $$ which are the nearest ones to the value $1$ (like the values $z_{1} < 1 < z{_2}$ in the example (4.36) above) then we have an expansion, for each natural number $n $ $$ Z_n = a \lambda^{-n} +b \mu^{-n} +\;\; \hbox{smaller terms}. \Eq(4.36) $$ One can be now interested in someupper bounds for the value of the fraction $ |\mu/ \lambda|$ i.e. (having in mind that $\lambda \approx 1$ for small $w_n$) in upper bounds for the distance $\mu -\lambda$. The condition \equ(4.30) gives some information on this, namely we can rewrite \equ(4.30) as the condition on the derivative $$ |g'(z)| \leq a \ \ \ \forall |z| \leq e^a . \Eq(4.37)$$ Such a bound for $g'(z)$ allows to make some estimates on the localization of the poles of $f(z)$. Of course, for special examples like \equ(4.34) one can compute exactly all these poles and this gives a much more accurate information than \equ(4.37). \centerline{\bf 4.3. More dimensional ``segmental'' polymer models} \bigskip The aim of this section is twofold. First, we want to give some more general, unifying commentary to what we already did in sections 2.1 and 2.2 (see the definition (2.62)). Second, this is an attempt to prepare a possible ground for a future paper dealing with phase transitions of general anisotropic models. Having in mind a systematic use of the Pirogov Sinai theory in these problems, it will be useful to have a fairly general approach to a notion of a ``segmented polymer''. We expect that the framework outlined below could be adequate, with some further modifications and generalizations (taking in account also possible ``volume energy terms'', appearing in the ``interior'' of our segmented polymers) in all these investigations. Let us define a {\it segment} $S_{q}({\bf x},l_{i})$ where $q$ is the colour of the segment; $q\in [1,\ldots ,N] $ ${\bf x}$ is the initial point ${\bf x}=(x_{1},x_{2},\ldots,x_{d})\in \Z^{d}$ such that $$S_{q}({\bf x},l)=\{ {\bf y}=(y_{1},\ldots,y_{d})\in\Z^{d}\quad j\not =1\quad y_{j}=x_{j}\quad {\rm and} \quad x_{1}\leq y_{1}\leq x_{1}+l-1 \};\Eq(4.40)$$ The support of $S_{q}({\bf x},l)$ is the rectangle $\widetilde S_{q}({\bf x},l)=l\times 1\times \ldots\times 1$.\par Two segments are {\it connected} or {\it incompatible} if their supports intersect; we use the symbol $\iota$ to denote incompatibility. We denote by $\z(S_{q}({\bf x},l)) $ the weight of one segment. For example, it can be given by the formula $$\z(S_{q}({\bf x},l)):=\e p^{l}\Eq(4.41)$$ The segmental polymer is defined as a {\it connected} collection $P=\{ S_{q}^{k}({\bf x},l) \}$ of segments: where $k$ is an index that denotes how many times the segment $S_{q}({\bf x},l) $ is (repeated) in the polymer. \par Connectedness of $P$ will be defined in a usual sense of the connectedness of the support of $P$. We call $L_{q}(P)$ the set of all coordinates of the segments that are in $P$ $$ L_{q}(P)=\left\{ ({\bf x}^{1}, l^{1}) \ldots ({\bf x}^{n}, l^{n}): \quad S_{q}({\bf x}^{j}, l^{j}) \hbox{is a segment in } P \right\} \Eq(4.40').$$ the support $\widetilde P$ of a polymer $P$ is given as: $$\widetilde P := \bigcup _{({\bf x},l)\in L_{q}(P) } \widetilde S_{q}({\bf x},l)$$ The weight of a polymer is $$\z(P)=\prod_{q=1}^{N}\;\; \prod_{ ({\bf x},l)\in L_{q}(P) } \z(S_{q}^{k}({\bf x},l)) = \prod_{q=1}^{N}\;\; \prod_{ ({\bf x},l)\in L_{q}(P) }\; \prod_{h=1}^{k}\;\; \z(S_{q}^{h}({\bf x},l)) \Eq(4.42)$$ \bigno {\bf Proposition 4.2} \par\noindent {\it Suppose that there exists a positive function $a$ on the set of colours such that $$\sum_{ ({\bf x},l): \;\; S_{q}({\bf x},l)\ni {\bf y} } \z(S_{q}^{h}({\bf x},l)) \exp(a_{q} |S_{q}^{k}({\bf x},l)| )