logic,semantics,semantic-web,first-order-logic

To state that an object has a certain property you would use a single place predicate. For example, to state that x is a film you could write Film(x). If you want to attribute some value to an object you can use two (or more) place predicate. Using your example...

Here is the solution to this problem ( I posted the question in mathematical notation in the math satck exchange here and got the solution ) I am converting it to Alloy. sig State {event : State} sig QArrow{ref: State -> State} fact { all q:univ | (q in QArrow...

Maybe the missing key is that the goal: forall n, P n -> (Some goal) is to be read as: forall n, (P n -> (Some goal)) and not as: (forall n, P n) -> (Some goal) That is, the goal you are given just gives you an arbitrary n...

logic,proof,logic-programming,first-order-logic

My guess would be model theory since the fixpoint semantics of a logic program is its model. However, we know that |= coincides with |- for logic programs, so the semantics based on proving (=resolution) coincide with the semantics based on the fixed points (models). The preceding discussion is valid...

groovy,closures,first-order-logic

Something along these lines works: updated with closures to avoid global state: def ifx( outerCondition, outerBlock ) { boolean matched = false def realIfx realIfx = { condition, block -> if (condition) { matched = true block() } [ifx: realIfx, elsex: { elseBlock -> if(!matched) elseBlock() }] } realIfx outerCondition,...

haskell,ghci,first-order-logic

When you declare an algebraic data type, the right-hand side of the declaration is a "list" of possible constructors for this type. However, the constructors are just functions, meaning that they are used in prefix notation. You try to use the e.g. And constructor in an infix way which does...