AFTD Auto-Formalizing Theoretical Domains

spider_rho_zero_same

theoremverified

For any non-free spider leg end φ, spider_rho 0 φ φ = 0.

Statement

theorem spider_rho_zero_same (φ : SpiderLegEnd) (hφ : φ ≠ SpiderLegEnd.free) :
    spider_rho 0 φ φ = 0
Source
step towards spider_mex_incoming_one_outward
Verified
19 Oct 2026
Axioms
propext
Built on 2
  • SpiderLegEndThe end condition of an attached leg in a spider state is either free (no arc on the leg), inward (pointing towards the centre), or…
  • spider_rhoThe function spider_rho takes h : ℕ and delta, phi : SpiderLegEnd, returning h if phi = free; if phi = inward, it returns h % 2 when delta…
Used by 6

The proof, explained

The proof argues by case analysis on the spider leg end φ. The case where φ is free is ruled out by the hypothesis that φ ≠ free, and the remaining cases φ = inward and φ = outward follow directly by simplifying the definition of spider_rho at height 0.

  1. The case φ = free cannot occur.

    We consider the possible constructors for the spider leg end φ. If φ is free, reflexivity gives φ = free, which directly contradicts the hypothesis hφ that φ ≠ free.

    lines 4–5

    uses absurd, rfl

      cases φ with
      | free => exact absurd rfl hφ
  2. When φ = inward, spider_rho 0 inward inward = 0.

    Simplifying with the definition of spider_rho: when phi and delta are both inward and the height is 0, the function evaluates to 0 % 2, which is 0.

    line 6

    uses spider_rho

      | inward => simp [spider_rho]
  3. When φ = outward, spider_rho 0 outward outward = 0.

    Similarly, when phi and delta are both outward and the height is 0, the definition of spider_rho evaluates to 0 % 2, which is 0.

    line 7

    uses spider_rho

      | outward => simp [spider_rho]
absurd
from a proposition a and its negation ¬a, any goal b follows
rfl
equality is reflexive: any term equals itself
spider_rho
the spider_rho function, computing the leg state based on height and ends

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

/-- For any non-free spider leg end φ, spider_rho 0 φ φ equals 0. -/theorem spider_rho_zero_same (φ : SpiderLegEnd) (hφ : φ ≠ SpiderLegEnd.free) :    spider_rho 0 φ φ = 0 := by  cases φ with  | free => exact absurd rfl hφ  | inward => simp [spider_rho]  | outward => simp [spider_rho]
See it in the graphDiscuss this resultChallenge it