@prefix : <#> .
@prefix log: <http://www.w3.org/2000/10/swap/log#> .
@prefix math: <http://www.w3.org/2000/10/swap/math#> .

this log:forAll :cad , :cac , :cas , :cl , :at , :name , :company , :year . 

{ 	:company <http://xmlns.com/foaf/corp#cad> :cad;
	<http://xmlns.com/foaf/corp#source> :name;
	<http://xmlns.com/foaf/corp#year> :year;
	<http://xmlns.com/foaf/corp#cac> :cac; 
	<http://xmlns.com/foaf/corp#cas> :cas; 
	<http://xmlns.com/foaf/corp#cl> :cl . 
        :cad log:notEqualTo "" .
        :cac log:notEqualTo "" .
        :cl log:notEqualTo "" .
	([ is math:sum of (:cad :cac :cas)] :cl) math:quotient :at .
} 
	log:implies 
{ 

 	:company <http://xmlns.com/foaf/corp#at> :at;
	<http://xmlns.com/foaf/corp#source> :name ;
	<http://xmlns.com/foaf/corp#year> :year  .
} .

