#  Copyright (c) 1997-2015
#  Ewgenij Gawrilow, Michael Joswig (Technische Universitaet Berlin, Germany)
#  http://www.polymake.org
#
#  This program is free software; you can redistribute it and/or modify it
#  under the terms of the GNU General Public License as published by the
#  Free Software Foundation; either version 2, or (at your option) any
#  later version: http://www.gnu.org/licenses/gpl.txt.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#-------------------------------------------------------------------------------

INCLUDE
   permlib_helpers.rules


object Cone {


label permlib

CREDIT permlib


#RAYS_IN_ORBITS

rule GROUP.RAYS_IN_ORBITS : GROUP.GENERATORS{
    $this->GROUP->RAYS_IN_ORBITS=group::orbits_of_domain($this->GROUP);
} 
precondition : GROUP.DOMAIN {
   $this->GROUP->DOMAIN==$domain_OnRays; #on_rays
}

rule GROUP.RAYS_IN_ORBITS : GROUP.GENERATORS, FACETS_THRU_RAYS{
    my $FTR=$this->FACETS_THRU_RAYS;	      
    $this->GROUP->RAYS_IN_ORBITS=group::orbits_induced_action($this->GROUP,$FTR);
} 
precondition : GROUP.DOMAIN {
   $this->GROUP->DOMAIN==$domain_OnFacets; #on_facets -> induced action on rays 
}


rule GROUP.RAYS_IN_ORBITS, GROUP.SYMMETRIC_RAYS : GROUP.GENERATORS, RAYS, LINEALITY_SPACE {	      
    my $sym_rays=symmetrize_poly_reps($this->RAYS,$this->LINEALITY_SPACE,$this->GROUP);
    $this->GROUP->SYMMETRIC_RAYS=$sym_rays->first;
    $this->GROUP->RAYS_IN_ORBITS=$sym_rays->second;
} 
precondition : GROUP.DOMAIN {
   $this->GROUP->DOMAIN==$domain_OnCoords; #on_coords 
}


rule GROUP.N_ORBITS_OF_RAYS : GROUP.RAYS_IN_ORBITS{
    $this->GROUP->N_ORBITS_OF_RAYS=$this->GROUP->RAYS_IN_ORBITS->size;
}


#FACETS_IN_ORBITS

rule GROUP.FACETS_IN_ORBITS : GROUP.GENERATORS{
    $this->GROUP->FACETS_IN_ORBITS=group::orbits_of_domain($this->GROUP);
} 
precondition : GROUP.DOMAIN {
   $this->GROUP->DOMAIN==$domain_OnFacets; #on_facets
}

rule GROUP.FACETS_IN_ORBITS : GROUP.GENERATORS, RAYS_IN_FACETS{
    $this->GROUP->FACETS_IN_ORBITS=group::orbits_induced_action($this->GROUP,$this->RAYS_IN_FACETS);
} 
precondition : GROUP.DOMAIN {
   $this->GROUP->DOMAIN==$polytope::domain_OnRays; #on_rays
}

rule GROUP.FACETS_IN_ORBITS, GROUP.SYMMETRIC_FACETS : GROUP.GENERATORS, FACETS, LINEAR_SPAN {	      
    my $sym_facets=symmetrize_poly_reps($this->FACETS,$this->LINEAR_SPAN,$this->GROUP);
    $this->GROUP->SYMMETRIC_FACETS=$sym_facets->first;
    $this->GROUP->FACETS_IN_ORBITS=$sym_facets->second;
} 
precondition : GROUP.DOMAIN {
   $this->GROUP->DOMAIN==$domain_OnCoords; #on_coords 
}


rule GROUP.N_ORBITS_OF_FACETS : GROUP.FACETS_IN_ORBITS{
    $this->GROUP->N_ORBITS_OF_FACETS=$this->GROUP->FACETS_IN_ORBITS->size;
}


#COORDINATES_IN_ORBITS

rule GROUP.COORDINATES_IN_ORBITS : GROUP.GENERATORS{
    $this->GROUP->COORDINATES_IN_ORBITS=group::orbits_of_domain($this->GROUP);
} 
precondition : GROUP.DOMAIN {
   $this->GROUP->DOMAIN==$domain_OnCoords; #on_coords
}


rule GROUP.N_ORBITS_OF_COORDINATES : GROUP.COORDINATES_IN_ORBITS{
    $this->GROUP->N_ORBITS_OF_COORDINATES=$this->GROUP->COORDINATES_IN_ORBITS->size;
}

}



# Local Variables:
# mode: perl
# cperl-indent-level: 3
# indent-tabs-mode:nil
# End:

