poole@CPSC-M-POOLE01 prolog % swipl Welcome to SWI-Prolog (threaded, 64 bits, version 9.0.4) SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software. Please run ?- license. for legal details. For online help and background, visit https://www.swi-prolog.org For built-in help, use ?- help(Topic). or ?- apropos(Word). ?- [first]. true. ?- append([1,2,3],[7,8,9],X). X = [1, 2, 3, 7, 8, 9]. ?- append([1,2,3],Z, [1,2,3,4,6,7]). Z = [4, 6, 7]. ?- append(A,B,[1,2,4,6,8]). A = [], B = [1, 2, 4, 6, 8] ; A = [1], B = [2, 4, 6, 8] ; A = [1, 2], B = [4, 6, 8] ; A = [1, 2, 4], B = [6, 8] ; A = [1, 2, 4, 6], B = [8] ; A = [1, 2, 4, 6, 8], B = [] ; false. ?- append([1,2],X,[5,6,7]). false. ?- append(X,[3|Y],[1,2,3,4,5,4,3,2]). X = [1, 2], Y = [4, 5, 4, 3, 2] ; X = [1, 2, 3, 4, 5, 4], Y = [2] ; false. ?- del1(a,[a,v,a,t,a,r],A). A = [v, a, t, a, r] ; A = [a, v, t, a, r] ; A = [a, v, a, t, r] ; false. ?- del1(b,[a,v,a,t,a,r],A). false. ?- del1(b,X,[a,av,at]). X = [b, a, av, at] ; X = [a, b, av, at] ; X = [a, av, b, at] ; X = [a, av, at, b] ; false. ?- [family]. true. ?- parent(X,xavier). X = sophie ; X = justin. ?- grandmother(X,xavier). X = margaret ; X = estelle ; false. ?- sibling(A,B). A = justin, B = alexandre ; A = justin, B = michel ; A = alexandre, B = justin ; A = alexandre, B = michel ; A = michel, B = justin ; A = michel, B = alexandre ; A = xavier, B = ella_grace ; A = ella_grace, B = xavier ; A = justin, B = alexandre ; A = justin, B = michel ; A = alexandre, B = justin ; A = alexandre, B = michel ; A = michel, B = justin ; A = michel, B = alexandre ; A = xavier, B = ella_grace ; A = ella_grace, B = xavier ; false. ?- append(A,B,C). A = [], B = C ; A = [_A], C = [_A|B] ; A = [_A, _B], C = [_A, _B|B] ; A = [_A, _B, _C], C = [_A, _B, _C|B] . ?- append(X,Y,Z). X = [], Y = Z ; X = [_A], Z = [_A|Y] ; X = [_A, _B], Z = [_A, _B|Y] . ?- [elect_prop]. true. ?- lit_l2. true. ?- lit_l1. false. ?- [elect_prop]. true. ?- lit_l1. true . ?-