New planet Cartan to introduce Filter#156
Conversation
| TheoremDoc lt_inv_comm₀ as "lt_inv_comm₀" | ||
|
|
||
| Statement : ∀ᶠ x in 𝓝[>] (0 : ℝ), (fun (x : ℝ) ↦ 1/x) x > 5 := by | ||
| have h : (0 : ℝ) < 1/5 := by grind |
There was a problem hiding this comment.
I'm not particularly happy with the proof I provided here. Two alternatives below. Note that you again have infima of suprema showing up in the infoview after the first step, in both of these proofs. In the second step, the second proof uses a more specialized theorem, than the first, but it's shorter and uses filter_upwards. So I would tend towards the second alternative.
rw [nhdsWithin]
rw [eventually_inf]
let s := Set.Ioo (-1:ℝ) (1/5)
have hs : s ∈ 𝓝 0 := by
rw [IsOpen.mem_nhds_iff,]
simp_log [s]
apply isOpen_Ioo
let I := Ioi (0 : ℝ)
have hI : I ∈ 𝓟 (Ioi 0):= by
simp_log [I]
use s, hs, I, hI
intro x hx
have : 0 < x ∧ x < 1/5 := by grind
simp_log
rw [lt_inv_comm₀]
grind
grind
grind
rw [nhdsWithin]
rw [eventually_inf_principal]
have hx : ∀ᶠ (x : ℝ) in 𝓝 0, x < 1 / 5 := by
apply eventually_lt_nhds
grind
filter_upwards [hx]
intro a h₁ h₂
simp_log
rw [lt_inv_comm₀]
grind
grind
grind
There was a problem hiding this comment.
This is one reason for me to introduce infimum. When user unfold nhdsWithin, they will come across infimum. Previously, I think if we want introduce infimum, we should also supremum, because of symmetry. So I add two levels to do this in the early version.
There was a problem hiding this comment.
I think we should try to avoid unfolding nhdsWithin. We already have some theorems in mathlib to transform the goals contained nhdsWithin (see above example). Then it is unnecessary to introduce infimum of filter.
| Statement {a : ℝ} {s t : Set ℝ} (hs : s ∈ 𝓝 a) (ht : t ∈ 𝓝 a) : | ||
| s ∩ t ∈ 𝓝 a := by | ||
| Hint "[Hint zmbq] `𝓝 {a}` is a filter, so this is an instance of the third filter | ||
| axiom, recorded in Mathlib as `Filter.inter_mem`. " |
There was a problem hiding this comment.
… continuing from comment above: So this is really the only explanation I'd put in this level. (Scribble will say: "Yes, you could show this from first principals, but actually it’s quicker if you realise this is a filter, and everybody knows it's a filter, so you can quote one of the filter axioms instead". Don't write this here – this kind of text will go in the translation files. I just want to convey what I imagine the game to look like in the end.
Description of planet design:
Level 01: Introduce filters as generalized points. The three filter axioms are only mentioned:
Set.univ ∈ f;s ∈ fands ⊆ t, thent ∈ f;s ∈ fandt ∈ f, thens ∩ t ∈ f.The main example is the neighborhood filter
𝓝 a, and the exercise verifies the third axiom for it:Statement {a : ℝ} {s t : Set ℝ} (hs : s ∈ 𝓝 a) (ht : t ∈ 𝓝 a) : s ∩ t ∈ 𝓝 aLevel 02: Characterize membership in
𝓝 afor open sets, introducingIsOpen:Level 03: Introduce
Filter.atTopas the generalized point "at infinity": its members are the sets containing every sufficiently large number. Prove that the open ray beyondbis a neighborhood of+∞, usingFilter.mem_atTopand the second axiom:Statement {b : ℝ} : {x : ℝ | b < x} ∈ atTopLevel 04: Introduce the principal filter
𝓟and the order on filters (Filter.le_def, reverse of set inclusion), and proveprincipal_singleton_le_nhds : 𝓟 {a} ≤ 𝓝 a.Level 05: Introduce
𝓝[>] a(defined as𝓝 a ⊓ 𝓟 (Set.Ioi a)) together with the intervalsSet.Ioo/Set.Iio/Set.Ioi, and proveSet.Ioo (0 : ℝ) 1 ∈ 𝓝[>] (0 : ℝ)viaFilter.mem_inf_iff_superset.Level 06: Introduce
Filter.Eventually. Goal:{a : ℝ} (hab : a < 0) : ∀ᶠ x in 𝓝 a, x < 0.Level 07: Introduce
EventuallyEqand tacticfilter_upwards. Goal:Statement {f g : ℝ → ℝ} {a : ℝ} (ha : a < 0) (h : ∀ x < 0, f x = g x) : f =ᶠ[𝓝 a] gLevel 08: An exercise about
EventuallyEqandfilter_upwards, usingIsOpen.eventually_mem:Statement {f g : ℝ → ℝ} {a b c : ℝ} (ha : a ∈ Ioo b c) (h : ∀ x ∈ Ioo b c, f x = g x) : f =ᶠ[𝓝 a] gLevels 09–11: Three levels about the eventual behavior of
1/xalong different filters, showing how the same predicate behaves at different generalized points:∀ᶠ x in 𝓝[>] (0 : ℝ), 1/x > 5— from the right of0,1/xis eventually large.¬ (∀ᶠ x in 𝓝[≠] (0 : ℝ), 1/x > 5)— but not on the punctured neighborhood, since every punctured neighborhood of0contains negative numbers.∀ᶠ x in atTop, 1/x < 1/5— at infinity,1/xis eventually small.Level 12: Transitivity of
EventuallyEq, usingfilter_upwards. (This step will be used in the Boss level.)Level 13: Introduce
IsLocallyConstantand prove the theoremIsLocallyConstant.eventually_eq, namelyStatement IsLocallyConstant.eventually_eq {f : ℝ → ℝ} {x : ℝ} (hf : IsLocallyConstant f) : ∀ᶠ y in 𝓝 x, f y = f xLevel 14: (Boss Level) Two locally constant functions that agree at a point agree in a neighbourhood of that point.