AFTD Auto-Formalizing Theoretical Domains

simple_graph_vertex_isolated_packed_k4_decreases_packing

theoremverified

If a maximum triangle packing contains abc vertex-disjoint from every other packing triangle, and abcx is a four-clique, then deleting the opposite edges ab and cx decreases the packing number, regardless of whether x belongs to another packing triangle.

Statement

theorem simple_graph_vertex_isolated_packed_k4_decreases_packing (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (a b c x : Fin n) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hmax : P.card = simple_graph_triangle_packing_number G) (hp : ({a,b,c} : Finset (Fin n)) ∈ P) (hisolated : ∀ t ∈ P, t ≠ ({a,b,c} : Finset (Fin n)) → Disjoint t ({a,b,c} : Finset (Fin n))) (hk4 : G.IsNClique 4 ({a,b,c,x} : Finset (Fin n))) : simple_graph_triangle_packing_number (G.deleteEdges {s(a,b), s(c,x)}) < simple_graph_triangle_packing_number G
Source
A vertex-isolated packed-triangle reduction for the forced-K4 branch of simple_graph_triangle_cover_number_le_two_mul_packing_number.
Verified
25 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 2

The proof, explained

To handle the possibility that vertex x is shared with another packing triangle, the proof transforms P into an equivalent maximum triangle packing P' by replacing {a, b, c} with {a, b, x}. Because {a, b, c} was isolated from all other triangles in P, vertex c becomes completely external to P', while {a, b} remains private to {a, b, x}. The theorem then reduces directly to the external-vertex lemma applied to P', triangle {a, b, x}, and external vertex c.

  1. The vertices a, b, c, and x of the 4-clique are pairwise distinct.

    For each pair of vertices among a, b, c, x, assuming they are equal would make {a, b, c, x} a subset of a 3-element set and therefore have cardinality at most 3. This contradicts the hypothesis that {a, b, c, x} forms a 4-clique (which has cardinality 4).

    lines 4–70

    uses Finset.mem_insert, Finset.mem_singleton, Finset.card_le_card, Finset.card_le_three

      classical
      have hab : a ≠ b := by
        intro h
        have hs : ({a,b,c,x} : Finset (Fin n)) ⊆ {a,c,x} := by
          intro v hv
          simp only [Finset.mem_insert, Finset.mem_singleton] at hv ⊢
          clear * - h hv
          aesop
        have hc := Finset.card_le_card hs
        have hb := Finset.card_le_three (a := a) (b := c) (c := x)
        have h4 := hk4.card_eq
        omega
      have hac : a ≠ c := by
        intro h
        have hs : ({a,b,c,x} : Finset (Fin n)) ⊆ {a,b,x} := by
          intro v hv
          simp only [Finset.mem_insert, Finset.mem_singleton] at hv ⊢
          clear * - h hv
          aesop
        have hc := Finset.card_le_card hs
        have hb := Finset.card_le_three (a := a) (b := b) (c := x)
        have h4 := hk4.card_eq
        omega
      have hax : a ≠ x := by
        intro h
        have hs : ({a,b,c,x} : Finset (Fin n)) ⊆ {a,b,c} := by
          intro v hv
          simp only [Finset.mem_insert, Finset.mem_singleton] at hv ⊢
          clear * - h hv
          aesop
        have hc := Finset.card_le_card hs
        have hb := Finset.card_le_three (a := a) (b := b) (c := c)
        have h4 := hk4.card_eq
        omega
      have hbc : b ≠ c := by
        intro h
        have hs : ({a,b,c,x} : Finset (Fin n)) ⊆ {a,b,x} := by
          intro v hv
          simp only [Finset.mem_insert, Finset.mem_singleton] at hv ⊢
          clear * - h hv
          aesop
        have hc := Finset.card_le_card hs
        have hb := Finset.card_le_three (a := a) (b := b) (c := x)
        have h4 := hk4.card_eq
        omega
      have hbx : b ≠ x := by
        intro h
        have hs : ({a,b,c,x} : Finset (Fin n)) ⊆ {a,b,c} := by
          intro v hv
          simp only [Finset.mem_insert, Finset.mem_singleton] at hv ⊢
          clear * - h hv
          aesop
        have hc := Finset.card_le_card hs
        have hb := Finset.card_le_three (a := a) (b := b) (c := c)
        have h4 := hk4.card_eq
        omega
      have hcx : c ≠ x := by
        intro h
        have hs : ({a,b,c,x} : Finset (Fin n)) ⊆ {a,b,c} := by
          intro v hv
          simp only [Finset.mem_insert, Finset.mem_singleton] at hv ⊢
          clear * - h hv
          aesop
        have hc := Finset.card_le_card hs
        have hb := Finset.card_le_three (a := a) (b := b) (c := c)
        have h4 := hk4.card_eq
        omega
  2. The set {a, b, x} is a triangle (3-clique) in G.

    As a subset of the 4-clique {a, b, c, x}, {a, b, x} induces a clique. Since a, b, and x are pairwise distinct, {a, b, x} has cardinality 3.

    lines 71–76

    uses SimpleGraph.IsClique.subset, Finset.mem_coe, Finset.mem_insert, Finset.mem_singleton

      have habx_face : G.IsNClique 3 ({a,b,x} : Finset (Fin n)) := by
        refine ⟨SimpleGraph.IsClique.subset ?_ hk4.isClique, ?_⟩
        · intro v hv
          simp only [Finset.mem_coe, Finset.mem_insert, Finset.mem_singleton] at hv ⊢
          aesop
        · simp [hab, hax, hbx]
  3. The triangle {a, b, x} shares at most one vertex with any other triangle u in P \ {{a, b, c}}.

    Any other triangle u in P is disjoint from {a, b, c} by the isolation hypothesis, so neither a nor b belongs to u. Thus {a, b, x} ∩ u ⊆ {x}, which implies the intersection has cardinality at most 1.

    lines 77–90

    uses Finset.mem_inter, Finset.mem_singleton, Finset.mem_insert, Finset.disjoint_left.mp, Finset.card_le_card

      have card_inter : ∀ u : Finset (Fin n), u ∈ P → u ≠ ({a,b,c} : Finset (Fin n)) → (({a,b,x} : Finset (Fin n)) ∩ u).card ≤ 1 := by
        intro u huP hune
        have hd : Disjoint u ({a,b,c} : Finset (Fin n)) := hisolated u huP hune
        have hsub : (({a,b,x} : Finset (Fin n)) ∩ u) ⊆ ({x} : Finset (Fin n)) := by
          intro y hy
          rw [Finset.mem_inter] at hy
          rw [Finset.mem_singleton]
          simp only [Finset.mem_insert, Finset.mem_singleton] at hy
          rcases hy.1 with rfl | rfl | rfl
          · exact absurd hy.2 (Finset.disjoint_left.mp hd.symm (by simp))
          · exact absurd hy.2 (Finset.disjoint_left.mp hd.symm (by simp))
          · rfl
        calc (({a,b,x} : Finset (Fin n)) ∩ u).card ≤ ({x} : Finset (Fin n)).card := Finset.card_le_card hsub
          _ = 1 := by simp
  4. The collection P' = (P \ {{a, b, c}}) ∪ {{a, b, x}} is a maximum triangle packing of G.

    The triangle {a, b, x} cannot already belong to P \ {{a, b, c}} because all such triangles are disjoint from {a, b, c} yet share vertex a. Replacing {a, b, c} with {a, b, x} therefore preserves cardinality (|P'| = |P|). Furthermore, all elements of P' are triangles and any two distinct triangles share at most one vertex.

    lines 91–125

    uses Finset.mem_of_mem_erase, Finset.ne_of_mem_erase, Finset.disjoint_left.mp, Finset.mem_insert, Finset.mem_erase, Finset.inter_comm, Finset.card_insert_of_notMem, Finset.card_erase_add_one, Finset.mem_insert_self

      let P' : Finset (Finset (Fin n)) := insert ({a,b,x} : Finset (Fin n)) (P.erase ({a,b,c} : Finset (Fin n)))
      have hP'eq : P' = insert ({a,b,x} : Finset (Fin n)) (P.erase ({a,b,c} : Finset (Fin n))) := rfl
      have hnotmem : ({a,b,x} : Finset (Fin n)) ∉ P.erase ({a,b,c} : Finset (Fin n)) := by
        intro h
        have huP : ({a,b,x} : Finset (Fin n)) ∈ P := Finset.mem_of_mem_erase h
        have hne : ({a,b,x} : Finset (Fin n)) ≠ ({a,b,c} : Finset (Fin n)) := Finset.ne_of_mem_erase h
        have hd := hisolated ({a,b,x} : Finset (Fin n)) huP hne
        exact (Finset.disjoint_left.mp hd) (by simp : a ∈ ({a,b,x} : Finset (Fin n))) (by simp : a ∈ ({a,b,c} : Finset (Fin n)))
      have htri' : ∀ t ∈ P', G.IsNClique 3 t := by
        intro t ht
        rw [hP'eq] at ht
        rw [Finset.mem_insert, Finset.mem_erase] at ht
        rcases ht with rfl | ⟨htne, htP⟩
        · exact habx_face
        · exact htri t htP
      have hdisj' : (P' : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1) := by
        intro t ht u hu htu
        have ht' : t ∈ P' := by simpa using ht
        have hu' : u ∈ P' := by simpa using hu
        rw [hP'eq] at ht' hu'
        rw [Finset.mem_insert, Finset.mem_erase] at ht' hu'
        rcases ht' with rfl | ⟨htne, htP⟩
        · rcases hu' with rfl | ⟨hune, huP⟩
          · exact absurd rfl htu
          · exact card_inter u huP hune
        · rcases hu' with rfl | ⟨hune, huP⟩
          · rw [Finset.inter_comm]; exact card_inter t htP htne
          · exact hdisj htP huP htu
      have hP'card : P'.card = P.card := by
        rw [hP'eq, Finset.card_insert_of_notMem hnotmem, Finset.card_erase_add_one hp]
      have hmax' : P'.card = simple_graph_triangle_packing_number G := by
        rw [hP'card, hmax]
      have hp' : ({a,b,x} : Finset (Fin n)) ∈ P' := by
        rw [hP'eq]; exact Finset.mem_insert_self _ _
      have hx' : c ∉ P'.biUnion id := by
  5. In P', vertex c is external, {a, b} is private to {a, b, x}, and {a, b, x, c} is a 4-clique.

    Because c is distinct from a, b, x and was vertex-disjoint from all other triangles of P, c does not belong to any triangle in P'. Similarly, neither a nor b belongs to any triangle in P' other than {a, b, x}. Finally, {a, b, x, c} equals the 4-clique {a, b, c, x}.

    lines 126–154

    uses Finset.mem_biUnion, Finset.mem_insert, Finset.mem_erase, Finset.mem_singleton, Finset.disjoint_left.mp

        intro hc
        rw [hP'eq, Finset.mem_biUnion] at hc
        rcases hc with ⟨t, ht, hct⟩
        simp only [id] at hct
        rw [Finset.mem_insert, Finset.mem_erase] at ht
        rcases ht with rfl | ⟨htne, htP⟩
        · simp only [Finset.mem_insert, Finset.mem_singleton] at hct
          rcases hct with hca | hcb | hcx'
          · exact hac hca.symm
          · exact hbc hcb.symm
          · exact hcx hcx'
        · have hd := hisolated t htP htne
          exact (Finset.disjoint_left.mp hd) hct (by simp)
      have hprivate' : ∀ t ∈ P', t ≠ ({a,b,x} : Finset (Fin n)) → a ∉ t ∧ b ∉ t := by
        intro t ht htne
        rw [hP'eq] at ht
        rw [Finset.mem_insert, Finset.mem_erase] at ht
        rcases ht with rfl | ⟨htne', htP⟩
        · exact absurd rfl htne
        · have hd := hisolated t htP htne'
          exact ⟨(Finset.disjoint_left.mp hd.symm) (by simp : a ∈ ({a,b,c} : Finset (Fin n))),
                 (Finset.disjoint_left.mp hd.symm) (by simp : b ∈ ({a,b,c} : Finset (Fin n)))⟩
      have hk4' : G.IsNClique 4 ({a,b,x,c} : Finset (Fin n)) := by
        have heq : ({a,b,x,c} : Finset (Fin n)) = ({a,b,c,x} : Finset (Fin n)) := by
          ext v
          simp only [Finset.mem_insert, Finset.mem_singleton]
          tauto
        rw [heq]
        exact hk4
  6. Deleting the edges ab and cx strictly decreases the triangle packing number of G.

    Applying the external 4-clique lemma (simple_graph_external_k4_private_pair_decreases_packing) to the packing P', triangle {a, b, x}, and external vertex c shows that deleting {s(a, b), s(x, c)} strictly decreases the packing number. Since the unordered edge s(x, c) equals s(c, x), this is precisely the deletion of {s(a, b), s(c, x)}.

    lines 155–159

    uses simple_graph_external_k4_private_pair_decreases_packing, Sym2.eq_swap

      have key := simple_graph_external_k4_private_pair_decreases_packing n G P' a b x c htri' hdisj' hmax' hp' hx' hprivate' hk4'
      have hset : ({s(a,b), s(x,c)} : Set (Sym2 (Fin n))) = ({s(a,b), s(c,x)} : Set (Sym2 (Fin n))) := by
        rw [show s(x,c) = s(c,x) from Sym2.eq_swap]
      rw [hset] at key
      exact key
Finset.mem_insert
An element belongs to the insertion of b into a finite set s if and only if it equals b or belongs to s.
Finset.mem_singleton
An element belongs to the singleton set {a} if and only if it equals a.
Finset.card_le_card
If a finite set s is a subset of t, then the cardinality of s is at most that of t.
Finset.card_le_three
Any set of the form {a, b, c} has cardinality at most 3.
SimpleGraph.IsClique.subset
Any subset of a clique in a simple graph is also a clique.
Finset.mem_coe
Membership of an element in the coercion of a finite set to a set is equivalent to membership in the finite set.
Finset.mem_inter
An element belongs to the intersection of two finite sets if and only if it belongs to both.
Finset.disjoint_left.mp
If two finite sets are disjoint, any element in the first set cannot belong to the second set.
Finset.mem_of_mem_erase
Any element of the set obtained by removing a from s was already an element of s.
Finset.ne_of_mem_erase
Any element of s with a removed is not equal to a.
Finset.mem_erase
An element belongs to s with b removed if and only if it belongs to s and differs from b.
Finset.inter_comm
Intersection of finite sets is commutative.
Finset.card_insert_of_notMem
Inserting an element into a finite set not containing it increases its cardinality by 1.
Finset.card_erase_add_one
Removing an element from a finite set containing it decreases its cardinality by 1.
Finset.mem_insert_self
An element belongs to the set formed by inserting it into any set.
Finset.mem_biUnion
An element belongs to a union of a family of finite sets if and only if it belongs to some member of the family.
simple_graph_external_k4_private_pair_decreases_packing
If a maximum triangle packing contains a triangle {a, b, c} whose edge ab is private and x is an external vertex forming a 4-clique with {a, b, c}, then deleting edges ab and cx strictly decreases the triangle packing number.
Sym2.eq_swap
The unordered pair s(a, b) equals s(b, a).

Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.

Lean source view module on GitHub

open scoped Sym2theorem simple_graph_vertex_isolated_packed_k4_decreases_packing (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (a b c x : Fin n) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hmax : P.card = simple_graph_triangle_packing_number G) (hp : ({a,b,c} : Finset (Fin n)) ∈ P) (hisolated : ∀ t ∈ P, t ≠ ({a,b,c} : Finset (Fin n)) → Disjoint t ({a,b,c} : Finset (Fin n))) (hk4 : G.IsNClique 4 ({a,b,c,x} : Finset (Fin n))) : simple_graph_triangle_packing_number (G.deleteEdges {s(a,b), s(c,x)}) < simple_graph_triangle_packing_number G := by  classical  have hab : a ≠ b := by    intro h    have hs : ({a,b,c,x} : Finset (Fin n)) ⊆ {a,c,x} := by      intro v hv      simp only [Finset.mem_insert, Finset.mem_singleton] at hv ⊢      clear * - h hv      aesop    have hc := Finset.card_le_card hs    have hb := Finset.card_le_three (a := a) (b := c) (c := x)    have h4 := hk4.card_eq    omega  have hac : a ≠ c := by    intro h    have hs : ({a,b,c,x} : Finset (Fin n)) ⊆ {a,b,x} := by      intro v hv      simp only [Finset.mem_insert, Finset.mem_singleton] at hv ⊢      clear * - h hv      aesop    have hc := Finset.card_le_card hs    have hb := Finset.card_le_three (a := a) (b := b) (c := x)    have h4 := hk4.card_eq    omega  have hax : a ≠ x := by    intro h    have hs : ({a,b,c,x} : Finset (Fin n)) ⊆ {a,b,c} := by      intro v hv      simp only [Finset.mem_insert, Finset.mem_singleton] at hv ⊢      clear * - h hv      aesop    have hc := Finset.card_le_card hs    have hb := Finset.card_le_three (a := a) (b := b) (c := c)    have h4 := hk4.card_eq    omega  have hbc : b ≠ c := by    intro h    have hs : ({a,b,c,x} : Finset (Fin n)) ⊆ {a,b,x} := by      intro v hv      simp only [Finset.mem_insert, Finset.mem_singleton] at hv ⊢      clear * - h hv      aesop    have hc := Finset.card_le_card hs    have hb := Finset.card_le_three (a := a) (b := b) (c := x)    have h4 := hk4.card_eq    omega  have hbx : b ≠ x := by    intro h    have hs : ({a,b,c,x} : Finset (Fin n)) ⊆ {a,b,c} := by      intro v hv      simp only [Finset.mem_insert, Finset.mem_singleton] at hv ⊢      clear * - h hv      aesop    have hc := Finset.card_le_card hs    have hb := Finset.card_le_three (a := a) (b := b) (c := c)    have h4 := hk4.card_eq    omega  have hcx : c ≠ x := by    intro h    have hs : ({a,b,c,x} : Finset (Fin n)) ⊆ {a,b,c} := by      intro v hv      simp only [Finset.mem_insert, Finset.mem_singleton] at hv ⊢      clear * - h hv      aesop    have hc := Finset.card_le_card hs    have hb := Finset.card_le_three (a := a) (b := b) (c := c)    have h4 := hk4.card_eq    omega  have habx_face : G.IsNClique 3 ({a,b,x} : Finset (Fin n)) := by    refine ⟨SimpleGraph.IsClique.subset ?_ hk4.isClique, ?_⟩    · intro v hv      simp only [Finset.mem_coe, Finset.mem_insert, Finset.mem_singleton] at hv ⊢      aesop    · simp [hab, hax, hbx]  have card_inter : ∀ u : Finset (Fin n), u ∈ P → u ≠ ({a,b,c} : Finset (Fin n)) → (({a,b,x} : Finset (Fin n)) ∩ u).card ≤ 1 := by    intro u huP hune    have hd : Disjoint u ({a,b,c} : Finset (Fin n)) := hisolated u huP hune    have hsub : (({a,b,x} : Finset (Fin n)) ∩ u) ⊆ ({x} : Finset (Fin n)) := by      intro y hy      rw [Finset.mem_inter] at hy      rw [Finset.mem_singleton]      simp only [Finset.mem_insert, Finset.mem_singleton] at hy      rcases hy.1 with rfl | rfl | rfl      · exact absurd hy.2 (Finset.disjoint_left.mp hd.symm (by simp))      · exact absurd hy.2 (Finset.disjoint_left.mp hd.symm (by simp))      · rfl    calc (({a,b,x} : Finset (Fin n)) ∩ u).card ≤ ({x} : Finset (Fin n)).card := Finset.card_le_card hsub      _ = 1 := by simp  let P' : Finset (Finset (Fin n)) := insert ({a,b,x} : Finset (Fin n)) (P.erase ({a,b,c} : Finset (Fin n)))  have hP'eq : P' = insert ({a,b,x} : Finset (Fin n)) (P.erase ({a,b,c} : Finset (Fin n))) := rfl  have hnotmem : ({a,b,x} : Finset (Fin n)) ∉ P.erase ({a,b,c} : Finset (Fin n)) := by    intro h    have huP : ({a,b,x} : Finset (Fin n)) ∈ P := Finset.mem_of_mem_erase h    have hne : ({a,b,x} : Finset (Fin n)) ≠ ({a,b,c} : Finset (Fin n)) := Finset.ne_of_mem_erase h    have hd := hisolated ({a,b,x} : Finset (Fin n)) huP hne    exact (Finset.disjoint_left.mp hd) (by simp : a ∈ ({a,b,x} : Finset (Fin n))) (by simp : a ∈ ({a,b,c} : Finset (Fin n)))  have htri' : ∀ t ∈ P', G.IsNClique 3 t := by    intro t ht    rw [hP'eq] at ht    rw [Finset.mem_insert, Finset.mem_erase] at ht    rcases ht with rfl | ⟨htne, htP⟩    · exact habx_face    · exact htri t htP  have hdisj' : (P' : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1) := by    intro t ht u hu htu    have ht' : t ∈ P' := by simpa using ht    have hu' : u ∈ P' := by simpa using hu    rw [hP'eq] at ht' hu'    rw [Finset.mem_insert, Finset.mem_erase] at ht' hu'    rcases ht' with rfl | ⟨htne, htP⟩    · rcases hu' with rfl | ⟨hune, huP⟩      · exact absurd rfl htu      · exact card_inter u huP hune    · rcases hu' with rfl | ⟨hune, huP⟩      · rw [Finset.inter_comm]; exact card_inter t htP htne      · exact hdisj htP huP htu  have hP'card : P'.card = P.card := by    rw [hP'eq, Finset.card_insert_of_notMem hnotmem, Finset.card_erase_add_one hp]  have hmax' : P'.card = simple_graph_triangle_packing_number G := by    rw [hP'card, hmax]  have hp' : ({a,b,x} : Finset (Fin n)) ∈ P' := by    rw [hP'eq]; exact Finset.mem_insert_self _ _  have hx' : c ∉ P'.biUnion id := by    intro hc    rw [hP'eq, Finset.mem_biUnion] at hc    rcases hc with ⟨t, ht, hct⟩    simp only [id] at hct    rw [Finset.mem_insert, Finset.mem_erase] at ht    rcases ht with rfl | ⟨htne, htP⟩    · simp only [Finset.mem_insert, Finset.mem_singleton] at hct      rcases hct with hca | hcb | hcx'      · exact hac hca.symm      · exact hbc hcb.symm      · exact hcx hcx'    · have hd := hisolated t htP htne      exact (Finset.disjoint_left.mp hd) hct (by simp)  have hprivate' : ∀ t ∈ P', t ≠ ({a,b,x} : Finset (Fin n)) → a ∉ t ∧ b ∉ t := by    intro t ht htne    rw [hP'eq] at ht    rw [Finset.mem_insert, Finset.mem_erase] at ht    rcases ht with rfl | ⟨htne', htP⟩    · exact absurd rfl htne    · have hd := hisolated t htP htne'      exact ⟨(Finset.disjoint_left.mp hd.symm) (by simp : a ∈ ({a,b,c} : Finset (Fin n))),             (Finset.disjoint_left.mp hd.symm) (by simp : b ∈ ({a,b,c} : Finset (Fin n)))⟩  have hk4' : G.IsNClique 4 ({a,b,x,c} : Finset (Fin n)) := by    have heq : ({a,b,x,c} : Finset (Fin n)) = ({a,b,c,x} : Finset (Fin n)) := by      ext v      simp only [Finset.mem_insert, Finset.mem_singleton]      tauto    rw [heq]    exact hk4  have key := simple_graph_external_k4_private_pair_decreases_packing n G P' a b x c htri' hdisj' hmax' hp' hx' hprivate' hk4'  have hset : ({s(a,b), s(x,c)} : Set (Sym2 (Fin n))) = ({s(a,b), s(c,x)} : Set (Sym2 (Fin n))) := by    rw [show s(x,c) = s(c,x) from Sym2.eq_swap]  rw [hset] at key  exact key
See it in the graphDiscuss this resultChallenge it