executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
evaluate-boolean-expressionEvaluate and simplify Boolean expressions using truth tables, algebraic laws (De Morgan, distributive, absorption, idempotent, consensus), and Karnaugh maps for up to six variables. Use when you need to reduce a Boolean expression to its minimal sum-of-products or product-of-sums form, verify logical equivalence between two expressions, or prepare a minimiz…
Independent GitHub snapshot · Automated classification · Original documentation governs
減布爾式至最簡:解析入正規、造真值表、施代數律、行 Karnaugh 圖簡(至 6 變),驗簡式邏等於原。
A AND (B OR NOT C)、A * (B + C')、A & (B | ~C))轉入式為標內表:
* 為 AND、+ 為 OR、' 為 NOT、^ 為 XORX = X*(Y + Y') 以補缺變,展為諸 minterm 之和X = X + Y*Y' 展為諸 maxterm 之積## Normalized Expression
- **Variables**: [A, B, C, ...]
- **Variable count**: [n]
- **Original expression**: [as given]
- **Canonical SOP (minterms)**: Sigma m(i, j, k, ...)
- **Canonical POS (maxterms)**: Pi M(i, j, k, ...)
- **Don't-care set**: d(i, j, ...) [if any]
得:式轉正規 SOP/POS,諸 minterm/maxterm 明列,無關條件分。
敗:式有語法誤或算符先級歧→請明。標先級:NOT(最高)> AND > XOR > OR。變 >6→K 圖步須改用 Quine-McCluskey。
建全真值表以定函於諸入合之行:
X 代 0 或 1## Truth Table
| A | B | C | F |
|---|---|---|---|
| 0 | 0 | 0 | _ |
| 0 | 0 | 1 | _ |
| ... | ... | ... | ... |
得:全真值表 2^n 行,出匹正規式,無關正標。
敗:真值表與正規式不符→重察一步之展。常誤為展中誤施 De Morgan 律——各展獨驗。
以布爾代數恒等減之:
A + 0 = A、A * 1 = A、A + 1 = 1、A * 0 = 0A + A = A、A * A = AA + A' = 1、A * A' = 0A + A*B = A、A * (A + B) = A(A * B)' = A' + B'、(A + B)' = A' * B'A * (B + C) = A*B + A*C、A + B*C = (A + B) * (A + C)A*B + A'*C + B*C = A*B + A'*C(B*C 項冗)A*B' + A'*B = A ^ B 之模## Algebraic Simplification Trace
1. Original: [expression]
2. Apply [law name]: [result]
3. Apply [law name]: [result]
...
n. Final algebraic form: [simplified expression]
得:逐步減,各律有注,漸向簡式。踪為等之可驗證明。
敗:式不再簡而似非最簡→進四步(K 圖)。代數法不保全局最小——依律施序。
用 K 圖尋可證之最簡 SOP 或 POS(至 6 變):
## K-map Result
- **Prime implicants**: [list with covered minterms]
- **Essential prime implicants**: [list]
- **Minimal SOP**: [expression]
- **Minimal POS**: [expression, if requested]
- **Literal count**: [number of literals in minimal form]
得:最簡 SOP(且/或 POS),字最少,諸素蘊與本素蘊已錄。
敗:群歧(多最簡覆存)→列諸等最簡式。變 >6→換 Quine-McCluskey 表法或 Espresso 啟發並記法變。
確簡式與原式邏等:
## Equivalence Verification
- **Method**: [truth table comparison / algebraic proof / both]
- **Mismatched rows**: [none, or list row numbers]
- **Verdict**: [Equivalent / Not equivalent]
- **Final minimal expression**: [the verified result]
得:簡式於諸非無關入匹原。末最簡式明述。
敗:任行不匹→回 3-4 步查誤。常因:K 圖群誤(非矩或非 2 冪)、忘繞鄰、誤群 0 格。
A + B * C 為 (A + B) * C 而非 A + (B * C) 全改函design-logic-circuit — 映最簡式於閘級電路argumentation — 結構邏推,共形邏基