Zulip Chat Archive

Stream: condensed mathematics

Topic: LES for Ext


Johan Commelin (Sep 20 2021 at 11:45):

We'll also need LES for Ext groups (in the first variable). Does that sound like something you want to work on?

Riccardo Brasca (Sep 20 2021 at 11:51):

Sure! I can really work on anything we need. To be honest I don't understand very well how difficult it is, for example this is something we will surely want in mathlib at some point, but maybe proving it in general for derived functors is much more difficult?

Johan Commelin (Sep 20 2021 at 11:54):

I think it will not make much of a difference.

Johan Commelin (Sep 20 2021 at 11:54):

But mathlib still doesn't have the snake lemma. I think that's a bigger problem for getting the LES.

Riccardo Brasca (Sep 20 2021 at 12:07):

I don't think I've ever seen a real proof of the snake lemma (I mean a proof that does not go through Mitchell's embedding theorem), but this one seems quite short. It works if the category has enough projectives, but maybe this is enough for our applications.

Johan Commelin (Sep 20 2021 at 12:08):

@Markus Himmel What's the status of snake in lean?

Johan Commelin (Sep 20 2021 at 12:08):

@Riccardo Brasca Sure, for now assuming enough projectives is fine.

Johan Commelin (Sep 20 2021 at 12:42):

@Riccardo Brasca maybe we should start by defining δ-functors, somewhere in for_mathlib.

Johan Commelin (Sep 20 2021 at 12:43):

Then we claim that Ext is an example of a δ-functor. And that splits the problem into two pieces: (i) develop an API for δ-functors, and (ii) fill in the sorry that Ext is indeed an example.

Matthew Ballard (Sep 20 2021 at 13:01):

docs#category_theory.abelian.pseudoelement might be helpful

Markus Himmel (Sep 20 2021 at 13:02):

Regarding the snake lemma: there is a proof that works in all abelian categories in Borceux Vol 2 and also in PTJs category theory notes (which I am afraid are not public). Getting one of them in Lean is basically just a matter of sitting down and doing it, but it will be long and not particularly pretty. Part of that is simply due to the fact that the statement of the snake lemma is very long. I have a version of Borceux' proof at github.com/twofx/lean-homological-algebra, but it uses custom tactics which are far from mathlib-ready, so it is almost certainly faster to start from scratch with one of the two proofs. It is very unlikely that I will have time to tackle this anytime soon. Borceux' proof uses pseudoelements while Johnstone's proof is arrow-theoretic. We habe pseudoelements, but Johnstone's proof is shorter, so it might be the way to go, but it's hard to tell without trying both ways.

Riccardo Brasca (Sep 20 2021 at 13:03):

Yes, that's the right thing to do. In any case we need the LES to check that derived functors are δ-functors

Johan Commelin (Sep 20 2021 at 13:03):

@Markus Himmel is your repo building with recent mathlib?

Markus Himmel (Sep 20 2021 at 13:04):

Almost certainly not

Johan Commelin (Sep 20 2021 at 13:04):

If so, maybe we could dump the proof terms that your tactics spit out, and plug those into LTE.

Riccardo Brasca (Sep 20 2021 at 13:05):

I just carefully checked the proof of the snake lemma I linked above, and I am pretty confident it's doable in one or two weeks (depending on how complete is the library for abelian categories). It works if the category has enough projectives (or enough injectives).

Johan Commelin (Sep 20 2021 at 13:05):

In our case, we do have enough projectives. So maybe that's the best approach for LTE.

Riccardo Brasca (Sep 20 2021 at 13:06):

Ah, I didn't think about naturality of the morphism. I don't remember if this is more or less automatic or not

Riccardo Brasca (Sep 20 2021 at 13:12):

@Markus Himmel How one construct the connecting morphism using pseudoelements? I've always thought one can use them to check that a given morphism is zero or similar stuff, but not not produce one. And the main difficulty of the snake lemma is usually to construct δ rather then the exacteness.

Matthew Ballard (Sep 20 2021 at 13:12):

I couldn't find the cone complex in docs#homotopy_category. Is that in mathlib?

Johan Commelin (Sep 20 2021 at 13:13):

I don't think so

Johan Commelin (Sep 20 2021 at 13:14):

Relevant link: https://pp.ipd.kit.edu/uploads/publikationen/himmel20bachelorarbeit.pdf is Markus's BSc thesis on diagram chasing in Lean

Matthew Ballard (Sep 20 2021 at 13:16):

I am not sure about the feasibility at the moment (but it works for my graduate class in a day) is to prove that K(A)K^-(\mathcal A) satisfies TR1 - TR3 for a triangulated category (which need to be stated). The fact that Hom(A,)\operatorname{Hom}(A,-) or Hom(,A)\operatorname{Hom}(-,A) takes triangles to LESs is very quick from that.

Matthew Ballard (Sep 20 2021 at 13:17):

There are categories of triangles already docs#triangulated but not any axioms.

Matthew Ballard (Sep 20 2021 at 13:18):

A triangle in the homotopy category is anything isomorphic to a triangle of the form

AϕBC(ϕ)A[1] A \overset{\phi}{\to} B \to C(\phi) \to A[1]

Matthew Ballard (Sep 20 2021 at 13:21):

Almost certainly the most work would got into checking that "rotation axiom" TR2.

Matthew Ballard (Sep 20 2021 at 13:22):

This way the natural maps in the δ\delta-functor come from the maps in the triangle + naturality of Hom.

Markus Himmel (Sep 20 2021 at 13:33):

@Riccardo Brasca the connecting homomorphism is constructed via universal properties. IIRC, in the two proofs I cited above this is actually the easier half of the argument.

Johan Commelin (Sep 20 2021 at 13:34):

I think we need the LES for Ext in 3 or 4 places in LTE. So we should probably prioritize getting the statement formalized.

Johan Commelin (Sep 27 2021 at 11:56):

Maybe we should push for this LES now that snake is finished. The file horseshoe.lean contains a half-hearted attempt at the horseshoe construction.

Johan Commelin (Sep 28 2021 at 09:05):

I finished the horseshoe construction, although the columns aren't yet tied to ProjectiveResolution.

Johan Commelin (Sep 28 2021 at 09:05):

But I feel like we are now zoning in fast on the LES for derived functors.

Johan Commelin (Oct 04 2021 at 13:40):

lemma six_term_exact_seq (n : ) (A : short_exact_sequence C) (B : C) :
  exact_seq (Module.{v} R) [
    ((«Ext» R C n).map A.g.op).app B, ((«Ext» R C n).map A.f.op).app B,
    δ R n A B,
    ((«Ext» R C (n+1)).map A.g.op).app B, ((«Ext» R C (n+1)).map A.f.op).app B
    ] :=
begin
  apply exact_seq.of_op,
  exact functor.left_derived.six_term_exact_seq _ n A,
end

Johan Commelin (Oct 04 2021 at 13:41):

This still depends on some sorries. Most notably exact f g → exact g.op f.op.

Adam Topaz (Oct 05 2021 at 01:41):

instance [exact f g] : exact g.op f.op :=
begin
  rw abelian.exact_iff,
  refine by simp [ op_comp], _⟩,
  apply_fun quiver.hom.unop,
  swap, { exact quiver.hom.unop_inj },
  simp,
end

Adam Topaz (Oct 05 2021 at 01:41):

(after adding the correct simp lemmas, of course ;) )

Filippo A. E. Nuccio (Oct 05 2021 at 21:53):

Oh great, I was planning to work a little bit on this of_op but it seems it has been unsorried. I am sorry for not being very active this week, I'm at a conference.

Filippo A. E. Nuccio (Oct 05 2021 at 21:53):

At any rate I will rather work on the SES with real measures.

Riccardo Brasca (Oct 06 2021 at 09:50):

So is there any sorry left for LES or you guys are really too fast? :grinning:

Johan Commelin (Oct 06 2021 at 10:24):

@Riccardo Brasca There are still 3 of them in horseshoe.lean

Johan Commelin (Oct 06 2021 at 10:24):

I haven't looked at them in the last few days. But I hope they are math-easy.

Riccardo Brasca (Oct 06 2021 at 12:02):

I will have a look

Riccardo Brasca (Oct 06 2021 at 14:16):

First sorry killed

Riccardo Brasca (Oct 07 2021 at 15:10):

I've done one and half of the last two sorry in horseshoe_is_projective_resolution₁. The last one is probably the more annoying, but it is just a matter of sitting down and unfolding all the definition I think. I will do it tomorrow if nobody wants to work on it.

Johan Commelin (Oct 07 2021 at 15:19):

Thanks so much. I will probably not have time to work on this tomorrow. Did you hit any pain points?

Riccardo Brasca (Oct 07 2021 at 15:31):

Not yet, but for the last sorry I will probably need eq_to_hom, so it's probably necessary to be a little careful

Kevin Buzzard (Oct 08 2021 at 06:22):

I bet you never realised that diagram chases were so difficult Riccardo ;-) Are these things in other systems? I remember looking at unimath once and just seeing a ton of category theory

Riccardo Brasca (Oct 08 2021 at 10:44):

OK, maybe this last lemma is a little painful... and I got the scary "motive is not type correct". I guess I really have to use eq_to_hom everywhere.

Johan Commelin (Oct 08 2021 at 11:37):

Hmm, this horseshoe construction is quite annoying.

Johan Commelin (Oct 08 2021 at 11:41):

I wonder if it was a good idea to do a hands-on definition of SES.

Johan Commelin (Oct 08 2021 at 11:41):

It would probably have been better to consider functors fin 3 ==> A (together with exactness conditions)

Johan Commelin (Oct 08 2021 at 11:42):

Because the sorry that is left, is only proving that the first column in the horseshoe construction is a proj resolution. And we'll have to repeat it for row 2 and 3. We can't quantify over fin 3. With the other definition, that would be possible.

Johan Commelin (Oct 08 2021 at 11:43):

Anyway, copy-paste isn't that hard either... so maybe it's not a very big problem.

Riccardo Brasca (Oct 08 2021 at 11:51):

Let me try a little bit. Maybe using pseudoelements was not a good idea

Johan Commelin (Oct 08 2021 at 11:54):

Well, this shouldn't really impact the horseshoe sorry.

Johan Commelin (Oct 08 2021 at 11:54):

And it will be a refactor that takes some time

Johan Commelin (Oct 08 2021 at 11:56):

Somehow this sorry should boil down to: exact f g following from: f factors through an epi onto the kernel of g.

Johan Commelin (Oct 08 2021 at 11:56):

Because that's basically how the f and g in this case are defined.

Johan Commelin (Oct 08 2021 at 11:56):

But since several constructions are pasted on top of this, it might not be so easy to apply that observation.

Riccardo Brasca (Oct 08 2021 at 12:25):

There must be something I don't understand about eq_to_hom (or something else). For example, do you why the following doesn't work?

  begin
    dsimp [horseshoe_to_single₁],
    erw [chain_complex.of_d, chain_complex.of_d],
    dsimp [horseshoe_d, horseshoe_step],

    set f := horseshoe_base_π (horseshoe_step A n).1,
    set g := (horseshoe_step A n).2.2.2.1,

    --now the goal is
    --exact (horseshoe_base_π (horseshoe_ker f) ≫ eq_to_hom _ ≫ horseshoe_ker_ι f).fst
    --(f ≫ eq_to_hom _ ≫ g).fst

    rw [short_exact_sequence.comp_fst], --this doesn't work

  end,

where

lemma comp_fst : (f  g).1 = f.1  g.1 := rfl

Johan Commelin (Oct 08 2021 at 12:42):

Very strange.

Johan Commelin (Oct 08 2021 at 12:50):

@Riccardo Brasca This seems to work:

lemma aux {X Y Z W : C} (g : Y  Z) (h : Z  W) (f : X  kernel g) (i : kernel g  Y)
  (hf : epi f) (hh : mono h) (hi : i = kernel.ι g) :
  exact (f  i) (g  h) :=
sorry

lemma horseshoe_exact₁ (A : short_exact_sequence C) (n : ) :
  exact (((homological_complex.Fst C).obj (horseshoe A)).d (n + 2) (n + 1))
    (((homological_complex.Fst C).obj (horseshoe A)).d (n + 1) n) :=
begin
  dsimp [horseshoe_to_single₁],
  erw [chain_complex.of_d, chain_complex.of_d],
  dsimp [horseshoe_d, horseshoe_step],

  set f := horseshoe_base_π (horseshoe_step A n).1,
  set g := (horseshoe_step A n).2.2.2.1,

  cases n;
  convert aux f.1 _ (horseshoe_base_π (horseshoe_ker f)).1 _ _ _ _ using 1,
end

Johan Commelin (Oct 08 2021 at 12:51):

Also, I think the cases n is crucial.

Johan Commelin (Oct 08 2021 at 12:51):

It might work as a first step in the original problem as well.

Riccardo Brasca (Oct 08 2021 at 12:54):

Ah yes, doing cases n makes rw short_exact_sequence.comp_fst working! I don't really understand why, but I am happy with your solution.

Johan Commelin (Oct 08 2021 at 12:55):

@Riccardo Brasca probably because

def horseshoe_to_single₁ :=
(chain_complex.to_single₀_equiv

is using a match on a natural number, under the hood

Riccardo Brasca (Oct 08 2021 at 13:58):

for_mathlib/horseshoe is sorry free.

Johan Commelin (Oct 08 2021 at 14:00):

Wow, that's awesome!

Johan Commelin (Oct 08 2021 at 14:01):

@Riccardo Brasca would you mind copy-pasting the final bit to show that Snd and Trd also give projective resolutions?

Johan Commelin (Oct 08 2021 at 14:01):

I think that should really be copy-pastable

Riccardo Brasca (Oct 08 2021 at 14:03):

Sure! But let me have a coffee first.

Riccardo Brasca (Oct 08 2021 at 14:43):

No problem for Trd, but Snd is different. I am maybe tired, but I don't see how to prove

instance epi_horseshoe_base_π_2 : epi (horseshoe_base_π A).2

Johan Commelin (Oct 08 2021 at 14:44):

hmm, I need to run, but I will think about it.

Riccardo Brasca (Oct 08 2021 at 14:45):

I mean, even with pen and paper it doesn't seem obvious. It's probably OK with elements, but I have to try

Riccardo Brasca (Oct 08 2021 at 15:16):

Ah, of course it is because of the snake lemma!

Johan Commelin (Oct 08 2021 at 15:21):

Yeah, I realised it just when I stepped in the car.

Johan Commelin (Oct 08 2021 at 15:22):

Now it will be interesting to see how easy it is to deduce this from the snake lemma in Lean.

Johan Commelin (Oct 08 2021 at 15:22):

Note that you can construct a snake_input from hom of SES.

Johan Commelin (Oct 08 2021 at 15:22):

mk_of_short_exact_sequence_hom

Riccardo Brasca (Oct 08 2021 at 15:34):

Yes, it's a good test for our API. We will need cokernel_sequence (currently we only have kernel_sequence), and things like epi f iff is_zero (cokernel f)

Riccardo Brasca (Oct 08 2021 at 15:34):

But I'm done for today :)

Johan Commelin (Oct 08 2021 at 15:43):

I think we could use six_term_exact_sequence and exact_seq.extract to get the relevant bit.

Adam Topaz (Oct 08 2021 at 16:19):

Can't you just use row_exact₃?

Adam Topaz (Oct 08 2021 at 16:20):

(with mk_of_short_exact_sequence_hom)

Riccardo Brasca (Oct 08 2021 at 17:58):

I just realized we already have docs#category_theory.abelian.epi_of_epi_of_epi_of_mono

Johan Commelin (Oct 08 2021 at 18:20):

tada!

Riccardo Brasca (Oct 08 2021 at 18:27):

It worked like a charm!

Riccardo Brasca (Oct 08 2021 at 18:28):

We now have the three projective resolutions.

Johan Commelin (Oct 08 2021 at 19:25):

Cool. Seems like we are very close to a sorry-free LES then!

Riccardo Brasca (Oct 12 2021 at 10:35):

I am trying to prove snake_diagram_is_snake_input in src/for_mathlib/homological_complex.lean, but I am getting again the "motive is not type correct" error.

lemma snake_diagram_is_snake_input (C : Type u) [category.{v} C] [abelian C]
  (A : chain_complex (short_exact_sequence C) ) (n : ) : is_snake_input (snake_diagram C n A) :=
  { row_exact₁ :=
    begin
      dsimp [snake_diagram, snake_diagram.mk_functor'', snake_diagram.mk_functor'],
      simp,

    --Now the goal is:
    --exact ((![homology_functor C (complex_shape.down ℕ) (n + 1), mod_boundaries_functor (n + 1),
    --cycles_functor C (complex_shape.down ℕ) n, homology_functor C (complex_shape.down ℕ) n] 1).map
    --(--(Fst_Snd C).app A)) ((![homology_functor C (complex_shape.down ℕ) (n + 1),
    --mod_boundaries_functor (n + 1), cycles_functor C (complex_shape.down ℕ) n,
    --homology_functor C (complex_shape.down ℕ) n] 1).map ((Snd_Trd C).app A))

    -- Note the ![homology_functor C (complex_shape.down ℕ) (n + 1), mod_boundaries_functor (n + 1),
    --cycles_functor C (complex_shape.down ℕ) n, homology_functor C (complex_shape.down ℕ) n] 1
    --that is not simplified



      have : ![homology_functor C (complex_shape.down ) (n + 1), mod_boundaries_functor (n + 1),
        cycles_functor C (complex_shape.down ) n, homology_functor C (complex_shape.down ) n] 1 =
        mod_boundaries_functor (n + 1) := rfl,
    rw [this], --this fails with motive is not type correct
   end,
   row_exact₂ := sorry,
   col_exact₁ := sorry,
   col_exact₂ := sorry,
   col_mono := sorry,
   col_epi := sorry,
   row_mono := sorry,
   row_epi := sorry }

I didn't tried very hard to solve this, but it is maybe an indication that we did something wrong ? (I've tried cases n, just because it solved the problem in another lemma, but it doesn't work.)

Johan Commelin (Oct 12 2021 at 10:54):

    dsimp [snake_diagram, snake_diagram.mk_functor'', snake_diagram.mk_functor'],
    simp only [snake_diagram.mk_functor_map_g1, snake_diagram.mk_functor_map_f1],
    show exact ((mod_boundaries_functor (n+1)).map _) ((mod_boundaries_functor (n+1)).map _),

works to get a reasonable goal state.

Johan Commelin (Oct 12 2021 at 11:05):

@Riccardo Brasca Maybe we should wait with these sorries.

Johan Commelin (Oct 12 2021 at 11:07):

The point is: for the BD lemma we'll need triangles like τi+1CτiCHi(C)[i]\tau_{\ge i+1}C \to \tau_{\ge i} C \to H_i(C)[i], and we will also need long exact sequences for those.

Johan Commelin (Oct 12 2021 at 11:07):

So I think we should tell Lean what the distinguished triangles in the homotopy category are, and get a LES for those.

Johan Commelin (Oct 12 2021 at 11:08):

Maybe that will boil down to this same lemma, but I'm not sure if it will be defeq the same lemma.

Johan Commelin (Oct 12 2021 at 11:48):

The relevant sections of the stacks project seem to be https://stacks.math.columbia.edu/tag/014D and https://stacks.math.columbia.edu/tag/014P

Riccardo Brasca (Oct 12 2021 at 12:56):

Ah OK, if we need it in greater generality I agree it's better to wait.

Johan Commelin (Oct 12 2021 at 12:59):

I have a construction of the mapping cone. But not yet the map that completes the triangle, because we don't yet have an instance of has_shift (homological_complex A c)

Johan Commelin (Oct 12 2021 at 13:03):

Pushed

Johan Commelin (Oct 12 2021 at 13:03):

About this shift: there seem to be several conventions. Is there an orthodox convention that unifies chain complexes and cochain complexes?

Johan Commelin (Oct 12 2021 at 13:04):

https://doc.sagemath.org/html/en/reference/homology/sage/homology/chain_complex.html#sage.homology.chain_complex.ChainComplex_class.shift says that the shift always goes in the opposite direction as the differential

Johan Commelin (Oct 12 2021 at 13:05):

But I have no idea if this is an accepted standard. I think that https://stacks.math.columbia.edu/tag/0119 does something else

Riccardo Brasca (Oct 12 2021 at 13:19):

I am always confused by this, but usually at the end I expect that, Hi(F[i])=H0(F)H^i(\mathcal{F}[-i]) = H^0(\mathcal{F}).

Johan Commelin (Oct 12 2021 at 13:21):

I guess that follows the Stacks convention. But the Sage convention only agrees for one of the two: chain or cochain complexes. (I didn't yet check which one, because I'm also confused.)

Johan Commelin (Oct 12 2021 at 13:24):

But if we want a triangle

AfBCone(f)A[1]A \xrightarrow{f} B → \text{Cone}(f) → A[1]

for both chain and cochain complexes, then I guess this forces what the shift should be, right?

Johan Commelin (Oct 12 2021 at 13:25):

And we probably want the homotopy category of both versions to be a triangulated category in the end.

Riccardo Brasca (Oct 12 2021 at 13:35):

Stack project says that the homotopy category is built using cochain complexes. I have no idea if there is some convention that works only in this case.

Riccardo Brasca (Oct 12 2021 at 13:39):

In my opinion following them is a good idea: they are aware of these annoyances and we can be reasonably sure what they say is really correct, and not only correct up to sign or something

Riccardo Brasca (Oct 12 2021 at 14:04):

There is also this :face_palm:

Johan Commelin (Oct 12 2021 at 14:08):

@Riccardo Brasca Great! That's a useful link!

Patrick Massot (Oct 12 2021 at 14:12):

What a nice read when you have difficulties finding sleep...

Scott Morrison (Oct 12 2021 at 20:11):

I think you can reproduce all these sign rules if you:

  1. write [1]A instead of A[1] for grading shifts
  2. insert a sign every time a "graded symbol" (a differential, an element, or a shift functor) moves past another graded symbol (in the purely syntactic sense of formulas written on the page).

Kevin Buzzard (Oct 12 2021 at 20:59):

It's a bit terrifying that "random" sign choices are being deemed "canonical"

Julian Külshammer (Oct 12 2021 at 21:12):

I know 2 as the Koszul sign rule, not sure who gave it its name, but in the literature I'm reading it is the standard choice for the "random" sign conventions.

Scott Morrison (Oct 12 2021 at 22:30):

I really don't think they are random. If you draw the relevant string diagram in the monoidal category SVect (or super-whatever), and remember that the braiding there is not the braiding in Z/2Z graded Vect, then the number of minus signs is always the number of times you use the nontrivial part of the braiding. In normal langauge, this just compiles down the the usual Koszul sign rule --- read the literal order of symbols appearing on either side of an equation, calculate the permutation that has been applied, and put in a minus sign every time you transposed two odd symbols.

Scott Morrison (Oct 12 2021 at 22:31):

As I said above, this only reproduces the rules in Stacks if you write grading shifts "on the left", i.e. as [1]A instead of A[1].

Scott Morrison (Oct 12 2021 at 22:32):

(One could even imagine a type-checker for the Koszul sign rule, given that it is purely syntactic...)

Reid Barton (Oct 12 2021 at 22:45):

While you're at it, you could also use a less confusing notation for the shift like ΣA... oops maybe not a great idea in Lean

Scott Morrison (Oct 12 2021 at 22:49):

There are lots of unicode variants: 𝛴A, ⅀A, ⨊A, ...

Scott Morrison (Oct 12 2021 at 22:49):

The italic sigma is actually pretty nice.

Johan Commelin (Oct 13 2021 at 04:51):

Hmm, I like the idea of refactoring has_shift to use a sigma-like notation

Peter Scholze (Oct 13 2021 at 07:41):

Wait, do you actually think that ΣA\Sigma A is a good notation for the shift? (Well, maybe my dislike for the topologists' Σ\Sigma notation stems more from disliking Σ+\Sigma^\infty_+ as a way to denote what is essentially a free abelian group. But it also has an unfortunate clash with "sum".)

Kevin Buzzard (Oct 13 2021 at 07:46):

The notation for quadratic residues has an unfortunate clash with fractions in brackets, but we don't seem to get confused.

Reid Barton (Oct 13 2021 at 09:52):

Peter Scholze said:

Wait, do you actually think that ΣA\Sigma A is a good notation for the shift?

No, I think it's a good notation for the suspension :upside_down:
I can never remember which direction is "the shift", or which direction is A[1]A[1]. But ΣA\Sigma A has to be the thing in the cofiber sequence ABCΣAA \to B \to C \to \Sigma A, and so πn+1(ΣA)=πn(A)\pi_{n+1}(\Sigma A) = \pi_n(A).
From my perspective the Stacks project is doing something strange, writing ABCA[1]A \to B \to C \to A[-1] for a cofiber sequence of chain complexes, but ABCA[1]A \to B \to C \to A[1] for a cofiber sequence of cochain complexes. I would rather think of both chain complexes and cochain complexes as sitting inside unbounded complexes, with the cochain complexes in negative degree. So, those conventions don't really work for me. Luckily, it doesn't affect the sign conventions because ii and i-i have the same parity.

Matthew Ballard (Oct 13 2021 at 10:31):

Another standard one is SnAS^nA

Johan Commelin (Oct 13 2021 at 12:48):

https://unicode-table.com/en/search/?q=shift lists some unicode symbols related to "shift". All of them will be considered unorthodox :rofl:

Johan Commelin (Oct 13 2021 at 12:53):

Does anyone know how to get the LES for the distinguished triangle τi+1CτiCHi(C)[i]τ_{≥ i+1} C → τ_{≥ i} C → H_i(C)[-i] in a hands-on manner? Currently, the only way I see is to show that the homotopy category of complexes is a pre-triangulated category and setup the general machinery. Are there viable shortcuts?

Matthew Ballard (Oct 13 2021 at 12:53):

:point_left:nA{}^nA has my vote

Matthew Ballard (Oct 13 2021 at 12:58):

Johan Commelin said:

Does anyone know how to get the LES for the distinguished triangle τi+1CτiCHi(C)[i]τ_{≥ i+1} C → τ_{≥ i} C → H_i(C)[-i] in a hands-on manner? Currently, the only way I see is to show that the homotopy category of complexes is a pre-triangulated category and setup the general machinery. Are there viable shortcuts?

Does this arise from a SES of complexes? I always get my truncations confused

Johan Commelin (Oct 13 2021 at 13:02):

I guess you can see it as τi+1(τiC)τiCτi(τiC)τ_{≥ i+1} (τ_{≥ i} C) → τ_{≥ i} C → τ_{≤ i} (τ_{≥ i} C)

Johan Commelin (Oct 13 2021 at 13:02):

Not sure if that helps.

Matthew Ballard (Oct 13 2021 at 13:27):

kerdi=kerdi = 0kerdiCidiCi+1 di= 0kerdi+1Ci+1 Hi+1(C) \begin{CD} @. \ker d^i @>=>> \ker d^i @. \\ @. @V=VV @VVV @. \\ 0 @>>> \ker d^i @>>> C^i @>d^i>> C^{i+1} \\ @. @VVV @Vd^iVV @V=VV \\ @. 0 @>>> \ker d^{i+1} @>>> C^{i+1} \\ @. @. @VVV @. \\ @. @. H^{i+1}(C) @. \end{CD}

This?

Johan Commelin (Oct 13 2021 at 13:29):

Your CD skills are impressive! I didn't know Zulip could do this!

Matthew Ballard (Oct 13 2021 at 13:30):

It is only the commutative diagram package handled by KaTeX. :cry:

Johan Commelin (Oct 13 2021 at 13:30):

You will have to help me a bit with understanding how this helps us with getting the LES for Ext(_, V) applied to that triangle.

Matthew Ballard (Oct 13 2021 at 13:30):

If I pretend the top row is 00, then I have a short exact sequence of complexes

Johan Commelin (Oct 13 2021 at 13:32):

But it isn't termwise split, so we would still need to work, right?

Matthew Ballard (Oct 13 2021 at 13:33):

Good point. I was thinking of just homology in my head

Matthew Ballard (Oct 13 2021 at 13:34):

Do you have injectives?

Patrick Massot (Oct 13 2021 at 13:34):

This CD code brings back very old memories...

Johan Commelin (Oct 13 2021 at 13:36):

@Matthew Ballard Mathlib only knows about projectives and projective resolutions atm

Johan Commelin (Oct 13 2021 at 13:36):

It doesn't yet know how to apply a derived functor to a complex, but we will certainly need to teach it that.

Matthew Ballard (Oct 13 2021 at 13:36):

I guess assume that each CiC^i is projective then.

Johan Commelin (Oct 13 2021 at 13:37):

I don't think we can do that. So we'll have to replace the complexes with quasi-isomorphic complexes consisting of projectives.

Matthew Ballard (Oct 13 2021 at 13:38):

There are a lot of equalities in the diagram. The only issue is whether the middle column can be kept exact.

Johan Commelin (Oct 13 2021 at 13:40):

But how does a SES of complexes help, if it's not termwise split?

Johan Commelin (Oct 13 2021 at 13:40):

After applying Hom(_, V) you end up with a SneS of complexes, and then what do you do?

Matthew Ballard (Oct 13 2021 at 13:41):

SES of complexes => LES of homology requires some assumptions on the complex?

Johan Commelin (Oct 13 2021 at 13:48):

I dunno. Whatever we do, it will need to be explained to Lean.

Matthew Ballard (Oct 13 2021 at 13:54):

0 0Ci1CiwDi1vDiuyEi1xEi0 0\begin{CD} 0 @. 0 \\ @VVV @VVV \\ C^{i-1} @>>> C^i \\ @VVV @VwVV \\ D^{i-1} @>v>> D^i \\ @VuVV @VyVV \\ E^{i-1} @>x>> E^i \\ @VVV @VVV \\ 0 @. 0 \end{CD}

Given eEi1e \in E^{i-1} with x(e)=0x(e) = 0, pick some dDi1d \in D^{i-1} with u(d)=eu(d) = e. Then yv(d)=0yv(d) = 0 so there is a cCic \in C^i with w(c)=v(d)w(c) = v(d). This should induce the map

Hi1(E)Hi(C)H^{i-1}(E) \to H^i(C)

Johan Commelin (Oct 13 2021 at 13:56):

Aah, sure. So a SES of complexes gives you a LES of homology. We almost have this in Lean.

Matthew Ballard (Oct 13 2021 at 13:56):

I thought so.

Johan Commelin (Oct 13 2021 at 13:56):

But if you have that triangle of truncations, you first need to apply Hom(_, V). And that will destroy all SESiness, unless you have split SES's.

Matthew Ballard (Oct 13 2021 at 13:56):

I store this in the same part of my brain with :five:

Matthew Ballard (Oct 13 2021 at 14:01):

Since everyone other column is an identity map, you only need to worry about exactness of

0Hom(kerdi,V)Hom(Ci,V)Hom(kerdi+1,V)Hom(Hi+1(C),V)00 \leftarrow \operatorname{Hom}(\ker d^i, V) \leftarrow \operatorname{Hom}(C^i,V) \leftarrow \operatorname{Hom}(\ker d^{i+1},V) \leftarrow \operatorname{Hom}(H^{i+1}(C),V) \leftarrow 0

But in general, this is probably not exact without some conditions on VV.

Matthew Ballard (Oct 13 2021 at 14:06):

Perhaps you can say that

Johan Commelin (Oct 13 2021 at 14:18):

Yup, exactly

Johan Commelin (Oct 13 2021 at 14:18):

But to do that, we might need to develop quite some machinery

Johan Commelin (Oct 13 2021 at 14:20):

Note that it's not clear to me that C consists of projective objects in our application. So even that $$\text{Cone}(_ → _)$$ will require some extra help, when we want to take Ext(_, V)

Matthew Ballard (Oct 13 2021 at 14:21):

It would be very nice if some version of Lemma 1.2 is true in this setting.

Peter Scholze (Oct 13 2021 at 14:33):

Reid Barton said:

From my perspective the Stacks project is doing something strange, writing ABCA[1]A \to B \to C \to A[-1] for a cofiber sequence of chain complexes, but ABCA[1]A \to B \to C \to A[1] for a cofiber sequence of cochain complexes.

Wait, this is what the Stacks Project does? That's awkward indeed. I always thought that shifts are normalized so that there are triangles

ABCA[1] A\to B\to C\to A[1]

no matter what your other conventions are. This means that M[n]M[n] puts an object MM into homological degree nn (=cohomological degree n-n), so this gives a slight bias to homological conventions, which I'm fine with. [Drinfeld recently wrote a paper about DG algebras in cohomological degrees 00 and 1-1...]

(Aaah, the Stacks project is even weirder: It adapts its shift according to whether things are homological or cohomological, but it uses the unintuitive normalization in both cases! runs away screaming :running: :scream: )

Johan Commelin (Oct 13 2021 at 14:36):

Right, the axioms of a triangulated category basically force these conventions on you (which might not even be the best reason out there).

Riccardo Brasca (Feb 14 2022 at 16:29):

I am working on the LES for derived functor. Specifically on the following lemma.

lemma six_term_exact_seq [F.additive] (n : ) (A : short_exact_sequence C) :
  exact_seq D [
    (F.left_derived (n+1)).map A.f, (F.left_derived (n+1)).map A.g,
    δ F n A,
    (F.left_derived n).map A.f, (F.left_derived n).map A.g]

Adam Topaz (Feb 14 2022 at 19:25):

There is one more thing that has been lingering in the background.... It's hard to compute Ext.

Here is the current definition of Ext:

/--
`Ext R C n` is defined by deriving in the frst argument of `(X, Y) ↦ Module.of R (unop X ⟶ Y)`
(which is the second argument of `linear_yoneda`).
-/
@[simps]
def Ext (n : ) : Cᵒᵖ  C  Module R :=
functor.flip
{ obj := λ Y, (((linear_yoneda R C).obj Y).right_op.left_derived n).left_op,
  map := λ Y Y' f, (nat_trans.left_derived ((linear_yoneda R C).map f).right_op n).left_op,
  map_id' := ...,
  map_comp' := ... }.

So, essentially, you take an opposite, compute a left derived functor, and take another opposite.

As far as I know, we still don't really have a good way of identifying Ext with the homology of Hom(P,B) where P is a projective resolution, because of this really annoying issue of going between homology f.op g.op and op (homology g f)..

Johan Commelin (Feb 16 2022 at 16:25):

In for_mathlib/derived_functor there is now a completely sorry-free proof of LES for left derived functors, except for the degree 0 part.

Johan Commelin (Feb 16 2022 at 16:26):

lemma six_term_exact_seq [F.additive] (n : ) (A : short_exact_sequence C) :
  exact_seq D [
    (F.left_derived (n+1)).map A.f, (F.left_derived (n+1)).map A.g,
    δ F n A,
    (F.left_derived n).map A.f, (F.left_derived n).map A.g] :=
begin
  refine exact_seq.cons _ _ (exact_of_short_exact _ _ _) _ _,
  refine exact_seq.cons _ _ (exact_of_short_exact.δ_right _ _ _) _ _,
  refine exact_seq.cons _ _ (exact_of_short_exact.δ_left _ _ _) _ _,
  refine exact_seq.cons _ _ (exact_of_short_exact _ _ _) _ _,
  apply exact_seq.single,
end

Johan Commelin (Feb 16 2022 at 16:26):

For the degree 0 part, we will actually need to tell Lean what a right exact functor is :rofl:

Adam Topaz (Feb 16 2022 at 16:36):

docs#category_theory.limits.preserves_finite_colimits ?

Riccardo Brasca (Feb 16 2022 at 16:38):

What we need is that it sends a short exact sequence to a short(er) exact sequence, but this should follows from that definition without too much trouble I hope.

Adam Topaz (Feb 16 2022 at 16:39):

Well, what I mean is that preserving finite colimits is a more general way to phrase right exactness.

Johan Commelin (Feb 16 2022 at 16:43):

Yeah, we should just use that.

Johan Commelin (Feb 16 2022 at 16:44):

Do we already know that between abelian cats, such a functor preserves epis?

Adam Topaz (Feb 16 2022 at 16:44):

Johan Commelin said:

Do we already know that between abelian cats, such a functor preserves epis?

I'm not sure...

Johan Commelin (Feb 16 2022 at 16:44):

The tail of the LES should now be really easy.

Andrew Yang (Feb 16 2022 at 16:46):

I think we know that pushout-preserving functors preserve epis. But there might be universe issues?

Adam Topaz (Feb 16 2022 at 16:47):

@Andrew Yang do you remember what the lemma is called?

Johan Commelin (Feb 16 2022 at 16:48):

But there might be universe issues?

I hope not!

Adam Topaz (Feb 16 2022 at 16:49):

I mean, we can always use docs#category_theory.limits.epi_of_is_colimit_parallel_pair

Andrew Yang (Feb 16 2022 at 16:49):

Oh we don't. But this should be an easy dualization of docs#category_theory.preserves_mono.
Looking at the code I think I might have solved the universe issue some weeks ago.

Adam Topaz (Feb 16 2022 at 16:50):

Express your epi as a coequalizer, and use the fact that coequalizers are preserved, etc..

Andrew Yang (Feb 16 2022 at 17:06):

Done in #12084.

Riccardo Brasca (Feb 17 2022 at 14:06):

Maybe someone wants to help to prove that if ABC0A \to B \to C \to 0 is exact then also F(A)F(B)F(C)0F(A) \to F(B) \to F(C) \to 0 is exact? The fact that FF preserves epi takes care of the last exactness, but I am a little bit lost in the API to prove exactness at F(B)F(B).

Adam Topaz (Feb 17 2022 at 14:10):

Since BCB \to C is a cokernel of ABA \to B and FF preserves finite colimits (in particular, cokernels), you should get that F(B)F(C)F(B) \to F(C) is the cokernel of F(A)F(B)F(A) \to F(B).

Adam Topaz (Feb 17 2022 at 14:10):

Which file are you working on? I can write down this proof.

Riccardo Brasca (Feb 17 2022 at 14:11):

Yes, this is the math proof I have. It's probably my fault, but I am getting a little bit crazy about stating this in mathlib.

Riccardo Brasca (Feb 17 2022 at 14:11):

Yes please, it's probably more helpful for me to read your proof later.

Adam Topaz (Feb 17 2022 at 14:12):

Is this in for_mathlib/exact_seq.lean?

Riccardo Brasca (Feb 17 2022 at 14:13):

Yes, I am pushing what I've written, but it is essentially a random mess.

Adam Topaz (Feb 17 2022 at 14:13):

Okay. I'll get some coffee first :coffee:

Riccardo Brasca (Feb 17 2022 at 14:14):

It's at the end of the file

Riccardo Brasca (Feb 17 2022 at 14:14):

Thanks!

Riccardo Brasca (Feb 17 2022 at 14:14):

The lemma we want is preserves_exact_seq, I am not sure the one before is true/needed.

Adam Topaz (Feb 17 2022 at 15:09):

Okay, there is one sorry left for this:

def cokernel_comparison : cokernel f  A₃ :=
  cokernel.desc f g $ comp_eq_zero ex

instance : is_iso (cokernel_comparison ex) := sorry

I.e. if ABC0A \to B \to C \to 0 is exact, then the canonical map from the cokernel of ABA \to B to CC is an isomorphism.
This can be proved (in a somewhat clunky way) using pseudoelements.

My class has a midterm in an hour or so, so I can't finish this off right now, but it should be doable.

Riccardo Brasca (Feb 17 2022 at 15:12):

I am having a look, thanks a lot!

Adam Topaz (Feb 17 2022 at 15:15):

It would be nice to build some more api around exact_seq [f, g, 0], which should essentially encapsulate the fact that A_3 is the cokernel of f (e..g. have a exact_seq.desc, etc.)

Riccardo Brasca (Feb 17 2022 at 16:01):

The proof is probably not the best one, but it is done.

Johan Commelin (Feb 17 2022 at 16:30):

Awesome! Does that mean that the degree 0 part is completely done? Or do you still need some glue?

Riccardo Brasca (Feb 17 2022 at 16:45):

Ah no, you are overestimating me! Now F sends the final part of the projective resolution to an exact sequence. I think this easily implies that left_derived F 0 A ≅ A, so we have a square. We need to prove it commutes.

Riccardo Brasca (Feb 18 2022 at 07:45):

Andrew Yang said:

But there might be universe issues?

I am not sure you were talking about this, but to use docs#category_theory.limits.preserves_finite_colimits I had to write

variables {C : Type u} {D : Type v} [category.{w} C] [category.{w} D]

Note the w that is there twice.

Andrew Yang (Feb 18 2022 at 09:00):

Oh I did not know that this is not yet generalized. Does this cause any problem?

Riccardo Brasca (Feb 18 2022 at 09:07):

I don't know what it will happen at the end. At the moment I am using w twice, but sooner or later we will want to apply the general machinery to a concrete situation.

Riccardo Brasca (Feb 18 2022 at 15:56):

Does anyone see a quick way of closing the goal here?

import category_theory.abelian.exact
import category_theory.preadditive.additive_functor
import category_theory.preadditive.projective

universes w u v

noncomputable theory

open category_theory category_theory.functor category_theory.limits

variables {C : Type u} {D : Type v} [category.{w} C] [category.{w} D] [abelian C] [abelian D]
variables (F : C  D) [additive F] {X : C}
variables [limits.preserves_finite_colimits F] [enough_projectives C]

def cokernel_homology {X Y Z : C} (f : X  Y) :
  cokernel f  homology f (0 : Y  Z) (by simp) :=
cokernel.desc _ (limits.factor_thru_kernel_subobject _ (𝟙 _) (by simp)  (homology.π _ _ _))
begin
  sorry
end

(Or another way of constructing the morphism). I need an iso, but I already have the morphism in the other direction.

Adam Topaz (Feb 18 2022 at 15:57):

Ugh... this should be easy if we defined homology without subobjects.

Riccardo Brasca (Feb 18 2022 at 15:58):

Yes, I HATE this image_to_kernel stuff...

Adam Topaz (Feb 18 2022 at 15:58):

You can use docs#homology_iso_cokernel_lift

Adam Topaz (Feb 18 2022 at 15:59):

https://github.com/leanprover-community/lean-salamander/blob/master/src/homology.lean

Adam Topaz (Feb 18 2022 at 16:00):

I think homology should be defined as cokernel (kernel.lift g f w)..

Filippo A. E. Nuccio (Feb 18 2022 at 16:00):

Adam Topaz said:

https://github.com/leanprover-community/lean-salamander/blob/master/src/homology.lean

I can't click this link...

Riccardo Brasca (Feb 18 2022 at 16:00):

It works for me, it must be some permission.

Adam Topaz (Feb 18 2022 at 16:00):

Ooops... here is the content:

Riccardo Brasca (Feb 18 2022 at 16:01):

In any case thanks a lot! I have to stop now, but I will have a close look later.

Riccardo Brasca (Feb 18 2022 at 16:07):

You redefined homology but you didn't prove it's the same as in mathlib, right? In any case I hope using docs#homology_iso_cokernel_lift will help.

Adam Topaz (Feb 18 2022 at 16:08):

Right, I'm not suggesting to use that other file. In this case you can get by with docs#homology_iso_cokernel_lift together with cokernel.desc and/or cokernel.map.

Riccardo Brasca (Feb 18 2022 at 20:09):

def functor.left_derived.zero_iso [enough_projectives C] : (F.left_derived 0).obj X  F.obj X

is sorry free, but it is quite slow and it is defined in tactic mode, that it's bad. I am done for today, if someone wants to have a look it is derived_functor.lean, at the end.

Riccardo Brasca (Feb 18 2022 at 20:11):

Of course what we really want is an iso of functors, but this is a start.

Riccardo Brasca (Feb 18 2022 at 20:15):

It's even possible that defining the natural transformation and showing that its component are iso will be less cumbersome.

Johan Commelin (Feb 19 2022 at 05:02):

Thanks a lot for hacking on this!


Last updated: Dec 20 2023 at 11:08 UTC