Propositional Logic
This crate offers tools for defining and manipulating logical propositions using symbols and connectives like and, or, and implies. It simplifies the creation of logical expressions and the evaluation of their truth values within defined logical contexts.
Useful for educational purposes, AI projects, and any application requiring formal logical reasoning.
Examples
use *;
let rain = symbol!;
let cloud = symbol!;
let world = and!;
println!;
//-> It is cloudy? Some(true)
Source: wikipedia.org
use *;
let rain = symbol!;
let hagrid = symbol!;
let dumbledore = symbol!;
let knowledge = and!;
println!;
//-> It is raining? Some(true)
Source: CS50
Acknowledgments
Based on: CS50’s Introduction to Artificial Intelligence with Python.