AFTD Auto-Formalizing Theoretical Domains

complete_three_rotation_face_count

theoremverified

Every rotation system of the triangle K_3 has exactly 2 faces (inside and outside), so V - E + F = 3 - 3 + 2 = 2 (sanity check of simple_graph_rotation_face_count).

Statement

theorem complete_three_rotation_face_count (σ : Equiv.Perm (⊤ : SimpleGraph (Fin 3)).Dart)
    (hσ : simple_graph_is_rotation_system (⊤ : SimpleGraph (Fin 3)) σ) :
    simple_graph_rotation_face_count (⊤ : SimpleGraph (Fin 3)) σ = 2
Source
Sanity lemma for simple_graph_rotation_face_count (OP-541)
Verified
27 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 4

The proof, explained

In the complete graph K_3 on three vertices, each vertex has degree 2, which forces any rotation system σ to transpose the two outgoing darts at each vertex. The face permutation F = σ ∘ symm is explicitly computed on all six darts, decomposing into two disjoint 3-cycles: the inner face (d01 ↦ d12 ↦ d20) and the outer face (d10 ↦ d02 ↦ d21). An inductive argument shows that the orbit of d01 never reaches d10, proving the two cycles are distinct. Since every dart belongs to one of these two cycles, a general quotient cardinality lemma concludes that the number of faces (orbits under F) is exactly 2.

  1. Construct the six directed edges (darts) of K_3. automation

    The six pairs of distinct vertices in Fin 3—(0,1), (0,2), (1,0), (1,2), (2,0), (2,1)—are each verified to be adjacent by decide, defining the six darts complete_three_d01 through complete_three_d21.

    lines 3–8

    def complete_three_d01 : (⊤ : SimpleGraph (Fin 3)).Dart := ⟨(0, 1), by decide⟩
    def complete_three_d02 : (⊤ : SimpleGraph (Fin 3)).Dart := ⟨(0, 2), by decide⟩
    def complete_three_d10 : (⊤ : SimpleGraph (Fin 3)).Dart := ⟨(1, 0), by decide⟩
    def complete_three_d12 : (⊤ : SimpleGraph (Fin 3)).Dart := ⟨(1, 2), by decide⟩
    def complete_three_d20 : (⊤ : SimpleGraph (Fin 3)).Dart := ⟨(2, 0), by decide⟩
    def complete_three_d21 : (⊤ : SimpleGraph (Fin 3)).Dart := ⟨(2, 1), by decide⟩
  2. Any dart starting at vertex 0 is either d01 or d02.

    Because a dart cannot connect a vertex to itself, the destination of a dart starting at 0 must be 1 or 2 by case analysis on Fin 3. Thus the dart must equal complete_three_d01 or complete_three_d02 by extensionality on ordered pairs.

    lines 10–19

    uses SimpleGraph.Dart.ext, Prod.ext

    lemma complete_three_darts_zero (z : (⊤ : SimpleGraph (Fin 3)).Dart) (h : z.fst = 0) :
        z = complete_three_d01 ∨ z = complete_three_d02 := by
      have hadj : z.fst ≠ z.snd := z.adj
      rw [h] at hadj
      have : z.snd = 1 ∨ z.snd = 2 := by
        revert hadj; generalize z.snd = s; fin_cases s <;> decide
      rcases this with h1 | h2
      · left; apply SimpleGraph.Dart.ext; exact Prod.ext h h1
      · right; apply SimpleGraph.Dart.ext; exact Prod.ext h h2
    
  3. Any dart starting at vertex 1 is either d10 or d12.

    Because the destination cannot equal 1, case analysis on Fin 3 shows the destination is 0 or 2, hence the dart is complete_three_d10 or complete_three_d12.

    lines 20–29

    uses SimpleGraph.Dart.ext, Prod.ext

    lemma complete_three_darts_one (z : (⊤ : SimpleGraph (Fin 3)).Dart) (h : z.fst = 1) :
        z = complete_three_d10 ∨ z = complete_three_d12 := by
      have hadj : z.fst ≠ z.snd := z.adj
      rw [h] at hadj
      have : z.snd = 0 ∨ z.snd = 2 := by
        revert hadj; generalize z.snd = s; fin_cases s <;> decide
      rcases this with h1 | h2
      · left; apply SimpleGraph.Dart.ext; exact Prod.ext h h1
      · right; apply SimpleGraph.Dart.ext; exact Prod.ext h h2
    
  4. Any dart starting at vertex 2 is either d20 or d21.

    Because the destination cannot equal 2, case analysis on Fin 3 shows the destination is 0 or 1, hence the dart is complete_three_d20 or complete_three_d21.

    lines 30–39

    uses SimpleGraph.Dart.ext, Prod.ext

    lemma complete_three_darts_two (z : (⊤ : SimpleGraph (Fin 3)).Dart) (h : z.fst = 2) :
        z = complete_three_d20 ∨ z = complete_three_d21 := by
      have hadj : z.fst ≠ z.snd := z.adj
      rw [h] at hadj
      have : z.snd = 0 ∨ z.snd = 1 := by
        revert hadj; generalize z.snd = s; fin_cases s <;> decide
      rcases this with h1 | h2
      · left; apply SimpleGraph.Dart.ext; exact Prod.ext h h1
      · right; apply SimpleGraph.Dart.ext; exact Prod.ext h h2
    
  5. Every dart in K_3 is one of the six explicit darts.

    The starting vertex of any dart must be 0, 1, or 2. Applying the classification of darts from each vertex (complete_three_darts_zero, complete_three_darts_one, complete_three_darts_two) exhausts all six possible darts.

    lines 40–56

    uses complete_three_darts_zero, complete_three_darts_one, complete_three_darts_two

    lemma complete_three_dart_all (z : (⊤ : SimpleGraph (Fin 3)).Dart) :
        z = complete_three_d01 ∨ z = complete_three_d02 ∨
        z = complete_three_d10 ∨ z = complete_three_d12 ∨
        z = complete_three_d20 ∨ z = complete_three_d21 := by
      have : z.fst = 0 ∨ z.fst = 1 ∨ z.fst = 2 := by
        generalize z.fst = f; fin_cases f <;> decide
      rcases this with h | h | h
      · rcases complete_three_darts_zero z h with h1 | h2
        · left; exact h1
        · right; left; exact h2
      · rcases complete_three_darts_one z h with h1 | h2
        · right; right; left; exact h1
        · right; right; right; left; exact h2
      · rcases complete_three_darts_two z h with h1 | h2
        · right; right; right; right; left; exact h1
        · right; right; right; right; right; exact h2
    
  6. A rotation system swaps the only two outgoing darts at a vertex.

    If σ fixed an outgoing dart x, the rotation system axiom that all outgoing darts share a cycle would imply x = y, contradicting y ≠ x. Thus σ(x) cannot be x, and since x and y are the only outgoing darts, σ(x) must be y.

    lines 57–71

    uses Function.IsFixedPt.eq, False.elim

    lemma complete_three_sigma_step (σ : Equiv.Perm (⊤ : SimpleGraph (Fin 3)).Dart)
        (hσ : simple_graph_is_rotation_system (⊤ : SimpleGraph (Fin 3)) σ)
        (x y : (⊤ : SimpleGraph (Fin 3)).Dart) (h_fst : y.fst = x.fst) (hne : y ≠ x)
        (h_all : ∀ z : (⊤ : SimpleGraph (Fin 3)).Dart, z.fst = x.fst → z = x ∨ z = y) :
        σ x = y := by
      have h_ne : σ x ≠ x := by
        intro h_fix
        have h_sc : σ.SameCycle x y := hσ.2 x y h_fst.symm
        have h_eq : x = y := h_sc.eq_of_left (Function.IsFixedPt.eq h_fix)
        exact hne h_eq.symm
      have h_tail : (σ x).fst = x.fst := hσ.1 x
      rcases h_all (σ x) h_tail with h1 | h2
      · exact False.elim (h_ne h1)
      · exact h2
    
  7. Darts with distinct endpoint pairs are distinct.

    If two darts were equal, their underlying vertex pairs would coincide, contradicting the hypothesis that their pairs differ.

    lines 72–74

    lemma complete_three_ne_of_prod {x y : (⊤ : SimpleGraph (Fin 3)).Dart} (h : x.toProd ≠ y.toProd) : x ≠ y := by
      intro h_eq; apply h; rw [h_eq]
    
  8. An equivalence relation whose elements are all equivalent to one of two non-equivalent representatives has quotient cardinality 2.

    The equivalence classes of x and y are distinct and their union equals the entire quotient set. Hence the quotient contains exactly two elements.

    lines 75–88

    uses Nat.card_eq_fintype_card, Nat.card_eq_two_iff, Quotient.exact, iff_true, Quotient.inductionOn, Quotient.sound, Set.mem_univ, Set.mem_insert_iff, Set.mem_singleton_iff

    lemma complete_three_card_quotient_eq_two {α : Type*} (s : Setoid α) [Fintype (Quotient s)]
        (x y : α) (hne : ¬ x ≈ y) (hcov : ∀ z : α, z ≈ x ∨ z ≈ y) :
        Fintype.card (Quotient s) = 2 := by
      rw [← Nat.card_eq_fintype_card, Nat.card_eq_two_iff]
      use ⟦x⟧, ⟦y⟧
      refine ⟨?_, ?_⟩
      · intro h; exact hne (Quotient.exact h)
      · ext q
        simp only [Set.mem_univ, iff_true, Set.mem_insert_iff, Set.mem_singleton_iff]
        induction' q using Quotient.inductionOn with z
        rcases hcov z with h1 | h2
        · left; exact Quotient.sound h1
        · right; exact Quotient.sound h2
    
  9. Introduce shorthand bindings for the six darts of K_3.

    We locally alias the six darts as d01, d02, d10, d12, d20, and d21 for the remainder of the proof.

    lines 92–97

      let d01 := complete_three_d01
      let d02 := complete_three_d02
      let d10 := complete_three_d10
      let d12 := complete_three_d12
      let d20 := complete_three_d20
      let d21 := complete_three_d21
  10. The darts are pairwise distinct as needed. automation

    Inequalities between darts sharing an origin (d02 ≠ d01, d01 ≠ d02, d12 ≠ d10, etc.) are verified by checking that their underlying endpoint pairs differ, using decide.

    lines 98–103

    uses complete_three_ne_of_prod

      have h01_ne : d02 ≠ d01 := complete_three_ne_of_prod (by decide)
      have h02_ne : d01 ≠ d02 := complete_three_ne_of_prod (by decide)
      have h10_ne : d12 ≠ d10 := complete_three_ne_of_prod (by decide)
      have h12_ne : d10 ≠ d12 := complete_three_ne_of_prod (by decide)
      have h20_ne : d21 ≠ d20 := complete_three_ne_of_prod (by decide)
      have h21_ne : d20 ≠ d21 := complete_three_ne_of_prod (by decide)
  11. The rotation system σ swaps the outgoing darts at every vertex.

    Applying complete_three_sigma_step to the two outgoing darts at each of the three vertices yields σ(d01) = d02, σ(d02) = d01, σ(d10) = d12, σ(d12) = d10, σ(d20) = d21, and σ(d21) = d20.

    lines 104–109

    uses complete_three_sigma_step, complete_three_darts_zero, complete_three_darts_one, complete_three_darts_two

      have s01 : σ d01 = d02 := complete_three_sigma_step σ hσ d01 d02 rfl h01_ne (fun z hz => complete_three_darts_zero z hz)
      have s02 : σ d02 = d01 := complete_three_sigma_step σ hσ d02 d01 rfl h02_ne (fun z hz => (complete_three_darts_zero z hz).symm)
      have s10 : σ d10 = d12 := complete_three_sigma_step σ hσ d10 d12 rfl h10_ne (fun z hz => complete_three_darts_one z hz)
      have s12 : σ d12 = d10 := complete_three_sigma_step σ hσ d12 d10 rfl h12_ne (fun z hz => (complete_three_darts_one z hz).symm)
      have s20 : σ d20 = d21 := complete_three_sigma_step σ hσ d20 d21 rfl h20_ne (fun z hz => complete_three_darts_two z hz)
      have s21 : σ d21 = d20 := complete_three_sigma_step σ hσ d21 d20 rfl h21_ne (fun z hz => (complete_three_darts_two z hz).symm)
  12. Reversing each dart swaps its source and destination.

    By pair extensionality and definition of dart reversal, d01.symm = d10, d02.symm = d20, d10.symm = d01, d12.symm = d21, d20.symm = d02, and d21.symm = d12.

    lines 110–115

    uses SimpleGraph.Dart.ext

      have y01 : d01.symm = d10 := by apply SimpleGraph.Dart.ext; rfl
      have y02 : d02.symm = d20 := by apply SimpleGraph.Dart.ext; rfl
      have y10 : d10.symm = d01 := by apply SimpleGraph.Dart.ext; rfl
      have y12 : d12.symm = d21 := by apply SimpleGraph.Dart.ext; rfl
      have y20 : d20.symm = d02 := by apply SimpleGraph.Dart.ext; rfl
      have y21 : d21.symm = d12 := by apply SimpleGraph.Dart.ext; rfl
  13. The face permutation F = σ ∘ symm acts on each dart as two 3-cycles.

    Evaluating F(d) = σ(d.symm) on all six darts shows that F cycles d01 ↦ d12 ↦ d20 ↦ d01, and cycles d10 ↦ d02 ↦ d21 ↦ d10.

    lines 116–123

      set F := simple_graph_rotation_face_perm (⊤ : SimpleGraph (Fin 3)) σ
      have f_apply : ∀ d, F d = σ d.symm := fun _ => rfl
      have f01 : F d01 = d12 := by rw [f_apply, y01, s10]
      have f12 : F d12 = d20 := by rw [f_apply, y12, s21]
      have f20 : F d20 = d01 := by rw [f_apply, y20, s02]
      have f10 : F d10 = d02 := by rw [f_apply, y10, s01]
      have f02 : F d02 = d21 := by rw [f_apply, y02, s20]
      have f21 : F d21 = d10 := by rw [f_apply, y21, s12]
  14. The two-step application F^2 maps d01 to d20 and d10 to d21.

    Applying F twice gives F^2(d01) = F(d12) = d20, and F^2(d10) = F(d02) = d21.

    lines 124–129

      have f2_01 : (F ^ 2) d01 = d20 := by
        change F (F d01) = d20
        rw [f01, f12]
      have f2_10 : (F ^ 2) d10 = d21 := by
        change F (F d10) = d21
        rw [f10, f02]
  15. All powers F^n(d01) lie in the 3-element set {d01, d12, d20}.

    By induction on n, the base case F^0(d01) = d01 holds trivially, and the inductive step follows from the 3-cycle transitions F(d01) = d12, F(d12) = d20, and F(d20) = d01.

    lines 130–142

    uses pow_succ', Equiv.Perm.mul_apply

      let P (x : (⊤ : SimpleGraph (Fin 3)).Dart) : Prop := x = d01 ∨ x = d12 ∨ x = d20
      have hP : ∀ n : ℕ, P ((F ^ n) d01) := by
        intro n
        induction n with
        | zero => left; rfl
        | succ n ih =>
          rcases ih with h | h | h
          · rw [pow_succ', Equiv.Perm.mul_apply, h, f01]
            right; left; rfl
          · rw [pow_succ', Equiv.Perm.mul_apply, h, f12]
            right; right; rfl
          · rw [pow_succ', Equiv.Perm.mul_apply, h, f20]
            left; rfl
  16. The darts d01 and d10 belong to different cycles of F. automation

    If d01 and d10 shared a cycle, d10 would equal F^n(d01) for some n, placing d10 in {d01, d12, d20}. But d10 is distinct from all three darts by decide, yielding a contradiction.

    lines 143–150

    uses complete_three_ne_of_prod

      have hne : ¬ (simple_graph_rotation_face_perm (⊤ : SimpleGraph (Fin 3)) σ).SameCycle d01 d10 := by
        intro hsc
        obtain ⟨n, hn⟩ := hsc.exists_nat_pow_eq
        have : P d10 := hn ▸ hP n
        rcases this with h | h | h
        · exact (complete_three_ne_of_prod (by decide)) h.symm
        · exact (complete_three_ne_of_prod (by decide)) h.symm
        · exact (complete_three_ne_of_prod (by decide)) h.symm
  17. Every dart in K_3 belongs to the cycle of either d01 or d10.

    Every dart in K_3 is one of the six darts. Since d01, d12, and d20 are in the orbit of d01, while d10, d02, and d21 are in the orbit of d10, every dart shares a cycle with d01 or d10.

    lines 151–163

    uses complete_three_dart_all, Equiv.Perm.SameCycle.symm

      have hcov : ∀ z : (⊤ : SimpleGraph (Fin 3)).Dart, F.SameCycle z d01 ∨ F.SameCycle z d10 := by
        intro z
        rcases complete_three_dart_all z with h | h | h | h | h | h
        · left; rw [h]
        · right; rw [h]
          exact Equiv.Perm.SameCycle.symm ⟨1, f10⟩
        · right; rw [h]
        · left; rw [h]
          exact Equiv.Perm.SameCycle.symm ⟨1, f01⟩
        · left; rw [h]
          exact Equiv.Perm.SameCycle.symm ⟨2, f2_01⟩
        · right; rw [h]
          exact Equiv.Perm.SameCycle.symm ⟨2, f2_10⟩
  18. The rotation face count of K_3 is 2.

    Faces are the equivalence classes of darts under the cyclic orbit relation of F. Since d01 and d10 are not in the same cycle and every dart is in one of their cycles, the quotient has cardinality 2.

    line 164

    uses complete_three_card_quotient_eq_two, Equiv.Perm.SameCycle.setoid

      exact complete_three_card_quotient_eq_two (Equiv.Perm.SameCycle.setoid F) d01 d10 hne hcov
SimpleGraph.Dart.ext
Two darts of a graph are equal if their underlying pairs of endpoints are equal.
Prod.ext
Two ordered pairs are equal if their respective components are equal.
complete_three_darts_zero
Any dart of K_3 originating at vertex 0 is either d01 or d02.
complete_three_darts_one
Any dart of K_3 originating at vertex 1 is either d10 or d12.
complete_three_darts_two
Any dart of K_3 originating at vertex 2 is either d20 or d21.
Function.IsFixedPt.eq
If x is a fixed point of f, then f(x) = x.
False.elim
From a contradiction (False), anything follows.
Nat.card_eq_fintype_card
The general cardinality Nat.card of a finite type agrees with its Fintype cardinality.
Nat.card_eq_two_iff
A type has cardinality 2 if and only if there exist two distinct elements that exhaust the type.
Quotient.exact
If two equivalence classes in a quotient are equal, their representatives are equivalent.
iff_true
A proposition p is logically equivalent to (p ↔ True).
Quotient.inductionOn
To prove a property for all elements of a quotient, it suffices to prove it for equivalence classes of representatives in the base type.
Quotient.sound
If two elements are equivalent, their equivalence classes in the quotient are equal.
Set.mem_univ
Every element of a type belongs to the universal set.
Set.mem_insert_iff
An element belongs to insert a s if and only if it equals a or belongs to s.
Set.mem_singleton_iff
An element belongs to the singleton set {b} if and only if it equals b.
complete_three_ne_of_prod
If two darts have different pairs of endpoints, they are distinct darts.
complete_three_sigma_step
In a rotation system, if a vertex has only two outgoing darts x and y with y ≠ x, the rotation permutation maps x to y.
pow_succ'
In any monoid, a^(n + 1) = a * a^n.
Equiv.Perm.mul_apply
The composition of two permutations applied to an element evaluates as f(g(x)).
complete_three_dart_all
Every dart in K_3 is one of the six darts d01, d02, d10, d12, d20, or d21.
Equiv.Perm.SameCycle.symm
Being in the same permutation cycle is a symmetric relation.
complete_three_card_quotient_eq_two
If an equivalence relation has two non-equivalent elements x and y, and every element is equivalent to x or y, then the quotient has cardinality 2.
Equiv.Perm.SameCycle.setoid
The setoid (equivalence relation) induced by the cyclic orbits of a permutation.

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 SimpleGraphdef complete_three_d01 : (⊤ : SimpleGraph (Fin 3)).Dart := ⟨(0, 1), by decide⟩def complete_three_d02 : (⊤ : SimpleGraph (Fin 3)).Dart := ⟨(0, 2), by decide⟩def complete_three_d10 : (⊤ : SimpleGraph (Fin 3)).Dart := ⟨(1, 0), by decide⟩def complete_three_d12 : (⊤ : SimpleGraph (Fin 3)).Dart := ⟨(1, 2), by decide⟩def complete_three_d20 : (⊤ : SimpleGraph (Fin 3)).Dart := ⟨(2, 0), by decide⟩def complete_three_d21 : (⊤ : SimpleGraph (Fin 3)).Dart := ⟨(2, 1), by decide⟩lemma complete_three_darts_zero (z : (⊤ : SimpleGraph (Fin 3)).Dart) (h : z.fst = 0) :    z = complete_three_d01 ∨ z = complete_three_d02 := by  have hadj : z.fst ≠ z.snd := z.adj  rw [h] at hadj  have : z.snd = 1 ∨ z.snd = 2 := by    revert hadj; generalize z.snd = s; fin_cases s <;> decide  rcases this with h1 | h2  · left; apply SimpleGraph.Dart.ext; exact Prod.ext h h1  · right; apply SimpleGraph.Dart.ext; exact Prod.ext h h2lemma complete_three_darts_one (z : (⊤ : SimpleGraph (Fin 3)).Dart) (h : z.fst = 1) :    z = complete_three_d10 ∨ z = complete_three_d12 := by  have hadj : z.fst ≠ z.snd := z.adj  rw [h] at hadj  have : z.snd = 0 ∨ z.snd = 2 := by    revert hadj; generalize z.snd = s; fin_cases s <;> decide  rcases this with h1 | h2  · left; apply SimpleGraph.Dart.ext; exact Prod.ext h h1  · right; apply SimpleGraph.Dart.ext; exact Prod.ext h h2lemma complete_three_darts_two (z : (⊤ : SimpleGraph (Fin 3)).Dart) (h : z.fst = 2) :    z = complete_three_d20 ∨ z = complete_three_d21 := by  have hadj : z.fst ≠ z.snd := z.adj  rw [h] at hadj  have : z.snd = 0 ∨ z.snd = 1 := by    revert hadj; generalize z.snd = s; fin_cases s <;> decide  rcases this with h1 | h2  · left; apply SimpleGraph.Dart.ext; exact Prod.ext h h1  · right; apply SimpleGraph.Dart.ext; exact Prod.ext h h2lemma complete_three_dart_all (z : (⊤ : SimpleGraph (Fin 3)).Dart) :    z = complete_three_d01 ∨ z = complete_three_d02 ∨    z = complete_three_d10 ∨ z = complete_three_d12 ∨    z = complete_three_d20 ∨ z = complete_three_d21 := by  have : z.fst = 0 ∨ z.fst = 1 ∨ z.fst = 2 := by    generalize z.fst = f; fin_cases f <;> decide  rcases this with h | h | h  · rcases complete_three_darts_zero z h with h1 | h2    · left; exact h1    · right; left; exact h2  · rcases complete_three_darts_one z h with h1 | h2    · right; right; left; exact h1    · right; right; right; left; exact h2  · rcases complete_three_darts_two z h with h1 | h2    · right; right; right; right; left; exact h1    · right; right; right; right; right; exact h2lemma complete_three_sigma_step (σ : Equiv.Perm (⊤ : SimpleGraph (Fin 3)).Dart)    (hσ : simple_graph_is_rotation_system (⊤ : SimpleGraph (Fin 3)) σ)    (x y : (⊤ : SimpleGraph (Fin 3)).Dart) (h_fst : y.fst = x.fst) (hne : y ≠ x)    (h_all : ∀ z : (⊤ : SimpleGraph (Fin 3)).Dart, z.fst = x.fst → z = x ∨ z = y) :    σ x = y := by  have h_ne : σ x ≠ x := by    intro h_fix    have h_sc : σ.SameCycle x y := hσ.2 x y h_fst.symm    have h_eq : x = y := h_sc.eq_of_left (Function.IsFixedPt.eq h_fix)    exact hne h_eq.symm  have h_tail : (σ x).fst = x.fst := hσ.1 x  rcases h_all (σ x) h_tail with h1 | h2  · exact False.elim (h_ne h1)  · exact h2lemma complete_three_ne_of_prod {x y : (⊤ : SimpleGraph (Fin 3)).Dart} (h : x.toProd ≠ y.toProd) : x ≠ y := by  intro h_eq; apply h; rw [h_eq]lemma complete_three_card_quotient_eq_two {α : Type*} (s : Setoid α) [Fintype (Quotient s)]    (x y : α) (hne : ¬ x ≈ y) (hcov : ∀ z : α, z ≈ x ∨ z ≈ y) :    Fintype.card (Quotient s) = 2 := by  rw [← Nat.card_eq_fintype_card, Nat.card_eq_two_iff]  use ⟦x⟧, ⟦y⟧  refine ⟨?_, ?_⟩  · intro h; exact hne (Quotient.exact h)  · ext q    simp only [Set.mem_univ, iff_true, Set.mem_insert_iff, Set.mem_singleton_iff]    induction' q using Quotient.inductionOn with z    rcases hcov z with h1 | h2    · left; exact Quotient.sound h1    · right; exact Quotient.sound h2theorem complete_three_rotation_face_count (σ : Equiv.Perm (⊤ : SimpleGraph (Fin 3)).Dart)    (hσ : simple_graph_is_rotation_system (⊤ : SimpleGraph (Fin 3)) σ) :    simple_graph_rotation_face_count (⊤ : SimpleGraph (Fin 3)) σ = 2 := by  let d01 := complete_three_d01  let d02 := complete_three_d02  let d10 := complete_three_d10  let d12 := complete_three_d12  let d20 := complete_three_d20  let d21 := complete_three_d21  have h01_ne : d02 ≠ d01 := complete_three_ne_of_prod (by decide)  have h02_ne : d01 ≠ d02 := complete_three_ne_of_prod (by decide)  have h10_ne : d12 ≠ d10 := complete_three_ne_of_prod (by decide)  have h12_ne : d10 ≠ d12 := complete_three_ne_of_prod (by decide)  have h20_ne : d21 ≠ d20 := complete_three_ne_of_prod (by decide)  have h21_ne : d20 ≠ d21 := complete_three_ne_of_prod (by decide)  have s01 : σ d01 = d02 := complete_three_sigma_step σ hσ d01 d02 rfl h01_ne (fun z hz => complete_three_darts_zero z hz)  have s02 : σ d02 = d01 := complete_three_sigma_step σ hσ d02 d01 rfl h02_ne (fun z hz => (complete_three_darts_zero z hz).symm)  have s10 : σ d10 = d12 := complete_three_sigma_step σ hσ d10 d12 rfl h10_ne (fun z hz => complete_three_darts_one z hz)  have s12 : σ d12 = d10 := complete_three_sigma_step σ hσ d12 d10 rfl h12_ne (fun z hz => (complete_three_darts_one z hz).symm)  have s20 : σ d20 = d21 := complete_three_sigma_step σ hσ d20 d21 rfl h20_ne (fun z hz => complete_three_darts_two z hz)  have s21 : σ d21 = d20 := complete_three_sigma_step σ hσ d21 d20 rfl h21_ne (fun z hz => (complete_three_darts_two z hz).symm)  have y01 : d01.symm = d10 := by apply SimpleGraph.Dart.ext; rfl  have y02 : d02.symm = d20 := by apply SimpleGraph.Dart.ext; rfl  have y10 : d10.symm = d01 := by apply SimpleGraph.Dart.ext; rfl  have y12 : d12.symm = d21 := by apply SimpleGraph.Dart.ext; rfl  have y20 : d20.symm = d02 := by apply SimpleGraph.Dart.ext; rfl  have y21 : d21.symm = d12 := by apply SimpleGraph.Dart.ext; rfl  set F := simple_graph_rotation_face_perm (⊤ : SimpleGraph (Fin 3)) σ  have f_apply : ∀ d, F d = σ d.symm := fun _ => rfl  have f01 : F d01 = d12 := by rw [f_apply, y01, s10]  have f12 : F d12 = d20 := by rw [f_apply, y12, s21]  have f20 : F d20 = d01 := by rw [f_apply, y20, s02]  have f10 : F d10 = d02 := by rw [f_apply, y10, s01]  have f02 : F d02 = d21 := by rw [f_apply, y02, s20]  have f21 : F d21 = d10 := by rw [f_apply, y21, s12]  have f2_01 : (F ^ 2) d01 = d20 := by    change F (F d01) = d20    rw [f01, f12]  have f2_10 : (F ^ 2) d10 = d21 := by    change F (F d10) = d21    rw [f10, f02]  let P (x : (⊤ : SimpleGraph (Fin 3)).Dart) : Prop := x = d01 ∨ x = d12 ∨ x = d20  have hP : ∀ n : ℕ, P ((F ^ n) d01) := by    intro n    induction n with    | zero => left; rfl    | succ n ih =>      rcases ih with h | h | h      · rw [pow_succ', Equiv.Perm.mul_apply, h, f01]        right; left; rfl      · rw [pow_succ', Equiv.Perm.mul_apply, h, f12]        right; right; rfl      · rw [pow_succ', Equiv.Perm.mul_apply, h, f20]        left; rfl  have hne : ¬ (simple_graph_rotation_face_perm (⊤ : SimpleGraph (Fin 3)) σ).SameCycle d01 d10 := by    intro hsc    obtain ⟨n, hn⟩ := hsc.exists_nat_pow_eq    have : P d10 := hn ▸ hP n    rcases this with h | h | h    · exact (complete_three_ne_of_prod (by decide)) h.symm    · exact (complete_three_ne_of_prod (by decide)) h.symm    · exact (complete_three_ne_of_prod (by decide)) h.symm  have hcov : ∀ z : (⊤ : SimpleGraph (Fin 3)).Dart, F.SameCycle z d01 ∨ F.SameCycle z d10 := by    intro z    rcases complete_three_dart_all z with h | h | h | h | h | h    · left; rw [h]    · right; rw [h]      exact Equiv.Perm.SameCycle.symm ⟨1, f10⟩    · right; rw [h]    · left; rw [h]      exact Equiv.Perm.SameCycle.symm ⟨1, f01⟩    · left; rw [h]      exact Equiv.Perm.SameCycle.symm ⟨2, f2_01⟩    · right; rw [h]      exact Equiv.Perm.SameCycle.symm ⟨2, f2_10⟩  exact complete_three_card_quotient_eq_two (Equiv.Perm.SameCycle.setoid F) d01 d10 hne hcov
See it in the graphDiscuss this resultChallenge it