💎 Reusable layer
← all 82R0001

Pappus's hexagon theorem

API

Use this theorem

  1. Create a project

    Shell
    lake +leanprover/lean4:v4.35.0 new myproject std.toml
    cd myproject

    Standard template, not math: the math template adds its own Mathlib requirement pinned to the Lean release tag, not to the Mathlib commit this package is built and tested with, so you would get a second, different Mathlib. Mathlib comes in through this package. Skip this step in an existing project with the same Lean and Mathlib.

  2. Add the dependency to lakefile.toml

    TOML
    [[require]]
    name = "formalizations"
    git = "https://github.com/karlesmarin/formalizations"
    rev = "v0.15.0"
  3. Import the minimal module

    Lean 4
    import Formalizations.Reusable.Geometry

    In a file of the project, e.g. Example.lean.

  4. Paste the example

    Lean 4
    open Formalizations.Reusable Matrix Real
    
    /-- Pappus over `ℚ`: the three meets are collinear. -/
    example (A B C a b c : Fin 3 → ℚ) (h₁ : A ⬝ᵥ (B ⨯₃ C) = 0) (h₂ : a ⬝ᵥ (b ⨯₃ c) = 0) :
        ((A ⨯₃ b) ⨯₃ (a ⨯₃ B)) ⬝ᵥ (((A ⨯₃ c) ⨯₃ (a ⨯₃ C)) ⨯₃ ((B ⨯₃ c) ⨯₃ (b ⨯₃ C))) = 0 :=
      pappus_hexagon A B C a b c h₁ h₂

    Steps 3 and 4 together are a complete Lean file:FormalizationsTest/ReusableGeometryExample.lean at v0.15.0, compiled by the CI.

  5. Fetch and check

    Shell
    lake update
    lake lean Example.lean

    lake update fetches this package and Mathlib, and Mathlib's update hook downloads the compiled Mathlib (lake exe cache get). lake lean Example.lean builds the imports of the file (steps 3 and 4) and checks it. If the file belongs to a lean_lib of your project, lake build <lib> does the same. Avoid a bare lake build in a project from the standard template: its default target is the executable, whose link compiles every imported Mathlib module to native code. Same versions required: Lean v4.35.0, Mathlib f0b4c81.

Alternative: import Formalizations.Reusable imports the whole layer (all areas).

Pappus's hexagon theorem in homogeneous coordinates over any commutative ring: if A, B, C are collinear and a, b, c are collinear, the meets Ab∩aB, Ac∩aC, Bc∩bC are collinear, with no non-degeneracy hypothesis.

Lean statement

Lean 4
theorem pappus_hexagon {R : Type*} [CommRing R] (A B C a b c : Fin 3 → R)
    (h₁ : A ⬝ᵥ (B ⨯₃ C) = 0) (h₂ : a ⬝ᵥ (b ⨯₃ c) = 0) :
    ((A ⨯₃ b) ⨯₃ (a ⨯₃ B)) ⬝ᵥ (((A ⨯₃ c) ⨯₃ (a ⨯₃ C)) ⨯₃ ((B ⨯₃ c) ⨯₃ (b ⨯₃ C))) = 0
Name
Formalizations.Reusable.pappus_hexagon
Import
import Formalizations.Reusable.Geometry
Version
formalizations 0.15.0Lean v4.35.0Mathlib f0b4c81
Role
API a lemma to import and build other proofs on
Provenance
Pappus.pappus in Formalizations.Geometry.Projective.Pappus
Paper: none (Theorem of the Day)
Classical reference
Pappus of Alexandria, Collection, Book VII (c. 320 AD)
Trust
standard axioms only propext, Classical.choice, Quot.sound
#print axioms in FormalizationsTest/Axioms.lean, audited by scripts/check_axioms.sh (2758 results), which the CI build workflow runs and passed at this commit.
Status
reusable not an upstream candidate
Area
Geometry

Links

Lean docstring

Pappus's hexagon theorem (homogeneous coordinates, any commutative ring).

Points of the projective plane are vectors of R³; three points are collinear when their triple product A ⬝ᵥ (B ⨯₃ C) vanishes, and the meet of the lines PQ and RS is (P ⨯₃ Q) ⨯₃ (R ⨯₃ S). If A, B, C are collinear and a, b, c are collinear, then the three meets Ab ∩ aB, Ac ∩ aC, Bc ∩ bC are collinear. No non-degeneracy hypothesis is needed: the conclusion is an ideal-membership identity.

  • Archive: Pappus.pappus (Formalizations.Geometry.Projective.Pappus); no research paper.
  • Classical reference: Pappus of Alexandria, Collection, Book VII (c. 320 AD); R. Whitty, Theorem of the Day, «Pappus' Theorem».
  • Example: over ℤ, from h₁ : A ⬝ᵥ (B ⨯₃ C) = 0 and h₂ : a ⬝ᵥ (b ⨯₃ c) = 0, pappus_hexagon A B C a b c h₁ h₂ gives the collinearity of the three meets.

Upstream

the proof is a degree-9 ideal-membership certificate of several hundred terms; Mathlib would want a synthetic or affine proof

Depends on, in this repository

None besides the archive module (repo_dependencies = []).