Skip to content

Commit

Permalink
refactor(ring_theory/jacobson): avoid shadowing hypothesis (#9736)
Browse files Browse the repository at this point in the history
This PR postpones a `rw` in a proof, which was creating a shadowed hypothesis. At present, this shadowing was not a big deal, but in another branch it caused a hard-to-diagnose error.



Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
  • Loading branch information
semorrison and semorrison committed Oct 17, 2021
1 parent 5eb47c0 commit 4b00aa2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ring_theory/jacobson.lean
Expand Up @@ -448,7 +448,7 @@ begin
let φ : (P.comap C : ideal R).quotient →+* P.quotient := quotient_map P C le_rfl,
let M : submonoid (P.comap C : ideal R).quotient :=
submonoid.powers ((m : polynomial R).map (quotient.mk (P.comap C : ideal R))).leading_coeff,
rw ← bot_quotient_is_maximal_iff at hP ⊢,
rw ← bot_quotient_is_maximal_iff,
have hp0 : ((m : polynomial R).map (quotient.mk (P.comap C : ideal R))).leading_coeff ≠ 0 :=
λ hp0', this $ map_injective (quotient.mk (P.comap C : ideal R))
((quotient.mk (P.comap C : ideal R)).injective_iff.2 (λ x hx,
Expand All @@ -473,7 +473,8 @@ begin
apply is_integral_is_localization_polynomial_quotient P _ (submodule.coe_mem m) },
rw (map_bot.symm : (⊥ : ideal (localization M')) =
map (algebra_map P.quotient (localization M')) ⊥),
refine map.is_maximal (algebra_map _ _) (localization_map_bijective_of_field hM' _) hP,
let bot_maximal := ((bot_quotient_is_maximal_iff _).mpr hP),
refine map.is_maximal (algebra_map _ _) (localization_map_bijective_of_field hM' _) bot_maximal,
rwa [← quotient.maximal_ideal_iff_is_field_quotient, ← bot_quotient_is_maximal_iff],
end

Expand Down

0 comments on commit 4b00aa2

Please sign in to comment.