Learn

Learning preferences

Make learning more comfortable. Changes apply immediately.

Enlarges page content, including diagrams and their labels. You can also use your browser’s zoom.

Choose the colours that are easiest for you to distinguish. Applies to lesson diagrams and lab plots. Labels, shapes, hatching and line patterns also distinguish meanings. Source photographs and raw image brightness stay unchanged; mask-only views are available for image overlays.

ExampleComparisonSample link

Saved in this browser on this device. Preferences are separate from progress backups.

Lesson 1 of 2

Specify membership and construct language expressions

Translate nested-set requirements into predicates and justify language constructions through word membership and complete split cases.

Loading your saved responses…

Try the optional starting-point checks and targeted refreshers. You can continue directly into this lesson.

Try

Three resources are named 1, 2 and 3. Let U be this universe, let A contain resources 1 and 3, and let ℱ contain two sets: B₁ contains 1 and 2, while B₂ contains 2 and 3. A request says: “Every set in ℱ contains an available resource from A.” Does that require one resource that works for both sets?

Set in the collectionMembersMembers also in AA possible witness
B₁1, 211
B₂2, 333

The request is satisfied: choose 1 for B₁ and 3 for B₂. But no member of A belongs to both sets. The common member 2 is unavailable. A witness can depend on the set unless the specification places its existential choice outside that set’s quantifier.

Predict

Write the request using membership instead of intersection notation:

For every B in P(U), if B∈ℱ, then there exists x∈U with x∈A and x∈B.

Here P(U), the power set, is the set of all subsets of U. B is a subset; x is an object. The formula checks all eligible B but only makes a demand on members of ℱ. Predict what changes if you instead write “There exists x∈U with x∈A, and for every B∈P(U), B∈ℱ implies x∈B.” This version requires one uniform witness, and it is false in the example.

Now remove both sets from ℱ. The first specification is vacuously true: there is no set that violates it. The second still demands an available object x, so it holds exactly when A is nonempty. If U and therefore A are empty, that existential assertion is false. Empty-domain cases reveal the difference in quantifier order particularly clearly.

Experiment

Switch from resources to finite words. Fix the alphabet Σ consisting of the symbols a and b. A word is a finite sequence of these symbols, including the empty sequence ε. A language is any set of such words. The notation Σ∗ means the universe of all finite words over Σ, not a single infinite word.

Let L contain ε and b, and let M contain a and ba. Their concatenation LM consists of words uv with u∈L and v∈M. The word ba has three possible split positions. Check all three rather than assuming a unique decomposition.

A successful split is an existential witnessThe splits of ba are empty word followed by ba, b followed by a, and ba followed by empty word. The first two have their left word in L and right word in M; the final split fails.ε | basuccessfulb | asuccessfulba | εfailsTwo witnesses, one member word ba
For a word of length two, split positions are 0, 1 and 2. Neither successful split creates an extra copy of ba: languages are sets.

Multiply out all four choices of u and v. You obtain LM containing a, ba and bba. Two choices produce ba, so there are three distinct words rather than four. Reverse the order and compute ML: it contains a, ab, ba and bab. Concatenation is generally not commutative.

The live experiment below uses its own displayed language pairs. Predict membership before selecting a word, then explain which row supplies a witness or why every cut fails.

Find a prefix and suffix that both qualify

Alphabet Σ = {a, b}. A word belongs to LR when it can be split into a prefix in L and a suffix in R. Choose a word, predict a successful cut, then check every row. Changing a control updates this complete finite check immediately.

ε is one word with zero symbols. The language ∅ contains no words, including ε. By contrast, {ε} contains exactly one word. Σ* contains every finite word over a and b, including ε; it is not limited to this selector.

Current languages: L = {a}; R = {ε, b}. Cut k puts the first k symbols in the prefix. For the word ab, length 2, there are exactly 3 cuts, including before all symbols and after all symbols.

Every split of ab; prefix followed by suffix reproduces the selected word
Cut kPrefixSuffixPrefix in L?Suffix in R?Accepted witness?
0εabNoNoNo
1abYesYesYes — both qualify
2abεNoYesNo

1 accepted split out of 3. ab belongs to LR.

A single accepted row proves membership. If none qualify, this word is excluded because every possible cut was checked. This is exact finite enumeration, not sampling. The check decides only the selected word; inspecting these eight choices does not by itself prove a statement about all words.

Try ab with the first language pair and then the swapped pair. Explain which cut disappears. Next choose ε and account for its single cut (ε, ε), even when neither side qualifies. With L = ∅, identify the failed column in every row.

Temporary exploration only: no answers are stored and no completion is awarded.

Understand

Nested sets need declared domains. If ℋ is a collection of collections of subsets of U, then an element ℱ of ℋ belongs to P(P(U)); an element B of ℱ belongs to P(U); and an element x of B belongs to U. The claim that x belongs to every set in some collection of ℋ can be written

∃ℱ∈P(P(U)): ℱ∈ℋ and ∀B∈P(U), (B∈ℱ implies x∈B).

The existential witness is a collection, not an object. If ℋ has no members the claim fails. If ℋ contains an empty collection, that collection satisfies the universal condition for every eligible x. A membership-only formula makes these levels visible without hiding them inside a large union or intersection.

To prove equality of sets, fix an arbitrary eligible element and give reversible conditions. For example, x belongs to A∖(B∪C) if and only if x∈A and not(x∈B or x∈C). By the meaning of NOT and OR, this is equivalent to x∈A, x∉B and x∉C, which is equivalent to x∈(A∖B)∖C. Every step is an “if and only if,” so this proves both inclusions. A few checked members would not prove the identity for arbitrary sets.

For languages over our fixed alphabet, union means inclusive OR of membership. Complement ¬L means the words in Σ∗ that are not in L. If the alphabet is enlarged to include c, complement changes: c becomes an eligible word. Always state the universe before taking a complement.

Concatenation has a different membership rule: w∈LM if and only if there exist words u,v in Σ∗ with w=uv, u∈L and v∈M. For a word of length n, this can be checked by its n+1 split positions, including the two end splits. A positive answer needs one successful split. A negative answer needs all splits to fail. It is therefore not generally correct to push complement through concatenation as if it were a pointwise Boolean operation.

The empty language ∅ has no words. The singleton language containing ε has one word. For every L, concatenating with ∅ gives ∅ because no pair of factors can be chosen. Concatenating with the singleton empty word gives L, since uε=εu=u. In particular ε is a legitimate factor, not an instruction to omit a case.

Now impose a restricted expression vocabulary: the only primitives are the singleton languages {a}, {b} and ∅. The only constructors are complement, union and concatenation. A semantic description of a language does not automatically supply an expression in this vocabulary.

Define W=¬∅ and C={a}∪{b}. Then W denotes Σ∗ and C denotes exactly the one-symbol words. Every word in WC is nonempty because its final factor has length one. Conversely, every nonempty word has a last symbol in Σ and a preceding prefix in Σ∗, so it belongs to WC. Thus ¬(WC) denotes exactly the singleton language containing ε. Both directions matter: showing that ε is excluded from WC alone would not exclude other words from its complement.

No repetition constructor was used. The star in the semantic name Σ∗ describes the ambient word universe; W obtains this universe using complement of ∅. An expression with an unlisted operation would violate the restriction even if it denoted the desired language.

Apply

Using only the allowed vocabulary, construct words that start with b and end with a. One expression is {b}W{a}. Every generated word has those endpoint symbols. Conversely, a word with those endpoints has length at least two, so its middle portion is a word in W; a middle portion of length zero is permitted. This proves the construction in both directions.

A proposed shortcut for words that do not end in a is (¬W)(¬{a}). It is empty because ¬W is empty. The correct expression is ¬(W{a}): complement applies to the entire concatenation. It includes ε, which has no last symbol and therefore does not end in a. Check a, b and ba to test the repaired expression, then justify it for every word by the final-symbol split.

Return to the resource example and change A to contain only 2. Now 2 is a uniform witness for both B₁ and B₂. Identify exactly which existential assertion became true. The exercise is about witness dependence, not a claim that existential and universal quantifiers may always be swapped.

Continue

In the written tasks, declare the domain of every object, set and collection. Use an iff chain for equality, and list every split when rejecting finite-word membership. For restricted expressions, give both a syntactically permitted construction and a proof of its language. Constructing some useful languages does not establish that every language is expressible; that is a different question requiring a limitation argument.

Apply · explain · revise

Practice and reasoning

Drafts save locally as you type. Reveal worked solutions when useful; the site remembers that exposure. Automatic matches check the requested answer, while written arguments require review against the rubric.

Let U be a set of objects, A⊆U, and ℋ⊆P(P(U)), so each member ℱ of ℋ is a collection of subsets of U. Using only membership, logical connectives and explicitly typed quantifiers (no union/intersection/subset symbols inside your formulas), express: (i) every set belonging to some collection in ℋ contains every object of A; (ii) an object x∈U belongs to every set in at least one collection in ℋ. Test (ii) when ℋ is empty and when ℋ contains the empty collection.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

Let ℱ⊆P(U). Translate and compare: every B∈ℱ contains some element of U; there is one element of U belonging to every B∈ℱ. Prove which implication always holds, refute its converse using U={red,blue}, and analyze ℱ=∅ for both nonempty and empty U.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

For arbitrary subsets A,B,C of a fixed universe U, prove (A∖B)∪(A∩B∩C)=A∖(B∖C) by a membership iff chain for arbitrary x∈U. Identify the propositional step that makes the chain reversible. Then decide whether replacing A∩B∩C by A∩C changes the resulting set, and justify your answer.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

Use alphabet Σ={a,b}, with empty word ε. Let L={ε,a} and M={b,ab}. Compute LM and ML, and list every split of the word ab when checking membership in LM. Explain why two successful splits do not give two copies of a word in a language. State the general identities L∅, ∅L and L{ε}, and distinguish the languages ∅ and {ε}.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

With Σ={a,b}, let L={ε,a,bb}. Determine membership of ε,a,b,bb,ab in the complement of L relative to Σ*, and describe Σ*∖(L∪{b}) using membership logic. Now enlarge the alphabet to Γ={a,b,c} while keeping the same finite L. Explain why the two complements are different and why ¬(LM) generally differs from (¬L)(¬M). First test the suggested case L=M=∅ over Σ; if it does not refute the identity, explain why and construct a genuine counterexample.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

Allowed primitives are only {a}, {b}, ∅; allowed operations are complement relative to Σ* for Σ={a,b}, union and concatenation. Construct Σ*, {ε}, all words of length exactly two, and all words that do not end in a. Use only allowed syntax, possibly introducing abbreviations whose definitions you state. Prove the construction of {ε} including both directions, and explain why merely writing a star operation would violate the syntax restriction.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

Reflect and continue

Before marking this lesson complete, explain one key idea without the worked solution and identify a condition that matters. Marking complete records participation, not independent mastery.