@@ -93,7 +93,7 @@ theorem adjMatrix_sq_of_ne {v w : V} (hvw : v ≠ w) :
9393 We use it to show that nonadjacent vertices have equal degrees. -/
9494theorem adjMatrix_pow_three_of_not_adj {v w : V} (non_adj : ¬G.Adj v w) :
9595 (G.adjMatrix R ^ 3 : Matrix V V R) v w = degree G v := by
96- rw [pow_succ, mul_eq_mul, adjMatrix_mul_apply, degree, card_eq_sum_ones, Nat.cast_sum]
96+ rw [pow_succ, adjMatrix_mul_apply, degree, card_eq_sum_ones, Nat.cast_sum]
9797 apply sum_congr rfl
9898 intro x hx
9999 rw [adjMatrix_sq_of_ne _ hG, Nat.cast_one]
@@ -114,8 +114,8 @@ theorem degree_eq_of_not_adj {v w : V} (hvw : ¬G.Adj v w) : degree G v = degree
114114 ← adjMatrix_pow_three_of_not_adj ℕ hG hvw,
115115 ← adjMatrix_pow_three_of_not_adj ℕ hG fun h => hvw (G.symm h)]
116116 conv_lhs => rw [← transpose_adjMatrix]
117- simp only [pow_succ _ 2 , sq, mul_eq_mul, ← transpose_mul, transpose_apply]
118- simp only [← mul_eq_mul, mul_assoc]
117+ simp only [pow_succ _ 2 , sq, ← transpose_mul, transpose_apply]
118+ simp only [mul_assoc]
119119#align theorems_100.friendship.degree_eq_of_not_adj Theorems100.Friendship.degree_eq_of_not_adj
120120
121121/-- Let `A` be the adjacency matrix of a graph `G`.
@@ -125,7 +125,7 @@ theorem degree_eq_of_not_adj {v w : V} (hvw : ¬G.Adj v w) : degree G v = degree
125125theorem adjMatrix_sq_of_regular (hd : G.IsRegularOfDegree d) :
126126 G.adjMatrix R ^ 2 = of fun v w => if v = w then (d : R) else (1 : R) := by
127127 ext (v w); by_cases h : v = w
128- · rw [h, sq, mul_eq_mul, adjMatrix_mul_self_apply_self, hd]; simp
128+ · rw [h, sq, adjMatrix_mul_self_apply_self, hd]; simp
129129 · rw [adjMatrix_sq_of_ne R hG h, of_apply, if_neg h]
130130#align theorems_100.friendship.adj_matrix_sq_of_regular Theorems100.Friendship.adjMatrix_sq_of_regular
131131
@@ -184,7 +184,7 @@ theorem card_of_regular (hd : G.IsRegularOfDegree d) : d + (Fintype.card V - 1)
184184 Ne.def, not_false_iff, add_right_inj, false_and_iff, of_apply]
185185 rw [Finset.sum_const_nat, card_erase_of_mem (mem_univ v), mul_one]; · rfl
186186 intro x hx; simp [(ne_of_mem_erase hx).symm]
187- · rw [sq, mul_eq_mul, ← mulVec_mulVec]
187+ · rw [sq, ← mulVec_mulVec]
188188 simp only [adjMatrix_mulVec_const_apply_of_regular hd, neighborFinset,
189189 card_neighborSet_eq_degree, hd v, Function.const_def, adjMatrix_mulVec_apply _ _ (mulVec _ _),
190190 mul_one, sum_const, Set.toFinset_card, Algebra.id.smul_eq_mul, Nat.cast_id]
@@ -206,7 +206,7 @@ end Nonempty
206206theorem adjMatrix_sq_mul_const_one_of_regular (hd : G.IsRegularOfDegree d) :
207207 G.adjMatrix R * of (fun _ _ => 1 ) = of (fun _ _ => (d : R)) := by
208208 ext x
209- simp only [← hd x, degree, mul_eq_mul, adjMatrix_mul_apply, sum_const, Nat.smul_one_eq_coe,
209+ simp only [← hd x, degree, adjMatrix_mul_apply, sum_const, Nat.smul_one_eq_coe,
210210 of_apply]
211211#align theorems_100.friendship.adj_matrix_sq_mul_const_one_of_regular Theorems100.Friendship.adjMatrix_sq_mul_const_one_of_regular
212212
0 commit comments