Skip to content

feat: add a typeclass for the continuum hypothesis - #34075

Closed
eric-wieser wants to merge 10 commits into
masterfrom
eric-wieser/continuum
Closed

feat: add a typeclass for the continuum hypothesis#34075
eric-wieser wants to merge 10 commits into
masterfrom
eric-wieser/continuum

Conversation

@eric-wieser

@eric-wieser eric-wieser commented Jan 17, 2026

Copy link
Copy Markdown
Member

This allows a proof from the Archive to be promoted to mathlib itself.

The proof strategy of iff_exists_sierpinski_pathological_pred was written almost entirely with public Gemini 3 Thinking, and then manually corrected.


Open in Gitpod

@eric-wieser
eric-wieser requested a review from sgouezel January 17, 2026 05:03
@github-actions

github-actions Bot commented Jan 17, 2026

Copy link
Copy Markdown

PR summary bc90dd441b

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
Mathlib.SetTheory.Cardinal.ContinuumHypothesis (new file) 1471

Declarations diff

+ Cardinal.exists_sierpinski_pathological_partition_of_card_eq_aleph_one
+ Cardinal.exists_sierpinski_pathological_pred_of_card_eq_aleph_one
+ ContinuumHypothesis
+ aleph0_covby_continuum.{u}
+ continuum_eq_aleph_one.{u}
+ iff_aleph0_covby_continuum.{u}
+ iff_continuum_eq_aleph_one.{u}
+ iff_exists_sierpinski_pathological_partition
+ iff_exists_sierpinski_pathological_pred
+ of_aleph0_covby_continuum
+ of_continuum_eq_aleph_one

You can run this locally as follows
## summary with just the declaration names:
./scripts/pr_summary/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/pr_summary/declarations_diff.sh long <optional_commit>

The doc-module for scripts/pr_summary/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/reporting/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@github-actions github-actions Bot added the t-set-theory Set theory label Jan 17, 2026
Comment thread Mathlib/SetTheory/Cardinal/ContinuumHypothesis.lean
@grunweg grunweg added the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Jan 17, 2026
Comment thread Mathlib/SetTheory/Cardinal/ContinuumHypothesis.lean Outdated
Comment thread Mathlib/SetTheory/Cardinal/ContinuumHypothesis.lean
Comment thread Mathlib/SetTheory/Cardinal/ContinuumHypothesis.lean Outdated
Comment thread Mathlib/SetTheory/Cardinal/ContinuumHypothesis.lean Outdated
Comment thread Mathlib/SetTheory/Cardinal/ContinuumHypothesis.lean
Comment on lines +97 to +98
ContinuumHypothesis ↔
∃ f : ℝ → ℝ → Prop, (∀ x, {y | ¬ f x y}.Countable) ∧ ∀ y, {x : ℝ | f x y}.Countable := by

@vihdzp vihdzp Jan 18, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likewise, I believe this theorem generalizes to:

Suggested change
ContinuumHypothesis
∃ f : Prop, (∀ x, {y | ¬ f x y}.Countable) ∧ ∀ y, {x : ℝ | f x y}.Countable := by
#α = c
∃ f : ααProp, (∀ x, #{y | ¬ f x y} < c) ∧ ∀ y, #{x : ℝ | f x y} < c := by

So the continuum hypothesis is truly doing nothing other than giving you the initial rewrite of #ℝ = ℵ₁.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is one of these being an equality a typo?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is c here intended to be a bound variable or 𝔠?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bound variable. The same strategy of "take a well-ordering with least order type" should work to prove this.

Comment on lines +85 to +86
theorem iff_continuum_eq_aleph_one.{u} : ContinuumHypothesis ↔ (𝔠 : Cardinal.{u}) = ℵ₁ := by
rw [iff_continuum_eq_aleph_one', ← Cardinal.lift_continuum.{u, 0}, Cardinal.lift_eq_aleph_one]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be desirable to do something like this instead

Suggested change
theorem iff_continuum_eq_aleph_one.{u} : ContinuumHypothesis ↔ (𝔠 : Cardinal.{u}) = ℵ₁ := by
rw [iff_continuum_eq_aleph_one', ← Cardinal.lift_continuum.{u, 0}, Cardinal.lift_eq_aleph_one]
theorem iff_continuum_eq_aleph_one.{u} : ContinuumHypothesis ↔ (𝔠 : Cardinal.{u}) = ℵ₁ :=
⟨fun ⟨h⟩ => by rw [← lift_continuum.{u, 0}, h, lift_eq_aleph_one],
fun h => ⟨by rw [← lift_inj.{0, u}, lift_continuum, h, aleph_one_eq_lift]⟩⟩

and remove the primed version?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the harm in the primed version? I could also make it private, but maybe that's not possibly with mk_iff.

@mathlib-merge-conflicts mathlib-merge-conflicts Bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Feb 18, 2026
@mathlib-merge-conflicts

Copy link
Copy Markdown

This pull request has conflicts, please merge master and resolve them.

@github-actions github-actions Bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Apr 10, 2026
@eric-wieser
eric-wieser force-pushed the eric-wieser/continuum branch from e903475 to 1566080 Compare April 10, 2026 21:35
@eric-wieser eric-wieser removed the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Apr 10, 2026
(`Mathlib.Analysis.Convex.SimplicialComplex.Basic, `Mathlib.AlgebraicTopology),
(`Mathlib.Analysis.Convex.SimplicialComplex.AffineIndependentUnion, `Mathlib.AlgebraicTopology),
(`Mathlib.Probability.Kernel.Category, `Mathlib.CategoryTheory), -- For the category of s-finite/Markov kernels
(`Mathlib.SetTheory.Cardinal.ContinuumHypothesis, `Mathlib.Analysis.Real.Cardinality),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should be importing real numbers in the continuum hypothesis file. If there are any theorems about types with cardinality continuum they should be written in that generality.

@vihdzp

vihdzp commented Apr 13, 2026

Copy link
Copy Markdown
Collaborator

Opened #37965 proving a more general version of the pathological relation theorem.

@mathlib-merge-conflicts mathlib-merge-conflicts Bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Apr 24, 2026
@mathlib-merge-conflicts

Copy link
Copy Markdown

This pull request has conflicts, please merge master and resolve them.

@felixpernegger

Copy link
Copy Markdown
Contributor

@eric-wieser do you still plan to work on this? If not I'd be interested in adding some "additional axioms" (CH, GHC and MA)

@eric-wieser

Copy link
Copy Markdown
Member Author

Closing in favor of #43537, since I am unable to push further changes to this now-protected branch.

@eric-wieser eric-wieser closed this Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) t-set-theory Set theory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants