Zulip Chat Archive
Stream: general
Topic: delate lambda in tatic state
orlando (Apr 15 2020 at 12:51):
Hello, i have a tatic state of the form :
((Y < π1> | Y < π2>) ≫ λ (g : (Y ⟶ A) ⨯ (Y ⟶ B)), π1 g | π2 g) g = 𝟙 Y⟦(A ⨯ B)⟧ g
Is it possible to remove the lambda ? To have something like :
(Y < π1> | Y < π2>) ≫ (π1 g | π2 g) = 𝟙 Y⟦(A ⨯ B)⟧ g
i.e reduce the \lambda
, i thinck it's the name of the operation ?
Thx
Patrick Massot (Apr 15 2020 at 12:53):
dsimp only
Patrick Massot (Apr 15 2020 at 12:53):
But really we should have a beta_reduce
tactic.
Kevin Buzzard (Apr 15 2020 at 12:54):
I usually just type dsimp
to do this. dsimp only
what?
orlando (Apr 15 2020 at 12:55):
Ok so the operation that i want is named beta reduction :
with dsimp,
(π1 ((Y < π1> | Y < π2>) g) | π2 ((Y < π1> | Y < π2>) g)) = g
nice !
Reid Barton (Apr 15 2020 at 12:57):
dsimp only []
orlando (Apr 15 2020 at 12:59):
no dsimp only
and dsimp only [],
fail but dsimp transform my expression !
orlando (Apr 15 2020 at 13:00):
my code is a little too long to put here
Kevin Buzzard (Apr 15 2020 at 13:00):
Maybe you could find out what's going on with squeeze_simp
Kevin Buzzard (Apr 15 2020 at 13:01):
dsimp
means something like "use only the simp lemmas whose proof is rfl
"
Reid Barton (Apr 15 2020 at 13:01):
But you don't actually have a lambda applied to something, do you?
Reid Barton (Apr 15 2020 at 13:01):
The reverse category composition order makes everything hard to read :frown:
Kevin Buzzard (Apr 15 2020 at 13:03):
Scott thinks exactly the opposite.
Kevin Buzzard (Apr 15 2020 at 13:03):
Users may like to add `f ⊚ g` for composition in the standard convention, using ```lean local notation f ` ⊚ `:80 g:80 := category.comp g f -- type as \oo ```
Reid Barton (Apr 15 2020 at 13:03):
Yeah but Scott doesn't actually write any proofs...?
Reid Barton (Apr 15 2020 at 13:04):
because everything is supposed to be by obviously
Patrick Massot (Apr 15 2020 at 13:04):
He worked hard on tidy
to avoid that.
Kevin Buzzard (Apr 15 2020 at 13:04):
he writes things which mathematicians would call proofs, but which turn out to be definitions.
Reid Barton (Apr 15 2020 at 13:04):
but in the real world, it's hard
orlando (Apr 15 2020 at 13:04):
The first expression is :
((Y < π1> | Y < π2>) ≫ λ (g : (Y ⟶ A) ⨯ (Y ⟶ B)), π1 g | π2 g) g = 𝟙 Y⟦(A ⨯ B)⟧ g
so it's the left hand, a ≫ (\lambda b, f b) b
i thinck it's equal a ≫ f b
Reid Barton (Apr 15 2020 at 13:04):
I still don't understand Scott's position on the order of composition really
Patrick Massot (Apr 15 2020 at 13:04):
This is category theory, homs are not meant to be applied.
Kevin Buzzard (Apr 15 2020 at 13:04):
@orlando just imagine maps on the right :-)
Kevin Buzzard (Apr 15 2020 at 13:05):
Kevin Buzzard (Apr 15 2020 at 13:05):
then it all makes sense
Reid Barton (Apr 15 2020 at 13:05):
It's really (a ≫ (\lambda b, f b)) b = (\lambda b, f b) (a b) = f (a b)
Reid Barton (Apr 15 2020 at 13:05):
and this is awful
Patrick Massot (Apr 15 2020 at 13:06):
This is because you are applying homs to elements of the object, which is utterly bad taste for category theory minded people.
Reid Barton (Apr 15 2020 at 13:07):
Not really, because everything is really a set by Yoneda.
Kevin Buzzard (Apr 15 2020 at 13:07):
(a ≫ (\lambda b, f b)) b = (a ≫ f) b
Kenny Lau (Apr 15 2020 at 13:07):
sad CCC noises
Reid Barton (Apr 15 2020 at 13:09):
I think I've only seen one category theory paper ever that uses the ≫
direction
orlando (Apr 15 2020 at 13:09):
hum ok @Kevin Buzzard !
orlando (Apr 15 2020 at 13:10):
@Reid Barton : i thinck it's not too bad notation, when you make diagram that clear !
Reid Barton (Apr 15 2020 at 13:11):
I wonder whether it's feasible now to move ∘ to a class
Johan Commelin (Apr 15 2020 at 13:14):
Sounds like a nice idea
Reid Barton (Apr 15 2020 at 13:16):
or, it might be a disaster :slight_smile:
Scott Morrison (Apr 15 2020 at 13:16):
I'm sorry about ≫
! I was converted when I wanted to think about categories enriched in braided categories (for modelling domain walls of 3d topological phases), and composition really is a map hom(a,b) \otimes hom(b,c) \to hom(a,c), and unless you assume your braiding is symmetric, thus throwing out the nice examples, you just can't write it the other way. But this is absolutely no excuse for inflicting it on anyone else --- just the story of how I got there...
Reid Barton (Apr 15 2020 at 13:16):
but I don't think ∘ is used that frequently elsewhere anyways
Kevin Buzzard (Apr 15 2020 at 13:51):
I got used to it. For me it's helpful having it Scott's way around because when I'm staring at a commutative diagram and wanting to translate the assertion that it commutes into Lean I don't have to read everything backwards.
David Wärn (Apr 15 2020 at 14:02):
Do we have notation for reversed function application? Something like x £ f := f x
Kevin Buzzard (Apr 15 2020 at 14:03):
\mapsfrom
Kevin Buzzard (Apr 15 2020 at 14:05):
no that's something slightly different I guess. How about \gg
again?
Andrew Ashworth (Apr 15 2020 at 14:09):
isn't it $<
?
Andrew Ashworth (Apr 15 2020 at 14:10):
but we actually want |>
in the future, but it's in core
Robin Carlier (Apr 15 2020 at 14:53):
I think McLane writes stuff in the >> direction in Sheaves in Geometry and Logic
Kevin Buzzard (Apr 15 2020 at 14:55):
Or geology and logic, as it's called in the topos repo
Reid Barton (Apr 15 2020 at 15:08):
I had amazon show me a random page from this book and it happened to give the definition of category, and there it's clear that composition is written in the usual order.
Reid Barton (Apr 15 2020 at 15:08):
p. 10
Reid Barton (Apr 15 2020 at 15:08):
I think in this subject in particular it's nearly impossible to use the reverse order consistently, because all the objects being considered are closely related to sets and categories and one wants to write .
Reid Barton (Apr 15 2020 at 15:10):
That is, impossible unless one also writes function application on the other side, which is what the one paper I've seen use this convention also tries to do, but then it gets a bit weird to write things like Sub(X) or Hom(X, Y) which look like function applications with the usual order
Robin Carlier (Apr 15 2020 at 15:18):
So I just checked, and yeah, my bad on this one. I had that mistaken with some other weird convention the book has about applying a contravariant on a morphism. Anyway, it's not important.
@Kevin Buzzard You're mentioning a topos repo, I'm quite new to lean and I wanted to do some toposy-category-y stuff for fun with it, do you have a link to the repo or is it private at this point?
Reid Barton (Apr 15 2020 at 15:19):
https://github.com/b-mehta/topos
Robin Carlier (Apr 15 2020 at 15:20):
Thank you!
Bhavik Mehta (Apr 15 2020 at 17:36):
@Robin Carlier I'm currently taking a little break from adding stuff to that repo and making a bunch of PRs to mathlib instead - if there's anything in particular you'd like to work on in there (especially from the issues and coming soon list) let me know, or if you have any questions about it! :)
Robin Carlier (Apr 15 2020 at 17:44):
Ok! for now I think I will just play around with what have been done so far. However I see that the fact that any presheaf is a colimit of representable is an open issue on the repo, I might be interested in doing that later on, when I'm confident enough with lean ;)
(actually, I installed lean because I thought "hey proving co-yoneda might be a cool challenge", so it's quite a nice coincidence)
orlando (Apr 15 2020 at 18:07):
there is a version of co / Yoneda in mathlib inthe repertory "category_theory" perhaps it can help you !
Bhavik Mehta (Apr 15 2020 at 18:15):
Yes, that's a great idea! I really like the proof given in Geology and Logic (I.5, Proposition 1) in particular using the result in Theorem 2 which is useful in other contexts so I'd like to have it in the repo (and eventually in mathlib) - but of course I'd be more than happy with an alternate proof too!
Bhavik Mehta (Apr 15 2020 at 18:16):
Robin Carlier said:
I think McLane writes stuff in the >> direction in Sheaves in Geometry and Logic
I don't think so - at least not in the edition I have
Robin Carlier (Apr 15 2020 at 18:22):
Yeah no I had that mistaken for its notation for where is a presheaf
I agree with you that Th 2 is the good stuff (and to me it's the really important point, the fact that you get an adjoint pair gives sooo many nice constructions), and I was intending to do it this way.
For now I'll read a bit how things are proved in the category_theory package and in the repo to get a grasp of how things are done (I'm just fresh out of reading "Theorem Proving in Lean" and playing the natural numbers game, so I still have to get a bit more used to lean syntax/all the nice tactics around)
Bhavik Mehta (Apr 15 2020 at 18:44):
Robin Carlier said:
all the nice tactics around
On this note, if there's any tactics you think would be useful for category theory, definitely start a thread for it!
orlando (Apr 15 2020 at 19:32):
@Bhavik Mehta @Robin Carlier
A question i do a little exercice : Traduction of group structure on objet of a category with product and terminal objet. And Show that this give a structure of group on Yoneda functor. There is 3 files : here group_objet.lean
sugar_yoneda.lean
to_product.lean
- My proof is horrible cause i don't know good theorem on category perhaps.
- Do you have a cool proof of this fact : see here for definition ? Without big calculus like me :sweat_smile:
- Yesterday i try to make, group action of group object on a objet. And I asked myself the question: is there an automatic translation of the axioms of algebraics structure, For example, how to write the ring object axioms in a category ?
Is it topos theory behind ?
orlando (Apr 15 2020 at 19:34):
I don't make functoriality for the moment !
Last updated: Dec 20 2023 at 11:08 UTC