

#include "BUILTIN.h"
extern OBJ _ARel_7(OBJ,OBJ);extern OBJ __ARel_7;
extern OBJ _ARel_8(OBJ,OBJ,OBJ,OBJ,OBJ,OBJ);extern OBJ __ARel_8;

#include "Nat.h"
extern OBJ _AMapReduce_6(OBJ,OBJ,OBJ,OBJ);extern OBJ __AMapReduce_6;
extern OBJ _ACAST_3(OBJ);extern OBJ __ACAST_3;
extern OBJ _ARelInvert_6(OBJ,OBJ,OBJ);OBJ __ARelInvert_6; /* ~ */
extern OBJ _ARelInvert_7(OBJ,OBJ,OBJ,OBJ,OBJ,OBJ);OBJ __ARelInvert_7; /* ~'7 */
extern OBJ _ARelInvert_8(OBJ,OBJ,OBJ,OBJ,OBJ);OBJ __ARelInvert_8; /* ~'8 */

extern OBJ _ARelInvert_6(OBJ x1,OBJ x2,OBJ x3) /* ~ */
{OBJ r;
 CPCLS(__ARelInvert_8,1);
 CPCLS(x1,2);
 CPCLS(x2,1);
 {OBJ x4;OBJ x5;OBJ x6;
  x4=_ACAST_3(x3);
  x5=_ARel_7(x2,x1);
  x6=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(__ARelInvert_8,2))(__ARelInvert_8,x1,x2);
  r=_AMapReduce_6(x1,x6,x5,x4);}
 return r;}

extern OBJ _ARelInvert_7(OBJ x1,OBJ x2,OBJ x3,OBJ x4,OBJ x5,OBJ x6) /* ~'7 */
{OBJ r;
 r=_ARel_8(x2,x1,x4,x3,x5,x6);
 return r;}

extern OBJ _ARelInvert_8(OBJ x1,OBJ x2,OBJ x3,OBJ x4,OBJ x5) /* ~'8 */
{OBJ r;
 CPCLS(__ARelInvert_7,1);
 CPCLS(x2,1);
 {OBJ x6;
  x6=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ))METHOD(__ARelInvert_7,3))(__ARelInvert_7,x1,x2,x3);
  r=_AMapReduce_6(x2,x6,x5,x4);}
 return r;}

static OBJ _mt_6_0_3(OBJ t,OBJ t1,OBJ t2,OBJ t3) 
{OBJ r;
 DPCLS(t,r);
 INCCLS(r,0,3);
 FLDCLS(r,1)=t1;
 FLDCLS(r,2)=t2;
 FLDCLS(r,3)=t3;
 return r;}

static OBJ _mt_6_3_3(OBJ t,OBJ t1,OBJ t2,OBJ t3) 
{OBJ r;
 if(EXCLS(t)){
  DSCLSF(t);
 }else{
  COPY(FLDCLS(t,1),1);
  COPY(FLDCLS(t,2),1);
  COPY(FLDCLS(t,3),1);
  DCCLS(t,1);}
 r=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ,OBJ,OBJ))ENTRY(t))(FLDCLS(t,1),FLDCLS(t,2),FLDCLS(t,3),t1,t2,t3);
 return r;}

init_ARelInvert()
{
 static int visited=0; if(visited) return; visited=1;
 init_ARel();
 init_ASet();
 init_APair();
 init_ATriple();
 init_AOption();
 init_ASeq();
 init_ANat();
 init_ARelNotForUserPurpose();
 init_AMapReduce();
 init_AMap();
 init_AMapFilter();
 init_ASetByBST();
 init_ABSTree();
 init_ATree();
 init_ACAST();
 CLS(5,_ARelInvert_8,__ARelInvert_8);
 CLS(6,_ARelInvert_7,__ARelInvert_7);
 CLS(3,_ARelInvert_6,__ARelInvert_6);
 MTH(6,0,3,_mt_6_0_3);LZYMTH(6,0,3,_mt_6_0_3);
 MTH(6,3,3,_mt_6_3_3);LZYMTH(6,3,3,_mt_6_3_3);}

