/* This is the one that started/inspired this program. From https://www.doc.ic.ac.uk/~mpd37/teaching/2014/ml_tutorials/2014-10-15-wood-anglican.pdf Page 34ff """ Symbolic Function Induction What’s the next value? And the function? Input Output --------------- 1 5 2 3 3 1 4 ? """ Solutions: code = ((7 - A) - A) = [[[1],5],[[2],3],[[3],1]] = [[4] = -1] code = (7 - (A + A)) = [[[1],5],[[2],3],[[3],1]] = [[4] = -1] code = (7 - (A * 2)) = [[[1],5],[[2],3],[[3],1]] = [[4] = -1] I.e. 7 - 2*x */ data(simple,Data,Vars,Unknown,Ops,Constants,MaxC) :- % Data = [[[1],5], % [[2],3], % [[3],1] % ], % Vars = ["X"], % Unknown = [4], % Shorter: make_point_seq([5,3,1],Data,Unknown,Vars), Ops = new_map([infix=["+","-","*","/"]]), Constants = 0..10, MaxC = 3.