Theorem: toPrincipalIdeal_eq_iff
File: Mathlib/RingTheory/ClassGroup.lean

tactic: simp only [toPrincipalIdeal]
state_before: R : Type u_2
K : Type u_1
L : Type ?u.116215
inst✝⁹ : CommRing R
inst✝⁸ : Field K
inst✝⁷ : Field L
inst✝⁶ : DecidableEq L
inst✝⁵ : Algebra R K
inst✝⁴ : IsFractionRing R K
inst✝³ : Algebra K L
inst✝² : FiniteDimensional K L
inst✝¹ : Algebra R L
inst✝ : IsScalarTower R K L
I : (FractionalIdeal R⁰ K)ˣ
x : Kˣ
⊢ ↑(toPrincipalIdeal R K) x = I ↔ spanSingleton R⁰ ↑x = ↑I

tactic: exact Units.ext_iff
state_before: R : Type u_2
K : Type u_1
L : Type ?u.116215
inst✝⁹ : CommRing R
inst✝⁸ : Field K
inst✝⁷ : Field L
inst✝⁶ : DecidableEq L
inst✝⁵ : Algebra R K
inst✝⁴ : IsFractionRing R K
inst✝³ : Algebra K L
inst✝² : FiniteDimensional K L
inst✝¹ : Algebra R L
inst✝ : IsScalarTower R K L
I : (FractionalIdeal R⁰ K)ˣ
x : Kˣ
⊢ ↑{
            toOneHom :=
              {
                toFun := fun x =>
                  { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹,
                    val_inv := (_ : spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1),
                    inv_val := (_ : spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1) },
                map_one' :=
                  (_ :
                    (fun x =>
                          { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹,
                            val_inv := (_ : spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1),
                            inv_val := (_ : spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1) })
                        1 =
                      1) },
            map_mul' :=
              (_ :
                ∀ (x y : Kˣ),
                  OneHom.toFun
                      {
                        toFun := fun x =>
                          { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹,
                            val_inv := (_ : spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1),
                            inv_val := (_ : spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1) },
                        map_one' :=
                          (_ :
                            (fun x =>
                                  { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹,
                                    val_inv := (_ : spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1),
                                    inv_val := (_ : spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1) })
                                1 =
                              1) }
                      (x * y) =
                    OneHom.toFun
                        {
                          toFun := fun x =>
                            { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹,
                              val_inv := (_ : spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1),
                              inv_val := (_ : spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1) },
                          map_one' :=
                            (_ :
                              (fun x =>
                                    { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹,
                                      val_inv := (_ : spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1),
                                      inv_val := (_ : spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1) })
                                  1 =
                                1) }
                        x *
                      OneHom.toFun
                        {
                          toFun := fun x =>
                            { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹,
                              val_inv := (_ : spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1),
                              inv_val := (_ : spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1) },
                          map_one' :=
                            (_ :
                              (fun x =>
                                    { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹,
                                      val_inv := (_ : spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1),
                                      inv_val := (_ : spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1) })
                                  1 =
                                1) }
                        y) }
        x =
      I ↔
    spanSingleton R⁰ ↑x = ↑I