Zulip Chat Archive

Stream: Is there code for X?

Topic: Mul eq implies a ne 0 (for div_ring)


Ben (Nov 15 2022 at 10:44):

Looking for a lemma like... is it even true :joy:?

example {R: Type} [division_ring R] (a b: R) : a * b = 1  a  0 := begin
  assume h1,
  sorry
end

Riccardo Brasca (Nov 15 2022 at 10:48):

In general it is (much) better to have a math proof before starting formalizing stuff. So first of all you should find a pen and paper proof, and then think about the formalization (for example, do you know that a ≠ 0 means a = 0 → false in Lean?).

Ben (Nov 15 2022 at 11:01):

Ya I sort of understand all the parts. Hoping writing it out in Lean makes me see how it all goes together. I now have the following

example {R: Type} [division_ring R] (a b: R) : a * b = 1  a  0 := begin
  assume h1,
  rw ne.def,
  assume eq_zero,
  rw [eq_zero, zero_mul] at h1,
  have h2 := zero_ne_one,
  contradiction
end

But it fails here because zero_ne_one is based on mul_zero_one_class (or something like that) and doesn't like it that I am using it in the context of a ring.


Last updated: Dec 20 2023 at 11:08 UTC