Conversation
Welcome new contributor!Thank you for contributing to Mathlib! If you haven't done so already, please review our contribution guidelines, as well as the style guide and naming conventions. In particular, we kindly remind contributors that we have guidelines regarding the use of AI when making pull requests. We use a review queue to manage reviews. If your PR does not appear there, it is probably because it is not successfully building (i.e., it doesn't have a green checkmark), has the If you haven't already done so, please come to https://leanprover.zulipchat.com/, introduce yourself, and mention your new PR. Thank you again for joining our community. |
PR summary 2fecd40b78Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
| Current number | Change | Type (weak) |
|---|---|---|
| exposed public sections | 5074 | 1 |
Current commit 2fecd40b78
Reference commit 065356127b
This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/technical-debt-metrics.py pr_summary
- The
relativevalue is the weighted sum of the differences with weight given by the inverse of the current value of the statistic. - The
absolutevalue is therelativevalue divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).
|
Hello, can you disclose any AI usage per the contribution guidelines (linked above)? |
none |
ScottCarnahan
left a comment
There was a problem hiding this comment.
These results would make a fine addition to mathlib. My main suggestion is to look over the mathlib naming conventions page.
| /- If a field admits an algebraically closed extension of degree dividing a prime `p`, any | ||
| polynomial either has a root or has all irreducible divisors of degree `p` and degree | ||
| divisible by `p`. -/ | ||
| lemma divisor_by_finrank {p : ℕ} (f : F[X]) (hr : finrank F K ∣ p) (hp : p.Prime) : |
There was a problem hiding this comment.
| lemma divisor_by_finrank {p : ℕ} (f : F[X]) (hr : finrank F K ∣ p) (hp : p.Prime) : | |
| lemma exists_root_or_all_irreducible_divisors {p : ℕ} (f : F[X]) (hr : finrank F K ∣ p) (hp : p.Prime) : |
Feel free to use a name that you prefer, but it should reflect the statement of the lemma somehow.
There was a problem hiding this comment.
I confess I find these naming conventions an utter mystery, so I mostly followed your suggestions.
| polynomial either has a root or has all irreducible divisors of degree `p` and degree | ||
| divisible by `p`. -/ |
There was a problem hiding this comment.
| polynomial either has a root or has all irreducible divisors of degree `p` and degree | |
| divisible by `p`. -/ | |
| polynomial either has a root or has all irreducible divisors of degree `p`. -/ |
| have ⟨x, hx⟩ := exists_root_of_natDegree_eq_one h | ||
| exact ⟨x, hx.dvd h2⟩ | ||
|
|
||
| lemma divisor_by_finrank' {p : ℕ} (f : F[X]) (hr : finrank F K ∣ p) (hp : p.Prime) : |
There was a problem hiding this comment.
| lemma divisor_by_finrank' {p : ℕ} (f : F[X]) (hr : finrank F K ∣ p) (hp : p.Prime) : | |
| lemma exists_root_or_all_irreducible_divisors' {p : ℕ} (f : F[X]) (hr : finrank F K ∣ p) (hp : p.Prime) : |
| f (fun d _ h1 h2 ↦ (h d h1 h2).symm.dvd)) | ||
|
|
||
| /- A field admitting a finite extension which is algebraically closed is perfect. -/ | ||
| lemma finite_alg_closure_perfect [hf : FiniteDimensional F K] : PerfectField F := by |
There was a problem hiding this comment.
| lemma finite_alg_closure_perfect [hf : FiniteDimensional F K] : PerfectField F := by | |
| lemma perfect_of_finite_dimensional [hf : FiniteDimensional F K] : PerfectField F := by |
|
|
||
| /- If a field admits an extension of prime degree `p` which is algebraically closed, then | ||
| its characteristic cannot equal `p`. -/ | ||
| lemma finite_alg_closure_prime {p : ℕ} (hp : p.Prime) (hr : finrank F K = p) : ¬CharP F p := by |
There was a problem hiding this comment.
| lemma finite_alg_closure_prime {p : ℕ} (hp : p.Prime) (hr : finrank F K = p) : ¬CharP F p := by | |
| lemma not_charP_of_finrank {p : ℕ} (hp : p.Prime) (hr : finrank F K = p) : ¬CharP F p := by |
|
|
||
| /- If `a` and `b` belong to a field which admits an algebraically closed quadratic extension, | ||
| then one of `a^2 + b` or `-b` is a square. -/ | ||
| lemma quadratic_alg_closure (h : finrank F K ∣ 2) (a b : F) : |
There was a problem hiding this comment.
| lemma quadratic_alg_closure (h : finrank F K ∣ 2) (a b : F) : | |
| lemma isSquare_mul_add_or_isSquare_neg (h : finrank F K ∣ 2) (a b : F) : |
|
|
||
| /- A field containing a square root of `-1` and admitting a finite extension which is algebraically | ||
| closed is itself algebraically closed. -/ | ||
| lemma finite_alg_closure_i [hf : FiniteDimensional F K] (hm : IsSquare (-1 : F)) : |
There was a problem hiding this comment.
| lemma finite_alg_closure_i [hf : FiniteDimensional F K] (hm : IsSquare (-1 : F)) : | |
| lemma isAlgClosed_of_isSquare_neg_one [hf : FiniteDimensional F K] (hm : IsSquare (-1 : F)) : |
| /- A field in which `-1` is not a square, but adjoining its square root gives an algebraic | ||
| closure, is real closed. -/ | ||
| omit Hac in | ||
| lemma RealClosed_from_quadratic (h1 : ¬IsSquare (-1 : F)) (h2 : ∃ i : K, i ^ 2 = -1 ∧ |
There was a problem hiding this comment.
| lemma RealClosed_from_quadratic (h1 : ¬IsSquare (-1 : F)) (h2 : ∃ i : K, i ^ 2 = -1 ∧ | |
| lemma isRealClosed_of_isAlgClosed_adjoin (h1 : ¬IsSquare (-1 : F)) (h2 : ∃ i : K, i ^ 2 = -1 ∧ |
| have h := irreducible_artinSchreierPoly_tower hp rfl a x ha | ||
| have h := (degree_eq_iff_natDegree_eq_of_pos one_pos).mp (Hac.degree_eq_one_of_irreducible K h) |
There was a problem hiding this comment.
| have h := irreducible_artinSchreierPoly_tower hp rfl a x ha | |
| have h := (degree_eq_iff_natDegree_eq_of_pos one_pos).mp (Hac.degree_eq_one_of_irreducible K h) | |
| have h := (degree_eq_iff_natDegree_eq_of_pos one_pos).mp (Hac.degree_eq_one_of_irreducible K (irreducible_artinSchreierPoly_tower hp rfl a x ha) |
| have hp1 := hp.one_lt | ||
| have := (Algebra.charP_iff F K p).mp ‹CharP F p› | ||
| have h := (artinSchreierPoly_irreducible_or_splits _).resolve_left h | ||
| have h_a {E} [Field E] (x : E) := artinSchreierPoly_isMonicOfDegree x hp1 | ||
| have h_a1 := h_a ((algebraMap F K) a * x ^ (p-1)) | ||
| have hs := (degree_eq_iff_natDegree_eq h_a1.ne_zero).mp.mt (h_a1.1.trans_ne hp.ne_zero) | ||
| have hy := eval_rootOfSplits h hs |
There was a problem hiding this comment.
I haven't tried golfing your proof, but it is unusual to need this many haves in succession.
There was a problem hiding this comment.
They are all used but not all at once, I shuffled things around a bit in the last commit.
|
I've thought a bit about how to formalise this stuff in the past. I'll review shortly. One immediate comment is that I think this would be better as two PRs: one for Artin-Schreier extensions / classification and one for the link to ACFs/RCFs. |
Fair enough, see #43947 for the former (which I'll make a dependency for this). |
|
|
||
| # Artin-Schreier theorem | ||
|
|
||
| This file proves the Artin-Schreier theorem `isAlgClosed_or_isRealClosed`: | ||
| a field admitting a finite extension which is algebraically closed is either algebraically | ||
| closed or real closed. | ||
|
|
There was a problem hiding this comment.
| # Artin-Schreier theorem | |
| This file proves the Artin-Schreier theorem `isAlgClosed_or_isRealClosed`: | |
| a field admitting a finite extension which is algebraically closed is either algebraically | |
| closed or real closed. | |
| # Artin-Schreier theorem | |
| This file proves the Artin-Schreier theorem `isAlgClosed_or_isRealClosed`: | |
| a field admitting a finite extension which is algebraically closed is either algebraically | |
| closed or real closed. |
|
|
||
| /- The Artin-Schreier theorem: a field admitting a finite extension which is algebraically closed | ||
| is either algebraically closed or real closed. -/ | ||
| public theorem isAlgClosed_or_isRealClosed (F : Type u) (K : Type u) [Field F] [Field K] |
There was a problem hiding this comment.
We can have this version of the theorem, but I think this should itself be a corollary of the two theorems corresponding to each of the branches. If -1 is a square then F is algebraically closed; if -1 is not a square then F is real closed.
There was a problem hiding this comment.
Also, is your proof is able to recover the fact that the extension is of degree 1 or 2 in the respective cases?
| let n := exponent E K | ||
| rcases expChar_is_prime_or_one E p with h | h | ||
| · have : PerfectRing E p := by | ||
| refine ofSurjective E p (fun b ↦ ?_) |
There was a problem hiding this comment.
| refine ofSurjective E p (fun b ↦ ?_) | |
| refine ofSurjective E p fun b ↦ ?_ |
| rcases expChar_is_prime_or_one E p with h | h | ||
| · have : PerfectRing E p := by | ||
| refine ofSurjective E p (fun b ↦ ?_) | ||
| obtain ⟨x, hx⟩ := Hac.exists_pow_nat_eq ((algebraMap E K) b) (expChar_pow_pos E p (n + 1)) |
There was a problem hiding this comment.
| obtain ⟨x, hx⟩ := Hac.exists_pow_nat_eq ((algebraMap E K) b) (expChar_pow_pos E p (n + 1)) | |
| obtain ⟨x, hx⟩ := Hac.exists_pow_nat_eq (algebraMap E K b) (expChar_pow_pos E p (n + 1)) |
| have : PerfectField E := by | ||
| let n := exponent E K | ||
| rcases expChar_is_prime_or_one E p with h | h | ||
| · have : PerfectRing E p := by |
There was a problem hiding this comment.
I think it might be a bit clearer to start the proof with suffices PerfectRing E p from toPerfectField E p. Saves you the indent.
|
This PR/issue depends on:
|
Implement the theorem of Artin-Schreier that a field with a finite algebraically closed extension is either algebraically closed or real closed. Depends on Artin-Schreier extensions of fields of characteristic p (#43947).