And 
例題
すべて開く すべて閉じる例 (4)
スコープ (5)
Andでは任意数の引数が使える:
And[x, y, z]Andには結合律である:
And[x, And[y, z]]//FullForm明示的なTrueまたはFalse引数を伴うAndは簡約される:
And[x, True, z]And[x, False, z]Andは引数を順序通りに評価し,評価の結果がFalseになったところで停止する:
And[Print[1];False, Print[2];True]And[Print[1];True, Print[2];True]x ≠ 0 && y == 1 / x /. x -> 0y == 1 / x && x ≠ 0 /. x -> 0z && y && y && xSimplify[%]TraditionalFormによる表示:
x && y && z//TraditionalFormアプリケーション (6)
PositiveNumberQ[x_] := NumberQ[x] && Head[x] =!= Complex && x > 0PositiveNumberQ[1]Andの引数を評価するとFalseになる場合,続く引数は評価されない:
PositiveNumberQ[I]Andにおける引数順は重要である.最後の2つの引数順序を逆にするとI>0が評価される:
PositiveNumberQ2[x_] := NumberQ[x] && x > 0 && Head[x] =!= ComplexPositiveNumberQ2[I]Refine[(a ^ b) ^ c, a ≥ 0 && Element[b, Reals]]方程式と不等式を結合する.Andは入力と出力の両方に使われる:
Reduce[x ^ 2 + y ^ 2 == 1 && x ≥ y, {x, y}]Andを使って条件を結合する:
RegionPlot[x ^ 2 + y ^ 2 < 1 && x + y > 0, {x, -2, 2}, {y, -2, 2}]RegionPlot3D[x ^ 2 + y ^ 2 + z ^ 2 < 1 && x ^ 2 + y ^ 2 < z ^ 2, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}]Andに基づいたセルオートマトン:
ArrayPlot[Boole[CellularAutomaton[{And@@#&, {}}, RandomChoice[{True, False}, 40], 20]]]Integrate[Boole[x ^ 2 + y ^ 2 < 1 && (x - 1) ^ 2 + y ^ 2 < 2], {x, -Infinity, Infinity}, {y, -Infinity, Infinity}]RegionPlot[x ^ 2 + y ^ 2 < 1 && (x - 1) ^ 2 + y ^ 2 < 2, {x, -1.5, 2.5}, {y, -2, 2}]特性と関係 (8)
2引数のAndの真理値表:
BooleanTable[{x, y, And[x, y]}, {x, y}]//Grid3引数のAnd:
BooleanTable[{x, y, z, And[x, y, z]}, {x, y, z}]//GridAnd[]1引数のAndは,値にかかわらず,評価された引数を返す:
And[2 + 2]p || q && r//FullFormBooleanConvertを使ってAndをOrについて展開する:
(a || b) && (c || d || e)BooleanConvert[%]ド・モルガン(De Morgan)の法則はAnd,Or,Notを関連付ける:
BooleanConvert[!(a && b)]BooleanConvert[!(a || b || c)]Boole[a]Boole[b] - Boole[a && b]Simplify[%]Min[Boole[a], Boole[b]] - Boole[a && b]Simplify[%]Threadを使ってリストに縫い込む:
{p, q} && {r, s}Thread[%]関連項目
BooleanConvert LogicalExpand BitAnd Nand Or Not Conjunction Intersection BooleanCountingFunction AllTrue
文字: \[And]
Function Repository: VennDiagram
テクニカルノート
関連するガイド
-
▪
- ブール計算 ▪
- 信頼性解析 ▪
- 言語の概要 ▪
- 論理演算とブール代数 ▪
- 判定式 ▪
- 離散数学 ▪
- 定理証明 ▪
- Wolfram言語のシンタックス ▪
- 手続き型プログラミング ▪
- 条件文
履歴
1988 で導入 (1.0) | 1996 で更新 (3.0)
テキスト
Wolfram Research (1988), And, Wolfram言語関数, https://reference.wolfram.com/language/ref/And.html (1996年に更新).
CMS
Wolfram Language. 1988. "And." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 1996. https://reference.wolfram.com/language/ref/And.html.
APA
Wolfram Language. (1988). And. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/And.html
BibTeX
@misc{reference.wolfram_2026_and, author="Wolfram Research", title="{And}", year="1996", howpublished="\url{https://reference.wolfram.com/language/ref/And.html}", note=[Accessed: 12-August-2026]}
BibLaTeX
@online{reference.wolfram_2026_and, organization={Wolfram Research}, title={And}, year={1996}, url={https://reference.wolfram.com/language/ref/And.html}, note=[Accessed: 12-August-2026]}