l3lab/ntp-mathlib huggingface dataset:
theorem CliqueFreeOn.mono (hmn : m ≤ n) (hG : G.CliqueFreeOn s m) : G.CliqueFreeOn s n := by
  rintro t hts ht
  obtain ⟨u, hut, hu⟩ := t.exists_smaller_set _ (hmn.trans ht.card_eq.ge)
  

Proof state:
case intro.intro
α : Type u_1
β : Type u_2
G H : SimpleGraph α
s s₁ s₂ : Set α
t✝ : Finset α
a b : α
m n : ℕ
hmn : m ≤ n
hG : CliqueFreeOn G s m
t : Finset α
hts : ↑t ⊆ s
ht : IsNClique G n t
u : Finset α
hut : u ⊆ t
hu : Finset.card u = m
⊢ False

Next tactic:
exact hG ((coe_subset.2 hut).trans hts) ⟨ht.clique.subset hut, hu⟩
@[simp]
theorem cliqueFreeOn_empty : G.CliqueFreeOn ∅ n ↔ n ≠ 0 := by
  

Proof state:
α : Type u_1
β : Type u_2
G H : SimpleGraph α
s s₁ s₂ : Set α
t : Finset α
a b : α
m n : ℕ
⊢ CliqueFreeOn G ∅ n ↔ n ≠ 0

Next tactic:
simp [CliqueFreeOn, Set.subset_empty_iff]
@[simp]
theorem cliqueFreeOn_singleton : G.CliqueFreeOn {a} n ↔ 1 < n := by
  

Proof state:
α : Type u_1
β : Type u_2
G H : SimpleGraph α
s s₁ s₂ : Set α
t : Finset α
a b : α
m n : ℕ
⊢ CliqueFreeOn G {a} n ↔ 1 < n

Next tactic:
obtain _ | _ | n := n
@[simp]
theorem cliqueFreeOn_singleton : G.CliqueFreeOn {a} n ↔ 1 < n := by
  obtain _ | _ | n := n <;>
    

Proof state:
case zero
α : Type u_1
β : Type u_2
G H : SimpleGraph α
s s₁ s₂ : Set α
t : Finset α
a b : α
m : ℕ
⊢ CliqueFreeOn G {a} Nat.zero ↔ 1 < Nat.zero

Next tactic:
simp [CliqueFreeOn, isNClique_iff, ← subset_singleton_iff', (Nat.succ_ne_zero _).symm]
@[simp]
theorem cliqueFreeOn_singleton : G.CliqueFreeOn {a} n ↔ 1 < n := by
  obtain _ | _ | n := n <;>
    

Proof state:
case succ.zero
α : Type u_1
β : Type u_2
G H : SimpleGraph α
s s₁ s₂ : Set α
t : Finset α
a b : α
m : ℕ
⊢ CliqueFreeOn G {a} (Nat.succ Nat.zero) ↔ 1 < Nat.succ Nat.zero

Next tactic:
simp [CliqueFreeOn, isNClique_iff, ← subset_singleton_iff', (Nat.succ_ne_zero _).symm]
@[simp]
theorem cliqueFreeOn_singleton : G.CliqueFreeOn {a} n ↔ 1 < n := by
  obtain _ | _ | n := n <;>
    

Proof state:
case succ.succ
α : Type u_1
β : Type u_2
G H : SimpleGraph α
s s₁ s₂ : Set α
t : Finset α
a b : α
m n : ℕ
⊢ CliqueFreeOn G {a} (Nat.succ (Nat.succ n)) ↔ 1 < Nat.succ (Nat.succ n)

Next tactic:
simp [CliqueFreeOn, isNClique_iff, ← subset_singleton_iff', (Nat.succ_ne_zero _).symm]
@[simp]
theorem cliqueFreeOn_univ : G.CliqueFreeOn Set.univ n ↔ G.CliqueFree n := by
  

Proof state:
α : Type u_1
β : Type u_2
G H : SimpleGraph α
s s₁ s₂ : Set α
t : Finset α
a b : α
m n : ℕ
⊢ CliqueFreeOn G Set.univ n ↔ CliqueFree G n

Next tactic:
simp [CliqueFree, CliqueFreeOn]
@[simp]
theorem cliqueFreeOn_two : G.CliqueFreeOn s 2 ↔ s.Pairwise (G.Adjᶜ) := by
  

Proof state:
α : Type u_1
β : Type u_2
G H : SimpleGraph α
s s₁ s₂ : Set α
t : Finset α
a b : α
m n : ℕ
⊢ CliqueFreeOn G s 2 ↔ Set.Pairwise s G.Adjᶜ

Next tactic:
classical
  refine' ⟨fun h a ha b hb _ hab => h _ ⟨by simpa [hab.ne], card_doubleton hab.ne⟩, _⟩
  · push_cast
    exact Set.insert_subset_iff.2 ⟨ha, Set.singleton_subset_iff.2 hb⟩
  simp only [CliqueFreeOn, isNClique_iff, card_eq_two, coe_subset, not_and, not_exists]
  rintro h t hst ht a b hab rfl
  simp only [coe_insert, coe_singleton, Set.insert_subset_iff, Set.singleton_subset_iff] at hst
  refine' h hst.1 hst.2 hab (ht _ _ hab) <;> simp
@[simp]
theorem cliqueFreeOn_two : G.CliqueFreeOn s 2 ↔ s.Pairwise (G.Adjᶜ) := by
  classical
  

Proof state:
α : Type u_1
β : Type u_2
G H : SimpleGraph α
s s₁ s₂ : Set α
t : Finset α
a b : α
m n : ℕ
⊢ CliqueFreeOn G s 2 ↔ Set.Pairwise s G.Adjᶜ

Next tactic:
refine' ⟨fun h a ha b hb _ hab => h _ ⟨by simpa [hab.ne], card_doubleton hab.ne⟩, _⟩
@[simp]
theorem cliqueFreeOn_two : G.CliqueFreeOn s 2 ↔ s.Pairwise (G.Adjᶜ) := by
  classical
  refine' ⟨fun h a ha b hb _ hab => h _ ⟨by 

Proof state:
α : Type u_1
β : Type u_2
G H : SimpleGraph α
s s₁ s₂ : Set α
t : Finset α
a✝ b✝ : α
m n : ℕ
h : CliqueFreeOn G s 2
a : α
ha : a ∈ s
b : α
hb : b ∈ s
x✝ : a ≠ b
hab : Adj G a b
⊢ IsClique G ↑{a, b}

Next tactic:
simpa [hab.ne]
@[simp]
theorem cliqueFreeOn_two : G.CliqueFreeOn s 2 ↔ s.Pairwise (G.Adjᶜ) := by
  classical
  refine' ⟨fun h a ha b hb _ hab => h _ ⟨by simpa [hab.ne], card_doubleton hab.ne⟩, _⟩
  · 

Proof state:
case refine'_1
α : Type u_1
β : Type u_2
G H : SimpleGraph α
s s₁ s₂ : Set α
t : Finset α
a✝ b✝ : α
m n : ℕ
h : CliqueFreeOn G s 2
a : α
ha : a ∈ s
b : α
hb : b ∈ s
x✝ : a ≠ b
hab : Adj G a b
⊢ ↑{a, b} ⊆ s

Next tactic:
push_cast
@[simp]
theorem cliqueFreeOn_two : G.CliqueFreeOn s 2 ↔ s.Pairwise (G.Adjᶜ) := by
  classical
  refine' ⟨fun h a ha b hb _ hab => h _ ⟨by simpa [hab.ne], card_doubleton hab.ne⟩, _⟩
  · push_cast
    

Proof state:
case refine'_1
α : Type u_1
β : Type u_2
G H : SimpleGraph α
s s₁ s₂ : Set α
t : Finset α
a✝ b✝ : α
m n : ℕ
h : CliqueFreeOn G s 2
a : α
ha : a ∈ s
b : α
hb : b ∈ s
x✝ : a ≠ b
hab : Adj G a b
⊢ {a, b} ⊆ s

Next tactic:
exact Set.insert_subset_iff.2 ⟨ha, Set.singleton_subset_iff.2 hb⟩
@[simp]
theorem cliqueFreeOn_two : G.CliqueFreeOn s 2 ↔ s.Pairwise (G.Adjᶜ) := by
  classical
  refine' ⟨fun h a ha b hb _ hab => h _ ⟨by simpa [hab.ne], card_doubleton hab.ne⟩, _⟩
  · push_cast
    exact Set.insert_subset_iff.2 ⟨ha, Set.singleton_subset_iff.2 hb⟩
  

Proof state:
case refine'_2
α : Type u_1
β : Type u_2
G H : SimpleGraph α
s s₁ s₂ : Set α
t : Finset α
a b : α
m n : ℕ
⊢ Set.Pairwise s G.Adjᶜ → CliqueFreeOn G s 2

Next tactic:
simp only [CliqueFreeOn, isNClique_iff, card_eq_two, coe_subset, not_and, not_exists]
@[simp]
theorem cliqueFreeOn_two : G.CliqueFreeOn s 2 ↔ s.Pairwise (G.Adjᶜ) := by
  classical
  refine' ⟨fun h a ha b hb _ hab => h _ ⟨by simpa [hab.ne], card_doubleton hab.ne⟩, _⟩
  · push_cast
    exact Set.insert_subset_iff.2 ⟨ha, Set.singleton_subset_iff.2 hb⟩
  simp only [CliqueFreeOn, isNClique_iff, card_eq_two, coe_subset, not_and, not_exists]
  

Proof state:
case refine'_2
α : Type u_1
β : Type u_2
G H : SimpleGraph α
s s₁ s₂ : Set α
t : Finset α
a b : α
m n : ℕ
⊢ Set.Pairwise s G.Adjᶜ → ∀ ⦃t : Finset α⦄, ↑t ⊆ s → IsClique G ↑t → ∀ (x x_1 : α), x ≠ x_1 → ¬t = {x, x_1}

Next tactic:
rintro h t hst ht a b hab rfl
@[simp]
theorem cliqueFreeOn_two : G.CliqueFreeOn s 2 ↔ s.Pairwise (G.Adjᶜ) := by
  classical
  refine' ⟨fun h a ha b hb _ hab => h _ ⟨by simpa [hab.ne], card_doubleton hab.ne⟩, _⟩
  · push_cast
    exact Set.insert_subset_iff.2 ⟨ha, Set.singleton_subset_iff.2 hb⟩
  simp only [CliqueFreeOn, isNClique_iff, card_eq_two, coe_subset, not_and, not_exists]
  rintro h t hst ht a b hab rfl
  

Proof state:
case refine'_2
α : Type u_1
β : Type u_2
G H : SimpleGraph α
s s₁ s₂ : Set α
t : Finset α
a✝ b✝ : α
m n : ℕ
h : Set.Pairwise s G.Adjᶜ
a b : α
hab : a ≠ b
hst : ↑{a, b} ⊆ s
ht : IsClique G ↑{a, b}
⊢ False

Next tactic:
simp only [coe_insert, coe_singleton, Set.insert_subset_iff, Set.singleton_subset_iff] at hst
@[simp]
theorem cliqueFreeOn_two : G.CliqueFreeOn s 2 ↔ s.Pairwise (G.Adjᶜ) := by
  classical
  refine' ⟨fun h a ha b hb _ hab => h _ ⟨by simpa [hab.ne], card_doubleton hab.ne⟩, _⟩
  · push_cast
    exact Set.insert_subset_iff.2 ⟨ha, Set.singleton_subset_iff.2 hb⟩
  simp only [CliqueFreeOn, isNClique_iff, card_eq_two, coe_subset, not_and, not_exists]
  rintro h t hst ht a b hab rfl
  simp only [coe_insert, coe_singleton, Set.insert_subset_iff, Set.singleton_subset_iff] at hst
  

Proof state:
case refine'_2
α : Type u_1
β : Type u_2
G H : SimpleGraph α
s s₁ s₂ : Set α
t : Finset α
a✝ b✝ : α
m n : ℕ
h : Set.Pairwise s G.Adjᶜ
a b : α
hab : a ≠ b
ht : IsClique G ↑{a, b}
hst : a ∈ s ∧ b ∈ s
⊢ False

Next tactic:
refine' h hst.1 hst.2 hab (ht _ _ hab)
@[simp]
theorem cliqueFreeOn_two : G.CliqueFreeOn s 2 ↔ s.Pairwise (G.Adjᶜ) := by
  classical
  refine' ⟨fun h a ha b hb _ hab => h _ ⟨by simpa [hab.ne], card_doubleton hab.ne⟩, _⟩
  · push_cast
    exact Set.insert_subset_iff.2 ⟨ha, Set.singleton_subset_iff.2 hb⟩
  simp only [CliqueFreeOn, isNClique_iff, card_eq_two, coe_subset, not_and, not_exists]
  rintro h t hst ht a b hab rfl
  simp only [coe_insert, coe_singleton, Set.insert_subset_iff, Set.singleton_subset_iff] at hst
  refine' h hst.1 hst.2 hab (ht _ _ hab) <;> 

Proof state:
case refine'_2.refine'_1
α : Type u_1
β : Type u_2
G H : SimpleGraph α
s s₁ s₂ : Set α
t : Finset α
a✝ b✝ : α
m n : ℕ
h : Set.Pairwise s G.Adjᶜ
a b : α
hab : a ≠ b
ht : IsClique G ↑{a, b}
hst : a ∈ s ∧ b ∈ s
⊢ a ∈ ↑{a, b}

Next tactic:
simp
@[simp]
theorem cliqueFreeOn_two : G.CliqueFreeOn s 2 ↔ s.Pairwise (G.Adjᶜ) := by
  classical
  refine' ⟨fun h a ha b hb _ hab => h _ ⟨by simpa [hab.ne], card_doubleton hab.ne⟩, _⟩
  · push_cast
    exact Set.insert_subset_iff.2 ⟨ha, Set.singleton_subset_iff.2 hb⟩
  simp only [CliqueFreeOn, isNClique_iff, card_eq_two, coe_subset, not_and, not_exists]
  rintro h t hst ht a b hab rfl
  simp only [coe_insert, coe_singleton, Set.insert_subset_iff, Set.singleton_subset_iff] at hst
  refine' h hst.1 hst.2 hab (ht _ _ hab) <;> 

Proof state:
case refine'_2.refine'_2
α : Type u_1
β : Type u_2
G H : SimpleGraph α
s s₁ s₂ : Set α
t : Finset α
a✝ b✝ : α
m n : ℕ
h : Set.Pairwise s G.Adjᶜ
a b : α
hab : a ≠ b
ht : IsClique G ↑{a, b}
hst : a ∈ s ∧ b ∈ s
⊢ b ∈ ↑{a, b}

Next tactic:
simp
theorem CliqueFreeOn.of_succ (hs : G.CliqueFreeOn s (n + 1)) (ha : a ∈ s) :
    G.CliqueFreeOn (s ∩ G.neighborSet a) n := by
  

Proof state:
α : Type u_1
β : Type u_2
G H : SimpleGraph α
s s₁ s₂ : Set α
t : Finset α
a b : α
m n : ℕ
hs : CliqueFreeOn G s (n + 1)
ha : a ∈ s
⊢ CliqueFreeOn G (s ∩ neighborSet G a) n

Next tactic:
classical
  refine' fun t hts ht => hs _ (ht.insert fun b hb => (hts hb).2)
  push_cast
  exact Set.insert_subset_iff.2 ⟨ha, hts.trans <| Set.inter_subset_left _ _⟩
theorem CliqueFreeOn.of_succ (hs : G.CliqueFreeOn s (n + 1)) (ha : a ∈ s) :
    G.CliqueFreeOn (s ∩ G.neighborSet a) n := by
  classical
  

Proof state:
α : Type u_1
β : Type u_2
G H : SimpleGraph α
s s₁ s₂ : Set α
t : Finset α
a b : α
m n : ℕ
hs : CliqueFreeOn G s (n + 1)
ha : a ∈ s
⊢ CliqueFreeOn G (s ∩ neighborSet G a) n

Next tactic:
refine' fun t hts ht => hs _ (ht.insert fun b hb => (hts hb).2)
theorem CliqueFreeOn.of_succ (hs : G.CliqueFreeOn s (n + 1)) (ha : a ∈ s) :
    G.CliqueFreeOn (s ∩ G.neighborSet a) n := by
  classical
  refine' fun t hts ht => hs _ (ht.insert fun b hb => (hts hb).2)
  

Proof state:
α : Type u_1
β : Type u_2
G H : SimpleGraph α
s s₁ s₂ : Set α
t✝ : Finset α
a b : α
m n : ℕ
hs : CliqueFreeOn G s (n + 1)
ha : a ∈ s
t : Finset α
hts : ↑t ⊆ s ∩ neighborSet G a
ht : IsNClique G n t
⊢ ↑(insert a t) ⊆ s

Next tactic:
push_cast
theorem CliqueFreeOn.of_succ (hs : G.CliqueFreeOn s (n + 1)) (ha : a ∈ s) :
    G.CliqueFreeOn (s ∩ G.neighborSet a) n := by
  classical
  refine' fun t hts ht => hs _ (ht.insert fun b hb => (hts hb).2)
  push_cast
  

Proof state:
α : Type u_1
β : Type u_2
G H : SimpleGraph α
s s₁ s₂ : Set α
t✝ : Finset α
a b : α
m n : ℕ
hs : CliqueFreeOn G s (n + 1)
ha : a ∈ s
t : Finset α
hts : ↑t ⊆ s ∩ neighborSet G a
ht : IsNClique G n t
⊢ insert a ↑t ⊆ s

Next tactic:
exact Set.insert_subset_iff.2 ⟨ha, hts.trans <| Set.inter_subset_left _ _⟩
@[simp]
theorem cliqueSet_eq_empty_iff : G.cliqueSet n = ∅ ↔ G.CliqueFree n := by
  

Proof state:
α : Type u_1
β : Type u_2
G H : SimpleGraph α
n : ℕ
a b c : α
s : Finset α
⊢ cliqueSet G n = ∅ ↔ CliqueFree G n

Next tactic:
simp_rw [CliqueFree, Set.eq_empty_iff_forall_not_mem, mem_cliqueSet_iff]
@[simp]
theorem cliqueSet_zero (G : SimpleGraph α) : G.cliqueSet 0 = {∅} := Set.ext fun s => by 

Proof state:
α : Type u_1
β : Type u_2
G✝ H : SimpleGraph α
n : ℕ
a b c : α
s✝ : Finset α
G : SimpleGraph α
s : Finset α
⊢ s ∈ cliqueSet G 0 ↔ s ∈ {∅}

Next tactic:
simp
@[simp]
theorem cliqueSet_one (G : SimpleGraph α) : G.cliqueSet 1 = Set.range singleton :=
  Set.ext fun s => by 

Proof state:
α : Type u_1
β : Type u_2
G✝ H : SimpleGraph α
n : ℕ
a b c : α
s✝ : Finset α
G : SimpleGraph α
s : Finset α
⊢ s ∈ cliqueSet G 1 ↔ s ∈ Set.range singleton

Next tactic:
simp [eq_comm]
@[simp]
theorem cliqueSet_map (hn : n ≠ 1) (G : SimpleGraph α) (f : α ↪ β) :
    (G.map f).cliqueSet n = map f '' G.cliqueSet n := by
  

Proof state:
α : Type u_1
β : Type u_2
G✝ H : SimpleGraph α
n : ℕ
a b c : α
s : Finset α
hn : n ≠ 1
G : SimpleGraph α
f : α ↪ β
⊢ cliqueSet (SimpleGraph.map f G) n = map f '' cliqueSet G n

Next tactic:
ext s
@[simp]
theorem cliqueSet_map (hn : n ≠ 1) (G : SimpleGraph α) (f : α ↪ β) :
    (G.map f).cliqueSet n = map f '' G.cliqueSet n := by
  ext s
  

Proof state:
case h
α : Type u_1
β : Type u_2
G✝ H : SimpleGraph α
n : ℕ
a b c : α
s✝ : Finset α
hn : n ≠ 1
G : SimpleGraph α
f : α ↪ β
s : Finset β
⊢ s ∈ cliqueSet (SimpleGraph.map f G) n ↔ s ∈ map f '' cliqueSet G n

Next tactic:
constructor
@[simp]
theorem cliqueSet_map (hn : n ≠ 1) (G : SimpleGraph α) (f : α ↪ β) :
    (G.map f).cliqueSet n = map f '' G.cliqueSet n := by
  ext s
  constructor
  · 

Proof state:
case h.mp
α : Type u_1
β : Type u_2
G✝ H : SimpleGraph α
n : ℕ
a b c : α
s✝ : Finset α
hn : n ≠ 1
G : SimpleGraph α
f : α ↪ β
s : Finset β
⊢ s ∈ cliqueSet (SimpleGraph.map f G) n → s ∈ map f '' cliqueSet G n

Next tactic:
rintro ⟨hs, rfl⟩
@[simp]
theorem cliqueSet_map (hn : n ≠ 1) (G : SimpleGraph α) (f : α ↪ β) :
    (G.map f).cliqueSet n = map f '' G.cliqueSet n := by
  ext s
  constructor
  · rintro ⟨hs, rfl⟩
    

Proof state:
case h.mp.mk
α : Type u_1
β : Type u_2
G✝ H : SimpleGraph α
a b c : α
s✝ : Finset α
G : SimpleGraph α
f : α ↪ β
s : Finset β
hs : IsClique (SimpleGraph.map f G) ↑s
hn : Finset.card s ≠ 1
⊢ s ∈ map f '' cliqueSet G (Finset.card s)

Next tactic:
have hs' : (s.preimage f <| f.injective.injOn _).map f = s := by
      classical
      rw [map_eq_image, image_preimage, filter_true_of_mem]
      rintro a ha
      obtain ⟨b, hb, hba⟩ := exists_mem_ne (hn.lt_of_le' <| Finset.card_pos.2 ⟨a, ha⟩) a
      obtain ⟨c, _, _, hc, _⟩ := hs ha hb hba.symm
      exact ⟨c, hc⟩
@[simp]
theorem cliqueSet_map (hn : n ≠ 1) (G : SimpleGraph α) (f : α ↪ β) :
    (G.map f).cliqueSet n = map f '' G.cliqueSet n := by
  ext s
  constructor
  · rintro ⟨hs, rfl⟩
    have hs' : (s.preimage f <| f.injective.injOn _).map f = s := by
      

Proof state:
α : Type u_1
β : Type u_2
G✝ H : SimpleGraph α
a b c : α
s✝ : Finset α
G : SimpleGraph α
f : α ↪ β
s : Finset β
hs : IsClique (SimpleGraph.map f G) ↑s
hn : Finset.card s ≠ 1
⊢ map f (preimage s ⇑f (_ : Set.InjOn (⇑f) (⇑f ⁻¹' ↑s))) = s

Next tactic:
classical
      rw [map_eq_image, image_preimage, filter_true_of_mem]
      rintro a ha
      obtain ⟨b, hb, hba⟩ := exists_mem_ne (hn.lt_of_le' <| Finset.card_pos.2 ⟨a, ha⟩) a
      obtain ⟨c, _, _, hc, _⟩ := hs ha hb hba.symm
      exact ⟨c, hc⟩
@[simp]
theorem cliqueSet_map (hn : n ≠ 1) (G : SimpleGraph α) (f : α ↪ β) :
    (G.map f).cliqueSet n = map f '' G.cliqueSet n := by
  ext s
  constructor
  · rintro ⟨hs, rfl⟩
    have hs' : (s.preimage f <| f.injective.injOn _).map f = s := by
      classical
      

Proof state:
α : Type u_1
β : Type u_2
G✝ H : SimpleGraph α
a b c : α
s✝ : Finset α
G : SimpleGraph α
f : α ↪ β
s : Finset β
hs : IsClique (SimpleGraph.map f G) ↑s
hn : Finset.card s ≠ 1
⊢ map f (preimage s ⇑f (_ : Set.InjOn (⇑f) (⇑f ⁻¹' ↑s))) = s

Next tactic:
rw [map_eq_image, image_preimage, filter_true_of_mem]
@[simp]
theorem cliqueSet_map (hn : n ≠ 1) (G : SimpleGraph α) (f : α ↪ β) :
    (G.map f).cliqueSet n = map f '' G.cliqueSet n := by
  ext s
  constructor
  · rintro ⟨hs, rfl⟩
    have hs' : (s.preimage f <| f.injective.injOn _).map f = s := by
      classical
      rw [map_eq_image, image_preimage, filter_true_of_mem]
      

Proof state:
α : Type u_1
β : Type u_2
G✝ H : SimpleGraph α
a b c : α
s✝ : Finset α
G : SimpleGraph α
f : α ↪ β
s : Finset β
hs : IsClique (SimpleGraph.map f G) ↑s
hn : Finset.card s ≠ 1
⊢ ∀ x ∈ s, x ∈ Set.range ⇑f

Next tactic:
rintro a ha
@[simp]
theorem cliqueSet_map (hn : n ≠ 1) (G : SimpleGraph α) (f : α ↪ β) :
    (G.map f).cliqueSet n = map f '' G.cliqueSet n := by
  ext s
  constructor
  · rintro ⟨hs, rfl⟩
    have hs' : (s.preimage f <| f.injective.injOn _).map f = s := by
      classical
      rw [map_eq_image, image_preimage, filter_true_of_mem]
      rintro a ha
      

Proof state:
α : Type u_1
β : Type u_2
G✝ H : SimpleGraph α
a✝ b c : α
s✝ : Finset α
G : SimpleGraph α
f : α ↪ β
s : Finset β
hs : IsClique (SimpleGraph.map f G) ↑s
hn : Finset.card s ≠ 1
a : β
ha : a ∈ s
⊢ a ∈ Set.range ⇑f

Next tactic:
obtain ⟨b, hb, hba⟩ := exists_mem_ne (hn.lt_of_le' <| Finset.card_pos.2 ⟨a, ha⟩) a
@[simp]
theorem cliqueSet_map (hn : n ≠ 1) (G : SimpleGraph α) (f : α ↪ β) :
    (G.map f).cliqueSet n = map f '' G.cliqueSet n := by
  ext s
  constructor
  · rintro ⟨hs, rfl⟩
    have hs' : (s.preimage f <| f.injective.injOn _).map f = s := by
      classical
      rw [map_eq_image, image_preimage, filter_true_of_mem]
      rintro a ha
      obtain ⟨b, hb, hba⟩ := exists_mem_ne (hn.lt_of_le' <| Finset.card_pos.2 ⟨a, ha⟩) a
      

Proof state:
case intro.intro
α : Type u_1
β : Type u_2
G✝ H : SimpleGraph α
a✝ b✝ c : α
s✝ : Finset α
G : SimpleGraph α
f : α ↪ β
s : Finset β
hs : IsClique (SimpleGraph.map f G) ↑s
hn : Finset.card s ≠ 1
a : β
ha : a ∈ s
b : β
hb : b ∈ s
hba : b ≠ a
⊢ a ∈ Set.range ⇑f

Next tactic:
obtain ⟨c, _, _, hc, _⟩ := hs ha hb hba.symm
@[simp]
theorem cliqueSet_map (hn : n ≠ 1) (G : SimpleGraph α) (f : α ↪ β) :
    (G.map f).cliqueSet n = map f '' G.cliqueSet n := by
  ext s
  constructor
  · rintro ⟨hs, rfl⟩
    have hs' : (s.preimage f <| f.injective.injOn _).map f = s := by
      classical
      rw [map_eq_image, image_preimage, filter_true_of_mem]
      rintro a ha
      obtain ⟨b, hb, hba⟩ := exists_mem_ne (hn.lt_of_le' <| Finset.card_pos.2 ⟨a, ha⟩) a
      obtain ⟨c, _, _, hc, _⟩ := hs ha hb hba.symm
      

Proof state:
case intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
G✝ H : SimpleGraph α
a✝ b✝ c✝ : α
s✝ : Finset α
G : SimpleGraph α
f : α ↪ β
s : Finset β
hs : IsClique (SimpleGraph.map f G) ↑s
hn : Finset.card s ≠ 1
a : β
ha : a ∈ s
b : β
hb : b ∈ s
hba : b ≠ a
c w✝ : α
left✝ : Adj G c w✝
hc : f c = a
right✝ : f w✝ = b
⊢ a ∈ Set.range ⇑f

Next tactic:
exact ⟨c, hc⟩
@[simp]
theorem cliqueSet_map (hn : n ≠ 1) (G : SimpleGraph α) (f : α ↪ β) :
    (G.map f).cliqueSet n = map f '' G.cliqueSet n := by
  ext s
  constructor
  · rintro ⟨hs, rfl⟩
    have hs' : (s.preimage f <| f.injective.injOn _).map f = s := by
      classical
      rw [map_eq_image, image_preimage, filter_true_of_mem]
      rintro a ha
      obtain ⟨b, hb, hba⟩ := exists_mem_ne (hn.lt_of_le' <| Finset.card_pos.2 ⟨a, ha⟩) a
      obtain ⟨c, _, _, hc, _⟩ := hs ha hb hba.symm
      exact ⟨c, hc⟩
    

Proof state:
case h.mp.mk
α : Type u_1
β : Type u_2
G✝ H : SimpleGraph α
a b c : α
s✝ : Finset α
G : SimpleGraph α
f : α ↪ β
s : Finset β
hs : IsClique (SimpleGraph.map f G) ↑s
hn : Finset.card s ≠ 1
hs' : map f (preimage s ⇑f (_ : Set.InjOn (⇑f) (⇑f ⁻¹' ↑s))) = s
⊢ s ∈ map f '' cliqueSet G (Finset.card s)

Next tactic:
refine' ⟨s.preimage f <| f.injective.injOn _, ⟨_, by rw [← card_map f, hs']⟩, hs'⟩
@[simp]
theorem cliqueSet_map (hn : n ≠ 1) (G : SimpleGraph α) (f : α ↪ β) :
    (G.map f).cliqueSet n = map f '' G.cliqueSet n := by
  ext s
  constructor
  · rintro ⟨hs, rfl⟩
    have hs' : (s.preimage f <| f.injective.injOn _).map f = s := by
      classical
      rw [map_eq_image, image_preimage, filter_true_of_mem]
      rintro a ha
      obtain ⟨b, hb, hba⟩ := exists_mem_ne (hn.lt_of_le' <| Finset.card_pos.2 ⟨a, ha⟩) a
      obtain ⟨c, _, _, hc, _⟩ := hs ha hb hba.symm
      exact ⟨c, hc⟩
    refine' ⟨s.preimage f <| f.injective.injOn _, ⟨_, by 

Proof state:
α : Type u_1
β : Type u_2
G✝ H : SimpleGraph α
a b c : α
s✝ : Finset α
G : SimpleGraph α
f : α ↪ β
s : Finset β
hs : IsClique (SimpleGraph.map f G) ↑s
hn : Finset.card s ≠ 1
hs' : map f (preimage s ⇑f (_ : Set.InjOn (⇑f) (⇑f ⁻¹' ↑s))) = s
⊢ Finset.card (preimage s ⇑f (_ : Set.InjOn (⇑f) (⇑f ⁻¹' ↑s))) = Finset.card s

Next tactic:
rw [← card_map f, hs']
@[simp]
theorem cliqueSet_map (hn : n ≠ 1) (G : SimpleGraph α) (f : α ↪ β) :
    (G.map f).cliqueSet n = map f '' G.cliqueSet n := by
  ext s
  constructor
  · rintro ⟨hs, rfl⟩
    have hs' : (s.preimage f <| f.injective.injOn _).map f = s := by
      classical
      rw [map_eq_image, image_preimage, filter_true_of_mem]
      rintro a ha
      obtain ⟨b, hb, hba⟩ := exists_mem_ne (hn.lt_of_le' <| Finset.card_pos.2 ⟨a, ha⟩) a
      obtain ⟨c, _, _, hc, _⟩ := hs ha hb hba.symm
      exact ⟨c, hc⟩
    refine' ⟨s.preimage f <| f.injective.injOn _, ⟨_, by rw [← card_map f, hs']⟩, hs'⟩
    

Proof state:
case h.mp.mk
α : Type u_1
β : Type u_2
G✝ H : SimpleGraph α
a b c : α
s✝ : Finset α
G : SimpleGraph α
f : α ↪ β
s : Finset β
hs : IsClique (SimpleGraph.map f G) ↑s
hn : Finset.card s ≠ 1
hs' : map f (preimage s ⇑f (_ : Set.InjOn (⇑f) (⇑f ⁻¹' ↑s))) = s
⊢ IsClique G ↑(preimage s ⇑f (_ : Set.InjOn (⇑f) (⇑f ⁻¹' ↑s)))

Next tactic:
rw [coe_preimage]
@[simp]
theorem cliqueSet_map (hn : n ≠ 1) (G : SimpleGraph α) (f : α ↪ β) :
    (G.map f).cliqueSet n = map f '' G.cliqueSet n := by
  ext s
  constructor
  · rintro ⟨hs, rfl⟩
    have hs' : (s.preimage f <| f.injective.injOn _).map f = s := by
      classical
      rw [map_eq_image, image_preimage, filter_true_of_mem]
      rintro a ha
      obtain ⟨b, hb, hba⟩ := exists_mem_ne (hn.lt_of_le' <| Finset.card_pos.2 ⟨a, ha⟩) a
      obtain ⟨c, _, _, hc, _⟩ := hs ha hb hba.symm
      exact ⟨c, hc⟩
    refine' ⟨s.preimage f <| f.injective.injOn _, ⟨_, by rw [← card_map f, hs']⟩, hs'⟩
    rw [coe_preimage]
    

Proof state:
case h.mp.mk
α : Type u_1
β : Type u_2
G✝ H : SimpleGraph α
a b c : α
s✝ : Finset α
G : SimpleGraph α
f : α ↪ β
s : Finset β
hs : IsClique (SimpleGraph.map f G) ↑s
hn : Finset.card s ≠ 1
hs' : map f (preimage s ⇑f (_ : Set.InjOn (⇑f) (⇑f ⁻¹' ↑s))) = s
⊢ IsClique G (⇑f ⁻¹' ↑s)

Next tactic:
exact fun a ha b hb hab => map_adj_apply.1 (hs ha hb <| f.injective.ne hab)
@[simp]
theorem cliqueSet_map (hn : n ≠ 1) (G : SimpleGraph α) (f : α ↪ β) :
    (G.map f).cliqueSet n = map f '' G.cliqueSet n := by
  ext s
  constructor
  · rintro ⟨hs, rfl⟩
    have hs' : (s.preimage f <| f.injective.injOn _).map f = s := by
      classical
      rw [map_eq_image, image_preimage, filter_true_of_mem]
      rintro a ha
      obtain ⟨b, hb, hba⟩ := exists_mem_ne (hn.lt_of_le' <| Finset.card_pos.2 ⟨a, ha⟩) a
      obtain ⟨c, _, _, hc, _⟩ := hs ha hb hba.symm
      exact ⟨c, hc⟩
    refine' ⟨s.preimage f <| f.injective.injOn _, ⟨_, by rw [← card_map f, hs']⟩, hs'⟩
    rw [coe_preimage]
    exact fun a ha b hb hab => map_adj_apply.1 (hs ha hb <| f.injective.ne hab)
  · 

Proof state:
case h.mpr
α : Type u_1
β : Type u_2
G✝ H : SimpleGraph α
n : ℕ
a b c : α
s✝ : Finset α
hn : n ≠ 1
G : SimpleGraph α
f : α ↪ β
s : Finset β
⊢ s ∈ map f '' cliqueSet G n → s ∈ cliqueSet (SimpleGraph.map f G) n

Next tactic:
rintro ⟨s, hs, rfl⟩
@[simp]
theorem cliqueSet_map (hn : n ≠ 1) (G : SimpleGraph α) (f : α ↪ β) :
    (G.map f).cliqueSet n = map f '' G.cliqueSet n := by
  ext s
  constructor
  · rintro ⟨hs, rfl⟩
    have hs' : (s.preimage f <| f.injective.injOn _).map f = s := by
      classical
      rw [map_eq_image, image_preimage, filter_true_of_mem]
      rintro a ha
      obtain ⟨b, hb, hba⟩ := exists_mem_ne (hn.lt_of_le' <| Finset.card_pos.2 ⟨a, ha⟩) a
      obtain ⟨c, _, _, hc, _⟩ := hs ha hb hba.symm
      exact ⟨c, hc⟩
    refine' ⟨s.preimage f <| f.injective.injOn _, ⟨_, by rw [← card_map f, hs']⟩, hs'⟩
    rw [coe_preimage]
    exact fun a ha b hb hab => map_adj_apply.1 (hs ha hb <| f.injective.ne hab)
  · rintro ⟨s, hs, rfl⟩
    

Proof state:
case h.mpr.intro.intro
α : Type u_1
β : Type u_2
G✝ H : SimpleGraph α
n : ℕ
a b c : α
s✝ : Finset α
hn : n ≠ 1
G : SimpleGraph α
f : α ↪ β
s : Finset α
hs : s ∈ cliqueSet G n
⊢ map f s ∈ cliqueSet (SimpleGraph.map f G) n

Next tactic:
exact hs.map
@[simp]
theorem cliqueSet_map_of_equiv (G : SimpleGraph α) (e : α ≃ β) (n : ℕ) :
    (G.map e.toEmbedding).cliqueSet n = map e.toEmbedding '' G.cliqueSet n := by
  

Proof state:
α : Type u_1
β : Type u_2
G✝ H : SimpleGraph α
n✝ : ℕ
a b c : α
s : Finset α
G : SimpleGraph α
e : α ≃ β
n : ℕ
⊢ cliqueSet (SimpleGraph.map (Equiv.toEmbedding e) G) n = map (Equiv.toEmbedding e) '' cliqueSet G n

Next tactic:
obtain rfl | hn := eq_or_ne n 1