*** Running FFF...
*** Run of Mon Aug 27 08:11:04 CEST 2018
*** 
*** Welcome to FFF, a facility (under development) for fuzzy lattice operations on first-order terms
*** 
*** Type '#help;<CR>' for help or 'quit;<CR>' to quit (if no prompt upon an error, type ';<CR>')
*** 

FFF> #help;
*** Currently known pragmas are:
	#help;
	#fun f1/n1 ... fk/nk;
	#sig;
	#sim f1 g1 α1 ... fk gk αk;
	#close;
	#funclass f α;
	#termclass term α;
	#funrep f α;
	#termrep term α;
	#show;
	#map f g α i1:j1 ... ik:jk;
	#comp;
	#load "file";
	#trace n;
	#reset;
*** To unify two terms, enter: 'term1 /\ term2;<CR>'
*** To generalize two terms, enter: 'term1 \/ term2;<CR>'
*** To check how similar two terms are, enter: 'term1 ~ term2;<CR>'
*** With a similarity defined on the signature, these operations are fuzzy; otherwise, they are crisp.

FFF> f(a,b) ~ g(b,a);
!!! No similarity defined: similarity degree can only be 1.0 (equal) or 0.0 (unequal)
*** These terms are not equal (similarity degree = 0.0)

FFF> #fun f/2 g/2 a/0 b/0;
*** The current signature has 4 functors: {f/2, a/0, b/0, g/2}

FFF> #sim f g .4 a b .7;
*** Declared similarities: 
	f g 0.4
	a b 0.7

FFF> #close;
*** Computed similarity closure (enter '#show;<CR>' to see it)

FFF> f(a,b) ~ g(b,a);
*** These terms' similarity degree is 0.4

FFF> #fun h/1;
!!! Re computed similarity (enter '#show;<CR>' to see it)
*** The current signature has 5 functors: {f/2, a/0, b/0, g/2, h/1}

FFF> #sim h f .2;
!!! New similarity declaration; old similarity cleared (re-compute with '#close;<CR>')
*** Declared similarities: 
	f g 0.4
	a b 0.7
	h f 0.2

FFF> #close;
*** Computed similarity closure (enter '#show;<CR>' to see it)

FFF> #show;
*** The current signature has 5 functors: {f/2, a/0, b/0, g/2, h/1}

*** The declared similar functor pairs are: 
	f g 0.4
	a b 0.7
	h f 0.2

*** The similarity closure of the declared similar functor pairs is:

     f/2  a/0  b/0  g/2  h/1  
     ---  ---  ---  ---  ---  
f |  1.0  0.0  0.0  0.4  0.2 

a |  0.0  1.0  0.7  0.0  0.0 

b |  0.0  0.7  1.0  0.0  0.0 

g |  0.4  0.0  0.0  1.0  0.2 

h |  0.2  0.0  0.0  0.2  1.0 

*** It has 5 similarity degrees: [0.0,0.2,0.4,0.7,1.0]

*** The 5 corresponding fuzzy partitions are:

*** >= 0.0: { {f, a, b, g, h} }

*** >= 0.2: { {f, g, h}, {a, b} }

*** >= 0.4: { {f, g}, {a, b}, {h} }

*** >= 0.7: { {f}, {a, b}, {g}, {h} }

*** >= 1.0: { {f}, {a}, {b}, {g}, {h} }

FFF> h(f(a,b)) ~ g(f(b,a),a);
*** These terms' similarity degree is 0.2

FFF> 