The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V30. Combinatorics

Mathlib.Combinatorics.SimpleGraph.Triangle.Tripartite

48 declarations. Mathlib docs · Source

Construct a tripartite graph from its triangles

This file contains the construction of a simple graph on α ⊕ β ⊕ γ from a list of triangles (a, b, c) (with a in the first component, b in the second, c in the third).

We call

  • t : Finset (α × β × γ) the set of triangle indices (its elements are not triangles within the graph but instead index them).
  • explicit a triangle of the constructed graph coming from a triangle index.
  • accidental a triangle of the constructed graph not coming from a triangle index.

The two important properties of this construction are:

  • SimpleGraph.TripartiteFromTriangles.ExplicitDisjoint: Whether the explicit triangles are edge-disjoint.
  • SimpleGraph.TripartiteFromTriangles.NoAccidental: Whether all triangles are explicit.

This construction shows up unrelatedly twice in the theory of Roth numbers:

  • The lower bound of the Ruzsa-Szemerédi problem: From a set s in a finite abelian group G of odd order, we construct a tripartite graph on G ⊕ G ⊕ G. The triangle indices are (x, x + a, x + 2 * a) for x any element and a ∈ s. The explicit triangles are always edge-disjoint and there is no accidental triangle if s is 3AP-free.
  • The proof of the corners theorem from the triangle removal lemma: For a set s in a finite abelian group G, we construct a tripartite graph on G ⊕ G ⊕ G, whose vertices correspond to the horizontal, vertical and diagonal lines in G × G. The explicit triangles are (h, v, d) where h, v, d are horizontal, vertical, diagonal lines that intersect in an element of s. The explicit triangles are always edge-disjoint and there is no accidental triangle if s is corner-free.

inductive SimpleGraph.TripartiteFromTriangles.Rel E1 #

{α : Type u_1} → {β : Type u_2} → {γ : Type u_3} → Finset (α × β × γ) → α ⊕ β ⊕ γ → α ⊕ β ⊕ γ → Prop

The underlying relation of the tripartite-from-triangles graph.

Two vertices are related iff there exists a triangle index containing them both.

theorem SimpleGraph.TripartiteFromTriangles.rel_iff E0 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} (t : Finset (α × β × γ)) (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

ctor SimpleGraph.TripartiteFromTriangles.Rel.in₀₁ E0 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {t : Finset (α × β × γ)} ⦃a : α⦄ ⦃b : β⦄ ⦃c : γ⦄,
  (a, b, c) ∈ t → SimpleGraph.TripartiteFromTriangles.Rel t (Sum3.in₀ a) (Sum3.in₁ b)

ctor SimpleGraph.TripartiteFromTriangles.Rel.in₁₀ E0 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {t : Finset (α × β × γ)} ⦃a : α⦄ ⦃b : β⦄ ⦃c : γ⦄,
  (a, b, c) ∈ t → SimpleGraph.TripartiteFromTriangles.Rel t (Sum3.in₁ b) (Sum3.in₀ a)

ctor SimpleGraph.TripartiteFromTriangles.Rel.in₀₂ E0 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {t : Finset (α × β × γ)} ⦃a : α⦄ ⦃b : β⦄ ⦃c : γ⦄,
  (a, b, c) ∈ t → SimpleGraph.TripartiteFromTriangles.Rel t (Sum3.in₀ a) (Sum3.in₂ c)

ctor SimpleGraph.TripartiteFromTriangles.Rel.in₂₀ E0 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {t : Finset (α × β × γ)} ⦃a : α⦄ ⦃b : β⦄ ⦃c : γ⦄,
  (a, b, c) ∈ t → SimpleGraph.TripartiteFromTriangles.Rel t (Sum3.in₂ c) (Sum3.in₀ a)

ctor SimpleGraph.TripartiteFromTriangles.Rel.in₁₂ E0 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {t : Finset (α × β × γ)} ⦃a : α⦄ ⦃b : β⦄ ⦃c : γ⦄,
  (a, b, c) ∈ t → SimpleGraph.TripartiteFromTriangles.Rel t (Sum3.in₁ b) (Sum3.in₂ c)

ctor SimpleGraph.TripartiteFromTriangles.Rel.in₂₁ E0 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {t : Finset (α × β × γ)} ⦃a : α⦄ ⦃b : β⦄ ⦃c : γ⦄,
  (a, b, c) ∈ t → SimpleGraph.TripartiteFromTriangles.Rel t (Sum3.in₂ c) (Sum3.in₁ b)

instance SimpleGraph.TripartiteFromTriangles.rel_irrefl E0 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {t : Finset (α × β × γ)},
  Std.Irrefl (SimpleGraph.TripartiteFromTriangles.Rel t)

instance SimpleGraph.TripartiteFromTriangles.rel_symm E0 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {t : Finset (α × β × γ)},
  Std.Symm (SimpleGraph.TripartiteFromTriangles.Rel t)

def SimpleGraph.TripartiteFromTriangles.graph E1 #

{α : Type u_1} → {β : Type u_2} → {γ : Type u_3} → Finset (α × β × γ) → SimpleGraph (α ⊕ β ⊕ γ)

The tripartite-from-triangles graph. Two vertices are related iff there exists a triangle index containing them both.

theorem SimpleGraph.TripartiteFromTriangles.Graph.not_in₀₀ E0 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {t : Finset (α × β × γ)} {a a' : α},
  ¬(SimpleGraph.TripartiteFromTriangles.graph t).Adj (Sum3.in₀ a) (Sum3.in₀ a')

theorem SimpleGraph.TripartiteFromTriangles.Graph.not_in₁₁ E0 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {t : Finset (α × β × γ)} {b b' : β},
  ¬(SimpleGraph.TripartiteFromTriangles.graph t).Adj (Sum3.in₁ b) (Sum3.in₁ b')

theorem SimpleGraph.TripartiteFromTriangles.Graph.not_in₂₂ E0 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {t : Finset (α × β × γ)} {c c' : γ},
  ¬(SimpleGraph.TripartiteFromTriangles.graph t).Adj (Sum3.in₂ c) (Sum3.in₂ c')

theorem SimpleGraph.TripartiteFromTriangles.Graph.in₀₁_iff E0 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {t : Finset (α × β × γ)} {a : α} {b : β},
  (SimpleGraph.TripartiteFromTriangles.graph t).Adj (Sum3.in₀ a) (Sum3.in₁ b) ↔ ∃ c, (a, b, c) ∈ t

theorem SimpleGraph.TripartiteFromTriangles.Graph.in₁₀_iff E0 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {t : Finset (α × β × γ)} {a : α} {b : β},
  (SimpleGraph.TripartiteFromTriangles.graph t).Adj (Sum3.in₁ b) (Sum3.in₀ a) ↔ ∃ c, (a, b, c) ∈ t

theorem SimpleGraph.TripartiteFromTriangles.Graph.in₀₂_iff E0 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {t : Finset (α × β × γ)} {a : α} {c : γ},
  (SimpleGraph.TripartiteFromTriangles.graph t).Adj (Sum3.in₀ a) (Sum3.in₂ c) ↔ ∃ b, (a, b, c) ∈ t

theorem SimpleGraph.TripartiteFromTriangles.Graph.in₂₀_iff E0 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {t : Finset (α × β × γ)} {a : α} {c : γ},
  (SimpleGraph.TripartiteFromTriangles.graph t).Adj (Sum3.in₂ c) (Sum3.in₀ a) ↔ ∃ b, (a, b, c) ∈ t

theorem SimpleGraph.TripartiteFromTriangles.Graph.in₁₂_iff E0 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {t : Finset (α × β × γ)} {b : β} {c : γ},
  (SimpleGraph.TripartiteFromTriangles.graph t).Adj (Sum3.in₁ b) (Sum3.in₂ c) ↔ ∃ a, (a, b, c) ∈ t

theorem SimpleGraph.TripartiteFromTriangles.Graph.in₂₁_iff E0 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {t : Finset (α × β × γ)} {b : β} {c : γ},
  (SimpleGraph.TripartiteFromTriangles.graph t).Adj (Sum3.in₂ c) (Sum3.in₁ b) ↔ ∃ a, (a, b, c) ∈ t

theorem SimpleGraph.TripartiteFromTriangles.Graph.in₀₁_iff' E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {t : Finset (α × β × γ)} {a : α} {b : β},
  (SimpleGraph.TripartiteFromTriangles.graph t).Adj (Sum3.in₀ a) (Sum3.in₁ b) ↔ ∃ x ∈ t, x.1 = a ∧ x.2.1 = b

theorem SimpleGraph.TripartiteFromTriangles.Graph.in₁₀_iff' E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {t : Finset (α × β × γ)} {a : α} {b : β},
  (SimpleGraph.TripartiteFromTriangles.graph t).Adj (Sum3.in₁ b) (Sum3.in₀ a) ↔ ∃ x ∈ t, x.2.1 = b ∧ x.1 = a

theorem SimpleGraph.TripartiteFromTriangles.Graph.in₀₂_iff' E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {t : Finset (α × β × γ)} {a : α} {c : γ},
  (SimpleGraph.TripartiteFromTriangles.graph t).Adj (Sum3.in₀ a) (Sum3.in₂ c) ↔ ∃ x ∈ t, x.1 = a ∧ x.2.2 = c

theorem SimpleGraph.TripartiteFromTriangles.Graph.in₂₀_iff' E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {t : Finset (α × β × γ)} {a : α} {c : γ},
  (SimpleGraph.TripartiteFromTriangles.graph t).Adj (Sum3.in₂ c) (Sum3.in₀ a) ↔ ∃ x ∈ t, x.2.2 = c ∧ x.1 = a

theorem SimpleGraph.TripartiteFromTriangles.Graph.in₁₂_iff' E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {t : Finset (α × β × γ)} {b : β} {c : γ},
  (SimpleGraph.TripartiteFromTriangles.graph t).Adj (Sum3.in₁ b) (Sum3.in₂ c) ↔ ∃ x ∈ t, x.2.1 = b ∧ x.2.2 = c

theorem SimpleGraph.TripartiteFromTriangles.Graph.in₂₁_iff' E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {t : Finset (α × β × γ)} {b : β} {c : γ},
  (SimpleGraph.TripartiteFromTriangles.graph t).Adj (Sum3.in₂ c) (Sum3.in₁ b) ↔ ∃ x ∈ t, x.2.2 = c ∧ x.2.1 = b

class SimpleGraph.TripartiteFromTriangles.ExplicitDisjoint E1 #

{α : Type u_1} → {β : Type u_2} → {γ : Type u_3} → Finset (α × β × γ) → Prop

Predicate on the triangle indices for the explicit triangles to be edge-disjoint.

ctor SimpleGraph.TripartiteFromTriangles.ExplicitDisjoint.mk E0 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {t : Finset (α × β × γ)},
  (∀ ⦃a : α⦄ ⦃b : β⦄ ⦃c : γ⦄ ⦃a' : α⦄, (a, b, c) ∈ t → (a', b, c) ∈ t → a = a') →
    (∀ ⦃a : α⦄ ⦃b : β⦄ ⦃c : γ⦄ ⦃b' : β⦄, (a, b, c) ∈ t → (a, b', c) ∈ t → b = b') →
      (∀ ⦃a : α⦄ ⦃b : β⦄ ⦃c c' : γ⦄, (a, b, c) ∈ t → (a, b, c') ∈ t → c = c') →
        SimpleGraph.TripartiteFromTriangles.ExplicitDisjoint t

theorem SimpleGraph.TripartiteFromTriangles.ExplicitDisjoint.inj₀ E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {t : Finset (α × β × γ)}
  [self : SimpleGraph.TripartiteFromTriangles.ExplicitDisjoint t] ⦃a : α⦄ ⦃b : β⦄ ⦃c : γ⦄ ⦃a' : α⦄,
  (a, b, c) ∈ t → (a', b, c) ∈ t → a = a'

theorem SimpleGraph.TripartiteFromTriangles.ExplicitDisjoint.inj₁ E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {t : Finset (α × β × γ)}
  [self : SimpleGraph.TripartiteFromTriangles.ExplicitDisjoint t] ⦃a : α⦄ ⦃b : β⦄ ⦃c : γ⦄ ⦃b' : β⦄,
  (a, b, c) ∈ t → (a, b', c) ∈ t → b = b'

theorem SimpleGraph.TripartiteFromTriangles.ExplicitDisjoint.inj₂ E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {t : Finset (α × β × γ)}
  [self : SimpleGraph.TripartiteFromTriangles.ExplicitDisjoint t] ⦃a : α⦄ ⦃b : β⦄ ⦃c c' : γ⦄,
  (a, b, c) ∈ t → (a, b, c') ∈ t → c = c'

class SimpleGraph.TripartiteFromTriangles.NoAccidental E1 #

{α : Type u_1} → {β : Type u_2} → {γ : Type u_3} → Finset (α × β × γ) → Prop

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).

ctor SimpleGraph.TripartiteFromTriangles.NoAccidental.mk E0 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {t : Finset (α × β × γ)},
  (∀ ⦃a a' : α⦄ ⦃b b' : β⦄ ⦃c c' : γ⦄, (a', b, c) ∈ t → (a, b', c) ∈ t → (a, b, c') ∈ t → a = a' ∨ b = b' ∨ c = c') →
    SimpleGraph.TripartiteFromTriangles.NoAccidental t

instance SimpleGraph.TripartiteFromTriangles.graph.instDecidableRelAdj E0 #

{α : Type u_1} →
  {β : Type u_2} →
    {γ : Type u_3} →
      {t : Finset (α × β × γ)} →
        [DecidableEq α] →
          [DecidableEq β] → [DecidableEq γ] → DecidableRel (SimpleGraph.TripartiteFromTriangles.graph t).Adj

theorem SimpleGraph.TripartiteFromTriangles.graph_triple E2 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {t : Finset (α × β × γ)} [inst : DecidableEq α] [inst_1 : DecidableEq β]
  [inst_2 : DecidableEq γ] ⦃x y z : α ⊕ β ⊕ γ⦄,
  (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)

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 : γ.

def SimpleGraph.TripartiteFromTriangles.toTriangle E1 #

{α : Type u_1} →
  {β : Type u_2} → {γ : Type u_3} → [DecidableEq α] → [DecidableEq β] → [DecidableEq γ] → α × β × γ ↪ Finset (α ⊕ β ⊕ γ)

The map that turns a triangle index into an explicit triangle.

theorem SimpleGraph.TripartiteFromTriangles.toTriangle_apply E0 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} [inst : DecidableEq α] [inst_1 : DecidableEq β] [inst_2 : DecidableEq γ]
  (x : α × β × γ), SimpleGraph.TripartiteFromTriangles.toTriangle x = {Sum3.in₀ x.1, Sum3.in₁ x.2.1, Sum3.in₂ x.2.2}

theorem SimpleGraph.TripartiteFromTriangles.toTriangle_is3Clique E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {t : Finset (α × β × γ)} {x : α × β × γ} [inst : DecidableEq α]
  [inst_1 : DecidableEq β] [inst_2 : DecidableEq γ],
  x ∈ t → (SimpleGraph.TripartiteFromTriangles.graph t).IsNClique 3 (SimpleGraph.TripartiteFromTriangles.toTriangle x)

theorem SimpleGraph.TripartiteFromTriangles.exists_mem_toTriangle E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {t : Finset (α × β × γ)} [inst : DecidableEq α] [inst_1 : DecidableEq β]
  [inst_2 : DecidableEq γ] {x y : α ⊕ β ⊕ γ},
  (SimpleGraph.TripartiteFromTriangles.graph t).Adj x y →
    ∃ z ∈ t, x ∈ SimpleGraph.TripartiteFromTriangles.toTriangle z ∧ y ∈ SimpleGraph.TripartiteFromTriangles.toTriangle z

theorem SimpleGraph.TripartiteFromTriangles.is3Clique_iff E0 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {t : Finset (α × β × γ)} [inst : DecidableEq α] [inst_1 : DecidableEq β]
  [inst_2 : DecidableEq γ] [SimpleGraph.TripartiteFromTriangles.NoAccidental t] {s : Finset (α ⊕ β ⊕ γ)},
  (SimpleGraph.TripartiteFromTriangles.graph t).IsNClique 3 s ↔
    ∃ x ∈ t, SimpleGraph.TripartiteFromTriangles.toTriangle x = s

theorem SimpleGraph.TripartiteFromTriangles.toTriangle_surjOn E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {t : Finset (α × β × γ)} [inst : DecidableEq α] [inst_1 : DecidableEq β]
  [inst_2 : DecidableEq γ] [SimpleGraph.TripartiteFromTriangles.NoAccidental t],
  Set.SurjOn (⇑SimpleGraph.TripartiteFromTriangles.toTriangle) (↑t)
    ((SimpleGraph.TripartiteFromTriangles.graph t).cliqueSet 3)

theorem SimpleGraph.TripartiteFromTriangles.map_toTriangle_disjoint E0 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} (t : Finset (α × β × γ)) [inst : DecidableEq α] [inst_1 : DecidableEq β]
  [inst_2 : DecidableEq γ] [SimpleGraph.TripartiteFromTriangles.ExplicitDisjoint t],
  (↑(Finset.map SimpleGraph.TripartiteFromTriangles.toTriangle t)).Pairwise fun x y ↦ (↑x ∩ ↑y).Subsingleton

theorem SimpleGraph.TripartiteFromTriangles.cliqueSet_eq_image E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} (t : Finset (α × β × γ)) [inst : DecidableEq α] [inst_1 : DecidableEq β]
  [inst_2 : DecidableEq γ] [SimpleGraph.TripartiteFromTriangles.NoAccidental t],
  (SimpleGraph.TripartiteFromTriangles.graph t).cliqueSet 3 = ⇑SimpleGraph.TripartiteFromTriangles.toTriangle '' ↑t

theorem SimpleGraph.TripartiteFromTriangles.cliqueFinset_eq_image E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} (t : Finset (α × β × γ)) [inst : DecidableEq α] [inst_1 : DecidableEq β]
  [inst_2 : DecidableEq γ] [inst_3 : Fintype α] [inst_4 : Fintype β] [inst_5 : Fintype γ]
  [SimpleGraph.TripartiteFromTriangles.NoAccidental t],
  (SimpleGraph.TripartiteFromTriangles.graph t).cliqueFinset 3 =
    Finset.image (⇑SimpleGraph.TripartiteFromTriangles.toTriangle) t

theorem SimpleGraph.TripartiteFromTriangles.cliqueFinset_eq_map E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} (t : Finset (α × β × γ)) [inst : DecidableEq α] [inst_1 : DecidableEq β]
  [inst_2 : DecidableEq γ] [inst_3 : Fintype α] [inst_4 : Fintype β] [inst_5 : Fintype γ]
  [SimpleGraph.TripartiteFromTriangles.NoAccidental t],
  (SimpleGraph.TripartiteFromTriangles.graph t).cliqueFinset 3 =
    Finset.map SimpleGraph.TripartiteFromTriangles.toTriangle t

theorem SimpleGraph.TripartiteFromTriangles.card_triangles E0 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} (t : Finset (α × β × γ)) [inst : DecidableEq α] [inst_1 : DecidableEq β]
  [inst_2 : DecidableEq γ] [inst_3 : Fintype α] [inst_4 : Fintype β] [inst_5 : Fintype γ]
  [SimpleGraph.TripartiteFromTriangles.NoAccidental t],
  ((SimpleGraph.TripartiteFromTriangles.graph t).cliqueFinset 3).card = t.card

theorem SimpleGraph.TripartiteFromTriangles.farFromTriangleFree E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {𝕜 : Type u_4} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜]
  [IsStrictOrderedRing 𝕜] (t : Finset (α × β × γ)) [inst_3 : DecidableEq α] [inst_4 : DecidableEq β]
  [inst_5 : DecidableEq γ] [inst_6 : Fintype α] [inst_7 : Fintype β] [inst_8 : Fintype γ]
  [SimpleGraph.TripartiteFromTriangles.ExplicitDisjoint t] {ε : 𝕜},
  ε * ↑((Fintype.card α + Fintype.card β + Fintype.card γ) ^ 2) ≤ ↑t.card →
    (SimpleGraph.TripartiteFromTriangles.graph t).FarFromTriangleFree ε

theorem SimpleGraph.TripartiteFromTriangles.locallyLinear E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} (t : Finset (α × β × γ))
  [SimpleGraph.TripartiteFromTriangles.ExplicitDisjoint t] [SimpleGraph.TripartiteFromTriangles.NoAccidental t],
  (SimpleGraph.TripartiteFromTriangles.graph t).LocallyLinear