l3lab/ntp-mathlib huggingface dataset:
/-- Do not use this lemma: It is made obsolete by `exists_right_complement'_of_coprime` -/
private theorem step1 (K : Subgroup G) (hK : K ⊔ N = ⊤) : K = ⊤ := by
  contrapose! h3
  have h4 : (N.comap K.subtype).index = N.index := by
    rw [← N.relindex_top_right, ← hK]
    exact (relindex_sup_right K N).symm
  have h5 : Fintype.card K < Fintype.card G := by
    rw [← K.index_mul_card]
    exact lt_mul_of_one_lt_left Fintype.card_pos (one_lt_index_of_ne_top h3)
  

Proof state:
G : Type u
inst✝² : Group G
inst✝¹ : Fintype G
N : Subgroup G
inst✝ : Normal N
h1 : Nat.Coprime (Fintype.card ↥N) (index N)
h2 :
  ∀ (G' : Type u) [inst : Group G'] [inst_1 : Fintype G'],
    Fintype.card G' < Fintype.card G →
      ∀ {N' : Subgroup G'} [inst_2 : Normal N'], Nat.Coprime (Fintype.card ↥N') (index N') → ∃ H', IsComplement' N' H'
K : Subgroup G
hK : K ⊔ N = ⊤
h3 : K ≠ ⊤
h4 : index (comap (Subgroup.subtype K) N) = index N
h5 : Fintype.card ↥K < Fintype.card G
⊢ ∃ H, IsComplement' N H

Next tactic:
have h6 : Nat.Coprime (Fintype.card (N.comap K.subtype)) (N.comap K.subtype).index := by
    rw [h4]
    exact h1.coprime_dvd_left (card_comap_dvd_of_injective N K.subtype Subtype.coe_injective)
/-- Do not use this lemma: It is made obsolete by `exists_right_complement'_of_coprime` -/
private theorem step1 (K : Subgroup G) (hK : K ⊔ N = ⊤) : K = ⊤ := by
  contrapose! h3
  have h4 : (N.comap K.subtype).index = N.index := by
    rw [← N.relindex_top_right, ← hK]
    exact (relindex_sup_right K N).symm
  have h5 : Fintype.card K < Fintype.card G := by
    rw [← K.index_mul_card]
    exact lt_mul_of_one_lt_left Fintype.card_pos (one_lt_index_of_ne_top h3)
  have h6 : Nat.Coprime (Fintype.card (N.comap K.subtype)) (N.comap K.subtype).index := by
    

Proof state:
G : Type u
inst✝² : Group G
inst✝¹ : Fintype G
N : Subgroup G
inst✝ : Normal N
h1 : Nat.Coprime (Fintype.card ↥N) (index N)
h2 :
  ∀ (G' : Type u) [inst : Group G'] [inst_1 : Fintype G'],
    Fintype.card G' < Fintype.card G →
      ∀ {N' : Subgroup G'} [inst_2 : Normal N'], Nat.Coprime (Fintype.card ↥N') (index N') → ∃ H', IsComplement' N' H'
K : Subgroup G
hK : K ⊔ N = ⊤
h3 : K ≠ ⊤
h4 : index (comap (Subgroup.subtype K) N) = index N
h5 : Fintype.card ↥K < Fintype.card G
⊢ Nat.Coprime (Fintype.card ↥(comap (Subgroup.subtype K) N)) (index (comap (Subgroup.subtype K) N))

Next tactic:
rw [h4]
/-- Do not use this lemma: It is made obsolete by `exists_right_complement'_of_coprime` -/
private theorem step1 (K : Subgroup G) (hK : K ⊔ N = ⊤) : K = ⊤ := by
  contrapose! h3
  have h4 : (N.comap K.subtype).index = N.index := by
    rw [← N.relindex_top_right, ← hK]
    exact (relindex_sup_right K N).symm
  have h5 : Fintype.card K < Fintype.card G := by
    rw [← K.index_mul_card]
    exact lt_mul_of_one_lt_left Fintype.card_pos (one_lt_index_of_ne_top h3)
  have h6 : Nat.Coprime (Fintype.card (N.comap K.subtype)) (N.comap K.subtype).index := by
    rw [h4]
    

Proof state:
G : Type u
inst✝² : Group G
inst✝¹ : Fintype G
N : Subgroup G
inst✝ : Normal N
h1 : Nat.Coprime (Fintype.card ↥N) (index N)
h2 :
  ∀ (G' : Type u) [inst : Group G'] [inst_1 : Fintype G'],
    Fintype.card G' < Fintype.card G →
      ∀ {N' : Subgroup G'} [inst_2 : Normal N'], Nat.Coprime (Fintype.card ↥N') (index N') → ∃ H', IsComplement' N' H'
K : Subgroup G
hK : K ⊔ N = ⊤
h3 : K ≠ ⊤
h4 : index (comap (Subgroup.subtype K) N) = index N
h5 : Fintype.card ↥K < Fintype.card G
⊢ Nat.Coprime (Fintype.card ↥(comap (Subgroup.subtype K) N)) (index N)

Next tactic:
exact h1.coprime_dvd_left (card_comap_dvd_of_injective N K.subtype Subtype.coe_injective)
/-- Do not use this lemma: It is made obsolete by `exists_right_complement'_of_coprime` -/
private theorem step1 (K : Subgroup G) (hK : K ⊔ N = ⊤) : K = ⊤ := by
  contrapose! h3
  have h4 : (N.comap K.subtype).index = N.index := by
    rw [← N.relindex_top_right, ← hK]
    exact (relindex_sup_right K N).symm
  have h5 : Fintype.card K < Fintype.card G := by
    rw [← K.index_mul_card]
    exact lt_mul_of_one_lt_left Fintype.card_pos (one_lt_index_of_ne_top h3)
  have h6 : Nat.Coprime (Fintype.card (N.comap K.subtype)) (N.comap K.subtype).index := by
    rw [h4]
    exact h1.coprime_dvd_left (card_comap_dvd_of_injective N K.subtype Subtype.coe_injective)
  

Proof state:
G : Type u
inst✝² : Group G
inst✝¹ : Fintype G
N : Subgroup G
inst✝ : Normal N
h1 : Nat.Coprime (Fintype.card ↥N) (index N)
h2 :
  ∀ (G' : Type u) [inst : Group G'] [inst_1 : Fintype G'],
    Fintype.card G' < Fintype.card G →
      ∀ {N' : Subgroup G'} [inst_2 : Normal N'], Nat.Coprime (Fintype.card ↥N') (index N') → ∃ H', IsComplement' N' H'
K : Subgroup G
hK : K ⊔ N = ⊤
h3 : K ≠ ⊤
h4 : index (comap (Subgroup.subtype K) N) = index N
h5 : Fintype.card ↥K < Fintype.card G
h6 : Nat.Coprime (Fintype.card ↥(comap (Subgroup.subtype K) N)) (index (comap (Subgroup.subtype K) N))
⊢ ∃ H, IsComplement' N H

Next tactic:
obtain ⟨H, hH⟩ := h2 K h5 h6
/-- Do not use this lemma: It is made obsolete by `exists_right_complement'_of_coprime` -/
private theorem step1 (K : Subgroup G) (hK : K ⊔ N = ⊤) : K = ⊤ := by
  contrapose! h3
  have h4 : (N.comap K.subtype).index = N.index := by
    rw [← N.relindex_top_right, ← hK]
    exact (relindex_sup_right K N).symm
  have h5 : Fintype.card K < Fintype.card G := by
    rw [← K.index_mul_card]
    exact lt_mul_of_one_lt_left Fintype.card_pos (one_lt_index_of_ne_top h3)
  have h6 : Nat.Coprime (Fintype.card (N.comap K.subtype)) (N.comap K.subtype).index := by
    rw [h4]
    exact h1.coprime_dvd_left (card_comap_dvd_of_injective N K.subtype Subtype.coe_injective)
  obtain ⟨H, hH⟩ := h2 K h5 h6
  

Proof state:
case intro
G : Type u
inst✝² : Group G
inst✝¹ : Fintype G
N : Subgroup G
inst✝ : Normal N
h1 : Nat.Coprime (Fintype.card ↥N) (index N)
h2 :
  ∀ (G' : Type u) [inst : Group G'] [inst_1 : Fintype G'],
    Fintype.card G' < Fintype.card G →
      ∀ {N' : Subgroup G'} [inst_2 : Normal N'], Nat.Coprime (Fintype.card ↥N') (index N') → ∃ H', IsComplement' N' H'
K : Subgroup G
hK : K ⊔ N = ⊤
h3 : K ≠ ⊤
h4 : index (comap (Subgroup.subtype K) N) = index N
h5 : Fintype.card ↥K < Fintype.card G
h6 : Nat.Coprime (Fintype.card ↥(comap (Subgroup.subtype K) N)) (index (comap (Subgroup.subtype K) N))
H : Subgroup ↥K
hH : IsComplement' (comap (Subgroup.subtype K) N) H
⊢ ∃ H, IsComplement' N H

Next tactic:
replace hH : Fintype.card (H.map K.subtype) = N.index := by
    rw [← relindex_bot_left_eq_card, ← relindex_comap, MonoidHom.comap_bot, Subgroup.ker_subtype,
      relindex_bot_left, ← IsComplement'.index_eq_card (IsComplement'.symm hH), index_comap,
      subtype_range, ← relindex_sup_right, hK, relindex_top_right]
/-- Do not use this lemma: It is made obsolete by `exists_right_complement'_of_coprime` -/
private theorem step1 (K : Subgroup G) (hK : K ⊔ N = ⊤) : K = ⊤ := by
  contrapose! h3
  have h4 : (N.comap K.subtype).index = N.index := by
    rw [← N.relindex_top_right, ← hK]
    exact (relindex_sup_right K N).symm
  have h5 : Fintype.card K < Fintype.card G := by
    rw [← K.index_mul_card]
    exact lt_mul_of_one_lt_left Fintype.card_pos (one_lt_index_of_ne_top h3)
  have h6 : Nat.Coprime (Fintype.card (N.comap K.subtype)) (N.comap K.subtype).index := by
    rw [h4]
    exact h1.coprime_dvd_left (card_comap_dvd_of_injective N K.subtype Subtype.coe_injective)
  obtain ⟨H, hH⟩ := h2 K h5 h6
  replace hH : Fintype.card (H.map K.subtype) = N.index := by
    

Proof state:
G : Type u
inst✝² : Group G
inst✝¹ : Fintype G
N : Subgroup G
inst✝ : Normal N
h1 : Nat.Coprime (Fintype.card ↥N) (index N)
h2 :
  ∀ (G' : Type u) [inst : Group G'] [inst_1 : Fintype G'],
    Fintype.card G' < Fintype.card G →
      ∀ {N' : Subgroup G'} [inst_2 : Normal N'], Nat.Coprime (Fintype.card ↥N') (index N') → ∃ H', IsComplement' N' H'
K : Subgroup G
hK : K ⊔ N = ⊤
h3 : K ≠ ⊤
h4 : index (comap (Subgroup.subtype K) N) = index N
h5 : Fintype.card ↥K < Fintype.card G
h6 : Nat.Coprime (Fintype.card ↥(comap (Subgroup.subtype K) N)) (index (comap (Subgroup.subtype K) N))
H : Subgroup ↥K
hH : IsComplement' (comap (Subgroup.subtype K) N) H
⊢ Fintype.card ↥(map (Subgroup.subtype K) H) = index N

Next tactic:
rw [← relindex_bot_left_eq_card, ← relindex_comap, MonoidHom.comap_bot, Subgroup.ker_subtype,
      relindex_bot_left, ← IsComplement'.index_eq_card (IsComplement'.symm hH), index_comap,
      subtype_range, ← relindex_sup_right, hK, relindex_top_right]
/-- Do not use this lemma: It is made obsolete by `exists_right_complement'_of_coprime` -/
private theorem step1 (K : Subgroup G) (hK : K ⊔ N = ⊤) : K = ⊤ := by
  contrapose! h3
  have h4 : (N.comap K.subtype).index = N.index := by
    rw [← N.relindex_top_right, ← hK]
    exact (relindex_sup_right K N).symm
  have h5 : Fintype.card K < Fintype.card G := by
    rw [← K.index_mul_card]
    exact lt_mul_of_one_lt_left Fintype.card_pos (one_lt_index_of_ne_top h3)
  have h6 : Nat.Coprime (Fintype.card (N.comap K.subtype)) (N.comap K.subtype).index := by
    rw [h4]
    exact h1.coprime_dvd_left (card_comap_dvd_of_injective N K.subtype Subtype.coe_injective)
  obtain ⟨H, hH⟩ := h2 K h5 h6
  replace hH : Fintype.card (H.map K.subtype) = N.index := by
    rw [← relindex_bot_left_eq_card, ← relindex_comap, MonoidHom.comap_bot, Subgroup.ker_subtype,
      relindex_bot_left, ← IsComplement'.index_eq_card (IsComplement'.symm hH), index_comap,
      subtype_range, ← relindex_sup_right, hK, relindex_top_right]
  

Proof state:
case intro
G : Type u
inst✝² : Group G
inst✝¹ : Fintype G
N : Subgroup G
inst✝ : Normal N
h1 : Nat.Coprime (Fintype.card ↥N) (index N)
h2 :
  ∀ (G' : Type u) [inst : Group G'] [inst_1 : Fintype G'],
    Fintype.card G' < Fintype.card G →
      ∀ {N' : Subgroup G'} [inst_2 : Normal N'], Nat.Coprime (Fintype.card ↥N') (index N') → ∃ H', IsComplement' N' H'
K : Subgroup G
hK : K ⊔ N = ⊤
h3 : K ≠ ⊤
h4 : index (comap (Subgroup.subtype K) N) = index N
h5 : Fintype.card ↥K < Fintype.card G
h6 : Nat.Coprime (Fintype.card ↥(comap (Subgroup.subtype K) N)) (index (comap (Subgroup.subtype K) N))
H : Subgroup ↥K
hH : Fintype.card ↥(map (Subgroup.subtype K) H) = index N
⊢ ∃ H, IsComplement' N H

Next tactic:
have h7 : Fintype.card N * Fintype.card (H.map K.subtype) = Fintype.card G := by
    rw [hH, ← N.index_mul_card, mul_comm]
/-- Do not use this lemma: It is made obsolete by `exists_right_complement'_of_coprime` -/
private theorem step1 (K : Subgroup G) (hK : K ⊔ N = ⊤) : K = ⊤ := by
  contrapose! h3
  have h4 : (N.comap K.subtype).index = N.index := by
    rw [← N.relindex_top_right, ← hK]
    exact (relindex_sup_right K N).symm
  have h5 : Fintype.card K < Fintype.card G := by
    rw [← K.index_mul_card]
    exact lt_mul_of_one_lt_left Fintype.card_pos (one_lt_index_of_ne_top h3)
  have h6 : Nat.Coprime (Fintype.card (N.comap K.subtype)) (N.comap K.subtype).index := by
    rw [h4]
    exact h1.coprime_dvd_left (card_comap_dvd_of_injective N K.subtype Subtype.coe_injective)
  obtain ⟨H, hH⟩ := h2 K h5 h6
  replace hH : Fintype.card (H.map K.subtype) = N.index := by
    rw [← relindex_bot_left_eq_card, ← relindex_comap, MonoidHom.comap_bot, Subgroup.ker_subtype,
      relindex_bot_left, ← IsComplement'.index_eq_card (IsComplement'.symm hH), index_comap,
      subtype_range, ← relindex_sup_right, hK, relindex_top_right]
  have h7 : Fintype.card N * Fintype.card (H.map K.subtype) = Fintype.card G := by
    

Proof state:
G : Type u
inst✝² : Group G
inst✝¹ : Fintype G
N : Subgroup G
inst✝ : Normal N
h1 : Nat.Coprime (Fintype.card ↥N) (index N)
h2 :
  ∀ (G' : Type u) [inst : Group G'] [inst_1 : Fintype G'],
    Fintype.card G' < Fintype.card G →
      ∀ {N' : Subgroup G'} [inst_2 : Normal N'], Nat.Coprime (Fintype.card ↥N') (index N') → ∃ H', IsComplement' N' H'
K : Subgroup G
hK : K ⊔ N = ⊤
h3 : K ≠ ⊤
h4 : index (comap (Subgroup.subtype K) N) = index N
h5 : Fintype.card ↥K < Fintype.card G
h6 : Nat.Coprime (Fintype.card ↥(comap (Subgroup.subtype K) N)) (index (comap (Subgroup.subtype K) N))
H : Subgroup ↥K
hH : Fintype.card ↥(map (Subgroup.subtype K) H) = index N
⊢ Fintype.card ↥N * Fintype.card ↥(map (Subgroup.subtype K) H) = Fintype.card G

Next tactic:
rw [hH, ← N.index_mul_card, mul_comm]
/-- Do not use this lemma: It is made obsolete by `exists_right_complement'_of_coprime` -/
private theorem step1 (K : Subgroup G) (hK : K ⊔ N = ⊤) : K = ⊤ := by
  contrapose! h3
  have h4 : (N.comap K.subtype).index = N.index := by
    rw [← N.relindex_top_right, ← hK]
    exact (relindex_sup_right K N).symm
  have h5 : Fintype.card K < Fintype.card G := by
    rw [← K.index_mul_card]
    exact lt_mul_of_one_lt_left Fintype.card_pos (one_lt_index_of_ne_top h3)
  have h6 : Nat.Coprime (Fintype.card (N.comap K.subtype)) (N.comap K.subtype).index := by
    rw [h4]
    exact h1.coprime_dvd_left (card_comap_dvd_of_injective N K.subtype Subtype.coe_injective)
  obtain ⟨H, hH⟩ := h2 K h5 h6
  replace hH : Fintype.card (H.map K.subtype) = N.index := by
    rw [← relindex_bot_left_eq_card, ← relindex_comap, MonoidHom.comap_bot, Subgroup.ker_subtype,
      relindex_bot_left, ← IsComplement'.index_eq_card (IsComplement'.symm hH), index_comap,
      subtype_range, ← relindex_sup_right, hK, relindex_top_right]
  have h7 : Fintype.card N * Fintype.card (H.map K.subtype) = Fintype.card G := by
    rw [hH, ← N.index_mul_card, mul_comm]
  

Proof state:
case intro
G : Type u
inst✝² : Group G
inst✝¹ : Fintype G
N : Subgroup G
inst✝ : Normal N
h1 : Nat.Coprime (Fintype.card ↥N) (index N)
h2 :
  ∀ (G' : Type u) [inst : Group G'] [inst_1 : Fintype G'],
    Fintype.card G' < Fintype.card G →
      ∀ {N' : Subgroup G'} [inst_2 : Normal N'], Nat.Coprime (Fintype.card ↥N') (index N') → ∃ H', IsComplement' N' H'
K : Subgroup G
hK : K ⊔ N = ⊤
h3 : K ≠ ⊤
h4 : index (comap (Subgroup.subtype K) N) = index N
h5 : Fintype.card ↥K < Fintype.card G
h6 : Nat.Coprime (Fintype.card ↥(comap (Subgroup.subtype K) N)) (index (comap (Subgroup.subtype K) N))
H : Subgroup ↥K
hH : Fintype.card ↥(map (Subgroup.subtype K) H) = index N
h7 : Fintype.card ↥N * Fintype.card ↥(map (Subgroup.subtype K) H) = Fintype.card G
⊢ ∃ H, IsComplement' N H

Next tactic:
have h8 : (Fintype.card N).Coprime (Fintype.card (H.map K.subtype)) := by
    rwa [hH]
/-- Do not use this lemma: It is made obsolete by `exists_right_complement'_of_coprime` -/
private theorem step1 (K : Subgroup G) (hK : K ⊔ N = ⊤) : K = ⊤ := by
  contrapose! h3
  have h4 : (N.comap K.subtype).index = N.index := by
    rw [← N.relindex_top_right, ← hK]
    exact (relindex_sup_right K N).symm
  have h5 : Fintype.card K < Fintype.card G := by
    rw [← K.index_mul_card]
    exact lt_mul_of_one_lt_left Fintype.card_pos (one_lt_index_of_ne_top h3)
  have h6 : Nat.Coprime (Fintype.card (N.comap K.subtype)) (N.comap K.subtype).index := by
    rw [h4]
    exact h1.coprime_dvd_left (card_comap_dvd_of_injective N K.subtype Subtype.coe_injective)
  obtain ⟨H, hH⟩ := h2 K h5 h6
  replace hH : Fintype.card (H.map K.subtype) = N.index := by
    rw [← relindex_bot_left_eq_card, ← relindex_comap, MonoidHom.comap_bot, Subgroup.ker_subtype,
      relindex_bot_left, ← IsComplement'.index_eq_card (IsComplement'.symm hH), index_comap,
      subtype_range, ← relindex_sup_right, hK, relindex_top_right]
  have h7 : Fintype.card N * Fintype.card (H.map K.subtype) = Fintype.card G := by
    rw [hH, ← N.index_mul_card, mul_comm]
  have h8 : (Fintype.card N).Coprime (Fintype.card (H.map K.subtype)) := by
    

Proof state:
G : Type u
inst✝² : Group G
inst✝¹ : Fintype G
N : Subgroup G
inst✝ : Normal N
h1 : Nat.Coprime (Fintype.card ↥N) (index N)
h2 :
  ∀ (G' : Type u) [inst : Group G'] [inst_1 : Fintype G'],
    Fintype.card G' < Fintype.card G →
      ∀ {N' : Subgroup G'} [inst_2 : Normal N'], Nat.Coprime (Fintype.card ↥N') (index N') → ∃ H', IsComplement' N' H'
K : Subgroup G
hK : K ⊔ N = ⊤
h3 : K ≠ ⊤
h4 : index (comap (Subgroup.subtype K) N) = index N
h5 : Fintype.card ↥K < Fintype.card G
h6 : Nat.Coprime (Fintype.card ↥(comap (Subgroup.subtype K) N)) (index (comap (Subgroup.subtype K) N))
H : Subgroup ↥K
hH : Fintype.card ↥(map (Subgroup.subtype K) H) = index N
h7 : Fintype.card ↥N * Fintype.card ↥(map (Subgroup.subtype K) H) = Fintype.card G
⊢ Nat.Coprime (Fintype.card ↥N) (Fintype.card ↥(map (Subgroup.subtype K) H))

Next tactic:
rwa [hH]
/-- Do not use this lemma: It is made obsolete by `exists_right_complement'_of_coprime` -/
private theorem step1 (K : Subgroup G) (hK : K ⊔ N = ⊤) : K = ⊤ := by
  contrapose! h3
  have h4 : (N.comap K.subtype).index = N.index := by
    rw [← N.relindex_top_right, ← hK]
    exact (relindex_sup_right K N).symm
  have h5 : Fintype.card K < Fintype.card G := by
    rw [← K.index_mul_card]
    exact lt_mul_of_one_lt_left Fintype.card_pos (one_lt_index_of_ne_top h3)
  have h6 : Nat.Coprime (Fintype.card (N.comap K.subtype)) (N.comap K.subtype).index := by
    rw [h4]
    exact h1.coprime_dvd_left (card_comap_dvd_of_injective N K.subtype Subtype.coe_injective)
  obtain ⟨H, hH⟩ := h2 K h5 h6
  replace hH : Fintype.card (H.map K.subtype) = N.index := by
    rw [← relindex_bot_left_eq_card, ← relindex_comap, MonoidHom.comap_bot, Subgroup.ker_subtype,
      relindex_bot_left, ← IsComplement'.index_eq_card (IsComplement'.symm hH), index_comap,
      subtype_range, ← relindex_sup_right, hK, relindex_top_right]
  have h7 : Fintype.card N * Fintype.card (H.map K.subtype) = Fintype.card G := by
    rw [hH, ← N.index_mul_card, mul_comm]
  have h8 : (Fintype.card N).Coprime (Fintype.card (H.map K.subtype)) := by
    rwa [hH]
  

Proof state:
case intro
G : Type u
inst✝² : Group G
inst✝¹ : Fintype G
N : Subgroup G
inst✝ : Normal N
h1 : Nat.Coprime (Fintype.card ↥N) (index N)
h2 :
  ∀ (G' : Type u) [inst : Group G'] [inst_1 : Fintype G'],
    Fintype.card G' < Fintype.card G →
      ∀ {N' : Subgroup G'} [inst_2 : Normal N'], Nat.Coprime (Fintype.card ↥N') (index N') → ∃ H', IsComplement' N' H'
K : Subgroup G
hK : K ⊔ N = ⊤
h3 : K ≠ ⊤
h4 : index (comap (Subgroup.subtype K) N) = index N
h5 : Fintype.card ↥K < Fintype.card G
h6 : Nat.Coprime (Fintype.card ↥(comap (Subgroup.subtype K) N)) (index (comap (Subgroup.subtype K) N))
H : Subgroup ↥K
hH : Fintype.card ↥(map (Subgroup.subtype K) H) = index N
h7 : Fintype.card ↥N * Fintype.card ↥(map (Subgroup.subtype K) H) = Fintype.card G
h8 : Nat.Coprime (Fintype.card ↥N) (Fintype.card ↥(map (Subgroup.subtype K) H))
⊢ ∃ H, IsComplement' N H

Next tactic:
exact ⟨H.map K.subtype, isComplement'_of_coprime h7 h8⟩
/-- Do not use this lemma: It is made obsolete by `exists_right_complement'_of_coprime` -/
private theorem step2 (K : Subgroup G) [K.Normal] (hK : K ≤ N) : K = ⊥ ∨ K = N := by
  

Proof state:
G : Type u
inst✝³ : Group G
inst✝² : Fintype G
N : Subgroup G
inst✝¹ : Normal N
h1 : Nat.Coprime (Fintype.card ↥N) (index N)
h2 :
  ∀ (G' : Type u) [inst : Group G'] [inst_1 : Fintype G'],
    Fintype.card G' < Fintype.card G →
      ∀ {N' : Subgroup G'} [inst_2 : Normal N'], Nat.Coprime (Fintype.card ↥N') (index N') → ∃ H', IsComplement' N' H'
h3 : ∀ (H : Subgroup G), ¬IsComplement' N H
K : Subgroup G
inst✝ : Normal K
hK : K ≤ N
⊢ K = ⊥ ∨ K = N

Next tactic:
have : Function.Surjective (QuotientGroup.mk' K) := Quotient.surjective_Quotient_mk''
/-- Do not use this lemma: It is made obsolete by `exists_right_complement'_of_coprime` -/
private theorem step2 (K : Subgroup G) [K.Normal] (hK : K ≤ N) : K = ⊥ ∨ K = N := by
  have : Function.Surjective (QuotientGroup.mk' K) := Quotient.surjective_Quotient_mk''
  

Proof state:
G : Type u
inst✝³ : Group G
inst✝² : Fintype G
N : Subgroup G
inst✝¹ : Normal N
h1 : Nat.Coprime (Fintype.card ↥N) (index N)
h2 :
  ∀ (G' : Type u) [inst : Group G'] [inst_1 : Fintype G'],
    Fintype.card G' < Fintype.card G →
      ∀ {N' : Subgroup G'} [inst_2 : Normal N'], Nat.Coprime (Fintype.card ↥N') (index N') → ∃ H', IsComplement' N' H'
h3 : ∀ (H : Subgroup G), ¬IsComplement' N H
K : Subgroup G
inst✝ : Normal K
hK : K ≤ N
this : Function.Surjective ⇑(QuotientGroup.mk' K)
⊢ K = ⊥ ∨ K = N

Next tactic:
have h4 := step1 h1 h2 h3
/-- Do not use this lemma: It is made obsolete by `exists_right_complement'_of_coprime` -/
private theorem step2 (K : Subgroup G) [K.Normal] (hK : K ≤ N) : K = ⊥ ∨ K = N := by
  have : Function.Surjective (QuotientGroup.mk' K) := Quotient.surjective_Quotient_mk''
  have h4 := step1 h1 h2 h3
  

Proof state:
G : Type u
inst✝³ : Group G
inst✝² : Fintype G
N : Subgroup G
inst✝¹ : Normal N
h1 : Nat.Coprime (Fintype.card ↥N) (index N)
h2 :
  ∀ (G' : Type u) [inst : Group G'] [inst_1 : Fintype G'],
    Fintype.card G' < Fintype.card G →
      ∀ {N' : Subgroup G'} [inst_2 : Normal N'], Nat.Coprime (Fintype.card ↥N') (index N') → ∃ H', IsComplement' N' H'
h3 : ∀ (H : Subgroup G), ¬IsComplement' N H
K : Subgroup G
inst✝ : Normal K
hK : K ≤ N
this : Function.Surjective ⇑(QuotientGroup.mk' K)
h4 : ∀ (K : Subgroup G), K ⊔ N = ⊤ → K = ⊤
⊢ K = ⊥ ∨ K = N

Next tactic:
contrapose! h4
/-- Do not use this lemma: It is made obsolete by `exists_right_complement'_of_coprime` -/
private theorem step2 (K : Subgroup G) [K.Normal] (hK : K ≤ N) : K = ⊥ ∨ K = N := by
  have : Function.Surjective (QuotientGroup.mk' K) := Quotient.surjective_Quotient_mk''
  have h4 := step1 h1 h2 h3
  contrapose! h4
  

Proof state:
G : Type u
inst✝³ : Group G
inst✝² : Fintype G
N : Subgroup G
inst✝¹ : Normal N
h1 : Nat.Coprime (Fintype.card ↥N) (index N)
h2 :
  ∀ (G' : Type u) [inst : Group G'] [inst_1 : Fintype G'],
    Fintype.card G' < Fintype.card G →
      ∀ {N' : Subgroup G'} [inst_2 : Normal N'], Nat.Coprime (Fintype.card ↥N') (index N') → ∃ H', IsComplement' N' H'
h3 : ∀ (H : Subgroup G), ¬IsComplement' N H
K : Subgroup G
inst✝ : Normal K
hK : K ≤ N
this : Function.Surjective ⇑(QuotientGroup.mk' K)
h4 : K ≠ ⊥ ∧ K ≠ N
⊢ ∃ K, K ⊔ N = ⊤ ∧ K ≠ ⊤

Next tactic:
have h5 : Fintype.card (G ⧸ K) < Fintype.card G := by
    rw [← index_eq_card, ← K.index_mul_card]
    refine'
      lt_mul_of_one_lt_right (Nat.pos_of_ne_zero index_ne_zero_of_finite)
        (K.one_lt_card_iff_ne_bot.mpr h4.1)
/-- Do not use this lemma: It is made obsolete by `exists_right_complement'_of_coprime` -/
private theorem step2 (K : Subgroup G) [K.Normal] (hK : K ≤ N) : K = ⊥ ∨ K = N := by
  have : Function.Surjective (QuotientGroup.mk' K) := Quotient.surjective_Quotient_mk''
  have h4 := step1 h1 h2 h3
  contrapose! h4
  have h5 : Fintype.card (G ⧸ K) < Fintype.card G := by
    

Proof state:
G : Type u
inst✝³ : Group G
inst✝² : Fintype G
N : Subgroup G
inst✝¹ : Normal N
h1 : Nat.Coprime (Fintype.card ↥N) (index N)
h2 :
  ∀ (G' : Type u) [inst : Group G'] [inst_1 : Fintype G'],
    Fintype.card G' < Fintype.card G →
      ∀ {N' : Subgroup G'} [inst_2 : Normal N'], Nat.Coprime (Fintype.card ↥N') (index N') → ∃ H', IsComplement' N' H'
h3 : ∀ (H : Subgroup G), ¬IsComplement' N H
K : Subgroup G
inst✝ : Normal K
hK : K ≤ N
this : Function.Surjective ⇑(QuotientGroup.mk' K)
h4 : K ≠ ⊥ ∧ K ≠ N
⊢ Fintype.card (G ⧸ K) < Fintype.card G

Next tactic:
rw [← index_eq_card, ← K.index_mul_card]
/-- Do not use this lemma: It is made obsolete by `exists_right_complement'_of_coprime` -/
private theorem step2 (K : Subgroup G) [K.Normal] (hK : K ≤ N) : K = ⊥ ∨ K = N := by
  have : Function.Surjective (QuotientGroup.mk' K) := Quotient.surjective_Quotient_mk''
  have h4 := step1 h1 h2 h3
  contrapose! h4
  have h5 : Fintype.card (G ⧸ K) < Fintype.card G := by
    rw [← index_eq_card, ← K.index_mul_card]
    

Proof state:
G : Type u
inst✝³ : Group G
inst✝² : Fintype G
N : Subgroup G
inst✝¹ : Normal N
h1 : Nat.Coprime (Fintype.card ↥N) (index N)
h2 :
  ∀ (G' : Type u) [inst : Group G'] [inst_1 : Fintype G'],
    Fintype.card G' < Fintype.card G →
      ∀ {N' : Subgroup G'} [inst_2 : Normal N'], Nat.Coprime (Fintype.card ↥N') (index N') → ∃ H', IsComplement' N' H'
h3 : ∀ (H : Subgroup G), ¬IsComplement' N H
K : Subgroup G
inst✝ : Normal K
hK : K ≤ N
this : Function.Surjective ⇑(QuotientGroup.mk' K)
h4 : K ≠ ⊥ ∧ K ≠ N
⊢ index K < index K * Fintype.card ↥K

Next tactic:
refine'
      lt_mul_of_one_lt_right (Nat.pos_of_ne_zero index_ne_zero_of_finite)
        (K.one_lt_card_iff_ne_bot.mpr h4.1)