l3lab/ntp-mathlib huggingface dataset:
/-- `Finset.noncommProd` is “injective” in `f` if `f` maps into independent subgroups.  This
generalizes (one direction of) `Subgroup.disjoint_iff_mul_eq_one`. -/
@[to_additive "`Finset.noncommSum` is “injective” in `f` if `f` maps into independent subgroups.
This generalizes (one direction of) `AddSubgroup.disjoint_iff_add_eq_zero`. "]
theorem eq_one_of_noncommProd_eq_one_of_independent {ι : Type*} (s : Finset ι) (f : ι → G) (comm)
    (K : ι → Subgroup G) (hind : CompleteLattice.Independent K) (hmem : ∀ x ∈ s, f x ∈ K x)
    (heq1 : s.noncommProd f comm = 1) : ∀ i ∈ s, f i = 1 := by
  classical
    revert heq1
    induction' s using Finset.induction_on with i s hnmem ih
    · simp
    · have hcomm := comm.mono (Finset.coe_subset.2 <| Finset.subset_insert _ _)
      simp only [Finset.forall_mem_insert] at hmem
      

Proof state:
case insert
G : Type u_1
inst✝ : Group G
ι : Type u_2
f : ι → G
K : ι → Subgroup G
hind : CompleteLattice.Independent K
i : ι
s : Finset ι
hnmem : i ∉ s
ih :
  ∀ (comm : Set.Pairwise ↑s fun a b => Commute (f a) (f b)),
    (∀ x ∈ s, f x ∈ K x) → Finset.noncommProd s f comm = 1 → ∀ i ∈ s, f i = 1
comm : Set.Pairwise ↑(insert i s) fun a b => Commute (f a) (f b)
hcomm : Set.Pairwise ↑s fun a b => Commute (f a) (f b)
hmem : f i ∈ K i ∧ ∀ x ∈ s, f x ∈ K x
⊢ Finset.noncommProd (insert i s) f comm = 1 → ∀ i_1 ∈ insert i s, f i_1 = 1

Next tactic:
have hmem_bsupr : s.noncommProd f hcomm ∈ ⨆ i ∈ (s : Set ι), K i := by
        refine' Subgroup.noncommProd_mem _ _ _
        intro x hx
        have : K x ≤ ⨆ i ∈ (s : Set ι), K i := le_iSup₂ (f := fun i _ => K i) x hx
        exact this (hmem.2 x hx)
/-- `Finset.noncommProd` is “injective” in `f` if `f` maps into independent subgroups.  This
generalizes (one direction of) `Subgroup.disjoint_iff_mul_eq_one`. -/
@[to_additive "`Finset.noncommSum` is “injective” in `f` if `f` maps into independent subgroups.
This generalizes (one direction of) `AddSubgroup.disjoint_iff_add_eq_zero`. "]
theorem eq_one_of_noncommProd_eq_one_of_independent {ι : Type*} (s : Finset ι) (f : ι → G) (comm)
    (K : ι → Subgroup G) (hind : CompleteLattice.Independent K) (hmem : ∀ x ∈ s, f x ∈ K x)
    (heq1 : s.noncommProd f comm = 1) : ∀ i ∈ s, f i = 1 := by
  classical
    revert heq1
    induction' s using Finset.induction_on with i s hnmem ih
    · simp
    · have hcomm := comm.mono (Finset.coe_subset.2 <| Finset.subset_insert _ _)
      simp only [Finset.forall_mem_insert] at hmem
      have hmem_bsupr : s.noncommProd f hcomm ∈ ⨆ i ∈ (s : Set ι), K i := by
        

Proof state:
G : Type u_1
inst✝ : Group G
ι : Type u_2
f : ι → G
K : ι → Subgroup G
hind : CompleteLattice.Independent K
i : ι
s : Finset ι
hnmem : i ∉ s
ih :
  ∀ (comm : Set.Pairwise ↑s fun a b => Commute (f a) (f b)),
    (∀ x ∈ s, f x ∈ K x) → Finset.noncommProd s f comm = 1 → ∀ i ∈ s, f i = 1
comm : Set.Pairwise ↑(insert i s) fun a b => Commute (f a) (f b)
hcomm : Set.Pairwise ↑s fun a b => Commute (f a) (f b)
hmem : f i ∈ K i ∧ ∀ x ∈ s, f x ∈ K x
⊢ Finset.noncommProd s f hcomm ∈ ⨆ i ∈ ↑s, K i

Next tactic:
refine' Subgroup.noncommProd_mem _ _ _
/-- `Finset.noncommProd` is “injective” in `f` if `f` maps into independent subgroups.  This
generalizes (one direction of) `Subgroup.disjoint_iff_mul_eq_one`. -/
@[to_additive "`Finset.noncommSum` is “injective” in `f` if `f` maps into independent subgroups.
This generalizes (one direction of) `AddSubgroup.disjoint_iff_add_eq_zero`. "]
theorem eq_one_of_noncommProd_eq_one_of_independent {ι : Type*} (s : Finset ι) (f : ι → G) (comm)
    (K : ι → Subgroup G) (hind : CompleteLattice.Independent K) (hmem : ∀ x ∈ s, f x ∈ K x)
    (heq1 : s.noncommProd f comm = 1) : ∀ i ∈ s, f i = 1 := by
  classical
    revert heq1
    induction' s using Finset.induction_on with i s hnmem ih
    · simp
    · have hcomm := comm.mono (Finset.coe_subset.2 <| Finset.subset_insert _ _)
      simp only [Finset.forall_mem_insert] at hmem
      have hmem_bsupr : s.noncommProd f hcomm ∈ ⨆ i ∈ (s : Set ι), K i := by
        refine' Subgroup.noncommProd_mem _ _ _
        

Proof state:
G : Type u_1
inst✝ : Group G
ι : Type u_2
f : ι → G
K : ι → Subgroup G
hind : CompleteLattice.Independent K
i : ι
s : Finset ι
hnmem : i ∉ s
ih :
  ∀ (comm : Set.Pairwise ↑s fun a b => Commute (f a) (f b)),
    (∀ x ∈ s, f x ∈ K x) → Finset.noncommProd s f comm = 1 → ∀ i ∈ s, f i = 1
comm : Set.Pairwise ↑(insert i s) fun a b => Commute (f a) (f b)
hcomm : Set.Pairwise ↑s fun a b => Commute (f a) (f b)
hmem : f i ∈ K i ∧ ∀ x ∈ s, f x ∈ K x
⊢ ∀ c ∈ s, f c ∈ ⨆ i ∈ ↑s, K i

Next tactic:
intro x hx
/-- `Finset.noncommProd` is “injective” in `f` if `f` maps into independent subgroups.  This
generalizes (one direction of) `Subgroup.disjoint_iff_mul_eq_one`. -/
@[to_additive "`Finset.noncommSum` is “injective” in `f` if `f` maps into independent subgroups.
This generalizes (one direction of) `AddSubgroup.disjoint_iff_add_eq_zero`. "]
theorem eq_one_of_noncommProd_eq_one_of_independent {ι : Type*} (s : Finset ι) (f : ι → G) (comm)
    (K : ι → Subgroup G) (hind : CompleteLattice.Independent K) (hmem : ∀ x ∈ s, f x ∈ K x)
    (heq1 : s.noncommProd f comm = 1) : ∀ i ∈ s, f i = 1 := by
  classical
    revert heq1
    induction' s using Finset.induction_on with i s hnmem ih
    · simp
    · have hcomm := comm.mono (Finset.coe_subset.2 <| Finset.subset_insert _ _)
      simp only [Finset.forall_mem_insert] at hmem
      have hmem_bsupr : s.noncommProd f hcomm ∈ ⨆ i ∈ (s : Set ι), K i := by
        refine' Subgroup.noncommProd_mem _ _ _
        intro x hx
        

Proof state:
G : Type u_1
inst✝ : Group G
ι : Type u_2
f : ι → G
K : ι → Subgroup G
hind : CompleteLattice.Independent K
i : ι
s : Finset ι
hnmem : i ∉ s
ih :
  ∀ (comm : Set.Pairwise ↑s fun a b => Commute (f a) (f b)),
    (∀ x ∈ s, f x ∈ K x) → Finset.noncommProd s f comm = 1 → ∀ i ∈ s, f i = 1
comm : Set.Pairwise ↑(insert i s) fun a b => Commute (f a) (f b)
hcomm : Set.Pairwise ↑s fun a b => Commute (f a) (f b)
hmem : f i ∈ K i ∧ ∀ x ∈ s, f x ∈ K x
x : ι
hx : x ∈ s
⊢ f x ∈ ⨆ i ∈ ↑s, K i

Next tactic:
have : K x ≤ ⨆ i ∈ (s : Set ι), K i := le_iSup₂ (f := fun i _ => K i) x hx
/-- `Finset.noncommProd` is “injective” in `f` if `f` maps into independent subgroups.  This
generalizes (one direction of) `Subgroup.disjoint_iff_mul_eq_one`. -/
@[to_additive "`Finset.noncommSum` is “injective” in `f` if `f` maps into independent subgroups.
This generalizes (one direction of) `AddSubgroup.disjoint_iff_add_eq_zero`. "]
theorem eq_one_of_noncommProd_eq_one_of_independent {ι : Type*} (s : Finset ι) (f : ι → G) (comm)
    (K : ι → Subgroup G) (hind : CompleteLattice.Independent K) (hmem : ∀ x ∈ s, f x ∈ K x)
    (heq1 : s.noncommProd f comm = 1) : ∀ i ∈ s, f i = 1 := by
  classical
    revert heq1
    induction' s using Finset.induction_on with i s hnmem ih
    · simp
    · have hcomm := comm.mono (Finset.coe_subset.2 <| Finset.subset_insert _ _)
      simp only [Finset.forall_mem_insert] at hmem
      have hmem_bsupr : s.noncommProd f hcomm ∈ ⨆ i ∈ (s : Set ι), K i := by
        refine' Subgroup.noncommProd_mem _ _ _
        intro x hx
        have : K x ≤ ⨆ i ∈ (s : Set ι), K i := le_iSup₂ (f := fun i _ => K i) x hx
        

Proof state:
G : Type u_1
inst✝ : Group G
ι : Type u_2
f : ι → G
K : ι → Subgroup G
hind : CompleteLattice.Independent K
i : ι
s : Finset ι
hnmem : i ∉ s
ih :
  ∀ (comm : Set.Pairwise ↑s fun a b => Commute (f a) (f b)),
    (∀ x ∈ s, f x ∈ K x) → Finset.noncommProd s f comm = 1 → ∀ i ∈ s, f i = 1
comm : Set.Pairwise ↑(insert i s) fun a b => Commute (f a) (f b)
hcomm : Set.Pairwise ↑s fun a b => Commute (f a) (f b)
hmem : f i ∈ K i ∧ ∀ x ∈ s, f x ∈ K x
x : ι
hx : x ∈ s
this : K x ≤ ⨆ i ∈ ↑s, K i
⊢ f x ∈ ⨆ i ∈ ↑s, K i

Next tactic:
exact this (hmem.2 x hx)
/-- `Finset.noncommProd` is “injective” in `f` if `f` maps into independent subgroups.  This
generalizes (one direction of) `Subgroup.disjoint_iff_mul_eq_one`. -/
@[to_additive "`Finset.noncommSum` is “injective” in `f` if `f` maps into independent subgroups.
This generalizes (one direction of) `AddSubgroup.disjoint_iff_add_eq_zero`. "]
theorem eq_one_of_noncommProd_eq_one_of_independent {ι : Type*} (s : Finset ι) (f : ι → G) (comm)
    (K : ι → Subgroup G) (hind : CompleteLattice.Independent K) (hmem : ∀ x ∈ s, f x ∈ K x)
    (heq1 : s.noncommProd f comm = 1) : ∀ i ∈ s, f i = 1 := by
  classical
    revert heq1
    induction' s using Finset.induction_on with i s hnmem ih
    · simp
    · have hcomm := comm.mono (Finset.coe_subset.2 <| Finset.subset_insert _ _)
      simp only [Finset.forall_mem_insert] at hmem
      have hmem_bsupr : s.noncommProd f hcomm ∈ ⨆ i ∈ (s : Set ι), K i := by
        refine' Subgroup.noncommProd_mem _ _ _
        intro x hx
        have : K x ≤ ⨆ i ∈ (s : Set ι), K i := le_iSup₂ (f := fun i _ => K i) x hx
        exact this (hmem.2 x hx)
      

Proof state:
case insert
G : Type u_1
inst✝ : Group G
ι : Type u_2
f : ι → G
K : ι → Subgroup G
hind : CompleteLattice.Independent K
i : ι
s : Finset ι
hnmem : i ∉ s
ih :
  ∀ (comm : Set.Pairwise ↑s fun a b => Commute (f a) (f b)),
    (∀ x ∈ s, f x ∈ K x) → Finset.noncommProd s f comm = 1 → ∀ i ∈ s, f i = 1
comm : Set.Pairwise ↑(insert i s) fun a b => Commute (f a) (f b)
hcomm : Set.Pairwise ↑s fun a b => Commute (f a) (f b)
hmem : f i ∈ K i ∧ ∀ x ∈ s, f x ∈ K x
hmem_bsupr : Finset.noncommProd s f hcomm ∈ ⨆ i ∈ ↑s, K i
⊢ Finset.noncommProd (insert i s) f comm = 1 → ∀ i_1 ∈ insert i s, f i_1 = 1

Next tactic:
intro heq1
/-- `Finset.noncommProd` is “injective” in `f` if `f` maps into independent subgroups.  This
generalizes (one direction of) `Subgroup.disjoint_iff_mul_eq_one`. -/
@[to_additive "`Finset.noncommSum` is “injective” in `f` if `f` maps into independent subgroups.
This generalizes (one direction of) `AddSubgroup.disjoint_iff_add_eq_zero`. "]
theorem eq_one_of_noncommProd_eq_one_of_independent {ι : Type*} (s : Finset ι) (f : ι → G) (comm)
    (K : ι → Subgroup G) (hind : CompleteLattice.Independent K) (hmem : ∀ x ∈ s, f x ∈ K x)
    (heq1 : s.noncommProd f comm = 1) : ∀ i ∈ s, f i = 1 := by
  classical
    revert heq1
    induction' s using Finset.induction_on with i s hnmem ih
    · simp
    · have hcomm := comm.mono (Finset.coe_subset.2 <| Finset.subset_insert _ _)
      simp only [Finset.forall_mem_insert] at hmem
      have hmem_bsupr : s.noncommProd f hcomm ∈ ⨆ i ∈ (s : Set ι), K i := by
        refine' Subgroup.noncommProd_mem _ _ _
        intro x hx
        have : K x ≤ ⨆ i ∈ (s : Set ι), K i := le_iSup₂ (f := fun i _ => K i) x hx
        exact this (hmem.2 x hx)
      intro heq1
      

Proof state:
case insert
G : Type u_1
inst✝ : Group G
ι : Type u_2
f : ι → G
K : ι → Subgroup G
hind : CompleteLattice.Independent K
i : ι
s : Finset ι
hnmem : i ∉ s
ih :
  ∀ (comm : Set.Pairwise ↑s fun a b => Commute (f a) (f b)),
    (∀ x ∈ s, f x ∈ K x) → Finset.noncommProd s f comm = 1 → ∀ i ∈ s, f i = 1
comm : Set.Pairwise ↑(insert i s) fun a b => Commute (f a) (f b)
hcomm : Set.Pairwise ↑s fun a b => Commute (f a) (f b)
hmem : f i ∈ K i ∧ ∀ x ∈ s, f x ∈ K x
hmem_bsupr : Finset.noncommProd s f hcomm ∈ ⨆ i ∈ ↑s, K i
heq1 : Finset.noncommProd (insert i s) f comm = 1
⊢ ∀ i_1 ∈ insert i s, f i_1 = 1

Next tactic:
rw [Finset.noncommProd_insert_of_not_mem _ _ _ _ hnmem] at heq1
/-- `Finset.noncommProd` is “injective” in `f` if `f` maps into independent subgroups.  This
generalizes (one direction of) `Subgroup.disjoint_iff_mul_eq_one`. -/
@[to_additive "`Finset.noncommSum` is “injective” in `f` if `f` maps into independent subgroups.
This generalizes (one direction of) `AddSubgroup.disjoint_iff_add_eq_zero`. "]
theorem eq_one_of_noncommProd_eq_one_of_independent {ι : Type*} (s : Finset ι) (f : ι → G) (comm)
    (K : ι → Subgroup G) (hind : CompleteLattice.Independent K) (hmem : ∀ x ∈ s, f x ∈ K x)
    (heq1 : s.noncommProd f comm = 1) : ∀ i ∈ s, f i = 1 := by
  classical
    revert heq1
    induction' s using Finset.induction_on with i s hnmem ih
    · simp
    · have hcomm := comm.mono (Finset.coe_subset.2 <| Finset.subset_insert _ _)
      simp only [Finset.forall_mem_insert] at hmem
      have hmem_bsupr : s.noncommProd f hcomm ∈ ⨆ i ∈ (s : Set ι), K i := by
        refine' Subgroup.noncommProd_mem _ _ _
        intro x hx
        have : K x ≤ ⨆ i ∈ (s : Set ι), K i := le_iSup₂ (f := fun i _ => K i) x hx
        exact this (hmem.2 x hx)
      intro heq1
      rw [Finset.noncommProd_insert_of_not_mem _ _ _ _ hnmem] at heq1
      

Proof state:
case insert
G : Type u_1
inst✝ : Group G
ι : Type u_2
f : ι → G
K : ι → Subgroup G
hind : CompleteLattice.Independent K
i : ι
s : Finset ι
hnmem : i ∉ s
ih :
  ∀ (comm : Set.Pairwise ↑s fun a b => Commute (f a) (f b)),
    (∀ x ∈ s, f x ∈ K x) → Finset.noncommProd s f comm = 1 → ∀ i ∈ s, f i = 1
comm : Set.Pairwise ↑(insert i s) fun a b => Commute (f a) (f b)
hcomm : Set.Pairwise ↑s fun a b => Commute (f a) (f b)
hmem : f i ∈ K i ∧ ∀ x ∈ s, f x ∈ K x
hmem_bsupr : Finset.noncommProd s f hcomm ∈ ⨆ i ∈ ↑s, K i
heq1 : f i * Finset.noncommProd s f (_ : Set.Pairwise ↑s fun a b => Commute (f a) (f b)) = 1
⊢ ∀ i_1 ∈ insert i s, f i_1 = 1

Next tactic:
have hnmem' : i ∉ (s : Set ι) := by simpa
/-- `Finset.noncommProd` is “injective” in `f` if `f` maps into independent subgroups.  This
generalizes (one direction of) `Subgroup.disjoint_iff_mul_eq_one`. -/
@[to_additive "`Finset.noncommSum` is “injective” in `f` if `f` maps into independent subgroups.
This generalizes (one direction of) `AddSubgroup.disjoint_iff_add_eq_zero`. "]
theorem eq_one_of_noncommProd_eq_one_of_independent {ι : Type*} (s : Finset ι) (f : ι → G) (comm)
    (K : ι → Subgroup G) (hind : CompleteLattice.Independent K) (hmem : ∀ x ∈ s, f x ∈ K x)
    (heq1 : s.noncommProd f comm = 1) : ∀ i ∈ s, f i = 1 := by
  classical
    revert heq1
    induction' s using Finset.induction_on with i s hnmem ih
    · simp
    · have hcomm := comm.mono (Finset.coe_subset.2 <| Finset.subset_insert _ _)
      simp only [Finset.forall_mem_insert] at hmem
      have hmem_bsupr : s.noncommProd f hcomm ∈ ⨆ i ∈ (s : Set ι), K i := by
        refine' Subgroup.noncommProd_mem _ _ _
        intro x hx
        have : K x ≤ ⨆ i ∈ (s : Set ι), K i := le_iSup₂ (f := fun i _ => K i) x hx
        exact this (hmem.2 x hx)
      intro heq1
      rw [Finset.noncommProd_insert_of_not_mem _ _ _ _ hnmem] at heq1
      have hnmem' : i ∉ (s : Set ι) := by 

Proof state:
G : Type u_1
inst✝ : Group G
ι : Type u_2
f : ι → G
K : ι → Subgroup G
hind : CompleteLattice.Independent K
i : ι
s : Finset ι
hnmem : i ∉ s
ih :
  ∀ (comm : Set.Pairwise ↑s fun a b => Commute (f a) (f b)),
    (∀ x ∈ s, f x ∈ K x) → Finset.noncommProd s f comm = 1 → ∀ i ∈ s, f i = 1
comm : Set.Pairwise ↑(insert i s) fun a b => Commute (f a) (f b)
hcomm : Set.Pairwise ↑s fun a b => Commute (f a) (f b)
hmem : f i ∈ K i ∧ ∀ x ∈ s, f x ∈ K x
hmem_bsupr : Finset.noncommProd s f hcomm ∈ ⨆ i ∈ ↑s, K i
heq1 : f i * Finset.noncommProd s f (_ : Set.Pairwise ↑s fun a b => Commute (f a) (f b)) = 1
⊢ i ∉ ↑s

Next tactic:
simpa
/-- `Finset.noncommProd` is “injective” in `f` if `f` maps into independent subgroups.  This
generalizes (one direction of) `Subgroup.disjoint_iff_mul_eq_one`. -/
@[to_additive "`Finset.noncommSum` is “injective” in `f` if `f` maps into independent subgroups.
This generalizes (one direction of) `AddSubgroup.disjoint_iff_add_eq_zero`. "]
theorem eq_one_of_noncommProd_eq_one_of_independent {ι : Type*} (s : Finset ι) (f : ι → G) (comm)
    (K : ι → Subgroup G) (hind : CompleteLattice.Independent K) (hmem : ∀ x ∈ s, f x ∈ K x)
    (heq1 : s.noncommProd f comm = 1) : ∀ i ∈ s, f i = 1 := by
  classical
    revert heq1
    induction' s using Finset.induction_on with i s hnmem ih
    · simp
    · have hcomm := comm.mono (Finset.coe_subset.2 <| Finset.subset_insert _ _)
      simp only [Finset.forall_mem_insert] at hmem
      have hmem_bsupr : s.noncommProd f hcomm ∈ ⨆ i ∈ (s : Set ι), K i := by
        refine' Subgroup.noncommProd_mem _ _ _
        intro x hx
        have : K x ≤ ⨆ i ∈ (s : Set ι), K i := le_iSup₂ (f := fun i _ => K i) x hx
        exact this (hmem.2 x hx)
      intro heq1
      rw [Finset.noncommProd_insert_of_not_mem _ _ _ _ hnmem] at heq1
      have hnmem' : i ∉ (s : Set ι) := by simpa
      

Proof state:
case insert
G : Type u_1
inst✝ : Group G
ι : Type u_2
f : ι → G
K : ι → Subgroup G
hind : CompleteLattice.Independent K
i : ι
s : Finset ι
hnmem : i ∉ s
ih :
  ∀ (comm : Set.Pairwise ↑s fun a b => Commute (f a) (f b)),
    (∀ x ∈ s, f x ∈ K x) → Finset.noncommProd s f comm = 1 → ∀ i ∈ s, f i = 1
comm : Set.Pairwise ↑(insert i s) fun a b => Commute (f a) (f b)
hcomm : Set.Pairwise ↑s fun a b => Commute (f a) (f b)
hmem : f i ∈ K i ∧ ∀ x ∈ s, f x ∈ K x
hmem_bsupr : Finset.noncommProd s f hcomm ∈ ⨆ i ∈ ↑s, K i
heq1 : f i * Finset.noncommProd s f (_ : Set.Pairwise ↑s fun a b => Commute (f a) (f b)) = 1
hnmem' : i ∉ ↑s
⊢ ∀ i_1 ∈ insert i s, f i_1 = 1

Next tactic:
obtain ⟨heq1i : f i = 1, heq1S : s.noncommProd f _ = 1⟩ :=
        Subgroup.disjoint_iff_mul_eq_one.mp (hind.disjoint_biSup hnmem') hmem.1 hmem_bsupr heq1
/-- `Finset.noncommProd` is “injective” in `f` if `f` maps into independent subgroups.  This
generalizes (one direction of) `Subgroup.disjoint_iff_mul_eq_one`. -/
@[to_additive "`Finset.noncommSum` is “injective” in `f` if `f` maps into independent subgroups.
This generalizes (one direction of) `AddSubgroup.disjoint_iff_add_eq_zero`. "]
theorem eq_one_of_noncommProd_eq_one_of_independent {ι : Type*} (s : Finset ι) (f : ι → G) (comm)
    (K : ι → Subgroup G) (hind : CompleteLattice.Independent K) (hmem : ∀ x ∈ s, f x ∈ K x)
    (heq1 : s.noncommProd f comm = 1) : ∀ i ∈ s, f i = 1 := by
  classical
    revert heq1
    induction' s using Finset.induction_on with i s hnmem ih
    · simp
    · have hcomm := comm.mono (Finset.coe_subset.2 <| Finset.subset_insert _ _)
      simp only [Finset.forall_mem_insert] at hmem
      have hmem_bsupr : s.noncommProd f hcomm ∈ ⨆ i ∈ (s : Set ι), K i := by
        refine' Subgroup.noncommProd_mem _ _ _
        intro x hx
        have : K x ≤ ⨆ i ∈ (s : Set ι), K i := le_iSup₂ (f := fun i _ => K i) x hx
        exact this (hmem.2 x hx)
      intro heq1
      rw [Finset.noncommProd_insert_of_not_mem _ _ _ _ hnmem] at heq1
      have hnmem' : i ∉ (s : Set ι) := by simpa
      obtain ⟨heq1i : f i = 1, heq1S : s.noncommProd f _ = 1⟩ :=
        Subgroup.disjoint_iff_mul_eq_one.mp (hind.disjoint_biSup hnmem') hmem.1 hmem_bsupr heq1
      

Proof state:
case insert.intro
G : Type u_1
inst✝ : Group G
ι : Type u_2
f : ι → G
K : ι → Subgroup G
hind : CompleteLattice.Independent K
i : ι
s : Finset ι
hnmem : i ∉ s
ih :
  ∀ (comm : Set.Pairwise ↑s fun a b => Commute (f a) (f b)),
    (∀ x ∈ s, f x ∈ K x) → Finset.noncommProd s f comm = 1 → ∀ i ∈ s, f i = 1
comm : Set.Pairwise ↑(insert i s) fun a b => Commute (f a) (f b)
hcomm : Set.Pairwise ↑s fun a b => Commute (f a) (f b)
hmem : f i ∈ K i ∧ ∀ x ∈ s, f x ∈ K x
hmem_bsupr : Finset.noncommProd s f hcomm ∈ ⨆ i ∈ ↑s, K i
heq1 : f i * Finset.noncommProd s f (_ : Set.Pairwise ↑s fun a b => Commute (f a) (f b)) = 1
hnmem' : i ∉ ↑s
heq1i : f i = 1
heq1S : Finset.noncommProd s f hcomm = 1
⊢ ∀ i_1 ∈ insert i s, f i_1 = 1

Next tactic:
intro i h
/-- `Finset.noncommProd` is “injective” in `f` if `f` maps into independent subgroups.  This
generalizes (one direction of) `Subgroup.disjoint_iff_mul_eq_one`. -/
@[to_additive "`Finset.noncommSum` is “injective” in `f` if `f` maps into independent subgroups.
This generalizes (one direction of) `AddSubgroup.disjoint_iff_add_eq_zero`. "]
theorem eq_one_of_noncommProd_eq_one_of_independent {ι : Type*} (s : Finset ι) (f : ι → G) (comm)
    (K : ι → Subgroup G) (hind : CompleteLattice.Independent K) (hmem : ∀ x ∈ s, f x ∈ K x)
    (heq1 : s.noncommProd f comm = 1) : ∀ i ∈ s, f i = 1 := by
  classical
    revert heq1
    induction' s using Finset.induction_on with i s hnmem ih
    · simp
    · have hcomm := comm.mono (Finset.coe_subset.2 <| Finset.subset_insert _ _)
      simp only [Finset.forall_mem_insert] at hmem
      have hmem_bsupr : s.noncommProd f hcomm ∈ ⨆ i ∈ (s : Set ι), K i := by
        refine' Subgroup.noncommProd_mem _ _ _
        intro x hx
        have : K x ≤ ⨆ i ∈ (s : Set ι), K i := le_iSup₂ (f := fun i _ => K i) x hx
        exact this (hmem.2 x hx)
      intro heq1
      rw [Finset.noncommProd_insert_of_not_mem _ _ _ _ hnmem] at heq1
      have hnmem' : i ∉ (s : Set ι) := by simpa
      obtain ⟨heq1i : f i = 1, heq1S : s.noncommProd f _ = 1⟩ :=
        Subgroup.disjoint_iff_mul_eq_one.mp (hind.disjoint_biSup hnmem') hmem.1 hmem_bsupr heq1
      intro i h
      

Proof state:
case insert.intro
G : Type u_1
inst✝ : Group G
ι : Type u_2
f : ι → G
K : ι → Subgroup G
hind : CompleteLattice.Independent K
i✝ : ι
s : Finset ι
hnmem : i✝ ∉ s
ih :
  ∀ (comm : Set.Pairwise ↑s fun a b => Commute (f a) (f b)),
    (∀ x ∈ s, f x ∈ K x) → Finset.noncommProd s f comm = 1 → ∀ i ∈ s, f i = 1
comm : Set.Pairwise ↑(insert i✝ s) fun a b => Commute (f a) (f b)
hcomm : Set.Pairwise ↑s fun a b => Commute (f a) (f b)
hmem : f i✝ ∈ K i✝ ∧ ∀ x ∈ s, f x ∈ K x
hmem_bsupr : Finset.noncommProd s f hcomm ∈ ⨆ i ∈ ↑s, K i
heq1 : f i✝ * Finset.noncommProd s f (_ : Set.Pairwise ↑s fun a b => Commute (f a) (f b)) = 1
hnmem' : i✝ ∉ ↑s
heq1i : f i✝ = 1
heq1S : Finset.noncommProd s f hcomm = 1
i : ι
h : i ∈ insert i✝ s
⊢ f i = 1

Next tactic:
simp only [Finset.mem_insert] at h
/-- `Finset.noncommProd` is “injective” in `f` if `f` maps into independent subgroups.  This
generalizes (one direction of) `Subgroup.disjoint_iff_mul_eq_one`. -/
@[to_additive "`Finset.noncommSum` is “injective” in `f` if `f` maps into independent subgroups.
This generalizes (one direction of) `AddSubgroup.disjoint_iff_add_eq_zero`. "]
theorem eq_one_of_noncommProd_eq_one_of_independent {ι : Type*} (s : Finset ι) (f : ι → G) (comm)
    (K : ι → Subgroup G) (hind : CompleteLattice.Independent K) (hmem : ∀ x ∈ s, f x ∈ K x)
    (heq1 : s.noncommProd f comm = 1) : ∀ i ∈ s, f i = 1 := by
  classical
    revert heq1
    induction' s using Finset.induction_on with i s hnmem ih
    · simp
    · have hcomm := comm.mono (Finset.coe_subset.2 <| Finset.subset_insert _ _)
      simp only [Finset.forall_mem_insert] at hmem
      have hmem_bsupr : s.noncommProd f hcomm ∈ ⨆ i ∈ (s : Set ι), K i := by
        refine' Subgroup.noncommProd_mem _ _ _
        intro x hx
        have : K x ≤ ⨆ i ∈ (s : Set ι), K i := le_iSup₂ (f := fun i _ => K i) x hx
        exact this (hmem.2 x hx)
      intro heq1
      rw [Finset.noncommProd_insert_of_not_mem _ _ _ _ hnmem] at heq1
      have hnmem' : i ∉ (s : Set ι) := by simpa
      obtain ⟨heq1i : f i = 1, heq1S : s.noncommProd f _ = 1⟩ :=
        Subgroup.disjoint_iff_mul_eq_one.mp (hind.disjoint_biSup hnmem') hmem.1 hmem_bsupr heq1
      intro i h
      simp only [Finset.mem_insert] at h
      

Proof state:
case insert.intro
G : Type u_1
inst✝ : Group G
ι : Type u_2
f : ι → G
K : ι → Subgroup G
hind : CompleteLattice.Independent K
i✝ : ι
s : Finset ι
hnmem : i✝ ∉ s
ih :
  ∀ (comm : Set.Pairwise ↑s fun a b => Commute (f a) (f b)),
    (∀ x ∈ s, f x ∈ K x) → Finset.noncommProd s f comm = 1 → ∀ i ∈ s, f i = 1
comm : Set.Pairwise ↑(insert i✝ s) fun a b => Commute (f a) (f b)
hcomm : Set.Pairwise ↑s fun a b => Commute (f a) (f b)
hmem : f i✝ ∈ K i✝ ∧ ∀ x ∈ s, f x ∈ K x
hmem_bsupr : Finset.noncommProd s f hcomm ∈ ⨆ i ∈ ↑s, K i
heq1 : f i✝ * Finset.noncommProd s f (_ : Set.Pairwise ↑s fun a b => Commute (f a) (f b)) = 1
hnmem' : i✝ ∉ ↑s
heq1i : f i✝ = 1
heq1S : Finset.noncommProd s f hcomm = 1
i : ι
h : i = i✝ ∨ i ∈ s
⊢ f i = 1

Next tactic:
rcases h with (rfl | h)