Theorem: DirectSum.isInternal_biSup_submodule_of_independent
File: Mathlib/Algebra/DirectSum/Module.lean

tactic: refine (isInternal_submodule_iff_independent_and_iSup_eq_top _).mpr ⟨?_, by simp [iSup_subtype]⟩
state_before: 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
s : Set ι
h : CompleteLattice.Independent fun i => A ↑i
⊢ IsInternal fun i => Submodule.comap (⨆ i ∈ s, A i).subtype (A ↑i)
state_after: 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
s : Set ι
h : CompleteLattice.Independent fun i => A ↑i
⊢ CompleteLattice.Independent fun i => Submodule.comap (⨆ i ∈ s, A i).subtype (A ↑i)

tactic: let p := ⨆ i ∈ s, A i
state_before: 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
s : Set ι
h : CompleteLattice.Independent fun i => A ↑i
⊢ CompleteLattice.Independent fun i => Submodule.comap (⨆ i ∈ s, A i).subtype (A ↑i)
state_after: 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
s : Set ι
h : CompleteLattice.Independent fun i => A ↑i
p : Submodule R M := ⨆ i ∈ s, A i
⊢ CompleteLattice.Independent fun i => Submodule.comap (⨆ i ∈ s, A i).subtype (A ↑i)

tactic: have hp : ∀ i ∈ s, A i ≤ p := fun i hi ↦ le_biSup A hi
state_before: 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
s : Set ι
h : CompleteLattice.Independent fun i => A ↑i
p : Submodule R M := ⨆ i ∈ s, A i
⊢ CompleteLattice.Independent fun i => Submodule.comap (⨆ i ∈ s, A i).subtype (A ↑i)
state_after: 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
s : Set ι
h : CompleteLattice.Independent fun i => A ↑i
p : Submodule R M := ⨆ i ∈ s, A i
hp : ∀ i ∈ s, A i ≤ p
⊢ CompleteLattice.Independent fun i => Submodule.comap (⨆ i ∈ s, A i).subtype (A ↑i)

tactic: let e : Submodule R p ≃o Set.Iic p := p.mapIic
state_before: 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
s : Set ι
h : CompleteLattice.Independent fun i => A ↑i
p : Submodule R M := ⨆ i ∈ s, A i
hp : ∀ i ∈ s, A i ≤ p
⊢ CompleteLattice.Independent fun i => Submodule.comap (⨆ i ∈ s, A i).subtype (A ↑i)
state_after: 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
s : Set ι
h : CompleteLattice.Independent fun i => A ↑i
p : Submodule R M := ⨆ i ∈ s, A i
hp : ∀ i ∈ s, A i ≤ p
e : Submodule R ↥p ≃o ↑(Set.Iic p) := p.mapIic
⊢ CompleteLattice.Independent fun i => Submodule.comap (⨆ i ∈ s, A i).subtype (A ↑i)

tactic: suffices (e ∘ fun i : s ↦ (A i).comap p.subtype) = fun i ↦ ⟨A i, hp i i.property⟩ by
  rw [← CompleteLattice.independent_map_orderIso_iff e, this]
  exact CompleteLattice.independent_of_independent_coe_Iic_comp h
state_before: 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
s : Set ι
h : CompleteLattice.Independent fun i => A ↑i
p : Submodule R M := ⨆ i ∈ s, A i
hp : ∀ i ∈ s, A i ≤ p
e : Submodule R ↥p ≃o ↑(Set.Iic p) := p.mapIic
⊢ CompleteLattice.Independent fun i => Submodule.comap (⨆ i ∈ s, A i).subtype (A ↑i)
state_after: 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
s : Set ι
h : CompleteLattice.Independent fun i => A ↑i
p : Submodule R M := ⨆ i ∈ s, A i
hp : ∀ i ∈ s, A i ≤ p
e : Submodule R ↥p ≃o ↑(Set.Iic p) := p.mapIic
⊢ (⇑e ∘ fun i => Submodule.comap p.subtype (A ↑i)) = fun i => ⟨A ↑i, ⋯⟩

tactic: ext i m
state_before: 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
s : Set ι
h : CompleteLattice.Independent fun i => A ↑i
p : Submodule R M := ⨆ i ∈ s, A i
hp : ∀ i ∈ s, A i ≤ p
e : Submodule R ↥p ≃o ↑(Set.Iic p) := p.mapIic
⊢ (⇑e ∘ fun i => Submodule.comap p.subtype (A ↑i)) = fun i => ⟨A ↑i, ⋯⟩
state_after: case h.a.h
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
s : Set ι
h : CompleteLattice.Independent fun i => A ↑i
p : Submodule R M := ⨆ i ∈ s, A i
hp : ∀ i ∈ s, A i ≤ p
e : Submodule R ↥p ≃o ↑(Set.Iic p) := p.mapIic
i : ↑s
m : M
⊢ m ∈ ↑((⇑e ∘ fun i => Submodule.comap p.subtype (A ↑i)) i) ↔ m ∈ ↑⟨A ↑i, ⋯⟩

tactic: change m ∈ ((A i).comap p.subtype).map p.subtype ↔ _
state_before: case h.a.h
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
s : Set ι
h : CompleteLattice.Independent fun i => A ↑i
p : Submodule R M := ⨆ i ∈ s, A i
hp : ∀ i ∈ s, A i ≤ p
e : Submodule R ↥p ≃o ↑(Set.Iic p) := p.mapIic
i : ↑s
m : M
⊢ m ∈ ↑((⇑e ∘ fun i => Submodule.comap p.subtype (A ↑i)) i) ↔ m ∈ ↑⟨A ↑i, ⋯⟩
state_after: case h.a.h
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
s : Set ι
h : CompleteLattice.Independent fun i => A ↑i
p : Submodule R M := ⨆ i ∈ s, A i
hp : ∀ i ∈ s, A i ≤ p
e : Submodule R ↥p ≃o ↑(Set.Iic p) := p.mapIic
i : ↑s
m : M
⊢ m ∈ Submodule.map p.subtype (Submodule.comap p.subtype (A ↑i)) ↔ m ∈ ↑⟨A ↑i, ⋯⟩

tactic: rw [Submodule.map_comap_subtype, inf_of_le_right (hp i i.property)]
state_before: case h.a.h
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
s : Set ι
h : CompleteLattice.Independent fun i => A ↑i
p : Submodule R M := ⨆ i ∈ s, A i
hp : ∀ i ∈ s, A i ≤ p
e : Submodule R ↥p ≃o ↑(Set.Iic p) := p.mapIic
i : ↑s
m : M
⊢ m ∈ Submodule.map p.subtype (Submodule.comap p.subtype (A ↑i)) ↔ m ∈ ↑⟨A ↑i, ⋯⟩
state_after: no goals

tactic: simp [iSup_subtype]
state_before: 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
s : Set ι
h : CompleteLattice.Independent fun i => A ↑i
⊢ ⨆ i, Submodule.comap (⨆ i ∈ s, A i).subtype (A ↑i) = ⊤
state_after: no goals

tactic: rw [← CompleteLattice.independent_map_orderIso_iff e, this]
state_before: 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
s : Set ι
h : CompleteLattice.Independent fun i => A ↑i
p : Submodule R M := ⨆ i ∈ s, A i
hp : ∀ i ∈ s, A i ≤ p
e : Submodule R ↥p ≃o ↑(Set.Iic p) := p.mapIic
this : (⇑e ∘ fun i => Submodule.comap p.subtype (A ↑i)) = fun i => ⟨A ↑i, ⋯⟩
⊢ CompleteLattice.Independent fun i => Submodule.comap (⨆ i ∈ s, A i).subtype (A ↑i)
state_after: 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
s : Set ι
h : CompleteLattice.Independent fun i => A ↑i
p : Submodule R M := ⨆ i ∈ s, A i
hp : ∀ i ∈ s, A i ≤ p
e : Submodule R ↥p ≃o ↑(Set.Iic p) := p.mapIic
this : (⇑e ∘ fun i => Submodule.comap p.subtype (A ↑i)) = fun i => ⟨A ↑i, ⋯⟩
⊢ CompleteLattice.Independent fun i => ⟨A ↑i, ⋯⟩

tactic: exact CompleteLattice.independent_of_independent_coe_Iic_comp h
state_before: 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
s : Set ι
h : CompleteLattice.Independent fun i => A ↑i
p : Submodule R M := ⨆ i ∈ s, A i
hp : ∀ i ∈ s, A i ≤ p
e : Submodule R ↥p ≃o ↑(Set.Iic p) := p.mapIic
this : (⇑e ∘ fun i => Submodule.comap p.subtype (A ↑i)) = fun i => ⟨A ↑i, ⋯⟩
⊢ CompleteLattice.Independent fun i => ⟨A ↑i, ⋯⟩
state_after: no goals