Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(FieldTheory/Galois): Fundamental theorem of infinite galois theory #16982

Open
wants to merge 165 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 163 commits
Commits
Show all changes
165 commits
Select commit Hold shift + click to select a range
50972f4
Create ClosedSubgroup.lean
Thmoas-Guan Sep 20, 2024
f2c089d
Update ProfiniteGrp.lean
Thmoas-Guan Sep 20, 2024
9027a87
add continuous mul equiv
Thmoas-Guan Sep 20, 2024
9da7264
add a theorem to ProfiniteGrp
Thmoas-Guan Sep 20, 2024
45bf888
Update Mathlib.lean
Thmoas-Guan Sep 20, 2024
1c37547
move file Galois into folder Galois
Thmoas-Guan Sep 20, 2024
fd67340
add lemmas
Thmoas-Guan Sep 20, 2024
a3605e1
add finite Galois subextension
Thmoas-Guan Sep 20, 2024
8bf0b73
add more lemmas
Thmoas-Guan Sep 20, 2024
bee7c47
Update Mathlib.lean
Thmoas-Guan Sep 20, 2024
ffd1d3d
update import
Thmoas-Guan Sep 20, 2024
5ce8bcd
Merge branch 'closed-subgroup' into Fundamental-Theorem-of-Infinite-G…
Thmoas-Guan Sep 20, 2024
602563d
Merge branch 'lemmas-of-Galois-theory' into Fundamental-Theorem-of-In…
Thmoas-Guan Sep 20, 2024
76d9e5c
add Fundamental Theorem
Thmoas-Guan Sep 20, 2024
c4b9518
basic class instances
Thmoas-Guan Sep 21, 2024
079f9c5
fix layout
Thmoas-Guan Sep 21, 2024
02a364a
coe instances
Thmoas-Guan Sep 21, 2024
542d202
bijective lemmas
Thmoas-Guan Sep 21, 2024
ef9411e
refl lemmas
Thmoas-Guan Sep 21, 2024
c82bbcf
fix simpNF
Thmoas-Guan Sep 21, 2024
d77dc44
fix simpNF
Thmoas-Guan Sep 21, 2024
6f7e223
Update ContinuousMonoidHom.lean
Thmoas-Guan Sep 21, 2024
b8c2c87
symm lemmas
Thmoas-Guan Sep 21, 2024
0833559
trans lemmas
Thmoas-Guan Sep 21, 2024
ccdb4d3
refine notation
Thmoas-Guan Sep 21, 2024
ceeefd2
Update ClosedSubgroup.lean
Thmoas-Guan Sep 22, 2024
18aac9a
Update ClosedSubgroup.lean
Thmoas-Guan Sep 22, 2024
ca14e96
Update ClosedSubgroup.lean
Thmoas-Guan Sep 22, 2024
28d59db
Update ClosedSubgroup.lean
Thmoas-Guan Sep 22, 2024
89b42d2
Merge branch 'closed-subgroup' into Fundamental-Theorem-of-Infinite-G…
Thmoas-Guan Sep 22, 2024
eaf6d41
move lemma
Thmoas-Guan Sep 22, 2024
3783f5c
move lemma
Thmoas-Guan Sep 22, 2024
08df284
Merge branch 'closed-subgroup' into Fundamental-Theorem-of-Infinite-G…
Thmoas-Guan Sep 22, 2024
4b5dadb
Update ContinuousMonoidHom.lean
Thmoas-Guan Sep 23, 2024
8d88664
add coe to Homeomorph
Thmoas-Guan Sep 23, 2024
9cddc2a
add unique
Thmoas-Guan Sep 23, 2024
6cf5cd8
add map
Thmoas-Guan Sep 23, 2024
979bd09
Merge branch 'continuous-isomorphism' into Fundamental-Theorem-of-Inf…
Thmoas-Guan Sep 23, 2024
b14bbde
Revert "Merge branch 'continuous-isomorphism' into Fundamental-Theore…
Thmoas-Guan Sep 23, 2024
72dd249
Update Galois.lean
Thmoas-Guan Sep 24, 2024
00288b9
Merge branch 'update-Galois' into lemmas-of-Galois-theory
Thmoas-Guan Sep 24, 2024
efabf3a
Revert "Merge branch 'update-Galois' into lemmas-of-Galois-theory"
Thmoas-Guan Sep 24, 2024
180c3f9
Update Galois.lean
Thmoas-Guan Sep 24, 2024
504d2c9
Merge branch 'update-Galois-for-merge' into lemmas-of-Galois-theory
Thmoas-Guan Sep 24, 2024
2241efa
Revert "Merge branch 'update-Galois-for-merge' into lemmas-of-Galois-…
Thmoas-Guan Sep 24, 2024
ded38ae
Merge remote-tracking branch 'upstream/master' into lemmas-of-Galois-…
Thmoas-Guan Sep 24, 2024
149860e
Merge branch 'Infinite-Galois-Theory-New-Base-ver' into finite-Galois…
Thmoas-Guan Sep 24, 2024
5542978
Merge branch 'Infinite-Galois-Theory-New-Base-ver' into Fundamental-T…
Thmoas-Guan Sep 24, 2024
602e2de
Merge branch 'master' into finite-Galois-subextensions
Thmoas-Guan Sep 28, 2024
83a18b5
Merge branch 'master' into lemmas-of-Galois-theory
Thmoas-Guan Sep 28, 2024
458abe4
Merge branch 'lemmas-of-Galois-theory' into Fundamental-Theorem-of-In…
Thmoas-Guan Sep 28, 2024
170b300
Merge branch 'finite-Galois-subextensions' into Fundamental-Theorem-o…
Thmoas-Guan Sep 28, 2024
197ecbe
fix Basic.lean
Thmoas-Guan Sep 28, 2024
dacf676
fix docstring
Thmoas-Guan Sep 28, 2024
d91db4a
Merge branch 'finite-Galois-subextensions' into Fundamental-Theorem-o…
Thmoas-Guan Sep 28, 2024
9c8bca5
Merge branch 'lemmas-of-Galois-theory' into Fundamental-Theorem-of-In…
Thmoas-Guan Sep 28, 2024
2b6ea1d
Merge remote-tracking branch 'upstream/master' into Fundamental-Theor…
Thmoas-Guan Sep 29, 2024
46b037e
fix docstring
Thmoas-Guan Sep 29, 2024
a078700
Update InfiniteDimensional.lean
Thmoas-Guan Sep 29, 2024
3913ed8
Merge branch 'finite-Galois-subextensions' into Fundamental-Theorem-o…
Thmoas-Guan Sep 29, 2024
d54c142
update import
Thmoas-Guan Sep 29, 2024
f74b3d6
Merge branch 'master' into Fundamental-Theorem-of-Infinite-Galois-Theory
Thmoas-Guan Sep 29, 2024
e75cb4f
Merge branch 'master' into lemmas-of-Galois-theory
Thmoas-Guan Sep 29, 2024
9ad5bc3
Update InfiniteDimensional.lean
Thmoas-Guan Sep 29, 2024
09dac4f
use better definition
Thmoas-Guan Sep 30, 2024
82e02bd
refine naming
Thmoas-Guan Sep 30, 2024
d713a88
Revert "add more lemmas"
Thmoas-Guan Sep 30, 2024
808ce63
Merge branch 'finite-Galois-subextensions' into Fundamental-Theorem-o…
Thmoas-Guan Sep 30, 2024
22abb5c
Merge remote-tracking branch 'upstream/Infinite-Galois-Theory-New-New…
Thmoas-Guan Sep 30, 2024
1b68667
fix with new definition
Thmoas-Guan Sep 30, 2024
ca14511
fix layout
Thmoas-Guan Sep 30, 2024
1d78e34
update docstring
Thmoas-Guan Sep 30, 2024
f43b9dc
Merge branch 'finite-Galois-subextensions' into Fundamental-Theorem-o…
Thmoas-Guan Sep 30, 2024
7855c4e
update naming in structure
Thmoas-Guan Sep 30, 2024
c4ab3c6
Merge branch 'finite-Galois-subextensions' into Fundamental-Theorem-o…
Thmoas-Guan Sep 30, 2024
5525533
update with new naming
Thmoas-Guan Sep 30, 2024
470e184
fix simpNF
Thmoas-Guan Sep 30, 2024
7b99b79
Merge branch 'finite-Galois-subextensions' into Fundamental-Theorem-o…
Thmoas-Guan Sep 30, 2024
80e72b5
fix simpNF
Thmoas-Guan Sep 30, 2024
3ad4b32
use better lemma
Thmoas-Guan Sep 30, 2024
1fbbc58
Merge branch 'finite-Galois-subextensions' into Fundamental-Theorem-o…
Thmoas-Guan Sep 30, 2024
e06376b
rearrange lemmas
Thmoas-Guan Oct 1, 2024
1a3ac94
Merge branch 'finite-Galois-subextensions' into Fundamental-Theorem-o…
Thmoas-Guan Oct 1, 2024
2d394c7
add docstring
Thmoas-Guan Oct 1, 2024
c3591b0
Merge branch 'finite-Galois-subextensions' into Fundamental-Theorem-o…
Thmoas-Guan Oct 1, 2024
90bcbb1
refine layout
Thmoas-Guan Oct 2, 2024
9e3aa14
Merge branch 'finite-Galois-subextensions' into Fundamental-Theorem-o…
Thmoas-Guan Oct 2, 2024
4ee31ed
rename added file
Thmoas-Guan Oct 2, 2024
b119405
Update Mathlib.lean
Thmoas-Guan Oct 2, 2024
b1530de
refine docstring
Thmoas-Guan Oct 2, 2024
aa12c38
remove useless ext
Thmoas-Guan Oct 2, 2024
c10b4ac
Merge branch 'finite-Galois-subextensions' into Fundamental-Theorem-o…
Thmoas-Guan Oct 2, 2024
6ac7794
refine naming
Thmoas-Guan Oct 2, 2024
1534f95
Merge branch 'finite-Galois-subextensions' into Fundamental-Theorem-o…
Thmoas-Guan Oct 2, 2024
c157d13
fix docstring
Thmoas-Guan Oct 5, 2024
579c6c7
add GaloisInsertion and GaloisCoinsertion
Thmoas-Guan Oct 5, 2024
4af5abd
Merge branch 'finite-Galois-subextensions' into Fundamental-Theorem-o…
Thmoas-Guan Oct 5, 2024
04916c2
fix docstring
Thmoas-Guan Oct 5, 2024
62fe9a2
Merge branch 'finite-Galois-subextensions' into Fundamental-Theorem-o…
Thmoas-Guan Oct 5, 2024
5052b4e
fix docstring
Thmoas-Guan Oct 6, 2024
72e29aa
Merge branch 'finite-Galois-subextensions' into Fundamental-Theorem-o…
Thmoas-Guan Oct 6, 2024
57c4d69
move thms with category
Thmoas-Guan Oct 18, 2024
eb1fbeb
Merge remote-tracking branch 'upstream/master' into finite-Galois-sub…
Thmoas-Guan Oct 18, 2024
d2798b9
Merge remote-tracking branch 'upstream/master' into lemmas-of-Galois-…
Thmoas-Guan Oct 18, 2024
d43cd04
Merge remote-tracking branch 'upstream/master' into finite-Galois-sub…
Thmoas-Guan Oct 18, 2024
2ac5009
Merge branch 'finite-Galois-subextensions' into Fundamental-Theorem-o…
Thmoas-Guan Oct 18, 2024
868960e
Merge branch 'lemmas-of-Galois-theory' into Fundamental-Theorem-of-In…
Thmoas-Guan Oct 18, 2024
9328389
Merge branch 'master' into Fundamental-Theorem-of-Infinite-Galois-Theory
Thmoas-Guan Oct 19, 2024
5676ddd
Merge branch 'master' into lemmas-of-Galois-theory
Thmoas-Guan Oct 19, 2024
fee1bcb
split Galois.Infinite
Thmoas-Guan Oct 19, 2024
368b8c5
Update Mathlib.lean
Thmoas-Guan Oct 19, 2024
fe0dfde
Merge branch 'Move-Infinite-Galois' into Fundamental-Theorem-of-Infin…
Thmoas-Guan Oct 19, 2024
5dea0b7
Create Infinite.lean
Thmoas-Guan Oct 19, 2024
653517b
Update Infinite.lean
Thmoas-Guan Oct 19, 2024
b4eba8f
Update Infinite.lean
Thmoas-Guan Oct 19, 2024
67d88dc
Update Mathlib.lean
Thmoas-Guan Oct 19, 2024
0222f4b
Merge remote-tracking branch 'upstream/master' into Fundamental-Theor…
Thmoas-Guan Oct 20, 2024
615c82b
Merge remote-tracking branch 'upstream/master' into Fundamental-Theor…
Thmoas-Guan Oct 20, 2024
8ab45c8
Create Infinite.lean
Thmoas-Guan Oct 20, 2024
e54991b
Merge remote-tracking branch 'upstream/master' into Fundamental-Theor…
Thmoas-Guan Oct 21, 2024
55ac2b8
Merge remote-tracking branch 'upstream/Infinite-Galois-Theory-New-Bas…
Thmoas-Guan Oct 23, 2024
42a3a43
refine proofs and statements
Thmoas-Guan Oct 23, 2024
74c61ce
Merge branch 'lemmas-of-Galois-theory' into Fundamental-Theorem-of-In…
Thmoas-Guan Oct 23, 2024
9961b62
refine statement
Thmoas-Guan Oct 23, 2024
d140926
Merge branch 'lemmas-of-Galois-theory' into Fundamental-Theorem-of-In…
Thmoas-Guan Oct 23, 2024
c1a987e
remove duplicated lemma
Thmoas-Guan Oct 23, 2024
ddeb93c
refine lemma
Thmoas-Guan Oct 23, 2024
fd27841
Merge branch 'lemmas-of-Galois-theory' into Fundamental-Theorem-of-In…
Thmoas-Guan Oct 23, 2024
fed37c2
Update Infinite.lean
Thmoas-Guan Oct 23, 2024
0da8a4e
add lemma
Thmoas-Guan Oct 23, 2024
19dca48
Merge branch 'lemmas-of-Galois-theory' into Fundamental-Theorem-of-In…
Thmoas-Guan Oct 23, 2024
91cddd5
remove duplicated lemma
Thmoas-Guan Oct 23, 2024
5ce45d5
add API lemma
Thmoas-Guan Oct 24, 2024
d97e8f7
Merge branch 'lemmas-of-Galois-theory' into Fundamental-Theorem-of-In…
Thmoas-Guan Oct 24, 2024
d5b9384
refine proofs
Thmoas-Guan Oct 25, 2024
e4b45c6
fix naming
Thmoas-Guan Oct 25, 2024
c7d8ea9
Merge branch 'lemmas-of-Galois-theory' into Fundamental-Theorem-of-In…
Thmoas-Guan Oct 25, 2024
30e9c23
use new lemma
Thmoas-Guan Oct 25, 2024
8ac435e
Merge remote-tracking branch 'upstream/master' into lemmas-of-Galois-…
Thmoas-Guan Oct 29, 2024
44d82b1
Merge remote-tracking branch 'upstream/master' into Fundamental-Theor…
Thmoas-Guan Oct 29, 2024
113eaa1
fix synthInstance reaching maximal heartbeat
Thmoas-Guan Oct 29, 2024
3f4ba40
refine proofs
Thmoas-Guan Oct 29, 2024
6b15340
refine proof
Thmoas-Guan Oct 29, 2024
317555b
refine proofs
Thmoas-Guan Oct 29, 2024
05d75cc
fix syhth instance heartbeat completely
Thmoas-Guan Oct 30, 2024
471fc87
Revert "fix syhth instance heartbeat completely"
Thmoas-Guan Oct 30, 2024
dac416d
Merge remote-tracking branch 'upstream/master' into lemmas-of-Galois-…
Thmoas-Guan Oct 31, 2024
fef39b3
Merge remote-tracking branch 'upstream/master' into Fundamental-Theor…
Thmoas-Guan Oct 31, 2024
c6c7723
discard raise in heartbeat
Thmoas-Guan Nov 1, 2024
071b878
refine proofs
Thmoas-Guan Nov 1, 2024
1e26a5a
refine proofs
Thmoas-Guan Nov 1, 2024
dc1cd77
refine proofs
Thmoas-Guan Nov 1, 2024
458c8f2
fix naming
Thmoas-Guan Nov 6, 2024
677def5
Merge branch 'lemmas-of-Galois-theory' into Fundamental-Theorem-of-In…
Thmoas-Guan Nov 6, 2024
68b780b
fix proofs with new naming
Thmoas-Guan Nov 6, 2024
0ce709a
Merge remote-tracking branch 'upstream/master' into lemmas-of-Galois-…
Thmoas-Guan Nov 13, 2024
e2dc873
Merge branch 'lemmas-of-Galois-theory' into Fundamental-Theorem-of-In…
Thmoas-Guan Nov 13, 2024
48938a3
refine layout
Thmoas-Guan Nov 30, 2024
66601cb
Merge remote-tracking branch 'upstream/master' into lemmas-of-Galois-…
Thmoas-Guan Nov 30, 2024
57ea576
Merge branch 'lemmas-of-Galois-theory' of https://github.com/leanprov…
Thmoas-Guan Nov 30, 2024
86630e9
Merge branch 'lemmas-of-Galois-theory' into Fundamental-Theorem-of-In…
Thmoas-Guan Nov 30, 2024
bb7074e
Merge remote-tracking branch 'upstream/master' into Fundamental-Theor…
Thmoas-Guan Dec 1, 2024
c5003f0
refine proofs
Thmoas-Guan Dec 2, 2024
1176a5f
refine proof
Thmoas-Guan Dec 3, 2024
bd0c8d6
move lemma finiteDimensional_of_le
Thmoas-Guan Dec 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Mathlib.lean
Original file line number Diff line number Diff line change
Expand Up @@ -2980,6 +2980,7 @@ import Mathlib.FieldTheory.Finiteness
import Mathlib.FieldTheory.Fixed
import Mathlib.FieldTheory.Galois.Basic
import Mathlib.FieldTheory.Galois.GaloisClosure
import Mathlib.FieldTheory.Galois.Infinite
import Mathlib.FieldTheory.Galois.Profinite
import Mathlib.FieldTheory.IntermediateField.Algebraic
import Mathlib.FieldTheory.IntermediateField.Basic
Expand Down
6 changes: 6 additions & 0 deletions Mathlib/FieldTheory/Galois/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,12 @@ namespace IntermediateField
def fixedField : IntermediateField F E :=
FixedPoints.intermediateField H

@[simp]
theorem mem_fixedField_iff (x) :
x ∈ fixedField H ↔ ∀ f ∈ H, f x = x := by
show x ∈ MulAction.fixedPoints H E ↔ _
simp only [MulAction.mem_fixedPoints, Subtype.forall, Subgroup.mk_smul, AlgEquiv.smul_def]

theorem finrank_fixedField_eq_card [FiniteDimensional F E] [DecidablePred (· ∈ H)] :
finrank (fixedField H) E = Fintype.card H :=
FixedPoints.finrank_eq_card H E
Expand Down
296 changes: 296 additions & 0 deletions Mathlib/FieldTheory/Galois/Infinite.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,296 @@
/-
Copyright (c) 2024 Nailin Guan. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Nailin Guan
-/
import Mathlib.FieldTheory.KrullTopology
import Mathlib.FieldTheory.Galois.GaloisClosure
import Mathlib.Topology.Algebra.ClosedSubgroup
/-!

# The Fundamental Theorem of Infinite Galois Theory

In this file, we proved the fundamental theorem of infinite Galois theory and the special case for
open subgroups and normal subgroups. We first verify that IntermediateField.fixingSubgroup and
IntermediateField.fixedField are inverses of each other between IntermediateFields and
closed subgroups of the Galois group.

# Main definitions and results

In `K/k`, for any intermediate field `L` :

* `fixingSubgroup_isClosed` : the fixing subgroup of `L`
(`Gal(K/L)`) is closed.

* `fixedField_fixingSubgroup` : the fixing field of the
fixing subgroup of `L` is equal to `L` itself.

For any subgroup of `Gal(K/k)` `H` :

* `restrict_fixedField` : For a Galois intermediate field `M`, the fixed field of the image of `H`
restricted to `M` is equal to the fixed field of `H` intersected with `M`.
* `fixingSubgroup_fixedField` : If `H` is closed, the fixing subgroup of the fixed field of `H`
is equal to `H` itself.

The fundamental theorem of infinite galois theory :

* `IntermediateFieldEquivClosedSubgroup` : The order equivalence is given by mapping any
intermediate field `L` to the fixing subgroup of `L`, with its inverse mapping any
closed subgroup of `Gal(K/k)` `H` to the fixed field of `H`. The composition is equal to
the identity as described in the lemmas above, and compatibility with the order follows easily.

Special cases :

* `OpeniffFinite` : The fixing subgroup of an intermediate field `L` is open iff
`L` is finite-dimensional.

* `NormaliffGalois` : The fixing subgroup of an intermediate field `L` is normal iff
`L` is Galois.

-/

variable {k K : Type*} [Field k] [Field K] [Algebra k K]

namespace InfiniteGalois

open Pointwise FiniteGaloisIntermediateField AlgEquiv
--Note: The `adjoin`s below are `FiniteGaloisIntermediateField.adjoin`

instance : TopologicalSpace (K ≃ₐ[k] K) := inferInstance

lemma fixingSubgroup_isClosed (L : IntermediateField k K) [IsGalois k K] :
IsClosed (L.fixingSubgroup : Set (K ≃ₐ[k] K)) where
isOpen_compl := isOpen_iff_mem_nhds.mpr fun σ h => by
apply mem_nhds_iff.mpr
rcases Set.not_subset.mp ((mem_fixingSubgroup_iff (K ≃ₐ[k] K)).not.mp h) with ⟨y,yL,ne⟩
use σ • ((adjoin k {y}).1.fixingSubgroup : Set (K ≃ₐ[k] K))
constructor
· intro f hf
rcases (Set.mem_smul_set.mp hf) with ⟨g,hg,eq⟩
simp only [Set.mem_compl_iff, SetLike.mem_coe, ← eq]
apply (mem_fixingSubgroup_iff (K ≃ₐ[k] K)).not.mpr
push_neg
use y
simp only [yL, smul_eq_mul, AlgEquiv.smul_def, AlgEquiv.mul_apply, ne_eq, true_and]
have : g y = y := (mem_fixingSubgroup_iff (K ≃ₐ[k] K)).mp hg y <|
adjoin_simple_le_iff.mp fun ⦃x⦄ a ↦ a
simpa only [this, ne_eq, AlgEquiv.smul_def] using ne
· simp only [(IntermediateField.fixingSubgroup_isOpen (adjoin k {y}).1).smul σ, true_and]
use 1
simp only [SetLike.mem_coe, smul_eq_mul, mul_one, and_true, Subgroup.one_mem]

lemma fixedField_fixingSubgroup (L : IntermediateField k K) [IsGalois k K] :
IntermediateField.fixedField L.fixingSubgroup = L := by
letI : IsGalois L K := inferInstance
apply le_antisymm
· intro x hx
rw [IntermediateField.mem_fixedField_iff] at hx
have mem : x ∈ (adjoin L {x}).1 := subset_adjoin _ _ rfl
have : IntermediateField.fixedField (⊤ : Subgroup ((adjoin L {x}) ≃ₐ[L] (adjoin L {x}))) = ⊥ :=
(IsGalois.tfae.out 0 1).mp (by infer_instance)
have : ⟨x, mem⟩ ∈ (⊥ : IntermediateField L (adjoin L {x})) := by
rw [← this, IntermediateField.mem_fixedField_iff]
intro f _
rcases restrictNormalHom_surjective K f with ⟨σ,hσ⟩
apply Subtype.val_injective
rw [← hσ, restrictNormalHom_apply (adjoin L {x}).1 σ ⟨x, mem⟩]
have := hx ((IntermediateField.fixingSubgroupEquiv L).symm σ)
simp only [SetLike.coe_mem, true_implies] at this
exact this
rcases IntermediateField.mem_bot.mp this with ⟨y, hy⟩
obtain ⟨rfl⟩ : y = x := congrArg Subtype.val hy
exact y.2
· exact (IntermediateField.le_iff_le L.fixingSubgroup L).mpr fun ⦃x⦄ a ↦ a

lemma fixedField_bot [IsGalois k K] :
IntermediateField.fixedField (⊤ : Subgroup (K ≃ₐ[k] K)) = ⊥ := by
rw [← IntermediateField.fixingSubgroup_bot, fixedField_fixingSubgroup]

lemma restrict_fixedField (H : Subgroup (K ≃ₐ[k] K)) (L : IntermediateField k K) [IsGalois k L] :
(IntermediateField.fixedField H) ⊓ L = IntermediateField.lift (IntermediateField.fixedField
(Subgroup.map (restrictNormalHom (F := k) (K₁ := K) L) H)) := by
apply SetLike.ext'
ext x
refine ⟨fun h ↦ ?_, fun h ↦ ?_⟩
· have xL := h.out.2
apply (IntermediateField.mem_lift (⟨x, xL⟩ : L)).mpr
rw [IntermediateField.mem_fixedField_iff]
simp only [Subgroup.mem_map, forall_exists_index, and_imp, forall_apply_eq_imp_iff₂]
intro σ hσ
apply Subtype.val_injective
dsimp
nth_rw 2 [← (h.out.1 ⟨σ, hσ⟩)]
exact AlgEquiv.restrictNormal_commutes σ L ⟨x, xL⟩
· have xL := IntermediateField.lift_le _ h
apply (IntermediateField.mem_lift (⟨x,xL⟩ : L)).mp at h
simp only [IntermediateField.mem_fixedField_iff, Subgroup.mem_map, forall_exists_index, and_imp,
forall_apply_eq_imp_iff₂] at h
simp only [IntermediateField.coe_inf, Set.mem_inter_iff, SetLike.mem_coe,
IntermediateField.mem_fixedField_iff, xL, and_true]
intro σ hσ
have : ((restrictNormalHom L σ) ⟨x, xL⟩).1 = x := by rw [h σ hσ]
nth_rw 2 [← this]
exact (AlgEquiv.restrictNormal_commutes σ L ⟨x, xL⟩).symm

lemma fixingSubgroup_fixedField (H : ClosedSubgroup (K ≃ₐ[k] K)) [IsGalois k K] :
(IntermediateField.fixedField H).fixingSubgroup = H.1 := by
apply le_antisymm _ ((IntermediateField.le_iff_le H.toSubgroup
(IntermediateField.fixedField H.toSubgroup)).mp fun ⦃x⦄ a ↦ a)
intro σ hσ
by_contra h
have nhd : H.carrierᶜ ∈ nhds σ := H.isClosed'.isOpen_compl.mem_nhds h
rw [GroupFilterBasis.nhds_eq (x₀ := σ) (galGroupBasis k K)] at nhd
rcases nhd with ⟨b,⟨gp,⟨L,hL,eq'⟩,eq⟩,sub⟩
rw [← eq'] at eq
have sub : σ • b ⊆ H.carrierᶜ := Set.smul_set_subset_iff.mpr sub
have := hL.out
let L' : FiniteGaloisIntermediateField k K := {
normalClosure k L K with
finiteDimensional := normalClosure.is_finiteDimensional k L K
isGalois := IsGalois.normalClosure k L K }
have compl : σ • L'.1.fixingSubgroup.carrier ⊆ H.carrierᶜ :=
fun ⦃a⦄ d ↦ sub ((Set.set_smul_subset_set_smul_iff.mpr <| eq ▸ (fun σ h =>
(mem_fixingSubgroup_iff (K ≃ₐ[k] K)).mpr fun y hy => (mem_fixingSubgroup_iff (K ≃ₐ[k] K)).mp
h y (IntermediateField.le_normalClosure L hy))) d)
have fix : ∀ x ∈ IntermediateField.fixedField H.toSubgroup ⊓ ↑L', σ x = x :=
fun x hx ↦ ((mem_fixingSubgroup_iff (K ≃ₐ[k] K)).mp hσ) x hx.1
rw [restrict_fixedField H.1 L'.1] at fix
have : (restrictNormalHom L') σ ∈ (Subgroup.map (restrictNormalHom L') H.1) := by
rw [← IntermediateField.fixingSubgroup_fixedField (Subgroup.map (restrictNormalHom L') H.1)]
apply (mem_fixingSubgroup_iff (L' ≃ₐ[k] L')).mpr
intro y hy
apply Subtype.val_injective
simp only [AlgEquiv.smul_def, restrictNormalHom_apply L'.1 σ y,
fix y.1 ((IntermediateField.mem_lift y).mpr hy)]
rcases this with ⟨h, mem, eq⟩
have : h ∈ σ • L'.1.fixingSubgroup.carrier := by
use σ⁻¹ * h
simp only [Subsemigroup.mem_carrier, Submonoid.mem_toSubsemigroup, Subgroup.mem_toSubmonoid,
smul_eq_mul, mul_inv_cancel_left, and_true]
apply (mem_fixingSubgroup_iff (K ≃ₐ[k] K)).mpr
intro y hy
simp only [AlgEquiv.smul_def, AlgEquiv.mul_apply]
have : ((restrictNormalHom L') h ⟨y,hy⟩).1 = ((restrictNormalHom L') σ ⟨y,hy⟩).1 := by rw [eq]
rw [restrictNormalHom_apply L'.1 h ⟨y, hy⟩, restrictNormalHom_apply L'.1 σ ⟨y, hy⟩] at this
simp only [this, ← AlgEquiv.mul_apply, inv_mul_cancel, one_apply]
absurd compl
apply Set.not_subset.mpr
use h
simpa only [this, Set.mem_compl_iff, Subsemigroup.mem_carrier, Submonoid.mem_toSubsemigroup,
Subgroup.mem_toSubmonoid, not_not, true_and] using mem

/-- The Galois correspondence from intermediate fields to ClosedSubgroup. -/
def IntermediateFieldEquivClosedSubgroup [IsGalois k K] :
IntermediateField k K ≃o (ClosedSubgroup (K ≃ₐ[k] K))ᵒᵈ where
toFun := fun L =>
{ L.fixingSubgroup with
isClosed' := fixingSubgroup_isClosed L }
invFun := fun H => IntermediateField.fixedField H.1
left_inv := fun L => fixedField_fixingSubgroup L
right_inv := by
intro H
simp_rw [fixingSubgroup_fixedField H]
rfl
map_rel_iff' := by
intro L₁ L₂
show L₁.fixingSubgroup ≥ L₂.fixingSubgroup ↔ L₁ ≤ L₂
rw [← fixedField_fixingSubgroup L₂, IntermediateField.le_iff_le, fixedField_fixingSubgroup L₂]

/-- The Galois correspondence as a `GaloisInsertion` -/
def GaloisInsertionIntermediateFieldSubgroup [IsGalois k K] :
GaloisInsertion (OrderDual.toDual ∘ fun (E : IntermediateField k K) ↦
(⟨E.fixingSubgroup, fixingSubgroup_isClosed E⟩ : ClosedSubgroup (K ≃ₐ[k] K)))
((fun (H : ClosedSubgroup (K ≃ₐ[k] K)) ↦ IntermediateField.fixedField H) ∘
OrderDual.toDual) where
choice E _ := ⟨E.fixingSubgroup, fixingSubgroup_isClosed E⟩
gc E H := (IntermediateField.le_iff_le H.1 E).symm
le_l_u H := by
simp only [Function.comp_apply, fixingSubgroup_fixedField]
rfl
choice_eq _ _ := rfl

/-- The Galois correspondence as a `GaloisCoinsertion` -/
def GaloisCoinsertionIntermediateFieldSubgroup [IsGalois k K] :
GaloisCoinsertion (OrderDual.toDual ∘ fun (E : IntermediateField k K) ↦
(⟨E.fixingSubgroup, fixingSubgroup_isClosed E⟩ : ClosedSubgroup (K ≃ₐ[k] K)))
((fun (H : ClosedSubgroup (K ≃ₐ[k] K)) ↦ IntermediateField.fixedField H) ∘
OrderDual.toDual) where
choice H _ := IntermediateField.fixedField H.1
gc E H := (IntermediateField.le_iff_le H.1 E).symm
u_l_le K := le_of_eq (fixedField_fixingSubgroup K)
choice_eq _ _ := rfl

private lemma IntermediateField.finiteDimensional_of_le {M N : IntermediateField k K}
(le : M ≤ N) [FiniteDimensional k N] : FiniteDimensional k M := by
let i : M →ₐ[k] N := {
toFun := fun x => ⟨x.1, le x.2⟩
map_one' := rfl
map_mul' := fun _ _ => rfl
map_zero' := rfl
map_add' := fun _ _ => rfl
commutes' := fun _ => rfl }
apply FiniteDimensional.of_injective (AlgHom.toLinearMap i)
intro _ _ h
apply_fun Subtype.val at h
exact Subtype.val_injective h
Thmoas-Guan marked this conversation as resolved.
Show resolved Hide resolved

theorem open_iff_finite (L : IntermediateField k K) [IsGalois k K] :
IsOpen (IntermediateFieldEquivClosedSubgroup L).carrier ↔
(FiniteDimensional k L) := by
refine ⟨fun h ↦ ?_, fun h ↦ IntermediateField.fixingSubgroup_isOpen L⟩
have : (IntermediateFieldEquivClosedSubgroup.toFun L).carrier ∈ nhds 1 :=
IsOpen.mem_nhds h (congrFun rfl)
rw [GroupFilterBasis.nhds_one_eq] at this
rcases this with ⟨S, ⟨gp, ⟨M, hM, eq'⟩, eq⟩, sub⟩
rw [← eq, ← eq'] at sub
have := hM.out
let L' : FiniteGaloisIntermediateField k K := {
normalClosure k M K with
finiteDimensional := normalClosure.is_finiteDimensional k M K
isGalois := IsGalois.normalClosure k M K }
have : L'.1.fixingSubgroup.carrier ⊆ (IntermediateFieldEquivClosedSubgroup.1.1 L).carrier := by
have : M ≤ L'.1 := IntermediateField.le_normalClosure M
rw [← fixedField_fixingSubgroup L'.1, IntermediateField.le_iff_le] at this
exact fun _ a ↦ sub (this a)
apply IntermediateField.finiteDimensional_of_le (N := L'.1)
rw [← fixedField_fixingSubgroup L'.1, IntermediateField.le_iff_le]
exact this

theorem normal_iff_isGalois (L : IntermediateField k K) [IsGalois k K] :
Subgroup.Normal (IntermediateFieldEquivClosedSubgroup L).1 ↔
IsGalois k L := by
refine ⟨fun h ↦ ?_, fun h ↦ ?_⟩
· let f : L → IntermediateField k K := fun x => IntermediateField.lift <|
IntermediateField.fixedField <| Subgroup.map (restrictNormalHom
(adjoin k {x.1})) L.fixingSubgroup
have h' (x : K) : (Subgroup.map (restrictNormalHom
(adjoin k {x})) L.fixingSubgroup).Normal := by
set f := restrictNormalHom (F := k) (K₁ := K) (adjoin k {x})
exact Subgroup.Normal.map h f (restrictNormalHom_surjective K)
have n' (l : L) : IsGalois k (IntermediateField.fixedField <| Subgroup.map
(restrictNormalHom (adjoin k {l.1})) L.fixingSubgroup) := by
letI := IsGalois.of_fixedField_normal_subgroup (Subgroup.map (restrictNormalHom
(adjoin k {l.1})) L.fixingSubgroup)
set cH := (Subgroup.map (restrictNormalHom (adjoin k {l.1})) L.fixingSubgroup)
exact IsGalois.of_algEquiv <| IntermediateField.liftAlgEquiv (IntermediateField.fixedField cH)
have n : Normal k ↥(⨆ (l : L), f l):= IntermediateField.normal_iSup k K f
have : (⨆ (l : L), f l) = L := by
apply le_antisymm
· apply iSup_le
intro l
simp only [f, ← restrict_fixedField L.fixingSubgroup (adjoin k {l.1}),
fixedField_fixingSubgroup L]
exact inf_le_left
· intro l hl
apply le_iSup f ⟨l,hl⟩
simp only [f, ← restrict_fixedField L.fixingSubgroup (adjoin k {l}),
fixedField_fixingSubgroup L, IntermediateField.mem_inf, hl, true_and]
exact adjoin_simple_le_iff.mp fun _ a ↦ a
rw [this] at n
letI : Algebra.IsSeparable k L := Algebra.isSeparable_tower_bot_of_isSeparable k L K
apply IsGalois.mk
· simp only [IntermediateFieldEquivClosedSubgroup, RelIso.coe_fn_mk, Equiv.coe_fn_mk,
← L.restrictNormalHom_ker]
exact MonoidHom.normal_ker (restrictNormalHom L)

end InfiniteGalois
Loading