
(hak) 48> fff
***
*** Fuzzy Facility for First-order terms
*** Run of Sat Aug 25 18:19:03 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> #load "ex6.fff";

FFF> #fun a/0 b/0 c/0 d/0 f/2 g/2 h/3 p/3;
*** The current signature has 8 functors: {a/0, b/0, c/0, d/0, f/2, g/2, h/3, p/3}

FFF> #sim a b 0.7 c d 0.6 f g 0.9 f p 0.5;
*** Declared similarities: 
	a b 0.7
	c d 0.6
	f g 0.9
	f p 0.5

FFF> #close;
*** Computed similarity closure (enter '#show;<CR>' to see it)

FFF> #show;
*** The current signature has 8 functors: {a/0, b/0, c/0, d/0, f/2, g/2, h/3, p/3}

*** The declared similar functor pairs are: 
	a b 0.7
	c d 0.6
	f g 0.9
	f p 0.5

*** The similarity closure of the declared similar functor pairs is:

     a/0  b/0  c/0  d/0  f/2  g/2  h/3  p/3  
     ---  ---  ---  ---  ---  ---  ---  ---  
a |  1.0  0.7  0.0  0.0  0.0  0.0  0.0  0.0 

b |  0.7  1.0  0.0  0.0  0.0  0.0  0.0  0.0 

c |  0.0  0.0  1.0  0.6  0.0  0.0  0.0  0.0 

d |  0.0  0.0  0.6  1.0  0.0  0.0  0.0  0.0 

f |  0.0  0.0  0.0  0.0  1.0  0.9  0.0  0.5 

g |  0.0  0.0  0.0  0.0  0.9  1.0  0.0  0.5 

h |  0.0  0.0  0.0  0.0  0.0  0.0  1.0  0.0 

p |  0.0  0.0  0.0  0.0  0.5  0.5  0.0  1.0 

*** It has 6 similarity degrees: [0.0,0.5,0.6,0.7,0.9,1.0]

*** The 6 corresponding fuzzy partitions are:

*** >= 0.0: { {a, b, c, d, f, g, h, p} }

*** >= 0.5: { {a, b}, {c, d}, {f, g, p}, {h} }

*** >= 0.6: { {a, b}, {c, d}, {f, g}, {h}, {p} }

*** >= 0.7: { {a, b}, {c}, {d}, {f, g}, {h}, {p} }

*** >= 0.9: { {a}, {b}, {c}, {d}, {f, g}, {h}, {p} }

*** >= 1.0: { {a}, {b}, {c}, {d}, {f}, {g}, {h}, {p} }

FFF> h(f(a,X1),g(X1,b),f(Y1,Y1)) /\ h(X2,X2,g(c,d));
*** The fuzzy glb is h(f(a,b),g(b,b),f(d,d))
*** Its approximation degree is 0.6
*** Its 0.6-similar term representative is h(f(a,a),f(a,a),f(c,c))
*** Unifying substitution:
*** 	X1 = a
*** 	Y1 = c
*** 	X2 = f(a,a)

FFF> #termrep h(f(a,b),g(b,b),f(d,d)) 0.6;
*** The 0.6-similar term representative of h(f(a,b),g(b,b),f(d,d)) is h(f(a,a),f(a,a),f(c,c))

FFF> #termclass h(f(a,b),g(b,b),f(d,d)) 0.6;
*** 0.6-similarity class of term h(f(a,b),g(b,b),f(d,d)) (512 terms): [h(f(a,a),f(a,a),f(c,c)), h(f(a,a),f(a,a),f(c,d)), h(f(a,a),f(a,a),f(d,c)), h(f(a,a),f(a,a),f(d, ...


FFF> h(f(a,X1),g(X1,b),f(Y1,Y1)) \/ h(X2,X2,g(c,d));
*** The fuzzy lub is h(_0,_1,f(_2,_3))
*** Its approximation degree is 0.9
*** Its 0.9-similar term representative is h(_0,_1,f(_2,_3))
*** Left substitution:
*** 	_0 = f(a,X1)
*** 	_1 = f(X1,a)
*** 	_2 = Y1
*** 	_3 = Y1
*** Right substitution:
*** 	_0 = X2
*** 	_1 = X2
*** 	_2 = c
*** 	_3 = c

FFF> h(X2,X2,g(c,d)) /\ h(f(a,X1),g(X1,b),f(Y1,Y1));
*** The fuzzy glb is h(g(b,b),g(b,b),g(c,d))
*** Its approximation degree is 0.6
*** Its 0.6-similar term representative is h(f(b,a),f(b,a),f(c,c))
*** Unifying substitution:
*** 	X2 = f(a,a)
*** 	X1 = a
*** 	Y1 = c

FFF> h(X2,X2,g(c,d)) \/ h(f(a,X1),g(X1,b),f(Y1,Y1));
*** The fuzzy lub is h(_0,_1,g(_2,_3))
*** Its approximation degree is 0.9
*** Its 0.9-similar term representative is h(_0,_1,f(_2,_3))
*** Left substitution:
*** 	_0 = X2
*** 	_1 = X2
*** 	_2 = c
*** 	_3 = c
*** Right substitution:
*** 	_0 = f(a,X1)
*** 	_1 = f(X1,a)
*** 	_2 = Y1
*** 	_3 = Y1

FFF> h(f(a,X1),g(X1,b),f(Y1,Y1)) /\ h(X2,X2,p(c,d,Y2));
*** The fuzzy glb is h(f(a,b),g(b,b),f(d,d))
*** Its approximation degree is 0.5
*** Its 0.5-similar term representative is h(f(a,a),f(a,a),f(c,c))
*** Unifying substitution:
*** 	X1 = a
*** 	Y1 = c
*** 	X2 = f(a,a)

FFF> h(f(a,X1),g(X1,b),f(Y1,Y1)) \/ h(X2,X2,p(c,d,Y2));
*** The fuzzy lub is h(_0,_1,f(_2,_3))
*** Its approximation degree is 0.5
*** Its 0.5-similar term representative is h(_0,_1,f(_2,_3))
*** Left substitution:
*** 	_0 = f(a,X1)
*** 	_1 = f(X1,a)
*** 	_2 = Y1
*** 	_3 = Y1
*** Right substitution:
*** 	_0 = X2
*** 	_1 = X2
*** 	_2 = c
*** 	_3 = c

FFF> h(X2,X2,p(c,d,Y2)) /\ h(f(a,X1),g(X1,b),f(Y1,Y1));
*** The fuzzy glb is h(g(b,b),g(b,b),p(c,d,Y2))
*** Its approximation degree is 0.5
*** Its 0.5-similar term representative is h(f(b,a),f(b,a),f(c,c))
*** Unifying substitution:
*** 	X2 = f(a,a)
*** 	X1 = a
*** 	Y1 = c

FFF> h(X2,X2,p(c,d,Y2)) \/ h(f(a,X1),g(X1,b),f(Y1,Y1));
*** The fuzzy lub is h(_0,_1,f(_2,_3))
*** Its approximation degree is 0.5
*** Its 0.5-similar term representative is h(_0,_1,f(_2,_3))
*** Left substitution:
*** 	_0 = X2
*** 	_1 = X2
*** 	_2 = c
*** 	_3 = c
*** Right substitution:
*** 	_0 = f(a,X1)
*** 	_1 = f(X1,a)
*** 	_2 = Y1
*** 	_3 = Y1

FFF> quit;
*** So long - and thanks for playing with FFF...
*** We hope that you had some FFFuzzy FFFun! 8^D
(hak) 49> 