AFTD Auto-Formalizing Theoretical Domains

triangle_midpoints_exist

theoremverified

For any three pairwise distinct points A, B, C in ℝ², there exist three distinct points p₁, p₂, p₃ forming a triangle whose open sides contain A, B, and C as their midpoints.

Statement

theorem triangle_midpoints_exist (A B C : ℝ × ℝ) (hAB : A ≠ B) (hBC : B ≠ C) (hCA : C ≠ A) :
    ∃ p₁ p₂ p₃ : ℝ × ℝ, p₁ ≠ p₂ ∧ p₂ ≠ p₃ ∧ p₃ ≠ p₁ ∧
      A ∈ openSegment ℝ p₁ p₂ ∧ B ∈ openSegment ℝ p₂ p₃ ∧ C ∈ openSegment ℝ p₃ p₁
Source
step towards triangle_free_blocking_ge_vertex_cover
Verified
23 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Used by 1

The proof, explained

The proof explicitly constructs the three vertices of the triangle as $p_1 = A + C - B$, $p_2 = A + B - C$, and $p_3 = B + C - A$. If any two of these vertices were equal, equating coordinates would force two of the given points $A, B, C$ to coincide, contradicting pairwise distinctness. Expressing each segment's endpoints in the symmetric form $X \mp Y$ around its respective midpoint $X \in \{A, B, C\}$ then immediately confirms that the given points are the midpoints of the open segments.

  1. Choose the candidate vertices $p_1 = A + C - B$, $p_2 = A + B - C$, and $p_3 = B + C - A$.

    We provide the explicit candidate points $p_1, p_2, p_3$, leaving six subgoals: three showing that the vertices are pairwise distinct, and three showing that $A$, $B$, and $C$ lie in their respective open segments.

    line 5

      refine ⟨A + C - B, A + B - C, B + C - A, ?_, ?_, ?_, ?_, ?_, ?_⟩
  2. $p_1 \neq p_2$

    Assume for contradiction that $A + C - B = A + B - C$. By taking the first and second coordinates (simplified via `Prod.fst_add`, `Prod.fst_sub`, `Prod.snd_add`, and `Prod.snd_sub`), linear arithmetic on each coordinate shows $B_1 = C_1$ and $B_2 = C_2$. Extensionality then gives $B = C$, which contradicts the hypothesis $B \neq C$.

    lines 6–11

    uses Prod.fst_add, Prod.fst_sub, Prod.snd_add, Prod.snd_sub

      · intro h
        apply hBC
        have h1 : (A + C - B).1 = (A + B - C).1 := by rw [h]
        have h2 : (A + C - B).2 = (A + B - C).2 := by rw [h]
        simp only [Prod.fst_add, Prod.fst_sub, Prod.snd_add, Prod.snd_sub] at h1 h2
        ext <;> linarith
  3. $p_2 \neq p_3$

    Assume for contradiction that $A + B - C = B + C - A$. Coordinate-wise evaluation via `Prod.fst_add`, `Prod.fst_sub`, `Prod.snd_add`, and `Prod.snd_sub` and linear arithmetic yields $C = A$, contradicting $C \neq A$.

    lines 12–17

    uses Prod.fst_add, Prod.fst_sub, Prod.snd_add, Prod.snd_sub

      · intro h
        apply hCA
        have h1 : (A + B - C).1 = (B + C - A).1 := by rw [h]
        have h2 : (A + B - C).2 = (B + C - A).2 := by rw [h]
        simp only [Prod.fst_add, Prod.fst_sub, Prod.snd_add, Prod.snd_sub] at h1 h2
        ext <;> linarith
  4. $p_3 \neq p_1$

    Assume for contradiction that $B + C - A = A + C - B$. Distributing coordinates using `Prod.fst_add`, `Prod.fst_sub`, `Prod.snd_add`, and `Prod.snd_sub` and applying linear arithmetic yields $A = B$, which contradicts $A \neq B$.

    lines 18–23

    uses Prod.fst_add, Prod.fst_sub, Prod.snd_add, Prod.snd_sub

      · intro h
        apply hAB
        have h1 : (B + C - A).1 = (A + C - B).1 := by rw [h]
        have h2 : (B + C - A).2 = (A + C - B).2 := by rw [h]
        simp only [Prod.fst_add, Prod.fst_sub, Prod.snd_add, Prod.snd_sub] at h1 h2
        ext <;> linarith
  5. $A \in \operatorname{openSegment} \mathbb{R} p_1 p_2$

    By abelian group arithmetic, we express the endpoints as $p_1 = A - (B - C)$ and $p_2 = A + (B - C)$. The claim then follows by `mem_openSegment_sub_add`, which shows that $A$ is in the open segment between $A - (B - C)$ and $A + (B - C)$.

    lines 24–27

    uses mem_openSegment_sub_add

      · have h1 : A + C - B = A - (B - C) := by abel
        have h2 : A + B - C = A + (B - C) := by abel
        rw [h1, h2]
        exact mem_openSegment_sub_add A (B - C)
  6. $B \in \operatorname{openSegment} \mathbb{R} p_2 p_3$

    Similarly, rewriting the endpoints as $p_2 = B - (C - A)$ and $p_3 = B + (C - A)$ enables `mem_openSegment_sub_add` to establish that $B \in \operatorname{openSegment} \mathbb{R} p_2 p_3$.

    lines 28–31

    uses mem_openSegment_sub_add

      · have h1 : A + B - C = B - (C - A) := by abel
        have h2 : B + C - A = B + (C - A) := by abel
        rw [h1, h2]
        exact mem_openSegment_sub_add B (C - A)
  7. $C \in \operatorname{openSegment} \mathbb{R} p_3 p_1$

    Rewriting the endpoints as $p_3 = C - (A - B)$ and $p_1 = C + (A - B)$ allows `mem_openSegment_sub_add` to conclude that $C \in \operatorname{openSegment} \mathbb{R} p_3 p_1$.

    lines 32–35

    uses mem_openSegment_sub_add

      · have h1 : B + C - A = C - (A - B) := by abel
        have h2 : A + C - B = C + (A - B) := by abel
        rw [h1, h2]
        exact mem_openSegment_sub_add C (A - B)
Prod.fst_add
The first component of the sum of two pairs is the sum of their first components: `(p + q).1 = p.1 + q.1`.
Prod.fst_sub
The first component of the difference of two pairs is the difference of their first components: `(a - b).1 = a.1 - b.1`.
Prod.snd_add
The second component of the sum of two pairs is the sum of their second components: `(p + q).2 = p.2 + q.2`.
Prod.snd_sub
The second component of the difference of two pairs is the difference of their second components: `(a - b).2 = a.2 - b.2`.
mem_openSegment_sub_add
In any module over a suitable ordered ring with 1/2, the midpoint $x$ lies in the open segment between $x - y$ and $x + y$: `x ∈ openSegment 𝕜 (x - y) (x + y)`.

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 three pairwise distinct points A, B, C in ℝ², there exist three distinct points p₁, p₂, p₃ forming a triangle whose open sides contain A, B, and C as their midpoints. -/theorem triangle_midpoints_exist (A B C : ℝ × ℝ) (hAB : A ≠ B) (hBC : B ≠ C) (hCA : C ≠ A) :    ∃ p₁ p₂ p₃ : ℝ × ℝ, p₁ ≠ p₂ ∧ p₂ ≠ p₃ ∧ p₃ ≠ p₁ ∧      A ∈ openSegment ℝ p₁ p₂ ∧ B ∈ openSegment ℝ p₂ p₃ ∧ C ∈ openSegment ℝ p₃ p₁ := by  refine ⟨A + C - B, A + B - C, B + C - A, ?_, ?_, ?_, ?_, ?_, ?_⟩  · intro h    apply hBC    have h1 : (A + C - B).1 = (A + B - C).1 := by rw [h]    have h2 : (A + C - B).2 = (A + B - C).2 := by rw [h]    simp only [Prod.fst_add, Prod.fst_sub, Prod.snd_add, Prod.snd_sub] at h1 h2    ext <;> linarith  · intro h    apply hCA    have h1 : (A + B - C).1 = (B + C - A).1 := by rw [h]    have h2 : (A + B - C).2 = (B + C - A).2 := by rw [h]    simp only [Prod.fst_add, Prod.fst_sub, Prod.snd_add, Prod.snd_sub] at h1 h2    ext <;> linarith  · intro h    apply hAB    have h1 : (B + C - A).1 = (A + C - B).1 := by rw [h]    have h2 : (B + C - A).2 = (A + C - B).2 := by rw [h]    simp only [Prod.fst_add, Prod.fst_sub, Prod.snd_add, Prod.snd_sub] at h1 h2    ext <;> linarith  · have h1 : A + C - B = A - (B - C) := by abel    have h2 : A + B - C = A + (B - C) := by abel    rw [h1, h2]    exact mem_openSegment_sub_add A (B - C)  · have h1 : A + B - C = B - (C - A) := by abel    have h2 : B + C - A = B + (C - A) := by abel    rw [h1, h2]    exact mem_openSegment_sub_add B (C - A)  · have h1 : B + C - A = C - (A - B) := by abel    have h2 : A + C - B = C + (A - B) := by abel    rw [h1, h2]    exact mem_openSegment_sub_add C (A - B)
See it in the graphDiscuss this resultChallenge it