-
Notifications
You must be signed in to change notification settings - Fork 2
Calculate a formula in tableaux method
George Plotnikov edited this page Feb 7, 2022
·
4 revisions
let frm = Formula.Impl(Conj(Var "P", Var "Q"), Bic(Var "R", Neg(Var "S")))
let formulaCalcList =
BuildFormulaCalcList frm
|> List.sortBy (fun f -> CalcFormulaDepth f)
let formulaInterpritations = BuildAllFormulasInterpritations formulaCalcList
let result = VerboseTableuxCalculus formulaCalcList formulaInterpritations
To build up a calculus for a formula in the tableaux method there is necessary to perform several steps:
- Define a formula
- Get a list of calculus from the formula (see this function)
- Build all formulas interpretations (see this function)
- Calculate all interpretations of the formula and show it in a table view.
Input:
Formula.Impl(Conj(Var "P", Var "Q"), Bic(Var "R", Neg(Var "S")))
Output:
P Q R S ~S (P && Q) (R <=> ~S) ((P && Q) -> (R <=> ~S))
True True True True False True False False
True True True False True True True True
True True False True False True True True
True True False False True True False False
True False True True False False False True
True False True False True False True True
True False False True False False True True
True False False False True False False True
False True True True False False False True
False True True False True False True True
False True False True False False True True
False True False False True False False True
False False True True False False False True
False False True False True False True True
False False False True False False True True
False False False False True False False True
let frm = Formula.Impl(Conj(Var "P", Var "Q"), Bic(Var "R", Neg(Var "S")))
let formulaCalcList =
BuildFormulaCalcList frm
|> List.sortBy (fun f -> CalcFormulaDepth f)
let formulaInterpritations = BuildAllFormulasInterpritations formulaCalcList
let result = VerboseTableuxCalculus formulaCalcList formulaInterpritations
Functions