File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,18 @@ theorem units_eq_one_or (u : ℤˣ) : u = 1 ∨ u = -1 := by
30
30
simpa only [Units.ext_iff, units_natAbs] using natAbs_eq u
31
31
#align int.units_eq_one_or Int.units_eq_one_or
32
32
33
+ @[simp]
34
+ theorem units_ne_neg_self (u : ℤˣ) : u ≠ -u := by
35
+ rcases units_eq_one_or u with rfl | rfl <;> decide
36
+
37
+ @[simp]
38
+ theorem neg_units_ne_self (u : ℤˣ) : -u ≠ u := (units_ne_neg_self u).symm
39
+
40
+ theorem units_ne_iff_eq_neg {u u' : ℤˣ} : u ≠ u' ↔ u = -u' := by
41
+ rcases units_eq_one_or u with rfl | rfl <;>
42
+ rcases units_eq_one_or u' with rfl | rfl <;>
43
+ decide
44
+
33
45
theorem isUnit_eq_one_or {a : ℤ} : IsUnit a → a = 1 ∨ a = -1
34
46
| ⟨_, hx⟩ => hx ▸ (units_eq_one_or _).imp (congr_arg Units.val) (congr_arg Units.val)
35
47
#align int.is_unit_eq_one_or Int.isUnit_eq_one_or
You can’t perform that action at this time.
0 commit comments