master > master: codego - nnf für implies, iff
This commit is contained in:
parent
6d774a6a4c
commit
3b1c190543
@ -64,9 +64,20 @@ func NNF(fml formulae.Formula) formulae.Formula {
|
|||||||
}
|
}
|
||||||
} else if fml.IsImplication() {
|
} else if fml.IsImplication() {
|
||||||
return formulae.FormulaPair{
|
return formulae.FormulaPair{
|
||||||
Pos: formulae.Implies(prevPos[0], prevPos[1]),
|
Pos: formulae.Disjunction2(prevNeg[0], prevPos[1]),
|
||||||
Neg: formulae.Conjunction2(prevPos[0], prevNeg[1]),
|
Neg: formulae.Conjunction2(prevPos[0], prevNeg[1]),
|
||||||
}
|
}
|
||||||
|
} else if fml.IsDoubleImplication() {
|
||||||
|
return formulae.FormulaPair{
|
||||||
|
Pos: formulae.Conjunction2(
|
||||||
|
formulae.Disjunction2(prevNeg[0], prevPos[1]),
|
||||||
|
formulae.Disjunction2(prevNeg[1], prevPos[0]),
|
||||||
|
),
|
||||||
|
Neg: formulae.Disjunction2(
|
||||||
|
formulae.Conjunction2(prevPos[0], prevNeg[1]),
|
||||||
|
formulae.Conjunction2(prevPos[1], prevNeg[0]),
|
||||||
|
),
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
panic("Could not evaluate expression!")
|
panic("Could not evaluate expression!")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user