tamarin_vs19

Untitled

Apr 26th, 2021 (edited)
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. skolem :: FolFormula -> Set Name -> (FolFormula, Set Name)
  2. skolem fm = skolem1 [] (pnf fm)
  3.  
  4. skolem1 :: [Name] -> FolFormula -> Set Name -> (FolFormula, Set Name)
  5. skolem1 quantVars (Forall x p) funcs = (Forall x newFm, nameSet)
  6.   where (newFm, nameSet) = skolem1 (x : quantVars) p funcs
  7. skolem1 quantVars (Exists x p) funcs = skolem1 quantVars newFm (Set.insert newName funcs)
  8.   where newName = variant "s" funcs
  9.         newFm = subst (Map.singleton x (Fn newName (map Var quantVars))) p
  10. skolem1 _ fm funcs = (fm, funcs)
  11.  
Add Comment
Please, Sign In to add comment