AngouriMath
Conjunction(AngouriMath.Entity,AngouriMath.Entity)
Method (no overloads)
Summary
https://en.wikipedia.org/wiki/Logical_conjunction
Parameter "a"
Left argument node of which Conjunction function will be taken
Parameter "b"
Right argument node of which Conjunction disjunction function will be taken
Returns
And node
Example
using AngouriMath;
using System;
using static AngouriMath.MathS;
var (x, y) = Var("x", "y");
var myXor = Disjunction(Conjunction(x, Negation(y)), Conjunction(y, Negation(x)));
Console.WriteLine(myXor);
Console.WriteLine(MathS.Boolean.BuildTruthTable(myXor, x, y).ToString(multilineFormat: true));
Console.WriteLine("------------------");
var expr = ExclusiveDisjunction(Implication(x, y), Implication(y, x));
Console.WriteLine(expr);
Console.WriteLine("------------------");
var expr2 = Conjunction(x, Conjunction(x, y));
Console.WriteLine(expr2);
Console.WriteLine(expr2.Simplify());
Prints
x and not y or y and not x
Matrix[4 x 3]
False False False
False True True
True False True
True True False
------------------
(x implies y) xor (y implies x)
------------------
x and x and y
x and y
Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 1534 pages online