Zulip Chat Archive
Stream: new members
Topic: Division by 1
Bob Rubbens (Feb 08 2024 at 16:20):
Can someone point me in the right direction? Likely I just haven't read enough docs but I can't find the page explaining how to do this:
def div_one : m / 1 = m := by
sorry
Eric Rodriguez (Feb 08 2024 at 16:21):
what is m
?
Damiano Testa (Feb 08 2024 at 16:22):
Also, probably theorem
or example
, rather than def
.
Bob Rubbens (Feb 08 2024 at 16:22):
Ah, I would like it to be a number, but if it makes things easier assume it is a Nat!
Bob Rubbens (Feb 08 2024 at 16:22):
I just noticed there is also div_eq
, so probably I can force push my way through this, but if there is an elegant way of doing it I would love to hear so
Damiano Testa (Feb 08 2024 at 16:24):
In std
this lemma already exists: docs#Nat.div_one`. Is this what you are looking for?
Bob Rubbens (Feb 08 2024 at 16:25):
Yes! I guess I don't have matlib4 installed because simp doesn't close the goal for me...?
Damiano Testa (Feb 08 2024 at 16:26):
You do not even have Std
, it seems.
Eric Rodriguez (Feb 08 2024 at 16:26):
At some point you will have to prove something by induction, that's just the way it is. What do you mean by "number"? Real, rational?
Eric Rodriguez (Feb 08 2024 at 16:27):
This can be proved for docs#DivInvMonoid s, I think, but it's somewhat cheating...
e: docs#DivInvOneMonoid !
Bob Rubbens (Feb 08 2024 at 16:28):
I guess I just want to prove it for Nat, then, I'm not looking to prove it for anything else.
Bob Rubbens (Feb 08 2024 at 16:29):
Damiano Testa said:
You do not even have
Std
, it seems.
If I do "#check Std" indeed I can't ctrl+click to anything. Is this part of matlib or a more general package?
Damiano Testa (Feb 08 2024 at 16:32):
Rather than #check
, try import Std
. Mathlib
depends on Std
, so, in some sense, it is Std
that is a part of Mathlib
, not the other way round.
Damiano Testa (Feb 08 2024 at 16:33):
If you intend to do anything at all mathematical, almost certainly it will be beneficial to use Mathlib
. Not depending on Std
means really going way back!
Bob Rubbens (Feb 08 2024 at 16:36):
This answers many more questions than I intended to ask. Thanks!
Last updated: May 02 2025 at 03:31 UTC