Skip to content

Commit

Permalink
chore(ring_theory/algebraic): fix typo + golf (#12834)
Browse files Browse the repository at this point in the history
  • Loading branch information
vihdzp committed Mar 20, 2022
1 parent 6abfb1d commit cdd0572
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/ring_theory/algebraic.lean
Expand Up @@ -44,17 +44,15 @@ def algebra.is_algebraic : Prop := ∀ x : A, is_algebraic R x

variables {R A}

/-- A subalgebra is algebraic if and only if it is algebraic an algebra. -/
/-- A subalgebra is algebraic if and only if it is algebraic as an algebra. -/
lemma subalgebra.is_algebraic_iff (S : subalgebra R A) :
S.is_algebraic ↔ @algebra.is_algebraic R S _ _ (S.algebra) :=
S.is_algebraic ↔ @algebra.is_algebraic R S _ _ S.algebra :=
begin
delta algebra.is_algebraic subalgebra.is_algebraic,
rw [subtype.forall'],
apply forall_congr, rintro ⟨x, hx⟩,
apply exists_congr, intro p,
apply and_congr iff.rfl,
have h : function.injective (S.val) := subtype.val_injective,
conv_rhs { rw [← h.eq_iff, alg_hom.map_zero], },
rw subtype.forall',
refine forall_congr (λ x, exists_congr (λ p, and_congr iff.rfl _)),
have h : function.injective S.val := subtype.val_injective,
conv_rhs { rw [← h.eq_iff, alg_hom.map_zero] },
rw [← aeval_alg_hom_apply, S.val_apply]
end

Expand Down

0 comments on commit cdd0572

Please sign in to comment.