Misplaced Pages

SETL

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.

SETL (SET Language) is a very high-level programming language based on the mathematical theory of sets . It was originally developed at the New York University (NYU) Courant Institute of Mathematical Sciences in the late 1960s, by a group containing (Jack) Jacob T. Schwartz , R.B.K. Dewar, and E. Schonberg. Schwartz is credited with designing the language.

#255744

41-583: SETL provides two basic aggregate data types: (unordered) sets , and tuples . The elements of sets and tuples can be of any arbitrary type, including sets and tuples themselves, except the undefined value om (sometimes capitalized: OM ). Maps are provided as sets of pairs (i.e., tuples of length 2) and can have arbitrary domain and range types. Primitive operations in SETL include set membership, union, intersection, and power set construction, among others. SETL provides quantified boolean expressions constructed using

82-414: A i = a 1 ∧ a 2 ∧ … a n − 1 ∧ a n {\displaystyle \bigwedge _{i=1}^{n}a_{i}=a_{1}\wedge a_{2}\wedge \ldots a_{n-1}\wedge a_{n}} In classical logic , logical conjunction is an operation on two logical values , typically the values of two propositions , that produces

123-416: A logical conditional . For example, For all composite numbers n , one has 2· n > 2 + n is logically equivalent to For all natural numbers n , if n is composite, then 2· n > 2 + n . Here the "if ... then" construction indicates the logical conditional. In symbolic logic , the universal quantifier symbol ∀ {\displaystyle \forall } (a turned " A " in

164-412: A predicate can be satisfied by every member of a domain of discourse . In other words, it is the predication of a property or relation to every member of the domain. It asserts that a predicate within the scope of a universal quantifier is true of every value of a predicate variable . It is usually denoted by the turned A (∀) logical operator symbol , which, when used together with

205-430: A sans-serif font, Unicode U+2200) is used to indicate universal quantification. It was first used in this way by Gerhard Gentzen in 1935, by analogy with Giuseppe Peano 's ∃ {\displaystyle \exists } (turned E) notation for existential quantification and the later use of Peano's notation by Bertrand Russell . For example, if P ( n ) is the predicate "2· n > 2 + n " and N

246-424: A formula φ is the formula with no free variables obtained by adding a universal quantifier for every free variable in φ. For example, the universal closure of is In category theory and the theory of elementary topoi , the universal quantifier can be understood as the right adjoint of a functor between power sets , the inverse image functor of a function between sets; likewise, the existential quantifier

287-430: A living person x who is not married", or: It is erroneous to confuse "all persons are not married" (i.e. "there exists no person who is married") with "not all persons are married" (i.e. "there exists a person who is not married"): The universal (and existential) quantifier moves unchanged across the logical connectives ∧ , ∨ , → , and ↚ , as long as the other operand is not affected; that is: Conversely, for

328-406: A predicate variable, is called a universal quantifier (" ∀ x ", " ∀( x ) ", or sometimes by " ( x ) " alone). Universal quantification is distinct from existential quantification ("there exists"), which only asserts that the property or relation holds for at least one member of the domain. Quantification in general is covered in the article on quantification (logic) . The universal quantifier

369-412: A value of true if and only if (also known as iff) both of its operands are true. The conjunctive identity is true, which is to say that AND-ing an expression with true will never change the value of the expression. In keeping with the concept of vacuous truth , when conjunction is defined as an operator or function of arbitrary arity , the empty conjunction (AND-ing over an empty set of operands)

410-428: Is a classically valid , simple argument form . The argument form has two premises, A {\displaystyle A} and B {\displaystyle B} . Intuitively, it permits the inference of their conjunction. or in logical operator notation, where \vdash expresses provability: Here is an example of an argument that fits the form conjunction introduction : Conjunction elimination

451-426: Is a functor that, for each subset S ⊂ X {\displaystyle S\subset X} , gives the subset ∃ f S ⊂ Y {\displaystyle \exists _{f}S\subset Y} given by those y {\displaystyle y} in the image of S {\displaystyle S} under f {\displaystyle f} . Similarly,

SECTION 10

#1732876935256

492-424: Is a single statement using universal quantification. This statement can be said to be more precise than the original one. While the "etc." informally includes natural numbers , and nothing more, this was not rigorously given. In the universal quantification, on the other hand, the natural numbers are mentioned explicitly. This particular example is true , because any natural number could be substituted for n and

533-503: Is another classically valid , simple argument form . Intuitively, it permits the inference from any conjunction of either element of that conjunction. ...or alternatively, In logical operator notation: ...or alternatively, A conjunction A ∧ B {\displaystyle A\land B} is proven false by establishing either ¬ A {\displaystyle \neg A} or ¬ B {\displaystyle \neg B} . In terms of

574-511: Is commonly represented by an infix operator, usually as a keyword such as " AND ", an algebraic multiplication, or the ampersand symbol & (sometimes doubled as in && ). Many languages also provide short-circuit control structures corresponding to logical conjunction. Logical conjunction is often used for bitwise operations, where 0 corresponds to false and 1 to true: The operation can also be applied to two binary words viewed as bitstrings of equal length, by taking

615-406: Is contained in S {\displaystyle S} . The more familiar form of the quantifiers as used in first-order logic is obtained by taking the function f to be the unique function ! : X → 1 {\displaystyle !:X\to 1} so that P ( 1 ) = { T , F } {\displaystyle {\mathcal {P}}(1)=\{T,F\}}

656-570: Is encoded as U+2200 ∀ FOR ALL in Unicode , and as \forall in LaTeX and related formula editors. Suppose it is given that 2·0 = 0 + 0, and 2·1 = 1 + 1, and 2·2 = 2 + 2 , etc. This would seem to be a logical conjunction because of the repeated use of "and". However, the "etc." cannot be interpreted as a conjunction in formal logic . Instead, the statement must be rephrased: For all natural numbers n , one has 2· n = n + n . This

697-423: Is instead a specific element of the universe of discourse, then P( c ) only implies an existential quantification of the propositional function. By convention, the formula ∀ x ∈ ∅ P ( x ) {\displaystyle \forall {x}{\in }\emptyset \,P(x)} is always true, regardless of the formula P ( x ); see vacuous truth . The universal closure of

738-465: Is not the case that, given any living person x , that person is married or, symbolically: If the function P ( x ) is not true for every element of X , then there must be at least one element for which the statement is false. That is, the negation of ∀ x ∈ X P ( x ) {\displaystyle \forall x\in X\,P(x)} is logically equivalent to "There exists

779-440: Is often defined as having the result true. The truth table of A ∧ B {\displaystyle A\land B} : In systems where logical conjunction is not a primitive, it may be defined as It can be checked by the following truth table (compare the last two columns): or It can be checked by the following truth table (compare the last two columns): As a rule of inference, conjunction introduction

820-408: Is represented as where c is a completely arbitrary element of the universe of discourse. Universal generalization concludes the propositional function must be universally true if it is true for any arbitrary element of the universe of discourse. Symbolically, for an arbitrary c , The element  c must be completely arbitrary; else, the logic does not follow: if c is not arbitrary, and

861-628: Is the left adjoint . For a set X {\displaystyle X} , let P X {\displaystyle {\mathcal {P}}X} denote its powerset . For any function f : X → Y {\displaystyle f:X\to Y} between sets X {\displaystyle X} and Y {\displaystyle Y} , there is an inverse image functor f ∗ : P Y → P X {\displaystyle f^{*}:{\mathcal {P}}Y\to {\mathcal {P}}X} between powersets, that takes subsets of

SECTION 20

#1732876935256

902-482: Is the set of natural numbers, then is the (false) statement Similarly, if Q ( n ) is the predicate " n is composite", then is the (true) statement Several variations in the notation for quantification (which apply to all forms) can be found in the Quantifier article. The negation of a universally quantified function is obtained by changing the universal quantifier into an existential quantifier and negating

943-515: Is the truth-functional operator of conjunction or logical conjunction . The logical connective of this operator is typically represented as ∧ {\displaystyle \wedge } or & {\displaystyle \&} or K {\displaystyle K} (prefix) or × {\displaystyle \times } or ⋅ {\displaystyle \cdot } in which ∧ {\displaystyle \wedge }

984-400: Is the most modern and widely used. The and of a set of operands is true if and only if all of its operands are true, i.e., A ∧ B {\displaystyle A\land B} is true if and only if A {\displaystyle A} is true and B {\displaystyle B} is true. An operand of a conjunction is a conjunct . Beyond logic,

1025-413: Is the two-element set holding the values true and false, a subset S is that subset for which the predicate S ( x ) {\displaystyle S(x)} holds, and which is true if S {\displaystyle S} is not empty, and Logical conjunction In logic , mathematics and linguistics , and ( ∧ {\displaystyle \wedge } )

1066-415: The universal and existential quantifiers of first-order predicate logic . SETL provides several iterators to produce a variety of loops over aggregate data structures. Print all prime numbers from 2 to N : The notation is similar to list comprehension . A factorial procedure definition: A more conventional SETL expression for factorial (n > 0): Implementations of SETL were available on

1107-449: The Ada language. Interactive SET Language (ISETL) is a variant of SETL used in discrete mathematics . GNU SETL is a command-line utility that extends and implements SETL. Universal quantifier In mathematical logic , a universal quantification is a type of quantifier , a logical constant which is interpreted as " given any ", " for all ", or " for any ". It expresses that

1148-566: The DEC VAX , IBM/370 , SUN workstation and APOLLO . In the 1970s, SETL was ported to the BESM-6 , ES EVM and other Russian computer systems. SETL was used for an early implementation of the programming language Ada , named the NYU Ada/ED translator. This later became the first validated Ada implementation, certified on April 11, 1983. According to Guido van Rossum , " Python 's predecessor, ABC ,

1189-421: The bitwise AND of each pair of bits at corresponding positions. For example: This can be used to select part of a bitstring using a bit mask . For example, 1001 1 101 AND 0000 1 000  =  0000 1 000 extracts the fourth bit of an 8-bit bitstring. In computer networking , bit masks are used to derive the network address of a subnet within an existing network from a given IP address , by ANDing

1230-504: The codomain of f back to subsets of its domain. The left adjoint of this functor is the existential quantifier ∃ f {\displaystyle \exists _{f}} and the right adjoint is the universal quantifier ∀ f {\displaystyle \forall _{f}} . That is, ∃ f : P X → P Y {\displaystyle \exists _{f}\colon {\mathcal {P}}X\to {\mathcal {P}}Y}

1271-673: The conjunction false: In other words, a conjunction can actually be proven false just by knowing about the relation of its conjuncts, and not necessary about their truth values. This formula can be seen as a special case of when C {\displaystyle C} is a false proposition. Either of the above are constructively valid proofs by contradiction. commutativity : yes associativity : yes distributivity : with various operations, especially with or with exclusive or : with material nonimplication : with itself: idempotency : yes monotonicity : yes truth-preserving: yes When all inputs are true,

SETL - Misplaced Pages Continue

1312-444: The logical connectives ↑ , ↓ , ↛ , and ← , the quantifiers flip: A rule of inference is a rule justifying a logical step from hypothesis to conclusion. There are several rules of inference which utilize the universal quantifier. Universal instantiation concludes that, if the propositional function is known to be universally true, then it must be true for any arbitrary element of the universe of discourse. Symbolically, this

1353-417: The object language, this reads This formula can be seen as a special case of when C {\displaystyle C} is a false proposition. If A {\displaystyle A} implies ¬ B {\displaystyle \neg B} , then both ¬ A {\displaystyle \neg A} as well as A {\displaystyle A} prove

1394-457: The operator is K {\displaystyle K} , for Polish koniunkcja . In mathematics, the conjunction of an arbitrary number of elements a 1 , … , a n {\displaystyle a_{1},\ldots ,a_{n}} can be denoted as an iterated binary operation using a "big wedge" ⋀ (Unicode U+22C0 ⋀ N-ARY LOGICAL AND ): ⋀ i = 1 n

1435-430: The other hand, for all composite numbers n , one has 2· n > 2 + n is true, because none of the counterexamples are composite numbers. This indicates the importance of the domain of discourse , which specifies which values n can take. In particular, note that if the domain of discourse is restricted to consist only of those objects that satisfy a certain predicate, then for universal quantification this requires

1476-401: The output is true. falsehood-preserving: yes When all inputs are false, the output is false. Walsh spectrum : (1,-1,-1,1) Non linearity : 1 (the function is bent ) If using binary values for true (1) and false (0), then logical conjunction works exactly like normal arithmetic multiplication . In high-level computer programming and digital electronics , logical conjunction

1517-412: The quantified formula. That is, where ¬ {\displaystyle \lnot } denotes negation . For example, if P ( x ) is the propositional function " x is married", then, for the set X of all living human beings, the universal quantification Given any living person x , that person is married is written This statement is false. Truthfully, it is stated that It

1558-417: The statement "2· n = n + n " would be true. In contrast, For all natural numbers n , one has 2· n > 2 + n is false , because if n is substituted with, for instance, 1, the statement "2·1 > 2 + 1" is false. It is immaterial that "2· n > 2 + n " is true for most natural numbers n : even the existence of a single counterexample is enough to prove the universal quantification false. On

1599-613: The term "conjunction" also refers to similar concepts in other fields: And is usually denoted by an infix operator: in mathematics and logic, it is denoted by a "wedge" ∧ {\displaystyle \wedge } (Unicode U+2227 ∧ LOGICAL AND ), & {\displaystyle \&} or × {\displaystyle \times } ; in electronics, ⋅ {\displaystyle \cdot } ; and in programming languages, & , && , or and . In Jan Łukasiewicz 's prefix notation for logic ,

1640-564: The universal quantifier ∀ f : P X → P Y {\displaystyle \forall _{f}\colon {\mathcal {P}}X\to {\mathcal {P}}Y} is a functor that, for each subset S ⊂ X {\displaystyle S\subset X} , gives the subset ∀ f S ⊂ Y {\displaystyle \forall _{f}S\subset Y} given by those y {\displaystyle y} whose preimage under f {\displaystyle f}

1681-509: Was inspired by SETL -- Lambert Meertens spent a year with the SETL group at NYU before coming up with the final ABC design!" SET Language 2 (SETL2), a backward incompatible descendant of SETL, was created by Kirk Snyder of the Courant Institute of Mathematical Sciences at New York University in the late 1980s. Like its predecessor, it is based on the theory and notation of finite sets, but has also been influenced in syntax and style by

SETL - Misplaced Pages Continue

#255744