Zulip Chat Archive
Stream: Is there code for X?
Topic: square root of 1
Michael Stoll (Apr 11 2022 at 20:07):
Is this is mathlib?
lemma sqrt_of_one (R : Type*) [comm_ring R] [no_zero_divisors R] (a : R) (ha : a^2 = 1) : a = 1 ∨ a = -1 := sorry
There is docs#sq_eq_one_iff, but this requires linear_ordered_ring R
, which I don't have in my use case (where R
is a finite field). Grepping mathlib for either .* ^2 = 1
or \(.*\) = 1 ∨ \1 = -1
doesn't come up with anything else that gets remotely close.
Damiano Testa (Apr 11 2022 at 20:10):
Not really an answer, but don't division ring and comm ring introduce two ring structures?
Damiano Testa (Apr 11 2022 at 20:11):
Did you mean to use field? Or did you want something more general?
Yaël Dillies (Apr 11 2022 at 20:11):
Isn't a commutative division ring simply a field?
Michael Stoll (Apr 11 2022 at 20:13):
Sorry, I got confused. I meant [comm_ring R] [no_zero_divisors R]
(i.e., R
is a domain). It is getting late...
Michael Stoll (Apr 11 2022 at 20:14):
I'll edit the code above.
Eric Wieser (Apr 11 2022 at 20:21):
Ah yes, docs#linear_ordered_ring.is_domain
Last updated: Dec 20 2023 at 11:08 UTC