Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 38ad656

Browse files
committed
chore(field_theory/intermediate_field): fix timeout (#14725)
+ Remove `@[simps]` from `intermediate_field_map` to reduce `decl post-processing of intermediate_field_map` from 18.3s to 46.4ms (on my machine). + Manually provide the two `simp` lemmas previously auto-generated by `@[simps]`. Mathlib compiles even without the two simp lemmas (see commit 1f5a7f1), but I am inclined to keep them in case some other branches/projects are using them. [Zulip reports](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/deterministic.20timeout/near/285792556) about `intermediate_field_map` causing timeout in two separate branches
1 parent dd4d8e6 commit 38ad656

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/field_theory/intermediate_field.lean

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,10 +280,18 @@ set_like.coe_injective $ set.image_image _ _ _
280280
/-- Given an equivalence `e : L ≃ₐ[K] L'` of `K`-field extensions and an intermediate
281281
field `E` of `L/K`, `intermediate_field_equiv_map e E` is the induced equivalence
282282
between `E` and `E.map e` -/
283-
@[simps] def intermediate_field_map (e : L ≃ₐ[K] L') (E : intermediate_field K L) :
283+
def intermediate_field_map (e : L ≃ₐ[K] L') (E : intermediate_field K L) :
284284
E ≃ₐ[K] (E.map e.to_alg_hom) :=
285285
e.subalgebra_map E.to_subalgebra
286286

287+
/- We manually add these two simp lemmas because `@[simps]` before `intermediate_field_map`
288+
led to a timeout. -/
289+
@[simp] lemma intermediate_field_map_apply_coe (e : L ≃ₐ[K] L') (E : intermediate_field K L)
290+
(a : E) : ↑(intermediate_field_map e E a) = e a := rfl
291+
292+
@[simp] lemma intermediate_field_map_symm_apply_coe (e : L ≃ₐ[K] L') (E : intermediate_field K L)
293+
(a : E.map e.to_alg_hom) : ↑((intermediate_field_map e E).symm a) = e.symm a := rfl
294+
287295
/-- The embedding from an intermediate field of `L / K` to `L`. -/
288296
def val : S →ₐ[K] L :=
289297
S.to_subalgebra.val

0 commit comments

Comments
 (0)