Commit 1fd32e2
feat(Algebra/Field/Power): weaken assumptions of Odd.neg_zpow (#37319)
The lemmas `Even.neg_zpow` and `Even.neg_one_zpow` are stated assuming
`[DivisionMonoid α] [HasDistribNeg α]`. However, `Odd.neg_zpow` and
`Odd.neg_one_zpow` currently assume the stronger `[DivisionRing α]`.
This PR weakens the assumption of the `Odd` lemmas to match their `Even`
counterparts.
The lemmas are currently the only content of Mathlib.Algebra.Field.Power.
That files exists in order to "define Field with minimal imports". But after this PR,
Power.lean does not rely on Mathlib.Algebra.Field.Defs any more. We hence deprecate
"Field.Power" and move the two statements to Mathlib.Algebra.Ring.Int.Parity.
---
Examples:
```
-- these all work:
example (z : ℤ) (h : Even z) : (-1 : ℂ)^z = 1 := Even.neg_one_zpow h
example (z : ℤ) (h : Even z) : (-1 : unitary ℂ)^z = 1 := Even.neg_one_zpow h
example (z : ℤ) (h : Odd z) : (-1 : ℂ)^z = -1 := Odd.neg_one_zpow h
-- but this fails without the PR:
example (z : ℤ) (h : Odd z) : (-1 : unitary ℂ)^z = -1 := Odd.neg_one_zpow h
```
[](https://gitpod.io/from-referrer/)
Co-authored-by: DHTT <prparadoxes@gmail.com>
Co-authored-by: David Gross <david.gross@thp.uni-koeln.de>1 parent 04e84bf commit 1fd32e2
3 files changed
Lines changed: 24 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | | - | |
9 | 8 | | |
10 | 9 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
0 commit comments