Documentation

Matroid.Graph.Constructions.Basic

theorem Graph.noEdge_not_inc {α : Type u_1} {β : Type u_2} {x : α} {e : β} {V : Set α} :
¬(noEdge V β).Inc e x
@[simp]
theorem Graph.noEdge_not_isLoopAt {α : Type u_1} {β : Type u_2} {x : α} {e : β} {V : Set α} :
¬(noEdge V β).IsLoopAt e x
@[simp]
theorem Graph.noEdge_not_isNonloopAt {α : Type u_1} {β : Type u_2} {x : α} {e : β} {V : Set α} :
@[simp]
theorem Graph.noEdge_not_adj {α : Type u_1} {β : Type u_2} {x y : α} {V : Set α} :
¬(noEdge V β).Adj x y
theorem Graph.edgeSet_eq_empty_iff {α : Type u_1} {β : Type u_2} {G : Graph α β} :
@[simp]
theorem Graph.noEdge_incEdges {α : Type u_1} {β : Type u_2} {x : α} {X : Set α} :
def Graph.singleEdge {α : Type u_1} {β : Type u_2} (u v : α) (e : β) :
Graph α β

A graph with a single edge e from u to v

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    @[simp]
    theorem Graph.vertexSet_singleEdge {α : Type u_1} {β : Type u_2} (u v : α) (e : β) :
    @[simp]
    theorem Graph.edgeSet_singleEdge {α : Type u_1} {β : Type u_2} (u v : α) (e : β) :
    theorem Graph.singleEdge_comm {α : Type u_1} {β : Type u_2} (u v : α) (e : β) :
    @[simp]
    theorem Graph.singleEdge_inc_iff {α : Type u_1} {β : Type u_2} {x u v : α} {e f : β} :
    (Graph.singleEdge u v e).Inc f x f = e (x = u x = v)
    @[simp]
    theorem Graph.singleEdge_adj_iff {α : Type u_1} {β : Type u_2} {x y u v : α} {e : β} :
    (Graph.singleEdge u v e).Adj x y x = u y = v x = v y = u
    @[simp]
    theorem Graph.singleEdge_le_iff {α : Type u_1} {β : Type u_2} {u v : α} {e : β} {G : Graph α β} :
    Graph.singleEdge u v e G G.IsLink e u v
    @[simp]
    theorem Graph.bouquet_incEdges {α : Type u_1} {β : Type u_2} {v : α} {F : Set β} :
    E(bouquet v F, v) = F
    @[simp]
    theorem Graph.bouquet_le_iff_of_mem {α : Type u_1} {β : Type u_2} {v : α} {G : Graph α β} (hv : v G.vertexSet) (F : Set β) :
    bouquet v F G eF, G.IsLoopAt e v
    @[simp]
    theorem Graph.bouquet_le_iff_of_nonempty {α : Type u_1} {β : Type u_2} {G : Graph α β} {F : Set β} (v : α) (hF : F.Nonempty) :
    bouquet v F G eF, G.IsLoopAt e v
    @[simp]
    theorem Graph.banana_singleton {α : Type u_1} {β : Type u_2} {a b : α} (e : β) :
    @[simp]
    theorem Graph.restrict_banana {α : Type u_1} {β : Type u_2} (a b : α) (F R : Set β) :
    (banana a b F).restrict R = banana a b (F R)
    @[simp]
    theorem Graph.restrict_bouquet {α : Type u_1} {β : Type u_2} (v : α) (F R : Set β) :
    (bouquet v F).restrict R = bouquet v (F R)
    @[simp]
    theorem Graph.deleteEdges_banana {α : Type u_1} {β : Type u_2} (a b : α) (F R : Set β) :
    (banana a b F).deleteEdges R = banana a b (F \ R)
    @[simp]
    theorem Graph.deleteEdges_bouquet {α : Type u_1} {β : Type u_2} (v : α) (F R : Set β) :
    (bouquet v F).deleteEdges R = bouquet v (F \ R)
    @[deprecated Graph.IsSpanningSubgraph.banana_mono (since := "2026-05-04")]
    theorem Graph.banana_mono {α : Type u_1} {β : Type u_2} {a b : α} {X Y : Set β} (hXY : X Y) :
    banana a b X ≤s banana a b Y
    @[simp]
    theorem Graph.banana_incEdges_left {α : Type u_1} {β : Type u_2} {a b : α} {F : Set β} :
    E(banana a b F, a) = F
    @[simp]
    theorem Graph.banana_incEdges_right {α : Type u_1} {β : Type u_2} {a b : α} {F : Set β} :
    E(banana a b F, b) = F

    Complete graphs #

    The complete graph on n vertices.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      @[simp]
      theorem Graph.edgeSet_CompleteGraph (n : ) :
      (CompleteGraph n).edgeSet = {s : Sym2 | (∀ is, i < n) ¬s.IsDiag}
      @[simp]
      @[simp]
      theorem Graph.completeGraph_adj (n x y : ) (hx : x < n) (hy : y < n) :
      (CompleteGraph n).Adj x y x y
      @[simp]
      theorem Graph.neighbors_completeGraph (n x : ) (hx : x < n) :
      @[simp]
      theorem Graph.encard_neighbors_completeGraph (n x : ) (hx : x < n) :
      @[simp]
      theorem Graph.incEdges_completeGraph (n x : ) (hx : x < n) :
      E(CompleteGraph n, x) = {x_1 : Sym2 | ySet.Iio n \ {x}, s(x, y) = x_1}
      def Graph.IsComplete {α : Type u_1} {β : Type u_2} (G : Graph α β) :
      Equations
      Instances For
        @[simp]
        theorem Graph.bot_isComplete {α : Type u_1} {β : Type u_2} :
        @[simp]
        theorem Graph.bouquet_isComplete {α : Type u_1} {β : Type u_2} (v : α) (F : Set β) :
        @[simp]
        theorem Graph.singleEdge_isComplete {α : Type u_1} {β : Type u_2} (u v : α) (e : β) :
        theorem Graph.banana_isComplete {α : Type u_1} {β : Type u_2} {F : Set β} (a b : α) (hF : F.Nonempty) :
        @[simp]
        theorem Graph.banana_isComplete_iff {α : Type u_1} {β : Type u_2} (a b : α) (F : Set β) :

        The complete bipartite graph with left part {0, ..., m - 1} and right part {0, ..., n - 1}.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          @[simp]
          theorem Graph.vertexSet_CompleteBipartiteGraph (m n : ) :
          (CompleteBipartiteGraph m n).vertexSet = {x : | match x with | Sum.inl i => i < m | Sum.inr j => j < n}
          @[simp]
          theorem Graph.completeBipartiteGraph_adj_iff (m n : ) (x y : ) :
          (CompleteBipartiteGraph m n).Adj x y (∃ i < m, j < n, x = Sum.inl i y = Sum.inr j) i < m, j < n, x = Sum.inr j y = Sum.inl i
          def Graph.StarGraph {α : Type u_1} {β : Type u_2} (v : α) (f : β →. α) :
          Graph α β

          The star graph with n leaves with center v

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            @[simp]
            theorem Graph.edgeSet_StarGraph {α : Type u_1} {β : Type u_2} (v : α) (f : β →. α) :
            @[simp]
            theorem Graph.vertexSet_StarGraph {α : Type u_1} {β : Type u_2} (v : α) (f : β →. α) :
            @[simp]
            theorem Graph.starGraph_inc_iff {α : Type u_1} {β : Type u_2} (v : α) (f : β →. α) (e : β) (x : α) :
            (StarGraph v f).Inc e x v = x e f.Dom x f e
            @[simp]
            theorem Graph.starGraph_adj_iff {α : Type u_1} {β : Type u_2} (v : α) (f : β →. α) (x y : α) :
            (StarGraph v f).Adj x y v = x y f.ran v = y x f.ran
            def Graph.fromList {α : Type u_1} (S : Set α) (l : List (α × α)) :

            The graph with vertex set S and edges over between pairs of vertices according to the list l.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              @[simp]
              theorem Graph.edgeSet_fromList {α : Type u_1} (S : Set α) (l : List (α × α)) :
              @[simp]
              theorem Graph.vertexSet_fromList {α : Type u_1} (S : Set α) (l : List (α × α)) :
              (fromList S l).vertexSet = S {x : α | pl, x = p.1 x = p.2}
              def Graph.OfSimpleGraph {α : Type u_1} (G : SimpleGraph α) :
              Graph α (Sym2 α)
              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                @[simp]
                theorem Graph.edgeSet_OfSimpleGraph {α : Type u_1} (G : SimpleGraph α) :
                (OfSimpleGraph G).edgeSet = {s : Sym2 α | ∃ (x : α) (y : α), G.Adj x y s(x, y) = s}
                def Graph.OfSimpleGraphSet {α : Type u_1} {S : Set α} (G : SimpleGraph S) :
                Graph α (Sym2 α)
                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  @[simp]
                  theorem Graph.edgeSet_OfSimpleGraphSet {α : Type u_1} {S : Set α} (G : SimpleGraph S) :
                  (OfSimpleGraphSet G).edgeSet = {s : Sym2 α | ∃ (x : S) (y : S), G.Adj x y s(x, y) = s}
                  @[simp]
                  theorem Graph.vertexSet_OfSimpleGraphSet {α : Type u_1} {S : Set α} (G : SimpleGraph S) :
                  def Graph.LineSimpleGraph {α : Type u_1} {β : Type u_2} (G : Graph α β) :
                  Equations
                  Instances For
                    @[simp]
                    theorem Graph.LineSimpleGraph_adj {α : Type u_1} {β : Type u_2} (G : Graph α β) (a b : G.edgeSet) :
                    G.LineSimpleGraph.Adj a b = (¬a = b ((∃ (x : α), G.Inc (↑a) x G.Inc (↑b) x) ∃ (x : α), G.Inc (↑b) x G.Inc (↑a) x))
                    def Graph.LineGraph {α : Type u_1} {β : Type u_2} (G : Graph α β) :
                    Graph β (Sym2 β)

                    The line graph of a graph G is the simple graph with the same vertices as G and edges given by the pairs of edges in G that have a common vertex.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      @[simp]
                      theorem Graph.vertexSet_LineGraph {α : Type u_1} {β : Type u_2} (G : Graph α β) :
                      @[simp]
                      theorem Graph.edgeSet_LineGraph {α : Type u_1} {β : Type u_2} (G : Graph α β) :
                      G.LineGraph.edgeSet = (fun (p : β × β) => s(p.1, p.2)) '' {x : β × β | ¬x.1 = x.2 ∃ (x_1 : α), G.Inc x.1 x_1 G.Inc x.2 x_1}
                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        @[simp]
                        theorem Graph.lineGraph_inc {α : Type u_1} {β : Type u_2} (G : Graph α β) (s : Sym2 β) (e : β) :
                        @[simp]
                        theorem Graph.lineGraph_adj {α : Type u_1} {β : Type u_2} (G : Graph α β) (e f : β) :
                        G.LineGraph.Adj e f e f ∃ (x : α), G.Inc e x G.Inc f x
                        theorem Graph.lineGraph_bouquet_isComplete {α : Type u_1} {β : Type u_2} (v : α) (F : Set β) :
                        theorem Graph.lineGraph_banana_isComplete {α : Type u_1} {β : Type u_2} (a b : α) (F : Set β) :
                        theorem Graph.lineGraph_singleEdge_isComplete {α : Type u_1} {β : Type u_2} (u v : α) (e : β) :
                        theorem Graph.lineGraph_starGraph_isComplete {α : Type u_1} {β : Type u_2} (v : α) (f : β →. α) :
                        def Graph.mixedLineGraph {α : Type u_1} {β : Type u_2} (G : Graph α β) :
                        Graph (α β) (α × β)

                        Note: a loop becomes a leaf.

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For
                          @[simp]
                          theorem Graph.edgeSet_mixedLineGraph {α : Type u_1} {β : Type u_2} (G : Graph α β) :
                          G.mixedLineGraph.edgeSet = {(a, b) : α × β | G.Inc b a}
                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            @[simp]
                            theorem Graph.mixedLineGraph_inc {α : Type u_1} {β : Type u_2} (G : Graph α β) (e : α × β) (a : α β) :
                            G.mixedLineGraph.Inc e a G.Inc e.2 e.1 (Sum.inr e.2 = a Sum.inl e.1 = a)
                            theorem Graph.mixedLineGraph_adj {α : Type u_1} {β : Type u_2} (G : Graph α β) (a b : α β) :
                            G.mixedLineGraph.Adj a b ∃ (x : α) (e : β), G.Inc e x s(Sum.inl x, Sum.inr e) = s(a, b)
                            @[simp]
                            theorem Graph.mixedLineGraph_vertex_not_adj {α : Type u_1} {β : Type u_2} (G : Graph α β) (x y : α) :
                            @[simp]
                            theorem Graph.mixedLineGraph_edge_not_adj {α : Type u_1} {β : Type u_2} (G : Graph α β) (e f : β) :