Zulip Chat Archive
Stream: Is there code for X?
Topic: has_smul ℚ k for field k
Winston Yin (Jul 07 2022 at 21:43):
Would it be meaningful to define the action of the rationals on any field k? For example, λ q c, if q.num = 0 then 0 else q.num • c * c / (q.denom • c)
Violeta Hernández (Jul 07 2022 at 21:52):
What if the field has finite characteristic?
Violeta Hernández (Jul 07 2022 at 21:53):
Might still work, I don't know, but you might end up with some perhaps unexpected divisions by zero
Eric Wieser (Jul 07 2022 at 21:56):
I guess you want more than docs#algebra_rat
Eric Wieser (Jul 07 2022 at 22:05):
I think you could prove that q.num • c * c / (q.denom • c) = q • c
in char zero (where the RHS is algebra_rat)
Kevin Buzzard (Jul 08 2022 at 07:44):
Why add a non-mathematically-meaningful "action"? In characteristic p this can't be mathematically sensible.
Damiano Testa (Jul 08 2022 at 07:56):
Also, while I agree with Kevin that this does not seem like a good idea, why the case split?
import data.rat.defs
variables {k : Type*} [field k]
def mm (k : Type*) [field k]: ℚ → k → k :=
λ q c, if q.num = 0 then 0 else q.num • c * c / (q.denom • c)
def smm (k : Type*) [field k]: ℚ → k → k :=
λ q c, q.num • c * c / (q.denom • c)
example {k : Type*} [field k] : mm k = smm k :=
begin
funext,
unfold mm,
unfold smm,
split_ifs,
simp [h],
end
Last updated: Dec 20 2023 at 11:08 UTC