[GOAL]
R : Type u
inst✝⁵ : Semiring R
ι : Type v
dec_ι : DecidableEq ι
M : ι → Type w
inst✝⁴ : (i : ι) → AddCommMonoid (M i)
inst✝³ : (i : ι) → Module R (M i)
N : Type u₁
inst✝² : AddCommMonoid N
inst✝¹ : Module R N
φ : (i : ι) → M i →ₗ[R] N
ψ ψ' : (⨁ (i : ι), M i) →ₗ[R] N
inst✝ : Fintype ι
src✝ : (Π₀ (i : ι), M i) ≃ ((i : ι) → M i) := DFinsupp.equivFunOnFintype
f g : ⨁ (i : ι), M i
⊢ ↑(f + g) = ↑f + ↑g
[PROOFSTEP]
ext
[GOAL]
case h
R : Type u
inst✝⁵ : Semiring R
ι : Type v
dec_ι : DecidableEq ι
M : ι → Type w
inst✝⁴ : (i : ι) → AddCommMonoid (M i)
inst✝³ : (i : ι) → Module R (M i)
N : Type u₁
inst✝² : AddCommMonoid N
inst✝¹ : Module R N
φ : (i : ι) → M i →ₗ[R] N
ψ ψ' : (⨁ (i : ι), M i) →ₗ[R] N
inst✝ : Fintype ι
src✝ : (Π₀ (i : ι), M i) ≃ ((i : ι) → M i) := DFinsupp.equivFunOnFintype
f g : ⨁ (i : ι), M i
x✝ : ι
⊢ ↑(f + g) x✝ = (↑f + ↑g) x✝
[PROOFSTEP]
rw [add_apply, Pi.add_apply]
[GOAL]
R : Type u
inst✝⁵ : Semiring R
ι : Type v
dec_ι : DecidableEq ι
M : ι → Type w
inst✝⁴ : (i : ι) → AddCommMonoid (M i)
inst✝³ : (i : ι) → Module R (M i)
N : Type u₁
inst✝² : AddCommMonoid N
inst✝¹ : Module R N
φ : (i : ι) → M i →ₗ[R] N
ψ ψ' : (⨁ (i : ι), M i) →ₗ[R] N
inst✝ : Fintype ι
src✝ : (Π₀ (i : ι), M i) ≃ ((i : ι) → M i) := DFinsupp.equivFunOnFintype
c : R
f : ⨁ (i : ι), M i
⊢ AddHom.toFun { toFun := FunLike.coe, map_add' := (_ : ∀ (f g : ⨁ (i : ι), M i), ↑(f + g) = ↑f + ↑g) } (c • f) =
    ↑(RingHom.id R) c •
      AddHom.toFun { toFun := FunLike.coe, map_add' := (_ : ∀ (f g : ⨁ (i : ι), M i), ↑(f + g) = ↑f + ↑g) } f
[PROOFSTEP]
simp_rw [RingHom.id_apply]
[GOAL]
R : Type u
inst✝⁵ : Semiring R
ι : Type v
dec_ι : DecidableEq ι
M : ι → Type w
inst✝⁴ : (i : ι) → AddCommMonoid (M i)
inst✝³ : (i : ι) → Module R (M i)
N : Type u₁
inst✝² : AddCommMonoid N
inst✝¹ : Module R N
φ : (i : ι) → M i →ₗ[R] N
ψ ψ' : (⨁ (i : ι), M i) →ₗ[R] N
inst✝ : Fintype ι
src✝ : (Π₀ (i : ι), M i) ≃ ((i : ι) → M i) := DFinsupp.equivFunOnFintype
c : R
f : ⨁ (i : ι), M i
⊢ ↑(c • f) = c • ↑f
[PROOFSTEP]
rw [DFinsupp.coe_smul]
[GOAL]
R : Type u
inst✝⁶ : Semiring R
ι : Type v
dec_ι : DecidableEq ι
M : ι → Type w
inst✝⁵ : (i : ι) → AddCommMonoid (M i)
inst✝⁴ : (i : ι) → Module R (M i)
N : Type u₁
inst✝³ : AddCommMonoid N
inst✝² : Module R N
φ : (i : ι) → M i →ₗ[R] N
ψ ψ' : (⨁ (i : ι), M i) →ₗ[R] N
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
i : ι
m : M i
⊢ ↑(linearEquivFunOnFintype R ι M) (↑(lof R ι M i) m) = Pi.single i m
[PROOFSTEP]
ext a
[GOAL]
case h
R : Type u
inst✝⁶ : Semiring R
ι : Type v
dec_ι : DecidableEq ι
M : ι → Type w
inst✝⁵ : (i : ι) → AddCommMonoid (M i)
inst✝⁴ : (i : ι) → Module R (M i)
N : Type u₁
inst✝³ : AddCommMonoid N
inst✝² : Module R N
φ : (i : ι) → M i →ₗ[R] N
ψ ψ' : (⨁ (i : ι), M i) →ₗ[R] N
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
i : ι
m : M i
a : ι
⊢ ↑(linearEquivFunOnFintype R ι M) (↑(lof R ι M i) m) a = Pi.single i m a
[PROOFSTEP]
change (DFinsupp.equivFunOnFintype (lof R ι M i m)) a = _
[GOAL]
case h
R : Type u
inst✝⁶ : Semiring R
ι : Type v
dec_ι : DecidableEq ι
M : ι → Type w
inst✝⁵ : (i : ι) → AddCommMonoid (M i)
inst✝⁴ : (i : ι) → Module R (M i)
N : Type u₁
inst✝³ : AddCommMonoid N
inst✝² : Module R N
φ : (i : ι) → M i →ₗ[R] N
ψ ψ' : (⨁ (i : ι), M i) →ₗ[R] N
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
i : ι
m : M i
a : ι
⊢ ↑DFinsupp.equivFunOnFintype (↑(lof R ι M i) m) a = Pi.single i m a
[PROOFSTEP]
convert _root_.congr_fun (DFinsupp.equivFunOnFintype_single i m) a
[GOAL]
R : Type u
inst✝⁶ : Semiring R
ι : Type v
dec_ι : DecidableEq ι
M : ι → Type w
inst✝⁵ : (i : ι) → AddCommMonoid (M i)
inst✝⁴ : (i : ι) → Module R (M i)
N : Type u₁
inst✝³ : AddCommMonoid N
inst✝² : Module R N
φ : (i : ι) → M i →ₗ[R] N
ψ ψ' : (⨁ (i : ι), M i) →ₗ[R] N
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
i : ι
m : M i
⊢ ↑(LinearEquiv.symm (linearEquivFunOnFintype R ι M)) (Pi.single i m) = ↑(lof R ι M i) m
[PROOFSTEP]
change (DFinsupp.equivFunOnFintype.symm (Pi.single i m)) = _
[GOAL]
R : Type u
inst✝⁶ : Semiring R
ι : Type v
dec_ι : DecidableEq ι
M : ι → Type w
inst✝⁵ : (i : ι) → AddCommMonoid (M i)
inst✝⁴ : (i : ι) → Module R (M i)
N : Type u₁
inst✝³ : AddCommMonoid N
inst✝² : Module R N
φ : (i : ι) → M i →ₗ[R] N
ψ ψ' : (⨁ (i : ι), M i) →ₗ[R] N
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
i : ι
m : M i
⊢ ↑DFinsupp.equivFunOnFintype.symm (Pi.single i m) = ↑(lof R ι M i) m
[PROOFSTEP]
rw [DFinsupp.equivFunOnFintype_symm_single i m]
[GOAL]
R : Type u
inst✝⁶ : Semiring R
ι : Type v
dec_ι : DecidableEq ι
M : ι → Type w
inst✝⁵ : (i : ι) → AddCommMonoid (M i)
inst✝⁴ : (i : ι) → Module R (M i)
N : Type u₁
inst✝³ : AddCommMonoid N
inst✝² : Module R N
φ : (i : ι) → M i →ₗ[R] N
ψ ψ' : (⨁ (i : ι), M i) →ₗ[R] N
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
i : ι
m : M i
⊢ DFinsupp.single i m = ↑(lof R ι M i) m
[PROOFSTEP]
rfl
[GOAL]
R : Type u
inst✝⁵ : Semiring R
ι : Type v
dec_ι : DecidableEq ι
M : ι → Type w
inst✝⁴ : (i : ι) → AddCommMonoid (M i)
inst✝³ : (i : ι) → Module R (M i)
N : Type u₁
inst✝² : AddCommMonoid N
inst✝¹ : Module R N
φ : (i : ι) → M i →ₗ[R] N
ψ ψ' : (⨁ (i : ι), M i) →ₗ[R] N
inst✝ : Fintype ι
f : ⨁ (i : ι), M i
⊢ ↑(LinearEquiv.symm (linearEquivFunOnFintype R ι M)) ↑f = f
[PROOFSTEP]
simp [linearEquivFunOnFintype]
[GOAL]
R : Type u
inst✝⁴ : Semiring R
ι : Type v
dec_ι : DecidableEq ι
M : ι → Type w
inst✝³ : (i : ι) → AddCommMonoid (M i)
inst✝² : (i : ι) → Module R (M i)
N : Type u₁
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
φ : (i : ι) → M i →ₗ[R] N
ψ ψ' : (⨁ (i : ι), M i) →ₗ[R] N
f g : ⨁ (i : ι), M i
h : f = g
x✝ : ι
⊢ ↑(component R ι M x✝) f = ↑(component R ι M x✝) g
[PROOFSTEP]
rw [h]
[GOAL]
R : Type u
inst✝⁶ : Semiring R
ι : Type v
dec_ι : DecidableEq ι
M : ι → Type w
inst✝⁵ : (i : ι) → AddCommMonoid (M i)
inst✝⁴ : (i : ι) → Module R (M i)
N : Type u₁
inst✝³ : AddCommMonoid N
inst✝² : Module R N
φ : (i : ι) → M i →ₗ[R] N
ψ ψ' : (⨁ (i : ι), M i) →ₗ[R] N
α : ι → Type u_1
δ : (i : ι) → α i → Type w
inst✝¹ : (i : ι) → (j : α i) → AddCommMonoid (δ i j)
inst✝ : (i : ι) → (j : α i) → Module R (δ i j)
src✝ : (⨁ (i : (_i : ι) × α _i), δ i.fst i.snd) →+ ⨁ (i : ι) (j : α i), δ i j := sigmaCurry
r : R
⊢ ∀ (x : ⨁ (i : (i : ι) × α i), δ i.fst i.snd),
    AddHom.toFun
        { toFun := src✝.toFun,
          map_add' :=
            (_ :
              ∀ (x y : ⨁ (i : (_i : ι) × α _i), δ i.fst i.snd),
                ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }
        (r • x) =
      ↑(RingHom.id R) r •
        AddHom.toFun
          { toFun := src✝.toFun,
            map_add' :=
              (_ :
                ∀ (x y : ⨁ (i : (_i : ι) × α _i), δ i.fst i.snd),
                  ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }
          x
[PROOFSTEP]
convert DFinsupp.sigmaCurry_smul (δ := δ) r
[GOAL]
R : Type u
inst✝² : Semiring R
ι : Type v
dec_ι : DecidableEq ι
M : Type u_1
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
A : ι → Submodule R M
h : IsInternal A
⊢ iSup A = ⊤
[PROOFSTEP]
rw [Submodule.iSup_eq_range_dfinsupp_lsum, LinearMap.range_eq_top]
[GOAL]
R : Type u
inst✝² : Semiring R
ι : Type v
dec_ι : DecidableEq ι
M : Type u_1
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
A : ι → Submodule R M
h : IsInternal A
⊢ Function.Surjective ↑(↑(DFinsupp.lsum ℕ) fun i => Submodule.subtype (A i))
[PROOFSTEP]
exact Function.Bijective.surjective h
[GOAL]
R : Type u
inst✝² : Semiring R
ι : Type v
dec_ι : DecidableEq ι
M : Type u_1
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
A : ι → Submodule R M
h : IsInternal A
α : ι → Type u_2
v : (i : ι) → Basis (α i) R { x // x ∈ A i }
⊢ ↑(collectedBasis h v) = fun a => ↑(↑(v a.fst) a.snd)
[PROOFSTEP]
funext a
[GOAL]
case h
R : Type u
inst✝² : Semiring R
ι : Type v
dec_ι : DecidableEq ι
M : Type u_1
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
A : ι → Submodule R M
h : IsInternal A
α : ι → Type u_2
v : (i : ι) → Basis (α i) R { x // x ∈ A i }
a : (i : ι) × α i
⊢ ↑(collectedBasis h v) a = ↑(↑(v a.fst) a.snd)
[PROOFSTEP]
simp only [IsInternal.collectedBasis, coeLinearMap, Basis.coe_ofRepr, LinearEquiv.trans_symm, LinearEquiv.symm_symm,
  LinearEquiv.trans_apply, sigmaFinsuppLequivDFinsupp_apply, sigmaFinsuppEquivDFinsupp_single,
  LinearEquiv.ofBijective_apply, sigmaFinsuppAddEquivDFinsupp_apply]
[GOAL]
case h
R : Type u
inst✝² : Semiring R
ι : Type v
dec_ι : DecidableEq ι
M : Type u_1
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
A : ι → Submodule R M
h : IsInternal A
α : ι → Type u_2
v : (i : ι) → Basis (α i) R { x // x ∈ A i }
a : (i : ι) × α i
⊢ ↑(toModule R ι M fun i => Submodule.subtype (A i))
      (↑(LinearEquiv.symm (DFinsupp.mapRange.linearEquiv fun i => (v i).repr))
        (DFinsupp.single a.fst (Finsupp.single a.snd 1))) =
    ↑(↑(v a.fst) a.snd)
[PROOFSTEP]
rw [DFinsupp.mapRange.linearEquiv_symm]
[GOAL]
case h
R : Type u
inst✝² : Semiring R
ι : Type v
dec_ι : DecidableEq ι
M : Type u_1
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
A : ι → Submodule R M
h : IsInternal A
α : ι → Type u_2
v : (i : ι) → Basis (α i) R { x // x ∈ A i }
a : (i : ι) × α i
⊢ ↑(toModule R ι M fun i => Submodule.subtype (A i))
      (↑(DFinsupp.mapRange.linearEquiv fun i => LinearEquiv.symm (v i).repr)
        (DFinsupp.single a.fst (Finsupp.single a.snd 1))) =
    ↑(↑(v a.fst) a.snd)
[PROOFSTEP]
erw [DFinsupp.mapRange.linearEquiv_apply]
[GOAL]
case h
R : Type u
inst✝² : Semiring R
ι : Type v
dec_ι : DecidableEq ι
M : Type u_1
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
A : ι → Submodule R M
h : IsInternal A
α : ι → Type u_2
v : (i : ι) → Basis (α i) R { x // x ∈ A i }
a : (i : ι) × α i
⊢ ↑(toModule R ι M fun i => Submodule.subtype (A i))
      (DFinsupp.mapRange (fun i x => ↑(LinearEquiv.symm (v i).repr) x)
        (_ : ∀ (i : ι), ↑(LinearEquiv.symm (v i).repr) 0 = 0) (DFinsupp.single a.fst (Finsupp.single a.snd 1))) =
    ↑(↑(v a.fst) a.snd)
[PROOFSTEP]
simp only [DFinsupp.mapRange_single, Basis.repr_symm_apply, Finsupp.total_single, one_smul, toModule]
[GOAL]
case h
R : Type u
inst✝² : Semiring R
ι : Type v
dec_ι : DecidableEq ι
M : Type u_1
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
A : ι → Submodule R M
h : IsInternal A
α : ι → Type u_2
v : (i : ι) → Basis (α i) R { x // x ∈ A i }
a : (i : ι) × α i
⊢ ↑(↑(DFinsupp.lsum ℕ) fun i => Submodule.subtype (A i)) (DFinsupp.single a.fst (↑(v a.fst) a.snd)) =
    ↑(↑(v a.fst) a.snd)
[PROOFSTEP]
erw [DFinsupp.lsum_single]
[GOAL]
case h
R : Type u
inst✝² : Semiring R
ι : Type v
dec_ι : DecidableEq ι
M : Type u_1
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
A : ι → Submodule R M
h : IsInternal A
α : ι → Type u_2
v : (i : ι) → Basis (α i) R { x // x ∈ A i }
a : (i : ι) × α i
⊢ ↑(Submodule.subtype (A a.fst)) (↑(v a.fst) a.snd) = ↑(↑(v a.fst) a.snd)
[PROOFSTEP]
simp only [Submodule.coeSubtype]
[GOAL]
R : Type u
inst✝² : Semiring R
ι : Type v
dec_ι : DecidableEq ι
M : Type u_1
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
A : ι → Submodule R M
h : IsInternal A
α : ι → Type u_2
v : (i : ι) → Basis (α i) R { x // x ∈ A i }
a : (i : ι) × α i
⊢ ↑(collectedBasis h v) a ∈ A a.fst
[PROOFSTEP]
simp
[GOAL]
R : Type u
inst✝² : Semiring R
ι : Type v
dec_ι : DecidableEq ι
M : Type u_1
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
A✝ A : ι → Submodule R M
i j : ι
hij : i ≠ j
h : Set.univ = {i, j}
hi : IsInternal A
⊢ iSup A = A i ⊔ A j
[PROOFSTEP]
rw [← sSup_pair, iSup, ← Set.image_univ, h, Set.image_insert_eq, Set.image_singleton]
[GOAL]
R : Type u
inst✝² : Ring R
ι : Type v
dec_ι : DecidableEq ι
M : Type u_1
inst✝¹ : AddCommGroup M
inst✝ : Module R M
A : ι → Submodule R M
i j : ι
hij : i ≠ j
h : Set.univ = {i, j}
⊢ IsInternal A ↔ IsCompl (A i) (A j)
[PROOFSTEP]
have : ∀ k, k = i ∨ k = j := fun k ↦ by simpa using Set.ext_iff.mp h k
[GOAL]
R : Type u
inst✝² : Ring R
ι : Type v
dec_ι : DecidableEq ι
M : Type u_1
inst✝¹ : AddCommGroup M
inst✝ : Module R M
A : ι → Submodule R M
i j : ι
hij : i ≠ j
h : Set.univ = {i, j}
k : ι
⊢ k = i ∨ k = j
[PROOFSTEP]
simpa using Set.ext_iff.mp h k
[GOAL]
R : Type u
inst✝² : Ring R
ι : Type v
dec_ι : DecidableEq ι
M : Type u_1
inst✝¹ : AddCommGroup M
inst✝ : Module R M
A : ι → Submodule R M
i j : ι
hij : i ≠ j
h : Set.univ = {i, j}
this : ∀ (k : ι), k = i ∨ k = j
⊢ IsInternal A ↔ IsCompl (A i) (A j)
[PROOFSTEP]
rw [isInternal_submodule_iff_independent_and_iSup_eq_top, iSup, ← Set.image_univ, h, Set.image_insert_eq,
  Set.image_singleton, sSup_pair, CompleteLattice.independent_pair hij this]
[GOAL]
R : Type u
inst✝² : Ring R
ι : Type v
dec_ι : DecidableEq ι
M : Type u_1
inst✝¹ : AddCommGroup M
inst✝ : Module R M
A : ι → Submodule R M
i j : ι
hij : i ≠ j
h : Set.univ = {i, j}
this : ∀ (k : ι), k = i ∨ k = j
⊢ Disjoint (A i) (A j) ∧ A i ⊔ A j = ⊤ ↔ IsCompl (A i) (A j)
[PROOFSTEP]
exact ⟨fun ⟨hd, ht⟩ ↦ ⟨hd, codisjoint_iff.mpr ht⟩, fun ⟨hd, ht⟩ ↦ ⟨hd, ht.eq_top⟩⟩


[GOAL]
C : Type u
inst✝⁶ : Category.{v₁, u} C
D : Type u₂
inst✝⁵ : Category.{u, u₂} D
E : Type u
inst✝⁴ : Category.{v₂, u} E
inst✝³ : HasBinaryProducts D
inst✝² : HasColimits D
inst✝¹ : (X : D) → PreservesColimits (prod.functor.obj X)
F : C ⥤ D
J : Type u
inst✝ : Category.{u, u} J
K : J ⥤ C ⥤ D
c : Cocone K
t : IsColimit c
⊢ IsColimit ((prod.functor.obj F).mapCocone c)
[PROOFSTEP]
apply evaluationJointlyReflectsColimits _ fun {k} => ?_
[GOAL]
C : Type u
inst✝⁶ : Category.{v₁, u} C
D : Type u₂
inst✝⁵ : Category.{u, u₂} D
E : Type u
inst✝⁴ : Category.{v₂, u} E
inst✝³ : HasBinaryProducts D
inst✝² : HasColimits D
inst✝¹ : (X : D) → PreservesColimits (prod.functor.obj X)
F : C ⥤ D
J : Type u
inst✝ : Category.{u, u} J
K : J ⥤ C ⥤ D
c : Cocone K
t : IsColimit c
k : C
⊢ IsColimit (((evaluation C D).obj k).mapCocone ((prod.functor.obj F).mapCocone c))
[PROOFSTEP]
change IsColimit ((prod.functor.obj F ⋙ (evaluation _ _).obj k).mapCocone c)
[GOAL]
C : Type u
inst✝⁶ : Category.{v₁, u} C
D : Type u₂
inst✝⁵ : Category.{u, u₂} D
E : Type u
inst✝⁴ : Category.{v₂, u} E
inst✝³ : HasBinaryProducts D
inst✝² : HasColimits D
inst✝¹ : (X : D) → PreservesColimits (prod.functor.obj X)
F : C ⥤ D
J : Type u
inst✝ : Category.{u, u} J
K : J ⥤ C ⥤ D
c : Cocone K
t : IsColimit c
k : C
⊢ IsColimit ((prod.functor.obj F ⋙ (evaluation C D).obj k).mapCocone c)
[PROOFSTEP]
let this := isColimitOfPreserves ((evaluation C D).obj k ⋙ prod.functor.obj (F.obj k)) t
[GOAL]
C : Type u
inst✝⁶ : Category.{v₁, u} C
D : Type u₂
inst✝⁵ : Category.{u, u₂} D
E : Type u
inst✝⁴ : Category.{v₂, u} E
inst✝³ : HasBinaryProducts D
inst✝² : HasColimits D
inst✝¹ : (X : D) → PreservesColimits (prod.functor.obj X)
F : C ⥤ D
J : Type u
inst✝ : Category.{u, u} J
K : J ⥤ C ⥤ D
c : Cocone K
t : IsColimit c
k : C
this : IsColimit (((evaluation C D).obj k ⋙ prod.functor.obj (F.obj k)).mapCocone c) :=
  isColimitOfPreserves ((evaluation C D).obj k ⋙ prod.functor.obj (F.obj k)) t
⊢ IsColimit ((prod.functor.obj F ⋙ (evaluation C D).obj k).mapCocone c)
[PROOFSTEP]
apply IsColimit.mapCoconeEquiv _ this
[GOAL]
C : Type u
inst✝⁶ : Category.{v₁, u} C
D : Type u₂
inst✝⁵ : Category.{u, u₂} D
E : Type u
inst✝⁴ : Category.{v₂, u} E
inst✝³ : HasBinaryProducts D
inst✝² : HasColimits D
inst✝¹ : (X : D) → PreservesColimits (prod.functor.obj X)
F : C ⥤ D
J : Type u
inst✝ : Category.{u, u} J
K : J ⥤ C ⥤ D
c : Cocone K
t : IsColimit c
k : C
this : IsColimit (((evaluation C D).obj k ⋙ prod.functor.obj (F.obj k)).mapCocone c) :=
  isColimitOfPreserves ((evaluation C D).obj k ⋙ prod.functor.obj (F.obj k)) t
⊢ (evaluation C D).obj k ⋙ prod.functor.obj (F.obj k) ≅ prod.functor.obj F ⋙ (evaluation C D).obj k
[PROOFSTEP]
apply (NatIso.ofComponents _ _).symm
[GOAL]
C : Type u
inst✝⁶ : Category.{v₁, u} C
D : Type u₂
inst✝⁵ : Category.{u, u₂} D
E : Type u
inst✝⁴ : Category.{v₂, u} E
inst✝³ : HasBinaryProducts D
inst✝² : HasColimits D
inst✝¹ : (X : D) → PreservesColimits (prod.functor.obj X)
F : C ⥤ D
J : Type u
inst✝ : Category.{u, u} J
K : J ⥤ C ⥤ D
c : Cocone K
t : IsColimit c
k : C
this : IsColimit (((evaluation C D).obj k ⋙ prod.functor.obj (F.obj k)).mapCocone c) :=
  isColimitOfPreserves ((evaluation C D).obj k ⋙ prod.functor.obj (F.obj k)) t
⊢ (X : C ⥤ D) →
    (prod.functor.obj F ⋙ (evaluation C D).obj k).obj X ≅ ((evaluation C D).obj k ⋙ prod.functor.obj (F.obj k)).obj X
[PROOFSTEP]
intro G
[GOAL]
C : Type u
inst✝⁶ : Category.{v₁, u} C
D : Type u₂
inst✝⁵ : Category.{u, u₂} D
E : Type u
inst✝⁴ : Category.{v₂, u} E
inst✝³ : HasBinaryProducts D
inst✝² : HasColimits D
inst✝¹ : (X : D) → PreservesColimits (prod.functor.obj X)
F : C ⥤ D
J : Type u
inst✝ : Category.{u, u} J
K : J ⥤ C ⥤ D
c : Cocone K
t : IsColimit c
k : C
this : IsColimit (((evaluation C D).obj k ⋙ prod.functor.obj (F.obj k)).mapCocone c) :=
  isColimitOfPreserves ((evaluation C D).obj k ⋙ prod.functor.obj (F.obj k)) t
G : C ⥤ D
⊢ (prod.functor.obj F ⋙ (evaluation C D).obj k).obj G ≅ ((evaluation C D).obj k ⋙ prod.functor.obj (F.obj k)).obj G
[PROOFSTEP]
apply asIso (prodComparison ((evaluation C D).obj k) F G)
[GOAL]
C : Type u
inst✝⁶ : Category.{v₁, u} C
D : Type u₂
inst✝⁵ : Category.{u, u₂} D
E : Type u
inst✝⁴ : Category.{v₂, u} E
inst✝³ : HasBinaryProducts D
inst✝² : HasColimits D
inst✝¹ : (X : D) → PreservesColimits (prod.functor.obj X)
F : C ⥤ D
J : Type u
inst✝ : Category.{u, u} J
K : J ⥤ C ⥤ D
c : Cocone K
t : IsColimit c
k : C
this : IsColimit (((evaluation C D).obj k ⋙ prod.functor.obj (F.obj k)).mapCocone c) :=
  isColimitOfPreserves ((evaluation C D).obj k ⋙ prod.functor.obj (F.obj k)) t
⊢ ∀ {X Y : C ⥤ D} (f : X ⟶ Y),
    (prod.functor.obj F ⋙ (evaluation C D).obj k).map f ≫ (asIso (prodComparison ((evaluation C D).obj k) F Y)).hom =
      (asIso (prodComparison ((evaluation C D).obj k) F X)).hom ≫
        ((evaluation C D).obj k ⋙ prod.functor.obj (F.obj k)).map f
[PROOFSTEP]
intro G G'
[GOAL]
C : Type u
inst✝⁶ : Category.{v₁, u} C
D : Type u₂
inst✝⁵ : Category.{u, u₂} D
E : Type u
inst✝⁴ : Category.{v₂, u} E
inst✝³ : HasBinaryProducts D
inst✝² : HasColimits D
inst✝¹ : (X : D) → PreservesColimits (prod.functor.obj X)
F : C ⥤ D
J : Type u
inst✝ : Category.{u, u} J
K : J ⥤ C ⥤ D
c : Cocone K
t : IsColimit c
k : C
this : IsColimit (((evaluation C D).obj k ⋙ prod.functor.obj (F.obj k)).mapCocone c) :=
  isColimitOfPreserves ((evaluation C D).obj k ⋙ prod.functor.obj (F.obj k)) t
G G' : C ⥤ D
⊢ ∀ (f : G ⟶ G'),
    (prod.functor.obj F ⋙ (evaluation C D).obj k).map f ≫ (asIso (prodComparison ((evaluation C D).obj k) F G')).hom =
      (asIso (prodComparison ((evaluation C D).obj k) F G)).hom ≫
        ((evaluation C D).obj k ⋙ prod.functor.obj (F.obj k)).map f
[PROOFSTEP]
apply prodComparison_natural ((evaluation C D).obj k) (𝟙 F)
[GOAL]
C : Type u
inst✝³ : Category.{v₁, u} C
D : Type u₂
inst✝² : Category.{u, u₂} D
E : Type u
inst✝¹ : Category.{v₂, u} E
inst✝ : HasLimits D
F : C ⥤ E
J : Type u
hJ : Category.{u, u} J
K : J ⥤ E ⥤ D
c : Cone K
hc : IsLimit c
⊢ IsLimit (((whiskeringLeft C E D).obj F).mapCone c)
[PROOFSTEP]
apply evaluationJointlyReflectsLimits
[GOAL]
case t
C : Type u
inst✝³ : Category.{v₁, u} C
D : Type u₂
inst✝² : Category.{u, u₂} D
E : Type u
inst✝¹ : Category.{v₂, u} E
inst✝ : HasLimits D
F : C ⥤ E
J : Type u
hJ : Category.{u, u} J
K : J ⥤ E ⥤ D
c : Cone K
hc : IsLimit c
⊢ (k : C) → IsLimit (((evaluation C D).obj k).mapCone (((whiskeringLeft C E D).obj F).mapCone c))
[PROOFSTEP]
intro Y
[GOAL]
case t
C : Type u
inst✝³ : Category.{v₁, u} C
D : Type u₂
inst✝² : Category.{u, u₂} D
E : Type u
inst✝¹ : Category.{v₂, u} E
inst✝ : HasLimits D
F : C ⥤ E
J : Type u
hJ : Category.{u, u} J
K : J ⥤ E ⥤ D
c : Cone K
hc : IsLimit c
Y : C
⊢ IsLimit (((evaluation C D).obj Y).mapCone (((whiskeringLeft C E D).obj F).mapCone c))
[PROOFSTEP]
change IsLimit (((evaluation E D).obj (F.obj Y)).mapCone c)
[GOAL]
case t
C : Type u
inst✝³ : Category.{v₁, u} C
D : Type u₂
inst✝² : Category.{u, u₂} D
E : Type u
inst✝¹ : Category.{v₂, u} E
inst✝ : HasLimits D
F : C ⥤ E
J : Type u
hJ : Category.{u, u} J
K : J ⥤ E ⥤ D
c : Cone K
hc : IsLimit c
Y : C
⊢ IsLimit (((evaluation E D).obj (F.obj Y)).mapCone c)
[PROOFSTEP]
exact PreservesLimit.preserves hc
[GOAL]
C✝ : Type u
inst✝⁸ : Category.{v₁, u} C✝
D✝ : Type u₂
inst✝⁷ : Category.{u, u₂} D✝
E✝ : Type u
inst✝⁶ : Category.{v₂, u} E✝
C : Type u
inst✝⁵ : Category.{?u.25923, u} C
D : Type u_1
inst✝⁴ : Category.{u, u_1} D
E : Type u_2
inst✝³ : Category.{u, u_2} E
J : Type u
inst✝² : SmallCategory J
inst✝¹ : HasLimitsOfShape J D
F : D ⥤ E
inst✝ : PreservesLimitsOfShape J F
K : J ⥤ C ⥤ D
c : Cone K
hc : IsLimit c
⊢ IsLimit (((whiskeringRight C D E).obj F).mapCone c)
[PROOFSTEP]
apply evaluationJointlyReflectsLimits _ (fun k => ?_)
[GOAL]
C✝ : Type u
inst✝⁸ : Category.{v₁, u} C✝
D✝ : Type u₂
inst✝⁷ : Category.{u, u₂} D✝
E✝ : Type u
inst✝⁶ : Category.{v₂, u} E✝
C : Type u
inst✝⁵ : Category.{?u.25923, u} C
D : Type u_1
inst✝⁴ : Category.{u, u_1} D
E : Type u_2
inst✝³ : Category.{u, u_2} E
J : Type u
inst✝² : SmallCategory J
inst✝¹ : HasLimitsOfShape J D
F : D ⥤ E
inst✝ : PreservesLimitsOfShape J F
K : J ⥤ C ⥤ D
c : Cone K
hc : IsLimit c
k : C
⊢ IsLimit (((evaluation C E).obj k).mapCone (((whiskeringRight C D E).obj F).mapCone c))
[PROOFSTEP]
change IsLimit (((evaluation _ _).obj k ⋙ F).mapCone c)
[GOAL]
C✝ : Type u
inst✝⁸ : Category.{v₁, u} C✝
D✝ : Type u₂
inst✝⁷ : Category.{u, u₂} D✝
E✝ : Type u
inst✝⁶ : Category.{v₂, u} E✝
C : Type u
inst✝⁵ : Category.{?u.25923, u} C
D : Type u_1
inst✝⁴ : Category.{u, u_1} D
E : Type u_2
inst✝³ : Category.{u, u_2} E
J : Type u
inst✝² : SmallCategory J
inst✝¹ : HasLimitsOfShape J D
F : D ⥤ E
inst✝ : PreservesLimitsOfShape J F
K : J ⥤ C ⥤ D
c : Cone K
hc : IsLimit c
k : C
⊢ IsLimit (((evaluation C D).obj k ⋙ F).mapCone c)
[PROOFSTEP]
exact PreservesLimit.preserves hc
[GOAL]
C✝ : Type u
inst✝⁶ : Category.{v₁, u} C✝
D✝ : Type u₂
inst✝⁵ : Category.{u, u₂} D✝
E : Type u
inst✝⁴ : Category.{v₂, u} E
C D : Type u
inst✝³ : SmallCategory C
inst✝² : SmallCategory D
F : C ⥤ D
J : Type u
inst✝¹ : SmallCategory J
inst✝ : PreservesLimitsOfShape J (lan F.op)
⊢ PreservesLimitsOfShape J F
[PROOFSTEP]
apply @preservesLimitsOfShapeOfReflectsOfPreserves _ _ _ _ _ _ _ _ F yoneda ?_
[GOAL]
C✝ : Type u
inst✝⁶ : Category.{v₁, u} C✝
D✝ : Type u₂
inst✝⁵ : Category.{u, u₂} D✝
E : Type u
inst✝⁴ : Category.{v₂, u} E
C D : Type u
inst✝³ : SmallCategory C
inst✝² : SmallCategory D
F : C ⥤ D
J : Type u
inst✝¹ : SmallCategory J
inst✝ : PreservesLimitsOfShape J (lan F.op)
⊢ PreservesLimitsOfShape J (F ⋙ yoneda)
[PROOFSTEP]
exact preservesLimitsOfShapeOfNatIso (compYonedaIsoYonedaCompLan F).symm


[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
l : List α
L : List (List α)
⊢ join ↑(List.map ofList (l :: L)) = ↑(List.join (l :: L))
[PROOFSTEP]
simp only [join, List.map, coe_sum, List.sum_cons, List.join, ← coe_add, ← coe_join L]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
S : Multiset (Multiset α)
⊢ a ∈ join 0 ↔ ∃ s, s ∈ 0 ∧ a ∈ s
[PROOFSTEP]
simp
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
S : Multiset (Multiset α)
⊢ ∀ ⦃a_1 : Multiset α⦄ {s : Multiset (Multiset α)},
    (a ∈ join s ↔ ∃ s_1, s_1 ∈ s ∧ a ∈ s_1) → (a ∈ join (a_1 ::ₘ s) ↔ ∃ s_1, s_1 ∈ a_1 ::ₘ s ∧ a ∈ s_1)
[PROOFSTEP]
simp (config := { contextual := true }) [or_and_right, exists_or]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
S : Multiset (Multiset α)
⊢ ↑card (join 0) = sum (map (↑card) 0)
[PROOFSTEP]
simp
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
S : Multiset (Multiset α)
⊢ ∀ ⦃a : Multiset α⦄ {s : Multiset (Multiset α)},
    ↑card (join s) = sum (map (↑card) s) → ↑card (join (a ::ₘ s)) = sum (map (↑card) (a ::ₘ s))
[PROOFSTEP]
simp
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
r : α → β → Prop
s : Multiset (Multiset α)
t : Multiset (Multiset β)
h : Rel (Rel r) s t
⊢ Rel r (join s) (join t)
[PROOFSTEP]
induction h
[GOAL]
case zero
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
r : α → β → Prop
s : Multiset (Multiset α)
t : Multiset (Multiset β)
⊢ Rel r (join 0) (join 0)
case cons
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
r : α → β → Prop
s : Multiset (Multiset α)
t : Multiset (Multiset β)
a✝² : Multiset α
b✝ : Multiset β
as✝ : Multiset (Multiset α)
bs✝ : Multiset (Multiset β)
a✝¹ : Rel r a✝² b✝
a✝ : Rel (Rel r) as✝ bs✝
a_ih✝ : Rel r (join as✝) (join bs✝)
⊢ Rel r (join (a✝² ::ₘ as✝)) (join (b✝ ::ₘ bs✝))
[PROOFSTEP]
case zero => simp
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
r : α → β → Prop
s : Multiset (Multiset α)
t : Multiset (Multiset β)
⊢ Rel r (join 0) (join 0)
[PROOFSTEP]
case zero => simp
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
r : α → β → Prop
s : Multiset (Multiset α)
t : Multiset (Multiset β)
⊢ Rel r (join 0) (join 0)
[PROOFSTEP]
simp
[GOAL]
case cons
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
r : α → β → Prop
s : Multiset (Multiset α)
t : Multiset (Multiset β)
a✝² : Multiset α
b✝ : Multiset β
as✝ : Multiset (Multiset α)
bs✝ : Multiset (Multiset β)
a✝¹ : Rel r a✝² b✝
a✝ : Rel (Rel r) as✝ bs✝
a_ih✝ : Rel r (join as✝) (join bs✝)
⊢ Rel r (join (a✝² ::ₘ as✝)) (join (b✝ ::ₘ bs✝))
[PROOFSTEP]
case cons a b s t hab hst ih => simpa using hab.add ih
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
r : α → β → Prop
s✝ : Multiset (Multiset α)
t✝ : Multiset (Multiset β)
a : Multiset α
b : Multiset β
s : Multiset (Multiset α)
t : Multiset (Multiset β)
hab : Rel r a b
hst : Rel (Rel r) s t
ih : Rel r (join s) (join t)
⊢ Rel r (join (a ::ₘ s)) (join (b ::ₘ t))
[PROOFSTEP]
case cons a b s t hab hst ih => simpa using hab.add ih
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
r : α → β → Prop
s✝ : Multiset (Multiset α)
t✝ : Multiset (Multiset β)
a : Multiset α
b : Multiset β
s : Multiset (Multiset α)
t : Multiset (Multiset β)
hab : Rel r a b
hst : Rel (Rel r) s t
ih : Rel r (join s) (join t)
⊢ Rel r (join (a ::ₘ s)) (join (b ::ₘ t))
[PROOFSTEP]
simpa using hab.add ih
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
s t : Multiset α
f✝ g : α → Multiset β
l : List α
f : α → List β
⊢ (bind ↑l fun a => ↑(f a)) = ↑(List.bind l f)
[PROOFSTEP]
rw [List.bind, ← coe_join, List.map_map]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
s t : Multiset α
f✝ g : α → Multiset β
l : List α
f : α → List β
⊢ (bind ↑l fun a => ↑(f a)) = join ↑(List.map (ofList ∘ f) l)
[PROOFSTEP]
rfl
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
s t : Multiset α
f g : α → Multiset β
⊢ bind (a ::ₘ s) f = f a + bind s f
[PROOFSTEP]
simp [bind]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
s t : Multiset α
f g : α → Multiset β
⊢ bind {a} f = f a
[PROOFSTEP]
simp [bind]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
s t : Multiset α
f g : α → Multiset β
⊢ bind (s + t) f = bind s f + bind t f
[PROOFSTEP]
simp [bind]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
s t : Multiset α
f g : α → Multiset β
⊢ (bind s fun x => 0) = 0
[PROOFSTEP]
simp [bind, join, nsmul_zero]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
s t : Multiset α
f g : α → Multiset β
⊢ (bind s fun a => f a + g a) = bind s f + bind s g
[PROOFSTEP]
simp [bind, join]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
s t : Multiset α
f✝ g✝ : α → Multiset β
f : α → β
g : α → Multiset β
⊢ (bind 0 fun a => f a ::ₘ g a) = map f 0 + bind 0 g
[PROOFSTEP]
simp
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
s t : Multiset α
f✝ g✝ : α → Multiset β
f : α → β
g : α → Multiset β
⊢ ∀ ⦃a : α⦄ {s : Multiset α},
    (bind s fun a => f a ::ₘ g a) = map f s + bind s g →
      (bind (a ::ₘ s) fun a => f a ::ₘ g a) = map f (a ::ₘ s) + bind (a ::ₘ s) g
[PROOFSTEP]
simp (config := { contextual := true }) [add_comm, add_left_comm, add_assoc]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
s t : Multiset α
f✝ g : α → Multiset β
f : α → β
⊢ (bind 0 fun x => {f x}) = map f 0
[PROOFSTEP]
rw [zero_bind, map_zero]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
s t : Multiset α
f✝ g : α → Multiset β
f : α → β
⊢ ∀ ⦃a : α⦄ {s : Multiset α}, (bind s fun x => {f x}) = map f s → (bind (a ::ₘ s) fun x => {f x}) = map f (a ::ₘ s)
[PROOFSTEP]
simp [singleton_add]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
s✝ t : Multiset α
f✝ g : α → Multiset β
b : β
s : Multiset α
f : α → Multiset β
⊢ b ∈ bind s f ↔ ∃ a, a ∈ s ∧ b ∈ f a
[PROOFSTEP]
simp [bind]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
s t : Multiset α
f g : α → Multiset β
⊢ ↑card (bind s f) = sum (map (↑card ∘ f) s)
[PROOFSTEP]
simp [bind]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
s t : Multiset α
f✝ g✝ f g : α → Multiset β
m : Multiset α
⊢ (∀ (a : α), a ∈ m → f a = g a) → bind m f = bind m g
[PROOFSTEP]
simp (config := { contextual := true }) [bind]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
s t : Multiset α
f✝ g : α → Multiset β
β' : Type u_2
m : Multiset α
f : α → Multiset β
f' : α → Multiset β'
h : β = β'
hf : ∀ (a : α), a ∈ m → HEq (f a) (f' a)
⊢ HEq (bind m f) (bind m f')
[PROOFSTEP]
subst h
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
s t : Multiset α
f✝ g : α → Multiset β
m : Multiset α
f f' : α → Multiset β
hf : ∀ (a : α), a ∈ m → HEq (f a) (f' a)
⊢ HEq (bind m f) (bind m f')
[PROOFSTEP]
simp only [heq_eq_eq] at hf
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
s t : Multiset α
f✝ g : α → Multiset β
m : Multiset α
f f' : α → Multiset β
hf : ∀ (a : α), a ∈ m → f a = f' a
⊢ HEq (bind m f) (bind m f')
[PROOFSTEP]
simp [bind_congr hf]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
s t : Multiset α
f✝ g : α → Multiset β
m : Multiset α
n : α → Multiset β
f : β → γ
⊢ map f (bind 0 n) = bind 0 fun a => map f (n a)
[PROOFSTEP]
simp
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
s t : Multiset α
f✝ g : α → Multiset β
m : Multiset α
n : α → Multiset β
f : β → γ
⊢ ∀ ⦃a : α⦄ {s : Multiset α},
    (map f (bind s n) = bind s fun a => map f (n a)) → map f (bind (a ::ₘ s) n) = bind (a ::ₘ s) fun a => map f (n a)
[PROOFSTEP]
simp (config := { contextual := true })
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
s t : Multiset α
f✝ g : α → Multiset β
m : Multiset α
n : β → Multiset γ
f : α → β
⊢ bind (map f 0) n = bind 0 fun a => n (f a)
[PROOFSTEP]
simp
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
s t : Multiset α
f✝ g : α → Multiset β
m : Multiset α
n : β → Multiset γ
f : α → β
⊢ ∀ ⦃a : α⦄ {s : Multiset α},
    (bind (map f s) n = bind s fun a => n (f a)) → bind (map f (a ::ₘ s)) n = bind (a ::ₘ s) fun a => n (f a)
[PROOFSTEP]
simp (config := { contextual := true })
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
s✝ t : Multiset α
f✝ g✝ : α → Multiset β
s : Multiset α
f : α → Multiset β
g : β → Multiset γ
⊢ bind (bind 0 f) g = bind 0 fun a => bind (f a) g
[PROOFSTEP]
simp
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
s✝ t : Multiset α
f✝ g✝ : α → Multiset β
s : Multiset α
f : α → Multiset β
g : β → Multiset γ
⊢ ∀ ⦃a : α⦄ {s : Multiset α},
    (bind (bind s f) g = bind s fun a => bind (f a) g) →
      bind (bind (a ::ₘ s) f) g = bind (a ::ₘ s) fun a => bind (f a) g
[PROOFSTEP]
simp (config := { contextual := true })
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
s t : Multiset α
f✝ g : α → Multiset β
m : Multiset α
n : Multiset β
f : α → β → Multiset γ
⊢ (bind 0 fun a => bind n fun b => f a b) = bind n fun b => bind 0 fun a => f a b
[PROOFSTEP]
simp
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
s t : Multiset α
f✝ g : α → Multiset β
m : Multiset α
n : Multiset β
f : α → β → Multiset γ
⊢ ∀ ⦃a : α⦄ {s : Multiset α},
    ((bind s fun a => bind n fun b => f a b) = bind n fun b => bind s fun a => f a b) →
      (bind (a ::ₘ s) fun a => bind n fun b => f a b) = bind n fun b => bind (a ::ₘ s) fun a => f a b
[PROOFSTEP]
simp (config := { contextual := true })
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
s t : Multiset α
f✝ g : α → Multiset β
m : Multiset α
n : Multiset β
f : α → β → γ
⊢ (bind 0 fun a => map (fun b => f a b) n) = bind n fun b => map (fun a => f a b) 0
[PROOFSTEP]
simp
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
s t : Multiset α
f✝ g : α → Multiset β
m : Multiset α
n : Multiset β
f : α → β → γ
⊢ ∀ ⦃a : α⦄ {s : Multiset α},
    ((bind s fun a => map (fun b => f a b) n) = bind n fun b => map (fun a => f a b) s) →
      (bind (a ::ₘ s) fun a => map (fun b => f a b) n) = bind n fun b => map (fun a => f a b) (a ::ₘ s)
[PROOFSTEP]
simp (config := { contextual := true })
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
s✝ t✝ : Multiset α
f g : α → Multiset β
inst✝ : CommMonoid β
s : Multiset α
t : α → Multiset β
⊢ prod (bind 0 t) = prod (map (fun a => prod (t a)) 0)
[PROOFSTEP]
simp
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a✝ : α
s✝¹ t✝ : Multiset α
f g : α → Multiset β
inst✝ : CommMonoid β
s✝ : Multiset α
t : α → Multiset β
a : α
s : Multiset α
ih : prod (bind s t) = prod (map (fun a => prod (t a)) s)
⊢ prod (bind (a ::ₘ s) t) = prod (map (fun a => prod (t a)) (a ::ₘ s))
[PROOFSTEP]
simp [ih, cons_bind]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
s✝ t✝ : Multiset α
f✝ g✝ : α → Multiset β
r : α → β → Prop
p : γ → δ → Prop
s : Multiset α
t : Multiset β
f : α → Multiset γ
g : β → Multiset δ
h : (r ⇒ Rel p) f g
hst : Rel r s t
⊢ Rel p (bind s f) (bind t g)
[PROOFSTEP]
apply rel_join
[GOAL]
case h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
s✝ t✝ : Multiset α
f✝ g✝ : α → Multiset β
r : α → β → Prop
p : γ → δ → Prop
s : Multiset α
t : Multiset β
f : α → Multiset γ
g : β → Multiset δ
h : (r ⇒ Rel p) f g
hst : Rel r s t
⊢ Rel (Rel p) (map f s) (map g t)
[PROOFSTEP]
rw [rel_map]
[GOAL]
case h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
s✝ t✝ : Multiset α
f✝ g✝ : α → Multiset β
r : α → β → Prop
p : γ → δ → Prop
s : Multiset α
t : Multiset β
f : α → Multiset γ
g : β → Multiset δ
h : (r ⇒ Rel p) f g
hst : Rel r s t
⊢ Rel (fun a b => Rel p (f a) (g b)) s t
[PROOFSTEP]
exact hst.mono fun a _ b _ hr => h hr
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a✝ : α
s t : Multiset α
f✝ g : α → Multiset β
inst✝ : DecidableEq α
m : Multiset β
f : β → Multiset α
a : α
⊢ count a (sum (map f 0)) = sum (map (fun b => count a (f b)) 0)
[PROOFSTEP]
simp
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a✝ : α
s t : Multiset α
f✝ g : α → Multiset β
inst✝ : DecidableEq α
m : Multiset β
f : β → Multiset α
a : α
⊢ ∀ ⦃a_1 : β⦄ {s : Multiset β},
    count a (sum (map f s)) = sum (map (fun b => count a (f b)) s) →
      count a (sum (map f (a_1 ::ₘ s))) = sum (map (fun b => count a (f b)) (a_1 ::ₘ s))
[PROOFSTEP]
simp
[GOAL]
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
δ : Type u_4
a : α✝
s t : Multiset α✝
f✝ g : α✝ → Multiset β✝
α : Type u_5
β : Type u_6
f : α → Multiset β
S : Multiset α
x : α
hx : x ∈ S
⊢ f x ≤ bind S f
[PROOFSTEP]
classical
rw [le_iff_count]
intro a
rw [count_bind]
apply le_sum_of_mem
rw [mem_map]
exact ⟨x, hx, rfl⟩
[GOAL]
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
δ : Type u_4
a : α✝
s t : Multiset α✝
f✝ g : α✝ → Multiset β✝
α : Type u_5
β : Type u_6
f : α → Multiset β
S : Multiset α
x : α
hx : x ∈ S
⊢ f x ≤ bind S f
[PROOFSTEP]
rw [le_iff_count]
[GOAL]
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
δ : Type u_4
a : α✝
s t : Multiset α✝
f✝ g : α✝ → Multiset β✝
α : Type u_5
β : Type u_6
f : α → Multiset β
S : Multiset α
x : α
hx : x ∈ S
⊢ ∀ (a : β), count a (f x) ≤ count a (bind S f)
[PROOFSTEP]
intro a
[GOAL]
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
δ : Type u_4
a✝ : α✝
s t : Multiset α✝
f✝ g : α✝ → Multiset β✝
α : Type u_5
β : Type u_6
f : α → Multiset β
S : Multiset α
x : α
hx : x ∈ S
a : β
⊢ count a (f x) ≤ count a (bind S f)
[PROOFSTEP]
rw [count_bind]
[GOAL]
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
δ : Type u_4
a✝ : α✝
s t : Multiset α✝
f✝ g : α✝ → Multiset β✝
α : Type u_5
β : Type u_6
f : α → Multiset β
S : Multiset α
x : α
hx : x ∈ S
a : β
⊢ count a (f x) ≤ sum (map (fun b => count a (f b)) S)
[PROOFSTEP]
apply le_sum_of_mem
[GOAL]
case h
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
δ : Type u_4
a✝ : α✝
s t : Multiset α✝
f✝ g : α✝ → Multiset β✝
α : Type u_5
β : Type u_6
f : α → Multiset β
S : Multiset α
x : α
hx : x ∈ S
a : β
⊢ count a (f x) ∈ map (fun b => count a (f b)) S
[PROOFSTEP]
rw [mem_map]
[GOAL]
case h
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
δ : Type u_4
a✝ : α✝
s t : Multiset α✝
f✝ g : α✝ → Multiset β✝
α : Type u_5
β : Type u_6
f : α → Multiset β
S : Multiset α
x : α
hx : x ∈ S
a : β
⊢ ∃ a_1, a_1 ∈ S ∧ count a (f a_1) = count a (f x)
[PROOFSTEP]
exact ⟨x, hx, rfl⟩
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
b : β
s : Multiset α
t : Multiset β
l₁ : List α
l₂ : List β
⊢ ↑l₁ ×ˢ ↑l₂ = ↑(l₁ ×ˢ l₂)
[PROOFSTEP]
dsimp only [SProd.sprod]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
b : β
s : Multiset α
t : Multiset β
l₁ : List α
l₂ : List β
⊢ product ↑l₁ ↑l₂ = ↑(List.product l₁ l₂)
[PROOFSTEP]
rw [product, List.product, ← coe_bind]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
b : β
s : Multiset α
t : Multiset β
l₁ : List α
l₂ : List β
⊢ (bind ↑l₁ fun a => map (Prod.mk a) ↑l₂) = bind ↑l₁ fun a => ↑(List.map (Prod.mk a) l₂)
[PROOFSTEP]
simp
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
b : β
s : Multiset α
t : Multiset β
⊢ (a ::ₘ s) ×ˢ t = map (Prod.mk a) t + s ×ˢ t
[PROOFSTEP]
simp [SProd.sprod, product]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
b : β
s : Multiset α
t : Multiset β
⊢ s ×ˢ 0 = 0
[PROOFSTEP]
simp [SProd.sprod, product]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
b : β
s : Multiset α
t : Multiset β
⊢ s ×ˢ (b ::ₘ t) = map (fun a => (a, b)) s + s ×ˢ t
[PROOFSTEP]
simp [SProd.sprod, product]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
b : β
s : Multiset α
t : Multiset β
⊢ {a} ×ˢ {b} = {(a, b)}
[PROOFSTEP]
simp only [SProd.sprod, product, bind_singleton, map_singleton]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
b : β
s✝ : Multiset α
t✝ : Multiset β
s t : Multiset α
u : Multiset β
⊢ (s + t) ×ˢ u = s ×ˢ u + t ×ˢ u
[PROOFSTEP]
simp [SProd.sprod, product]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a✝ : α
b : β
s✝¹ : Multiset α
t✝ : Multiset β
s✝ : Multiset α
a : α
s : Multiset α
IH : ∀ (t u : Multiset β), s ×ˢ (t + u) = s ×ˢ t + s ×ˢ u
t u : Multiset β
⊢ (a ::ₘ s) ×ˢ (t + u) = (a ::ₘ s) ×ˢ t + (a ::ₘ s) ×ˢ u
[PROOFSTEP]
rw [cons_product, IH]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a✝ : α
b : β
s✝¹ : Multiset α
t✝ : Multiset β
s✝ : Multiset α
a : α
s : Multiset α
IH : ∀ (t u : Multiset β), s ×ˢ (t + u) = s ×ˢ t + s ×ˢ u
t u : Multiset β
⊢ map (Prod.mk a) (t + u) + (s ×ˢ t + s ×ˢ u) = (a ::ₘ s) ×ˢ t + (a ::ₘ s) ×ˢ u
[PROOFSTEP]
simp [add_comm, add_left_comm, add_assoc]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a✝ : α
b✝ : β
s✝ : Multiset α
t✝ : Multiset β
s : Multiset α
t : Multiset β
a : α
b : β
⊢ (a, b) ∈ product s t ↔ (a, b).fst ∈ s ∧ (a, b).snd ∈ t
[PROOFSTEP]
simp [product, and_left_comm]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a : α
b : β
s : Multiset α
t : Multiset β
⊢ ↑card (s ×ˢ t) = ↑card s * ↑card t
[PROOFSTEP]
simp [SProd.sprod, product]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
σ : α → Type u_5
a : α
s : Multiset α
t : (a : α) → Multiset (σ a)
l₁ : List α
l₂ : (a : α) → List (σ a)
⊢ (Multiset.sigma ↑l₁ fun a => ↑(l₂ a)) = ↑(List.sigma l₁ l₂)
[PROOFSTEP]
rw [Multiset.sigma, List.sigma, ← coe_bind]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
σ : α → Type u_5
a : α
s : Multiset α
t : (a : α) → Multiset (σ a)
l₁ : List α
l₂ : (a : α) → List (σ a)
⊢ (bind ↑l₁ fun a => map (Sigma.mk a) ↑(l₂ a)) = bind ↑l₁ fun a => ↑(List.map (Sigma.mk a) (l₂ a))
[PROOFSTEP]
simp
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
σ : α → Type u_5
a : α
s : Multiset α
t : (a : α) → Multiset (σ a)
⊢ Multiset.sigma (a ::ₘ s) t = map (Sigma.mk a) (t a) + Multiset.sigma s t
[PROOFSTEP]
simp [Multiset.sigma]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
σ : α → Type u_5
a : α
s✝ : Multiset α
t✝ : (a : α) → Multiset (σ a)
s t : Multiset α
u : (a : α) → Multiset (σ a)
⊢ Multiset.sigma (s + t) u = Multiset.sigma s u + Multiset.sigma t u
[PROOFSTEP]
simp [Multiset.sigma]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
σ : α → Type u_5
a✝ : α
s✝ : Multiset α
t✝ : (a : α) → Multiset (σ a)
a : α
s : Multiset α
IH : ∀ (t u : (a : α) → Multiset (σ a)), (Multiset.sigma s fun a => t a + u a) = Multiset.sigma s t + Multiset.sigma s u
t u : (a : α) → Multiset (σ a)
⊢ (Multiset.sigma (a ::ₘ s) fun a => t a + u a) = Multiset.sigma (a ::ₘ s) t + Multiset.sigma (a ::ₘ s) u
[PROOFSTEP]
rw [cons_sigma, IH]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
σ : α → Type u_5
a✝ : α
s✝ : Multiset α
t✝ : (a : α) → Multiset (σ a)
a : α
s : Multiset α
IH : ∀ (t u : (a : α) → Multiset (σ a)), (Multiset.sigma s fun a => t a + u a) = Multiset.sigma s t + Multiset.sigma s u
t u : (a : α) → Multiset (σ a)
⊢ map (Sigma.mk a) (t a + u a) + ((Multiset.sigma s fun a => t a) + Multiset.sigma s fun a => u a) =
    Multiset.sigma (a ::ₘ s) t + Multiset.sigma (a ::ₘ s) u
[PROOFSTEP]
simp [add_comm, add_left_comm, add_assoc]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
σ : α → Type u_5
a✝ : α
s✝ : Multiset α
t✝ : (a : α) → Multiset (σ a)
s : Multiset α
t : (a : α) → Multiset (σ a)
a : α
b : σ a
⊢ { fst := a, snd := b } ∈ Multiset.sigma s t ↔
    { fst := a, snd := b }.fst ∈ s ∧ { fst := a, snd := b }.snd ∈ t { fst := a, snd := b }.fst
[PROOFSTEP]
simp [Multiset.sigma, and_assoc, and_left_comm]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
σ : α → Type u_5
a : α
s : Multiset α
t : (a : α) → Multiset (σ a)
⊢ ↑card (Multiset.sigma s t) = sum (map (fun a => ↑card (t a)) s)
[PROOFSTEP]
simp [Multiset.sigma, (· ∘ ·)]


[GOAL]
α : Type u_1
β : Type u_2
l : List α
f : α → β
⊢ range (map f) = {l | ∀ (x : β), x ∈ l → x ∈ range f}
[PROOFSTEP]
refine' antisymm (range_subset_iff.2 fun l => forall_mem_map_iff.2 fun y _ => mem_range_self _) fun l hl => _
[GOAL]
α : Type u_1
β : Type u_2
l✝ : List α
f : α → β
l : List β
hl : l ∈ {l | ∀ (x : β), x ∈ l → x ∈ range f}
⊢ l ∈ range (map f)
[PROOFSTEP]
induction' l with a l ihl
[GOAL]
case nil
α : Type u_1
β : Type u_2
l✝ : List α
f : α → β
l : List β
hl✝ : l ∈ {l | ∀ (x : β), x ∈ l → x ∈ range f}
hl : [] ∈ {l | ∀ (x : β), x ∈ l → x ∈ range f}
⊢ [] ∈ range (map f)
[PROOFSTEP]
exact ⟨[], rfl⟩
[GOAL]
case cons
α : Type u_1
β : Type u_2
l✝¹ : List α
f : α → β
l✝ : List β
hl✝ : l✝ ∈ {l | ∀ (x : β), x ∈ l → x ∈ range f}
a : β
l : List β
ihl : l ∈ {l | ∀ (x : β), x ∈ l → x ∈ range f} → l ∈ range (map f)
hl : a :: l ∈ {l | ∀ (x : β), x ∈ l → x ∈ range f}
⊢ a :: l ∈ range (map f)
[PROOFSTEP]
rcases ihl fun x hx => hl x <| subset_cons _ _ hx with ⟨l, rfl⟩
[GOAL]
case cons.intro
α : Type u_1
β : Type u_2
l✝¹ : List α
f : α → β
l✝ : List β
hl✝ : l✝ ∈ {l | ∀ (x : β), x ∈ l → x ∈ range f}
a : β
l : List α
ihl : map f l ∈ {l | ∀ (x : β), x ∈ l → x ∈ range f} → map f l ∈ range (map f)
hl : a :: map f l ∈ {l | ∀ (x : β), x ∈ l → x ∈ range f}
⊢ a :: map f l ∈ range (map f)
[PROOFSTEP]
rcases hl a (mem_cons_self _ _) with ⟨a, rfl⟩
[GOAL]
case cons.intro.intro
α : Type u_1
β : Type u_2
l✝¹ : List α
f : α → β
l✝ : List β
hl✝ : l✝ ∈ {l | ∀ (x : β), x ∈ l → x ∈ range f}
l : List α
ihl : map f l ∈ {l | ∀ (x : β), x ∈ l → x ∈ range f} → map f l ∈ range (map f)
a : α
hl : f a :: map f l ∈ {l | ∀ (x : β), x ∈ l → x ∈ range f}
⊢ f a :: map f l ∈ range (map f)
[PROOFSTEP]
exact ⟨a :: l, map_cons _ _ _⟩
[GOAL]
α : Type u_1
β : Type u_2
l : List α
s : Set α
⊢ range (map Subtype.val) = {l | ∀ (x : α), x ∈ l → x ∈ s}
[PROOFSTEP]
rw [range_list_map, Subtype.range_coe]
[GOAL]
α : Type u_1
β : Type u_2
l : List α
⊢ (range fun k => nthLe l ↑k (_ : ↑k < length l)) = {x | x ∈ l}
[PROOFSTEP]
ext x
[GOAL]
case h
α : Type u_1
β : Type u_2
l : List α
x : α
⊢ (x ∈ range fun k => nthLe l ↑k (_ : ↑k < length l)) ↔ x ∈ {x | x ∈ l}
[PROOFSTEP]
rw [mem_setOf_eq, mem_iff_get]
[GOAL]
case h
α : Type u_1
β : Type u_2
l : List α
x : α
⊢ (x ∈ range fun k => nthLe l ↑k (_ : ↑k < length l)) ↔ ∃ n, List.get l n = x
[PROOFSTEP]
exact ⟨fun ⟨⟨n, h₁⟩, h₂⟩ => ⟨⟨n, h₁⟩, h₂⟩, fun ⟨⟨n, h₁⟩, h₂⟩ => ⟨⟨n, h₁⟩, h₂⟩⟩
[GOAL]
α : Type u_1
β : Type u_2
l : List α
⊢ range (get? l) = insert none (some '' {x | x ∈ l})
[PROOFSTEP]
rw [← range_list_nthLe, ← range_comp]
[GOAL]
α : Type u_1
β : Type u_2
l : List α
⊢ range (get? l) = insert none (range (some ∘ fun k => nthLe l ↑k (_ : ↑k < length l)))
[PROOFSTEP]
refine' (range_subset_iff.2 fun n => _).antisymm (insert_subset_iff.2 ⟨_, _⟩)
[GOAL]
case refine'_1
α : Type u_1
β : Type u_2
l : List α
n : ℕ
⊢ get? l n ∈ insert none (range (some ∘ fun k => nthLe l ↑k (_ : ↑k < length l)))
case refine'_2
α : Type u_1
β : Type u_2
l : List α
⊢ none ∈ range (get? l)
case refine'_3
α : Type u_1
β : Type u_2
l : List α
⊢ range (some ∘ fun k => nthLe l ↑k (_ : ↑k < length l)) ⊆ range (get? l)
[PROOFSTEP]
exacts [(le_or_lt l.length n).imp get?_eq_none.2 (fun hlt => ⟨⟨_, hlt⟩, (get?_eq_get hlt).symm⟩),
  ⟨_, get?_eq_none.2 le_rfl⟩, range_subset_iff.2 <| fun k => ⟨_, get?_eq_get _⟩]
[GOAL]
α : Type u_1
β : Type u_2
l : List α
d : α
⊢ (range fun n => getD l n d) = (fun o => Option.getD o d) '' range (get? l)
[PROOFSTEP]
simp only [← range_comp, (· ∘ ·), getD_eq_getD_get?]
[GOAL]
α : Type u_1
β : Type u_2
l : List α
d : α
⊢ (fun o => Option.getD o d) '' range (get? l) = insert d {x | x ∈ l}
[PROOFSTEP]
simp only [range_list_get?, image_insert_eq, Option.getD, image_image, image_id']
[GOAL]
α : Type u_1
β : Type u_2
l✝ : List α
c : β → α
p : α → Prop
inst✝ : CanLift α β c p
l : List α
H : ∀ (x : α), x ∈ l → p x
⊢ ∃ y, map c y = l
[PROOFSTEP]
rw [← Set.mem_range, Set.range_list_map]
[GOAL]
α : Type u_1
β : Type u_2
l✝ : List α
c : β → α
p : α → Prop
inst✝ : CanLift α β c p
l : List α
H : ∀ (x : α), x ∈ l → p x
⊢ l ∈ {l | ∀ (x : α), x ∈ l → x ∈ Set.range c}
[PROOFSTEP]
exact fun a ha => CanLift.prf a (H a ha)


[GOAL]
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
⊢ spectrum ℂ (star a * a) ⊆ Set.Icc 0 ↑‖star a * a‖
[PROOFSTEP]
rcases subsingleton_or_nontrivial A with ⟨⟩
[GOAL]
case inl
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
h✝ : Subsingleton A
⊢ spectrum ℂ (star a * a) ⊆ Set.Icc 0 ↑‖star a * a‖
[PROOFSTEP]
simp only [spectrum.of_subsingleton, Set.empty_subset]
[GOAL]
case inr
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
h✝ : Nontrivial A
⊢ spectrum ℂ (star a * a) ⊆ Set.Icc 0 ↑‖star a * a‖
[PROOFSTEP]
set a' : elementalStarAlgebra ℂ a := ⟨a, self_mem ℂ a⟩
[GOAL]
case inr
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
h✝ : Nontrivial A
a' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }
⊢ spectrum ℂ (star a * a) ⊆ Set.Icc 0 ↑‖star a * a‖
[PROOFSTEP]
refine' (spectrum.subset_starSubalgebra (star a' * a')).trans _
[GOAL]
case inr
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
h✝ : Nontrivial A
a' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }
⊢ spectrum ℂ (star a' * a') ⊆ Set.Icc 0 ↑‖star a * a‖
[PROOFSTEP]
rw [← spectrum.gelfandTransform_eq (star a' * a'), ContinuousMap.spectrum_eq_range]
[GOAL]
case inr
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
h✝ : Nontrivial A
a' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }
⊢ Set.range ↑(↑(gelfandTransform ℂ { x // x ∈ elementalStarAlgebra ℂ a }) (star a' * a')) ⊆ Set.Icc 0 ↑‖star a * a‖
[PROOFSTEP]
rintro - ⟨φ, rfl⟩
[GOAL]
case inr.intro
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
h✝ : Nontrivial A
a' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }
φ : ↑(characterSpace ℂ { x // x ∈ elementalStarAlgebra ℂ a })
⊢ ↑(↑(gelfandTransform ℂ { x // x ∈ elementalStarAlgebra ℂ a }) (star a' * a')) φ ∈ Set.Icc 0 ↑‖star a * a‖
[PROOFSTEP]
rw [gelfandTransform_apply_apply ℂ _ (star a' * a') φ, map_mul φ, map_star φ]
[GOAL]
case inr.intro
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
h✝ : Nontrivial A
a' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }
φ : ↑(characterSpace ℂ { x // x ∈ elementalStarAlgebra ℂ a })
⊢ star (↑φ a') * ↑φ a' ∈ Set.Icc 0 ↑‖star a * a‖
[PROOFSTEP]
rw [Complex.eq_coe_norm_of_nonneg (star_mul_self_nonneg _), ← map_star, ← map_mul]
[GOAL]
case inr.intro
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
h✝ : Nontrivial A
a' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }
φ : ↑(characterSpace ℂ { x // x ∈ elementalStarAlgebra ℂ a })
⊢ ↑‖↑φ (star a' * a')‖ ∈ Set.Icc 0 ↑‖star a * a‖
[PROOFSTEP]
exact ⟨Complex.zero_le_real.2 (norm_nonneg _), Complex.real_le_real.2 (AlgHom.norm_apply_le_self φ (star a' * a'))⟩
[GOAL]
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
h : IsUnit a
⊢ IsUnit { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }
[PROOFSTEP]
nontriviality A
[GOAL]
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
h : IsUnit a
✝ : Nontrivial A
⊢ IsUnit { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }
[PROOFSTEP]
set a' : elementalStarAlgebra ℂ a := ⟨a, self_mem ℂ a⟩
[GOAL]
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
h : IsUnit a
✝ : Nontrivial A
a' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }
⊢ IsUnit a'
[PROOFSTEP]
suffices : IsUnit (star a' * a')
[GOAL]
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
h : IsUnit a
✝ : Nontrivial A
a' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }
this : IsUnit (star a' * a')
⊢ IsUnit a'
case this
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
h : IsUnit a
✝ : Nontrivial A
a' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }
⊢ IsUnit (star a' * a')
[PROOFSTEP]
exact (IsUnit.mul_iff.1 this).2
[GOAL]
case this
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
h : IsUnit a
✝ : Nontrivial A
a' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }
⊢ IsUnit (star a' * a')
[PROOFSTEP]
replace h :=
  (show Commute (star a) a from star_comm_self' a).isUnit_mul_iff.2
    ⟨h.star, h⟩
      /- Since `a` is invertible, `‖star a * a‖ ≠ 0`, so `‖star a * a‖ • 1` is invertible in
          `elementalStarAlgebra ℂ a`, and so it suffices to show that the distance between this unit and
          `star a * a` is less than `‖star a * a‖`. -/
[GOAL]
case this
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
✝ : Nontrivial A
a' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }
h : IsUnit (star a * a)
⊢ IsUnit (star a' * a')
[PROOFSTEP]
have h₁ : (‖star a * a‖ : ℂ) ≠ 0 := Complex.ofReal_ne_zero.mpr (norm_ne_zero_iff.mpr h.ne_zero)
[GOAL]
case this
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
✝ : Nontrivial A
a' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }
h : IsUnit (star a * a)
h₁ : ↑‖star a * a‖ ≠ 0
⊢ IsUnit (star a' * a')
[PROOFSTEP]
set u : Units (elementalStarAlgebra ℂ a) :=
  Units.map (algebraMap ℂ (elementalStarAlgebra ℂ a)).toMonoidHom (Units.mk0 _ h₁)
[GOAL]
case this
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
✝ : Nontrivial A
a' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }
h : IsUnit (star a * a)
h₁ : ↑‖star a * a‖ ≠ 0
u : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=
  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)
⊢ IsUnit (star a' * a')
[PROOFSTEP]
refine' ⟨u.ofNearby _ _, rfl⟩
[GOAL]
case this
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
✝ : Nontrivial A
a' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }
h : IsUnit (star a * a)
h₁ : ↑‖star a * a‖ ≠ 0
u : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=
  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)
⊢ ‖star a' * a' - ↑u‖ < ‖↑u⁻¹‖⁻¹
[PROOFSTEP]
simp only [Units.coe_map, Units.val_inv_eq_inv_val, RingHom.toMonoidHom_eq_coe, Units.val_mk0, Units.coe_map_inv,
  MonoidHom.coe_coe, norm_algebraMap', norm_inv, Complex.norm_eq_abs, Complex.abs_ofReal, abs_norm, inv_inv]
  --RingHom.coe_monoidHom,
      -- Complex.abs_ofReal, map_inv₀,
    --rw [norm_algebraMap', inv_inv, Complex.norm_eq_abs, abs_norm]I-
    /- Since `a` is invertible, by `spectrum_star_mul_self_of_isStarNormal`, the spectrum (in `A`)
      of `star a * a` is contained in the half-open interval `(0, ‖star a * a‖]`. Therefore, by basic
      spectral mapping properties, the spectrum of `‖star a * a‖ • 1 - star a * a` is contained in
      `[0, ‖star a * a‖)`. -/
[GOAL]
case this
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
✝ : Nontrivial A
a' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }
h : IsUnit (star a * a)
h₁ : ↑‖star a * a‖ ≠ 0
u : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=
  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)
⊢ ‖star { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) } *
          { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) } -
        ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a }) ↑‖star a * a‖‖ <
    ‖star a * a‖
[PROOFSTEP]
have h₂ : ∀ z ∈ spectrum ℂ (algebraMap ℂ A ‖star a * a‖ - star a * a), ‖z‖₊ < ‖star a * a‖₊ :=
  by
  intro z hz
  rw [← spectrum.singleton_sub_eq, Set.singleton_sub] at hz
  have h₃ : z ∈ Set.Icc (0 : ℂ) ‖star a * a‖ :=
    by
    replace hz := Set.image_subset _ (spectrum_star_mul_self_of_isStarNormal a) hz
    rwa [Set.image_const_sub_Icc, sub_self, sub_zero] at hz
  refine' lt_of_le_of_ne (Complex.real_le_real.1 <| Complex.eq_coe_norm_of_nonneg h₃.1 ▸ h₃.2) _
  · intro hz'
    replace hz' := congr_arg (fun x : ℝ≥0 => ((x : ℝ) : ℂ)) hz'
    simp only [coe_nnnorm] at hz'
    rw [← Complex.eq_coe_norm_of_nonneg h₃.1] at hz'
    obtain ⟨w, hw₁, hw₂⟩ := hz
    refine' (spectrum.zero_not_mem_iff ℂ).mpr h _
    rw [hz', sub_eq_self] at hw₂
    rwa [hw₂] at hw₁
[GOAL]
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
✝ : Nontrivial A
a' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }
h : IsUnit (star a * a)
h₁ : ↑‖star a * a‖ ≠ 0
u : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=
  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)
⊢ ∀ (z : ℂ), z ∈ spectrum ℂ (↑(algebraMap ℂ A) ↑‖star a * a‖ - star a * a) → ‖z‖₊ < ‖star a * a‖₊
[PROOFSTEP]
intro z hz
[GOAL]
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
✝ : Nontrivial A
a' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }
h : IsUnit (star a * a)
h₁ : ↑‖star a * a‖ ≠ 0
u : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=
  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)
z : ℂ
hz : z ∈ spectrum ℂ (↑(algebraMap ℂ A) ↑‖star a * a‖ - star a * a)
⊢ ‖z‖₊ < ‖star a * a‖₊
[PROOFSTEP]
rw [← spectrum.singleton_sub_eq, Set.singleton_sub] at hz
[GOAL]
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
✝ : Nontrivial A
a' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }
h : IsUnit (star a * a)
h₁ : ↑‖star a * a‖ ≠ 0
u : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=
  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)
z : ℂ
hz : z ∈ (fun x x_1 => x - x_1) ↑‖star a * a‖ '' spectrum ℂ (star a * a)
⊢ ‖z‖₊ < ‖star a * a‖₊
[PROOFSTEP]
have h₃ : z ∈ Set.Icc (0 : ℂ) ‖star a * a‖ :=
  by
  replace hz := Set.image_subset _ (spectrum_star_mul_self_of_isStarNormal a) hz
  rwa [Set.image_const_sub_Icc, sub_self, sub_zero] at hz
[GOAL]
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
✝ : Nontrivial A
a' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }
h : IsUnit (star a * a)
h₁ : ↑‖star a * a‖ ≠ 0
u : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=
  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)
z : ℂ
hz : z ∈ (fun x x_1 => x - x_1) ↑‖star a * a‖ '' spectrum ℂ (star a * a)
⊢ z ∈ Set.Icc 0 ↑‖star a * a‖
[PROOFSTEP]
replace hz := Set.image_subset _ (spectrum_star_mul_self_of_isStarNormal a) hz
[GOAL]
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
✝ : Nontrivial A
a' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }
h : IsUnit (star a * a)
h₁ : ↑‖star a * a‖ ≠ 0
u : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=
  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)
z : ℂ
hz : z ∈ (fun x x_1 => x - x_1) ↑‖star a * a‖ '' Set.Icc 0 ↑‖star a * a‖
⊢ z ∈ Set.Icc 0 ↑‖star a * a‖
[PROOFSTEP]
rwa [Set.image_const_sub_Icc, sub_self, sub_zero] at hz
[GOAL]
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
✝ : Nontrivial A
a' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }
h : IsUnit (star a * a)
h₁ : ↑‖star a * a‖ ≠ 0
u : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=
  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)
z : ℂ
hz : z ∈ (fun x x_1 => x - x_1) ↑‖star a * a‖ '' spectrum ℂ (star a * a)
h₃ : z ∈ Set.Icc 0 ↑‖star a * a‖
⊢ ‖z‖₊ < ‖star a * a‖₊
[PROOFSTEP]
refine' lt_of_le_of_ne (Complex.real_le_real.1 <| Complex.eq_coe_norm_of_nonneg h₃.1 ▸ h₃.2) _
[GOAL]
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
✝ : Nontrivial A
a' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }
h : IsUnit (star a * a)
h₁ : ↑‖star a * a‖ ≠ 0
u : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=
  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)
z : ℂ
hz : z ∈ (fun x x_1 => x - x_1) ↑‖star a * a‖ '' spectrum ℂ (star a * a)
h₃ : z ∈ Set.Icc 0 ↑‖star a * a‖
⊢ ‖z‖₊ ≠ ‖star a * a‖₊
[PROOFSTEP]
intro hz'
[GOAL]
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
✝ : Nontrivial A
a' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }
h : IsUnit (star a * a)
h₁ : ↑‖star a * a‖ ≠ 0
u : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=
  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)
z : ℂ
hz : z ∈ (fun x x_1 => x - x_1) ↑‖star a * a‖ '' spectrum ℂ (star a * a)
h₃ : z ∈ Set.Icc 0 ↑‖star a * a‖
hz' : ‖z‖₊ = ‖star a * a‖₊
⊢ False
[PROOFSTEP]
replace hz' := congr_arg (fun x : ℝ≥0 => ((x : ℝ) : ℂ)) hz'
[GOAL]
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
✝ : Nontrivial A
a' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }
h : IsUnit (star a * a)
h₁ : ↑‖star a * a‖ ≠ 0
u : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=
  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)
z : ℂ
hz : z ∈ (fun x x_1 => x - x_1) ↑‖star a * a‖ '' spectrum ℂ (star a * a)
h₃ : z ∈ Set.Icc 0 ↑‖star a * a‖
hz' : (fun x => ↑↑x) ‖z‖₊ = (fun x => ↑↑x) ‖star a * a‖₊
⊢ False
[PROOFSTEP]
simp only [coe_nnnorm] at hz'
[GOAL]
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
✝ : Nontrivial A
a' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }
h : IsUnit (star a * a)
h₁ : ↑‖star a * a‖ ≠ 0
u : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=
  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)
z : ℂ
hz : z ∈ (fun x x_1 => x - x_1) ↑‖star a * a‖ '' spectrum ℂ (star a * a)
h₃ : z ∈ Set.Icc 0 ↑‖star a * a‖
hz' : ↑‖z‖ = ↑‖star a * a‖
⊢ False
[PROOFSTEP]
rw [← Complex.eq_coe_norm_of_nonneg h₃.1] at hz'
[GOAL]
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
✝ : Nontrivial A
a' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }
h : IsUnit (star a * a)
h₁ : ↑‖star a * a‖ ≠ 0
u : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=
  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)
z : ℂ
hz : z ∈ (fun x x_1 => x - x_1) ↑‖star a * a‖ '' spectrum ℂ (star a * a)
h₃ : z ∈ Set.Icc 0 ↑‖star a * a‖
hz' : z = ↑‖star a * a‖
⊢ False
[PROOFSTEP]
obtain ⟨w, hw₁, hw₂⟩ := hz
[GOAL]
case intro.intro
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
✝ : Nontrivial A
a' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }
h : IsUnit (star a * a)
h₁ : ↑‖star a * a‖ ≠ 0
u : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=
  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)
z : ℂ
h₃ : z ∈ Set.Icc 0 ↑‖star a * a‖
hz' : z = ↑‖star a * a‖
w : ℂ
hw₁ : w ∈ spectrum ℂ (star a * a)
hw₂ : (fun x x_1 => x - x_1) (↑‖star a * a‖) w = z
⊢ False
[PROOFSTEP]
refine' (spectrum.zero_not_mem_iff ℂ).mpr h _
[GOAL]
case intro.intro
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
✝ : Nontrivial A
a' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }
h : IsUnit (star a * a)
h₁ : ↑‖star a * a‖ ≠ 0
u : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=
  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)
z : ℂ
h₃ : z ∈ Set.Icc 0 ↑‖star a * a‖
hz' : z = ↑‖star a * a‖
w : ℂ
hw₁ : w ∈ spectrum ℂ (star a * a)
hw₂ : (fun x x_1 => x - x_1) (↑‖star a * a‖) w = z
⊢ 0 ∈ spectrum ℂ (star a * a)
[PROOFSTEP]
rw [hz', sub_eq_self] at hw₂
[GOAL]
case intro.intro
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
✝ : Nontrivial A
a' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }
h : IsUnit (star a * a)
h₁ : ↑‖star a * a‖ ≠ 0
u : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=
  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)
z : ℂ
h₃ : z ∈ Set.Icc 0 ↑‖star a * a‖
hz' : z = ↑‖star a * a‖
w : ℂ
hw₁ : w ∈ spectrum ℂ (star a * a)
hw₂ : w = 0
⊢ 0 ∈ spectrum ℂ (star a * a)
[PROOFSTEP]
rwa [hw₂] at hw₁
[GOAL]
case this
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
✝ : Nontrivial A
a' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }
h : IsUnit (star a * a)
h₁ : ↑‖star a * a‖ ≠ 0
u : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=
  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)
h₂ : ∀ (z : ℂ), z ∈ spectrum ℂ (↑(algebraMap ℂ A) ↑‖star a * a‖ - star a * a) → ‖z‖₊ < ‖star a * a‖₊
⊢ ‖star { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) } *
          { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) } -
        ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a }) ↑‖star a * a‖‖ <
    ‖star a * a‖
[PROOFSTEP]
exact
  ENNReal.coe_lt_coe.1
    (calc
      (‖star a' * a' - algebraMap ℂ _ ‖star a * a‖‖₊ : ℝ≥0∞) = ‖algebraMap ℂ A ‖star a * a‖ - star a * a‖₊ := by
        rw [← nnnorm_neg, neg_sub]; rfl
      _ = spectralRadius ℂ (algebraMap ℂ A ‖star a * a‖ - star a * a) :=
        by
        refine' (IsSelfAdjoint.spectralRadius_eq_nnnorm _).symm
        rw [IsSelfAdjoint, star_sub, star_mul, star_star, ← algebraMap_star_comm]
        congr!
        exact IsROrC.conj_ofReal _
      _ < ‖star a * a‖₊ := spectrum.spectralRadius_lt_of_forall_lt _ h₂)
[GOAL]
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
✝ : Nontrivial A
a' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }
h : IsUnit (star a * a)
h₁ : ↑‖star a * a‖ ≠ 0
u : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=
  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)
h₂ : ∀ (z : ℂ), z ∈ spectrum ℂ (↑(algebraMap ℂ A) ↑‖star a * a‖ - star a * a) → ‖z‖₊ < ‖star a * a‖₊
⊢ ↑‖star a' * a' - ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a }) ↑‖star a * a‖‖₊ =
    ↑‖↑(algebraMap ℂ A) ↑‖star a * a‖ - star a * a‖₊
[PROOFSTEP]
rw [← nnnorm_neg, neg_sub]
[GOAL]
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
✝ : Nontrivial A
a' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }
h : IsUnit (star a * a)
h₁ : ↑‖star a * a‖ ≠ 0
u : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=
  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)
h₂ : ∀ (z : ℂ), z ∈ spectrum ℂ (↑(algebraMap ℂ A) ↑‖star a * a‖ - star a * a) → ‖z‖₊ < ‖star a * a‖₊
⊢ ↑‖↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a }) ↑‖star a * a‖ - star a' * a'‖₊ =
    ↑‖↑(algebraMap ℂ A) ↑‖star a * a‖ - star a * a‖₊
[PROOFSTEP]
rfl
[GOAL]
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
✝ : Nontrivial A
a' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }
h : IsUnit (star a * a)
h₁ : ↑‖star a * a‖ ≠ 0
u : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=
  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)
h₂ : ∀ (z : ℂ), z ∈ spectrum ℂ (↑(algebraMap ℂ A) ↑‖star a * a‖ - star a * a) → ‖z‖₊ < ‖star a * a‖₊
⊢ ↑‖↑(algebraMap ℂ A) ↑‖star a * a‖ - star a * a‖₊ = spectralRadius ℂ (↑(algebraMap ℂ A) ↑‖star a * a‖ - star a * a)
[PROOFSTEP]
refine' (IsSelfAdjoint.spectralRadius_eq_nnnorm _).symm
[GOAL]
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
✝ : Nontrivial A
a' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }
h : IsUnit (star a * a)
h₁ : ↑‖star a * a‖ ≠ 0
u : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=
  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)
h₂ : ∀ (z : ℂ), z ∈ spectrum ℂ (↑(algebraMap ℂ A) ↑‖star a * a‖ - star a * a) → ‖z‖₊ < ‖star a * a‖₊
⊢ IsSelfAdjoint (↑(algebraMap ℂ A) ↑‖star a * a‖ - star a * a)
[PROOFSTEP]
rw [IsSelfAdjoint, star_sub, star_mul, star_star, ← algebraMap_star_comm]
[GOAL]
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
✝ : Nontrivial A
a' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }
h : IsUnit (star a * a)
h₁ : ↑‖star a * a‖ ≠ 0
u : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=
  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)
h₂ : ∀ (z : ℂ), z ∈ spectrum ℂ (↑(algebraMap ℂ A) ↑‖star a * a‖ - star a * a) → ‖z‖₊ < ‖star a * a‖₊
⊢ ↑(algebraMap ℂ A) (star ↑‖star a * a‖) - star a * a = ↑(algebraMap ℂ A) ↑‖star a * a‖ - star a * a
[PROOFSTEP]
congr!
[GOAL]
case h.e'_5.h.e'_6
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
✝ : Nontrivial A
a' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }
h : IsUnit (star a * a)
h₁ : ↑‖star a * a‖ ≠ 0
u : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=
  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)
h₂ : ∀ (z : ℂ), z ∈ spectrum ℂ (↑(algebraMap ℂ A) ↑‖star a * a‖ - star a * a) → ‖z‖₊ < ‖star a * a‖₊
⊢ star ↑‖star a * a‖ = ↑‖star a * a‖
[PROOFSTEP]
exact IsROrC.conj_ofReal _
[GOAL]
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S✝ S : StarSubalgebra ℂ A
hS : IsClosed ↑S
x : A
h : IsUnit x
hxS : x ∈ S
⊢ ↑(IsUnit.unit h)⁻¹ ∈ S
[PROOFSTEP]
have hx := h.star.mul h
[GOAL]
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S✝ S : StarSubalgebra ℂ A
hS : IsClosed ↑S
x : A
h : IsUnit x
hxS : x ∈ S
hx : IsUnit (star x * x)
⊢ ↑(IsUnit.unit h)⁻¹ ∈ S
[PROOFSTEP]
suffices this : (↑hx.unit⁻¹ : A) ∈ S
[GOAL]
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S✝ S : StarSubalgebra ℂ A
hS : IsClosed ↑S
x : A
h : IsUnit x
hxS : x ∈ S
hx : IsUnit (star x * x)
this : ↑(IsUnit.unit hx)⁻¹ ∈ S
⊢ ↑(IsUnit.unit h)⁻¹ ∈ S
[PROOFSTEP]
rw [← one_mul (↑h.unit⁻¹ : A), ← hx.unit.inv_mul, mul_assoc, IsUnit.unit_spec, mul_assoc, h.mul_val_inv, mul_one]
[GOAL]
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S✝ S : StarSubalgebra ℂ A
hS : IsClosed ↑S
x : A
h : IsUnit x
hxS : x ∈ S
hx : IsUnit (star x * x)
this : ↑(IsUnit.unit hx)⁻¹ ∈ S
⊢ ↑(IsUnit.unit hx)⁻¹ * star x ∈ S
[PROOFSTEP]
exact mul_mem this (star_mem hxS)
[GOAL]
case this
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S✝ S : StarSubalgebra ℂ A
hS : IsClosed ↑S
x : A
h : IsUnit x
hxS : x ∈ S
hx : IsUnit (star x * x)
⊢ ↑(IsUnit.unit hx)⁻¹ ∈ S
[PROOFSTEP]
refine' le_of_isClosed_of_mem ℂ hS (mul_mem (star_mem hxS) hxS) _
[GOAL]
case this
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S✝ S : StarSubalgebra ℂ A
hS : IsClosed ↑S
x : A
h : IsUnit x
hxS : x ∈ S
hx : IsUnit (star x * x)
⊢ ↑(IsUnit.unit hx)⁻¹ ∈ elementalStarAlgebra ℂ (star x * x)
[PROOFSTEP]
haveI := (IsSelfAdjoint.star_mul_self x).isStarNormal
[GOAL]
case this
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S✝ S : StarSubalgebra ℂ A
hS : IsClosed ↑S
x : A
h : IsUnit x
hxS : x ∈ S
hx : IsUnit (star x * x)
this : IsStarNormal (star x * x)
⊢ ↑(IsUnit.unit hx)⁻¹ ∈ elementalStarAlgebra ℂ (star x * x)
[PROOFSTEP]
have hx' := elementalStarAlgebra.isUnit_of_isUnit_of_isStarNormal hx
[GOAL]
case this
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S✝ S : StarSubalgebra ℂ A
hS : IsClosed ↑S
x : A
h : IsUnit x
hxS : x ∈ S
hx : IsUnit (star x * x)
this : IsStarNormal (star x * x)
hx' : IsUnit { val := star x * x, property := (_ : star x * x ∈ elementalStarAlgebra ℂ (star x * x)) }
⊢ ↑(IsUnit.unit hx)⁻¹ ∈ elementalStarAlgebra ℂ (star x * x)
[PROOFSTEP]
convert (↑hx'.unit⁻¹ : elementalStarAlgebra ℂ (star x * x)).prop using 1
[GOAL]
case h.e'_4
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S✝ S : StarSubalgebra ℂ A
hS : IsClosed ↑S
x : A
h : IsUnit x
hxS : x ∈ S
hx : IsUnit (star x * x)
this : IsStarNormal (star x * x)
hx' : IsUnit { val := star x * x, property := (_ : star x * x ∈ elementalStarAlgebra ℂ (star x * x)) }
⊢ ↑(IsUnit.unit hx)⁻¹ = ↑↑(IsUnit.unit hx')⁻¹
[PROOFSTEP]
refine left_inv_eq_right_inv hx.unit.inv_mul ?_
[GOAL]
case h.e'_4
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S✝ S : StarSubalgebra ℂ A
hS : IsClosed ↑S
x : A
h : IsUnit x
hxS : x ∈ S
hx : IsUnit (star x * x)
this : IsStarNormal (star x * x)
hx' : IsUnit { val := star x * x, property := (_ : star x * x ∈ elementalStarAlgebra ℂ (star x * x)) }
⊢ ↑(IsUnit.unit hx) * ↑↑(IsUnit.unit hx')⁻¹ = 1
[PROOFSTEP]
exact (congr_arg ((↑) : _ → A) hx'.unit.mul_inv)
[GOAL]
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S✝ S : StarSubalgebra ℂ A
hS : IsClosed ↑S
x : { x // x ∈ S }
⊢ IsUnit ↑x ↔ IsUnit x
[PROOFSTEP]
refine'
  ⟨fun hx => ⟨⟨x, ⟨(↑hx.unit⁻¹ : A), StarSubalgebra.isUnit_coe_inv_mem hS hx x.prop⟩, _, _⟩, rfl⟩, fun hx =>
    hx.map S.subtype⟩
[GOAL]
case refine'_1
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S✝ S : StarSubalgebra ℂ A
hS : IsClosed ↑S
x : { x // x ∈ S }
hx : IsUnit ↑x
⊢ x * { val := ↑(IsUnit.unit hx)⁻¹, property := (_ : ↑(IsUnit.unit hx)⁻¹ ∈ S) } = 1
case refine'_2
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S✝ S : StarSubalgebra ℂ A
hS : IsClosed ↑S
x : { x // x ∈ S }
hx : IsUnit ↑x
⊢ { val := ↑(IsUnit.unit hx)⁻¹, property := (_ : ↑(IsUnit.unit hx)⁻¹ ∈ S) } * x = 1
[PROOFSTEP]
exacts [Subtype.coe_injective hx.mul_val_inv, Subtype.coe_injective hx.val_inv_mul]
[GOAL]
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
x : A
φ : ↑(characterSpace ℂ { x_1 // x_1 ∈ elementalStarAlgebra ℂ x })
⊢ ↑φ { val := x, property := (_ : x ∈ elementalStarAlgebra ℂ x) } ∈ spectrum ℂ x
[PROOFSTEP]
simpa only [StarSubalgebra.spectrum_eq (elementalStarAlgebra.isClosed ℂ x) ⟨x, self_mem ℂ x⟩] using
  AlgHom.apply_mem_spectrum φ ⟨x, self_mem ℂ x⟩
[GOAL]
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
⊢ Function.Bijective (characterSpaceToSpectrum a)
[PROOFSTEP]
refine' ⟨fun φ ψ h => starAlgHomClass_ext ℂ _ _ _, _⟩
[GOAL]
case refine'_1
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
φ ψ : ↑(characterSpace ℂ { x // x ∈ elementalStarAlgebra ℂ a })
h : characterSpaceToSpectrum a φ = characterSpaceToSpectrum a ψ
⊢ Continuous ↑φ
[PROOFSTEP]
exact (map_continuous φ)
[GOAL]
case refine'_2
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
φ ψ : ↑(characterSpace ℂ { x // x ∈ elementalStarAlgebra ℂ a })
h : characterSpaceToSpectrum a φ = characterSpaceToSpectrum a ψ
⊢ Continuous ↑ψ
[PROOFSTEP]
exact (map_continuous ψ)
[GOAL]
case refine'_3
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
φ ψ : ↑(characterSpace ℂ { x // x ∈ elementalStarAlgebra ℂ a })
h : characterSpaceToSpectrum a φ = characterSpaceToSpectrum a ψ
⊢ ↑φ { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) } =
    ↑ψ { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }
[PROOFSTEP]
simpa only [elementalStarAlgebra.characterSpaceToSpectrum, Subtype.mk_eq_mk, ContinuousMap.coe_mk] using h
[GOAL]
case refine'_4
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
⊢ Function.Surjective (characterSpaceToSpectrum a)
[PROOFSTEP]
rintro ⟨z, hz⟩
[GOAL]
case refine'_4.mk
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
z : ℂ
hz : z ∈ spectrum ℂ a
⊢ ∃ a_1, characterSpaceToSpectrum a a_1 = { val := z, property := hz }
[PROOFSTEP]
have hz' := (StarSubalgebra.spectrum_eq (elementalStarAlgebra.isClosed ℂ a) ⟨a, self_mem ℂ a⟩).symm.subst hz
[GOAL]
case refine'_4.mk
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
z : ℂ
hz : z ∈ spectrum ℂ a
hz' : z ∈ spectrum ℂ { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }
⊢ ∃ a_1, characterSpaceToSpectrum a a_1 = { val := z, property := hz }
[PROOFSTEP]
rw [CharacterSpace.mem_spectrum_iff_exists] at hz'
[GOAL]
case refine'_4.mk
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
z : ℂ
hz : z ∈ spectrum ℂ a
hz' : ∃ f, ↑f { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) } = z
⊢ ∃ a_1, characterSpaceToSpectrum a a_1 = { val := z, property := hz }
[PROOFSTEP]
obtain ⟨φ, rfl⟩ := hz'
[GOAL]
case refine'_4.mk.intro
A : Type u_1
inst✝⁶ : NormedRing A
inst✝⁵ : NormedAlgebra ℂ A
inst✝⁴ : StarRing A
inst✝³ : CstarRing A
inst✝² : StarModule ℂ A
inst✝¹ : CompleteSpace A
a : A
inst✝ : IsStarNormal a
S : StarSubalgebra ℂ A
φ : ↑(characterSpace ℂ { x // x ∈ elementalStarAlgebra ℂ a })
hz : ↑φ { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) } ∈ spectrum ℂ a
⊢ ∃ a_1,
    characterSpaceToSpectrum a a_1 =
      { val := ↑φ { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }, property := hz }
[PROOFSTEP]
exact ⟨φ, rfl⟩