Zulip Chat Archive
Stream: general
Topic: calc with bij_on
Reid Barton (Jun 06 2018 at 19:46):
Is there a way I could use calc
to chain together bij_on_comp
?
bij_on_comp : bij_on g b c → bij_on f a b → bij_on (g ∘ f) a c
Reid Barton (Jun 06 2018 at 19:52):
wow, it actually works! local notation a ` ~~ ` b := bij_on _ a b
, and define a @[trans]
version of bij_on_comp
with arguments in the right order
Kevin Buzzard (Jun 06 2018 at 20:35):
Yeah we took apart calc recently and found out that it was just reading from left to right and attempting to prove a R b S c -> a T c by using results tagged with @trans
Kevin Buzzard (Jun 06 2018 at 20:39):
https://github.com/kbuzzard/mathlib/blob/master/docs/extras/calc.md
Kevin Buzzard (Jun 06 2018 at 20:39):
Calc is great.
Reid Barton (Jun 06 2018 at 20:39):
I wasn't sure whether it would also be able to handle the accumulation going on in the first parameter of bij_on
Reid Barton (Jun 06 2018 at 20:39):
but apparently it doesn't care
Kevin Buzzard (Jun 06 2018 at 20:39):
Oh I see
Kevin Buzzard (Jun 06 2018 at 20:40):
You should add a comment to the docs :-)
Kevin Buzzard (Jun 06 2018 at 20:41):
I guess the elaborator just does its best. This software is so cool
Last updated: Dec 20 2023 at 11:08 UTC