%% Copyright (C) 2017, 2019, 2020, 2021, 2022, 2023 Dennis J. Darland %% This file is part of darland's philosophy. %% darland's philosophy is free software: you can redistribute it and/or modify %% it under the terms of the GNU General Public License as published by %% the Free Software Foundation, either version 3 of the License, or %% (at your option) any later version. %% darland's philosophy is distributed in the hope that it will be useful, %% but WITHOUT ANY WARRANTY; without even the implied warranty of %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the %% GNU General Public License for more details. %% You should have received a copy of the GNU General Public License %% along with darland's philosophy. If not, see . %% Life predicates to simulate Dennis J. Darlands philosophy. %% Started Writing 1/4/2017 %% This is a total rewrite of what I started about 10 years ago. %% %% %% I have made the propositional attitude relatons support arbitrary arity. %% %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Define sense (close to Frege's Sinn) (useless) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % qqqq(A) :- pos_qq([A]). %qqqq(A, B) :- pos_qq([A, B]). %qqqq(A, B, C) :- pos_qq([A, B, C]). % qqqq(A, B, C, D) :- pos_qq([A, B, C, D]). qqqq(sense_of_relation, Idea) :- qqqq(ssss, Subject, Time, Idea, Relation). qqqq(sense_of_object,Idea) :- qqqq(ssss, Subject, Time, Idea, Object). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% qqqq is the only predicate having ontological status. %% qqqq is the exemplification of a universal on the following arguments. %% I may define some other WildLIFE predicates (relations), however, these %% could all be eliminated. %% I also use qqqq4 for positive [base] facts. %% I also use qqqq5 for negative [base] facts. %% This is to avoid conflict with qqqq. %% These are to deal with negation by failure, and are otherwise convenient. %% Using qqqq as the only ontologically significant relation eliminates %% any need to consider relations as intensional. %% Traditionally if (x)(Fx equ Gx) then if taken extensionally, F = G. %% But with qqqq this becomes (x)(qqqq(F,x) equ qqqq(G, x)). %% F and G are no longer predicates so the issue of their equality %% under extensionality does not arise. %% of interest is that it is not a theorem that %% (x1)(x2)(y1)(y2)(z)(B)(R)(S)(F) ((x1 R y1) & (y1 S z) & (x2 R y2) & (y2 S z)) > (B(F,y1) iff B(F,y2)) %% As I am using quantification and negation as provided in WildLIFE, %% I do not analyze them here. %% I think, perhaps quantification and variables would best be handled %% as Quine did in "Variables Explained Away", Proceedings of the American %% Philosophical Society 104: 343-347. %% Gregory Landini uses that in his _Repairing Bertrand Russell's 1913 Theory %% of Knowledge_. %% I find Landini's book difficult in other respects, and have not finished %% it - (As of 8/26/2022). %% A script pre.sh translates WilderLIFE to WildLIFE. %% WilderLIFE (snobol4 preprocessor) uses qqqq as the only predicate. %% the preprocessor translates this to WildLIFE - using names %% of universals as predicates. %% to the predicates in the rules files. %% E.g. convets qqqq(f, x, y) to f(x, y) %% some possible arguments (universals) are rrrr, ssss, %% tttt, rrss, and rrtt. %% rrss is defined in terms of rrrr and ssss. %% rrrr, ssss and tttt are undefined here %% - but not necessarily ontologically primitive %% rrrr is relation between word and idea. %% ssss is relation between idea and one object. %% tttt is relation between idea and one or more objects. %% rrss is relative product of rrrr and ssss. %% rrtt is relative product of rrrr and tttt. %% also there are ssss2 and tttt2 %% ssss2 checks uniqueness - if the database is correct it should %% not be needed. %% uniqueness is essential to essentially singular ideas %% So it is required even for understanding or belief if ssss is used qqqq(ssss2, Subject, Time, Idea, Object) :- qqqq(ssss, Subject, Time, Idea, Object), \+ qqqq(non_unique, Subject, Time, Idea, Object). qqqq(non_unique, Subject, Time, Idea, Object1) :- qqqq(ssss, Subject, Time, Idea, Object2), Object1 :\== Object2. %% tttt2 also requires uniqueness %% this uniqueness is for contingently singular ideas qqqq(tttt2, Subject, Time, Idea, Object) :- qqqq(tttt,Subject, Time, Idea, Object), \+ qqqq(non_unique_t,Subject, Time, Idea, Object). qqqq(non_unique_t, Subject, Time, Idea, Object1) :- qqqq(tttt, Subject, Time, Idea, Object2), Object1 :\== Object2. %% definition of rrss in terms of rrrr and ssss. %% Note: qqqq is a dynamic predicate in WildLIFE - so it can be extended. qqqq(rrss, Subject, Time, Word, Object) :- qqqq(rrrr,Subject, Time, Word, Idea), qqqq(ssss2,Subject, Time, Idea, Object). %% definition of rrtt in terms of rrrr and tttt. %% Note: qqqq is a dynamic predicate in WildLIFE - so it can be extended. qqqq(rrtt, Subject, Time, Word, Object) :- qqqq(rrrr, Subject, Time, Word, Idea), qqqq(tttt, Subject, Time, Idea, Object). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% There are 7 relations of understanding. %% Those of understanding are defined in terms of rrrr and ssss %% The 7 cases are: %% 1 words %% 2 ideas %% 3 objects %% 4 words_ideas %% 5 words_objects %% 6 ideas_objects %% 7 words_ideas_objects %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% understands_words is defined. %% It applies to an intelligent Subject at some Time. %% There is a list of words. %% The arity_idea must match the number of words following the relation word. %% (Or an arity_relation of -999 matches any number of words.) %% The type ideas corresponding to the words must be one less thasn the type %% idea corresponding to the relation idea. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% ONE EXAMPLE EXPLAINED CAREFULLY - I HOPE!! %% 1 %% I am going to comment on one sample carefully and thoroughly I hope. %% I hope any reader can learn enough to apply principles in other cases. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% First some illustrations of WilderLIFE %% qqqq(universal1,Arg1, Arg2, Arg3) :- qqqq(universal2,Arg1, Arg2), %% qqqq(universal3,Arg1, Arg3).' %% means if qqqq(universal2,Arg1, Arg2) and qqqq(universal3,Arg1, Arg3) %% then qqqq(universal1,Arg1, Arg2, Arg3). %% ":-" means "if" %% "," separates Arguments in predicates and means "and" between clauses. %% %% Two rules can be used for "or" %% if we add %% qqqq(predicate1,Arg1, Arg2, Arg3) :- qqqq(predicate4,Arg1, Arg2), %% qqqq(predicate5,Arg1, Arg3). %% then we have: %% if qqqq(predicate3,Arg1, Arg2) and qqqq(predicate3,Arg1, Arg3)) %% or qqqq(predicate4,Arg1, Arg2) and qqqq(predicate5,Arg1, Arg3)) %% then qqqq(predicate1,Arg1, Arg2, Arg3). %% "\+" is negation by "failure" %% (if it cannot prove that something is true is says that it is false) %% I also use pos_qq to state positive facts in the database. %% and neg_qq to state negative facts in the database. %% End of WildLIFE Illustrations %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Begining Of Philosophy Sample %% match_word below is recursive. Each call removes a Word. %% It also subtracts one from the Arity of the Relation_Idea. %% The list is finite in WildLIFE, so eventually there will be %% an empty list and the Arity can be checked. (or be -999 for arbitrary) %% It also checks if the Ideas are one less in type than the Relation Idea. %% rrrr sees if the Subject has that relation between the Word and the Idea. qqqq(understands_words,Subject, Time, [[Relation_Word] | List]) :- %% Get Relation_Idea that matches other arguments. qqqq(rrrr,Subject, Time, Relation_Word, Relation_Idea), %% Get Arity of Relation_Idea qqqq(arity_idea,Relation_Idea, Arity), %% Get Type of Relation_Idea qqqq(type_idea,Relation_Idea, Type), % List of Words. % Objects should be Type one less than Type of Relation qqqq(match_word,Subject, Time, List, Arity, Type - 1). %% The following are auxilary predicates - they have no ontological %% Significance. %% Match Empty List - Recursion Ends And Arity has counted down to 0. qqqq(match_word,Subject, Time, [], 0, Type). %% Match Empty List - -999 indicates arbitrary arity. qqqq(match_word,Subject, Time, [], -999, Type). %% Tackle Words Recursively one at a Time. qqqq(match_word,Subject, Time, [[Word] | List], Arity, Type) :- % List of Word Object Pairs. %% Get Idea that Matches Word qqqq(rrrr,Subject, Time, Word, Idea), %% Get Type of Idea qqqq(type_idea,Idea, Type), %% Recurse - with remaider of List and subtract one from Arity unless -999 qqqq(match_word,Subject, Time, List, % if Arity is not Arbitrary sub 1 qqqq(cond,Arity =\= -999, Arity - 1, -999), Type). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% The following are other forms of understanding. %% I could copy, paste & edit the comments. %% But I will rely on the readers intelligence. %% It is better to be sure the above is correct. %% And to reduce the amount of editing if there are changes. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% 2 %% 3/11/2013 Changed to no longer require existence (ssss2 or tttt) qqqq(understands_ideas,Subject, Time, [[Relation_Idea] | List]) :- qqqq(number_idea,Relation_Idea, singular), qqqq(arity_idea,Relation_Idea, Arity), qqqq(type_idea,Relation_Idea, Type), % List of Ideas. % Objects should be Type one less than Type of Relation qqqq(match_idea,Subject, Time, List, Arity, Type - 1). qqqq(understands_ideas,Subject, Time, [[Relation_Idea] | List]) :- qqqq(number_idea,Relation_Idea, plural), qqqq(arity_idea,Relation_Idea, Arity), qqqq(type_idea,Relation_Idea, Type), % List of Ideas. % Objects should be Type one less than Type of Relation qqqq(match_idea,Subject, Time, List, Arity, Type - 1). %% The following are auxilary predicates - they have no ontological %% Significance. qqqq(match_idea,Subject, Time, [], 0, Type). %% -999 indicates arbitrary arity. qqqq(match_idea,Subject, Time, [], -999, Type). qqqq(match_idea,Subject, Time, [[Idea] | List], Arity, Type) :- % List of Word Object Pairs. qqqq(number_idea,Idea, singular), qqqq(type_idea,Idea, Type), qqqq(match_idea,Subject, Time, List, % if Arity is not Arbitrary sub 1 qqqq(cond,Arity =\= -999, Arity - 1, -999), Type). qqqq(match_idea,Subject, Time, [[Idea] | List], Arity, Type) :- % List of Word Object Pairs. qqqq(number_idea,Idea, plural), qqqq(type_idea,Idea, Type), qqqq(match_idea,Subject, Time, List, % if Arity is not Arbitrary sub 1 qqqq(cond,Arity =\= -999, Arity - 1, -999), Type). %%%%%%%%%%%%%%% Previous Version - Requiring existence %understands_ideas(Subject, Time, [[Relation_Idea] | List]) :- % number_idea(Relation_Idea, singular), % ssss2(Subject, Time, Relation_Idea, Object), % arity_idea(Relation_Idea, Arity), % type_idea(Relation_Idea, Type), % % List of Ideas. % % Objects should be Type one less than Type of Relation % match_idea(Subject, Time, List, Arity, Type - 1). % understands_ideas(Subject, Time, [[Relation_Idea] | List]) :- % number_idea(Relation_Idea, plural), % tttt(Subject, Time, Relation_Idea, Object), % arity_idea(Relation_Idea, Arity), % type_idea(Relation_Idea, Type), % % List of Ideas. % % Objects should be Type one less than Type of Relation % match_idea(Subject, Time, List, Arity, Type - 1). %% The following are auxilary predicates - they have no ontological %% Significance. % match_idea(Subject, Time, [], 0, Type). %% -999 indicates arbitrary arity. % match_idea(Subject, Time, [], -999, Type). %match_idea(Subject, Time, [[Idea] | List], % Arity, Type) :- % % List of Word Object Pairs. % number_idea(Idea, singular), % ssss2(Subject, Time, Idea, Object), % type_idea(Idea, Type), % match_idea(Subject, Time, List, % % if Arity is not Arbitrary sub 1 % cond(Arity =\= -999, Arity - 1, -999), % Type). %match_idea(Subject, Time, [[Idea] | List], % Arity, Type) :- % % List of Word Object Pairs. % number_idea(Idea, plural), % tttt(Subject, Time, Idea, Object), % type_idea(Idea, Type), % match_idea(Subject, Time, List, % % if Arity is not Arbitrary sub 1 % cond(Arity =\= -999, Arity - 1, -999), % Type). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5 %% 3 qqqq(understands_objects,Subject, Time, [[Relation] | List]) :- qqqq(number_idea,Relation_Idea, singular), qqqq(ssss2,Subject, Time, Relation_Idea, Relation), qqqq(arity_idea,Relation_Idea, Arity), qqqq(type_idea,Relation_Idea, Type), % List of Ideas. % Objects should be Type one less than Type of Relation qqqq(match_object,Subject, Time, List, Arity, Type - 1). qqqq(understands_objects,Subject, Time, [[Relation] | List]) :- qqqq(number_idea,Relation_Idea, plural), qqqq(tttt,Subject, Time, Relation_Idea, Relation), qqqq(arity_idea,Relation_Idea, Arity), qqqq(type_idea,Relation_Idea, Type), % List of Ideas. % Objects should be Type one less than Type of Relation qqqq(match_object,Subject, Time, List, Arity, Type - 1). %% The following are auxilary predicates - they have no ontological %% Significance. qqqq(match_object,Subject, Time, [], 0, Type). %% -999 indicates arbitrary arity. qqqq(match_object,Subject, Time, [], -999, Type). qqqq(match_object,Subject, Time, [[Object] | List], Arity, Type) :- % List of Word Object Pairs. qqqq(number_idea,Idea, singular), qqqq(ssss2,Subject, Time, Idea, Object), qqqq(type_idea,Idea, Type), qqqq(match_object,Subject, Time, List, % if Arity is not Arbitrary sub 1 qqqq(cond,Arity =\= -999, Arity - 1, -999), Type). qqqq(match_object,Subject, Time, [[Object] | List], Arity, Type) :- % List of Word Object Pairs. qqqq(number_idea,Idea, plural), qqqq(tttt,Subject, Time, Idea, Object), qqqq(type_idea,Idea, Type), qqqq(match_object,Subject, Time, List, % if Arity is not Arbitrary sub 1 qqqq(cond,Arity =\= -999, Arity - 1, -999), Type). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% 4 qqqq(understands_words_ideas,Subject, Time, [[Relation_Word, Relation_Idea] | PairList]) :- qqqq(rrrr,Subject, Time, Relation_Word, Relation_Idea), qqqq(arity_idea,Relation_Idea, Arity), qqqq(type_idea,Relation_Idea, Type), % List of Word Object Pairs. % Objects should be Type one less than Type of Relation qqqq(match_pair_word_idea,Subject, Time, PairList, Arity, Type - 1). %% The following are auxilary predicates - they have no ontological %% Significance. qqqq(match_pair_word_idea,Subject, Time, [], 0, Type). %% -999 indicates arbitrary arity. qqqq(match_pair_word_idea,Subject, Time, [], -999, Type). qqqq(match_pair_word_idea,Subject, Time, [[Word, Idea] | PairList], Arity, Type) :- % List of Word Object Pairs. qqqq(rrrr,Subject, Time, Word, Idea), qqqq(type_idea,Idea, Type), qqqq(match_pair_word_idea,Subject, Time, PairList, % if Arity is not Arbitrary sub 1 qqqq(cond,Arity =\= -999, Arity - 1, -999), Type). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% 5 qqqq(understands_words_objects,Subject, Time, [[Relation_Word, Relation] | PairList]) :- qqqq(rrrr,Subject, Time, Relation_Word, Relation_Idea), qqqq(number_idea,Relation_Idea, singular), qqqq(ssss2,Subject, Time, Relation_Idea, Relation), qqqq(arity_idea,Relation_Idea, Arity), qqqq(type_idea,Relation_Idea, Type), % List of Word Object Pairs. % Objects should be Type one less than Type of Relation qqqq(match_pair_word_object,Subject, Time, PairList, Arity, Type - 1). qqqq(understands_words_objects,Subject, Time, [[Relation_Word, Relation] | PairList]) :- qqqq(rrrr,Subject, Time, Relation_Word, Relation_Idea), qqqq(number_idea,Relation_Idea, plural), qqqq(tttt,Subject, Time, Relation_Idea, Relation), qqqq(arity_idea,Relation_Idea, Arity), qqqq(type_idea,Relation_Idea, Type), % List of Word Object Pairs. % Objects should be Type one less than Type of Relation qqqq(match_pair_word_object,Subject, Time, PairList, Arity, Type - 1). %% The following are auxilary predicates - they have no ontological %% Significance. qqqq(match_pair_word_object,Subject, Time, [], 0, Type). %% -999 indicates arbitrary arity. match_pair_word_object(Subject, Time, [], -999, Type). qqqq(match_pair_word_object,Subject, Time, [[Word, Object] | PairList], Arity, Type) :- % List of Word Object Pairs. qqqq(rrrr,Subject, Time, Word, Idea), qqqq(number_idea,Idea, singular), qqqq(ssss2,Subject, Time, Idea, Object), qqqq(type_idea,Idea, Type), qqqq(match_pair_word_object,Subject, Time, PairList, % if Arity is not Arbitrary sub 1 qqqq(cond,Arity =\= -999, Arity - 1, -999), Type). qqqq(match_pair_word_object,Subject, Time, [[Word, Object] | PairList], Arity, Type) :- % List of Word Object Pairs. qqqq(rrrr,Subject, Time, Word, Idea), qqqq(number_idea,Idea, plural), qqqq(tttt,Subject, Time, Idea, Object), qqqq(type_idea,Idea, Type), qqqq(match_pair_word_object,Subject, Time, PairList, % if Arity is not Arbitrary sub 1 qqqq(cond,Arity =\= -999, Arity - 1, -999), Type). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% 6 qqqq(understands_ideas_objects, Subject, Time, [[Relation_Idea, Relation] | PairList]) :- % List of Word Object Pairs. qqqq(number_idea,Relation_Idea, singular), qqqq(ssss2, Subject, Time, Relation_Idea, Relation), qqqq(arity_idea, Relation_Idea, Arity), qqqq(type_idea, Relation_Idea, Type), qqqq(match_pair_idea_object_relation,Subject, Time, PairList, Arity, Type - 1). qqqq(understands_ideas_objects, Subject, Time, [[Relation_Idea, Relation] | PairList]) :- % List of Word Object Pairs. qqqq(number_idea,Relation_Idea, plural), qqqq(tttt, Subject, Time, Relation_Idea, Relation), qqqq(arity_idea, Relation_Idea, Arity), qqqq(type_idea, Relation_Idea, Type), qqqq(match_pair_idea_object_relation,Subject, Time, PairList, Arity, Type - 1). qqqq(match_pair_idea_object_relation,Subject, Time, [], -999, Type). qqqq(match_pair_idea_object_relation,Subject, Time, [], 0, Type). qqqq(match_pair_idea_object_relation,Subject, Time, [[Idea, Object] | PairList], Arity, Type) :- % List of Word Object Pairs. qqqq(number_idea,Idea, singular), qqqq(ssss2, Subject, Time, Idea, Object), qqqq(type_idea, Idea, Type), qqqq(match_pair_idea_object_relation,Subject, Time, PairList, % if Arity is not Arbitrary sub 1 qqqq(cond,Arity =\= -999, Arity - 1, -999), Type). qqqq(match_pair_idea_object_relation,Subject, Time, [[Idea, Object] | PairList], Arity, Type) :- % List of Word Object Pairs. qqqq(number_idea,Idea, plural), qqqq(tttt, Subject, Time, Idea, Object), qqqq(type_idea, Idea, Type), qqqq(match_pair_idea_object_relation,Subject, Time, PairList, % if Arity is not Arbitrary sub 1 qqqq(cond,Arity =\= -999, Arity - 1, -999), Type). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% 7 qqqq(understands_words_ideas_objects,Subject, Time, [[Relation_Word, Relation_Idea, Relation] | TripleList]) :- % List of Word Idea_Object Triples. qqqq(rrrr,Subject, Time, Relation_Word, Relation_Idea), qqqq(number_idea,Relation_Idea, singular), qqqq(ssss2,Subject, Time, Relation_Idea, Relation), qqqq(arity_idea,Relation_Idea, Arity), qqqq(type_idea,Relation_Idea, Type), qqqq(match_triple_word_idea_object_relation,Subject, Time, TripleList, Arity, Type - 1). qqqq(understands_words_ideas_objects,Subject, Time, [[Relation_Word, Relation_Idea, Relation] | TripleList]) :- % List of Word Idea_Object Triples. qqqq(rrrr,Subject, Time, Relation_Word, Relation_Idea), qqqq(number_idea,Relation_Idea, plural), qqqq(tttt,Subject, Time, Relation_Idea, Relation), qqqq(arity_idea,Relation_Idea, Arity), qqqq(type_idea,Relation_Idea, Type), qqqq(match_triple_word_idea_object_relation,Subject, Time, TripleList, Arity, Type - 1). qqqq(match_triple_word_idea_object_relation,Subject, Time, [], 0, Type). %% -999 indicates arbitrary arity. qqqq(match_triple_word_idea_object_relation,Subject, Time, [], -999, Type). qqqq(match_triple_word_idea_object_relation,Subject, Time, [[Word, Idea, Object] | TripleList], Arity, Type) :- % List of Word Idea Object Triple. qqqq(rrrr,Subject, Time, Word, Idea), qqqq(number_idea,Idea, singular), qqqq(ssss2,Subject, Time, Idea, Object), qqqq(type_idea,Idea, Type), qqqq(match_triple_word_idea_object_relation,Subject, Time, TripleList, % if Arity is not Arbitrary sub 1 qqqq(cond,Arity =\= -999, Arity - 1, -999), Type). qqqq(match_triple_word_idea_object_relation,Subject, Time, [[Word, Idea, Object] | TripleList], Arity, Type) :- % List of Word Idea Object Triple. qqqq(rrrr,Subject, Time, Word, Idea), qqqq(number_idea,Idea, plural), qqqq(tttt,Subject, Time, Idea, Object), qqqq(type_idea,Idea, Type), qqqq(match_triple_word_idea_object_relation,Subject, Time, TripleList, % if Arity is not Arbitrary sub 1 qqqq(cond,Arity =\= -999, Arity - 1, -999), Type). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% The FOLLOWING are NOT USED currently understand_same_objects_by_ideas( Subject_1, Time_1, [[Idea_1, Object_1] | Pair_List1], Subject_2, Time_2, [[Idea_2, Object_2] | Pair_List2]) :- % write(usoA, USIOA), nl, % List of Word Object Pairs. % write(usoA, USIOA), nl, ssss2( Subject_1, Time_1, Idea_1, Object_1), ssss2( Subject_2, Time_2, Idea_2, Object_2), Object_1 = Object2, match_same_pair_idea_object_relation(Subject_1, Time_1, Pair_List1, Subject_2, Time_2, Pair_List2). match_same_pair_idea_object_relation(Subject_1, Time_1, [], Subject_2, Time_2, []). match_same_pair_idea_object_relation(Subject_1, Time_1, [[Idea_1 , Object_1] | Pair_List1], Subject_2, Time_2, [[Idea_2 , Object_2] | Pair_List2]) :- % List of Word Object Pairs. ssss2( Subject_1, Time_1, Idea_1, Object_1), ssss2( Subject_2, Time_2, Idea_2, Object_2), Object_1 = Object2, match_same_pair_idea_object_relation(Subject_1, Time_1, Pair_List1, Subject_2, Time_2, Pair_List2). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% understand_same_objects_by_words( Subject_1, Time_1, Pair_List1, Subject_2, Time_2, Pair_List2) :- % List of Word Object Pairs. match_same_pair_word_object_relation(Subject_1, Time_1, Pair_List1, Subject_2, Time_2, Pair_List2). match_same_pair_word_object_relation(Subject_1, Time_1, [], Subject_2, Time_2, []). match_same_pair_word_object_relation(Subject_1, Time_1, [[Word_1 , Object_1] | Pair_List1], Subject_2, Time_2, [[Word_2 , Object_2] | Pair_List2]) :- % List of Word Object Pairs. rrss( Subject_1, Time_1, Word_1, Object_1), rrss( Subject_2, Time_2, Word_2, Object_2), Word_1 = Word_2, Object_1 = Object_2, match_same_pair_word_object_relation(Subject_1, Time_1, Pair_List1, Subject_2, Time_2, Pair_List2). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% The following is very preliminary. %% I need to go over it all again. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Rules on Philosophical Terminology %% DEBUG VERSION %% pl_external_synonym_simple_expanded(Number, Philosopher_1, Philosopher_2, External_Term_1, External_Term_2, Quote_1, Author_1, Author_Article_1, Author_Book_1, Article_Title_1, Book_Title_1, Pages_1, Quotation_1, Article_Year_1, Book_Year_1, Note1, Notes_Article_1, Notes_Book_1, Quote_2, Author_2, Author_Article_2, Author_Book_2, Article_Title_2, Book_Title_2, Pages_2, Quotation_2, Article_Year_2, Book_Year_2, Note2, Notes_Article_2, Notes_Book_2, Quote_3, Author_3, Author_Article_3, Author_Book_3, Article_Title_3, Book_Title_3, Pages_3, Quotation_3, Article_Year_3, Book_Year_3, Note3, Notes_Article_3, Notes_Book_3, Quote_4, Author_4, Author_Article_4, Author_Book_4, Article_Title_4, Book_Title_4, Pages_4, Quotation_4, Article_Year_4, Book_Year_4, Note4, Notes_Article_4, Notes_Book_4) :- write(['A0001']), nl, term(External_Term_1), write(['A0002']), nl, term(External_Term_2), write(['A0003', Number, External_Term_1, External_Term_2]), nl, pl_external_synonym(Number, Philosopher_1, Philosopher_2, External_Term_1, External_Term_2, Quote_1, Quote_2, Quote_3, Quote_4), quote_note(Quote_1, Author_1, Author_Article_1, Author_Book_1, Article_Title_1, Book_Title_1, Pages_1, Quotation_1, Article_Year_1, Book_Year_1, Note1, Notes_Article_1, Notes_Book_1), write(['A0004', Number, Philosopher_1, Philosopher_2, External_Term_1, External_Term_2, Quote_1, Quote_2, Quote_3, Quote_4 ]), nl, quote_note(Quote_2, Author_2, Author_Article_2, Author_Book_2, Article_Title_2, Book_Title_2, Pages_2, Quotation_2, Article_Year_2, Book_Year_2, Note2, Notes_Article_2, Notes_Book_2), write(['A0005', Quote_2, Author_2, Author_Article_2, Author_Book_2, Article_Title_2, Book_Title_2, Pages_2, Quotation_2, Article_Year_2, Book_Year_2, Note2, Notes_Article_2, Notes_Book_2] ), nl, quote_note(Quote_3, Author_3, Author_Article_3, Author_Book_3, Article_Title_3, Book_Title_3, Pages_3, Quotation_3, Article_Year_3, Book_Year_3, Note3, Notes_Article_3, Notes_Book_3), write(['A0006', Quote_3, Author_3, Author_Article_3, Author_Book_3, Article_Title_3, Book_Title_3, Pages_3, Quotation_3, Article_Year_3, Book_Year_3, Note3, Notes_Article_3, Notes_Book_3]), nl, quote_note(Quote_4, Author_4, Author_Article_4, Author_Book_4, Article_Title_4, Book_Title_4, Pages_4, Quotation_4, Article_Year_4, Book_Year_4, Note4, Notes_Article_4, Notes_Book_4), write(['A0007', Quote_4, Author_4, Author_Article_4, Author_Book_4, Article_Title_4, Book_Title_4, Pages_4, Quotation_4, Article_Year_4, Book_Year_4, Note4, Notes_Article_4, Notes_Book_4] ), nl. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% pl_external_synonym expanded with full names and supporting quotations %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pl_external_synonym_simple_expanded(Number, Philosopher_1, Philosopher_2, External_Term_1, External_Term_2, Quote_1, Author_1, Author_Article_1, Author_Book_1, Article_Title_1, Book_Title_1, Pages_1, Quotation_1, Article_Year_1, Book_Year_1, Note1, Notes_Article_1, Notes_Book_1, Quote_2, Author_2, Author_Article_2, Author_Book_2, Article_Title_2, Book_Title_2, Pages_2, Quotation_2, Article_Year_2, Book_Year_2, Note2, Notes_Article_2, Notes_Book_2, Quote_3, Author_3, Author_Article_3, Author_Book_3, Article_Title_3, Book_Title_3, Pages_3, Quotation_3, Article_Year_3, Book_Year_3, Note3, Notes_Article_3, Notes_Book_3, Quote_4, Author_4, Author_Article_4, Author_Book_4, Article_Title_4, Book_Title_4, Pages_4, Quotation_4, Article_Year_4, Book_Year_4, Note4, Notes_Article_4, Notes_Book_4) :- term(External_Term_1), term(External_Term_2), pl_external_synonym(Number, Philosopher_1, Philosopher_2, External_Term_1, External_Term_2, Quote_1, Quote_2, Quote_3, Quote_4), quote_note(Quote_1, Author_1, Author_Article_1, Author_Book_1, Article_Title_1, Book_Title_1, Pages_1, Quotation_1, Article_Year_1, Book_Year_1, Note1, Notes_Article_1, Notes_Book_1), quote_note(Quote_2, Author_2, Author_Article_2, Author_Book_2, Article_Title_2, Book_Title_2, Pages_2, Quotation_2, Article_Year_2, Book_Year_2, Note2, Notes_Article_2, Notes_Book_2), quote_note(Quote_3, Author_3, Author_Article_3, Author_Book_3, Article_Title_3, Book_Title_3, Pages_3, Quotation_3, Article_Year_3, Book_Year_3, Note3, Notes_Article_3, Notes_Book_3), quote_note(Quote_4, Author_4, Author_Article_4, Author_Book_4, Article_Title_4, Book_Title_4, Pages_4, Quotation_4, Article_Year_4, Book_Year_4, Note4, Notes_Article_4, Notes_Book_4). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% pl_external_synonym componded - two philosophers using term same as another %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pl_external_synonym_compound_expanded(Number1A, Number1B, Philosopher_1, Philosopher_2A, Philosopher_2B, External_Term_1, External_Term_2A, External_Term_2B, Quote_1A, Author_1A, Author_Article_1A, Author_Book_1A, Article_Title_1A, Book_Title_1A, Pages_1A, Quotation_1A, Article_Year_1A, Book_Year_1A, Note1A, Notes_Article_1A, Notes_Book_1A, Quote_2A, Author_2A, Author_Article_2A, Author_Book_2A, Article_Title_2A, Book_Title_2A, Pages_2A, Quotation_2A, Article_Year_2A, Book_Year_2A, Note2A, Notes_Article_2A, Notes_Book_2A, Quote_3A, Author_3A, Author_Article_3A, Author_Book_3A, Article_Title_3A, Book_Title_3A, Pages_3A, Quotation_3A, Article_Year_3A, Book_Year_3A, Note3A, Notes_Article_3A, Notes_Book_3A, Quote_4A, Author_4A, Author_Article_4A, Author_Book_4A, Article_Title_4A, Book_Title_4A, Pages_4A, Quotation_4A, Article_Year_4A, Book_Year_4A, Note4A, Notes_Article_4A, Notes_Book_4A, Quote_1B, Author_1B, Author_Article_1B, Author_Book_1B, Article_Title_1B, Book_Title_1B, Pages_1B, Quotation_1B, Article_Year_1B, Book_Year_1B, Note1B, Notes_Article_1B, Notes_Book_1B, Quote_2B, Author_2B, Author_Article_2B, Author_Book_2B, Article_Title_2B, Book_Title_2B, Pages_2B, Quotation_2B, Article_Year_2B, Book_Year_2B, Note2B, Notes_Article_2B, Notes_Book_2B, Quote_3B, Author_3B, Author_Article_3B, Author_Book_3B, Article_Title_3B, Book_Title_3B, Pages_3B, Quotation_3B, Article_Year_3B, Book_Year_3B, Note3B, Notes_Article_3B, Notes_Book_3B, Quote_4B, Author_4B, Author_Article_4B, Author_Book_4B, Article_Title_4B, Book_Title_4B, Pages_4B, Quotation_4B, Article_Year_4B, Book_Year_4B, Note4B, Notes_Article_4B, Notes_Book_4B) :- term(External_Term_1), term(External_Term_2), pl_external_synonym(NumberA, Philosopher_1, Philosopher_2A, External_Term_1, External_Term_2A, Quote_1A, Quote_2A, Quote_3A, Quote_4A), pl_external_synonym(NumberB, Philosopher_1, Philosopher_2B, External_Term_1, External_Term_2B, Quote_1B, Quote_2B, Quote_3B, Quote_4B), quote_note(Quote_1A, Author_1A, Author_Article_1A, Author_Book_1A, Article_Title_1A, Book_Title_1A, Pages_1A, Quotation_1A, Article_Year_1A, Book_Year_1A, Note1A, Notes_Article_1A, Notes_Book_1A), quote_note(Quote_2A, Author_2A, Author_Article_2A, Author_Book_2A, Article_Title_2A, Book_Title_2A, Pages_2A, Quotation_2A, Article_Year_2A, Book_Year_2A, Note2A, Notes_Article_2A, Notes_Book_2A), quote_note(Quote_3A, Author_3A, Author_Article_3A, Author_Book_3A, Article_Title_3A, Book_Title_3A, Pages_3A, Quotation_3A, Article_Year_3A, Book_Year_3A, Note3A, Notes_Article_3A, Notes_Book_3A), quote_note(Quote_4A, Author_4A, Author_Article_4A, Author_Book_4A, Article_Title_4A, Book_Title_4A, Pages_4A, Quotation_4A, Article_Year_4A, Book_Year_4A, Note4A, Notes_Article_4A, Notes_Book_4A), quote_note(Quote_1B, Author_1B, Author_Article_1B, Author_Book_1B, Article_Title_1B, Book_Title_1B, Pages_1B, Quotation_1B, Article_Year_1B, Book_Year_1B, Note1B, Notes_Article_1B, Notes_Book_1B), quote_note(Quote_2B, Author_2B, Author_Article_2B, Author_Book_2B, Article_Title_2B, Book_Title_2B, Pages_2B, Quotation_2B, Article_Year_2B, Book_Year_2B, Note2B, Notes_Article_2B, Notes_Book_2B), quote_note(Quote_3B, Author_3B, Author_Article_3B, Author_Book_3B, Article_Title_3B, Book_Title_3B, Pages_3B, Quotation_3B, Article_Year_3B, Book_Year_3B, Note3B, Notes_Article_3B, Notes_Book_3B), quote_note(Quote_4B, Author_4B, Author_Article_4B, Author_Book_4B, Article_Title_4B, Book_Title_4B, Pages_4B, Quotation_4B, Article_Year_4B, Book_Year_4B, Note4B, Notes_Article_4B, Notes_Book_4B), different(Philosopher_2A, Philosopher_2B). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Philosopher 2 using 2 different terms as philosopher 1 uses 1 term %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pl_ambiguity_1(Number_1, Number_2, Philosopher_1, Philosopher_2, External_Term_1, External_Term_2A, External_Term_2B) :- pl_external_synonym(Number_1, Philosopher_Abbreviation_1, Philosopher_Abbreviation_2, External_Term_1, External_Term_2A, Quote_1A, Quote_2A, Quote_3A, Quote_4A), pl_external_synonym(Number_2, Philosopher_Abbreviation_1, Philosopher_Abbreviation_2, External_Term_1, External_Term_2B, Quote_1B, Quote_2B, Quote_3B, Quote_4B), different(External_Term_2A, External_Term_2B), philosopher(Philosopher_Abbreviation_1, Philosopher_1), philosopher(Philosopher_Abbreviation_2, Philosopher_2). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Philosopher 1 using 2 different terms as philosopher 2 uses 1 term %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pl_ambiguity_2(Number_1, Number_2, Philosopher_1, Philosopher_2, External_Term_1A, External_Term_1B, External_Term_2) :- pl_external_synonym(Number_1, Philosopher_Abbreviation_1, Philosopher_Abbreviation_2, External_Term_1A, External_Term_2, Quote_1A, Quote_2A, Quote_3A, Quote_4A), pl_external_synonym(Number_2, Philosopher_Abbreviation_1, Philosopher_Abbreviation_2, External_Term_1B, External_Term_2, Quote_1B, Quote_2B, Quote_3B, Quote_4B), different(External_Term_1A, External_Term_1B), philosopher(Philosopher_Abbreviation_1, Philosopher_1), philosopher(Philosopher_Abbreviation_2, Philosopher_2). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Expand quotation info when there is both book and article info %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% quote_note(Id_Number, Author, Author_Article, Author_Book, Article_Title, Book_Title, Pages, Quotation, Article_Year, Book_Year, Note1, Notes_Article, Notes_Book) :- philosophical_quotation(Id_Number, Author_Abbreviation, Article_Abbreviation, Book_Abbreviation, Pages, Quotation, Note1), article(Article_Abbreviation, Book_Abbreviation, Author_Article_Abbreviation, Article_Title, Article_Year, Notes_Article), book(Book_Abbreviation, Author_Book_Abbreviation, Book_Title, Book_Year, Notes_Book), philosopher(Author_Article_Abbreviation, Author_Article), philosopher(Author_Book_Abbreviation, Author_Book), actual_author(Author_Abbreviation, Author_Article_Abbreviation, Author_Book_Abbreviation), philosopher(Author_Abbreviation, Author). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Expand quotation info when there is only book info %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% quote_note(Id_Number, Author, none, Author_Book, none, Book_Title, Pages, Quotation, none, Book_Year, Note1, none, Notes_Book) :- philosophical_quotation(Id_Number, Author_Abbreviation, none, Book_Abbreviation, Pages, Quotation, Note1), book(Book_Abbreviation, Author_Book_Abbreviation, Book_Title, Book_Year, Notes_Book), philosopher(Author_Book_Abbreviation, Author_Book), actual_author(Author_Abbreviation, none, Author_Book_Abbreviation), philosopher(Author_Abbreviation, Author). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Expand quotation info when there is only article info %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% quote_note(Id_Number, Author, Author_Article, none, Article_Title, none, Pages, Quotation, Article_Year, none, Note1, Notes_Article, none) :- philosophical_quotation(Id_Number, Author_Abbreviation, Article_Abbreviation, none, Pages, Quotation, Note1), article(Article_Abbreviation, none, Author_Article_Abbreviation, Article_Title, Article_Year, Notes_Article), philosopher(Author_Article_Abbreviation, Author_Article), actual_author(Author_Abbreviation, Author_Article_Abbreviation, none), philosopher(Author_Abbreviation, Author). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Expand quotation info when there is no info %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% quote_note(none, none, none, none, none, none, none, none, none, none, none, none, none). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% If there is article author info use it - otherwise use book info %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% actual_author(Author_Abbreviation, Author_Article_Abbreviation, Author_Book_Abbreviation) :- different(Author_Article_Abbreviation, none), Author_Abbreviation = Author_Article_Abbreviation, !. actual_author(Author_Abbreviation, Author_Article_Abbreviation, Author_Book_Abbreviation) :- Author_Abbreviation = Author_Book_Abbreviation.