BooleanMaxterms[k,n]
represents the k
maxterm in n variables.
BooleanMaxterms[{k1,k2,…},n]
represents the conjunction of the maxterms ki.
BooleanMaxterms[{{u1,…,un},{v1,…},…}]
represents the conjunction of maxterms given by the exponent vectors ui, vi, ….
BooleanMaxterms[spec,{a1,a2,…}]
gives the Boolean expression in variables ai corresponding to the maxterms function specified by spec.
BooleanMaxterms[spec,{a1,a2,…},form]
gives the Boolean expression in the form specified by form.
BooleanMaxterms
BooleanMaxterms[k,n]
represents the k
maxterm in n variables.
BooleanMaxterms[{k1,k2,…},n]
represents the conjunction of the maxterms ki.
BooleanMaxterms[{{u1,…,un},{v1,…},…}]
represents the conjunction of maxterms given by the exponent vectors ui, vi, ….
BooleanMaxterms[spec,{a1,a2,…}]
gives the Boolean expression in variables ai corresponding to the maxterms function specified by spec.
BooleanMaxterms[spec,{a1,a2,…},form]
gives the Boolean expression in the form specified by form.
Details
- BooleanMaxterms[{{u1,u2,…}},{a1,a2,…}] gives b1∨b2∨… where bi==ai if ui is True and bi=¬ai if ui is False.
- The ui etc. can be either True and False or 1 and 0.
- BooleanMaxterms[k,n] is equivalent to BooleanMaxterms[{IntegerDigits[k,n,2]}].
- BooleanMaxterms[spec] gives a Boolean function object that works like Function.
- BooleanMaxterms[spec][a1,a2,…] gives an implicit representation equivalent to the explicit Boolean expression BooleanMaxterms[spec,{a1,a2,…}].
- BooleanConvert converts BooleanMaxterms[spec][vars] to an explicit Boolean expression.
- In BooleanMaxterms[spec,{a1,a2,…},form], the possible forms are as given for BooleanConvert.
- BooleanMaxterms[spec,{a1,a2,…}] by default gives an expression in CNF.
Examples
open all close allBasic Examples (4)
Equivalent ways of specifying the same maxterm:
BooleanMaxterms[{{True, False, True}}, {a, b, c}]BooleanMaxterms[{{1, 0, 1}}, {a, b, c}]BooleanMaxterms[{5}, {a, b, c}]Specify a conjunction of maxterms:
BooleanMaxterms[{1, 3, 5}, {a, b, c}]An equivalent way to specify a conjunction of maxterms:
And@@Table[BooleanMaxterms[{i}, {a, b, c}], {i, {1, 3, 5}}]TautologyQ[Equivalent[%%, %]]Return a BooleanFunction object representing the conjunction of maxterms:
BooleanMaxterms[{1, 3, 5}, 3]@@{a, b, c}BooleanMaxterms[{1, 3, 5}, {a, b, c}]TautologyQ[Equivalent[%%, %]]Enumerate all maxterms of three variables:
Table[BooleanMaxterms[{i}, {a, b, c}], {i, 0, 2 ^ 3 - 1}]Scope (2)
Specify different forms for the result:
BooleanMaxterms[{1, 3, 5}, {a, b, c}, "CNF"]BooleanMaxterms[{1, 3, 5}, {a, b, c}, "DNF"]BooleanMaxterms[{1, 3, 5}, {a, b, c}, "ANF"]Use exponent vectors to specify a conjunction of maxterms:
BooleanMaxterms[{{0, 1, 1}, {1, 0, 1}, {1, 1, 0}}]BooleanConvert[%[a, b, c], "CNF"]Applications (1)
Properties & Relations (4)
The indices correspond to positions of False, in the default ordering for BooleanTable:
BooleanTable[BooleanMaxterms[{0, 3, 5, 7}, {a, b, c}], {a, b, c}]Position[%, False] - 1BooleanMaxterms can represent any BooleanFunction:
f = BooleanMaxterms[{1, 5, 7}, 3]g = BooleanFunction[FromDigits[{1, 0, 1, 1, 1, 0, 1, 0}, 2], 3]f === gThe mapping from maxterms to index:
maxdex[l_, k_] := FromDigits[Table[If[MemberQ[l, i], 0, 1], {i, 0, 2 ^ k - 1}], 2]maxdex[{1, 5, 7}, 3]The mapping from index to maxterms:
indmax[m_, k_] := Flatten@Position[IntegerDigits[m, 2, 2 ^ k], 0] - 1indmax[186, 3]With[{m = 123, k = 4},
BooleanMaxterms[Select[Range[0, 2 ^ k - 1], BitAnd[2^2 ^ k - 1 - #, m] == 0&], k] == BooleanFunction[m, k]]Use Subsets to enumerate all possible Boolean functions using BooleanMaxterms:
BooleanMaxterms[#, {a, b}]& /@ Subsets[Range[0, 2 ^ 2 - 1]]BooleanMinterms is related to BooleanMaxterms:
f = BooleanMinterms[{1, 3, 5}, 3]g = BooleanMaxterms[{1, 3, 5}, 3]TautologyQ[Equivalent[f[a, b, c], ¬g[¬a, ¬b, ¬c]]]Related Guides
History
Text
Wolfram Research (2008), BooleanMaxterms, Wolfram Language function, https://reference.wolfram.com/language/ref/BooleanMaxterms.html.
CMS
Wolfram Language. 2008. "BooleanMaxterms." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/BooleanMaxterms.html.
APA
Wolfram Language. (2008). BooleanMaxterms. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BooleanMaxterms.html
BibTeX
@misc{reference.wolfram_2026_booleanmaxterms, author="Wolfram Research", title="{BooleanMaxterms}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/BooleanMaxterms.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_booleanmaxterms, organization={Wolfram Research}, title={BooleanMaxterms}, year={2008}, url={https://reference.wolfram.com/language/ref/BooleanMaxterms.html}, note=[Accessed: 13-June-2026]}