Skip to content

Fill in some of 3.5, fix numbering #268

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 4, 2025
Merged

Conversation

gaearon
Copy link
Contributor

@gaearon gaearon commented Aug 4, 2025

There's a few changes in here:

  • I've added a mem_insert lemma so we can unwrap >3-item sets without mentioning the instance.
  • The definition/example numbering is fixed to match the fourth edition of the book.
  • I've coalesed curry, uncurry, curry_uncurry, and uncurry_curry into an equivalence. This matches how other equivalences are shown and is IMO a bit more intuitive. It took me a while to see why they're defined at all.
  • I've added the statement (and the proof) of Example 3.5.5.
  • In general, I've marked which parts of the text the equivalences correspond to. It wasn't clear. I've also reordered equivalences to follow when they're brought up in the book.

@@ -67,7 +67,7 @@ abbrev SetTheory.Set.slice (x:Object) (Y:Set) : Set :=
theorem SetTheory.Set.mem_slice (x z:Object) (Y:Set) :
z ∈ (SetTheory.Set.slice x Y) ↔ ∃ y:Y, z = (⟨x, y⟩:OrderedPair) := replacement_axiom _ _

/-- Definition 3.5.2 (Cartesian product) -/
/-- Definition 3.5.4 (Cartesian product) -/
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Screenshot 2025-08-04 at 16 23 46

apply ext;
aesop

/-- Example 3.5.5 / Exercise 3.6.5. There is a bijection between `X ×ˢ Y` and `Y ×ˢ X`. -/
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Screenshot 2025-08-04 at 16 25 00

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Calling out the future exercise explicitly so it's clear why we're not filling this in.

invFun := sorry
left_inv := sorry
right_inv := sorry
/-- Example 3.5.5. A function of two variables can be thought of as a function of a pair. -/
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Screenshot 2025-08-04 at 16 24 36

@@ -180,8 +172,27 @@ theorem SetTheory.Set.tuple_mem_iProd {I: Set} {X: I → Set} (a: ∀ i, X i) :
theorem SetTheory.Set.tuple_inj {I:Set} {X: I → Set} (a b: ∀ i, X i) :
tuple a = tuple b ↔ a = b := by sorry

/-- Example 3.5.8. There is a bijection between `(X ×ˢ Y) ×ˢ Z` and `X ×ˢ (Y ×ˢ Z)`. -/
noncomputable abbrev SetTheory.Set.prod_associator (X Y Z:Set) : (X ×ˢ Y) ×ˢ Z ≃ X ×ˢ (Y ×ˢ Z) where
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've fully filled this in because it wasn't a "why" and it wasn't part of an exercise.

@@ -151,20 +130,45 @@ noncomputable abbrev SetTheory.Set.prod_associator (X Y Z:Set) : (X ×ˢ Y) ×ˢ
noncomputable abbrev SetTheory.Set.prod_equiv_prod (X Y:Set) :
((X ×ˢ Y):_root_.Set Object) ≃ (X:_root_.Set Object) ×ˢ (Y:_root_.Set Object) where
toFun := fun z ↦ ⟨(fst z, snd z), by simp⟩
invFun := fun z ↦ mk_cartesian ⟨z.val.1, z.prop.1⟩ ⟨z.val.2, z.prop.2⟩
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Filled these in because it's auxiliary to the book.

invFun := sorry
left_inv := sorry
right_inv := sorry

/-- Example 3.5.5. A function of two variables can be thought of as a function of a pair. -/
noncomputable abbrev SetTheory.Set.curry_equiv {X Y Z:Set} : (X → Y → Z) ≃ (X ×ˢ Y → Z) where
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Filled this in because it isn't a "why" or an exercise.

@teorth teorth merged commit a43e480 into teorth:main Aug 4, 2025
2 checks passed
@gaearon gaearon deleted the coalesce-curry branch August 4, 2025 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants