Theorem: Ideal.absNorm_span_singleton
File: Mathlib/RingTheory/Ideal/Norm.lean

tactic: rw [Algebra.norm_apply]
state_before: S : Type u_1
inst✝⁵ : CommRing S
inst✝⁴ : IsDomain S
inst✝³ : Nontrivial S
inst✝² : IsDedekindDomain S
inst✝¹ : Module.Free ℤ S
inst✝ : Module.Finite ℤ S
r : S
⊢ absNorm (span {r}) = ((Algebra.norm ℤ) r).natAbs
state_after: S : Type u_1
inst✝⁵ : CommRing S
inst✝⁴ : IsDomain S
inst✝³ : Nontrivial S
inst✝² : IsDedekindDomain S
inst✝¹ : Module.Free ℤ S
inst✝ : Module.Finite ℤ S
r : S
⊢ absNorm (span {r}) = (LinearMap.det ((Algebra.lmul ℤ S) r)).natAbs

tactic: by_cases hr : r = 0
state_before: S : Type u_1
inst✝⁵ : CommRing S
inst✝⁴ : IsDomain S
inst✝³ : Nontrivial S
inst✝² : IsDedekindDomain S
inst✝¹ : Module.Free ℤ S
inst✝ : Module.Finite ℤ S
r : S
⊢ absNorm (span {r}) = (LinearMap.det ((Algebra.lmul ℤ S) r)).natAbs
state_after: case pos
S : Type u_1
inst✝⁵ : CommRing S
inst✝⁴ : IsDomain S
inst✝³ : Nontrivial S
inst✝² : IsDedekindDomain S
inst✝¹ : Module.Free ℤ S
inst✝ : Module.Finite ℤ S
r : S
hr : r = 0
⊢ absNorm (span {r}) = (LinearMap.det ((Algebra.lmul ℤ S) r)).natAbs

case neg
S : Type u_1
inst✝⁵ : CommRing S
inst✝⁴ : IsDomain S
inst✝³ : Nontrivial S
inst✝² : IsDedekindDomain S
inst✝¹ : Module.Free ℤ S
inst✝ : Module.Finite ℤ S
r : S
hr : ¬r = 0
⊢ absNorm (span {r}) = (LinearMap.det ((Algebra.lmul ℤ S) r)).natAbs

tactic: letI := Ideal.fintypeQuotientOfFreeOfNeBot (span {r}) (mt span_singleton_eq_bot.mp hr)
state_before: case neg
S : Type u_1
inst✝⁵ : CommRing S
inst✝⁴ : IsDomain S
inst✝³ : Nontrivial S
inst✝² : IsDedekindDomain S
inst✝¹ : Module.Free ℤ S
inst✝ : Module.Finite ℤ S
r : S
hr : ¬r = 0
⊢ absNorm (span {r}) = (LinearMap.det ((Algebra.lmul ℤ S) r)).natAbs
state_after: case neg
S : Type u_1
inst✝⁵ : CommRing S
inst✝⁴ : IsDomain S
inst✝³ : Nontrivial S
inst✝² : IsDedekindDomain S
inst✝¹ : Module.Free ℤ S
inst✝ : Module.Finite ℤ S
r : S
hr : ¬r = 0
this : Fintype (S ⧸ span {r}) := (span {r}).fintypeQuotientOfFreeOfNeBot ⋯
⊢ absNorm (span {r}) = (LinearMap.det ((Algebra.lmul ℤ S) r)).natAbs

tactic: let b := Module.Free.chooseBasis ℤ S
state_before: case neg
S : Type u_1
inst✝⁵ : CommRing S
inst✝⁴ : IsDomain S
inst✝³ : Nontrivial S
inst✝² : IsDedekindDomain S
inst✝¹ : Module.Free ℤ S
inst✝ : Module.Finite ℤ S
r : S
hr : ¬r = 0
this : Fintype (S ⧸ span {r}) := (span {r}).fintypeQuotientOfFreeOfNeBot ⋯
⊢ absNorm (span {r}) = (LinearMap.det ((Algebra.lmul ℤ S) r)).natAbs
state_after: case neg
S : Type u_1
inst✝⁵ : CommRing S
inst✝⁴ : IsDomain S
inst✝³ : Nontrivial S
inst✝² : IsDedekindDomain S
inst✝¹ : Module.Free ℤ S
inst✝ : Module.Finite ℤ S
r : S
hr : ¬r = 0
this : Fintype (S ⧸ span {r}) := (span {r}).fintypeQuotientOfFreeOfNeBot ⋯
b : Basis (Module.Free.ChooseBasisIndex ℤ S) ℤ S := Module.Free.chooseBasis ℤ S
⊢ absNorm (span {r}) = (LinearMap.det ((Algebra.lmul ℤ S) r)).natAbs

tactic: rw [← natAbs_det_equiv _ (b.equiv (basisSpanSingleton b hr) (Equiv.refl _))]
state_before: case neg
S : Type u_1
inst✝⁵ : CommRing S
inst✝⁴ : IsDomain S
inst✝³ : Nontrivial S
inst✝² : IsDedekindDomain S
inst✝¹ : Module.Free ℤ S
inst✝ : Module.Finite ℤ S
r : S
hr : ¬r = 0
this : Fintype (S ⧸ span {r}) := (span {r}).fintypeQuotientOfFreeOfNeBot ⋯
b : Basis (Module.Free.ChooseBasisIndex ℤ S) ℤ S := Module.Free.chooseBasis ℤ S
⊢ absNorm (span {r}) = (LinearMap.det ((Algebra.lmul ℤ S) r)).natAbs
state_after: case neg
S : Type u_1
inst✝⁵ : CommRing S
inst✝⁴ : IsDomain S
inst✝³ : Nontrivial S
inst✝² : IsDedekindDomain S
inst✝¹ : Module.Free ℤ S
inst✝ : Module.Finite ℤ S
r : S
hr : ¬r = 0
this : Fintype (S ⧸ span {r}) := (span {r}).fintypeQuotientOfFreeOfNeBot ⋯
b : Basis (Module.Free.ChooseBasisIndex ℤ S) ℤ S := Module.Free.chooseBasis ℤ S
⊢ (LinearMap.det
        (↑ℤ (Submodule.subtype (span {r})) ∘ₗ
          (↑(b.equiv (basisSpanSingleton b hr)
                (Equiv.refl (Module.Free.ChooseBasisIndex ℤ S)))).toIntLinearMap)).natAbs =
    (LinearMap.det ((Algebra.lmul ℤ S) r)).natAbs

tactic: congr
state_before: case neg
S : Type u_1
inst✝⁵ : CommRing S
inst✝⁴ : IsDomain S
inst✝³ : Nontrivial S
inst✝² : IsDedekindDomain S
inst✝¹ : Module.Free ℤ S
inst✝ : Module.Finite ℤ S
r : S
hr : ¬r = 0
this : Fintype (S ⧸ span {r}) := (span {r}).fintypeQuotientOfFreeOfNeBot ⋯
b : Basis (Module.Free.ChooseBasisIndex ℤ S) ℤ S := Module.Free.chooseBasis ℤ S
⊢ (LinearMap.det
        (↑ℤ (Submodule.subtype (span {r})) ∘ₗ
          (↑(b.equiv (basisSpanSingleton b hr)
                (Equiv.refl (Module.Free.ChooseBasisIndex ℤ S)))).toIntLinearMap)).natAbs =
    (LinearMap.det ((Algebra.lmul ℤ S) r)).natAbs
state_after: case neg.e_m.h.e_6.h
S : Type u_1
inst✝⁵ : CommRing S
inst✝⁴ : IsDomain S
inst✝³ : Nontrivial S
inst✝² : IsDedekindDomain S
inst✝¹ : Module.Free ℤ S
inst✝ : Module.Finite ℤ S
r : S
hr : ¬r = 0
this : Fintype (S ⧸ span {r}) := (span {r}).fintypeQuotientOfFreeOfNeBot ⋯
b : Basis (Module.Free.ChooseBasisIndex ℤ S) ℤ S := Module.Free.chooseBasis ℤ S
⊢ ↑ℤ (Submodule.subtype (span {r})) ∘ₗ
      (↑(b.equiv (basisSpanSingleton b hr) (Equiv.refl (Module.Free.ChooseBasisIndex ℤ S)))).toIntLinearMap =
    (Algebra.lmul ℤ S) r

tactic: refine b.ext fun i => ?_
state_before: case neg.e_m.h.e_6.h
S : Type u_1
inst✝⁵ : CommRing S
inst✝⁴ : IsDomain S
inst✝³ : Nontrivial S
inst✝² : IsDedekindDomain S
inst✝¹ : Module.Free ℤ S
inst✝ : Module.Finite ℤ S
r : S
hr : ¬r = 0
this : Fintype (S ⧸ span {r}) := (span {r}).fintypeQuotientOfFreeOfNeBot ⋯
b : Basis (Module.Free.ChooseBasisIndex ℤ S) ℤ S := Module.Free.chooseBasis ℤ S
⊢ ↑ℤ (Submodule.subtype (span {r})) ∘ₗ
      (↑(b.equiv (basisSpanSingleton b hr) (Equiv.refl (Module.Free.ChooseBasisIndex ℤ S)))).toIntLinearMap =
    (Algebra.lmul ℤ S) r
state_after: case neg.e_m.h.e_6.h
S : Type u_1
inst✝⁵ : CommRing S
inst✝⁴ : IsDomain S
inst✝³ : Nontrivial S
inst✝² : IsDedekindDomain S
inst✝¹ : Module.Free ℤ S
inst✝ : Module.Finite ℤ S
r : S
hr : ¬r = 0
this : Fintype (S ⧸ span {r}) := (span {r}).fintypeQuotientOfFreeOfNeBot ⋯
b : Basis (Module.Free.ChooseBasisIndex ℤ S) ℤ S := Module.Free.chooseBasis ℤ S
i : Module.Free.ChooseBasisIndex ℤ S
⊢ (↑ℤ (Submodule.subtype (span {r})) ∘ₗ
        (↑(b.equiv (basisSpanSingleton b hr) (Equiv.refl (Module.Free.ChooseBasisIndex ℤ S)))).toIntLinearMap)
      (b i) =
    ((Algebra.lmul ℤ S) r) (b i)

tactic: simp
state_before: case neg.e_m.h.e_6.h
S : Type u_1
inst✝⁵ : CommRing S
inst✝⁴ : IsDomain S
inst✝³ : Nontrivial S
inst✝² : IsDedekindDomain S
inst✝¹ : Module.Free ℤ S
inst✝ : Module.Finite ℤ S
r : S
hr : ¬r = 0
this : Fintype (S ⧸ span {r}) := (span {r}).fintypeQuotientOfFreeOfNeBot ⋯
b : Basis (Module.Free.ChooseBasisIndex ℤ S) ℤ S := Module.Free.chooseBasis ℤ S
i : Module.Free.ChooseBasisIndex ℤ S
⊢ (↑ℤ (Submodule.subtype (span {r})) ∘ₗ
        (↑(b.equiv (basisSpanSingleton b hr) (Equiv.refl (Module.Free.ChooseBasisIndex ℤ S)))).toIntLinearMap)
      (b i) =
    ((Algebra.lmul ℤ S) r) (b i)
state_after: no goals

tactic: simp only [hr, Ideal.span_zero, Algebra.coe_lmul_eq_mul, eq_self_iff_true, Ideal.absNorm_bot,
  LinearMap.det_zero'', Set.singleton_zero, _root_.map_zero, Int.natAbs_zero]
state_before: case pos
S : Type u_1
inst✝⁵ : CommRing S
inst✝⁴ : IsDomain S
inst✝³ : Nontrivial S
inst✝² : IsDedekindDomain S
inst✝¹ : Module.Free ℤ S
inst✝ : Module.Finite ℤ S
r : S
hr : r = 0
⊢ absNorm (span {r}) = (LinearMap.det ((Algebra.lmul ℤ S) r)).natAbs
state_after: no goals