Documentation

ExpanderGraphs.chapter1

Formalization of the book's content #

References #

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

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

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

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

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

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

        Equations
        Instances For
          noncomputable def UnweightedGraph.vol {α : Type u_1} {β : Type u_2} {G : UnweightedGraph α β} (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 UnweightedGraph.IsIsolated {α : Type u_1} {β : Type u_2} {G : UnweightedGraph α β} (v : G.vertexSet) :

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

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

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

              def UnweightedGraph.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 UnweightedGraph.L {α : Type u_1} {β : Type u_2} [DecidableEq α] {G : UnweightedGraph α β} [DecidableRel G.Adj] :
                Matrix α α
                Equations
                Instances For
                  noncomputable def UnweightedGraph.Laplacian {α : Type u_1} {β : Type u_2} [DecidableEq α] {G : UnweightedGraph α β} [DecidableRel G.Adj] :
                  Matrix α α
                  Equations
                  Instances For
                    noncomputable def UnweightedGraph.T_sqrt {α : Type u_1} {β : Type u_2} [DecidableEq α] {G : UnweightedGraph α β} :
                    Matrix α α
                    Equations
                    Instances For
                      noncomputable def UnweightedGraph.T_inv_sqrt {α : Type u_1} {β : Type u_2} [DecidableEq α] {G : UnweightedGraph α β} :
                      Matrix α α
                      Equations
                      Instances For
                        noncomputable def UnweightedGraph.LapOperator {α : Type u_1} {β : Type u_2} [DecidableEq α] [Fintype α] {G : UnweightedGraph α β} [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 UnweightedGraph.IsSimple {α : Type u_1} {β : Type u_2} {G : UnweightedGraph α β} :

                          No multiple loops

                          Equations
                          Instances For
                            theorem UnweightedGraph.LapOperatorFormula {α : Type u_1} {β : Type u_2} [DecidableEq α] [Fintype α] [Fintype β] {G : UnweightedGraph α β} [DecidableRel G.Adj] (hS : IsSimple) (hLoopless : ∀ (v : α), ¬G.Adj v v) :
                            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 UnweightedGraph.Adjacency {α : Type u_1} {β : Type u_2} {G : UnweightedGraph α β} [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 UnweightedGraph.Identity {α : Type u_1} [DecidableEq α] :
                              Matrix α α
                              Equations
                              Instances For
                                theorem UnweightedGraph.LapOfRegGraph {α : Type u_1} {β : Type u_2} [DecidableEq α] [Fintype β] {G : UnweightedGraph α β} [DecidableRel G.Adj] {k : ℕ+} (hLoopless : ∀ (v : α), ¬G.Adj v v) :

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

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

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

                                Equations
                                Instances For
                                  theorem UnweightedGraph.LapOfNotIsolatedGraph {α : Type u_1} {β : Type u_2} [DecidableEq α] [Fintype α] [Fintype β] {G : UnweightedGraph α β} [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 UnweightedGraph.S {α : Type u_1} {β : Type u_2} [DecidableEq α] {G : UnweightedGraph α β} [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 UnweightedGraph.LSS {α : Type u_1} {β : Type u_2} [DecidableEq α] [Fintype α] [Fintype β] {G : UnweightedGraph α β} [DecidableRel G.Adj] [DecidableRel G.Inc] :

                                    Laplacian = S * Sᵀ

                                    Proof that the Laplacian as defined above, is Hermitian.

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

                                    Eigenvalues of the Laplacian Matrix in non-increasing order.

                                    Equations
                                    Instances For
                                      def UnweightedGraph.DirichletSum {α : Type u_1} {β : Type u_2} [Fintype α] {G : UnweightedGraph α β} [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
                                        theorem UnweightedGraph.lapEigvals_one_eq_inf_rayleigh {α : Type u_1} {β : Type u_2} [DecidableEq α] [Fintype α] [Fintype β] {G : UnweightedGraph α β} [DecidableRel G.Adj] [Nonempty α] (hS : IsSimple) (hLoopless : ∀ (v : α), ¬G.Adj v v) :
                                        lapEigvals 1 = ⨅ (f : α), ⨅ (_ : v : α, f v * (degree v) = 0), ⨅ (_ : f 0), 1 / 2 * DirichletSum f / v : α, f v ^ 2 * (degree v)

                                        Quotient de Rayleigh pour la première valeur propre non nulle du laplacien normalisé.

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

                                        The spectrum of a graph

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

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

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

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

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

                                              Helper to access the eigenvalues by non-decreasing order.

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

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

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

                                              The equality in eigval_sum_le_n holds iff G has NoIsolation.

                                              theorem UnweightedGraph.zero_mem_lapSpectrum {α : Type u_1} {β : Type u_2} [DecidableEq α] [Fintype α] [Fintype β] {G : UnweightedGraph α β} [DecidableRel G.Adj] [OfNat (Fin (Fintype.card α)) 1] [OfNat (Fin (Fintype.card α)) 0] [Nonempty α] (hS : IsSimple) (hLoopless : ∀ (v : α), ¬G.Adj v v) :

                                              When the graph is non empty, 0 is an eigenvalue of the Laplacian.

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

                                              λ₀ = 0.

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

                                              Second eigenvalue is at most n / n-1.