l3lab/ntp-mathlib huggingface dataset:
theorem IsNClique.insert (hs : G.IsNClique n s) (h : ∀ b ∈ s, G.Adj a b) :
    G.IsNClique (n + 1) (insert a s) := by
  constructor
  · 

Proof state:
case clique
α : Type u_1
β : Type u_2
G H : SimpleGraph α
n : ℕ
s : Finset α
a b c : α
inst✝ : DecidableEq α
hs : IsNClique G n s
h : ∀ b ∈ s, Adj G a b
⊢ IsClique G ↑(Insert.insert a s)

Next tactic:
push_cast
theorem IsNClique.insert (hs : G.IsNClique n s) (h : ∀ b ∈ s, G.Adj a b) :
    G.IsNClique (n + 1) (insert a s) := by
  constructor
  · push_cast
    

Proof state:
case clique
α : Type u_1
β : Type u_2
G H : SimpleGraph α
n : ℕ
s : Finset α
a b c : α
inst✝ : DecidableEq α
hs : IsNClique G n s
h : ∀ b ∈ s, Adj G a b
⊢ IsClique G (Insert.insert a ↑s)

Next tactic:
exact hs.1.insert fun b hb _ => h _ hb
theorem IsNClique.insert (hs : G.IsNClique n s) (h : ∀ b ∈ s, G.Adj a b) :
    G.IsNClique (n + 1) (insert a s) := by
  constructor
  · push_cast
    exact hs.1.insert fun b hb _ => h _ hb
  · 

Proof state:
case card_eq
α : Type u_1
β : Type u_2
G H : SimpleGraph α
n : ℕ
s : Finset α
a b c : α
inst✝ : DecidableEq α
hs : IsNClique G n s
h : ∀ b ∈ s, Adj G a b
⊢ Finset.card (Insert.insert a s) = n + 1

Next tactic:
rw [card_insert_of_not_mem fun ha => (h _ ha).ne rfl, hs.2]
theorem is3Clique_triple_iff : G.IsNClique 3 {a, b, c} ↔ G.Adj a b ∧ G.Adj a c ∧ G.Adj b c := by
  

Proof state:
α : Type u_1
β : Type u_2
G H : SimpleGraph α
n : ℕ
s : Finset α
a b c : α
inst✝ : DecidableEq α
⊢ IsNClique G 3 {a, b, c} ↔ Adj G a b ∧ Adj G a c ∧ Adj G b c

Next tactic:
simp only [isNClique_iff, isClique_iff, Set.pairwise_insert_of_symmetric G.symm, coe_insert]
theorem is3Clique_triple_iff : G.IsNClique 3 {a, b, c} ↔ G.Adj a b ∧ G.Adj a c ∧ G.Adj b c := by
  simp only [isNClique_iff, isClique_iff, Set.pairwise_insert_of_symmetric G.symm, coe_insert]
  

Proof state:
α : Type u_1
β : Type u_2
G H : SimpleGraph α
n : ℕ
s : Finset α
a b c : α
inst✝ : DecidableEq α
⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ b_1 ∈ ↑{c}, b ≠ b_1 → Adj G b b_1) ∧ ∀ b_1 ∈ insert b ↑{c}, a ≠ b_1 → Adj G a b_1) ∧
      Finset.card {a, b, c} = 3 ↔
    Adj G a b ∧ Adj G a c ∧ Adj G b c

Next tactic:
by_cases hab : a = b
theorem is3Clique_triple_iff : G.IsNClique 3 {a, b, c} ↔ G.Adj a b ∧ G.Adj a c ∧ G.Adj b c := by
  simp only [isNClique_iff, isClique_iff, Set.pairwise_insert_of_symmetric G.symm, coe_insert]
  by_cases hab : a = b <;> 

Proof state:
case pos
α : Type u_1
β : Type u_2
G H : SimpleGraph α
n : ℕ
s : Finset α
a b c : α
inst✝ : DecidableEq α
hab : a = b
⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ b_1 ∈ ↑{c}, b ≠ b_1 → Adj G b b_1) ∧ ∀ b_1 ∈ insert b ↑{c}, a ≠ b_1 → Adj G a b_1) ∧
      Finset.card {a, b, c} = 3 ↔
    Adj G a b ∧ Adj G a c ∧ Adj G b c

Next tactic:
by_cases hbc : b = c
theorem is3Clique_triple_iff : G.IsNClique 3 {a, b, c} ↔ G.Adj a b ∧ G.Adj a c ∧ G.Adj b c := by
  simp only [isNClique_iff, isClique_iff, Set.pairwise_insert_of_symmetric G.symm, coe_insert]
  by_cases hab : a = b <;> 

Proof state:
case neg
α : Type u_1
β : Type u_2
G H : SimpleGraph α
n : ℕ
s : Finset α
a b c : α
inst✝ : DecidableEq α
hab : ¬a = b
⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ b_1 ∈ ↑{c}, b ≠ b_1 → Adj G b b_1) ∧ ∀ b_1 ∈ insert b ↑{c}, a ≠ b_1 → Adj G a b_1) ∧
      Finset.card {a, b, c} = 3 ↔
    Adj G a b ∧ Adj G a c ∧ Adj G b c

Next tactic:
by_cases hbc : b = c
theorem is3Clique_triple_iff : G.IsNClique 3 {a, b, c} ↔ G.Adj a b ∧ G.Adj a c ∧ G.Adj b c := by
  simp only [isNClique_iff, isClique_iff, Set.pairwise_insert_of_symmetric G.symm, coe_insert]
  by_cases hab : a = b <;> by_cases hbc : b = c <;> 

Proof state:
case pos
α : Type u_1
β : Type u_2
G H : SimpleGraph α
n : ℕ
s : Finset α
a b c : α
inst✝ : DecidableEq α
hab : a = b
hbc : b = c
⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ b_1 ∈ ↑{c}, b ≠ b_1 → Adj G b b_1) ∧ ∀ b_1 ∈ insert b ↑{c}, a ≠ b_1 → Adj G a b_1) ∧
      Finset.card {a, b, c} = 3 ↔
    Adj G a b ∧ Adj G a c ∧ Adj G b c

Next tactic:
by_cases hac : a = c
theorem is3Clique_triple_iff : G.IsNClique 3 {a, b, c} ↔ G.Adj a b ∧ G.Adj a c ∧ G.Adj b c := by
  simp only [isNClique_iff, isClique_iff, Set.pairwise_insert_of_symmetric G.symm, coe_insert]
  by_cases hab : a = b <;> by_cases hbc : b = c <;> 

Proof state:
case neg
α : Type u_1
β : Type u_2
G H : SimpleGraph α
n : ℕ
s : Finset α
a b c : α
inst✝ : DecidableEq α
hab : a = b
hbc : ¬b = c
⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ b_1 ∈ ↑{c}, b ≠ b_1 → Adj G b b_1) ∧ ∀ b_1 ∈ insert b ↑{c}, a ≠ b_1 → Adj G a b_1) ∧
      Finset.card {a, b, c} = 3 ↔
    Adj G a b ∧ Adj G a c ∧ Adj G b c

Next tactic:
by_cases hac : a = c
theorem is3Clique_triple_iff : G.IsNClique 3 {a, b, c} ↔ G.Adj a b ∧ G.Adj a c ∧ G.Adj b c := by
  simp only [isNClique_iff, isClique_iff, Set.pairwise_insert_of_symmetric G.symm, coe_insert]
  by_cases hab : a = b <;> by_cases hbc : b = c <;> 

Proof state:
case pos
α : Type u_1
β : Type u_2
G H : SimpleGraph α
n : ℕ
s : Finset α
a b c : α
inst✝ : DecidableEq α
hab : ¬a = b
hbc : b = c
⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ b_1 ∈ ↑{c}, b ≠ b_1 → Adj G b b_1) ∧ ∀ b_1 ∈ insert b ↑{c}, a ≠ b_1 → Adj G a b_1) ∧
      Finset.card {a, b, c} = 3 ↔
    Adj G a b ∧ Adj G a c ∧ Adj G b c

Next tactic:
by_cases hac : a = c
theorem is3Clique_triple_iff : G.IsNClique 3 {a, b, c} ↔ G.Adj a b ∧ G.Adj a c ∧ G.Adj b c := by
  simp only [isNClique_iff, isClique_iff, Set.pairwise_insert_of_symmetric G.symm, coe_insert]
  by_cases hab : a = b <;> by_cases hbc : b = c <;> 

Proof state:
case neg
α : Type u_1
β : Type u_2
G H : SimpleGraph α
n : ℕ
s : Finset α
a b c : α
inst✝ : DecidableEq α
hab : ¬a = b
hbc : ¬b = c
⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ b_1 ∈ ↑{c}, b ≠ b_1 → Adj G b b_1) ∧ ∀ b_1 ∈ insert b ↑{c}, a ≠ b_1 → Adj G a b_1) ∧
      Finset.card {a, b, c} = 3 ↔
    Adj G a b ∧ Adj G a c ∧ Adj G b c

Next tactic:
by_cases hac : a = c
theorem is3Clique_triple_iff : G.IsNClique 3 {a, b, c} ↔ G.Adj a b ∧ G.Adj a c ∧ G.Adj b c := by
  simp only [isNClique_iff, isClique_iff, Set.pairwise_insert_of_symmetric G.symm, coe_insert]
  by_cases hab : a = b <;> by_cases hbc : b = c <;> by_cases hac : a = c <;> 

Proof state:
case pos
α : Type u_1
β : Type u_2
G H : SimpleGraph α
n : ℕ
s : Finset α
a b c : α
inst✝ : DecidableEq α
hab : a = b
hbc : b = c
hac : a = c
⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ b_1 ∈ ↑{c}, b ≠ b_1 → Adj G b b_1) ∧ ∀ b_1 ∈ insert b ↑{c}, a ≠ b_1 → Adj G a b_1) ∧
      Finset.card {a, b, c} = 3 ↔
    Adj G a b ∧ Adj G a c ∧ Adj G b c

Next tactic:
subst_vars
theorem is3Clique_triple_iff : G.IsNClique 3 {a, b, c} ↔ G.Adj a b ∧ G.Adj a c ∧ G.Adj b c := by
  simp only [isNClique_iff, isClique_iff, Set.pairwise_insert_of_symmetric G.symm, coe_insert]
  by_cases hab : a = b <;> by_cases hbc : b = c <;> by_cases hac : a = c <;> 

Proof state:
case neg
α : Type u_1
β : Type u_2
G H : SimpleGraph α
n : ℕ
s : Finset α
a b c : α
inst✝ : DecidableEq α
hab : a = b
hbc : b = c
hac : ¬a = c
⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ b_1 ∈ ↑{c}, b ≠ b_1 → Adj G b b_1) ∧ ∀ b_1 ∈ insert b ↑{c}, a ≠ b_1 → Adj G a b_1) ∧
      Finset.card {a, b, c} = 3 ↔
    Adj G a b ∧ Adj G a c ∧ Adj G b c

Next tactic:
subst_vars
theorem is3Clique_triple_iff : G.IsNClique 3 {a, b, c} ↔ G.Adj a b ∧ G.Adj a c ∧ G.Adj b c := by
  simp only [isNClique_iff, isClique_iff, Set.pairwise_insert_of_symmetric G.symm, coe_insert]
  by_cases hab : a = b <;> by_cases hbc : b = c <;> by_cases hac : a = c <;> 

Proof state:
case pos
α : Type u_1
β : Type u_2
G H : SimpleGraph α
n : ℕ
s : Finset α
a b c : α
inst✝ : DecidableEq α
hab : a = b
hbc : ¬b = c
hac : a = c
⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ b_1 ∈ ↑{c}, b ≠ b_1 → Adj G b b_1) ∧ ∀ b_1 ∈ insert b ↑{c}, a ≠ b_1 → Adj G a b_1) ∧
      Finset.card {a, b, c} = 3 ↔
    Adj G a b ∧ Adj G a c ∧ Adj G b c

Next tactic:
subst_vars
theorem is3Clique_triple_iff : G.IsNClique 3 {a, b, c} ↔ G.Adj a b ∧ G.Adj a c ∧ G.Adj b c := by
  simp only [isNClique_iff, isClique_iff, Set.pairwise_insert_of_symmetric G.symm, coe_insert]
  by_cases hab : a = b <;> by_cases hbc : b = c <;> by_cases hac : a = c <;> 

Proof state:
case neg
α : Type u_1
β : Type u_2
G H : SimpleGraph α
n : ℕ
s : Finset α
a b c : α
inst✝ : DecidableEq α
hab : a = b
hbc : ¬b = c
hac : ¬a = c
⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ b_1 ∈ ↑{c}, b ≠ b_1 → Adj G b b_1) ∧ ∀ b_1 ∈ insert b ↑{c}, a ≠ b_1 → Adj G a b_1) ∧
      Finset.card {a, b, c} = 3 ↔
    Adj G a b ∧ Adj G a c ∧ Adj G b c

Next tactic:
subst_vars
theorem is3Clique_triple_iff : G.IsNClique 3 {a, b, c} ↔ G.Adj a b ∧ G.Adj a c ∧ G.Adj b c := by
  simp only [isNClique_iff, isClique_iff, Set.pairwise_insert_of_symmetric G.symm, coe_insert]
  by_cases hab : a = b <;> by_cases hbc : b = c <;> by_cases hac : a = c <;> 

Proof state:
case pos
α : Type u_1
β : Type u_2
G H : SimpleGraph α
n : ℕ
s : Finset α
a b c : α
inst✝ : DecidableEq α
hab : ¬a = b
hbc : b = c
hac : a = c
⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ b_1 ∈ ↑{c}, b ≠ b_1 → Adj G b b_1) ∧ ∀ b_1 ∈ insert b ↑{c}, a ≠ b_1 → Adj G a b_1) ∧
      Finset.card {a, b, c} = 3 ↔
    Adj G a b ∧ Adj G a c ∧ Adj G b c

Next tactic:
subst_vars
theorem is3Clique_triple_iff : G.IsNClique 3 {a, b, c} ↔ G.Adj a b ∧ G.Adj a c ∧ G.Adj b c := by
  simp only [isNClique_iff, isClique_iff, Set.pairwise_insert_of_symmetric G.symm, coe_insert]
  by_cases hab : a = b <;> by_cases hbc : b = c <;> by_cases hac : a = c <;> 

Proof state:
case neg
α : Type u_1
β : Type u_2
G H : SimpleGraph α
n : ℕ
s : Finset α
a b c : α
inst✝ : DecidableEq α
hab : ¬a = b
hbc : b = c
hac : ¬a = c
⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ b_1 ∈ ↑{c}, b ≠ b_1 → Adj G b b_1) ∧ ∀ b_1 ∈ insert b ↑{c}, a ≠ b_1 → Adj G a b_1) ∧
      Finset.card {a, b, c} = 3 ↔
    Adj G a b ∧ Adj G a c ∧ Adj G b c

Next tactic:
subst_vars
theorem is3Clique_triple_iff : G.IsNClique 3 {a, b, c} ↔ G.Adj a b ∧ G.Adj a c ∧ G.Adj b c := by
  simp only [isNClique_iff, isClique_iff, Set.pairwise_insert_of_symmetric G.symm, coe_insert]
  by_cases hab : a = b <;> by_cases hbc : b = c <;> by_cases hac : a = c <;> 

Proof state:
case pos
α : Type u_1
β : Type u_2
G H : SimpleGraph α
n : ℕ
s : Finset α
a b c : α
inst✝ : DecidableEq α
hab : ¬a = b
hbc : ¬b = c
hac : a = c
⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ b_1 ∈ ↑{c}, b ≠ b_1 → Adj G b b_1) ∧ ∀ b_1 ∈ insert b ↑{c}, a ≠ b_1 → Adj G a b_1) ∧
      Finset.card {a, b, c} = 3 ↔
    Adj G a b ∧ Adj G a c ∧ Adj G b c

Next tactic:
subst_vars
theorem is3Clique_triple_iff : G.IsNClique 3 {a, b, c} ↔ G.Adj a b ∧ G.Adj a c ∧ G.Adj b c := by
  simp only [isNClique_iff, isClique_iff, Set.pairwise_insert_of_symmetric G.symm, coe_insert]
  by_cases hab : a = b <;> by_cases hbc : b = c <;> by_cases hac : a = c <;> 

Proof state:
case neg
α : Type u_1
β : Type u_2
G H : SimpleGraph α
n : ℕ
s : Finset α
a b c : α
inst✝ : DecidableEq α
hab : ¬a = b
hbc : ¬b = c
hac : ¬a = c
⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ b_1 ∈ ↑{c}, b ≠ b_1 → Adj G b b_1) ∧ ∀ b_1 ∈ insert b ↑{c}, a ≠ b_1 → Adj G a b_1) ∧
      Finset.card {a, b, c} = 3 ↔
    Adj G a b ∧ Adj G a c ∧ Adj G b c

Next tactic:
subst_vars
theorem is3Clique_triple_iff : G.IsNClique 3 {a, b, c} ↔ G.Adj a b ∧ G.Adj a c ∧ G.Adj b c := by
  simp only [isNClique_iff, isClique_iff, Set.pairwise_insert_of_symmetric G.symm, coe_insert]
  by_cases hab : a = b <;> by_cases hbc : b = c <;> by_cases hac : a = c <;> subst_vars <;>
    

Proof state:
case pos
α : Type u_1
β : Type u_2
G H : SimpleGraph α
n : ℕ
s : Finset α
c : α
inst✝ : DecidableEq α
hac : c = c
⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ b ∈ ↑{c}, c ≠ b → Adj G c b) ∧ ∀ b ∈ insert c ↑{c}, c ≠ b → Adj G c b) ∧
      Finset.card {c, c, c} = 3 ↔
    Adj G c c ∧ Adj G c c ∧ Adj G c c

Next tactic:
simp [G.ne_of_adj, and_rotate, *]
theorem is3Clique_triple_iff : G.IsNClique 3 {a, b, c} ↔ G.Adj a b ∧ G.Adj a c ∧ G.Adj b c := by
  simp only [isNClique_iff, isClique_iff, Set.pairwise_insert_of_symmetric G.symm, coe_insert]
  by_cases hab : a = b <;> by_cases hbc : b = c <;> by_cases hac : a = c <;> subst_vars <;>
    

Proof state:
case neg
α : Type u_1
β : Type u_2
G H : SimpleGraph α
n : ℕ
s : Finset α
c : α
inst✝ : DecidableEq α
hac : ¬c = c
⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ b ∈ ↑{c}, c ≠ b → Adj G c b) ∧ ∀ b ∈ insert c ↑{c}, c ≠ b → Adj G c b) ∧
      Finset.card {c, c, c} = 3 ↔
    Adj G c c ∧ Adj G c c ∧ Adj G c c

Next tactic:
simp [G.ne_of_adj, and_rotate, *]
theorem is3Clique_triple_iff : G.IsNClique 3 {a, b, c} ↔ G.Adj a b ∧ G.Adj a c ∧ G.Adj b c := by
  simp only [isNClique_iff, isClique_iff, Set.pairwise_insert_of_symmetric G.symm, coe_insert]
  by_cases hab : a = b <;> by_cases hbc : b = c <;> by_cases hac : a = c <;> subst_vars <;>
    

Proof state:
case pos
α : Type u_1
β : Type u_2
G H : SimpleGraph α
n : ℕ
s : Finset α
c : α
inst✝ : DecidableEq α
hbc : ¬c = c
⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ b ∈ ↑{c}, c ≠ b → Adj G c b) ∧ ∀ b ∈ insert c ↑{c}, c ≠ b → Adj G c b) ∧
      Finset.card {c, c, c} = 3 ↔
    Adj G c c ∧ Adj G c c ∧ Adj G c c

Next tactic:
simp [G.ne_of_adj, and_rotate, *]
theorem is3Clique_triple_iff : G.IsNClique 3 {a, b, c} ↔ G.Adj a b ∧ G.Adj a c ∧ G.Adj b c := by
  simp only [isNClique_iff, isClique_iff, Set.pairwise_insert_of_symmetric G.symm, coe_insert]
  by_cases hab : a = b <;> by_cases hbc : b = c <;> by_cases hac : a = c <;> subst_vars <;>
    

Proof state:
case neg
α : Type u_1
β : Type u_2
G H : SimpleGraph α
n : ℕ
s : Finset α
b c : α
inst✝ : DecidableEq α
hbc hac : ¬b = c
⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ b_1 ∈ ↑{c}, b ≠ b_1 → Adj G b b_1) ∧ ∀ b_1 ∈ insert b ↑{c}, b ≠ b_1 → Adj G b b_1) ∧
      Finset.card {b, b, c} = 3 ↔
    Adj G b b ∧ Adj G b c ∧ Adj G b c

Next tactic:
simp [G.ne_of_adj, and_rotate, *]
theorem is3Clique_triple_iff : G.IsNClique 3 {a, b, c} ↔ G.Adj a b ∧ G.Adj a c ∧ G.Adj b c := by
  simp only [isNClique_iff, isClique_iff, Set.pairwise_insert_of_symmetric G.symm, coe_insert]
  by_cases hab : a = b <;> by_cases hbc : b = c <;> by_cases hac : a = c <;> subst_vars <;>
    

Proof state:
case pos
α : Type u_1
β : Type u_2
G H : SimpleGraph α
n : ℕ
s : Finset α
c : α
inst✝ : DecidableEq α
hab : ¬c = c
⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ b ∈ ↑{c}, c ≠ b → Adj G c b) ∧ ∀ b ∈ insert c ↑{c}, c ≠ b → Adj G c b) ∧
      Finset.card {c, c, c} = 3 ↔
    Adj G c c ∧ Adj G c c ∧ Adj G c c

Next tactic:
simp [G.ne_of_adj, and_rotate, *]
theorem is3Clique_triple_iff : G.IsNClique 3 {a, b, c} ↔ G.Adj a b ∧ G.Adj a c ∧ G.Adj b c := by
  simp only [isNClique_iff, isClique_iff, Set.pairwise_insert_of_symmetric G.symm, coe_insert]
  by_cases hab : a = b <;> by_cases hbc : b = c <;> by_cases hac : a = c <;> subst_vars <;>
    

Proof state:
case neg
α : Type u_1
β : Type u_2
G H : SimpleGraph α
n : ℕ
s : Finset α
a c : α
inst✝ : DecidableEq α
hac hab : ¬a = c
⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ b ∈ ↑{c}, c ≠ b → Adj G c b) ∧ ∀ b ∈ insert c ↑{c}, a ≠ b → Adj G a b) ∧
      Finset.card {a, c, c} = 3 ↔
    Adj G a c ∧ Adj G a c ∧ Adj G c c

Next tactic:
simp [G.ne_of_adj, and_rotate, *]
theorem is3Clique_triple_iff : G.IsNClique 3 {a, b, c} ↔ G.Adj a b ∧ G.Adj a c ∧ G.Adj b c := by
  simp only [isNClique_iff, isClique_iff, Set.pairwise_insert_of_symmetric G.symm, coe_insert]
  by_cases hab : a = b <;> by_cases hbc : b = c <;> by_cases hac : a = c <;> subst_vars <;>
    

Proof state:
case pos
α : Type u_1
β : Type u_2
G H : SimpleGraph α
n : ℕ
s : Finset α
b c : α
inst✝ : DecidableEq α
hbc : ¬b = c
hab : ¬c = b
⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ b_1 ∈ ↑{c}, b ≠ b_1 → Adj G b b_1) ∧ ∀ b_1 ∈ insert b ↑{c}, c ≠ b_1 → Adj G c b_1) ∧
      Finset.card {c, b, c} = 3 ↔
    Adj G c b ∧ Adj G c c ∧ Adj G b c

Next tactic:
simp [G.ne_of_adj, and_rotate, *]
theorem is3Clique_triple_iff : G.IsNClique 3 {a, b, c} ↔ G.Adj a b ∧ G.Adj a c ∧ G.Adj b c := by
  simp only [isNClique_iff, isClique_iff, Set.pairwise_insert_of_symmetric G.symm, coe_insert]
  by_cases hab : a = b <;> by_cases hbc : b = c <;> by_cases hac : a = c <;> subst_vars <;>
    

Proof state:
case neg
α : Type u_1
β : Type u_2
G H : SimpleGraph α
n : ℕ
s : Finset α
a b c : α
inst✝ : DecidableEq α
hab : ¬a = b
hbc : ¬b = c
hac : ¬a = c
⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ b_1 ∈ ↑{c}, b ≠ b_1 → Adj G b b_1) ∧ ∀ b_1 ∈ insert b ↑{c}, a ≠ b_1 → Adj G a b_1) ∧
      Finset.card {a, b, c} = 3 ↔
    Adj G a b ∧ Adj G a c ∧ Adj G b c

Next tactic:
simp [G.ne_of_adj, and_rotate, *]
theorem is3Clique_iff :
    G.IsNClique 3 s ↔ ∃ a b c, G.Adj a b ∧ G.Adj a c ∧ G.Adj b c ∧ s = {a, b, c} := by
  

Proof state:
α : Type u_1
β : Type u_2
G H : SimpleGraph α
n : ℕ
s : Finset α
a b c : α
inst✝ : DecidableEq α
⊢ IsNClique G 3 s ↔ ∃ a b c, Adj G a b ∧ Adj G a c ∧ Adj G b c ∧ s = {a, b, c}

Next tactic:
refine' ⟨fun h ↦ _, _⟩
theorem is3Clique_iff :
    G.IsNClique 3 s ↔ ∃ a b c, G.Adj a b ∧ G.Adj a c ∧ G.Adj b c ∧ s = {a, b, c} := by
  refine' ⟨fun h ↦ _, _⟩
  · 

Proof state:
case refine'_1
α : Type u_1
β : Type u_2
G H : SimpleGraph α
n : ℕ
s : Finset α
a b c : α
inst✝ : DecidableEq α
h : IsNClique G 3 s
⊢ ∃ a b c, Adj G a b ∧ Adj G a c ∧ Adj G b c ∧ s = {a, b, c}

Next tactic:
obtain ⟨a, b, c, -, -, -, hs⟩ := card_eq_three.1 h.card_eq
theorem is3Clique_iff :
    G.IsNClique 3 s ↔ ∃ a b c, G.Adj a b ∧ G.Adj a c ∧ G.Adj b c ∧ s = {a, b, c} := by
  refine' ⟨fun h ↦ _, _⟩
  · obtain ⟨a, b, c, -, -, -, hs⟩ := card_eq_three.1 h.card_eq
    

Proof state:
case refine'_1.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
G H : SimpleGraph α
n : ℕ
s : Finset α
a✝ b✝ c✝ : α
inst✝ : DecidableEq α
h : IsNClique G 3 s
a b c : α
hs : s = {a, b, c}
⊢ ∃ a b c, Adj G a b ∧ Adj G a c ∧ Adj G b c ∧ s = {a, b, c}

Next tactic:
refine' ⟨a, b, c, _⟩
theorem is3Clique_iff :
    G.IsNClique 3 s ↔ ∃ a b c, G.Adj a b ∧ G.Adj a c ∧ G.Adj b c ∧ s = {a, b, c} := by
  refine' ⟨fun h ↦ _, _⟩
  · obtain ⟨a, b, c, -, -, -, hs⟩ := card_eq_three.1 h.card_eq
    refine' ⟨a, b, c, _⟩
    

Proof state:
case refine'_1.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
G H : SimpleGraph α
n : ℕ
s : Finset α
a✝ b✝ c✝ : α
inst✝ : DecidableEq α
h : IsNClique G 3 s
a b c : α
hs : s = {a, b, c}
⊢ Adj G a b ∧ Adj G a c ∧ Adj G b c ∧ s = {a, b, c}

Next tactic:
rwa [hs, eq_self_iff_true, and_true, is3Clique_triple_iff.symm, ← hs]
theorem is3Clique_iff :
    G.IsNClique 3 s ↔ ∃ a b c, G.Adj a b ∧ G.Adj a c ∧ G.Adj b c ∧ s = {a, b, c} := by
  refine' ⟨fun h ↦ _, _⟩
  · obtain ⟨a, b, c, -, -, -, hs⟩ := card_eq_three.1 h.card_eq
    refine' ⟨a, b, c, _⟩
    rwa [hs, eq_self_iff_true, and_true, is3Clique_triple_iff.symm, ← hs]
  · 

Proof state:
case refine'_2
α : Type u_1
β : Type u_2
G H : SimpleGraph α
n : ℕ
s : Finset α
a b c : α
inst✝ : DecidableEq α
⊢ (∃ a b c, Adj G a b ∧ Adj G a c ∧ Adj G b c ∧ s = {a, b, c}) → IsNClique G 3 s

Next tactic:
rintro ⟨a, b, c, hab, hbc, hca, rfl⟩
theorem is3Clique_iff :
    G.IsNClique 3 s ↔ ∃ a b c, G.Adj a b ∧ G.Adj a c ∧ G.Adj b c ∧ s = {a, b, c} := by
  refine' ⟨fun h ↦ _, _⟩
  · obtain ⟨a, b, c, -, -, -, hs⟩ := card_eq_three.1 h.card_eq
    refine' ⟨a, b, c, _⟩
    rwa [hs, eq_self_iff_true, and_true, is3Clique_triple_iff.symm, ← hs]
  · rintro ⟨a, b, c, hab, hbc, hca, rfl⟩
    

Proof state:
case refine'_2.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
G H : SimpleGraph α
n : ℕ
a✝ b✝ c✝ : α
inst✝ : DecidableEq α
a b c : α
hab : Adj G a b
hbc : Adj G a c
hca : Adj G b c
⊢ IsNClique G 3 {a, b, c}

Next tactic:
exact is3Clique_triple_iff.2 ⟨hab, hbc, hca⟩
theorem not_cliqueFree_of_top_embedding {n : ℕ} (f : (⊤ : SimpleGraph (Fin n)) ↪g G) :
    ¬G.CliqueFree n := by
  

Proof state:
α : Type u_1
β : Type u_2
G H : SimpleGraph α
m n✝ : ℕ
s : Finset α
n : ℕ
f : ⊤ ↪g G
⊢ ¬CliqueFree G n

Next tactic:
simp only [CliqueFree, isNClique_iff, isClique_iff_induce_eq, not_forall, Classical.not_not]
theorem not_cliqueFree_of_top_embedding {n : ℕ} (f : (⊤ : SimpleGraph (Fin n)) ↪g G) :
    ¬G.CliqueFree n := by
  simp only [CliqueFree, isNClique_iff, isClique_iff_induce_eq, not_forall, Classical.not_not]
  

Proof state:
α : Type u_1
β : Type u_2
G H : SimpleGraph α
m n✝ : ℕ
s : Finset α
n : ℕ
f : ⊤ ↪g G
⊢ ∃ x, induce (↑x) G = ⊤ ∧ Finset.card x = n

Next tactic:
use Finset.univ.map f.toEmbedding
theorem not_cliqueFree_of_top_embedding {n : ℕ} (f : (⊤ : SimpleGraph (Fin n)) ↪g G) :
    ¬G.CliqueFree n := by
  simp only [CliqueFree, isNClique_iff, isClique_iff_induce_eq, not_forall, Classical.not_not]
  use Finset.univ.map f.toEmbedding
  

Proof state:
case h
α : Type u_1
β : Type u_2
G H : SimpleGraph α
m n✝ : ℕ
s : Finset α
n : ℕ
f : ⊤ ↪g G
⊢ induce (↑(map f.toEmbedding univ)) G = ⊤ ∧ Finset.card (map f.toEmbedding univ) = n

Next tactic:
simp only [card_map, Finset.card_fin, eq_self_iff_true, and_true_iff]
theorem not_cliqueFree_of_top_embedding {n : ℕ} (f : (⊤ : SimpleGraph (Fin n)) ↪g G) :
    ¬G.CliqueFree n := by
  simp only [CliqueFree, isNClique_iff, isClique_iff_induce_eq, not_forall, Classical.not_not]
  use Finset.univ.map f.toEmbedding
  simp only [card_map, Finset.card_fin, eq_self_iff_true, and_true_iff]
  

Proof state:
case h
α : Type u_1
β : Type u_2
G H : SimpleGraph α
m n✝ : ℕ
s : Finset α
n : ℕ
f : ⊤ ↪g G
⊢ induce (↑(map f.toEmbedding univ)) G = ⊤

Next tactic:
ext ⟨v, hv⟩ ⟨w, hw⟩
theorem not_cliqueFree_of_top_embedding {n : ℕ} (f : (⊤ : SimpleGraph (Fin n)) ↪g G) :
    ¬G.CliqueFree n := by
  simp only [CliqueFree, isNClique_iff, isClique_iff_induce_eq, not_forall, Classical.not_not]
  use Finset.univ.map f.toEmbedding
  simp only [card_map, Finset.card_fin, eq_self_iff_true, and_true_iff]
  ext ⟨v, hv⟩ ⟨w, hw⟩
  

Proof state:
case h.Adj.h.mk.h.mk.a
α : Type u_1
β : Type u_2
G H : SimpleGraph α
m n✝ : ℕ
s : Finset α
n : ℕ
f : ⊤ ↪g G
v : α
hv : v ∈ ↑(map f.toEmbedding univ)
w : α
hw : w ∈ ↑(map f.toEmbedding univ)
⊢ Adj (induce (↑(map f.toEmbedding univ)) G) { val := v, property := hv } { val := w, property := hw } ↔
    Adj ⊤ { val := v, property := hv } { val := w, property := hw }

Next tactic:
simp only [coe_map, Set.mem_image, coe_univ, Set.mem_univ, true_and_iff] at hv hw
theorem not_cliqueFree_of_top_embedding {n : ℕ} (f : (⊤ : SimpleGraph (Fin n)) ↪g G) :
    ¬G.CliqueFree n := by
  simp only [CliqueFree, isNClique_iff, isClique_iff_induce_eq, not_forall, Classical.not_not]
  use Finset.univ.map f.toEmbedding
  simp only [card_map, Finset.card_fin, eq_self_iff_true, and_true_iff]
  ext ⟨v, hv⟩ ⟨w, hw⟩
  simp only [coe_map, Set.mem_image, coe_univ, Set.mem_univ, true_and_iff] at hv hw
  

Proof state:
case h.Adj.h.mk.h.mk.a
α : Type u_1
β : Type u_2
G H : SimpleGraph α
m n✝ : ℕ
s : Finset α
n : ℕ
f : ⊤ ↪g G
v : α
hv✝ : v ∈ ↑(map f.toEmbedding univ)
w : α
hw✝ : w ∈ ↑(map f.toEmbedding univ)
hv : ∃ x, f.toEmbedding x = v
hw : ∃ x, f.toEmbedding x = w
⊢ Adj (induce (↑(map f.toEmbedding univ)) G) { val := v, property := hv✝ } { val := w, property := hw✝ } ↔
    Adj ⊤ { val := v, property := hv✝ } { val := w, property := hw✝ }

Next tactic:
obtain ⟨v', rfl⟩ := hv
theorem not_cliqueFree_of_top_embedding {n : ℕ} (f : (⊤ : SimpleGraph (Fin n)) ↪g G) :
    ¬G.CliqueFree n := by
  simp only [CliqueFree, isNClique_iff, isClique_iff_induce_eq, not_forall, Classical.not_not]
  use Finset.univ.map f.toEmbedding
  simp only [card_map, Finset.card_fin, eq_self_iff_true, and_true_iff]
  ext ⟨v, hv⟩ ⟨w, hw⟩
  simp only [coe_map, Set.mem_image, coe_univ, Set.mem_univ, true_and_iff] at hv hw
  obtain ⟨v', rfl⟩ := hv
  

Proof state:
case h.Adj.h.mk.h.mk.a.intro
α : Type u_1
β : Type u_2
G H : SimpleGraph α
m n✝ : ℕ
s : Finset α
n : ℕ
f : ⊤ ↪g G
w : α
hw✝ : w ∈ ↑(map f.toEmbedding univ)
hw : ∃ x, f.toEmbedding x = w
v' : Fin n
hv : f.toEmbedding v' ∈ ↑(map f.toEmbedding univ)
⊢ Adj (induce (↑(map f.toEmbedding univ)) G) { val := f.toEmbedding v', property := hv } { val := w, property := hw✝ } ↔
    Adj ⊤ { val := f.toEmbedding v', property := hv } { val := w, property := hw✝ }

Next tactic:
obtain ⟨w', rfl⟩ := hw