l3lab/ntp-mathlib huggingface dataset:
@[to_additive]
theorem injective_noncommPiCoprod_of_independent
    (hind : CompleteLattice.Independent fun i => (ϕ i).range)
    (hinj : ∀ i, Function.Injective (ϕ i)) : Function.Injective (noncommPiCoprod ϕ hcomm) := by
  classical
    apply (MonoidHom.ker_eq_bot_iff _).mp
    apply eq_bot_iff.mpr
    intro f heq1
    have : ∀ i, i ∈ Finset.univ → ϕ i (f i) = 1 :=
      Subgroup.eq_one_of_noncommProd_eq_one_of_independent _ _ (fun _ _ _ _ h => hcomm _ _ h _ _)
        _ hind (by simp) heq1
    

Proof state:
G : Type u_1
inst✝¹ : Group G
ι : Type u_2
hdec : DecidableEq ι
hfin : Fintype ι
H : ι → Type u_3
inst✝ : (i : ι) → Group (H i)
ϕ : (i : ι) → H i →* G
hcomm : ∀ (i j : ι), i ≠ j → ∀ (x : H i) (y : H j), Commute ((ϕ i) x) ((ϕ j) y)
f✝ g : (i : ι) → H i
hind : CompleteLattice.Independent fun i => range (ϕ i)
hinj : ∀ (i : ι), Function.Injective ⇑(ϕ i)
f : (i : ι) → H i
heq1 : f ∈ ker (noncommPiCoprod ϕ hcomm)
this : ∀ i ∈ Finset.univ, (ϕ i) (f i) = 1
⊢ f ∈ ⊥

Next tactic:
ext i
@[to_additive]
theorem injective_noncommPiCoprod_of_independent
    (hind : CompleteLattice.Independent fun i => (ϕ i).range)
    (hinj : ∀ i, Function.Injective (ϕ i)) : Function.Injective (noncommPiCoprod ϕ hcomm) := by
  classical
    apply (MonoidHom.ker_eq_bot_iff _).mp
    apply eq_bot_iff.mpr
    intro f heq1
    have : ∀ i, i ∈ Finset.univ → ϕ i (f i) = 1 :=
      Subgroup.eq_one_of_noncommProd_eq_one_of_independent _ _ (fun _ _ _ _ h => hcomm _ _ h _ _)
        _ hind (by simp) heq1
    ext i
    

Proof state:
case h
G : Type u_1
inst✝¹ : Group G
ι : Type u_2
hdec : DecidableEq ι
hfin : Fintype ι
H : ι → Type u_3
inst✝ : (i : ι) → Group (H i)
ϕ : (i : ι) → H i →* G
hcomm : ∀ (i j : ι), i ≠ j → ∀ (x : H i) (y : H j), Commute ((ϕ i) x) ((ϕ j) y)
f✝ g : (i : ι) → H i
hind : CompleteLattice.Independent fun i => range (ϕ i)
hinj : ∀ (i : ι), Function.Injective ⇑(ϕ i)
f : (i : ι) → H i
heq1 : f ∈ ker (noncommPiCoprod ϕ hcomm)
this : ∀ i ∈ Finset.univ, (ϕ i) (f i) = 1
i : ι
⊢ f i = OfNat.ofNat 1 i

Next tactic:
apply hinj
@[to_additive]
theorem injective_noncommPiCoprod_of_independent
    (hind : CompleteLattice.Independent fun i => (ϕ i).range)
    (hinj : ∀ i, Function.Injective (ϕ i)) : Function.Injective (noncommPiCoprod ϕ hcomm) := by
  classical
    apply (MonoidHom.ker_eq_bot_iff _).mp
    apply eq_bot_iff.mpr
    intro f heq1
    have : ∀ i, i ∈ Finset.univ → ϕ i (f i) = 1 :=
      Subgroup.eq_one_of_noncommProd_eq_one_of_independent _ _ (fun _ _ _ _ h => hcomm _ _ h _ _)
        _ hind (by simp) heq1
    ext i
    apply hinj
    

Proof state:
case h.a
G : Type u_1
inst✝¹ : Group G
ι : Type u_2
hdec : DecidableEq ι
hfin : Fintype ι
H : ι → Type u_3
inst✝ : (i : ι) → Group (H i)
ϕ : (i : ι) → H i →* G
hcomm : ∀ (i j : ι), i ≠ j → ∀ (x : H i) (y : H j), Commute ((ϕ i) x) ((ϕ j) y)
f✝ g : (i : ι) → H i
hind : CompleteLattice.Independent fun i => range (ϕ i)
hinj : ∀ (i : ι), Function.Injective ⇑(ϕ i)
f : (i : ι) → H i
heq1 : f ∈ ker (noncommPiCoprod ϕ hcomm)
this : ∀ i ∈ Finset.univ, (ϕ i) (f i) = 1
i : ι
⊢ (ϕ i) (f i) = (ϕ i) (OfNat.ofNat 1 i)

Next tactic:
simp [this i (Finset.mem_univ i)]
@[to_additive]
theorem independent_range_of_coprime_order [Finite ι] [∀ i, Fintype (H i)]
    (hcoprime : ∀ i j, i ≠ j → Nat.Coprime (Fintype.card (H i)) (Fintype.card (H j))) :
    CompleteLattice.Independent fun i => (ϕ i).range := by
  

Proof state:
G : Type u_1
inst✝³ : Group G
ι : Type u_2
hdec : DecidableEq ι
hfin : Fintype ι
H : ι → Type u_3
inst✝² : (i : ι) → Group (H i)
ϕ : (i : ι) → H i →* G
hcomm : ∀ (i j : ι), i ≠ j → ∀ (x : H i) (y : H j), Commute ((ϕ i) x) ((ϕ j) y)
f g : (i : ι) → H i
inst✝¹ : Finite ι
inst✝ : (i : ι) → Fintype (H i)
hcoprime : ∀ (i j : ι), i ≠ j → Nat.Coprime (Fintype.card (H i)) (Fintype.card (H j))
⊢ CompleteLattice.Independent fun i => range (ϕ i)

Next tactic:
cases nonempty_fintype ι
@[to_additive]
theorem independent_range_of_coprime_order [Finite ι] [∀ i, Fintype (H i)]
    (hcoprime : ∀ i j, i ≠ j → Nat.Coprime (Fintype.card (H i)) (Fintype.card (H j))) :
    CompleteLattice.Independent fun i => (ϕ i).range := by
  cases nonempty_fintype ι
  

Proof state:
case intro
G : Type u_1
inst✝³ : Group G
ι : Type u_2
hdec : DecidableEq ι
hfin : Fintype ι
H : ι → Type u_3
inst✝² : (i : ι) → Group (H i)
ϕ : (i : ι) → H i →* G
hcomm : ∀ (i j : ι), i ≠ j → ∀ (x : H i) (y : H j), Commute ((ϕ i) x) ((ϕ j) y)
f g : (i : ι) → H i
inst✝¹ : Finite ι
inst✝ : (i : ι) → Fintype (H i)
hcoprime : ∀ (i j : ι), i ≠ j → Nat.Coprime (Fintype.card (H i)) (Fintype.card (H j))
val✝ : Fintype ι
⊢ CompleteLattice.Independent fun i => range (ϕ i)

Next tactic:
classical
    rintro i
    rw [disjoint_iff_inf_le]
    rintro f ⟨hxi, hxp⟩
    dsimp at hxi hxp
    rw [iSup_subtype', ← noncommPiCoprod_range] at hxp
    rotate_left
    · intro _ _ hj
      apply hcomm
      exact hj ∘ Subtype.ext
    cases' hxp with g hgf
    cases' hxi with g' hg'f
    have hxi : orderOf f ∣ Fintype.card (H i) := by
      rw [← hg'f]
      exact (orderOf_map_dvd _ _).trans orderOf_dvd_card
    have hxp : orderOf f ∣ ∏ j : { j // j ≠ i }, Fintype.card (H j) := by
      rw [← hgf, ← Fintype.card_pi]
      exact (orderOf_map_dvd _ _).trans orderOf_dvd_card
    change f = 1
    rw [← pow_one f, ← orderOf_dvd_iff_pow_eq_one]
    -- porting note: ouch, had to replace an ugly `convert`
    obtain ⟨c, hc⟩ := Nat.dvd_gcd hxp hxi
    use c
    rw [← hc]
    symm
    rw [← Nat.coprime_iff_gcd_eq_one, Nat.coprime_fintype_prod_left_iff, Subtype.forall]
    intro j
    exact hcoprime _ _
@[to_additive]
theorem independent_range_of_coprime_order [Finite ι] [∀ i, Fintype (H i)]
    (hcoprime : ∀ i j, i ≠ j → Nat.Coprime (Fintype.card (H i)) (Fintype.card (H j))) :
    CompleteLattice.Independent fun i => (ϕ i).range := by
  cases nonempty_fintype ι
  classical
    

Proof state:
case intro
G : Type u_1
inst✝³ : Group G
ι : Type u_2
hdec : DecidableEq ι
hfin : Fintype ι
H : ι → Type u_3
inst✝² : (i : ι) → Group (H i)
ϕ : (i : ι) → H i →* G
hcomm : ∀ (i j : ι), i ≠ j → ∀ (x : H i) (y : H j), Commute ((ϕ i) x) ((ϕ j) y)
f g : (i : ι) → H i
inst✝¹ : Finite ι
inst✝ : (i : ι) → Fintype (H i)
hcoprime : ∀ (i j : ι), i ≠ j → Nat.Coprime (Fintype.card (H i)) (Fintype.card (H j))
val✝ : Fintype ι
⊢ CompleteLattice.Independent fun i => range (ϕ i)

Next tactic:
rintro i
@[to_additive]
theorem independent_range_of_coprime_order [Finite ι] [∀ i, Fintype (H i)]
    (hcoprime : ∀ i j, i ≠ j → Nat.Coprime (Fintype.card (H i)) (Fintype.card (H j))) :
    CompleteLattice.Independent fun i => (ϕ i).range := by
  cases nonempty_fintype ι
  classical
    rintro i
    

Proof state:
case intro
G : Type u_1
inst✝³ : Group G
ι : Type u_2
hdec : DecidableEq ι
hfin : Fintype ι
H : ι → Type u_3
inst✝² : (i : ι) → Group (H i)
ϕ : (i : ι) → H i →* G
hcomm : ∀ (i j : ι), i ≠ j → ∀ (x : H i) (y : H j), Commute ((ϕ i) x) ((ϕ j) y)
f g : (i : ι) → H i
inst✝¹ : Finite ι
inst✝ : (i : ι) → Fintype (H i)
hcoprime : ∀ (i j : ι), i ≠ j → Nat.Coprime (Fintype.card (H i)) (Fintype.card (H j))
val✝ : Fintype ι
i : ι
⊢ Disjoint ((fun i => range (ϕ i)) i) (⨆ j, ⨆ (_ : j ≠ i), (fun i => range (ϕ i)) j)

Next tactic:
rw [disjoint_iff_inf_le]
@[to_additive]
theorem independent_range_of_coprime_order [Finite ι] [∀ i, Fintype (H i)]
    (hcoprime : ∀ i j, i ≠ j → Nat.Coprime (Fintype.card (H i)) (Fintype.card (H j))) :
    CompleteLattice.Independent fun i => (ϕ i).range := by
  cases nonempty_fintype ι
  classical
    rintro i
    rw [disjoint_iff_inf_le]
    

Proof state:
case intro
G : Type u_1
inst✝³ : Group G
ι : Type u_2
hdec : DecidableEq ι
hfin : Fintype ι
H : ι → Type u_3
inst✝² : (i : ι) → Group (H i)
ϕ : (i : ι) → H i →* G
hcomm : ∀ (i j : ι), i ≠ j → ∀ (x : H i) (y : H j), Commute ((ϕ i) x) ((ϕ j) y)
f g : (i : ι) → H i
inst✝¹ : Finite ι
inst✝ : (i : ι) → Fintype (H i)
hcoprime : ∀ (i j : ι), i ≠ j → Nat.Coprime (Fintype.card (H i)) (Fintype.card (H j))
val✝ : Fintype ι
i : ι
⊢ (fun i => range (ϕ i)) i ⊓ ⨆ j, ⨆ (_ : j ≠ i), (fun i => range (ϕ i)) j ≤ ⊥

Next tactic:
rintro f ⟨hxi, hxp⟩
@[to_additive]
theorem independent_range_of_coprime_order [Finite ι] [∀ i, Fintype (H i)]
    (hcoprime : ∀ i j, i ≠ j → Nat.Coprime (Fintype.card (H i)) (Fintype.card (H j))) :
    CompleteLattice.Independent fun i => (ϕ i).range := by
  cases nonempty_fintype ι
  classical
    rintro i
    rw [disjoint_iff_inf_le]
    rintro f ⟨hxi, hxp⟩
    

Proof state:
case intro.intro
G : Type u_1
inst✝³ : Group G
ι : Type u_2
hdec : DecidableEq ι
hfin : Fintype ι
H : ι → Type u_3
inst✝² : (i : ι) → Group (H i)
ϕ : (i : ι) → H i →* G
hcomm : ∀ (i j : ι), i ≠ j → ∀ (x : H i) (y : H j), Commute ((ϕ i) x) ((ϕ j) y)
f✝ g : (i : ι) → H i
inst✝¹ : Finite ι
inst✝ : (i : ι) → Fintype (H i)
hcoprime : ∀ (i j : ι), i ≠ j → Nat.Coprime (Fintype.card (H i)) (Fintype.card (H j))
val✝ : Fintype ι
i : ι
f : G
hxi : f ∈ ↑((fun i => range (ϕ i)) i).toSubmonoid
hxp : f ∈ ↑(⨆ j, ⨆ (_ : j ≠ i), (fun i => range (ϕ i)) j).toSubmonoid
⊢ f ∈ ⊥

Next tactic:
dsimp at hxi hxp
@[to_additive]
theorem independent_range_of_coprime_order [Finite ι] [∀ i, Fintype (H i)]
    (hcoprime : ∀ i j, i ≠ j → Nat.Coprime (Fintype.card (H i)) (Fintype.card (H j))) :
    CompleteLattice.Independent fun i => (ϕ i).range := by
  cases nonempty_fintype ι
  classical
    rintro i
    rw [disjoint_iff_inf_le]
    rintro f ⟨hxi, hxp⟩
    dsimp at hxi hxp
    

Proof state:
case intro.intro
G : Type u_1
inst✝³ : Group G
ι : Type u_2
hdec : DecidableEq ι
hfin : Fintype ι
H : ι → Type u_3
inst✝² : (i : ι) → Group (H i)
ϕ : (i : ι) → H i →* G
hcomm : ∀ (i j : ι), i ≠ j → ∀ (x : H i) (y : H j), Commute ((ϕ i) x) ((ϕ j) y)
f✝ g : (i : ι) → H i
inst✝¹ : Finite ι
inst✝ : (i : ι) → Fintype (H i)
hcoprime : ∀ (i j : ι), i ≠ j → Nat.Coprime (Fintype.card (H i)) (Fintype.card (H j))
val✝ : Fintype ι
i : ι
f : G
hxi : f ∈ Set.range ⇑(ϕ i)
hxp : f ∈ ↑(⨆ j, ⨆ (_ : ¬j = i), range (ϕ j))
⊢ f ∈ ⊥

Next tactic:
rw [iSup_subtype', ← noncommPiCoprod_range] at hxp
@[to_additive]
theorem independent_range_of_coprime_order [Finite ι] [∀ i, Fintype (H i)]
    (hcoprime : ∀ i j, i ≠ j → Nat.Coprime (Fintype.card (H i)) (Fintype.card (H j))) :
    CompleteLattice.Independent fun i => (ϕ i).range := by
  cases nonempty_fintype ι
  classical
    rintro i
    rw [disjoint_iff_inf_le]
    rintro f ⟨hxi, hxp⟩
    dsimp at hxi hxp
    rw [iSup_subtype', ← noncommPiCoprod_range] at hxp
    

Proof state:
case intro.intro
G : Type u_1
inst✝³ : Group G
ι : Type u_2
hdec : DecidableEq ι
hfin : Fintype ι
H : ι → Type u_3
inst✝² : (i : ι) → Group (H i)
ϕ : (i : ι) → H i →* G
hcomm : ∀ (i j : ι), i ≠ j → ∀ (x : H i) (y : H j), Commute ((ϕ i) x) ((ϕ j) y)
f✝ g : (i : ι) → H i
inst✝¹ : Finite ι
inst✝ : (i : ι) → Fintype (H i)
hcoprime : ∀ (i j : ι), i ≠ j → Nat.Coprime (Fintype.card (H i)) (Fintype.card (H j))
val✝ : Fintype ι
i : ι
f : G
hxi : f ∈ Set.range ⇑(ϕ i)
hxp✝ : f ∈ ↑(⨆ x, range (ϕ ↑x))
hxp : f ∈ ↑(range (noncommPiCoprod (fun x => ϕ ↑x) ?intro.intro.hcomm))
⊢ f ∈ ⊥
case intro.intro.hcomm
G : Type u_1
inst✝³ : Group G
ι : Type u_2
hdec : DecidableEq ι
hfin : Fintype ι
H : ι → Type u_3
inst✝² : (i : ι) → Group (H i)
ϕ : (i : ι) → H i →* G
hcomm : ∀ (i j : ι), i ≠ j → ∀ (x : H i) (y : H j), Commute ((ϕ i) x) ((ϕ j) y)
f✝ g : (i : ι) → H i
inst✝¹ : Finite ι
inst✝ : (i : ι) → Fintype (H i)
hcoprime : ∀ (i j : ι), i ≠ j → Nat.Coprime (Fintype.card (H i)) (Fintype.card (H j))
val✝ : Fintype ι
i : ι
f : G
hxi : f ∈ Set.range ⇑(ϕ i)
hxp : f ∈ ↑(⨆ x, range (ϕ ↑x))
⊢ ∀ (i_1 j : { j // ¬j = i }), i_1 ≠ j → ∀ (x : H ↑i_1) (y : H ↑j), Commute ((ϕ ↑i_1) x) ((ϕ ↑j) y)

Next tactic:
rotate_left
@[to_additive]
theorem independent_range_of_coprime_order [Finite ι] [∀ i, Fintype (H i)]
    (hcoprime : ∀ i j, i ≠ j → Nat.Coprime (Fintype.card (H i)) (Fintype.card (H j))) :
    CompleteLattice.Independent fun i => (ϕ i).range := by
  cases nonempty_fintype ι
  classical
    rintro i
    rw [disjoint_iff_inf_le]
    rintro f ⟨hxi, hxp⟩
    dsimp at hxi hxp
    rw [iSup_subtype', ← noncommPiCoprod_range] at hxp
    rotate_left
    · 

Proof state:
case intro.intro.hcomm
G : Type u_1
inst✝³ : Group G
ι : Type u_2
hdec : DecidableEq ι
hfin : Fintype ι
H : ι → Type u_3
inst✝² : (i : ι) → Group (H i)
ϕ : (i : ι) → H i →* G
hcomm : ∀ (i j : ι), i ≠ j → ∀ (x : H i) (y : H j), Commute ((ϕ i) x) ((ϕ j) y)
f✝ g : (i : ι) → H i
inst✝¹ : Finite ι
inst✝ : (i : ι) → Fintype (H i)
hcoprime : ∀ (i j : ι), i ≠ j → Nat.Coprime (Fintype.card (H i)) (Fintype.card (H j))
val✝ : Fintype ι
i : ι
f : G
hxi : f ∈ Set.range ⇑(ϕ i)
hxp : f ∈ ↑(⨆ x, range (ϕ ↑x))
⊢ ∀ (i_1 j : { j // ¬j = i }), i_1 ≠ j → ∀ (x : H ↑i_1) (y : H ↑j), Commute ((ϕ ↑i_1) x) ((ϕ ↑j) y)

Next tactic:
intro _ _ hj
@[to_additive]
theorem independent_range_of_coprime_order [Finite ι] [∀ i, Fintype (H i)]
    (hcoprime : ∀ i j, i ≠ j → Nat.Coprime (Fintype.card (H i)) (Fintype.card (H j))) :
    CompleteLattice.Independent fun i => (ϕ i).range := by
  cases nonempty_fintype ι
  classical
    rintro i
    rw [disjoint_iff_inf_le]
    rintro f ⟨hxi, hxp⟩
    dsimp at hxi hxp
    rw [iSup_subtype', ← noncommPiCoprod_range] at hxp
    rotate_left
    · intro _ _ hj
      

Proof state:
case intro.intro.hcomm
G : Type u_1
inst✝³ : Group G
ι : Type u_2
hdec : DecidableEq ι
hfin : Fintype ι
H : ι → Type u_3
inst✝² : (i : ι) → Group (H i)
ϕ : (i : ι) → H i →* G
hcomm : ∀ (i j : ι), i ≠ j → ∀ (x : H i) (y : H j), Commute ((ϕ i) x) ((ϕ j) y)
f✝ g : (i : ι) → H i
inst✝¹ : Finite ι
inst✝ : (i : ι) → Fintype (H i)
hcoprime : ∀ (i j : ι), i ≠ j → Nat.Coprime (Fintype.card (H i)) (Fintype.card (H j))
val✝ : Fintype ι
i : ι
f : G
hxi : f ∈ Set.range ⇑(ϕ i)
hxp : f ∈ ↑(⨆ x, range (ϕ ↑x))
i✝ j✝ : { j // ¬j = i }
hj : i✝ ≠ j✝
⊢ ∀ (x : H ↑i✝) (y : H ↑j✝), Commute ((ϕ ↑i✝) x) ((ϕ ↑j✝) y)

Next tactic:
apply hcomm
@[to_additive]
theorem independent_range_of_coprime_order [Finite ι] [∀ i, Fintype (H i)]
    (hcoprime : ∀ i j, i ≠ j → Nat.Coprime (Fintype.card (H i)) (Fintype.card (H j))) :
    CompleteLattice.Independent fun i => (ϕ i).range := by
  cases nonempty_fintype ι
  classical
    rintro i
    rw [disjoint_iff_inf_le]
    rintro f ⟨hxi, hxp⟩
    dsimp at hxi hxp
    rw [iSup_subtype', ← noncommPiCoprod_range] at hxp
    rotate_left
    · intro _ _ hj
      apply hcomm
      

Proof state:
case intro.intro.hcomm.a
G : Type u_1
inst✝³ : Group G
ι : Type u_2
hdec : DecidableEq ι
hfin : Fintype ι
H : ι → Type u_3
inst✝² : (i : ι) → Group (H i)
ϕ : (i : ι) → H i →* G
hcomm : ∀ (i j : ι), i ≠ j → ∀ (x : H i) (y : H j), Commute ((ϕ i) x) ((ϕ j) y)
f✝ g : (i : ι) → H i
inst✝¹ : Finite ι
inst✝ : (i : ι) → Fintype (H i)
hcoprime : ∀ (i j : ι), i ≠ j → Nat.Coprime (Fintype.card (H i)) (Fintype.card (H j))
val✝ : Fintype ι
i : ι
f : G
hxi : f ∈ Set.range ⇑(ϕ i)
hxp : f ∈ ↑(⨆ x, range (ϕ ↑x))
i✝ j✝ : { j // ¬j = i }
hj : i✝ ≠ j✝
⊢ ↑i✝ ≠ ↑j✝

Next tactic:
exact hj ∘ Subtype.ext
@[to_additive]
theorem independent_range_of_coprime_order [Finite ι] [∀ i, Fintype (H i)]
    (hcoprime : ∀ i j, i ≠ j → Nat.Coprime (Fintype.card (H i)) (Fintype.card (H j))) :
    CompleteLattice.Independent fun i => (ϕ i).range := by
  cases nonempty_fintype ι
  classical
    rintro i
    rw [disjoint_iff_inf_le]
    rintro f ⟨hxi, hxp⟩
    dsimp at hxi hxp
    rw [iSup_subtype', ← noncommPiCoprod_range] at hxp
    rotate_left
    · intro _ _ hj
      apply hcomm
      exact hj ∘ Subtype.ext
    

Proof state:
case intro.intro
G : Type u_1
inst✝³ : Group G
ι : Type u_2
hdec : DecidableEq ι
hfin : Fintype ι
H : ι → Type u_3
inst✝² : (i : ι) → Group (H i)
ϕ : (i : ι) → H i →* G
hcomm : ∀ (i j : ι), i ≠ j → ∀ (x : H i) (y : H j), Commute ((ϕ i) x) ((ϕ j) y)
f✝ g : (i : ι) → H i
inst✝¹ : Finite ι
inst✝ : (i : ι) → Fintype (H i)
hcoprime : ∀ (i j : ι), i ≠ j → Nat.Coprime (Fintype.card (H i)) (Fintype.card (H j))
val✝ : Fintype ι
i : ι
f : G
hxi : f ∈ Set.range ⇑(ϕ i)
hxp✝ : f ∈ ↑(⨆ x, range (ϕ ↑x))
hxp :
  f ∈
    ↑(range
        (noncommPiCoprod (fun x => ϕ ↑x)
          (_ : ∀ (i_1 j : { j // ¬j = i }), i_1 ≠ j → ∀ (x : H ↑i_1) (y : H ↑j), Commute ((ϕ ↑i_1) x) ((ϕ ↑j) y))))
⊢ f ∈ ⊥

Next tactic:
cases' hxp with g hgf
@[to_additive]
theorem independent_range_of_coprime_order [Finite ι] [∀ i, Fintype (H i)]
    (hcoprime : ∀ i j, i ≠ j → Nat.Coprime (Fintype.card (H i)) (Fintype.card (H j))) :
    CompleteLattice.Independent fun i => (ϕ i).range := by
  cases nonempty_fintype ι
  classical
    rintro i
    rw [disjoint_iff_inf_le]
    rintro f ⟨hxi, hxp⟩
    dsimp at hxi hxp
    rw [iSup_subtype', ← noncommPiCoprod_range] at hxp
    rotate_left
    · intro _ _ hj
      apply hcomm
      exact hj ∘ Subtype.ext
    cases' hxp with g hgf
    

Proof state:
case intro.intro.intro
G : Type u_1
inst✝³ : Group G
ι : Type u_2
hdec : DecidableEq ι
hfin : Fintype ι
H : ι → Type u_3
inst✝² : (i : ι) → Group (H i)
ϕ : (i : ι) → H i →* G
hcomm : ∀ (i j : ι), i ≠ j → ∀ (x : H i) (y : H j), Commute ((ϕ i) x) ((ϕ j) y)
f✝ g✝ : (i : ι) → H i
inst✝¹ : Finite ι
inst✝ : (i : ι) → Fintype (H i)
hcoprime : ∀ (i j : ι), i ≠ j → Nat.Coprime (Fintype.card (H i)) (Fintype.card (H j))
val✝ : Fintype ι
i : ι
f : G
hxi : f ∈ Set.range ⇑(ϕ i)
hxp : f ∈ ↑(⨆ x, range (ϕ ↑x))
g : (i_1 : { j // ¬j = i }) → H ↑i_1
hgf :
  (noncommPiCoprod (fun x => ϕ ↑x)
        (_ : ∀ (i_1 j : { j // ¬j = i }), i_1 ≠ j → ∀ (x : H ↑i_1) (y : H ↑j), Commute ((ϕ ↑i_1) x) ((ϕ ↑j) y)))
      g =
    f
⊢ f ∈ ⊥

Next tactic:
cases' hxi with g' hg'f
@[to_additive]
theorem independent_range_of_coprime_order [Finite ι] [∀ i, Fintype (H i)]
    (hcoprime : ∀ i j, i ≠ j → Nat.Coprime (Fintype.card (H i)) (Fintype.card (H j))) :
    CompleteLattice.Independent fun i => (ϕ i).range := by
  cases nonempty_fintype ι
  classical
    rintro i
    rw [disjoint_iff_inf_le]
    rintro f ⟨hxi, hxp⟩
    dsimp at hxi hxp
    rw [iSup_subtype', ← noncommPiCoprod_range] at hxp
    rotate_left
    · intro _ _ hj
      apply hcomm
      exact hj ∘ Subtype.ext
    cases' hxp with g hgf
    cases' hxi with g' hg'f
    

Proof state:
case intro.intro.intro.intro
G : Type u_1
inst✝³ : Group G
ι : Type u_2
hdec : DecidableEq ι
hfin : Fintype ι
H : ι → Type u_3
inst✝² : (i : ι) → Group (H i)
ϕ : (i : ι) → H i →* G
hcomm : ∀ (i j : ι), i ≠ j → ∀ (x : H i) (y : H j), Commute ((ϕ i) x) ((ϕ j) y)
f✝ g✝ : (i : ι) → H i
inst✝¹ : Finite ι
inst✝ : (i : ι) → Fintype (H i)
hcoprime : ∀ (i j : ι), i ≠ j → Nat.Coprime (Fintype.card (H i)) (Fintype.card (H j))
val✝ : Fintype ι
i : ι
f : G
hxp : f ∈ ↑(⨆ x, range (ϕ ↑x))
g : (i_1 : { j // ¬j = i }) → H ↑i_1
hgf :
  (noncommPiCoprod (fun x => ϕ ↑x)
        (_ : ∀ (i_1 j : { j // ¬j = i }), i_1 ≠ j → ∀ (x : H ↑i_1) (y : H ↑j), Commute ((ϕ ↑i_1) x) ((ϕ ↑j) y)))
      g =
    f
g' : H i
hg'f : (ϕ i) g' = f
⊢ f ∈ ⊥

Next tactic:
have hxi : orderOf f ∣ Fintype.card (H i) := by
      rw [← hg'f]
      exact (orderOf_map_dvd _ _).trans orderOf_dvd_card
@[to_additive]
theorem independent_range_of_coprime_order [Finite ι] [∀ i, Fintype (H i)]
    (hcoprime : ∀ i j, i ≠ j → Nat.Coprime (Fintype.card (H i)) (Fintype.card (H j))) :
    CompleteLattice.Independent fun i => (ϕ i).range := by
  cases nonempty_fintype ι
  classical
    rintro i
    rw [disjoint_iff_inf_le]
    rintro f ⟨hxi, hxp⟩
    dsimp at hxi hxp
    rw [iSup_subtype', ← noncommPiCoprod_range] at hxp
    rotate_left
    · intro _ _ hj
      apply hcomm
      exact hj ∘ Subtype.ext
    cases' hxp with g hgf
    cases' hxi with g' hg'f
    have hxi : orderOf f ∣ Fintype.card (H i) := by
      

Proof state:
G : Type u_1
inst✝³ : Group G
ι : Type u_2
hdec : DecidableEq ι
hfin : Fintype ι
H : ι → Type u_3
inst✝² : (i : ι) → Group (H i)
ϕ : (i : ι) → H i →* G
hcomm : ∀ (i j : ι), i ≠ j → ∀ (x : H i) (y : H j), Commute ((ϕ i) x) ((ϕ j) y)
f✝ g✝ : (i : ι) → H i
inst✝¹ : Finite ι
inst✝ : (i : ι) → Fintype (H i)
hcoprime : ∀ (i j : ι), i ≠ j → Nat.Coprime (Fintype.card (H i)) (Fintype.card (H j))
val✝ : Fintype ι
i : ι
f : G
hxp : f ∈ ↑(⨆ x, range (ϕ ↑x))
g : (i_1 : { j // ¬j = i }) → H ↑i_1
hgf :
  (noncommPiCoprod (fun x => ϕ ↑x)
        (_ : ∀ (i_1 j : { j // ¬j = i }), i_1 ≠ j → ∀ (x : H ↑i_1) (y : H ↑j), Commute ((ϕ ↑i_1) x) ((ϕ ↑j) y)))
      g =
    f
g' : H i
hg'f : (ϕ i) g' = f
⊢ orderOf f ∣ Fintype.card (H i)

Next tactic:
rw [← hg'f]
@[to_additive]
theorem independent_range_of_coprime_order [Finite ι] [∀ i, Fintype (H i)]
    (hcoprime : ∀ i j, i ≠ j → Nat.Coprime (Fintype.card (H i)) (Fintype.card (H j))) :
    CompleteLattice.Independent fun i => (ϕ i).range := by
  cases nonempty_fintype ι
  classical
    rintro i
    rw [disjoint_iff_inf_le]
    rintro f ⟨hxi, hxp⟩
    dsimp at hxi hxp
    rw [iSup_subtype', ← noncommPiCoprod_range] at hxp
    rotate_left
    · intro _ _ hj
      apply hcomm
      exact hj ∘ Subtype.ext
    cases' hxp with g hgf
    cases' hxi with g' hg'f
    have hxi : orderOf f ∣ Fintype.card (H i) := by
      rw [← hg'f]
      

Proof state:
G : Type u_1
inst✝³ : Group G
ι : Type u_2
hdec : DecidableEq ι
hfin : Fintype ι
H : ι → Type u_3
inst✝² : (i : ι) → Group (H i)
ϕ : (i : ι) → H i →* G
hcomm : ∀ (i j : ι), i ≠ j → ∀ (x : H i) (y : H j), Commute ((ϕ i) x) ((ϕ j) y)
f✝ g✝ : (i : ι) → H i
inst✝¹ : Finite ι
inst✝ : (i : ι) → Fintype (H i)
hcoprime : ∀ (i j : ι), i ≠ j → Nat.Coprime (Fintype.card (H i)) (Fintype.card (H j))
val✝ : Fintype ι
i : ι
f : G
hxp : f ∈ ↑(⨆ x, range (ϕ ↑x))
g : (i_1 : { j // ¬j = i }) → H ↑i_1
hgf :
  (noncommPiCoprod (fun x => ϕ ↑x)
        (_ : ∀ (i_1 j : { j // ¬j = i }), i_1 ≠ j → ∀ (x : H ↑i_1) (y : H ↑j), Commute ((ϕ ↑i_1) x) ((ϕ ↑j) y)))
      g =
    f
g' : H i
hg'f : (ϕ i) g' = f
⊢ orderOf ((ϕ i) g') ∣ Fintype.card (H i)

Next tactic:
exact (orderOf_map_dvd _ _).trans orderOf_dvd_card
@[to_additive]
theorem independent_range_of_coprime_order [Finite ι] [∀ i, Fintype (H i)]
    (hcoprime : ∀ i j, i ≠ j → Nat.Coprime (Fintype.card (H i)) (Fintype.card (H j))) :
    CompleteLattice.Independent fun i => (ϕ i).range := by
  cases nonempty_fintype ι
  classical
    rintro i
    rw [disjoint_iff_inf_le]
    rintro f ⟨hxi, hxp⟩
    dsimp at hxi hxp
    rw [iSup_subtype', ← noncommPiCoprod_range] at hxp
    rotate_left
    · intro _ _ hj
      apply hcomm
      exact hj ∘ Subtype.ext
    cases' hxp with g hgf
    cases' hxi with g' hg'f
    have hxi : orderOf f ∣ Fintype.card (H i) := by
      rw [← hg'f]
      exact (orderOf_map_dvd _ _).trans orderOf_dvd_card
    

Proof state:
case intro.intro.intro.intro
G : Type u_1
inst✝³ : Group G
ι : Type u_2
hdec : DecidableEq ι
hfin : Fintype ι
H : ι → Type u_3
inst✝² : (i : ι) → Group (H i)
ϕ : (i : ι) → H i →* G
hcomm : ∀ (i j : ι), i ≠ j → ∀ (x : H i) (y : H j), Commute ((ϕ i) x) ((ϕ j) y)
f✝ g✝ : (i : ι) → H i
inst✝¹ : Finite ι
inst✝ : (i : ι) → Fintype (H i)
hcoprime : ∀ (i j : ι), i ≠ j → Nat.Coprime (Fintype.card (H i)) (Fintype.card (H j))
val✝ : Fintype ι
i : ι
f : G
hxp : f ∈ ↑(⨆ x, range (ϕ ↑x))
g : (i_1 : { j // ¬j = i }) → H ↑i_1
hgf :
  (noncommPiCoprod (fun x => ϕ ↑x)
        (_ : ∀ (i_1 j : { j // ¬j = i }), i_1 ≠ j → ∀ (x : H ↑i_1) (y : H ↑j), Commute ((ϕ ↑i_1) x) ((ϕ ↑j) y)))
      g =
    f
g' : H i
hg'f : (ϕ i) g' = f
hxi : orderOf f ∣ Fintype.card (H i)
⊢ f ∈ ⊥

Next tactic:
have hxp : orderOf f ∣ ∏ j : { j // j ≠ i }, Fintype.card (H j) := by
      rw [← hgf, ← Fintype.card_pi]
      exact (orderOf_map_dvd _ _).trans orderOf_dvd_card