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

full_name: SimpleGraph.EdgeDisjointTriangles
code: /-- A graph has edge-disjoint triangles if each edge belongs to at most one triangle. -/
def EdgeDisjointTriangles (G : SimpleGraph α) : Prop 
goal: Prop

full_name: SimpleGraph.LocallyLinear
code: /-- A graph is locally linear if each edge belongs to exactly one triangle. -/
def LocallyLinear (G : SimpleGraph α) : Prop 
goal: Prop

full_name: SimpleGraph.LocallyLinear.edgeDisjointTriangles
code: protected lemma LocallyLinear.edgeDisjointTriangles : G.LocallyLinear → G.EdgeDisjointTriangles 
goal: G.LocallyLinear → G.EdgeDisjointTriangles

full_name: SimpleGraph.EdgeDisjointTriangles.mono
code: nonrec lemma EdgeDisjointTriangles.mono (h : G ≤ H) (hH : H.EdgeDisjointTriangles) :
    G.EdgeDisjointTriangles 
goal: G.EdgeDisjointTriangles

full_name: SimpleGraph.edgeDisjointTriangles_bot
code: @[simp] lemma edgeDisjointTriangles_bot : (⊥ : SimpleGraph α).EdgeDisjointTriangles 
goal: ⊥.EdgeDisjointTriangles

full_name: SimpleGraph.locallyLinear_bot
code: @[simp] lemma locallyLinear_bot : (⊥ : SimpleGraph α).LocallyLinear 
goal: ⊥.LocallyLinear

full_name: SimpleGraph.EdgeDisjointTriangles.map
code: lemma EdgeDisjointTriangles.map (f : α ↪ β) (hG : G.EdgeDisjointTriangles) :
    (G.map f).EdgeDisjointTriangles 
goal: (SimpleGraph.map f G).EdgeDisjointTriangles

full_name: SimpleGraph.LocallyLinear.map
code: lemma LocallyLinear.map (f : α ↪ β) (hG : G.LocallyLinear) : (G.map f).LocallyLinear 
goal: (SimpleGraph.map f G).LocallyLinear

full_name: SimpleGraph.locallyLinear_comap
code: @[simp] lemma locallyLinear_comap {G : SimpleGraph β} {e : α ≃ β} :
    (G.comap e).LocallyLinear ↔ G.LocallyLinear 
goal: (SimpleGraph.comap (⇑e) G).LocallyLinear ↔ G.LocallyLinear

full_name: SimpleGraph.edgeDisjointTriangles_iff_mem_sym2_subsingleton
code: lemma edgeDisjointTriangles_iff_mem_sym2_subsingleton :
    G.EdgeDisjointTriangles ↔
      ∀ ⦃e : Sym2 α⦄, ¬ e.IsDiag → {s ∈ G.cliqueSet 3 | e ∈ (s : Finset α).sym2}.Subsingleton 
goal: G.EdgeDisjointTriangles ↔ ∀ ⦃e : Sym2 α⦄, ¬e.IsDiag → {s | s ∈ G.cliqueSet 3 ∧ e ∈ s.sym2}.Subsingleton

full_name: SimpleGraph.EdgeDisjointTriangles.instDecidable
code: instance EdgeDisjointTriangles.instDecidable : Decidable G.EdgeDisjointTriangles 
goal: Decidable G.EdgeDisjointTriangles

full_name: SimpleGraph.LocallyLinear.instDecidable
code: instance LocallyLinear.instDecidable : Decidable G.LocallyLinear 
goal: Decidable G.LocallyLinear

full_name: SimpleGraph.EdgeDisjointTriangles.card_edgeFinset_le
code: lemma EdgeDisjointTriangles.card_edgeFinset_le (hG : G.EdgeDisjointTriangles) :
    3 * (G.cliqueFinset 3).card ≤ G.edgeFinset.card 
goal: 3 * (G.cliqueFinset 3).card ≤ G.edgeFinset.card

full_name: SimpleGraph.LocallyLinear.card_edgeFinset
code: lemma LocallyLinear.card_edgeFinset (hG : G.LocallyLinear) :
    G.edgeFinset.card = 3 * (G.cliqueFinset 3).card 
goal: G.edgeFinset.card = 3 * (G.cliqueFinset 3).card

full_name: SimpleGraph.FarFromTriangleFree
code: /-- A simple graph is *`ε`-far from triangle-free* if one must remove at least
`ε * (card α) ^ 2` edges to make it triangle-free. -/
def FarFromTriangleFree : Prop 
goal: Prop

full_name: SimpleGraph.farFromTriangleFree_iff
code: theorem farFromTriangleFree_iff :
    G.FarFromTriangleFree ε ↔ ∀ ⦃H : SimpleGraph α⦄, [DecidableRel H.Adj] → H ≤ G → H.CliqueFree 3 →
      ε * (card α ^ 2 : ℕ) ≤ G.edgeFinset.card - H.edgeFinset.card 
goal: G.FarFromTriangleFree ε ↔
  ∀ ⦃H : SimpleGraph α⦄ [inst : DecidableRel H.Adj],
    H ≤ G → H.CliqueFree 3 → ε * ↑(Fintype.card α ^ 2) ≤ ↑G.edgeFinset.card - ↑H.edgeFinset.card

full_name: SimpleGraph.FarFromTriangleFree.mono
code: nonrec theorem FarFromTriangleFree.mono (hε : G.FarFromTriangleFree ε) (h : δ ≤ ε) :
    G.FarFromTriangleFree δ 
goal: G.FarFromTriangleFree δ

full_name: SimpleGraph.FarFromTriangleFree.cliqueFinset_nonempty'
code: theorem FarFromTriangleFree.cliqueFinset_nonempty' (hH : H ≤ G) (hG : G.FarFromTriangleFree ε)
    (hcard : G.edgeFinset.card - H.edgeFinset.card < ε * (card α ^ 2 : ℕ)) :
    (H.cliqueFinset 3).Nonempty 
goal: (H.cliqueFinset 3).Nonempty

full_name: _private.Mathlib.Combinatorics.SimpleGraph.Triangle.Basic.0.SimpleGraph.farFromTriangleFree_of_disjoint_triangles_aux
code: private lemma farFromTriangleFree_of_disjoint_triangles_aux {tris : Finset (Finset α)}
    (htris : tris ⊆ G.cliqueFinset 3)
    (pd : (tris : Set (Finset α)).Pairwise fun x y ↦ (x ∩ y : Set α).Subsingleton) (hHG : H ≤ G)
    (hH : H.CliqueFree 3) : tris.card ≤ G.edgeFinset.card - H.edgeFinset.card 
goal: tris.card ≤ G.edgeFinset.card - H.edgeFinset.card

full_name: SimpleGraph.farFromTriangleFree_of_disjoint_triangles
code: /-- If there are `ε * (card α)^2` disjoint triangles, then the graph is `ε`-far from being
triangle-free. -/
lemma farFromTriangleFree_of_disjoint_triangles (tris : Finset (Finset α))
    (htris : tris ⊆ G.cliqueFinset 3)
    (pd : (tris : Set (Finset α)).Pairwise fun x y ↦ (x ∩ y : Set α).Subsingleton)
    (tris_big : ε * (card α ^ 2 : ℕ) ≤ tris.card) :
    G.FarFromTriangleFree ε 
goal: G.FarFromTriangleFree ε

full_name: SimpleGraph.EdgeDisjointTriangles.farFromTriangleFree
code: protected lemma EdgeDisjointTriangles.farFromTriangleFree (hG : G.EdgeDisjointTriangles)
    (tris_big : ε * (card α ^ 2 : ℕ) ≤ (G.cliqueFinset 3).card) :
    G.FarFromTriangleFree ε 
goal: G.FarFromTriangleFree ε

full_name: SimpleGraph.FarFromTriangleFree.lt_half
code: lemma FarFromTriangleFree.lt_half (hG : G.FarFromTriangleFree ε) : ε < 2⁻¹ 
goal: ε < 2⁻¹

full_name: SimpleGraph.FarFromTriangleFree.lt_one
code: lemma FarFromTriangleFree.lt_one (hG : G.FarFromTriangleFree ε) : ε < 1 
goal: ε < 1

full_name: SimpleGraph.FarFromTriangleFree.nonpos
code: theorem FarFromTriangleFree.nonpos (h₀ : G.FarFromTriangleFree ε) (h₁ : G.CliqueFree 3) :
    ε ≤ 0 
goal: ε ≤ 0

full_name: SimpleGraph.CliqueFree.not_farFromTriangleFree
code: theorem CliqueFree.not_farFromTriangleFree (hG : G.CliqueFree 3) (hε : 0 < ε) :
    ¬G.FarFromTriangleFree ε 
goal: ¬G.FarFromTriangleFree ε

full_name: SimpleGraph.FarFromTriangleFree.not_cliqueFree
code: theorem FarFromTriangleFree.not_cliqueFree (hG : G.FarFromTriangleFree ε) (hε : 0 < ε) :
    ¬G.CliqueFree 3 
goal: ¬G.CliqueFree 3

full_name: SimpleGraph.FarFromTriangleFree.cliqueFinset_nonempty
code: theorem FarFromTriangleFree.cliqueFinset_nonempty [DecidableEq α]
    (hG : G.FarFromTriangleFree ε) (hε : 0 < ε) : (G.cliqueFinset 3).Nonempty 
goal: (G.cliqueFinset 3).Nonempty