\P Version of August 22, 2019 % This is a sample data file for sublatts.exe % Do not change its STRUCTURE! % In particular, do not change the order of the commands, % and do not leave a command. % For instruction, see the end of this file, and see the comment % lines in the data part. % See also the related paper, G. Czédli: % Planar semilattices and nearlattices with eighty-three subnearlattices % http://arxiv.org/pdf/1908.08155 % % \verbose=false % or =true for more details like derived constrains. % \subtrahend-in-exponent=8 % Small natural number, for another form of |Sub(A)| % \operationsymbols=+* % The order of the operation symbols is arbitrary. % % Although the program is designed for lattices and qn-lattices, % it is possible to use it for any sort of partial algebras. % If the algebra in question is NOT a lattice, then either we % can use different operation symbols, or we can use % the equality relation as ordering in order to avoid that % some lattice properties are taken into account. % However, for algebras that are NOT (partial) lattices, % our earlier program called subsize is recommended, % because it is a bit faster. (It is faster because it spends % no time on using the trivial ordering.) % Note that whenever the ordering is not the trivial one, the % equality relation, then + is always stands for the join % operation while * stands for the meet. % Empty lines are allowed but neglected. Everything is % case-sensitive. "%" introduces comments that are dropped, but % P introduces comments that are printed (copied) into the % output file. Both forms of comments are optional, of course. % There is a third form of comment but only in the list of % edges and that of constraints; it is carried over the output file % and it starts with "\w"; see later for examples. ("w" comes from % "write"). And, only in the "edges" and "constraints" parts, there is % fourth way: namely, we can use a "parenthesized command"; see later. % \beginjob % \P First, we are dealing with the pentagon lattice. % Any line containing the P command is printed into the % output file and to the screen. P is suggested only % after places where the program automatically prints a line-break. \name N_5 % The name of the partial lattice; here it it is a lattice. % Here a backslash>P line is not suggested because of the % possibility of an ugly line-break, even if such a line would not % disturb the computation. % \size 5 % The number of elements of the (partial) lattice \elements 01abc % the elements of the algebra; a single character each, % case-sensitive, without spaces \edges 0a 0b ac b1, c1 \w comment to be printed, (Casename: superfluous "edge" but not forbidden:) 01 % Here 01 is superfluous but not forbidden; the program uses the % ordering generated by the given pairs and does not check if these % pairs are indeed coverings. However, as a defense against typos, % repetition like 0b instead of 01 generates an error message. % In this "edges" part, use \w, because \P is not allowed here! % The edges are separated by spaces or commas, multiple % separators are allowed. The "\w "command is allowed only in the % scope of the \edges or \constraints (see later) commands. The % parenthesized comment is optional; if it is present then it is printed. % Note its syntax: either there are no parentheses, or there are exactly % one "(" and exactly one ")" in the same line later. % Of course, if there is a "\w" in the line, then it can be followed % by anything (even by many parentheses) in the same line! % \constraints (Case-name1) a*b=0, a+b=1 \w Explanation: complemantary pair - to be output. % Except that here equations rather than edges are required, % the sytanx for the \constraints part is exactly the same as % those for the \edges part. In particular, you can use \w % but \P is not allowed here, and you can also use a case name % in parentheses. (Subcase-name) c*b=0 \w Explanation/2 to be printed % (Superfluous: ) c+b=1 \w Follows from <= and the earlier equalities! % The spaces preceding the opening parenthesis are also printed. % This feature and the parenthesized part are very appropriate to % organize our work. Also, the leading spaces are printed even if % we use the \w after a command; this feature was used in the data files % associated with the paper. \endofjob \P Comments on the result above (free text) \P (free text, continued) \beginjob \name M_3 % Five-element modular but not distributive lattice \size 5 \elements 01abc % as usual \edges (lower edges:) 0a 0b 0c (upper edges:) a1 b1 c1 \constraints (C1) a*b=0 \w %The empty print gives only a colon and a line break. (C1a) a+b=1 \w but this algebra needs no cases to distinguish! (C1a.1) b*c=0 \w "C" in parentheses stands for "Case" (C1a.1b) b+c=1 c*a=0, c+a=1 \endofjob \enddata The rest of the file will not be read by the program! INSTRUCTION %******************************************************************* In such a file, arbitrarily many partial lattices or even other partial algebras can be given. (Here, we give only two.) That is, we have to give the generating set of the ordering relation; typically, we give the edges (that is, the covering relation). Also, we give the joins (denoted by +) and the meets (denoted by *) of certain pairs of elements; not necessarily all pairs. The constraints are nontrivial equalities that hold in the partial lattice. However, for x <= y (in particular, for if x=y), both x+y=x and x*y=x hold (provided they are defined) but they may not occur in the input file. (As a way of checking typos, we get an error message if they occur.) After these initially given constraints, their consequences are computed and added; see the paper. Percentage sign (%) means that the rest of the line is only a comment, which does not influence the computation. Note that if we have a unary operation f and f(x)=y, then we have to type the corresponding constraint as xfx=y . Notes on the syntax: no line can exceed 250 characters but it is suggested that 80 characters should not be exceeded. The constraints are separated by commas or spaces, in a single line or in more lines. The same holds for the edges. The elements of the algebra should be denoted by letters or decimals; some characters are forbidden, and the characters are case-sensitive. For more information, study the comments on the syntax in the comment lines that occur among the data above. Improper data will lead to irregular termination of the program! ALGORITHM %******************************************************************* After computing the derived constraints, the program lists ALL subsets of the base set and counts those that are closed with respect to all constraints. Except for + and *, no property of the operations are taken into account. In fact, even multiple-valued partial operations are allowed; for example, xfy=u and xfy=v can both occur among the constraints. Since the running time is exponential, the program is not effective for large partial algebras. For |A|<26, the program is likely to compute the result in a reasonable time in any reasonable computer. For |A|>30, this is not always so. In addition to |A|, the running time depends also on the constraints. AS IT IS The program is for Windows 10; it is likely to run under Windows 7 or higher. The program is "as it is", nothing is guaranteed.