private List <WFF> IdentityDecompose(Identity i, Connective f) { if (f is Biconditional) { return(IdentityDecompose(i, (Biconditional)f)); } else if (f is Conditional) { return(IdentityDecompose(i, (Conditional)f)); } else if (f is Conjunction) { return(IdentityDecompose(i, (Conjunction)f)); } else if (f is Disjunction) { return(IdentityDecompose(i, (Disjunction)f)); } else if (f is Negation) { return(IdentityDecompose(i, (Negation)f)); } throw new NotImplementedException(f.GetType().ToString()); }
private Decomposition DecomposeWFF(Connective f) { if (f is Biconditional) { return(DecomposeWFF((Biconditional)f)); } else if (f is Conditional) { return(DecomposeWFF((Conditional)f)); } else if (f is Conjunction) { return(DecomposeWFF((Conjunction)f)); } else if (f is Disjunction) { return(DecomposeWFF((Disjunction)f)); } else if (f is Negation) { return(DecomposeWFF((Negation)f)); } throw new NotImplementedException(f.GetType().ToString()); }
public static int SortOrder(this Connective f) { if (f is Biconditional) { return(2); } else if (f is Conditional) { return(2); } else if (f is Conjunction) { return(1); } else if (f is Disjunction) { return(((Disjunction)f).arity); } else if (f is Negation) { return(SortOrder((Negation)f)); } throw new NotImplementedException(f.GetType().ToString()); }
public static bool Decomposable(this Connective f) { if (f is Biconditional) { return(true); } else if (f is Conditional) { return(true); } else if (f is Conjunction) { return(true); } else if (f is Disjunction) { return(true); } else if (f is Negation) { return(Decomposable((Negation)f)); } throw new NotImplementedException(f.GetType().ToString()); }