Skip to content

Commit d496dc0

Browse files
committed
chore(FieldTheory/SplittingField/Construction): remove an erw (leanprover-community#38924)
- rewrites `adjoin_rootSet` by folding `SplittingFieldAux.succ` into the main `rw` chain - replaces the `erw` uses around `Algebra.adjoin_algebraMap` and `IsScalarTower.adjoin_range_toAlgHom` with a direct `rw` Extracted from leanprover-community#38415 [![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/from-referrer/)
1 parent 619a6a4 commit d496dc0

1 file changed

Lines changed: 7 additions & 10 deletions

File tree

Mathlib/FieldTheory/SplittingField/Construction.lean

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -196,16 +196,13 @@ theorem adjoin_rootSet (n : ℕ) :
196196
rw [rootSet_def, aroots_def]
197197
rw [algebraMap_succ, ← map_map, ← X_sub_C_mul_removeFactor _ hndf, Polynomial.map_mul] at hmf0 ⊢
198198
rw [roots_mul hmf0, Polynomial.map_sub, map_X, map_C, roots_X_sub_C, Multiset.toFinset_add,
199-
Finset.coe_union, Multiset.toFinset_singleton, Finset.coe_singleton,
200-
Algebra.adjoin_union_eq_adjoin_adjoin, ← Set.image_singleton]
201-
-- This used to be `rw`, but we need `erw` after https://github.com/leanprover/lean4/pull/2644
202-
erw [Algebra.adjoin_algebraMap K (SplittingFieldAux n f.removeFactor)]
203-
rw [AdjoinRoot.adjoinRoot_eq_top, Algebra.map_top]
204-
-- Porting note: was `rw`
205-
erw [IsScalarTower.adjoin_range_toAlgHom K (AdjoinRoot f.factor)
206-
(SplittingFieldAux n f.removeFactor)
207-
(f.removeFactor.rootSet (SplittingFieldAux n f.removeFactor))]
208-
rw [ih _ (natDegree_removeFactor' hfn), Subalgebra.restrictScalars_top]
199+
Finset.coe_union, Multiset.toFinset_singleton, Finset.coe_singleton, ← Set.image_singleton]
200+
simp only [SplittingFieldAux.succ]
201+
rw [← Algebra.adjoin_eq_adjoin_union K {AdjoinRoot.root f.factor}
202+
((map (algebraMap (AdjoinRoot f.factor) (SplittingFieldAux n f.removeFactor))
203+
f.removeFactor).roots.toFinset : Set (SplittingFieldAux n f.removeFactor))
204+
AdjoinRoot.adjoinRoot_eq_top, ← rootSet_def, ih _ (natDegree_removeFactor' hfn),
205+
Subalgebra.restrictScalars_top]
209206

210207
instance (f : K[X]) : IsSplittingField K (SplittingFieldAux f.natDegree f) f :=
211208
⟨SplittingFieldAux.splits _ _ rfl, SplittingFieldAux.adjoin_rootSet _ _ rfl⟩

0 commit comments

Comments
 (0)