feat(algebraic_topology): basics on simplicial sets and singular chain complex#144
feat(algebraic_topology): basics on simplicial sets and singular chain complex#144jcommelin wants to merge 25 commits intoleanprover-community:masterfrom jcommelin:simplicial
Conversation
put simplex_category into its own file in algebraic_topology
|
You should check all your files for commented code that is no longer needed and remove it. |
|
Well, there is some commented code, but that are short hints on how would have liked to improve the code. Maybe I could have been a bit more explicit about that... |
|
|
||
| lemma δ_monotone (i : [n+1]) : monotone (δ i) := | ||
| begin | ||
| unfold monotone, |
There was a problem hiding this comment.
the part between begin and end is always indented by 2 spaces.
order/fixed_points.lean
Outdated
| le_refl := λ x, le_refl x, | ||
| le_trans := λ x y z, le_trans, | ||
| le_antisymm := λ x y hx hy, subtype.eq $ le_antisymm hx hy, | ||
| le_antisymm := λ x y hx hy, .eq $ le_antisymm hx hy, |
There was a problem hiding this comment.
I guess this doesn't compile?
There was a problem hiding this comment.
Huh, how did that end up happening? I don't recall ever opening that file...
| intros a b H, | ||
| unfold δ, | ||
| by_cases ha : (i.val ≤ a.val), | ||
| { rw [dif_pos ha], |
There was a problem hiding this comment.
You have a lot of by_cases and rw with if_pos or similar. You can use Gabriels new split_ifs tactic.
|
|
||
| lemma σ_monotone (i : [n]) : monotone (σ i) := | ||
| begin | ||
| unfold monotone, |
There was a problem hiding this comment.
You don't need to unfold monotone, intros will do it for you.
| have hia' : ((fin.raise i).val ≤ (fin.raise a).val) := | ||
| begin | ||
| unfold fin.raise, | ||
| exact hia |
There was a problem hiding this comment.
Are you sure that unfold and then exact is necessary? The unfold looks unnecessary.
|
|
||
| lemma simplicial_identity₁ {i j : [n+1]} (H : i ≤ j) : δ j.succ ∘ δ i = δ i.raise ∘ δ j := | ||
| begin | ||
| apply funext, |
There was a problem hiding this comment.
Sorry, I don't understand this comment.
There was a problem hiding this comment.
Instead of apply funext, intro a, ... you can use funext a, ... or ext a, ....
ext is a more general version which uses a database of extensionality theorems.
|
General comment on style: lemma name (a : A) (b : B) : stmt :=
-- or
lemma name (a : A) (b : B) :
stmt :=
-- or
lemma name
(a : A)
(b : B) :
stmt :=
_The |
|
For the proofs it gets harder. I have a couple of ideas:
|
| end typepown | ||
|
|
||
| /-- The n-th standard topological simplex: Δ_n = { x ∈ ℝ^{n+1} | ∀ i, x_i ≥ 0, and ∑ x_i = 1 } -/ | ||
| definition standard_topological_simplex (n : ℕ) : set (ℝ≥0^(n+1)) := |
There was a problem hiding this comment.
I added probability mass functions, you can use them instead of this construction.
There was a problem hiding this comment.
A search in VScode didn't show up anything. Where did you define those?
There was a problem hiding this comment.
Aah, sorry, I didn't read "I added ..." as something you did today. My bad I didn't check the latest commits.
There was a problem hiding this comment.
@johoelzl I think I understand what those probability mass functions are doing. But I prefer to continue using fin n. Within this theory of simplicial sets etc, the simplex category plays quite an important role: you want to look at monotone functions fin m \to fin n. If I start using these probability mass functions, I fear losing access to those monotone functions. (Or at least their role in the theory it becomes a lot less apparent to me.)
There was a problem hiding this comment.
I don't understand?! You still use fin n: you would use pmf (fin (n + 1)) to define standard_topological_simplex n. Then you use pmf.map to map your vertices.
There was a problem hiding this comment.
Ok, then I didn't understand pmf correctly. Let me see again.
| ⟨assume ⟨t, ht, heq⟩, ⟨-t, by simp; assumption, by simp [preimage_compl, heq.symm]⟩, | ||
| assume ⟨t, ht, heq⟩, ⟨-t, ht, by simp [preimage_compl, heq.symm]⟩⟩ | ||
|
|
||
| lemma induced_comp {α β γ : Type*} (f : α → β) (g : β → γ) : |
There was a problem hiding this comment.
Isn't this already induced_compose, up to minor details?
There was a problem hiding this comment.
I guess it is. And in fact, I don't need this lemma anymore. So I will remove it. Thanks for spotting this!
| -- instance ring_hom_is_add_group_hom [ring α] [ring β] (f : α → β) [is_ring_hom f] : is_add_group_hom f := | ||
| -- ⟨λ _ _, is_ring_hom.map_add f⟩ | ||
|
|
||
| theorem zero {α β : Type*} [add_group α] [add_group β] (f : α → β) [hf : is_add_group_hom f] : |
There was a problem hiding this comment.
This can't be a simp lemma as the head of the left-hand side is just f which is a variable. The simplifier cannot work with such cases.
| continuous_supr_rng $ assume i, continuous_induced_rng $ h i | ||
|
|
||
| lemma continuous_apply [topological_space α] [∀i, topological_space (π i)] (i : ι) : | ||
| lemma continuous_apply [∀i, topological_space (π i)] (i : ι) : |
|
Now that categories are in mathlib, we could consider splitting up this construction into smaller pieces, namely:
At least the first two items could be done right now, and none of the items are far from being doable in some version (depending on the status of modules and (co)limits). |
|
This all sounds very nice. I think we should wait for the module refactor and some progress in the category theory PR, and then try to make one big push. This would be a really nice test for all those new features. |
|
@jcommelin is it OK to close this PR? |
|
Yes. Let's close this for now. I hope to return to it in the future! |
I have tried to follow the style guides. However, the proofs are probably not up to par. I have no idea how to improve them. All help appreciated.