Some decidable subsets of first-order logic.
Function or value | Description | ||
|
Example
Evaluates to true .
Example
Throws System.Exception: Not decidable .
|
Function or value | Description | ||
|
Example
Evaluates to `(exists y. ~P(y)) \/ (forall x. P(x))` .
|
||
|
|||
|
The intention is to transform an existential formula of the form \(\exists x.\ p_1 \land \cdots \land p_n \) in \((\exists x.\ p_i \land \cdots \land p_j) \land (p_k \land \cdots \land p_l)\) where the \(p_i \land \cdots \land p_j\) are the those with \(x\) free and \(p_k \land \cdots \land p_l)\) are the other.
Example
Evaluates to `(exists x. P(x) /\ T(y) /\ R(x,y)) /\ Q(y) /\ (S(z,w) ==> Q(i))` .
|
||
Example
Evaluates to true .
Example
Throws System.Exception: Not decidable .
|
Function or value | Description | ||
|
|||
|
|||
|
Example
Evaluates to "all P are S" .
Example
Throws System.ArgumentException: anglicize_premiss: not a syllogism premiss (Parameter 'fm') .
|
||
|
Example
val x: obj
Evaluates to "If all M are P and all S are M, then all S are P" .
Example
Throws System.ArgumentException: anglicize_syllogism: not a syllogism (Parameter 'fm') .
|
||
|
Example
Evaluates to `forall x. P(x) ==> S(x)` .
|
||
|
Example
Evaluates to `forall x. P(x) ==> ~S(x)` .
|
||
|
Example
Evaluates to `exists x. P(x) /\ S(x)` .
|
||
|
Example
Evaluates to `exists x. P(x) /\ ~S(x)` .
|
Function or value | Description | ||
Full Usage:
alldepmappings dom ran
Parameters:
('a * 'b) list
-
The input list of function name-arity pairs.
ran : 'b -> 'c list
-
The list of all possible functions in the domain.
Returns: ('a -> 'c) list
All interpretations of the input function symbols, i.e. all mappings
from the function symbols in dom to the domain functions in
ran .
|
Example
val dom: int list
val functionSymbols: (string * int) list
val functions: obj
Multiple items
module List from Microsoft.FSharp.Collections -------------------- type List<'T> = | op_Nil | op_ColonColon of Head: 'T * Tail: 'T list interface IReadOnlyList<'T> interface IReadOnlyCollection<'T> interface IEnumerable interface IEnumerable<'T> member GetReverseIndex: rank: int * offset: int -> int member GetSlice: startIndex: int option * endIndex: int option -> 'T list static member Cons: head: 'T * tail: 'T list -> 'T list member Head: 'T member IsEmpty: bool member Item: index: int -> 'T with get ... val mapi: mapping: (int -> 'T -> 'U) -> list: 'T list -> 'U list
val i: int
val f: (string -> obj -> obj)
val map: mapping: ('T -> 'U) -> list: 'T list -> 'U list
val args: obj
val take: count: int -> list: 'T list -> 'T list
Evaluates to
Multiple items
val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = int type 'T list = List<'T>
|
||
Full Usage:
allfunctions dom n
Parameters:
'a list
-
The input domain.
n : int
-
The input arity.
Returns: ('a list -> 'a) list
All the functions from dom to dom with arity n .
|
Example
val dom: int list
Multiple items
module List from Microsoft.FSharp.Collections -------------------- type List<'T> = | op_Nil | op_ColonColon of Head: 'T * Tail: 'T list interface IReadOnlyList<'T> interface IReadOnlyCollection<'T> interface IEnumerable interface IEnumerable<'T> member GetReverseIndex: rank: int * offset: int -> int member GetSlice: startIndex: int option * endIndex: int option -> 'T list static member Cons: head: 'T * tail: 'T list -> 'T list member Head: 'T member IsEmpty: bool member Item: index: int -> 'T with get ... val mapi: mapping: (int -> 'T -> 'U) -> list: 'T list -> 'U list
val i: int
val f: (obj -> obj)
val map: mapping: ('T -> 'U) -> list: 'T list -> 'U list
val args: obj
val take: count: int -> list: 'T list -> 'T list
Evaluates to
Multiple items
val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = int type 'T list = List<'T>
|
||
Full Usage:
allmappings dom ran
Parameters:
'a list
-
The input domain.
ran : 'b list
-
The input range.
Returns: ('a -> 'b) list
All possible functions out of the domain dom into range
ran , and undefined outside dom .
|
Example
val dom: int list
val ran: int list
Multiple items
module List from Microsoft.FSharp.Collections -------------------- type List<'T> = | op_Nil | op_ColonColon of Head: 'T * Tail: 'T list interface IReadOnlyList<'T> interface IReadOnlyCollection<'T> interface IEnumerable interface IEnumerable<'T> member GetReverseIndex: rank: int * offset: int -> int member GetSlice: startIndex: int option * endIndex: int option -> 'T list static member Cons: head: 'T * tail: 'T list -> 'T list member Head: 'T member IsEmpty: bool member Item: index: int -> 'T with get ... val mapi: mapping: (int -> 'T -> 'U) -> list: 'T list -> 'U list
val i: int
val f: (int -> obj)
val map: mapping: ('T -> 'U) -> list: 'T list -> 'U list
Evaluates to
|
||
Full Usage:
allpredicates dom n
Parameters:
'a list
-
The input domain.
n : int
-
The input arity.
Returns: ('a list -> bool) list
All the possibile predicates in dom with arity n .
|
Example
val dom: int list
Multiple items
module List from Microsoft.FSharp.Collections -------------------- type List<'T> = | op_Nil | op_ColonColon of Head: 'T * Tail: 'T list interface IReadOnlyList<'T> interface IReadOnlyCollection<'T> interface IEnumerable interface IEnumerable<'T> member GetReverseIndex: rank: int * offset: int -> int member GetSlice: startIndex: int option * endIndex: int option -> 'T list static member Cons: head: 'T * tail: 'T list -> 'T list member Head: 'T member IsEmpty: bool member Item: index: int -> 'T with get ... val mapi: mapping: (int -> 'T -> 'U) -> list: 'T list -> 'U list
val i: int
val f: (obj -> obj)
val map: mapping: ('T -> 'U) -> list: 'T list -> 'U list
val args: obj
val take: count: int -> list: 'T list -> 'T list
Evaluates to
Multiple items
val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = int type 'T list = List<'T>
type bool = System.Boolean
|
||
Full Usage:
alltuples n l
Parameters:
int
-
The size of the resulting tuples.
l : 'a list
-
The input list.
Returns: 'a list list
All tuples of size n with members chosen from the list l .
|
Example
Evaluates to
|
||
|
Example
Evaluates to true .
|
||
|
NoteTermination is guaranteed only for formulas with the finite model property. Example
Evaluates to true .
Example
Evaluates to false .
Example
Crashes.
|
||
|
Example
Evaluates to true .
|
||
|
Example
Multiple items
module List from Microsoft.FSharp.Collections -------------------- type List<'T> = | op_Nil | op_ColonColon of Head: 'T * Tail: 'T list interface IReadOnlyList<'T> interface IReadOnlyCollection<'T> interface IEnumerable interface IEnumerable<'T> member GetReverseIndex: rank: int * offset: int -> int member GetSlice: startIndex: int option * endIndex: int option -> 'T list static member Cons: head: 'T * tail: 'T list -> 'T list member Head: 'T member IsEmpty: bool member Item: index: int -> 'T with get ... val map: mapping: ('T -> 'U) -> list: 'T list -> 'U list
val inst: obj
val n: obj
val k: obj
Evaluates to [([("_0", ``c_x``); ("_1", ``c_x``)], 0, 2)] .
|
||
|
Example
val inst: obj
val n: obj
val k: obj
Evaluates to ([("_0", ``_1``); ("_1", ``_2``)], 0, 3) .
|