Theorem: Subgroup.mem_iSup_of_directed
File: Mathlib/Algebra/Group/Subgroup/Basic.lean

tactic: refine ⟨?_, fun ⟨i, hi⟩ ↦ le_iSup K i hi⟩
state_before: G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝³ : Group G
inst✝² : Group G'
inst✝¹ : Group G''
A : Type u_4
inst✝ : AddGroup A
H K✝ : Subgroup G
k : Set G
ι : Sort u_5
hι : Nonempty ι
K : ι → Subgroup G
hK : Directed (fun x x_1 => x ≤ x_1) K
x : G
⊢ x ∈ iSup K ↔ ∃ i, x ∈ K i
state_after: G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝³ : Group G
inst✝² : Group G'
inst✝¹ : Group G''
A : Type u_4
inst✝ : AddGroup A
H K✝ : Subgroup G
k : Set G
ι : Sort u_5
hι : Nonempty ι
K : ι → Subgroup G
hK : Directed (fun x x_1 => x ≤ x_1) K
x : G
⊢ x ∈ iSup K → ∃ i, x ∈ K i

tactic: suffices x ∈ closure (⋃ i, (K i : Set G)) → ∃ i, x ∈ K i by
  simpa only [closure_iUnion, closure_eq (K _)] using this
state_before: G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝³ : Group G
inst✝² : Group G'
inst✝¹ : Group G''
A : Type u_4
inst✝ : AddGroup A
H K✝ : Subgroup G
k : Set G
ι : Sort u_5
hι : Nonempty ι
K : ι → Subgroup G
hK : Directed (fun x x_1 => x ≤ x_1) K
x : G
⊢ x ∈ iSup K → ∃ i, x ∈ K i
state_after: G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝³ : Group G
inst✝² : Group G'
inst✝¹ : Group G''
A : Type u_4
inst✝ : AddGroup A
H K✝ : Subgroup G
k : Set G
ι : Sort u_5
hι : Nonempty ι
K : ι → Subgroup G
hK : Directed (fun x x_1 => x ≤ x_1) K
x : G
⊢ x ∈ closure (⋃ i, ↑(K i)) → ∃ i, x ∈ K i

tactic: refine fun hx ↦ closure_induction hx (fun _ ↦ mem_iUnion.1) ?_ ?_ ?_
state_before: G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝³ : Group G
inst✝² : Group G'
inst✝¹ : Group G''
A : Type u_4
inst✝ : AddGroup A
H K✝ : Subgroup G
k : Set G
ι : Sort u_5
hι : Nonempty ι
K : ι → Subgroup G
hK : Directed (fun x x_1 => x ≤ x_1) K
x : G
⊢ x ∈ closure (⋃ i, ↑(K i)) → ∃ i, x ∈ K i
state_after: case refine_1
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝³ : Group G
inst✝² : Group G'
inst✝¹ : Group G''
A : Type u_4
inst✝ : AddGroup A
H K✝ : Subgroup G
k : Set G
ι : Sort u_5
hι : Nonempty ι
K : ι → Subgroup G
hK : Directed (fun x x_1 => x ≤ x_1) K
x : G
hx : x ∈ closure (⋃ i, ↑(K i))
⊢ ∃ i, 1 ∈ K i

case refine_2
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝³ : Group G
inst✝² : Group G'
inst✝¹ : Group G''
A : Type u_4
inst✝ : AddGroup A
H K✝ : Subgroup G
k : Set G
ι : Sort u_5
hι : Nonempty ι
K : ι → Subgroup G
hK : Directed (fun x x_1 => x ≤ x_1) K
x : G
hx : x ∈ closure (⋃ i, ↑(K i))
⊢ ∀ (x y : G), (∃ i, x ∈ K i) → (∃ i, y ∈ K i) → ∃ i, x * y ∈ K i

case refine_3
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝³ : Group G
inst✝² : Group G'
inst✝¹ : Group G''
A : Type u_4
inst✝ : AddGroup A
H K✝ : Subgroup G
k : Set G
ι : Sort u_5
hι : Nonempty ι
K : ι → Subgroup G
hK : Directed (fun x x_1 => x ≤ x_1) K
x : G
hx : x ∈ closure (⋃ i, ↑(K i))
⊢ ∀ (x : G), (∃ i, x ∈ K i) → ∃ i, x⁻¹ ∈ K i

tactic: simpa only [closure_iUnion, closure_eq (K _)] using this
state_before: G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝³ : Group G
inst✝² : Group G'
inst✝¹ : Group G''
A : Type u_4
inst✝ : AddGroup A
H K✝ : Subgroup G
k : Set G
ι : Sort u_5
hι : Nonempty ι
K : ι → Subgroup G
hK : Directed (fun x x_1 => x ≤ x_1) K
x : G
this : x ∈ closure (⋃ i, ↑(K i)) → ∃ i, x ∈ K i
⊢ x ∈ iSup K → ∃ i, x ∈ K i
state_after: no goals

tactic: exact hι.elim fun i ↦ ⟨i, (K i).one_mem⟩
state_before: case refine_1
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝³ : Group G
inst✝² : Group G'
inst✝¹ : Group G''
A : Type u_4
inst✝ : AddGroup A
H K✝ : Subgroup G
k : Set G
ι : Sort u_5
hι : Nonempty ι
K : ι → Subgroup G
hK : Directed (fun x x_1 => x ≤ x_1) K
x : G
hx : x ∈ closure (⋃ i, ↑(K i))
⊢ ∃ i, 1 ∈ K i
state_after: no goals

tactic: rintro x y ⟨i, hi⟩ ⟨j, hj⟩
state_before: case refine_2
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝³ : Group G
inst✝² : Group G'
inst✝¹ : Group G''
A : Type u_4
inst✝ : AddGroup A
H K✝ : Subgroup G
k : Set G
ι : Sort u_5
hι : Nonempty ι
K : ι → Subgroup G
hK : Directed (fun x x_1 => x ≤ x_1) K
x : G
hx : x ∈ closure (⋃ i, ↑(K i))
⊢ ∀ (x y : G), (∃ i, x ∈ K i) → (∃ i, y ∈ K i) → ∃ i, x * y ∈ K i
state_after: case refine_2.intro.intro
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝³ : Group G
inst✝² : Group G'
inst✝¹ : Group G''
A : Type u_4
inst✝ : AddGroup A
H K✝ : Subgroup G
k : Set G
ι : Sort u_5
hι : Nonempty ι
K : ι → Subgroup G
hK : Directed (fun x x_1 => x ≤ x_1) K
x✝ : G
hx : x✝ ∈ closure (⋃ i, ↑(K i))
x y : G
i : ι
hi : x ∈ K i
j : ι
hj : y ∈ K j
⊢ ∃ i, x * y ∈ K i

tactic: rcases hK i j with ⟨k, hki, hkj⟩
state_before: case refine_2.intro.intro
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝³ : Group G
inst✝² : Group G'
inst✝¹ : Group G''
A : Type u_4
inst✝ : AddGroup A
H K✝ : Subgroup G
k : Set G
ι : Sort u_5
hι : Nonempty ι
K : ι → Subgroup G
hK : Directed (fun x x_1 => x ≤ x_1) K
x✝ : G
hx : x✝ ∈ closure (⋃ i, ↑(K i))
x y : G
i : ι
hi : x ∈ K i
j : ι
hj : y ∈ K j
⊢ ∃ i, x * y ∈ K i
state_after: case refine_2.intro.intro.intro.intro
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝³ : Group G
inst✝² : Group G'
inst✝¹ : Group G''
A : Type u_4
inst✝ : AddGroup A
H K✝ : Subgroup G
k✝ : Set G
ι : Sort u_5
hι : Nonempty ι
K : ι → Subgroup G
hK : Directed (fun x x_1 => x ≤ x_1) K
x✝ : G
hx : x✝ ∈ closure (⋃ i, ↑(K i))
x y : G
i : ι
hi : x ∈ K i
j : ι
hj : y ∈ K j
k : ι
hki : K i ≤ K k
hkj : K j ≤ K k
⊢ ∃ i, x * y ∈ K i

tactic: exact ⟨k, mul_mem (hki hi) (hkj hj)⟩
state_before: case refine_2.intro.intro.intro.intro
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝³ : Group G
inst✝² : Group G'
inst✝¹ : Group G''
A : Type u_4
inst✝ : AddGroup A
H K✝ : Subgroup G
k✝ : Set G
ι : Sort u_5
hι : Nonempty ι
K : ι → Subgroup G
hK : Directed (fun x x_1 => x ≤ x_1) K
x✝ : G
hx : x✝ ∈ closure (⋃ i, ↑(K i))
x y : G
i : ι
hi : x ∈ K i
j : ι
hj : y ∈ K j
k : ι
hki : K i ≤ K k
hkj : K j ≤ K k
⊢ ∃ i, x * y ∈ K i
state_after: no goals

tactic: rintro _ ⟨i, hi⟩
state_before: case refine_3
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝³ : Group G
inst✝² : Group G'
inst✝¹ : Group G''
A : Type u_4
inst✝ : AddGroup A
H K✝ : Subgroup G
k : Set G
ι : Sort u_5
hι : Nonempty ι
K : ι → Subgroup G
hK : Directed (fun x x_1 => x ≤ x_1) K
x : G
hx : x ∈ closure (⋃ i, ↑(K i))
⊢ ∀ (x : G), (∃ i, x ∈ K i) → ∃ i, x⁻¹ ∈ K i
state_after: case refine_3.intro
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝³ : Group G
inst✝² : Group G'
inst✝¹ : Group G''
A : Type u_4
inst✝ : AddGroup A
H K✝ : Subgroup G
k : Set G
ι : Sort u_5
hι : Nonempty ι
K : ι → Subgroup G
hK : Directed (fun x x_1 => x ≤ x_1) K
x : G
hx : x ∈ closure (⋃ i, ↑(K i))
x✝ : G
i : ι
hi : x✝ ∈ K i
⊢ ∃ i, x✝⁻¹ ∈ K i

tactic: exact ⟨i, inv_mem hi⟩
state_before: case refine_3.intro
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝³ : Group G
inst✝² : Group G'
inst✝¹ : Group G''
A : Type u_4
inst✝ : AddGroup A
H K✝ : Subgroup G
k : Set G
ι : Sort u_5
hι : Nonempty ι
K : ι → Subgroup G
hK : Directed (fun x x_1 => x ≤ x_1) K
x : G
hx : x ∈ closure (⋃ i, ↑(K i))
x✝ : G
i : ι
hi : x✝ ∈ K i
⊢ ∃ i, x✝⁻¹ ∈ K i
state_after: no goals