File: Mathlib/Combinatorics/SimpleGraph/Triangle/Tripartite.lean

full_name: SimpleGraph.TripartiteFromTriangles.Rel.in₁₂
code: /-- The underlying relation of the tripartite-from-triangles graph.

Two vertices are related iff there exists a triangle index containing them both. -/
@[mk_iff] inductive Rel (t : Finset (α × β × γ)) : α ⊕ β ⊕ γ → α ⊕ β ⊕ γ → Prop
| in₀₁ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₀ a) (in₁ b)
| in₁₀ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₁ b) (in₀ a)
| in₀₂ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₀ a) (in₂ c)
| in₂₀ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₂ c) (in₀ a)
| in₁₂ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₁ b) (in₂ c)
| in₂₁ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₂ c) (in₁ b)
goal: (a, b, c) ∈ t → SimpleGraph.TripartiteFromTriangles.Rel t (Sum3.in₁ b) (Sum3.in₂ c)

full_name: SimpleGraph.TripartiteFromTriangles.Rel.in₀₁
code: /-- The underlying relation of the tripartite-from-triangles graph.

Two vertices are related iff there exists a triangle index containing them both. -/
@[mk_iff] inductive Rel (t : Finset (α × β × γ)) : α ⊕ β ⊕ γ → α ⊕ β ⊕ γ → Prop
| in₀₁ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₀ a) (in₁ b)
| in₁₀ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₁ b) (in₀ a)
| in₀₂ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₀ a) (in₂ c)
| in₂₀ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₂ c) (in₀ a)
| in₁₂ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₁ b) (in₂ c)
| in₂₁ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₂ c) (in₁ b)
goal: (a, b, c) ∈ t → SimpleGraph.TripartiteFromTriangles.Rel t (Sum3.in₀ a) (Sum3.in₁ b)

full_name: SimpleGraph.TripartiteFromTriangles.rel_iff
code: /-- The underlying relation of the tripartite-from-triangles graph.

Two vertices are related iff there exists a triangle index containing them both. -/
@[mk_iff] inductive Rel (t : Finset (α × β × γ)) : α ⊕ β ⊕ γ → α ⊕ β ⊕ γ → Prop
| in₀₁ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₀ a) (in₁ b)
| in₁₀ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₁ b) (in₀ a)
| in₀₂ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₀ a) (in₂ c)
| in₂₀ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₂ c) (in₀ a)
| in₁₂ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₁ b) (in₂ c)
| in₂₁ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₂ c) (in₁ b)
goal: ∀ (a a_1 : α ⊕ β ⊕ γ),
  SimpleGraph.TripartiteFromTriangles.Rel t a a_1 ↔
    (∃ a_2 b c, (a_2, b, c) ∈ t ∧ a = Sum3.in₀ a_2 ∧ a_1 = Sum3.in₁ b) ∨
      (∃ a_2 b c, (a_2, b, c) ∈ t ∧ a = Sum3.in₁ b ∧ a_1 = Sum3.in₀ a_2) ∨
        (∃ a_2 b c, (a_2, b, c) ∈ t ∧ a = Sum3.in₀ a_2 ∧ a_1 = Sum3.in₂ c) ∨
          (∃ a_2 b c, (a_2, b, c) ∈ t ∧ a = Sum3.in₂ c ∧ a_1 = Sum3.in₀ a_2) ∨
            (∃ a_2 b c, (a_2, b, c) ∈ t ∧ a = Sum3.in₁ b ∧ a_1 = Sum3.in₂ c) ∨
              ∃ a_2 b c, (a_2, b, c) ∈ t ∧ a = Sum3.in₂ c ∧ a_1 = Sum3.in₁ b

full_name: SimpleGraph.TripartiteFromTriangles.Rel
code: /-- The underlying relation of the tripartite-from-triangles graph.

Two vertices are related iff there exists a triangle index containing them both. -/
@[mk_iff] inductive Rel (t : Finset (α × β × γ)) : α ⊕ β ⊕ γ → α ⊕ β ⊕ γ → Prop
| in₀₁ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₀ a) (in₁ b)
| in₁₀ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₁ b) (in₀ a)
| in₀₂ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₀ a) (in₂ c)
| in₂₀ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₂ c) (in₀ a)
| in₁₂ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₁ b) (in₂ c)
| in₂₁ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₂ c) (in₁ b)
goal: α ⊕ β ⊕ γ → α ⊕ β ⊕ γ → Prop

full_name: SimpleGraph.TripartiteFromTriangles.Rel.in₂₀
code: /-- The underlying relation of the tripartite-from-triangles graph.

Two vertices are related iff there exists a triangle index containing them both. -/
@[mk_iff] inductive Rel (t : Finset (α × β × γ)) : α ⊕ β ⊕ γ → α ⊕ β ⊕ γ → Prop
| in₀₁ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₀ a) (in₁ b)
| in₁₀ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₁ b) (in₀ a)
| in₀₂ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₀ a) (in₂ c)
| in₂₀ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₂ c) (in₀ a)
| in₁₂ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₁ b) (in₂ c)
| in₂₁ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₂ c) (in₁ b)
goal: (a, b, c) ∈ t → SimpleGraph.TripartiteFromTriangles.Rel t (Sum3.in₂ c) (Sum3.in₀ a)

full_name: SimpleGraph.TripartiteFromTriangles.Rel.in₁₀
code: /-- The underlying relation of the tripartite-from-triangles graph.

Two vertices are related iff there exists a triangle index containing them both. -/
@[mk_iff] inductive Rel (t : Finset (α × β × γ)) : α ⊕ β ⊕ γ → α ⊕ β ⊕ γ → Prop
| in₀₁ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₀ a) (in₁ b)
| in₁₀ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₁ b) (in₀ a)
| in₀₂ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₀ a) (in₂ c)
| in₂₀ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₂ c) (in₀ a)
| in₁₂ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₁ b) (in₂ c)
| in₂₁ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₂ c) (in₁ b)
goal: (a, b, c) ∈ t → SimpleGraph.TripartiteFromTriangles.Rel t (Sum3.in₁ b) (Sum3.in₀ a)

full_name: SimpleGraph.TripartiteFromTriangles.Rel.in₂₁
code: /-- The underlying relation of the tripartite-from-triangles graph.

Two vertices are related iff there exists a triangle index containing them both. -/
@[mk_iff] inductive Rel (t : Finset (α × β × γ)) : α ⊕ β ⊕ γ → α ⊕ β ⊕ γ → Prop
| in₀₁ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₀ a) (in₁ b)
| in₁₀ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₁ b) (in₀ a)
| in₀₂ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₀ a) (in₂ c)
| in₂₀ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₂ c) (in₀ a)
| in₁₂ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₁ b) (in₂ c)
| in₂₁ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₂ c) (in₁ b)
goal: (a, b, c) ∈ t → SimpleGraph.TripartiteFromTriangles.Rel t (Sum3.in₂ c) (Sum3.in₁ b)

full_name: SimpleGraph.TripartiteFromTriangles.Rel.in₀₂
code: /-- The underlying relation of the tripartite-from-triangles graph.

Two vertices are related iff there exists a triangle index containing them both. -/
@[mk_iff] inductive Rel (t : Finset (α × β × γ)) : α ⊕ β ⊕ γ → α ⊕ β ⊕ γ → Prop
| in₀₁ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₀ a) (in₁ b)
| in₁₀ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₁ b) (in₀ a)
| in₀₂ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₀ a) (in₂ c)
| in₂₀ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₂ c) (in₀ a)
| in₁₂ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₁ b) (in₂ c)
| in₂₁ ⦃a b c⦄ : (a, b, c) ∈ t → Rel t (in₂ c) (in₁ b)
goal: (a, b, c) ∈ t → SimpleGraph.TripartiteFromTriangles.Rel t (Sum3.in₀ a) (Sum3.in₂ c)

full_name: SimpleGraph.TripartiteFromTriangles.rel_irrefl
code: lemma rel_irrefl : ∀ x, ¬ Rel t x x 
goal: ¬SimpleGraph.TripartiteFromTriangles.Rel t x x

full_name: SimpleGraph.TripartiteFromTriangles.rel_symm
code: lemma rel_symm : Symmetric (Rel t) 
goal: Symmetric (SimpleGraph.TripartiteFromTriangles.Rel t)

full_name: SimpleGraph.TripartiteFromTriangles.graph
code: /-- The tripartite-from-triangles graph. Two vertices are related iff there exists a triangle index
containing them both. -/
def graph (t : Finset (α × β × γ)) : SimpleGraph (α ⊕ β ⊕ γ) 
goal: SimpleGraph (α ⊕ β ⊕ γ)

full_name: SimpleGraph.TripartiteFromTriangles.Graph.not_in₀₀
code: @[simp] lemma not_in₀₀ : ¬ (graph t).Adj (in₀ a) (in₀ a') 
goal: ¬(SimpleGraph.TripartiteFromTriangles.graph t).Adj (Sum3.in₀ a) (Sum3.in₀ a')

full_name: SimpleGraph.TripartiteFromTriangles.Graph.not_in₁₁
code: @[simp] lemma not_in₁₁ : ¬ (graph t).Adj (in₁ b) (in₁ b') 
goal: ¬(SimpleGraph.TripartiteFromTriangles.graph t).Adj (Sum3.in₁ b) (Sum3.in₁ b')

full_name: SimpleGraph.TripartiteFromTriangles.Graph.not_in₂₂
code: @[simp] lemma not_in₂₂ : ¬ (graph t).Adj (in₂ c) (in₂ c') 
goal: ¬(SimpleGraph.TripartiteFromTriangles.graph t).Adj (Sum3.in₂ c) (Sum3.in₂ c')

full_name: SimpleGraph.TripartiteFromTriangles.Graph.in₀₁_iff
code: @[simp] lemma in₀₁_iff : (graph t).Adj (in₀ a) (in₁ b) ↔ ∃ c, (a, b, c) ∈ t 
goal: (SimpleGraph.TripartiteFromTriangles.graph t).Adj (Sum3.in₀ a) (Sum3.in₁ b) ↔ ∃ c, (a, b, c) ∈ t

full_name: SimpleGraph.TripartiteFromTriangles.Graph.in₁₀_iff
code: @[simp] lemma in₁₀_iff : (graph t).Adj (in₁ b) (in₀ a) ↔ ∃ c, (a, b, c) ∈ t 
goal: (SimpleGraph.TripartiteFromTriangles.graph t).Adj (Sum3.in₁ b) (Sum3.in₀ a) ↔ ∃ c, (a, b, c) ∈ t

full_name: SimpleGraph.TripartiteFromTriangles.Graph.in₀₂_iff
code: @[simp] lemma in₀₂_iff : (graph t).Adj (in₀ a) (in₂ c) ↔ ∃ b, (a, b, c) ∈ t 
goal: (SimpleGraph.TripartiteFromTriangles.graph t).Adj (Sum3.in₀ a) (Sum3.in₂ c) ↔ ∃ b, (a, b, c) ∈ t

full_name: SimpleGraph.TripartiteFromTriangles.Graph.in₂₀_iff
code: @[simp] lemma in₂₀_iff : (graph t).Adj (in₂ c) (in₀ a) ↔ ∃ b, (a, b, c) ∈ t 
goal: (SimpleGraph.TripartiteFromTriangles.graph t).Adj (Sum3.in₂ c) (Sum3.in₀ a) ↔ ∃ b, (a, b, c) ∈ t

full_name: SimpleGraph.TripartiteFromTriangles.Graph.in₁₂_iff
code: @[simp] lemma in₁₂_iff : (graph t).Adj (in₁ b) (in₂ c) ↔ ∃ a, (a, b, c) ∈ t 
goal: (SimpleGraph.TripartiteFromTriangles.graph t).Adj (Sum3.in₁ b) (Sum3.in₂ c) ↔ ∃ a, (a, b, c) ∈ t

full_name: SimpleGraph.TripartiteFromTriangles.Graph.in₂₁_iff
code: @[simp] lemma in₂₁_iff : (graph t).Adj (in₂ c) (in₁ b) ↔ ∃ a, (a, b, c) ∈ t 
goal: (SimpleGraph.TripartiteFromTriangles.graph t).Adj (Sum3.in₂ c) (Sum3.in₁ b) ↔ ∃ a, (a, b, c) ∈ t

full_name: SimpleGraph.TripartiteFromTriangles.Graph.in₀₁_iff'
code: lemma in₀₁_iff' :
    (graph t).Adj (in₀ a) (in₁ b) ↔ ∃ x : α × β × γ, x ∈ t ∧ x.1 = a ∧ x.2.1 = b 
goal: (SimpleGraph.TripartiteFromTriangles.graph t).Adj (Sum3.in₀ a) (Sum3.in₁ b) ↔ ∃ x ∈ t, x.1 = a ∧ x.2.1 = b

full_name: SimpleGraph.TripartiteFromTriangles.Graph.in₁₀_iff'
code: lemma in₁₀_iff' :
    (graph t).Adj (in₁ b) (in₀ a) ↔ ∃ x : α × β × γ, x ∈ t ∧ x.2.1 = b ∧ x.1 = a 
goal: (SimpleGraph.TripartiteFromTriangles.graph t).Adj (Sum3.in₁ b) (Sum3.in₀ a) ↔ ∃ x ∈ t, x.2.1 = b ∧ x.1 = a

full_name: SimpleGraph.TripartiteFromTriangles.Graph.in₀₂_iff'
code: lemma in₀₂_iff' :
    (graph t).Adj (in₀ a) (in₂ c) ↔ ∃ x : α × β × γ, x ∈ t ∧ x.1 = a ∧ x.2.2 = c 
goal: (SimpleGraph.TripartiteFromTriangles.graph t).Adj (Sum3.in₀ a) (Sum3.in₂ c) ↔ ∃ x ∈ t, x.1 = a ∧ x.2.2 = c

full_name: SimpleGraph.TripartiteFromTriangles.Graph.in₂₀_iff'
code: lemma in₂₀_iff' :
    (graph t).Adj (in₂ c) (in₀ a) ↔ ∃ x : α × β × γ, x ∈ t ∧ x.2.2 = c ∧ x.1 = a 
goal: (SimpleGraph.TripartiteFromTriangles.graph t).Adj (Sum3.in₂ c) (Sum3.in₀ a) ↔ ∃ x ∈ t, x.2.2 = c ∧ x.1 = a

full_name: SimpleGraph.TripartiteFromTriangles.Graph.in₁₂_iff'
code: lemma in₁₂_iff' :
    (graph t).Adj (in₁ b) (in₂ c) ↔ ∃ x : α × β × γ, x ∈ t ∧ x.2.1 = b ∧ x.2.2 = c 
goal: (SimpleGraph.TripartiteFromTriangles.graph t).Adj (Sum3.in₁ b) (Sum3.in₂ c) ↔ ∃ x ∈ t, x.2.1 = b ∧ x.2.2 = c

full_name: SimpleGraph.TripartiteFromTriangles.Graph.in₂₁_iff'
code: lemma in₂₁_iff' :
    (graph t).Adj (in₂ c) (in₁ b) ↔ ∃ x : α × β × γ, x ∈ t ∧ x.2.2 = c ∧ x.2.1 = b 
goal: (SimpleGraph.TripartiteFromTriangles.graph t).Adj (Sum3.in₂ c) (Sum3.in₁ b) ↔ ∃ x ∈ t, x.2.2 = c ∧ x.2.1 = b

full_name: SimpleGraph.TripartiteFromTriangles.ExplicitDisjoint.inj₂
code: /-- Predicate on the triangle indices for the explicit triangles to be edge-disjoint. -/
class ExplicitDisjoint (t : Finset (α × β × γ)) : Prop where
  inj₀ : ∀ ⦃a b c a'⦄, (a, b, c) ∈ t → (a', b, c) ∈ t → a = a'
  inj₁ : ∀ ⦃a b c b'⦄, (a, b, c) ∈ t → (a, b', c) ∈ t → b = b'
  inj₂ : ∀ ⦃a b c c'⦄, (a, b, c) ∈ t → (a, b, c') ∈ t → c = c'
goal: (a, b, c) ∈ t → (a, b, c') ∈ t → c = c'

full_name: SimpleGraph.TripartiteFromTriangles.ExplicitDisjoint.inj₀
code: /-- Predicate on the triangle indices for the explicit triangles to be edge-disjoint. -/
class ExplicitDisjoint (t : Finset (α × β × γ)) : Prop where
  inj₀ : ∀ ⦃a b c a'⦄, (a, b, c) ∈ t → (a', b, c) ∈ t → a = a'
  inj₁ : ∀ ⦃a b c b'⦄, (a, b, c) ∈ t → (a, b', c) ∈ t → b = b'
  inj₂ : ∀ ⦃a b c c'⦄, (a, b, c) ∈ t → (a, b, c') ∈ t → c = c'
goal: (a, b, c) ∈ t → (a', b, c) ∈ t → a = a'

full_name: SimpleGraph.TripartiteFromTriangles.ExplicitDisjoint.inj₁
code: /-- Predicate on the triangle indices for the explicit triangles to be edge-disjoint. -/
class ExplicitDisjoint (t : Finset (α × β × γ)) : Prop where
  inj₀ : ∀ ⦃a b c a'⦄, (a, b, c) ∈ t → (a', b, c) ∈ t → a = a'
  inj₁ : ∀ ⦃a b c b'⦄, (a, b, c) ∈ t → (a, b', c) ∈ t → b = b'
  inj₂ : ∀ ⦃a b c c'⦄, (a, b, c) ∈ t → (a, b, c') ∈ t → c = c'
goal: (a, b, c) ∈ t → (a, b', c) ∈ t → b = b'

full_name: SimpleGraph.TripartiteFromTriangles.ExplicitDisjoint
code: /-- Predicate on the triangle indices for the explicit triangles to be edge-disjoint. -/
class ExplicitDisjoint (t : Finset (α × β × γ)) : Prop where
  inj₀ : ∀ ⦃a b c a'⦄, (a, b, c) ∈ t → (a', b, c) ∈ t → a = a'
  inj₁ : ∀ ⦃a b c b'⦄, (a, b, c) ∈ t → (a, b', c) ∈ t → b = b'
  inj₂ : ∀ ⦃a b c c'⦄, (a, b, c) ∈ t → (a, b, c') ∈ t → c = c'
goal: Prop

full_name: SimpleGraph.TripartiteFromTriangles.NoAccidental.eq_or_eq_or_eq
code: /-- Predicate on the triangle indices for there to be no accidental triangle.

Note that we cheat a bit, since the exact translation of this informal description would have
`(a', b', c') ∈ t` as a conclusion rather than `a = a' ∨ b = b' ∨ c = c'`. Those conditions are
equivalent when the explicit triangles are edge-disjoint (which is the case we care about). -/
class NoAccidental (t : Finset (α × β × γ)) : Prop where
  eq_or_eq_or_eq : ∀ ⦃a a' b b' c c'⦄, (a', b, c) ∈ t → (a, b', c) ∈ t → (a, b, c') ∈ t →
    a = a' ∨ b = b' ∨ c = c'
goal: (a', b, c) ∈ t → (a, b', c) ∈ t → (a, b, c') ∈ t → a = a' ∨ b = b' ∨ c = c'

full_name: SimpleGraph.TripartiteFromTriangles.NoAccidental
code: /-- Predicate on the triangle indices for there to be no accidental triangle.

Note that we cheat a bit, since the exact translation of this informal description would have
`(a', b', c') ∈ t` as a conclusion rather than `a = a' ∨ b = b' ∨ c = c'`. Those conditions are
equivalent when the explicit triangles are edge-disjoint (which is the case we care about). -/
class NoAccidental (t : Finset (α × β × γ)) : Prop where
  eq_or_eq_or_eq : ∀ ⦃a a' b b' c c'⦄, (a', b, c) ∈ t → (a, b', c) ∈ t → (a, b, c') ∈ t →
    a = a' ∨ b = b' ∨ c = c'
goal: Prop

full_name: SimpleGraph.TripartiteFromTriangles.graph.instDecidableRelAdj
code: instance graph.instDecidableRelAdj : DecidableRel (graph t).Adj
  
goal: DecidableRel (SimpleGraph.TripartiteFromTriangles.graph t).Adj

full_name: SimpleGraph.TripartiteFromTriangles.graph_triple
code: /-- This lemma reorders the elements of a triangle in the tripartite graph. It turns a triangle
`{x, y, z}` into a triangle `{a, b, c}` where `a : α `, `b : β`, `c : γ`. -/
 lemma graph_triple ⦃x y z⦄ :
  (graph t).Adj x y → (graph t).Adj x z → (graph t).Adj y z → ∃ a b c,
    ({in₀ a, in₁ b, in₂ c} : Finset (α ⊕ β ⊕ γ)) = {x, y, z} ∧ (graph t).Adj (in₀ a) (in₁ b) ∧
      (graph t).Adj (in₀ a) (in₂ c) ∧ (graph t).Adj (in₁ b) (in₂ c) 
goal: (SimpleGraph.TripartiteFromTriangles.graph t).Adj x y →
  (SimpleGraph.TripartiteFromTriangles.graph t).Adj x z →
    (SimpleGraph.TripartiteFromTriangles.graph t).Adj y z →
      ∃ a b c,
        {Sum3.in₀ a, Sum3.in₁ b, Sum3.in₂ c} = {x, y, z} ∧
          (SimpleGraph.TripartiteFromTriangles.graph t).Adj (Sum3.in₀ a) (Sum3.in₁ b) ∧
            (SimpleGraph.TripartiteFromTriangles.graph t).Adj (Sum3.in₀ a) (Sum3.in₂ c) ∧
              (SimpleGraph.TripartiteFromTriangles.graph t).Adj (Sum3.in₁ b) (Sum3.in₂ c)

full_name: SimpleGraph.TripartiteFromTriangles.toTriangle_apply
code: /-- The map that turns a triangle index into an explicit triangle. -/
@[simps] def toTriangle : α × β × γ ↪ Finset (α ⊕ β ⊕ γ) 
goal: SimpleGraph.TripartiteFromTriangles.toTriangle x = {Sum3.in₀ x.1, Sum3.in₁ x.2.1, Sum3.in₂ x.2.2}

full_name: SimpleGraph.TripartiteFromTriangles.toTriangle
code: /-- The map that turns a triangle index into an explicit triangle. -/
@[simps] def toTriangle : α × β × γ ↪ Finset (α ⊕ β ⊕ γ) 
goal: α × β × γ ↪ Finset (α ⊕ β ⊕ γ)

full_name: SimpleGraph.TripartiteFromTriangles.toTriangle_is3Clique
code: lemma toTriangle_is3Clique (hx : x ∈ t) : (graph t).IsNClique 3 (toTriangle x) 
goal: (SimpleGraph.TripartiteFromTriangles.graph t).IsNClique 3 (SimpleGraph.TripartiteFromTriangles.toTriangle x)

full_name: SimpleGraph.TripartiteFromTriangles.exists_mem_toTriangle
code: lemma exists_mem_toTriangle {x y : α ⊕ β ⊕ γ} (hxy : (graph t).Adj x y) :
    ∃ z ∈ t, x ∈ toTriangle z ∧ y ∈ toTriangle z 
goal: ∃ z ∈ t, x ∈ SimpleGraph.TripartiteFromTriangles.toTriangle z ∧ y ∈ SimpleGraph.TripartiteFromTriangles.toTriangle z

full_name: SimpleGraph.TripartiteFromTriangles.is3Clique_iff
code: nonrec lemma is3Clique_iff [NoAccidental t] {s : Finset (α ⊕ β ⊕ γ)} :
    (graph t).IsNClique 3 s ↔ ∃ x, x ∈ t ∧ toTriangle x = s 
goal: (SimpleGraph.TripartiteFromTriangles.graph t).IsNClique 3 s ↔
  ∃ x ∈ t, SimpleGraph.TripartiteFromTriangles.toTriangle x = s

full_name: SimpleGraph.TripartiteFromTriangles.toTriangle_surjOn
code: lemma toTriangle_surjOn [NoAccidental t] :
    (t : Set (α × β × γ)).SurjOn toTriangle ((graph t).cliqueSet 3) 
goal: Set.SurjOn (⇑SimpleGraph.TripartiteFromTriangles.toTriangle) (↑t)
  ((SimpleGraph.TripartiteFromTriangles.graph t).cliqueSet 3)

full_name: SimpleGraph.TripartiteFromTriangles.map_toTriangle_disjoint
code: lemma map_toTriangle_disjoint [ExplicitDisjoint t] :
    (t.map toTriangle : Set (Finset (α ⊕ β ⊕ γ))).Pairwise
      fun x y ↦ (x ∩ y : Set (α ⊕ β ⊕ γ)).Subsingleton 
goal: (↑(Finset.map SimpleGraph.TripartiteFromTriangles.toTriangle t)).Pairwise fun x y => (↑x ∩ ↑y).Subsingleton

full_name: SimpleGraph.TripartiteFromTriangles.cliqueSet_eq_image
code: lemma cliqueSet_eq_image [NoAccidental t] : (graph t).cliqueSet 3 = toTriangle '' t 
goal: (SimpleGraph.TripartiteFromTriangles.graph t).cliqueSet 3 = ⇑SimpleGraph.TripartiteFromTriangles.toTriangle '' ↑t

full_name: SimpleGraph.TripartiteFromTriangles.cliqueFinset_eq_image
code: lemma cliqueFinset_eq_image [NoAccidental t] : (graph t).cliqueFinset 3 = t.image toTriangle 
goal: (SimpleGraph.TripartiteFromTriangles.graph t).cliqueFinset 3 =
  Finset.image (⇑SimpleGraph.TripartiteFromTriangles.toTriangle) t

full_name: SimpleGraph.TripartiteFromTriangles.cliqueFinset_eq_map
code: lemma cliqueFinset_eq_map [NoAccidental t] : (graph t).cliqueFinset 3 = t.map toTriangle 
goal: (SimpleGraph.TripartiteFromTriangles.graph t).cliqueFinset 3 =
  Finset.map SimpleGraph.TripartiteFromTriangles.toTriangle t

full_name: SimpleGraph.TripartiteFromTriangles.card_triangles
code: @[simp] lemma card_triangles [NoAccidental t] : ((graph t).cliqueFinset 3).card = t.card 
goal: ((SimpleGraph.TripartiteFromTriangles.graph t).cliqueFinset 3).card = t.card

full_name: SimpleGraph.TripartiteFromTriangles.farFromTriangleFree
code: lemma farFromTriangleFree [ExplicitDisjoint t] {ε : 𝕜}
    (ht : ε * ((Fintype.card α + Fintype.card β + Fintype.card γ) ^ 2 : ℕ) ≤ t.card) :
    (graph t).FarFromTriangleFree ε 
goal: (SimpleGraph.TripartiteFromTriangles.graph t).FarFromTriangleFree ε

full_name: SimpleGraph.TripartiteFromTriangles.locallyLinear
code: lemma locallyLinear [ExplicitDisjoint t] [NoAccidental t] : (graph t).LocallyLinear 
goal: (SimpleGraph.TripartiteFromTriangles.graph t).LocallyLinear