%------------------------------------------------------------------------------ tff(person_type,type, person: $tType ). tff(bob_decl,type, bob: person ). tff(child_of_decl,type, child_of: person > person ). tff(is_descendant_decl,type, is_descendant: ( person * person ) > $o ). tff(int2person_decl,type, int2person: $int > person ). tff(people,interpretation, %----Domain for type person is the integers ( ( ! [P: person] : ? [I: $int] : int2person(I) = P %----The type promoter is a bijection (injective and surjective) & ! [I1: $int,I2: $int] : ( int2person(I1) = int2person(I2) => I1 = I2 ) ) %----Mapping people to integers. Note that Bob's ancestors will be interpreted %----as negative integers. & ( bob = int2person(0) & ! [I: $int] : child_of(int2person(I)) = int2person($sum(I,1)) ) %----Interpretation of descendancy & ! [A: $int,D: $int] : ( is_descendant(int2person(A),int2person(D)) <=> $less(A,D) ) ) ). %------------------------------------------------------------------------------