Documentation

ExpanderGraphs.chapter1

Formalization of the book's content #

References #

structure WeightedGraph (α : Type u_1) (β : Type u_2) extends Graph α β :
Type (max u_1 u_2)
Instances For
    noncomputable def WeightedGraph.degree {α : Type u_1} {β : Type u_2} {G : WeightedGraph α β} (v : α) :

    G.degree v is the number of edges incident to v.

    Equations
    Instances For
      def WeightedGraph.IsRegularOfDegree {α : Type u_1} {β : Type u_2} {G : WeightedGraph α β} (k : ) :

      A graph is regular of degree d if every vertex has degree d.

      Equations
      Instances For
        noncomputable def WeightedGraph.graphVolume {α : Type u_1} {β : Type u_2} [Fintype α] {G : WeightedGraph α β} :

        The volume of a graph is defined as the sum of the degrees of its vertices

        Equations
        Instances For
          noncomputable def WeightedGraph.vol {α : Type u_1} {β : Type u_2} {G : WeightedGraph α β} (S : Set α) [Fintype S] :

          We define vol S, the volume of S, to be the sum of the degrees of the vertices in S.

          Equations
          Instances For
            def WeightedGraph.IsIsolated {α : Type u_1} {β : Type u_2} {G : WeightedGraph α β} (v : G.vertexSet) :

            We say v is an isolated vertex if dᵥ = 0.

            Equations
            Instances For
              theorem WeightedGraph.no_adj_iff_zero_degree {α : Type u_1} {β : Type u_2} [DecidableEq α] [Fintype α] [Fintype β] {G : WeightedGraph α β} [DecidableRel G.Adj] (v : α) :
              degree v = 0 ∀ (u : α), ¬G.Adj u v

              A vertex has degree 0 iff it has no adjacent vertex.

              def WeightedGraph.NonTrivial {α : Type u_1} {β : Type u_2} (G : Graph α β) :

              A graph is said to be nontrivial if it contains at least one edge.

              Equations
              Instances For
                noncomputable def WeightedGraph.L {α : Type u_1} {β : Type u_2} [DecidableEq α] {G : WeightedGraph α β} [DecidableRel G.Adj] :
                Matrix α α
                Equations
                Instances For
                  noncomputable def WeightedGraph.Laplacian {α : Type u_1} {β : Type u_2} [DecidableEq α] {G : WeightedGraph α β} [DecidableRel G.Adj] :
                  Matrix α α
                  Equations
                  Instances For
                    noncomputable def WeightedGraph.T_sqrt {α : Type u_1} {β : Type u_2} [DecidableEq α] {G : WeightedGraph α β} :
                    Matrix α α
                    Equations
                    Instances For
                      noncomputable def WeightedGraph.T_inv_sqrt {α : Type u_1} {β : Type u_2} [DecidableEq α] {G : WeightedGraph α β} :
                      Matrix α α
                      Equations
                      Instances For
                        noncomputable def WeightedGraph.LapOperator {α : Type u_1} {β : Type u_2} [DecidableEq α] [Fintype α] {G : WeightedGraph α β} [DecidableRel G.Adj] :
                        (α) →L[] α

                        The Laplacian can be viewed as an operator on the space of functions g : V(G) → R.

                        Equations
                        Instances For
                          def WeightedGraph.IsSimple {α : Type u_1} {β : Type u_2} {G : WeightedGraph α β} :

                          No multiple loops

                          Equations
                          Instances For
                            theorem WeightedGraph.LapOperatorFormula {α : Type u_1} {β : Type u_2} [DecidableEq α] [Fintype α] [Fintype β] {G : WeightedGraph α β} [DecidableRel G.Adj] (hS : IsSimple) :
                            LapOperator = fun (g : α) (u : α) => 1 / (degree u) * v : α, if G.Adj u v then g u / (degree u) - g v / (degree v) else 0

                            The Laplacian Operator satisfies big equation page 3.

                            def WeightedGraph.Adjacency {α : Type u_1} {β : Type u_2} {G : WeightedGraph α β} [DecidableRel G.Adj] :
                            Matrix α α

                            Adjacency Matrix: A(u, v) = 1 if u is adjacent to v, and 0 otherwise.

                            Equations
                            Instances For
                              @[reducible, inline]
                              abbrev WeightedGraph.Identity {α : Type u_1} [DecidableEq α] :
                              Matrix α α
                              Equations
                              Instances For
                                theorem WeightedGraph.LapOfRegGraph {α : Type u_1} {β : Type u_2} [DecidableEq α] [Fintype β] {G : WeightedGraph α β} [DecidableRel G.Adj] {k : ℕ+} (hLoopless : ∀ (v : α), ¬G.Adj v v) :

                                For a loopless, k-regular graph, Laplacian = Identity − 1/k * Adjacency

                                def WeightedGraph.NoIsolation {α : Type u_1} {β : Type u_2} {G : WeightedGraph α β} :

                                We say that a graph has no isolation when none of its vertices is isolated.

                                Equations
                                Instances For
                                  theorem WeightedGraph.LapOfNotIsolatedGraph {α : Type u_1} {β : Type u_2} [DecidableEq α] [Fintype α] [Fintype β] {G : WeightedGraph α β} [DecidableRel G.Adj] ( : G.vertexSet = Set.univ) (hLoopless : ∀ (v : α), ¬G.Adj v v) :

                                  For a graph without isolated vertices, we have Laplacian = Identity - T_inv_sqrt * Adjacency * T_inv_sqrt.

                                  noncomputable def WeightedGraph.S {α : Type u_1} {β : Type u_2} [DecidableEq α] {G : WeightedGraph α β} [DecidableRel G.Inc] :
                                  Matrix α β

                                  S is the matrix whose rows are indexed by the vertices and whose columns are indexed by the edges of G. Each column corresponding to an edgece = {u, v} has an entry 1/√dᵤ in the row corresponding to u, an entry −1/√dᵥ in the row corresponding to v, and has zero entries elsewhere.

                                  Equations
                                  Instances For
                                    theorem WeightedGraph.LSS {α : Type u_1} {β : Type u_2} [DecidableEq α] [Fintype α] [Fintype β] {G : WeightedGraph α β} [DecidableRel G.Adj] [DecidableRel G.Inc] :

                                    Laplacian = S * Sᵀ

                                    Proof that the Laplacian as defined above, is Hermitian.

                                    noncomputable def WeightedGraph.lapEigvals {α : Type u_1} {β : Type u_2} [DecidableEq α] [Fintype α] [Fintype β] {G : WeightedGraph α β} [DecidableRel G.Adj] :

                                    Eigenvalues of the Laplacian Matrix in non-increasing order.

                                    Equations
                                    Instances For
                                      def WeightedGraph.DirichletSum {α : Type u_1} {β : Type u_2} [Fintype α] {G : WeightedGraph α β} [DecidableRel G.Adj] (f : α) :

                                      The Dirichlet sum of a graph G is the sum of (f(u) - f(v))² over all unordered pairs {u, v} for which u and v are adjacent.

                                      Equations
                                      Instances For
                                        def WeightedGraph.lapSpectrum {α : Type u_1} {β : Type u_2} [DecidableEq α] [Fintype α] (G : WeightedGraph α β) [DecidableRel G.Adj] :

                                        The spectrum of a graph

                                        Equations
                                        Instances For
                                          @[reducible, inline]
                                          abbrev WeightedGraph.τ {α : Type u_1} :
                                          α

                                          τ denote the constant function which assigns the value 1 on each vertex

                                          Equations
                                          Instances For
                                            theorem WeightedGraph.card_of_adj_loopless {α : Type u_1} {β : Type u_2} [DecidableEq α] [Fintype α] [Fintype β] {G : WeightedGraph α β} [DecidableRel G.Adj] (v : α) (hS : IsSimple) :
                                            {x : α | G.Adj v x}.ncard = degree v
                                            theorem WeightedGraph.adj_degree_neq_zero {α : Type u_1} {β : Type u_2} [DecidableEq α] [Fintype α] [Fintype β] {G : WeightedGraph α β} [DecidableRel G.Adj] (u v : α) (hAdj : G.Adj u v) :
                                            theorem WeightedGraph.zero_eigenvalue_normalized {α : Type u_1} {β : Type u_2} [DecidableEq α] [Fintype α] [Fintype β] {G : WeightedGraph α β} [DecidableRel G.Adj] (hS : IsSimple) (hLoopless : ∀ (v : α), ¬G.Adj v v) :

                                            T_sqrt * τ is an eigenfunction of Laplacian with eigenvalue 0.

                                            @[reducible, inline]
                                            abbrev WeightedGraph.hGH {α : Type u_1} {β : Type u_2} [DecidableEq α] [Fintype β] {G : WeightedGraph α β} [DecidableRel G.Adj] :
                                            Equations
                                            • =
                                            Instances For
                                              theorem WeightedGraph.eigval_order {α : Type u_1} {β : Type u_2} [DecidableEq α] [Fintype α] [Fintype β] {G : WeightedGraph α β} [DecidableRel G.Adj] [OfNat (Fin (Fintype.card α)) 1] {i j : Fin (Fintype.card α)} :

                                              Helper to access the eigenvalues by non-decreasing order.

                                              structure WeightedGraph.CompleteGraph (α : Type u_3) (β : Type u_4) extends WeightedGraph α β :
                                              Type (max u_3 u_4)

                                              Complete Graph Kₙ on n vertices.

                                              Instances For
                                                theorem WeightedGraph.complete_graph_loopless {α : Type u_1} {β : Type u_2} [DecidableEq α] [Fintype α] [Fintype β] [OfNat (Fin (Fintype.card α)) 1] {K : CompleteGraph α β} (v : α) :
                                                ¬K.Adj v v

                                                0 is an eigenvalue of the Laplacian of a graph.

                                                For the complete graph Kₙ on n vertices, the eigenvalues are 0 and n/(n − 1) (with multiplicity n − 1).

                                                theorem WeightedGraph.lapEigvals_sum_eq_trace {α : Type u_1} {β : Type u_2} [DecidableEq α] [Fintype α] [Fintype β] {G : WeightedGraph α β} [DecidableRel G.Adj] ( : G.vertexSet = Set.univ) {n : } (hn : n = Nat.card G.vertexSet) [Fact (1 < n)] [OfNat (Fin (Fintype.card α)) 1] :
                                                theorem WeightedGraph.eigval_sum_le_n {α : Type u_1} {β : Type u_2} [DecidableEq α] [Fintype α] [Fintype β] {G : WeightedGraph α β} [DecidableRel G.Adj] ( : G.vertexSet = Set.univ) {n : } (hn : n = Nat.card G.vertexSet) [Fact (1 < n)] [OfNat (Fin (Fintype.card α)) 1] :
                                                i : Fin (Fintype.card α), lapEigvals i n

                                                For graph G on n vertices, the sum of its eigenvalues it at most n.

                                                theorem WeightedGraph.eigval_sum_eq_n_iff_no_isolation {α : Type u_1} {β : Type u_2} [DecidableEq α] [Fintype α] [Fintype β] {G : WeightedGraph α β} [DecidableRel G.Adj] ( : G.vertexSet = Set.univ) {n : } (hn : n = Nat.card G.vertexSet) [Fact (1 < n)] [OfNat (Fin (Fintype.card α)) 1] (h : NoIsolation) :
                                                i : Fin (Fintype.card α), lapEigvals i = n

                                                The equality in eigval_sum_le_n holds iff G has NoIsolation.

                                                theorem WeightedGraph.second_eigval_le_div {α : Type u_1} {β : Type u_2} [DecidableEq α] [Fintype α] [Fintype β] {G : WeightedGraph α β} [DecidableRel G.Adj] ( : G.vertexSet = Set.univ) {n : } (hn : n = Nat.card G.vertexSet) [Fact (1 < n)] [OfNat (Fin (Fintype.card α)) 1] :
                                                lapEigvals 1 n / (n - 1)

                                                Second eigenvalue is at most n / n-1.