AFTD Auto-Formalizing Theoretical Domains

spatial_exists_orthogonal_vector_occupied_planes_eq_occupied_lines

theoremverified

For every finite set S in ℝ³ and every one-dimensional subspace ℓ of ℝ³, there exists a non-zero vector u orthogonal to ℓ such that the number of affine planes perpendicular to u meeting S equals the number of affine lines parallel to ℓ meeting S.

Statement

open Module in
open Classical in
theorem spatial_exists_orthogonal_vector_occupied_planes_eq_occupied_lines
    (S : Finset (EuclideanSpace ℝ (Fin 3)))
    (ℓ : Submodule ℝ (EuclideanSpace ℝ (Fin 3)))
    (hℓ : finrank ℝ ℓ = 1) :
    ∃ u : EuclideanSpace ℝ (Fin 3), u ≠ 0 ∧ u ∈ ℓᗮ ∧
      (S.image (fun p => inner ℝ p u)).card = (S.image (Submodule.mkQ ℓ)).card
Source
arXiv:2610.38864, proof of Proposition 2.2
Verified
08 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 2
  • spatial_occupied_linesFor a finite point set S in ℝ³ and a submodule ℓ of ℝ³, the number of affine lines parallel to ℓ meeting S is the cardinality of the image…
  • spatial_occupied_planesFor a finite point set S in ℝ³ and a vector u in ℝ³, the number of affine planes perpendicular to u meeting S is the cardinality of the…
Used by 1

Read back from the Lean

Given a finite set $S$ of points in 3-dimensional Euclidean space $\mathbb{R}^3$ (EuclideanSpace ℝ (Fin 3)) and a 1-dimensional linear subspace $\ell \subseteq \mathbb{R}^3$ (i.e., a submodule over $\mathbb{R}$ with finrank ℝ ℓ = 1), there exists a vector $u \in \mathbb{R}^3$ such that: 1. $u \neq 0$, 2. $u$ belongs to the orthogonal complement $\ell^\perp$, and 3. the number of distinct values of the inner product $\langle p, u \rangle$ for $p \in S$ (the cardinality of the image of $S$ under $p \mapsto \langle p, u \rangle$) equals the number of distinct cosets in the quotient $\mathbb{R}^3 / \ell$ represented by elements of $S$ (the cardinality of the image of $S$ under the quotient map Submodule.mkQ ℓ).

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

The proof, explained

Given a line ℓ in ℝ³, its orthogonal complement ℓᗮ has dimension 2 with basis {b₀, b₁}. We seek a normal vector u = b₀ + t • b₁ ∈ ℓᗮ such that the planes orthogonal to u distinguish the lines parallel to ℓ meeting S. Two points p₁, p₂ ∈ S lying on different lines parallel to ℓ end up on the same plane if and only if t equals -⟨p₁ - p₂, b₀⟩ / ⟨p₁ - p₂, b₁⟩, which can happen for at most one value of t per pair. Choosing t outside this finite set of bad values yields a non-zero vector u ∈ ℓᗮ whose orthogonal planes partition S identically to the parallel lines of ℓ.

  1. If two functions on a finite set induce the same equivalence relation, their images have equal cardinality.

    A bijection between f(s) and g(s) is constructed by picking a representative preimage φ(b) ∈ s for each b ∈ f(s) using the axiom of choice; injectivity and surjectivity follow from the equivalence f x = f y ↔ g x = g y.

    lines 7–21

    uses Finset.card_bij, Finset.mem_image.mp, Finset.mem_image.mpr

      have H : ∀ b ∈ s.image f, ∃ a ∈ s, f a = b := by
        intro b hb; exact Finset.mem_image.mp hb
      choose φ hφ1 hφ2 using H
      apply Finset.card_bij (fun b hb => g (φ b hb))
      · intro b hb
        exact Finset.mem_image.mpr ⟨φ b hb, hφ1 b hb, rfl⟩
      · intro b1 hb1 b2 hb2 heq
        have := (h _ (hφ1 b1 hb1) _ (hφ1 b2 hb2)).mpr heq
        rw [← hφ2 b1 hb1, ← hφ2 b2 hb2, this]
      · intro c hc
        obtain ⟨a, ha, rfl⟩ := Finset.mem_image.mp hc
        have hfa : f a ∈ s.image f := Finset.mem_image.mpr ⟨a, ha, rfl⟩
        refine ⟨f a, hfa, ?_⟩
        have := (h _ (hφ1 (f a) hfa) a ha).mp (hφ2 (f a) hfa)
        exact this
  2. Any linear combination of the form b₀ + t • b₁ for a basis of a 2-dimensional space is non-zero.

    Expressing the linear combination in the basis coordinates shows that the coordinate at index 0 is 1, which cannot equal 0.

    lines 27–31

    uses map_zero, Finsupp.ext_iff.mp, map_add, map_smul

      intro h
      have h1 : b.repr (b 0 + t • b 1) = 0 := by rw [h, map_zero]
      have h2 := Finsupp.ext_iff.mp h1 0
      rw [map_add, map_smul] at h2
      simp at h2
  3. Any vector orthogonal to all basis elements of ℓᗮ belongs to ℓ.

    Every vector w ∈ ℓᗮ expands as a sum of basis elements, so its inner product with v vanishes by linearity; thus v lies in the double orthogonal complement ℓᗮᗮ, which equals ℓ.

    lines 40–57

    uses Submodule.mem_orthogonal, Module.finBasisOfFinrankEq, congr_arg, Subtype.val, sum_inner, inner_smul_left, real_inner_comm, mul_zero, Submodule.orthogonal_orthogonal

      have : v ∈ ℓᗮᗮ := by
        rw [Submodule.mem_orthogonal]
        intro w hw
        let b := Module.finBasisOfFinrankEq ℝ ↥ℓᗮ h_rank
        have hw_sum : (⟨w, hw⟩ : ↥ℓᗮ) = ∑ i : Fin 2, b.repr ⟨w, hw⟩ i • b i := (b.sum_repr ⟨w, hw⟩).symm
        have hw_sum' : w = ∑ i : Fin 2, b.repr ⟨w, hw⟩ i • (b i : EuclideanSpace ℝ (Fin 3)) := by
          exact congr_arg Subtype.val hw_sum
        rw [hw_sum', sum_inner]
        have h_zero : ∀ i : Fin 2, inner ℝ (b.repr ⟨w, hw⟩ i • (b i : EuclideanSpace ℝ (Fin 3))) v = 0 := by
          intro i
          rw [inner_smul_left, real_inner_comm]
          fin_cases i
          · change _ * inner ℝ v (b 0 : EuclideanSpace ℝ (Fin 3)) = 0
            rw [h0, mul_zero]
          · change _ * inner ℝ v (b 1 : EuclideanSpace ℝ (Fin 3)) = 0
            rw [h1, mul_zero]
        simp [h_zero]
      rwa [Submodule.orthogonal_orthogonal (K := ℓ)] at this
  4. The orthogonal complement ℓᗮ has dimension 2. automation

    Since dim(ℓ) = 1 and dim(ℝ³) = 3, the dimension formula for orthogonal complements gives dim(ℓᗮ) = 3 - 1 = 2.

    lines 68–71

    uses Submodule.finrank_add_finrank_orthogonal, finrank_euclideanSpace, Fintype.card_fin

      have h_rank : finrank ℝ ↥ℓᗮ = 2 := by
        have h := Submodule.finrank_add_finrank_orthogonal ℓ
        simp only [finrank_euclideanSpace, Fintype.card_fin] at h
        omega
  5. There exists a non-zero vector u in ℓᗮ avoiding all slopes that could conflate distinct lines.

    Fixing a basis {b₀, b₁} of ℓᗮ, the pairs in S × S with ⟨p₁ - p₂, b₁⟩ ≠ 0 define finitely many bad values of t = -⟨p₁ - p₂, b₀⟩ / ⟨p₁ - p₂, b₁⟩. Since ℝ is infinite, we choose t avoiding all of them and define u = b₀ + t • b₁ ∈ ℓᗮ.

    lines 72–79

    uses Infinite.exists_notMem_finset

      let b := finBasisOfFinrankEq ℝ ↥ℓᗮ h_rank
      let b0 : EuclideanSpace ℝ (Fin 3) := (b 0 : ↥ℓᗮ)
      let b1 : EuclideanSpace ℝ (Fin 3) := (b 1 : ↥ℓᗮ)
      let pairs := (S ×ˢ S).filter (fun p => inner ℝ (p.1 - p.2) b1 ≠ 0)
      let bad_set : Finset ℝ := pairs.image (fun p => - inner ℝ (p.1 - p.2) b0 / inner ℝ (p.1 - p.2) b1)
      obtain ⟨t, ht⟩ := Infinite.exists_notMem_finset bad_set
      let u_sub : ↥ℓᗮ := b 0 + t • b 1
      let u : EuclideanSpace ℝ (Fin 3) := (u_sub : ↥ℓᗮ)
  6. The vector u is non-zero and belongs to ℓᗮ, reducing the cardinality claim to checking fiber equivalence.

    The vector u is non-zero by the basis combination lemma and belongs to ℓᗮ by construction; the image cardinality lemma reduces the goal to showing ⟨p₁, u⟩ = ⟨p₂, u⟩ ↔ π(p₁) = π(p₂) for all p₁, p₂ ∈ S.

    lines 80–87

    uses Subtype.ext, spatial_exists_orthogonal_vector_occupied_planes_eq_occupied_lines_basis_two_ne_zero, spatial_exists_orthogonal_vector_occupied_planes_eq_occupied_lines_card_image_eq

      have hu_ne : u ≠ 0 := by
        intro hu
        have : u_sub = 0 := Subtype.ext hu
        exact spatial_exists_orthogonal_vector_occupied_planes_eq_occupied_lines_basis_two_ne_zero b t this
      have hu_mem : u ∈ ℓᗮ := u_sub.2
      refine ⟨u, hu_ne, hu_mem, ?_⟩
      apply spatial_exists_orthogonal_vector_occupied_planes_eq_occupied_lines_card_image_eq
      intro p1 hp1 p2 hp2
  7. Assuming ⟨p₁, u⟩ = ⟨p₂, u⟩ but π(p₁) ≠ π(p₂), the vector p₁ - p₂ cannot lie in ℓ and cannot be orthogonal to both basis vectors.

    If π(p₁) ≠ π(p₂), then p₁ - p₂ ∉ ℓ. By the earlier lemma, this prevents p₁ - p₂ from being orthogonal to both b₀ and b₁.

    lines 88–97

    uses Submodule.Quotient.eq, spatial_exists_orthogonal_vector_occupied_planes_eq_occupied_lines_mem_of_inner_zero

      constructor
      · intro h_eq
        by_contra h_neq
        have h_diff_not_mem : p1 - p2 ∉ ℓ := by
          intro h_mem
          have : Submodule.mkQ ℓ p1 = Submodule.mkQ ℓ p2 := (Submodule.Quotient.eq ℓ).mpr h_mem
          exact h_neq this
        have h_not_both_zero : ¬(inner ℝ (p1 - p2) b0 = 0 ∧ inner ℝ (p1 - p2) b1 = 0) := by
          intro ⟨h0, h1⟩
          exact h_diff_not_mem (spatial_exists_orthogonal_vector_occupied_planes_eq_occupied_lines_mem_of_inner_zero ℓ h_rank (p1 - p2) h0 h1)
  8. The case ⟨p₁ - p₂, b₁⟩ = 0 is impossible.

    Expanding ⟨p₁ - p₂, u⟩ = ⟨p₁ - p₂, b₀⟩ + t ⟨p₁ - p₂, b₁⟩ = 0 with ⟨p₁ - p₂, b₁⟩ = 0 implies ⟨p₁ - p₂, b₀⟩ = 0, contradicting that both cannot vanish.

    lines 98–106

    uses inner_add_right, inner_smul_right, inner_sub_left, sub_self, mul_zero, add_zero

        have hu_exp : inner ℝ (p1 - p2) u = inner ℝ (p1 - p2) b0 + t * inner ℝ (p1 - p2) b1 := by
          change inner ℝ (p1 - p2) (b0 + t • b1) = _
          rw [inner_add_right, inner_smul_right]
        have h_inner_sub : inner ℝ (p1 - p2) u = 0 := by
          rw [inner_sub_left, h_eq, sub_self]
        rw [h_inner_sub] at hu_exp
        by_cases hb1 : inner ℝ (p1 - p2) b1 = 0
        · rw [hb1, mul_zero, add_zero] at hu_exp
          exact h_not_both_zero ⟨hu_exp.symm, hb1⟩
  9. The case ⟨p₁ - p₂, b₁⟩ ≠ 0 contradicts the choice of t.

    When ⟨p₁ - p₂, b₁⟩ ≠ 0, ⟨p₁ - p₂, u⟩ = 0 forces t to equal the bad slope -⟨p₁ - p₂, b₀⟩ / ⟨p₁ - p₂, b₁⟩, contradicting that t was chosen outside the bad set.

    lines 107–116

    uses eq_div_iff, Finset.mem_filter, Finset.mem_product.mpr, Finset.mem_image

        · have ht_eq : t = - inner ℝ (p1 - p2) b0 / inner ℝ (p1 - p2) b1 := by
            have : t * inner ℝ (p1 - p2) b1 = - inner ℝ (p1 - p2) b0 := by linarith
            exact (eq_div_iff hb1).mpr (by linarith)
          have h_pair_mem : (p1, p2) ∈ pairs := by
            rw [Finset.mem_filter]
            refine ⟨Finset.mem_product.mpr ⟨hp1, hp2⟩, hb1⟩
          have ht_mem : t ∈ bad_set := by
            rw [Finset.mem_image]
            refine ⟨(p1, p2), h_pair_mem, ht_eq.symm⟩
          exact ht ht_mem
  10. If two points project to the same line parallel to ℓ, their inner products with u agree.

    If π(p₁) = π(p₂), then p₁ - p₂ ∈ ℓ. Since u ∈ ℓᗮ, ⟨p₁ - p₂, u⟩ = 0, so ⟨p₁, u⟩ = ⟨p₂, u⟩.

    lines 117–121

    uses Submodule.Quotient.eq, Submodule.inner_right_of_mem_orthogonal, inner_sub_left, sub_eq_zero.mp

      · intro h_mkQ
        have h_mem : p1 - p2 ∈ ℓ := (Submodule.Quotient.eq ℓ).mp h_mkQ
        have h0 : inner ℝ (p1 - p2) u = 0 := Submodule.inner_right_of_mem_orthogonal h_mem hu_mem
        rw [inner_sub_left] at h0
        exact sub_eq_zero.mp h0
Finset.card_bij
A finite set has equal cardinality to another finite set if there is a bijection between them
Finset.mem_image.mp
An element is in the image of a finset under a function iff it is the image of some element in the finset
Finset.mem_image.mpr
An element is in the image of a finset under a function if it is the image of some element in the finset
map_zero
A linear map preserves zero
Finsupp.ext_iff.mp
Two functions with finite support are equal iff they agree on all inputs
map_add
A linear map preserves addition
map_smul
A linear map preserves scalar multiplication
Submodule.mem_orthogonal
Characterization of elements in the orthogonal complement of a submodule
Module.finBasisOfFinrankEq
A basis of a finite-dimensional space given by its rank
congr_arg
Congruence of a function applied to equal arguments
Subtype.val
The underlying value of a subtype element
sum_inner
Inner product distributes over finite sums in the first argument
inner_smul_left
Scalar multiplication pulls out of the first argument of an inner product
real_inner_comm
Symmetry of the real inner product
mul_zero
Multiplication by zero yields zero
Submodule.orthogonal_orthogonal
The double orthogonal complement of a submodule is itself in finite dimensions
Submodule.finrank_add_finrank_orthogonal
Dimension of a submodule plus dimension of its orthogonal complement equals total dimension
finrank_euclideanSpace
Dimension of Euclidean space of dimension n is n
Fintype.card_fin
Cardinality of Fin n is n
Infinite.exists_notMem_finset
An infinite type has elements outside any finite set
Subtype.ext
Equality of subtype elements is equivalent to equality of their values
spatial_exists_orthogonal_vector_occupied_planes_eq_occupied_lines_basis_two_ne_zero
A linear combination of two basis elements with non-zero first coefficient is non-zero
spatial_exists_orthogonal_vector_occupied_planes_eq_occupied_lines_card_image_eq
Two maps on a finite set with identical fibers have equal image cardinalities
Submodule.Quotient.eq
Quotient elements are equal iff their difference lies in the submodule
spatial_exists_orthogonal_vector_occupied_planes_eq_occupied_lines_mem_of_inner_zero
A vector orthogonal to a basis of the orthogonal complement lies in the submodule
inner_add_right
Inner product distributes over addition in the second argument
inner_smul_right
Scalar multiplication pulls out of the second argument of an inner product
inner_sub_left
Inner product distributes over subtraction in the first argument
sub_self
Subtracting an element from itself yields zero
add_zero
Adding zero leaves an element unchanged
eq_div_iff
Division equality equivalence in a group with zero
Finset.mem_filter
Membership in a filtered finite set
Finset.mem_product.mpr
Pair membership in a cartesian product of finite sets
Finset.mem_image
Membership in the image of a finite set
Submodule.inner_right_of_mem_orthogonal
A vector in a subspace is orthogonal to any vector in its orthogonal complement
sub_eq_zero.mp
A difference is zero iff the two elements are equal

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 Classical inlemma spatial_exists_orthogonal_vector_occupied_planes_eq_occupied_lines_card_image_eq    {α β γ : Type*}    (s : Finset α) (f : α → β) (g : α → γ)    (h : ∀ x ∈ s, ∀ y ∈ s, f x = f y ↔ g x = g y) :    (s.image f).card = (s.image g).card := by  have H : ∀ b ∈ s.image f, ∃ a ∈ s, f a = b := by    intro b hb; exact Finset.mem_image.mp hb  choose φ hφ1 hφ2 using H  apply Finset.card_bij (fun b hb => g (φ b hb))  · intro b hb    exact Finset.mem_image.mpr ⟨φ b hb, hφ1 b hb, rfl⟩  · intro b1 hb1 b2 hb2 heq    have := (h _ (hφ1 b1 hb1) _ (hφ1 b2 hb2)).mpr heq    rw [← hφ2 b1 hb1, ← hφ2 b2 hb2, this]  · intro c hc    obtain ⟨a, ha, rfl⟩ := Finset.mem_image.mp hc    have hfa : f a ∈ s.image f := Finset.mem_image.mpr ⟨a, ha, rfl⟩    refine ⟨f a, hfa, ?_⟩    have := (h _ (hφ1 (f a) hfa) a ha).mp (hφ2 (f a) hfa)    exact thislemma spatial_exists_orthogonal_vector_occupied_planes_eq_occupied_lines_basis_two_ne_zero    {M : Type*} [AddCommGroup M] [Module ℝ M]    (b : Module.Basis (Fin 2) ℝ M) (t : ℝ) :    b 0 + t • b 1 ≠ 0 := by  intro h  have h1 : b.repr (b 0 + t • b 1) = 0 := by rw [h, map_zero]  have h2 := Finsupp.ext_iff.mp h1 0  rw [map_add, map_smul] at h2  simp at h2lemma spatial_exists_orthogonal_vector_occupied_planes_eq_occupied_lines_mem_of_inner_zero    (ℓ : Submodule ℝ (EuclideanSpace ℝ (Fin 3)))    (h_rank : Module.finrank ℝ ↥ℓᗮ = 2)    (v : EuclideanSpace ℝ (Fin 3))    (h0 : inner ℝ v ((Module.finBasisOfFinrankEq ℝ ↥ℓᗮ h_rank 0 : ↥ℓᗮ) : EuclideanSpace ℝ (Fin 3)) = 0)    (h1 : inner ℝ v ((Module.finBasisOfFinrankEq ℝ ↥ℓᗮ h_rank 1 : ↥ℓᗮ) : EuclideanSpace ℝ (Fin 3)) = 0) :    v ∈ ℓ := by  have : v ∈ ℓᗮᗮ := by    rw [Submodule.mem_orthogonal]    intro w hw    let b := Module.finBasisOfFinrankEq ℝ ↥ℓᗮ h_rank    have hw_sum : (⟨w, hw⟩ : ↥ℓᗮ) = ∑ i : Fin 2, b.repr ⟨w, hw⟩ i • b i := (b.sum_repr ⟨w, hw⟩).symm    have hw_sum' : w = ∑ i : Fin 2, b.repr ⟨w, hw⟩ i • (b i : EuclideanSpace ℝ (Fin 3)) := by      exact congr_arg Subtype.val hw_sum    rw [hw_sum', sum_inner]    have h_zero : ∀ i : Fin 2, inner ℝ (b.repr ⟨w, hw⟩ i • (b i : EuclideanSpace ℝ (Fin 3))) v = 0 := by      intro i      rw [inner_smul_left, real_inner_comm]      fin_cases i      · change _ * inner ℝ v (b 0 : EuclideanSpace ℝ (Fin 3)) = 0        rw [h0, mul_zero]      · change _ * inner ℝ v (b 1 : EuclideanSpace ℝ (Fin 3)) = 0        rw [h1, mul_zero]    simp [h_zero]  rwa [Submodule.orthogonal_orthogonal (K := ℓ)] at thisopen Module inopen Classical in/-- For any finite set S in ℝ³ and any line direction ℓ, there is a non-zero vector u orthogonal to ℓ whose occupied planes match the occupied lines of ℓ. -/theorem spatial_exists_orthogonal_vector_occupied_planes_eq_occupied_lines    (S : Finset (EuclideanSpace ℝ (Fin 3)))    (ℓ : Submodule ℝ (EuclideanSpace ℝ (Fin 3)))    (hℓ : finrank ℝ ℓ = 1) :    ∃ u : EuclideanSpace ℝ (Fin 3), u ≠ 0 ∧ u ∈ ℓᗮ ∧      (S.image (fun p => inner ℝ p u)).card = (S.image (Submodule.mkQ ℓ)).card := by  have h_rank : finrank ℝ ↥ℓᗮ = 2 := by    have h := Submodule.finrank_add_finrank_orthogonal ℓ    simp only [finrank_euclideanSpace, Fintype.card_fin] at h    omega  let b := finBasisOfFinrankEq ℝ ↥ℓᗮ h_rank  let b0 : EuclideanSpace ℝ (Fin 3) := (b 0 : ↥ℓᗮ)  let b1 : EuclideanSpace ℝ (Fin 3) := (b 1 : ↥ℓᗮ)  let pairs := (S ×ˢ S).filter (fun p => inner ℝ (p.1 - p.2) b1 ≠ 0)  let bad_set : Finset ℝ := pairs.image (fun p => - inner ℝ (p.1 - p.2) b0 / inner ℝ (p.1 - p.2) b1)  obtain ⟨t, ht⟩ := Infinite.exists_notMem_finset bad_set  let u_sub : ↥ℓᗮ := b 0 + t • b 1  let u : EuclideanSpace ℝ (Fin 3) := (u_sub : ↥ℓᗮ)  have hu_ne : u ≠ 0 := by    intro hu    have : u_sub = 0 := Subtype.ext hu    exact spatial_exists_orthogonal_vector_occupied_planes_eq_occupied_lines_basis_two_ne_zero b t this  have hu_mem : u ∈ ℓᗮ := u_sub.2  refine ⟨u, hu_ne, hu_mem, ?_⟩  apply spatial_exists_orthogonal_vector_occupied_planes_eq_occupied_lines_card_image_eq  intro p1 hp1 p2 hp2  constructor  · intro h_eq    by_contra h_neq    have h_diff_not_mem : p1 - p2 ∉ ℓ := by      intro h_mem      have : Submodule.mkQ ℓ p1 = Submodule.mkQ ℓ p2 := (Submodule.Quotient.eq ℓ).mpr h_mem      exact h_neq this    have h_not_both_zero : ¬(inner ℝ (p1 - p2) b0 = 0 ∧ inner ℝ (p1 - p2) b1 = 0) := by      intro ⟨h0, h1⟩      exact h_diff_not_mem (spatial_exists_orthogonal_vector_occupied_planes_eq_occupied_lines_mem_of_inner_zero ℓ h_rank (p1 - p2) h0 h1)    have hu_exp : inner ℝ (p1 - p2) u = inner ℝ (p1 - p2) b0 + t * inner ℝ (p1 - p2) b1 := by      change inner ℝ (p1 - p2) (b0 + t • b1) = _      rw [inner_add_right, inner_smul_right]    have h_inner_sub : inner ℝ (p1 - p2) u = 0 := by      rw [inner_sub_left, h_eq, sub_self]    rw [h_inner_sub] at hu_exp    by_cases hb1 : inner ℝ (p1 - p2) b1 = 0    · rw [hb1, mul_zero, add_zero] at hu_exp      exact h_not_both_zero ⟨hu_exp.symm, hb1⟩    · have ht_eq : t = - inner ℝ (p1 - p2) b0 / inner ℝ (p1 - p2) b1 := by        have : t * inner ℝ (p1 - p2) b1 = - inner ℝ (p1 - p2) b0 := by linarith        exact (eq_div_iff hb1).mpr (by linarith)      have h_pair_mem : (p1, p2) ∈ pairs := by        rw [Finset.mem_filter]        refine ⟨Finset.mem_product.mpr ⟨hp1, hp2⟩, hb1⟩      have ht_mem : t ∈ bad_set := by        rw [Finset.mem_image]        refine ⟨(p1, p2), h_pair_mem, ht_eq.symm⟩      exact ht ht_mem  · intro h_mkQ    have h_mem : p1 - p2 ∈ ℓ := (Submodule.Quotient.eq ℓ).mp h_mkQ    have h0 : inner ℝ (p1 - p2) u = 0 := Submodule.inner_right_of_mem_orthogonal h_mem hu_mem    rw [inner_sub_left] at h0    exact sub_eq_zero.mp h0
See it in the graphDiscuss this resultChallenge it