AngouriMath

Navigation

← Back to list of members

Implication​(AngouriMath.​Entity,​AngouriMath.​Entity)

 Method (no overloads)

Summary

https://en.wikipedia.org/wiki/Material_implication_(rule_of_inference)

Parameter "assumption"

The assumption node

Parameter "conclusion"

The conclusion node

Returns

Implies 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