compactness
npx machina-cli add skill parcadei/Continuous-Claude-v3/compactness --openclawCompactness
When to Use
Use this skill when working on compactness problems in topology.
Decision Tree
-
Is X compact?
- If X subset R^n: Is X closed AND bounded? (Heine-Borel)
- If X is metric: Does every sequence have convergent subsequence?
- General: Does every open cover have finite subcover?
z3_solve.py prove "bounded_and_closed"
-
Compactness Tests
- Heine-Borel (R^n): closed + bounded = compact
- Sequential: every sequence has convergent subsequence
sympy_compute.py limit "a_n" --var nto check convergence
-
Product Spaces
- Tychonoff: product of compact spaces is compact
- Finite products preserve compactness directly
-
Consequences of Compactness
- Continuous image of compact is compact
- Continuous real function on compact attains max/min
sympy_compute.py maximum "f(x)" --var x --domain "[a,b]"
Tool Commands
Z3_Bounded_Closed
uv run python -m runtime.harness scripts/z3_solve.py prove "bounded_and_closed"
Sympy_Limit
uv run python -m runtime.harness scripts/sympy_compute.py limit "a_n" --var n --at oo
Sympy_Maximum
uv run python -m runtime.harness scripts/sympy_compute.py maximum "f(x)" --var x --domain "[a,b]"
Key Techniques
From indexed textbooks:
- [Topology (Munkres, James Raymond) (Z-Library)] CompactSpaces163 164ConnectednessandCompactnessCh. Itisnotasnaturalorintuitiveastheformer;somefamiliaritywithitisneededbeforeitsusefulnessbecomesapparent. AcollectionAofsubsetsofaspaceXissaidtocoverX,ortobeacoveringofX,iftheunionoftheelementsofAisequaltoX.
- [Real Analysis (Halsey L. Royden, Patr... (Z-Library)] If X contains more than one point, show that the only possible extreme points of B have norm 1. If X = Lp[a, b], 1 < p < ∞, show that every unit vector in B is an extreme point of B. If X = L∞[a, b], show that the extreme points of B are those functions f ∈ B such that |f | = 1 almost everywhere on [a, b].
- [Topology (Munkres, James Raymond) (Z-Library)] ShowthatinthenitecomplementtopologyonR,everysubspaceiscom-pact. IfRhasthetopologyconsistingofallsetsAsuchthatR−AiseithercountableorallofR,is[0,1]acompactsubspace? ShowthataniteunionofcompactsubspacesofXiscompact.
- [Real Analysis (Halsey L. Royden, Patr... (Z-Library)] The Eberlein-ˇSmulian Theorem . Metrizability of Weak Topologies . X is reexive; (ii) B is weakly compact; (iii) B is weakly sequentially compact.
- [Topology (Munkres, James Raymond) (Z-Library)] SupposethatYiscompactandA={Aα}α∈JisacoveringofYbysetsopeninX. Thenthecollection{Aα∩Y|α∈J}isacoveringofYbysetsopeninY;henceanitesubcollection{Aα1∩Y,. Aαn}isasubcollectionofAthatcoversY.
Cognitive Tools Reference
See .claude/skills/math-mode/SKILL.md for full tool documentation.
Source
git clone https://github.com/parcadei/Continuous-Claude-v3/blob/main/.claude/skills/math/topology/compactness/SKILL.mdView on GitHub Overview
This skill guides solving compactness problems in topology, from Heine-Borel in R^n to sequential compactness in metric spaces and the general open-cover criterion. It also covers product spaces via Tychonoff and the key consequences of compactness, with practical steps and tool commands to verify concepts computationally.
How This Skill Works
The approach uses a decision-tree to categorize the space (R^n, metric, or general) and apply the appropriate test: closed and bounded for R^n (Heine-Borel), convergent subsequences for metric spaces, or the open-cover definition for general spaces. It then extends to product spaces (finite products preserve compactness; Tychonoff for general products) and leverages compactness consequences like continuous images remaining compact and extrema on compact sets, often validated with simple tool scripts.
When to Use It
- Determining if a subset X of R^n is compact (check closedness and bounded).
- Verifying sequential compactness in a metric space by finding convergent subsequences.
- Applying the general open-cover criterion when no simple criterion exists.
- Using product spaces (Tychonoff) to infer compactness of products.
- Leveraging compactness consequences (extrema, continuous images) and relevant tool scripts.
Quick Start
- Step 1: Identify the space X and decide which compactness test applies (Heine-Borel for subsets of R^n, sequential compactness for metric spaces, or open-cover for general spaces).
- Step 2: Apply the appropriate criterion: closed + bounded for R^n; convergent subsequences for metric spaces; or demonstrate a finite subcover.
- Step 3: Validate with tools: run z3_solve.py prove bounded_and_closed; run sympy_compute.py limit a_n --var n --at oo; or run sympy_compute.py maximum f(x) --var x --domain [a,b].
Best Practices
- Identify the space type (R^n, metric, or general topological space) before choosing a test.
- In R^n, apply Heine-Borel: X must be closed and bounded.
- In metric spaces, check whether every sequence has a convergent subsequence.
- Use the open-cover definition to guide proofs when explicit criteria fail.
- For product spaces, use Tychonoff for infinite products and note finite products preserve compactness.
Example Use Cases
- Show [a,b] is compact in R using Heine-Borel (closed and bounded).
- Prove the unit circle in R^2 is compact (closed and bounded).
- Demonstrate that the product of two compact spaces is compact via finite products and Tychonoff.
- A continuous function on a compact interval [a,b] attains its maximum and minimum.
- A continuous image of a compact space is compact (e.g., f: X -> Y).