FormalConjecturesForMathlib/Geometry/2d.lean
Explanation legend Lean4 Domain Explanation Language (L4DEL)
L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.
- L4DEL
- Lean4 Domain Explanation Language
Credit: The upstream authors and contributors retain credit for the project and mathematics. lean4-explainer only renders their pinned source and adds the separately disclosed explanation layer.
Project sources: Pinned project documentation, Formal Conjectures paper, arXiv v1
32 declarations, 0 contain sorry, 0 declared as axioms
Imports (9)
- Mathlib.LinearAlgebra.Orientation
- Mathlib.Analysis.InnerProductSpace.PiL2
- Mathlib.Geometry.Euclidean.Angle.Oriented.Affine
- Mathlib.Geometry.Euclidean.Triangle
- Mathlib.Data.Set.Card
- Mathlib.Geometry.Euclidean.Sphere.Basic
- FormalConjecturesForMathlib.Geometry.Metric
- FormalConjecturesForMathlib.Logic.Equiv.Fin.Rotate
- FormalConjecturesForMathlib.Data.Set.Triplewise
Imported by 1 file
- instance
Module.orientedEuclideanSpaceFinTwoOriented angles make sense in 2d line 39 sourceSource documentation
Oriented angles make sense in 2d.
Note: this can't blindly be added to mathlib as it creates an "instance diamond" with an instance for modules satisfying
is_empty.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Module.Oriented,Real,EuclideanSpace,Fin,OfNat.ofNat,Nat,ENNRealProof uses:
Module.Oriented.mk,Module.Basis.orientation,PiLp.basisFun45 instances, coercions and auxiliary constants left out.
noncomputable instance Module.orientedEuclideanSpaceFinTwo : Module.Oriented ℝ ℝ² (Fin 2) := …
- instance
fact_finrank_euclideanSpace_fin_twoTwo dimensional euclidean space is two-dimensional line 43 sourceSource documentation
Two dimensional euclidean space is two-dimensional.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Fact,Eq,Nat,Module.finrank,Real,EuclideanSpace,Fin,OfNat.ofNat,ENNRealProof uses:
Fact.mk,finrank_euclideanSpace_fin35 instances, coercions and auxiliary constants left out.
instance fact_finrank_euclideanSpace_fin_two : Fact (Module.finrank ℝ ℝ² = 2) := …
- def
EuclideanGeometry.NonTrilinearWe say a subsetAof points in the plane is non-trilinear if it contains no three points that lie on the same line line 60 sourceSource documentation
We say a subset
Aof points in the plane is non-trilinear if it contains no three points that lie on the same line.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NormedAddCommGroup,InnerProductSpace,Real,MetricSpace,NormedAddTorsor,SetProof uses: Set.Triplewise,
Not,Collinear,Insert.insert,Singleton.singleton14 instances, coercions and auxiliary constants left out.
def NonTrilinear (A : Set P) : Prop := …
- def
EuclideanGeometry.NonCollinearForWe say a subsetSof points is non-collinear for $n$ points if it contains no $n$ points that lie on the same line line 65 sourceSource documentation
We say a subset
Sof points is non-collinear for $n$ points if it contains no $n$ points that lie on the same line.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NormedAddCommGroup,InnerProductSpace,Real,MetricSpace,NormedAddTorsor,Nat,SetProof uses:
LE.le,Set.Finite,Eq,Set.ncard,Not,Collinear13 instances, coercions and auxiliary constants left out.
def NonCollinearFor (n : ℕ) (S : Set P) : Prop := …
- lemma
EuclideanGeometry.NonCollinearFor.subsetline 69 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NormedAddCommGroup,InnerProductSpace,Real,MetricSpace,NormedAddTorsor,Nat,Set,LE.le, EuclideanGeometry.NonCollinearForProof uses:
Set.Finite,Eq,Set.ncard,LE.le.trans14 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- def
EuclideanGeometry.ConvexIndepConvexIndep Smeans thatSconsists of extremal points of its convex hull, i.e., the point set encloses a convex shape line 77 sourceSource documentation
ConvexIndep Smeans thatSconsists of extremal points of its convex hull, i.e., the point set encloses a convex shape. Also known as a "convex-independent set".standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Set,EuclideanSpace,Real,Fin,OfNat.ofNat,NatProof uses:
Membership.mem,Not,ClosureOperator,convexHull,ENNReal,SDiff.sdiff,Singleton.singleton30 instances, coercions and auxiliary constants left out.
def ConvexIndep (S : Set ℝ²) : Prop := …
- def
EuclideanGeometry.HasConvexNGonThe setPcontains a convexn-gon line 82 sourceSource documentation
The set
Pcontains a convexn-gon. See alsoIsConvexPolygon.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Set,EuclideanSpace,Real,Fin,OfNat.ofNatProof uses:
Exists,Finset,And,Eq,Finset.card,LE.le, EuclideanGeometry.ConvexIndep5 instances, coercions and auxiliary constants left out.
def HasConvexNGon (n : ℕ) (P : Set ℝ²) : Prop := …
- def
EuclideanGeometry.IsCcwConvexPolygonThe statement that a sequence of points form a counter-clockwise convex polygon line 86 sourceSource documentation
The statement that a sequence of points form a counter-clockwise convex polygon.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,NormedAddCommGroup,InnerProductSpace,Real,MetricSpace,NormedAddTorsor,Module.Oriented,Fin,OfNat.ofNat,Fact,Eq,Module.finrankProof uses:
LT.lt,SignType,Real.Angle.sign,EuclideanGeometry.oangle29 instances, coercions and auxiliary constants left out.
def IsCcwConvexPolygon (p : Fin n → P) : Prop := …
- theorem
EuclideanGeometry.IsCcwConvexPolygon.sign_oangleline 89 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,NormedAddCommGroup,InnerProductSpace,Real,MetricSpace,NormedAddTorsor,Module.Oriented,Fin,OfNat.ofNat,Fact,Eq,Module.finrank, EuclideanGeometry.IsCcwConvexPolygon,LT.lt,SignType,Real.Angle.sign,EuclideanGeometry.oangle30 instances, coercions and auxiliary constants left out.
- theorem
EuclideanGeometry.IsCcwConvexPolygon.sign_oangle'line 93 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,NormedAddCommGroup,InnerProductSpace,Real,MetricSpace,NormedAddTorsor,Module.Oriented,Fin,OfNat.ofNat,Fact,Eq,Module.finrank, EuclideanGeometry.IsCcwConvexPolygon,LT.lt,SignType,Real.Angle.sign,EuclideanGeometry.oangleProof uses:
Eq.mpr,id,congrArg,EuclideanGeometry.oangle_rotate_sign32 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- theorem
EuclideanGeometry.IsCcwConvexPolygon.sign_oangle''line 99 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,NormedAddCommGroup,InnerProductSpace,Real,MetricSpace,NormedAddTorsor,Module.Oriented,Fin,OfNat.ofNat,Fact,Eq,Module.finrank, EuclideanGeometry.IsCcwConvexPolygon,LT.lt,SignType,Real.Angle.sign,EuclideanGeometry.oangleProof uses:
Eq.mpr,id,congrArg,Eq.symm,EuclideanGeometry.oangle_rotate_sign32 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- theorem
EuclideanGeometry.IsCcwConvexPolygon.sign_oangle_finRotateline 104 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,NormedAddCommGroup,InnerProductSpace,Real,MetricSpace,NormedAddTorsor,Module.Oriented,Fin,OfNat.ofNat,Fact,Eq,Module.finrank, EuclideanGeometry.IsCcwConvexPolygon,LE.le,SignType,Real.Angle.sign,EuclideanGeometry.oangle,Equiv.Perm,finRotateProof uses:
HAdd.hAdd,Exists,Iff.mp,le_iff_exists_add',dite,Fin.last,Eq.mpr,id,congrArg,finRotate_last,Nat.succ,finRotate_apply_zero, EuclideanGeometry.IsCcwConvexPolygon.sign_oangle'',Fin.zero_lt_one,Fin.one_lt_last,Not, EuclideanGeometry.IsCcwConvexPolygon.sign_oangle',LT.lt,Ne,propextand 9 more55 instances, coercions and auxiliary constants left out.
Tactic trace: 16 steps
Open to load the checked before-and-after goal states.
- theorem
EuclideanGeometry.isCcwConvexPolygon_zeroline 120 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NormedAddCommGroup,InnerProductSpace,Real,MetricSpace,NormedAddTorsor,Module.Oriented,Fin,OfNat.ofNat,Nat,Fact,Eq,Module.finrank, EuclideanGeometry.IsCcwConvexPolygonProof uses:
finZeroElim,LT.lt,SignType,Real.Angle.sign,EuclideanGeometry.oangle29 instances, coercions and auxiliary constants left out.
- theorem
EuclideanGeometry.isCcwConvexPolygon_oneline 122 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NormedAddCommGroup,InnerProductSpace,Real,MetricSpace,NormedAddTorsor,Module.Oriented,Fin,OfNat.ofNat,Nat,Fact,Eq,Module.finrank, EuclideanGeometry.IsCcwConvexPolygonProof uses:
LT.lt,Decidable.byContradiction,SignType,Real.Angle.sign,EuclideanGeometry.oangle,Not31 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- theorem
EuclideanGeometry.isCcwConvexPolygon_twoline 124 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NormedAddCommGroup,InnerProductSpace,Real,MetricSpace,NormedAddTorsor,Module.Oriented,Fin,OfNat.ofNat,Nat,Fact,Eq,Module.finrank, EuclideanGeometry.IsCcwConvexPolygonProof uses:
LT.lt,Decidable.byContradiction,SignType,Real.Angle.sign,EuclideanGeometry.oangle,Not31 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- theorem
EuclideanGeometry.isCcwConvexPolygon_four'line 127 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NormedAddCommGroup,InnerProductSpace,Real,MetricSpace,NormedAddTorsor,Module.Oriented,Fin,OfNat.ofNat,Nat,Fact,Eq,Module.finrank,Iff, EuclideanGeometry.IsCcwConvexPolygon,And,SignType,Real.Angle.sign,EuclideanGeometry.oangleProof uses:
Iff.intro,LT.lt,of_eq_true,Eq.trans,True,congr,congrArg,eq_true_of_decide,Eq.refl,Bool,Bool.true,and_self,And.intro, EuclideanGeometry.IsCcwConvexPolygon.sign_oangle, EuclideanGeometry.IsCcwConvexPolygon.sign_oangle',LT.lt.trans, EuclideanGeometry.IsCcwConvexPolygon.sign_oangle'',List,List.Mem,List.finRangeand 26 more69 instances, coercions and auxiliary constants left out.
Tactic trace: 31 steps
Open to load the checked before-and-after goal states.
- theorem
EuclideanGeometry.isCcwConvexPolygon_fourline 147 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NormedAddCommGroup,InnerProductSpace,Real,MetricSpace,NormedAddTorsor,Module.Oriented,Fin,OfNat.ofNat,Nat,Fact,Eq,Module.finrank,Iff, EuclideanGeometry.IsCcwConvexPolygon,Nat.succ,Matrix.vecCons,Matrix.vecEmpty,And,SignType,Real.Angle.signand 1 moreProof uses: EuclideanGeometry.isCcwConvexPolygon_four'
28 instances, coercions and auxiliary constants left out.
- def
EuclideanGeometry.IsConvexPolygonThe statement that a sequence of points form a convex polygon line 153 sourceSource documentation
The statement that a sequence of points form a convex polygon.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NormedAddCommGroup,InnerProductSpace,Real,MetricSpace,NormedAddTorsor,Module.Oriented,Fin,OfNat.ofNat,Nat,Fact,Eq,Module.finrankProof uses:
Or, EuclideanGeometry.IsCcwConvexPolygon,Neg.neg27 instances, coercions and auxiliary constants left out.
def IsConvexPolygon {n : ℕ} (p : Fin n → P) : Prop := … - theorem
EuclideanGeometry.isConvexPolygon_three_of_affineIndependentThree affine independent points always form a convex polygon line 157 sourceSource documentation
Three affine independent points always form a convex polygon.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NormedAddCommGroup,InnerProductSpace,Real,MetricSpace,NormedAddTorsor,Module.Oriented,Fin,OfNat.ofNat,Nat,Fact,Eq,Module.finrank,AffineIndependent,Nat.succ,Matrix.vecCons,Matrix.vecEmpty, EuclideanGeometry.IsConvexPolygonProof uses:
SignType,Real.Angle.sign,EuclideanGeometry.oangle,SignType.zero,False.elim,Eq.mp,And,Ne,Real.Angle,Real.pi,congrArg,Eq.symm,propext,Real.Angle.sign_ne_zero_iff,EuclideanGeometry.oangle_ne_zero_and_ne_pi_iff_affineIndependent,Eq.refl,SignType.neg,Or.inr, EuclideanGeometry.IsCcwConvexPolygon,Neg.negand 34 more74 instances, coercions and auxiliary constants left out.
Tactic trace: 21 steps
Open to load the checked before-and-after goal states.
theorem isConvexPolygon_three_of_affineIndependent {A B C : P} (hABC : AffineIndependent ℝ ![A, B, C]) : IsConvexPolygon ![A, B, C] := by …Mentions: EuclideanGeometry.IsConvexPolygon
- theorem
EuclideanGeometry.isConvexPolygon_three_iff_affineIndependentline 172 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NormedAddCommGroup,InnerProductSpace,Real,MetricSpace,NormedAddTorsor,Module.Oriented,Fin,OfNat.ofNat,Nat,Fact,Eq,Module.finrank,Iff, EuclideanGeometry.IsConvexPolygon,Nat.succ,Matrix.vecCons,Matrix.vecEmpty,AffineIndependentProof uses:
Iff.intro,Eq.mpr,And,Ne,Real.Angle,EuclideanGeometry.oangle,Real.pi,id,congrArg,Eq.symm,propext,EuclideanGeometry.oangle_ne_zero_and_ne_pi_iff_affineIndependent,SignType,Real.Angle.sign,Real.Angle.sign_ne_zero_iff, EuclideanGeometry.IsCcwConvexPolygon,Neg.neg,Or,Or.inl, EuclideanGeometry.IsCcwConvexPolygon.sign_oangle and 18 more68 instances, coercions and auxiliary constants left out.
Tactic trace: 16 steps
Open to load the checked before-and-after goal states.
- theorem
EuclideanGeometry.isConvexPolygon_triangleline 187 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NormedAddCommGroup,InnerProductSpace,Real,MetricSpace,NormedAddTorsor,Module.Oriented,Fin,OfNat.ofNat,Nat,Fact,Eq,Module.finrank,Affine.Triangle, EuclideanGeometry.IsConvexPolygon,HAdd.hAdd,Affine.Simplex.pointsProof uses:
Matrix.vecCons,Nat.succ,Matrix.vecEmpty,funext,List,List.Mem,List.finRange,HEq,Membership.mem,Finset,Fintype.elems,Fintype.complete,List.cons,List.Mem.head,Fin.mk,Nat.le_of_lt,Nat.le_refl,List.nil,Eq.refl,eq_of_heqand 13 more43 instances, coercions and auxiliary constants left out.
Tactic trace: 6 steps
Open to load the checked before-and-after goal states.
- def
EuclideanGeometry.triangle_arealine 192 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NormedAddCommGroup,InnerProductSpace,Real,MetricSpace,NormedAddTorsor,Module.Oriented,Fin,OfNat.ofNat,Nat,Fact,Eq,Module.finrankProof uses:
HDiv.hDiv,LinearMap,RingHom.id,Orientation.areaForm,Module.Oriented.positiveOrientation,VSub.vsub44 instances, coercions and auxiliary constants left out.
- lemma
EuclideanGeometry.triangle_area_eq_detline 195 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
EuclideanSpace,Real,Fin,OfNat.ofNat,Nat,Eq, EuclideanGeometry.triangle_area,ENNReal,HDiv.hDiv,Matrix.det,Equiv,Matrix,Matrix.of,Matrix.vecCons,WithLp.ofLp,Matrix.vecEmptyProof uses:
Eq.mpr,LinearMap,RingHom.id,Orientation.areaForm,Module.Oriented.positiveOrientation,VSub.vsub,id,congrArg,EuclideanGeometry.triangle_area.eq_1,AlternatingMap,Orientation.volumeForm,Orientation.areaForm_to_volumeForm,Module.Basis.det,OrthonormalBasis.toBasis,EuclideanSpace.basisFun,Orientation.volumeForm_robust,rfl,Orientation,Module.Basis.orientation,Module.Basis.toMatrixand 66 more163 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
- def
EuclideanGeometry.maximalDistinctDistancesFromDocumented declaration: maximalDistinctDistancesFrom line 211 sourceSource documentation
Let $x_1,\ldots,x_n\in \mathbb{R}^2$ and let $R(x_i)=\#\{ \lvert x_j-x_i\rvert : j\neq i\}$, where the points are ordered such that $$R(x_1)\leq \cdots \leq R(x_n).$$ Let $g(n)$ be the maximum number of distinct values the $R(x_i)$ can take.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NatProof uses:
SupSet.sSup,Set.ofPred,Exists,Finset,EuclideanSpace,Real,Fin,OfNat.ofNat,Eq,Finset.card,Finset.image, distinctDistancesFrom,ENNReal12 instances, coercions and auxiliary constants left out.
noncomputable def maximalDistinctDistancesFrom (n : ℕ) : ℕ := …
- def
EuclideanGeometry.InGeneralPositionA collection $x_1, \dots, x_n\in\mathbb{R}^2$ is in general position if no three are collinear and no four lie on a circle line 218 sourceSource documentation
A collection $x_1, \dots, x_n\in\mathbb{R}^2$ is in general position if no three are collinear and no four lie on a circle.
Stated for
Set ℝ²so that infinite collections are covered; aFinsetargument coerces.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Set,EuclideanSpace,Real,Fin,OfNat.ofNat,NatProof uses:
And, EuclideanGeometry.NonTrilinear,ENNReal,LE.le,Eq,Set.ncard,Not,EuclideanGeometry.Cospherical24 instances, coercions and auxiliary constants left out.
def InGeneralPosition (X : Set ℝ²) : Prop := …
- def
EuclideanGeometry.IsRightAngleda b care the vertices of a right-angled triangle: the (unoriented) angle at one of the three vertices equalsπ / 2line 223 sourceSource documentation
a b care the vertices of a right-angled triangle: the (unoriented) angle at one of the three vertices equalsπ / 2.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NormedAddCommGroup,InnerProductSpace,Real,MetricSpace,NormedAddTorsorProof uses:
Or,Eq,EuclideanGeometry.angle,HDiv.hDiv,Real.pi,OfNat.ofNat12 instances, coercions and auxiliary constants left out.
def IsRightAngled (a b c : P) : Prop := …
Mentions: c
- def
EuclideanGeometry.IsIsoscelesTrapezoidDocumented declaration: IsIsoscelesTrapezoid line 233 sourceSource documentation
a b c dare the vertices, in counter-clockwise order, of an isosceles trapezoid: they are in strictly convex position, the sideabis parallel to the sidecd(the two bases), and the diagonalsacandbdhave equal length. One pair of parallel sides together with equal diagonals is the classical characterization of an isosceles trapezoid; in particular it rules out non-rectangular parallelograms.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
EuclideanSpace,Real,Fin,OfNat.ofNat,NatProof uses:
And, EuclideanGeometry.IsCcwConvexPolygon,Nat.succ,ENNReal,Matrix.vecCons,Matrix.vecEmpty,AffineSubspace.Parallel,affineSpan,Insert.insert,Set,Singleton.singleton,Eq,Dist.dist41 instances, coercions and auxiliary constants left out.
def IsIsoscelesTrapezoid (a b c d : ℝ²) : Prop := …
Mentions: c
- def
EuclideanGeometry.IsLineA line in the plane: an affine subspace ofℝ²whose direction is one-dimensional line 239 sourceSource documentation
A line in the plane: an affine subspace of
ℝ²whose direction is one-dimensional.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
AffineSubspace,Real,EuclideanSpace,Fin,OfNat.ofNat,Nat,ENNRealProof uses:
Eq,Module.finrank,Subtype,Membership.mem,Submodule,AffineSubspace.direction58 instances, coercions and auxiliary constants left out.
def IsLine (L : AffineSubspace ℝ ℝ²) : Prop := …
- def
IsIsoscelesline 244 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
DistProof uses:
Or,Eq,Real,Dist.dist - def
Set.IsIsoscelesline 247 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Dist,SetProof uses:
And,Nonempty, Set.Triplewise, IsIsosceles1 instances, coercions and auxiliary constants left out.
- def
Set.IsIsoscelesFreeA set is isosceles-free if no three distinct points in it form an isosceles triangle line 251 sourceSource documentation
A set is isosceles-free if no three distinct points in it form an isosceles triangle.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Dist,SetProof uses: Set.Triplewise,
Not, IsIsoscelesdef Set.IsIsoscelesFree {α : Type*} [Dist α] (A : Set α) : Prop := … - theorem
Set.IsIsoscelesFree.monoline 254 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Dist,Set,LE.le, Set.IsIsoscelesFreeProof uses: Set.Triplewise.mono,
Not, IsIsosceles2 instances, coercions and auxiliary constants left out.