Theorem: Polynomial.Gal.mapRoots_bijective
File: Mathlib/FieldTheory/PolynomialGaloisGroup.lean

tactic: constructor
state_before: F : Type u_1
inst✝² : Field F
p q : F[X]
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
h : Fact (Splits (algebraMap F E) p)
⊢ Function.Bijective (mapRoots p E)
state_after: case left
F : Type u_1
inst✝² : Field F
p q : F[X]
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
h : Fact (Splits (algebraMap F E) p)
⊢ Function.Injective (mapRoots p E)

case right
F : Type u_1
inst✝² : Field F
p q : F[X]
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
h : Fact (Splits (algebraMap F E) p)
⊢ Function.Surjective (mapRoots p E)

tactic: exact fun _ _ h => Subtype.ext (RingHom.injective _ (Subtype.ext_iff.mp h))
state_before: case left
F : Type u_1
inst✝² : Field F
p q : F[X]
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
h : Fact (Splits (algebraMap F E) p)
⊢ Function.Injective (mapRoots p E)
state_after: no goals

tactic: intro y
state_before: case right
F : Type u_1
inst✝² : Field F
p q : F[X]
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
h : Fact (Splits (algebraMap F E) p)
⊢ Function.Surjective (mapRoots p E)
state_after: case right
F : Type u_1
inst✝² : Field F
p q : F[X]
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
h : Fact (Splits (algebraMap F E) p)
y : ↑(p.rootSet E)
⊢ ∃ a, mapRoots p E a = y

tactic: have key :=
  roots_map (IsScalarTower.toAlgHom F p.SplittingField E : p.SplittingField →+* E)
    ((splits_id_iff_splits _).mpr (IsSplittingField.splits p.SplittingField p))
state_before: case right
F : Type u_1
inst✝² : Field F
p q : F[X]
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
h : Fact (Splits (algebraMap F E) p)
y : ↑(p.rootSet E)
⊢ ∃ a, mapRoots p E a = y
state_after: case right
F : Type u_1
inst✝² : Field F
p q : F[X]
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
h : Fact (Splits (algebraMap F E) p)
y : ↑(p.rootSet E)
key :
  (map (↑(IsScalarTower.toAlgHom F p.SplittingField E)) (map (algebraMap F p.SplittingField) p)).roots =
    Multiset.map (⇑↑(IsScalarTower.toAlgHom F p.SplittingField E)) (map (algebraMap F p.SplittingField) p).roots
⊢ ∃ a, mapRoots p E a = y

tactic: rw [map_map, AlgHom.comp_algebraMap] at key
state_before: case right
F : Type u_1
inst✝² : Field F
p q : F[X]
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
h : Fact (Splits (algebraMap F E) p)
y : ↑(p.rootSet E)
key :
  (map (↑(IsScalarTower.toAlgHom F p.SplittingField E)) (map (algebraMap F p.SplittingField) p)).roots =
    Multiset.map (⇑↑(IsScalarTower.toAlgHom F p.SplittingField E)) (map (algebraMap F p.SplittingField) p).roots
⊢ ∃ a, mapRoots p E a = y
state_after: case right
F : Type u_1
inst✝² : Field F
p q : F[X]
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
h : Fact (Splits (algebraMap F E) p)
y : ↑(p.rootSet E)
key :
  (map (algebraMap F E) p).roots =
    Multiset.map (⇑↑(IsScalarTower.toAlgHom F p.SplittingField E)) (map (algebraMap F p.SplittingField) p).roots
⊢ ∃ a, mapRoots p E a = y

tactic: have hy := Subtype.mem y
state_before: case right
F : Type u_1
inst✝² : Field F
p q : F[X]
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
h : Fact (Splits (algebraMap F E) p)
y : ↑(p.rootSet E)
key :
  (map (algebraMap F E) p).roots =
    Multiset.map (⇑↑(IsScalarTower.toAlgHom F p.SplittingField E)) (map (algebraMap F p.SplittingField) p).roots
⊢ ∃ a, mapRoots p E a = y
state_after: case right
F : Type u_1
inst✝² : Field F
p q : F[X]
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
h : Fact (Splits (algebraMap F E) p)
y : ↑(p.rootSet E)
key :
  (map (algebraMap F E) p).roots =
    Multiset.map (⇑↑(IsScalarTower.toAlgHom F p.SplittingField E)) (map (algebraMap F p.SplittingField) p).roots
hy : ↑y ∈ p.rootSet E
⊢ ∃ a, mapRoots p E a = y

tactic: simp only [rootSet, Finset.mem_coe, Multiset.mem_toFinset, key, Multiset.mem_map] at hy
state_before: case right
F : Type u_1
inst✝² : Field F
p q : F[X]
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
h : Fact (Splits (algebraMap F E) p)
y : ↑(p.rootSet E)
key :
  (map (algebraMap F E) p).roots =
    Multiset.map (⇑↑(IsScalarTower.toAlgHom F p.SplittingField E)) (map (algebraMap F p.SplittingField) p).roots
hy : ↑y ∈ p.rootSet E
⊢ ∃ a, mapRoots p E a = y
state_after: case right
F : Type u_1
inst✝² : Field F
p q : F[X]
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
h : Fact (Splits (algebraMap F E) p)
y : ↑(p.rootSet E)
key :
  (map (algebraMap F E) p).roots =
    Multiset.map (⇑↑(IsScalarTower.toAlgHom F p.SplittingField E)) (map (algebraMap F p.SplittingField) p).roots
hy : ∃ a ∈ (map (algebraMap F p.SplittingField) p).roots, ↑(IsScalarTower.toAlgHom F p.SplittingField E) a = ↑y
⊢ ∃ a, mapRoots p E a = y

tactic: rcases hy with ⟨x, hx1, hx2⟩
state_before: case right
F : Type u_1
inst✝² : Field F
p q : F[X]
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
h : Fact (Splits (algebraMap F E) p)
y : ↑(p.rootSet E)
key :
  (map (algebraMap F E) p).roots =
    Multiset.map (⇑↑(IsScalarTower.toAlgHom F p.SplittingField E)) (map (algebraMap F p.SplittingField) p).roots
hy : ∃ a ∈ (map (algebraMap F p.SplittingField) p).roots, ↑(IsScalarTower.toAlgHom F p.SplittingField E) a = ↑y
⊢ ∃ a, mapRoots p E a = y
state_after: case right.intro.intro
F : Type u_1
inst✝² : Field F
p q : F[X]
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
h : Fact (Splits (algebraMap F E) p)
y : ↑(p.rootSet E)
key :
  (map (algebraMap F E) p).roots =
    Multiset.map (⇑↑(IsScalarTower.toAlgHom F p.SplittingField E)) (map (algebraMap F p.SplittingField) p).roots
x : p.SplittingField
hx1 : x ∈ (map (algebraMap F p.SplittingField) p).roots
hx2 : ↑(IsScalarTower.toAlgHom F p.SplittingField E) x = ↑y
⊢ ∃ a, mapRoots p E a = y

tactic: exact ⟨⟨x, (@Multiset.mem_toFinset _ (Classical.decEq _) _ _).mpr hx1⟩, Subtype.ext hx2⟩
state_before: case right.intro.intro
F : Type u_1
inst✝² : Field F
p q : F[X]
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
h : Fact (Splits (algebraMap F E) p)
y : ↑(p.rootSet E)
key :
  (map (algebraMap F E) p).roots =
    Multiset.map (⇑↑(IsScalarTower.toAlgHom F p.SplittingField E)) (map (algebraMap F p.SplittingField) p).roots
x : p.SplittingField
hx1 : x ∈ (map (algebraMap F p.SplittingField) p).roots
hx2 : ↑(IsScalarTower.toAlgHom F p.SplittingField E) x = ↑y
⊢ ∃ a, mapRoots p E a = y
state_after: no goals