l3lab/ntp-mathlib huggingface dataset:
/-- A (random) homomorphism from an algebraic extension of R into an algebraically
  closed extension of R. -/
noncomputable irreducible_def lift : S →ₐ[R] M := by
  letI : IsDomain R := (NoZeroSMulDivisors.algebraMap_injective R S).isDomain _
  letI := FractionRing.liftAlgebra R M
  letI := FractionRing.liftAlgebra R (FractionRing S)
  

Proof state:
k : Type u
inst✝¹³ : Field k
K : Type u
inst✝¹² : Field K
L : Type v
M : Type w
inst✝¹¹ : Field L
inst✝¹⁰ : Algebra K L
inst✝⁹ : Field M
inst✝⁸ : Algebra K M
inst✝⁷ : IsAlgClosed M
hL : Algebra.IsAlgebraic K L
R : Type u
inst✝⁶ : CommRing R
S : Type v
inst✝⁵ : CommRing S
inst✝⁴ : IsDomain S
inst✝³ : Algebra R S
inst✝² : Algebra R M
inst✝¹ : NoZeroSMulDivisors R S
inst✝ : NoZeroSMulDivisors R M
hS : Algebra.IsAlgebraic R S
this✝¹ : IsDomain R := Function.Injective.isDomain (algebraMap R S) (NoZeroSMulDivisors.algebraMap_injective R S)
this✝ : Algebra (FractionRing R) M := FractionRing.liftAlgebra R M
this : Algebra (FractionRing R) (FractionRing S) := FractionRing.liftAlgebra R (FractionRing S)
⊢ S →ₐ[R] M

Next tactic:
have := FractionRing.isScalarTower_liftAlgebra R M
/-- A (random) homomorphism from an algebraic extension of R into an algebraically
  closed extension of R. -/
noncomputable irreducible_def lift : S →ₐ[R] M := by
  letI : IsDomain R := (NoZeroSMulDivisors.algebraMap_injective R S).isDomain _
  letI := FractionRing.liftAlgebra R M
  letI := FractionRing.liftAlgebra R (FractionRing S)
  have := FractionRing.isScalarTower_liftAlgebra R M
  

Proof state:
k : Type u
inst✝¹³ : Field k
K : Type u
inst✝¹² : Field K
L : Type v
M : Type w
inst✝¹¹ : Field L
inst✝¹⁰ : Algebra K L
inst✝⁹ : Field M
inst✝⁸ : Algebra K M
inst✝⁷ : IsAlgClosed M
hL : Algebra.IsAlgebraic K L
R : Type u
inst✝⁶ : CommRing R
S : Type v
inst✝⁵ : CommRing S
inst✝⁴ : IsDomain S
inst✝³ : Algebra R S
inst✝² : Algebra R M
inst✝¹ : NoZeroSMulDivisors R S
inst✝ : NoZeroSMulDivisors R M
hS : Algebra.IsAlgebraic R S
this✝² : IsDomain R := Function.Injective.isDomain (algebraMap R S) (NoZeroSMulDivisors.algebraMap_injective R S)
this✝¹ : Algebra (FractionRing R) M := FractionRing.liftAlgebra R M
this✝ : Algebra (FractionRing R) (FractionRing S) := FractionRing.liftAlgebra R (FractionRing S)
this : IsScalarTower R (FractionRing R) M
⊢ S →ₐ[R] M

Next tactic:
have := FractionRing.isScalarTower_liftAlgebra R (FractionRing S)
/-- A (random) homomorphism from an algebraic extension of R into an algebraically
  closed extension of R. -/
noncomputable irreducible_def lift : S →ₐ[R] M := by
  letI : IsDomain R := (NoZeroSMulDivisors.algebraMap_injective R S).isDomain _
  letI := FractionRing.liftAlgebra R M
  letI := FractionRing.liftAlgebra R (FractionRing S)
  have := FractionRing.isScalarTower_liftAlgebra R M
  have := FractionRing.isScalarTower_liftAlgebra R (FractionRing S)
  

Proof state:
k : Type u
inst✝¹³ : Field k
K : Type u
inst✝¹² : Field K
L : Type v
M : Type w
inst✝¹¹ : Field L
inst✝¹⁰ : Algebra K L
inst✝⁹ : Field M
inst✝⁸ : Algebra K M
inst✝⁷ : IsAlgClosed M
hL : Algebra.IsAlgebraic K L
R : Type u
inst✝⁶ : CommRing R
S : Type v
inst✝⁵ : CommRing S
inst✝⁴ : IsDomain S
inst✝³ : Algebra R S
inst✝² : Algebra R M
inst✝¹ : NoZeroSMulDivisors R S
inst✝ : NoZeroSMulDivisors R M
hS : Algebra.IsAlgebraic R S
this✝³ : IsDomain R := Function.Injective.isDomain (algebraMap R S) (NoZeroSMulDivisors.algebraMap_injective R S)
this✝² : Algebra (FractionRing R) M := FractionRing.liftAlgebra R M
this✝¹ : Algebra (FractionRing R) (FractionRing S) := FractionRing.liftAlgebra R (FractionRing S)
this✝ : IsScalarTower R (FractionRing R) M
this : IsScalarTower R (FractionRing R) (FractionRing S)
⊢ S →ₐ[R] M

Next tactic:
have : Algebra.IsAlgebraic (FractionRing R) (FractionRing S) :=
    FractionRing.isAlgebraic hS
/-- A (random) homomorphism from an algebraic extension of R into an algebraically
  closed extension of R. -/
noncomputable irreducible_def lift : S →ₐ[R] M := by
  letI : IsDomain R := (NoZeroSMulDivisors.algebraMap_injective R S).isDomain _
  letI := FractionRing.liftAlgebra R M
  letI := FractionRing.liftAlgebra R (FractionRing S)
  have := FractionRing.isScalarTower_liftAlgebra R M
  have := FractionRing.isScalarTower_liftAlgebra R (FractionRing S)
  have : Algebra.IsAlgebraic (FractionRing R) (FractionRing S) :=
    FractionRing.isAlgebraic hS
  

Proof state:
k : Type u
inst✝¹³ : Field k
K : Type u
inst✝¹² : Field K
L : Type v
M : Type w
inst✝¹¹ : Field L
inst✝¹⁰ : Algebra K L
inst✝⁹ : Field M
inst✝⁸ : Algebra K M
inst✝⁷ : IsAlgClosed M
hL : Algebra.IsAlgebraic K L
R : Type u
inst✝⁶ : CommRing R
S : Type v
inst✝⁵ : CommRing S
inst✝⁴ : IsDomain S
inst✝³ : Algebra R S
inst✝² : Algebra R M
inst✝¹ : NoZeroSMulDivisors R S
inst✝ : NoZeroSMulDivisors R M
hS : Algebra.IsAlgebraic R S
this✝⁴ : IsDomain R := Function.Injective.isDomain (algebraMap R S) (NoZeroSMulDivisors.algebraMap_injective R S)
this✝³ : Algebra (FractionRing R) M := FractionRing.liftAlgebra R M
this✝² : Algebra (FractionRing R) (FractionRing S) := FractionRing.liftAlgebra R (FractionRing S)
this✝¹ : IsScalarTower R (FractionRing R) M
this✝ : IsScalarTower R (FractionRing R) (FractionRing S)
this : Algebra.IsAlgebraic (FractionRing R) (FractionRing S)
⊢ S →ₐ[R] M

Next tactic:
let f : FractionRing S →ₐ[FractionRing R] M := lift_aux (FractionRing R) (FractionRing S) M this
/-- A (random) homomorphism from an algebraic extension of R into an algebraically
  closed extension of R. -/
noncomputable irreducible_def lift : S →ₐ[R] M := by
  letI : IsDomain R := (NoZeroSMulDivisors.algebraMap_injective R S).isDomain _
  letI := FractionRing.liftAlgebra R M
  letI := FractionRing.liftAlgebra R (FractionRing S)
  have := FractionRing.isScalarTower_liftAlgebra R M
  have := FractionRing.isScalarTower_liftAlgebra R (FractionRing S)
  have : Algebra.IsAlgebraic (FractionRing R) (FractionRing S) :=
    FractionRing.isAlgebraic hS
  let f : FractionRing S →ₐ[FractionRing R] M := lift_aux (FractionRing R) (FractionRing S) M this
  

Proof state:
k : Type u
inst✝¹³ : Field k
K : Type u
inst✝¹² : Field K
L : Type v
M : Type w
inst✝¹¹ : Field L
inst✝¹⁰ : Algebra K L
inst✝⁹ : Field M
inst✝⁸ : Algebra K M
inst✝⁷ : IsAlgClosed M
hL : Algebra.IsAlgebraic K L
R : Type u
inst✝⁶ : CommRing R
S : Type v
inst✝⁵ : CommRing S
inst✝⁴ : IsDomain S
inst✝³ : Algebra R S
inst✝² : Algebra R M
inst✝¹ : NoZeroSMulDivisors R S
inst✝ : NoZeroSMulDivisors R M
hS : Algebra.IsAlgebraic R S
this✝⁴ : IsDomain R := Function.Injective.isDomain (algebraMap R S) (NoZeroSMulDivisors.algebraMap_injective R S)
this✝³ : Algebra (FractionRing R) M := FractionRing.liftAlgebra R M
this✝² : Algebra (FractionRing R) (FractionRing S) := FractionRing.liftAlgebra R (FractionRing S)
this✝¹ : IsScalarTower R (FractionRing R) M
this✝ : IsScalarTower R (FractionRing R) (FractionRing S)
this : Algebra.IsAlgebraic (FractionRing R) (FractionRing S)
f : FractionRing S →ₐ[FractionRing R] M := IsAlgClosed.lift_aux (FractionRing R) (FractionRing S) M this
⊢ S →ₐ[R] M

Next tactic:
exact (f.restrictScalars R).comp ((Algebra.ofId S (FractionRing S)).restrictScalars R)
/-- Algebraically closed fields are infinite since `Xⁿ⁺¹ - 1` is separable when `#K = n` -/
instance (priority := 500) {K : Type*} [Field K] [IsAlgClosed K] : Infinite K := by
  

Proof state:
k : Type u
inst✝¹⁵ : Field k
K✝ : Type u
inst✝¹⁴ : Field K✝
L : Type v
M : Type w
inst✝¹³ : Field L
inst✝¹² : Algebra K✝ L
inst✝¹¹ : Field M
inst✝¹⁰ : Algebra K✝ M
inst✝⁹ : IsAlgClosed M
hL : Algebra.IsAlgebraic K✝ L
R : Type u
inst✝⁸ : CommRing R
S : Type v
inst✝⁷ : CommRing S
inst✝⁶ : IsDomain S
inst✝⁵ : Algebra R S
inst✝⁴ : Algebra R M
inst✝³ : NoZeroSMulDivisors R S
inst✝² : NoZeroSMulDivisors R M
hS : Algebra.IsAlgebraic R S
K : Type u_1
inst✝¹ : Field K
inst✝ : IsAlgClosed K
⊢ Infinite K

Next tactic:
apply Infinite.of_not_fintype
/-- Algebraically closed fields are infinite since `Xⁿ⁺¹ - 1` is separable when `#K = n` -/
instance (priority := 500) {K : Type*} [Field K] [IsAlgClosed K] : Infinite K := by
  apply Infinite.of_not_fintype
  

Proof state:
case h
k : Type u
inst✝¹⁵ : Field k
K✝ : Type u
inst✝¹⁴ : Field K✝
L : Type v
M : Type w
inst✝¹³ : Field L
inst✝¹² : Algebra K✝ L
inst✝¹¹ : Field M
inst✝¹⁰ : Algebra K✝ M
inst✝⁹ : IsAlgClosed M
hL : Algebra.IsAlgebraic K✝ L
R : Type u
inst✝⁸ : CommRing R
S : Type v
inst✝⁷ : CommRing S
inst✝⁶ : IsDomain S
inst✝⁵ : Algebra R S
inst✝⁴ : Algebra R M
inst✝³ : NoZeroSMulDivisors R S
inst✝² : NoZeroSMulDivisors R M
hS : Algebra.IsAlgebraic R S
K : Type u_1
inst✝¹ : Field K
inst✝ : IsAlgClosed K
⊢ Fintype K → False

Next tactic:
intro hfin
/-- Algebraically closed fields are infinite since `Xⁿ⁺¹ - 1` is separable when `#K = n` -/
instance (priority := 500) {K : Type*} [Field K] [IsAlgClosed K] : Infinite K := by
  apply Infinite.of_not_fintype
  intro hfin
  

Proof state:
case h
k : Type u
inst✝¹⁵ : Field k
K✝ : Type u
inst✝¹⁴ : Field K✝
L : Type v
M : Type w
inst✝¹³ : Field L
inst✝¹² : Algebra K✝ L
inst✝¹¹ : Field M
inst✝¹⁰ : Algebra K✝ M
inst✝⁹ : IsAlgClosed M
hL : Algebra.IsAlgebraic K✝ L
R : Type u
inst✝⁸ : CommRing R
S : Type v
inst✝⁷ : CommRing S
inst✝⁶ : IsDomain S
inst✝⁵ : Algebra R S
inst✝⁴ : Algebra R M
inst✝³ : NoZeroSMulDivisors R S
inst✝² : NoZeroSMulDivisors R M
hS : Algebra.IsAlgebraic R S
K : Type u_1
inst✝¹ : Field K
inst✝ : IsAlgClosed K
hfin : Fintype K
⊢ False

Next tactic:
set n := Fintype.card K
/-- Algebraically closed fields are infinite since `Xⁿ⁺¹ - 1` is separable when `#K = n` -/
instance (priority := 500) {K : Type*} [Field K] [IsAlgClosed K] : Infinite K := by
  apply Infinite.of_not_fintype
  intro hfin
  set n := Fintype.card K
  

Proof state:
case h
k : Type u
inst✝¹⁵ : Field k
K✝ : Type u
inst✝¹⁴ : Field K✝
L : Type v
M : Type w
inst✝¹³ : Field L
inst✝¹² : Algebra K✝ L
inst✝¹¹ : Field M
inst✝¹⁰ : Algebra K✝ M
inst✝⁹ : IsAlgClosed M
hL : Algebra.IsAlgebraic K✝ L
R : Type u
inst✝⁸ : CommRing R
S : Type v
inst✝⁷ : CommRing S
inst✝⁶ : IsDomain S
inst✝⁵ : Algebra R S
inst✝⁴ : Algebra R M
inst✝³ : NoZeroSMulDivisors R S
inst✝² : NoZeroSMulDivisors R M
hS : Algebra.IsAlgebraic R S
K : Type u_1
inst✝¹ : Field K
inst✝ : IsAlgClosed K
hfin : Fintype K
n : ℕ := Fintype.card K
⊢ False

Next tactic:
set f := (X : K[X]) ^ (n + 1) - 1
/-- Algebraically closed fields are infinite since `Xⁿ⁺¹ - 1` is separable when `#K = n` -/
instance (priority := 500) {K : Type*} [Field K] [IsAlgClosed K] : Infinite K := by
  apply Infinite.of_not_fintype
  intro hfin
  set n := Fintype.card K
  set f := (X : K[X]) ^ (n + 1) - 1
  

Proof state:
case h
k : Type u
inst✝¹⁵ : Field k
K✝ : Type u
inst✝¹⁴ : Field K✝
L : Type v
M : Type w
inst✝¹³ : Field L
inst✝¹² : Algebra K✝ L
inst✝¹¹ : Field M
inst✝¹⁰ : Algebra K✝ M
inst✝⁹ : IsAlgClosed M
hL : Algebra.IsAlgebraic K✝ L
R : Type u
inst✝⁸ : CommRing R
S : Type v
inst✝⁷ : CommRing S
inst✝⁶ : IsDomain S
inst✝⁵ : Algebra R S
inst✝⁴ : Algebra R M
inst✝³ : NoZeroSMulDivisors R S
inst✝² : NoZeroSMulDivisors R M
hS : Algebra.IsAlgebraic R S
K : Type u_1
inst✝¹ : Field K
inst✝ : IsAlgClosed K
hfin : Fintype K
n : ℕ := Fintype.card K
f : K[X] := X ^ (n + 1) - 1
⊢ False

Next tactic:
have hfsep : Separable f := separable_X_pow_sub_C 1 (by simp) one_ne_zero
/-- Algebraically closed fields are infinite since `Xⁿ⁺¹ - 1` is separable when `#K = n` -/
instance (priority := 500) {K : Type*} [Field K] [IsAlgClosed K] : Infinite K := by
  apply Infinite.of_not_fintype
  intro hfin
  set n := Fintype.card K
  set f := (X : K[X]) ^ (n + 1) - 1
  have hfsep : Separable f := separable_X_pow_sub_C 1 (by 

Proof state:
k : Type u
inst✝¹⁵ : Field k
K✝ : Type u
inst✝¹⁴ : Field K✝
L : Type v
M : Type w
inst✝¹³ : Field L
inst✝¹² : Algebra K✝ L
inst✝¹¹ : Field M
inst✝¹⁰ : Algebra K✝ M
inst✝⁹ : IsAlgClosed M
hL : Algebra.IsAlgebraic K✝ L
R : Type u
inst✝⁸ : CommRing R
S : Type v
inst✝⁷ : CommRing S
inst✝⁶ : IsDomain S
inst✝⁵ : Algebra R S
inst✝⁴ : Algebra R M
inst✝³ : NoZeroSMulDivisors R S
inst✝² : NoZeroSMulDivisors R M
hS : Algebra.IsAlgebraic R S
K : Type u_1
inst✝¹ : Field K
inst✝ : IsAlgClosed K
hfin : Fintype K
n : ℕ := Fintype.card K
f : K[X] := X ^ (n + 1) - 1
⊢ ↑(n + 1) ≠ 0

Next tactic:
simp
/-- Algebraically closed fields are infinite since `Xⁿ⁺¹ - 1` is separable when `#K = n` -/
instance (priority := 500) {K : Type*} [Field K] [IsAlgClosed K] : Infinite K := by
  apply Infinite.of_not_fintype
  intro hfin
  set n := Fintype.card K
  set f := (X : K[X]) ^ (n + 1) - 1
  have hfsep : Separable f := separable_X_pow_sub_C 1 (by simp) one_ne_zero
  

Proof state:
case h
k : Type u
inst✝¹⁵ : Field k
K✝ : Type u
inst✝¹⁴ : Field K✝
L : Type v
M : Type w
inst✝¹³ : Field L
inst✝¹² : Algebra K✝ L
inst✝¹¹ : Field M
inst✝¹⁰ : Algebra K✝ M
inst✝⁹ : IsAlgClosed M
hL : Algebra.IsAlgebraic K✝ L
R : Type u
inst✝⁸ : CommRing R
S : Type v
inst✝⁷ : CommRing S
inst✝⁶ : IsDomain S
inst✝⁵ : Algebra R S
inst✝⁴ : Algebra R M
inst✝³ : NoZeroSMulDivisors R S
inst✝² : NoZeroSMulDivisors R M
hS : Algebra.IsAlgebraic R S
K : Type u_1
inst✝¹ : Field K
inst✝ : IsAlgClosed K
hfin : Fintype K
n : ℕ := Fintype.card K
f : K[X] := X ^ (n + 1) - 1
hfsep : Separable f
⊢ False

Next tactic:
apply Nat.not_succ_le_self (Fintype.card K)
/-- Algebraically closed fields are infinite since `Xⁿ⁺¹ - 1` is separable when `#K = n` -/
instance (priority := 500) {K : Type*} [Field K] [IsAlgClosed K] : Infinite K := by
  apply Infinite.of_not_fintype
  intro hfin
  set n := Fintype.card K
  set f := (X : K[X]) ^ (n + 1) - 1
  have hfsep : Separable f := separable_X_pow_sub_C 1 (by simp) one_ne_zero
  apply Nat.not_succ_le_self (Fintype.card K)
  

Proof state:
case h
k : Type u
inst✝¹⁵ : Field k
K✝ : Type u
inst✝¹⁴ : Field K✝
L : Type v
M : Type w
inst✝¹³ : Field L
inst✝¹² : Algebra K✝ L
inst✝¹¹ : Field M
inst✝¹⁰ : Algebra K✝ M
inst✝⁹ : IsAlgClosed M
hL : Algebra.IsAlgebraic K✝ L
R : Type u
inst✝⁸ : CommRing R
S : Type v
inst✝⁷ : CommRing S
inst✝⁶ : IsDomain S
inst✝⁵ : Algebra R S
inst✝⁴ : Algebra R M
inst✝³ : NoZeroSMulDivisors R S
inst✝² : NoZeroSMulDivisors R M
hS : Algebra.IsAlgebraic R S
K : Type u_1
inst✝¹ : Field K
inst✝ : IsAlgClosed K
hfin : Fintype K
n : ℕ := Fintype.card K
f : K[X] := X ^ (n + 1) - 1
hfsep : Separable f
⊢ Nat.succ (Fintype.card K) ≤ Fintype.card K

Next tactic:
have hroot : n.succ = Fintype.card (f.rootSet K) := by
    erw [card_rootSet_eq_natDegree hfsep (IsAlgClosed.splits_domain _), natDegree_X_pow_sub_C]
/-- Algebraically closed fields are infinite since `Xⁿ⁺¹ - 1` is separable when `#K = n` -/
instance (priority := 500) {K : Type*} [Field K] [IsAlgClosed K] : Infinite K := by
  apply Infinite.of_not_fintype
  intro hfin
  set n := Fintype.card K
  set f := (X : K[X]) ^ (n + 1) - 1
  have hfsep : Separable f := separable_X_pow_sub_C 1 (by simp) one_ne_zero
  apply Nat.not_succ_le_self (Fintype.card K)
  have hroot : n.succ = Fintype.card (f.rootSet K) := by
    

Proof state:
k : Type u
inst✝¹⁵ : Field k
K✝ : Type u
inst✝¹⁴ : Field K✝
L : Type v
M : Type w
inst✝¹³ : Field L
inst✝¹² : Algebra K✝ L
inst✝¹¹ : Field M
inst✝¹⁰ : Algebra K✝ M
inst✝⁹ : IsAlgClosed M
hL : Algebra.IsAlgebraic K✝ L
R : Type u
inst✝⁸ : CommRing R
S : Type v
inst✝⁷ : CommRing S
inst✝⁶ : IsDomain S
inst✝⁵ : Algebra R S
inst✝⁴ : Algebra R M
inst✝³ : NoZeroSMulDivisors R S
inst✝² : NoZeroSMulDivisors R M
hS : Algebra.IsAlgebraic R S
K : Type u_1
inst✝¹ : Field K
inst✝ : IsAlgClosed K
hfin : Fintype K
n : ℕ := Fintype.card K
f : K[X] := X ^ (n + 1) - 1
hfsep : Separable f
⊢ Nat.succ n = Fintype.card ↑(rootSet f K)

Next tactic:
erw [card_rootSet_eq_natDegree hfsep (IsAlgClosed.splits_domain _), natDegree_X_pow_sub_C]
/-- Algebraically closed fields are infinite since `Xⁿ⁺¹ - 1` is separable when `#K = n` -/
instance (priority := 500) {K : Type*} [Field K] [IsAlgClosed K] : Infinite K := by
  apply Infinite.of_not_fintype
  intro hfin
  set n := Fintype.card K
  set f := (X : K[X]) ^ (n + 1) - 1
  have hfsep : Separable f := separable_X_pow_sub_C 1 (by simp) one_ne_zero
  apply Nat.not_succ_le_self (Fintype.card K)
  have hroot : n.succ = Fintype.card (f.rootSet K) := by
    erw [card_rootSet_eq_natDegree hfsep (IsAlgClosed.splits_domain _), natDegree_X_pow_sub_C]
  

Proof state:
case h
k : Type u
inst✝¹⁵ : Field k
K✝ : Type u
inst✝¹⁴ : Field K✝
L : Type v
M : Type w
inst✝¹³ : Field L
inst✝¹² : Algebra K✝ L
inst✝¹¹ : Field M
inst✝¹⁰ : Algebra K✝ M
inst✝⁹ : IsAlgClosed M
hL : Algebra.IsAlgebraic K✝ L
R : Type u
inst✝⁸ : CommRing R
S : Type v
inst✝⁷ : CommRing S
inst✝⁶ : IsDomain S
inst✝⁵ : Algebra R S
inst✝⁴ : Algebra R M
inst✝³ : NoZeroSMulDivisors R S
inst✝² : NoZeroSMulDivisors R M
hS : Algebra.IsAlgebraic R S
K : Type u_1
inst✝¹ : Field K
inst✝ : IsAlgClosed K
hfin : Fintype K
n : ℕ := Fintype.card K
f : K[X] := X ^ (n + 1) - 1
hfsep : Separable f
hroot : Nat.succ n = Fintype.card ↑(rootSet f K)
⊢ Nat.succ (Fintype.card K) ≤ Fintype.card K

Next tactic:
rw [hroot]
/-- Algebraically closed fields are infinite since `Xⁿ⁺¹ - 1` is separable when `#K = n` -/
instance (priority := 500) {K : Type*} [Field K] [IsAlgClosed K] : Infinite K := by
  apply Infinite.of_not_fintype
  intro hfin
  set n := Fintype.card K
  set f := (X : K[X]) ^ (n + 1) - 1
  have hfsep : Separable f := separable_X_pow_sub_C 1 (by simp) one_ne_zero
  apply Nat.not_succ_le_self (Fintype.card K)
  have hroot : n.succ = Fintype.card (f.rootSet K) := by
    erw [card_rootSet_eq_natDegree hfsep (IsAlgClosed.splits_domain _), natDegree_X_pow_sub_C]
  rw [hroot]
  

Proof state:
case h
k : Type u
inst✝¹⁵ : Field k
K✝ : Type u
inst✝¹⁴ : Field K✝
L : Type v
M : Type w
inst✝¹³ : Field L
inst✝¹² : Algebra K✝ L
inst✝¹¹ : Field M
inst✝¹⁰ : Algebra K✝ M
inst✝⁹ : IsAlgClosed M
hL : Algebra.IsAlgebraic K✝ L
R : Type u
inst✝⁸ : CommRing R
S : Type v
inst✝⁷ : CommRing S
inst✝⁶ : IsDomain S
inst✝⁵ : Algebra R S
inst✝⁴ : Algebra R M
inst✝³ : NoZeroSMulDivisors R S
inst✝² : NoZeroSMulDivisors R M
hS : Algebra.IsAlgebraic R S
K : Type u_1
inst✝¹ : Field K
inst✝ : IsAlgClosed K
hfin : Fintype K
n : ℕ := Fintype.card K
f : K[X] := X ^ (n + 1) - 1
hfsep : Separable f
hroot : Nat.succ n = Fintype.card ↑(rootSet f K)
⊢ Fintype.card ↑(rootSet f K) ≤ Fintype.card K

Next tactic:
exact Fintype.card_le_of_injective _ Subtype.coe_injective
/-- A (random) isomorphism between an algebraic closure of `R` and an algebraic closure of
  an algebraic extension of `R` -/
noncomputable def equivOfAlgebraic' [Nontrivial S] [NoZeroSMulDivisors R S]
    (hRL : Algebra.IsAlgebraic R L) : L ≃ₐ[R] M := by
  

Proof state:
k : Type u
inst✝²⁴ : Field k
K : Type u_1
J : Type u_2
R : Type u
S : Type u_3
L : Type v
M : Type w
inst✝²³ : Field K
inst✝²² : Field J
inst✝²¹ : CommRing R
inst✝²⁰ : CommRing S
inst✝¹⁹ : Field L
inst✝¹⁸ : Field M
inst✝¹⁷ : Algebra R M
inst✝¹⁶ : NoZeroSMulDivisors R M
inst✝¹⁵ : IsAlgClosure R M
inst✝¹⁴ : Algebra K M
inst✝¹³ : IsAlgClosure K M
inst✝¹² : Algebra S L
inst✝¹¹ : NoZeroSMulDivisors S L
inst✝¹⁰ : IsAlgClosure S L
inst✝⁹ : Algebra R S
inst✝⁸ : Algebra R L
inst✝⁷ : IsScalarTower R S L
inst✝⁶ : Algebra K J
inst✝⁵ : Algebra J L
inst✝⁴ : IsAlgClosure J L
inst✝³ : Algebra K L
inst✝² : IsScalarTower K J L
inst✝¹ : Nontrivial S
inst✝ : NoZeroSMulDivisors R S
hRL : Algebra.IsAlgebraic R L
⊢ L ≃ₐ[R] M

Next tactic:
letI : NoZeroSMulDivisors R L := NoZeroSMulDivisors.of_algebraMap_injective <| by
    rw [IsScalarTower.algebraMap_eq R S L]
    exact (Function.Injective.comp (NoZeroSMulDivisors.algebraMap_injective S L)
            (NoZeroSMulDivisors.algebraMap_injective R S) : _)
/-- A (random) isomorphism between an algebraic closure of `R` and an algebraic closure of
  an algebraic extension of `R` -/
noncomputable def equivOfAlgebraic' [Nontrivial S] [NoZeroSMulDivisors R S]
    (hRL : Algebra.IsAlgebraic R L) : L ≃ₐ[R] M := by
  letI : NoZeroSMulDivisors R L := NoZeroSMulDivisors.of_algebraMap_injective <| by
    

Proof state:
k : Type u
inst✝²⁴ : Field k
K : Type u_1
J : Type u_2
R : Type u
S : Type u_3
L : Type v
M : Type w
inst✝²³ : Field K
inst✝²² : Field J
inst✝²¹ : CommRing R
inst✝²⁰ : CommRing S
inst✝¹⁹ : Field L
inst✝¹⁸ : Field M
inst✝¹⁷ : Algebra R M
inst✝¹⁶ : NoZeroSMulDivisors R M
inst✝¹⁵ : IsAlgClosure R M
inst✝¹⁴ : Algebra K M
inst✝¹³ : IsAlgClosure K M
inst✝¹² : Algebra S L
inst✝¹¹ : NoZeroSMulDivisors S L
inst✝¹⁰ : IsAlgClosure S L
inst✝⁹ : Algebra R S
inst✝⁸ : Algebra R L
inst✝⁷ : IsScalarTower R S L
inst✝⁶ : Algebra K J
inst✝⁵ : Algebra J L
inst✝⁴ : IsAlgClosure J L
inst✝³ : Algebra K L
inst✝² : IsScalarTower K J L
inst✝¹ : Nontrivial S
inst✝ : NoZeroSMulDivisors R S
hRL : Algebra.IsAlgebraic R L
⊢ Function.Injective ⇑(algebraMap R L)

Next tactic:
rw [IsScalarTower.algebraMap_eq R S L]
/-- A (random) isomorphism between an algebraic closure of `R` and an algebraic closure of
  an algebraic extension of `R` -/
noncomputable def equivOfAlgebraic' [Nontrivial S] [NoZeroSMulDivisors R S]
    (hRL : Algebra.IsAlgebraic R L) : L ≃ₐ[R] M := by
  letI : NoZeroSMulDivisors R L := NoZeroSMulDivisors.of_algebraMap_injective <| by
    rw [IsScalarTower.algebraMap_eq R S L]
    

Proof state:
k : Type u
inst✝²⁴ : Field k
K : Type u_1
J : Type u_2
R : Type u
S : Type u_3
L : Type v
M : Type w
inst✝²³ : Field K
inst✝²² : Field J
inst✝²¹ : CommRing R
inst✝²⁰ : CommRing S
inst✝¹⁹ : Field L
inst✝¹⁸ : Field M
inst✝¹⁷ : Algebra R M
inst✝¹⁶ : NoZeroSMulDivisors R M
inst✝¹⁵ : IsAlgClosure R M
inst✝¹⁴ : Algebra K M
inst✝¹³ : IsAlgClosure K M
inst✝¹² : Algebra S L
inst✝¹¹ : NoZeroSMulDivisors S L
inst✝¹⁰ : IsAlgClosure S L
inst✝⁹ : Algebra R S
inst✝⁸ : Algebra R L
inst✝⁷ : IsScalarTower R S L
inst✝⁶ : Algebra K J
inst✝⁵ : Algebra J L
inst✝⁴ : IsAlgClosure J L
inst✝³ : Algebra K L
inst✝² : IsScalarTower K J L
inst✝¹ : Nontrivial S
inst✝ : NoZeroSMulDivisors R S
hRL : Algebra.IsAlgebraic R L
⊢ Function.Injective ⇑(RingHom.comp (algebraMap S L) (algebraMap R S))

Next tactic:
exact (Function.Injective.comp (NoZeroSMulDivisors.algebraMap_injective S L)
            (NoZeroSMulDivisors.algebraMap_injective R S) : _)
/-- A (random) isomorphism between an algebraic closure of `R` and an algebraic closure of
  an algebraic extension of `R` -/
noncomputable def equivOfAlgebraic' [Nontrivial S] [NoZeroSMulDivisors R S]
    (hRL : Algebra.IsAlgebraic R L) : L ≃ₐ[R] M := by
  letI : NoZeroSMulDivisors R L := NoZeroSMulDivisors.of_algebraMap_injective <| by
    rw [IsScalarTower.algebraMap_eq R S L]
    exact (Function.Injective.comp (NoZeroSMulDivisors.algebraMap_injective S L)
            (NoZeroSMulDivisors.algebraMap_injective R S) : _)
  

Proof state:
k : Type u
inst✝²⁴ : Field k
K : Type u_1
J : Type u_2
R : Type u
S : Type u_3
L : Type v
M : Type w
inst✝²³ : Field K
inst✝²² : Field J
inst✝²¹ : CommRing R
inst✝²⁰ : CommRing S
inst✝¹⁹ : Field L
inst✝¹⁸ : Field M
inst✝¹⁷ : Algebra R M
inst✝¹⁶ : NoZeroSMulDivisors R M
inst✝¹⁵ : IsAlgClosure R M
inst✝¹⁴ : Algebra K M
inst✝¹³ : IsAlgClosure K M
inst✝¹² : Algebra S L
inst✝¹¹ : NoZeroSMulDivisors S L
inst✝¹⁰ : IsAlgClosure S L
inst✝⁹ : Algebra R S
inst✝⁸ : Algebra R L
inst✝⁷ : IsScalarTower R S L
inst✝⁶ : Algebra K J
inst✝⁵ : Algebra J L
inst✝⁴ : IsAlgClosure J L
inst✝³ : Algebra K L
inst✝² : IsScalarTower K J L
inst✝¹ : Nontrivial S
inst✝ : NoZeroSMulDivisors R S
hRL : Algebra.IsAlgebraic R L
this : NoZeroSMulDivisors R L :=
  NoZeroSMulDivisors.of_algebraMap_injective
    (Eq.mpr (id (IsScalarTower.algebraMap_eq R S L ▸ Eq.refl (Function.Injective ⇑(algebraMap R L))))
      (Function.Injective.comp (NoZeroSMulDivisors.algebraMap_injective S L)
        (NoZeroSMulDivisors.algebraMap_injective R S)))
⊢ L ≃ₐ[R] M

Next tactic:
letI : IsAlgClosure R L :=
    { alg_closed := IsAlgClosure.alg_closed S
      algebraic := hRL }