-- Mathlib/Algebra/Group/Subgroup/Finite.lean
theorem pi_mem_of_mulSingle_mem_aux [DecidableEq η] (I : Finset η) {H : Subgroup (∀ i, f i)}
    (x : ∀ i, f i) (h1 : ∀ i, i ∉ I → x i = 1) (h2 : ∀ i, i ∈ I → Pi.mulSingle i (x i) ∈ H) :
    x ∈ H

Proof state:
case pos
η : Type u_3
f : η → Type u_4
inst✝¹ : (i : η) → Group (f i)
inst✝ : DecidableEq η
H : Subgroup ((i : η) → f i)
i : η
I : Finset η
hnmem : i ∉ I
x : (i : η) → f i
h1 : ∀ i_1 ∉ insert i I, x i_1 = 1
h2 : ∀ i_1 ∈ insert i I, Pi.mulSingle i_1 (x i_1) ∈ H
j : η
hj : j ∉ I
heq : j = i
⊢ Function.update x i 1 j = 1

Tactic:
subst heq

Result:
case pos
η : Type u_3
f : η → Type u_4
inst✝¹ : (i : η) → Group (f i)
inst✝ : DecidableEq η
H : Subgroup ((i : η) → f i)
I : Finset η
x : (i : η) → f i
j : η
hj hnmem : j ∉ I
h1 : ∀ i ∉ insert j I, x i = 1
h2 : ∀ i ∈ insert j I, Pi.mulSingle i (x i) ∈ H
⊢ Function.update x j 1 j = 1

Proof state:
case insert.a.h2
η : Type u_3
f : η → Type u_4
inst✝¹ : (i : η) → Group (f i)
inst✝ : DecidableEq η
H : Subgroup ((i : η) → f i)
i : η
I : Finset η
hnmem : i ∉ I
x : (i : η) → f i
h1 : ∀ i_1 ∉ insert i I, x i_1 = 1
h2 : ∀ i_1 ∈ insert i I, Pi.mulSingle i_1 (x i_1) ∈ H
j : η
hj : j ∈ I
this : j ≠ i
⊢ Pi.mulSingle j (x j) ∈ H

Tactic:
exact h2 _ (Finset.mem_insert_of_mem hj)

Result:
no goals

Proof state:
case insert.a.h2
η : Type u_3
f : η → Type u_4
inst✝¹ : (i : η) → Group (f i)
inst✝ : DecidableEq η
H : Subgroup ((i : η) → f i)
i : η
I : Finset η
hnmem : i ∉ I
x : (i : η) → f i
h1 : ∀ i_1 ∉ insert i I, x i_1 = 1
h2 : ∀ i_1 ∈ insert i I, Pi.mulSingle i_1 (x i_1) ∈ H
j : η
hj : j ∈ I
⊢ Pi.mulSingle j (Function.update x i 1 j) ∈ H

Tactic:
have : j ≠ i := by
  rintro rfl
  contradiction

Result:
case insert.a.h2
η : Type u_3
f : η → Type u_4
inst✝¹ : (i : η) → Group (f i)
inst✝ : DecidableEq η
H : Subgroup ((i : η) → f i)
i : η
I : Finset η
hnmem : i ∉ I
x : (i : η) → f i
h1 : ∀ i_1 ∉ insert i I, x i_1 = 1
h2 : ∀ i_1 ∈ insert i I, Pi.mulSingle i_1 (x i_1) ∈ H
j : η
hj : j ∈ I
this : j ≠ i
⊢ Pi.mulSingle j (Function.update x i 1 j) ∈ H

Proof state:
case insert
η : Type u_3
f : η → Type u_4
inst✝¹ : (i : η) → Group (f i)
inst✝ : DecidableEq η
H : Subgroup ((i : η) → f i)
i : η
I : Finset η
hnmem : i ∉ I
ih : ∀ (x : (i : η) → f i), (∀ i ∉ I, x i = 1) → (∀ i ∈ I, Pi.mulSingle i (x i) ∈ H) → x ∈ H
x : (i : η) → f i
h1 : ∀ i_1 ∉ insert i I, x i_1 = 1
h2 : ∀ i_1 ∈ insert i I, Pi.mulSingle i_1 (x i_1) ∈ H
this : x = Function.update x i 1 * Pi.mulSingle i (x i)
⊢ x ∈ H

Tactic:
rw [this]

Result:
case insert
η : Type u_3
f : η → Type u_4
inst✝¹ : (i : η) → Group (f i)
inst✝ : DecidableEq η
H : Subgroup ((i : η) → f i)
i : η
I : Finset η
hnmem : i ∉ I
ih : ∀ (x : (i : η) → f i), (∀ i ∉ I, x i = 1) → (∀ i ∈ I, Pi.mulSingle i (x i) ∈ H) → x ∈ H
x : (i : η) → f i
h1 : ∀ i_1 ∉ insert i I, x i_1 = 1
h2 : ∀ i_1 ∈ insert i I, Pi.mulSingle i_1 (x i_1) ∈ H
this : x = Function.update x i 1 * Pi.mulSingle i (x i)
⊢ Function.update x i 1 * Pi.mulSingle i (x i) ∈ H

Proof state:
case pos
η : Type u_3
f : η → Type u_4
inst✝¹ : (i : η) → Group (f i)
inst✝ : DecidableEq η
H : Subgroup ((i : η) → f i)
i : η
I : Finset η
hnmem : i ∉ I
ih : ∀ (x : (i : η) → f i), (∀ i ∉ I, x i = 1) → (∀ i ∈ I, Pi.mulSingle i (x i) ∈ H) → x ∈ H
x : (i : η) → f i
h1 : ∀ i_1 ∉ insert i I, x i_1 = 1
h2 : ∀ i_1 ∈ insert i I, Pi.mulSingle i_1 (x i_1) ∈ H
j : η
heq : j = i
⊢ x j = (Function.update x i 1 * Pi.mulSingle i (x i)) j

Tactic:
subst heq

Result:
case pos
η : Type u_3
f : η → Type u_4
inst✝¹ : (i : η) → Group (f i)
inst✝ : DecidableEq η
H : Subgroup ((i : η) → f i)
I : Finset η
ih : ∀ (x : (i : η) → f i), (∀ i ∉ I, x i = 1) → (∀ i ∈ I, Pi.mulSingle i (x i) ∈ H) → x ∈ H
x : (i : η) → f i
j : η
hnmem : j ∉ I
h1 : ∀ i ∉ insert j I, x i = 1
h2 : ∀ i ∈ insert j I, Pi.mulSingle i (x i) ∈ H
⊢ x j = (Function.update x j 1 * Pi.mulSingle j (x j)) j

Proof state:
case insert
η : Type u_3
f : η → Type u_4
inst✝¹ : (i : η) → Group (f i)
inst✝ : DecidableEq η
H : Subgroup ((i : η) → f i)
a✝ : η
s✝ : Finset η
hnmem : a✝ ∉ s✝
ih : ∀ (x : (i : η) → f i), (∀ i ∉ s✝, x i = 1) → (∀ i ∈ s✝, Pi.mulSingle i (x i) ∈ H) → x ∈ H
x : (i : η) → f i
h1 : ∀ i ∉ insert a✝ s✝, x i = 1
h2 : ∀ i ∈ insert a✝ s✝, Pi.mulSingle i (x i) ∈ H
⊢ x ∈ H

Tactic:
rename_i i I

Result:
case insert
η : Type u_3
f : η → Type u_4
inst✝¹ : (i : η) → Group (f i)
inst✝ : DecidableEq η
H : Subgroup ((i : η) → f i)
i : η
I : Finset η
hnmem : i ∉ I
ih : ∀ (x : (i : η) → f i), (∀ i ∉ I, x i = 1) → (∀ i ∈ I, Pi.mulSingle i (x i) ∈ H) → x ∈ H
x : (i : η) → f i
h1 : ∀ i_1 ∉ insert i I, x i_1 = 1
h2 : ∀ i_1 ∈ insert i I, Pi.mulSingle i_1 (x i_1) ∈ H
⊢ x ∈ H

Proof state:
case pos
η : Type u_3
f : η → Type u_4
inst✝¹ : (i : η) → Group (f i)
inst✝ : DecidableEq η
H : Subgroup ((i : η) → f i)
I : Finset η
ih : ∀ (x : (i : η) → f i), (∀ i ∉ I, x i = 1) → (∀ i ∈ I, Pi.mulSingle i (x i) ∈ H) → x ∈ H
x : (i : η) → f i
j : η
hnmem : j ∉ I
h1 : ∀ i ∉ insert j I, x i = 1
h2 : ∀ i ∈ insert j I, Pi.mulSingle i (x i) ∈ H
⊢ x j = (Function.update x j 1 * Pi.mulSingle j (x j)) j

Tactic:
simp

Result:
no goals

Proof state:
case neg
η : Type u_3
f : η → Type u_4
inst✝¹ : (i : η) → Group (f i)
inst✝ : DecidableEq η
H : Subgroup ((i : η) → f i)
i : η
I : Finset η
hnmem : i ∉ I
ih : ∀ (x : (i : η) → f i), (∀ i ∉ I, x i = 1) → (∀ i ∈ I, Pi.mulSingle i (x i) ∈ H) → x ∈ H
x : (i : η) → f i
h1 : ∀ i_1 ∉ insert i I, x i_1 = 1
h2 : ∀ i_1 ∈ insert i I, Pi.mulSingle i_1 (x i_1) ∈ H
j : η
heq : ¬j = i
⊢ x j = (Function.update x i 1 * Pi.mulSingle i (x i)) j

Tactic:
simp [heq]

Result:
no goals

Proof state:
case insert.a
η : Type u_3
f : η → Type u_4
inst✝¹ : (i : η) → Group (f i)
inst✝ : DecidableEq η
H : Subgroup ((i : η) → f i)
i : η
I : Finset η
hnmem : i ∉ I
ih : ∀ (x : (i : η) → f i), (∀ i ∉ I, x i = 1) → (∀ i ∈ I, Pi.mulSingle i (x i) ∈ H) → x ∈ H
x : (i : η) → f i
h1 : ∀ i_1 ∉ insert i I, x i_1 = 1
h2 : ∀ i_1 ∈ insert i I, Pi.mulSingle i_1 (x i_1) ∈ H
⊢ Pi.mulSingle i (x i) ∈ H

Tactic:
apply h2

Result:
case insert.a.a
η : Type u_3
f : η → Type u_4
inst✝¹ : (i : η) → Group (f i)
inst✝ : DecidableEq η
H : Subgroup ((i : η) → f i)
i : η
I : Finset η
hnmem : i ∉ I
ih : ∀ (x : (i : η) → f i), (∀ i ∉ I, x i = 1) → (∀ i ∈ I, Pi.mulSingle i (x i) ∈ H) → x ∈ H
x : (i : η) → f i
h1 : ∀ i_1 ∉ insert i I, x i_1 = 1
h2 : ∀ i_1 ∈ insert i I, Pi.mulSingle i_1 (x i_1) ∈ H
⊢ i ∈ insert i I

Proof state:
case insert
η : Type u_3
f : η → Type u_4
inst✝¹ : (i : η) → Group (f i)
inst✝ : DecidableEq η
H : Subgroup ((i : η) → f i)
i : η
I : Finset η
hnmem : i ∉ I
ih : ∀ (x : (i : η) → f i), (∀ i ∉ I, x i = 1) → (∀ i ∈ I, Pi.mulSingle i (x i) ∈ H) → x ∈ H
x : (i : η) → f i
h1 : ∀ i_1 ∉ insert i I, x i_1 = 1
h2 : ∀ i_1 ∈ insert i I, Pi.mulSingle i_1 (x i_1) ∈ H
⊢ Function.update x i 1 * Pi.mulSingle i (x i) ∈ H

Tactic:
apply mul_mem

Result:
case insert.a
η : Type u_3
f : η → Type u_4
inst✝¹ : (i : η) → Group (f i)
inst✝ : DecidableEq η
H : Subgroup ((i : η) → f i)
i : η
I : Finset η
hnmem : i ∉ I
ih : ∀ (x : (i : η) → f i), (∀ i ∉ I, x i = 1) → (∀ i ∈ I, Pi.mulSingle i (x i) ∈ H) → x ∈ H
x : (i : η) → f i
h1 : ∀ i_1 ∉ insert i I, x i_1 = 1
h2 : ∀ i_1 ∈ insert i I, Pi.mulSingle i_1 (x i_1) ∈ H
⊢ Function.update x i 1 ∈ H

case insert.a
η : Type u_3
f : η → Type u_4
inst✝¹ : (i : η) → Group (f i)
inst✝ : DecidableEq η
H : Subgroup ((i : η) → f i)
i : η
I : Finset η
hnmem : i ∉ I
ih : ∀ (x : (i : η) → f i), (∀ i ∉ I, x i = 1) → (∀ i ∈ I, Pi.mulSingle i (x i) ∈ H) → x ∈ H
x : (i : η) → f i
h1 : ∀ i_1 ∉ insert i I, x i_1 = 1
h2 : ∀ i_1 ∈ insert i I, Pi.mulSingle i_1 (x i_1) ∈ H
⊢ Pi.mulSingle i (x i) ∈ H

Proof state:
case h
η : Type u_3
f : η → Type u_4
inst✝¹ : (i : η) → Group (f i)
inst✝ : DecidableEq η
H : Subgroup ((i : η) → f i)
x : (i : η) → f i
h1 : ∀ i ∉ ∅, x i = 1
h2 : ∀ i ∈ ∅, Pi.mulSingle i (x i) ∈ H
i : η
⊢ x i = 1 i

Tactic:
exact h1 i (Finset.not_mem_empty i)

Result:
no goals