-- Mathlib/NumberTheory/FunctionField.lean
theorem algebraMap_injective : Function.Injective (⇑(algebraMap Fq[X] (ringOfIntegers Fq F)))

Proof state:
Fq : Type u_1
F : Type u_2
inst✝⁴ : Field Fq
inst✝³ : Field F
inst✝² : Algebra Fq[X] F
inst✝¹ : Algebra (RatFunc Fq) F
inst✝ : IsScalarTower Fq[X] (RatFunc Fq) F
hinj : Function.Injective ⇑(algebraMap Fq[X] F)
⊢ Function.Injective ⇑(algebraMap Fq[X] ↥(ringOfIntegers Fq F))

Tactic:
rw [injective_iff_map_eq_zero (algebraMap Fq[X] (↥(ringOfIntegers Fq F)))]

Result:
Fq : Type u_1
F : Type u_2
inst✝⁴ : Field Fq
inst✝³ : Field F
inst✝² : Algebra Fq[X] F
inst✝¹ : Algebra (RatFunc Fq) F
inst✝ : IsScalarTower Fq[X] (RatFunc Fq) F
hinj : Function.Injective ⇑(algebraMap Fq[X] F)
⊢ ∀ (a : Fq[X]), (algebraMap Fq[X] ↥(ringOfIntegers Fq F)) a = 0 → a = 0

Proof state:
Fq : Type u_1
F : Type u_2
inst✝⁴ : Field Fq
inst✝³ : Field F
inst✝² : Algebra Fq[X] F
inst✝¹ : Algebra (RatFunc Fq) F
inst✝ : IsScalarTower Fq[X] (RatFunc Fq) F
hinj : Function.Injective ⇑(algebraMap Fq[X] F)
p : Fq[X]
hp : ↑((algebraMap Fq[X] ↥(ringOfIntegers Fq F)) p) = 0
⊢ p = 0

Tactic:
rw [injective_iff_map_eq_zero (algebraMap Fq[X] F)] at hinj

Result:
Fq : Type u_1
F : Type u_2
inst✝⁴ : Field Fq
inst✝³ : Field F
inst✝² : Algebra Fq[X] F
inst✝¹ : Algebra (RatFunc Fq) F
inst✝ : IsScalarTower Fq[X] (RatFunc Fq) F
hinj : ∀ (a : Fq[X]), (algebraMap Fq[X] F) a = 0 → a = 0
p : Fq[X]
hp : ↑((algebraMap Fq[X] ↥(ringOfIntegers Fq F)) p) = 0
⊢ p = 0

Proof state:
Fq : Type u_1
F : Type u_2
inst✝⁴ : Field Fq
inst✝³ : Field F
inst✝² : Algebra Fq[X] F
inst✝¹ : Algebra (RatFunc Fq) F
inst✝ : IsScalarTower Fq[X] (RatFunc Fq) F
⊢ Function.Injective ⇑(algebraMap Fq[X] ↥(ringOfIntegers Fq F))

Tactic:
have hinj : Function.Injective (⇑(algebraMap Fq[X] F)) := by
  rw [IsScalarTower.algebraMap_eq Fq[X] (RatFunc Fq) F]
  exact (algebraMap (RatFunc Fq) F).injective.comp (IsFractionRing.injective Fq[X] (RatFunc Fq))

Result:
Fq : Type u_1
F : Type u_2
inst✝⁴ : Field Fq
inst✝³ : Field F
inst✝² : Algebra Fq[X] F
inst✝¹ : Algebra (RatFunc Fq) F
inst✝ : IsScalarTower Fq[X] (RatFunc Fq) F
hinj : Function.Injective ⇑(algebraMap Fq[X] F)
⊢ Function.Injective ⇑(algebraMap Fq[X] ↥(ringOfIntegers Fq F))

Proof state:
Fq : Type u_1
F : Type u_2
inst✝⁴ : Field Fq
inst✝³ : Field F
inst✝² : Algebra Fq[X] F
inst✝¹ : Algebra (RatFunc Fq) F
inst✝ : IsScalarTower Fq[X] (RatFunc Fq) F
hinj : Function.Injective ⇑(algebraMap Fq[X] F)
⊢ ∀ (a : Fq[X]), (algebraMap Fq[X] ↥(ringOfIntegers Fq F)) a = 0 → a = 0

Tactic:
intro p hp

Result:
Fq : Type u_1
F : Type u_2
inst✝⁴ : Field Fq
inst✝³ : Field F
inst✝² : Algebra Fq[X] F
inst✝¹ : Algebra (RatFunc Fq) F
inst✝ : IsScalarTower Fq[X] (RatFunc Fq) F
hinj : Function.Injective ⇑(algebraMap Fq[X] F)
p : Fq[X]
hp : (algebraMap Fq[X] ↥(ringOfIntegers Fq F)) p = 0
⊢ p = 0

Proof state:
Fq : Type u_1
F : Type u_2
inst✝⁴ : Field Fq
inst✝³ : Field F
inst✝² : Algebra Fq[X] F
inst✝¹ : Algebra (RatFunc Fq) F
inst✝ : IsScalarTower Fq[X] (RatFunc Fq) F
hinj : ∀ (a : Fq[X]), (algebraMap Fq[X] F) a = 0 → a = 0
p : Fq[X]
hp : ↑((algebraMap Fq[X] ↥(ringOfIntegers Fq F)) p) = 0
⊢ p = 0

Tactic:
exact hinj p hp

Result:
no goals

Proof state:
Fq : Type u_1
F : Type u_2
inst✝⁴ : Field Fq
inst✝³ : Field F
inst✝² : Algebra Fq[X] F
inst✝¹ : Algebra (RatFunc Fq) F
inst✝ : IsScalarTower Fq[X] (RatFunc Fq) F
⊢ Function.Injective ⇑(algebraMap Fq[X] F)

Tactic:
rw [IsScalarTower.algebraMap_eq Fq[X] (RatFunc Fq) F]

Result:
Fq : Type u_1
F : Type u_2
inst✝⁴ : Field Fq
inst✝³ : Field F
inst✝² : Algebra Fq[X] F
inst✝¹ : Algebra (RatFunc Fq) F
inst✝ : IsScalarTower Fq[X] (RatFunc Fq) F
⊢ Function.Injective ⇑((algebraMap (RatFunc Fq) F).comp (algebraMap Fq[X] (RatFunc Fq)))

Proof state:
Fq : Type u_1
F : Type u_2
inst✝⁴ : Field Fq
inst✝³ : Field F
inst✝² : Algebra Fq[X] F
inst✝¹ : Algebra (RatFunc Fq) F
inst✝ : IsScalarTower Fq[X] (RatFunc Fq) F
⊢ Function.Injective ⇑((algebraMap (RatFunc Fq) F).comp (algebraMap Fq[X] (RatFunc Fq)))

Tactic:
exact (algebraMap (RatFunc Fq) F).injective.comp (IsFractionRing.injective Fq[X] (RatFunc Fq))

Result:
no goals

Proof state:
Fq : Type u_1
F : Type u_2
inst✝⁴ : Field Fq
inst✝³ : Field F
inst✝² : Algebra Fq[X] F
inst✝¹ : Algebra (RatFunc Fq) F
inst✝ : IsScalarTower Fq[X] (RatFunc Fq) F
hinj : Function.Injective ⇑(algebraMap Fq[X] F)
p : Fq[X]
hp : (algebraMap Fq[X] ↥(ringOfIntegers Fq F)) p = 0
⊢ p = 0

Tactic:
rw [← Subtype.coe_inj, Subalgebra.coe_zero] at hp

Result:
Fq : Type u_1
F : Type u_2
inst✝⁴ : Field Fq
inst✝³ : Field F
inst✝² : Algebra Fq[X] F
inst✝¹ : Algebra (RatFunc Fq) F
inst✝ : IsScalarTower Fq[X] (RatFunc Fq) F
hinj : Function.Injective ⇑(algebraMap Fq[X] F)
p : Fq[X]
hp : ↑((algebraMap Fq[X] ↥(ringOfIntegers Fq F)) p) = 0
⊢ p = 0