Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjulang committed May 2, 2024
1 parent 2b5ebb2 commit 388071f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ example (X : Type) [TopologicalSpace X] : IsOpen (∅ : Set X) := by

-- The reals are a topological space. Let's check Lean knows this already
#synth TopologicalSpace ℝ
#check TopologicalSpace ℝ



-- Let's make it from first principles.

Expand All @@ -105,15 +108,21 @@ def Real.IsOpen (s : Set ℝ) : Prop :=
lemma Real.isOpen_univ : Real.IsOpen (Set.univ : Set ℝ) := by
intro x hx
use 37
norm_num
apply And.intro
· norm_num
· intros a1 h1
simp only [Set.mem_univ]

-- will AI be able to write these proofs one day? The proof feels kind of natural
-- and obvious but I still had to write a lot of it manually
lemma Real.isOpen_inter (s t : Set ℝ) (hs : IsOpen s) (ht : IsOpen t) : IsOpen (s ∩ t) := by
intro x hx
obtain ⟨δs, δspos, hs⟩ := hs x (by aesop)
obtain ⟨δt, δtpos, ht⟩ := ht x (by aesop)
use min δs δt, by positivity
use min δs δt
-- use min δs δt ,by positivity -- method1
constructor -- method2
· positivity
rintro y ⟨h1, h2⟩
constructor
· apply hs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ example (X Y Z : Type) [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpa

example (X Y Z : Type) [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z]
(f : X → Y) (g : Y → Z) (hf : Continuous f) (hg : Continuous g) : Continuous (g ∘ f) := by
-- There's a tactic for continuity proofs by the way
-- There's a tactic for continuity proofs ,by the way
continuity

example (X Y Z : Type) [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z]
Expand Down

0 comments on commit 388071f

Please sign in to comment.