Theorem: NumberField.discr_eq_discr_of_algEquiv
File: Mathlib/NumberTheory/NumberField/Discriminant.lean

tactic: let f₀ : 𝓞 K ≃ₗ[ℤ] 𝓞 L := (f.restrictScalars ℤ).mapIntegralClosure.toLinearEquiv
state_before: K : Type u_1
inst✝³ : Field K
inst✝² : NumberField K
L : Type u_2
inst✝¹ : Field L
inst✝ : NumberField L
f : K ≃ₐ[ℚ] L
⊢ discr K = discr L
state_after: K : Type u_1
inst✝³ : Field K
inst✝² : NumberField K
L : Type u_2
inst✝¹ : Field L
inst✝ : NumberField L
f : K ≃ₐ[ℚ] L
f₀ : 𝓞 K ≃ₗ[ℤ] 𝓞 L := (AlgEquiv.restrictScalars ℤ f).mapIntegralClosure.toLinearEquiv
⊢ discr K = discr L

tactic: rw [← Rat.intCast_inj, coe_discr, Algebra.discr_eq_discr_of_algEquiv (integralBasis K) f,
  ← discr_eq_discr L ((RingOfIntegers.basis K).map f₀)]
state_before: K : Type u_1
inst✝³ : Field K
inst✝² : NumberField K
L : Type u_2
inst✝¹ : Field L
inst✝ : NumberField L
f : K ≃ₐ[ℚ] L
f₀ : 𝓞 K ≃ₗ[ℤ] 𝓞 L := (AlgEquiv.restrictScalars ℤ f).mapIntegralClosure.toLinearEquiv
⊢ discr K = discr L
state_after: K : Type u_1
inst✝³ : Field K
inst✝² : NumberField K
L : Type u_2
inst✝¹ : Field L
inst✝ : NumberField L
f : K ≃ₐ[ℚ] L
f₀ : 𝓞 K ≃ₗ[ℤ] 𝓞 L := (AlgEquiv.restrictScalars ℤ f).mapIntegralClosure.toLinearEquiv
⊢ Algebra.discr ℚ (⇑f ∘ ⇑(integralBasis K)) = ↑(Algebra.discr ℤ ⇑((RingOfIntegers.basis K).map f₀))

tactic: change _ = algebraMap ℤ ℚ _
state_before: K : Type u_1
inst✝³ : Field K
inst✝² : NumberField K
L : Type u_2
inst✝¹ : Field L
inst✝ : NumberField L
f : K ≃ₐ[ℚ] L
f₀ : 𝓞 K ≃ₗ[ℤ] 𝓞 L := (AlgEquiv.restrictScalars ℤ f).mapIntegralClosure.toLinearEquiv
⊢ Algebra.discr ℚ (⇑f ∘ ⇑(integralBasis K)) = ↑(Algebra.discr ℤ ⇑((RingOfIntegers.basis K).map f₀))
state_after: K : Type u_1
inst✝³ : Field K
inst✝² : NumberField K
L : Type u_2
inst✝¹ : Field L
inst✝ : NumberField L
f : K ≃ₐ[ℚ] L
f₀ : 𝓞 K ≃ₗ[ℤ] 𝓞 L := (AlgEquiv.restrictScalars ℤ f).mapIntegralClosure.toLinearEquiv
⊢ Algebra.discr ℚ (⇑f ∘ ⇑(integralBasis K)) = (algebraMap ℤ ℚ) (Algebra.discr ℤ ⇑((RingOfIntegers.basis K).map f₀))

tactic: rw [← Algebra.discr_localizationLocalization ℤ (nonZeroDivisors ℤ) L]
state_before: K : Type u_1
inst✝³ : Field K
inst✝² : NumberField K
L : Type u_2
inst✝¹ : Field L
inst✝ : NumberField L
f : K ≃ₐ[ℚ] L
f₀ : 𝓞 K ≃ₗ[ℤ] 𝓞 L := (AlgEquiv.restrictScalars ℤ f).mapIntegralClosure.toLinearEquiv
⊢ Algebra.discr ℚ (⇑f ∘ ⇑(integralBasis K)) = (algebraMap ℤ ℚ) (Algebra.discr ℤ ⇑((RingOfIntegers.basis K).map f₀))
state_after: K : Type u_1
inst✝³ : Field K
inst✝² : NumberField K
L : Type u_2
inst✝¹ : Field L
inst✝ : NumberField L
f : K ≃ₐ[ℚ] L
f₀ : 𝓞 K ≃ₗ[ℤ] 𝓞 L := (AlgEquiv.restrictScalars ℤ f).mapIntegralClosure.toLinearEquiv
⊢ Algebra.discr ℚ (⇑f ∘ ⇑(integralBasis K)) =
    Algebra.discr ℚ ⇑(Basis.localizationLocalization ℚ ℤ⁰ L ((RingOfIntegers.basis K).map f₀))

tactic: congr
state_before: K : Type u_1
inst✝³ : Field K
inst✝² : NumberField K
L : Type u_2
inst✝¹ : Field L
inst✝ : NumberField L
f : K ≃ₐ[ℚ] L
f₀ : 𝓞 K ≃ₗ[ℤ] 𝓞 L := (AlgEquiv.restrictScalars ℤ f).mapIntegralClosure.toLinearEquiv
⊢ Algebra.discr ℚ (⇑f ∘ ⇑(integralBasis K)) =
    Algebra.discr ℚ ⇑(Basis.localizationLocalization ℚ ℤ⁰ L ((RingOfIntegers.basis K).map f₀))
state_after: case e_b
K : Type u_1
inst✝³ : Field K
inst✝² : NumberField K
L : Type u_2
inst✝¹ : Field L
inst✝ : NumberField L
f : K ≃ₐ[ℚ] L
f₀ : 𝓞 K ≃ₗ[ℤ] 𝓞 L := (AlgEquiv.restrictScalars ℤ f).mapIntegralClosure.toLinearEquiv
⊢ ⇑f ∘ ⇑(integralBasis K) = ⇑(Basis.localizationLocalization ℚ ℤ⁰ L ((RingOfIntegers.basis K).map f₀))

tactic: ext
state_before: case e_b
K : Type u_1
inst✝³ : Field K
inst✝² : NumberField K
L : Type u_2
inst✝¹ : Field L
inst✝ : NumberField L
f : K ≃ₐ[ℚ] L
f₀ : 𝓞 K ≃ₗ[ℤ] 𝓞 L := (AlgEquiv.restrictScalars ℤ f).mapIntegralClosure.toLinearEquiv
⊢ ⇑f ∘ ⇑(integralBasis K) = ⇑(Basis.localizationLocalization ℚ ℤ⁰ L ((RingOfIntegers.basis K).map f₀))
state_after: case e_b.h
K : Type u_1
inst✝³ : Field K
inst✝² : NumberField K
L : Type u_2
inst✝¹ : Field L
inst✝ : NumberField L
f : K ≃ₐ[ℚ] L
f₀ : 𝓞 K ≃ₗ[ℤ] 𝓞 L := (AlgEquiv.restrictScalars ℤ f).mapIntegralClosure.toLinearEquiv
x✝ : Module.Free.ChooseBasisIndex ℤ (𝓞 K)
⊢ (⇑f ∘ ⇑(integralBasis K)) x✝ = (Basis.localizationLocalization ℚ ℤ⁰ L ((RingOfIntegers.basis K).map f₀)) x✝

tactic: simp only [Function.comp_apply, integralBasis_apply, Basis.localizationLocalization_apply,
  Basis.map_apply]
state_before: case e_b.h
K : Type u_1
inst✝³ : Field K
inst✝² : NumberField K
L : Type u_2
inst✝¹ : Field L
inst✝ : NumberField L
f : K ≃ₐ[ℚ] L
f₀ : 𝓞 K ≃ₗ[ℤ] 𝓞 L := (AlgEquiv.restrictScalars ℤ f).mapIntegralClosure.toLinearEquiv
x✝ : Module.Free.ChooseBasisIndex ℤ (𝓞 K)
⊢ (⇑f ∘ ⇑(integralBasis K)) x✝ = (Basis.localizationLocalization ℚ ℤ⁰ L ((RingOfIntegers.basis K).map f₀)) x✝
state_after: case e_b.h
K : Type u_1
inst✝³ : Field K
inst✝² : NumberField K
L : Type u_2
inst✝¹ : Field L
inst✝ : NumberField L
f : K ≃ₐ[ℚ] L
f₀ : 𝓞 K ≃ₗ[ℤ] 𝓞 L := (AlgEquiv.restrictScalars ℤ f).mapIntegralClosure.toLinearEquiv
x✝ : Module.Free.ChooseBasisIndex ℤ (𝓞 K)
⊢ f ((algebraMap (𝓞 K) K) ((RingOfIntegers.basis K) x✝)) = (algebraMap (𝓞 L) L) (f₀ ((RingOfIntegers.basis K) x✝))

tactic: rfl
state_before: case e_b.h
K : Type u_1
inst✝³ : Field K
inst✝² : NumberField K
L : Type u_2
inst✝¹ : Field L
inst✝ : NumberField L
f : K ≃ₐ[ℚ] L
f₀ : 𝓞 K ≃ₗ[ℤ] 𝓞 L := (AlgEquiv.restrictScalars ℤ f).mapIntegralClosure.toLinearEquiv
x✝ : Module.Free.ChooseBasisIndex ℤ (𝓞 K)
⊢ f ((algebraMap (𝓞 K) K) ((RingOfIntegers.basis K) x✝)) = (algebraMap (𝓞 L) L) (f₀ ((RingOfIntegers.basis K) x✝))
state_after: no goals